using BiskLog_Point_Of_Sale.Multiple_Login; using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace BiskLog_Point_Of_Sale.Company_Setup { public partial class BranchSetup : Form { Holder holder; string previous; public static string forlo; public BranchSetup(Holder holding, string prev) { InitializeComponent(); holder = holding; previous = prev; forlo = previous; } private void Button1_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(branchName.Text) && !String.IsNullOrEmpty(branchTelephone.Text) && !String.IsNullOrEmpty(branchCity.Text)) { NewCompany.branchAlias = branchName.Text; NewCompany.branch_city = branchCity.Text; NewCompany.branch_address = branchAddress.Text; NewCompany.branch_province = branchProvince.Text; NewCompany.branch_telephone = branchTelephone.Text; holder.moveToFinal("Branch"); } else { a1.Visible = true; a2.Visible = true; a3.Visible = true; string title = "Essential fields empty"; string message = "Fields with asterisk have to be filled to continue"; NoAction confirmation = new NoAction(title, message); confirmation.BringToFront(); confirmation.ShowDialog(); } } private void Button2_Click(object sender, EventArgs e) { if (previous == "main") { holder.moveToFirst(); } else { holder.moveToNewCompany(); } } } }