private void showallbutton1_Click(object sender, EventArgs e) { BranchCollection obj = new BranchCollection(); obj.LoadAll(); dataGridView1.DataSource = obj.LoadedTable; }
public AddEmployee() { InitializeComponent(); BranchCollection obj = new BranchCollection(); obj.LoadAll(); comboBox1.DataSource = obj.LoadedTable; comboBox1.ValueMember = "Branch_ID"; comboBox1.DisplayMember = "Branch_Name"; }
public SoldProductForm() { InitializeComponent(); if (LoginForm.USERTYPE == "hqmanager") { BranchCollection obj = new BranchCollection(); obj.LoadAll(); BranchnamecomboBox1.DataSource = obj.LoadedTable; BranchnamecomboBox1.ValueMember = "Branch_ID"; BranchnamecomboBox1.DisplayMember = "Branch_Name"; Branchnamelabel2.Visible = false; BranchProductColletion bpc = new BranchProductColletion(); bpc.LoadAll(); productidcomboBox2.DataSource = bpc.LoadedTable; productidcomboBox2.DisplayMember = "PName"; productidcomboBox2.ValueMember = "PID"; SoldproducCollection sp = new SoldproducCollection(); sp.LoadAll(); datecomboBox3.DataSource = sp.LoadedTable; datecomboBox3.ValueMember = "Sold_Date"; datecomboBox3.DisplayMember = "Sold_Date"; SupplierCollection sc = new SupplierCollection(); sc.LoadAll(); supplieridcomboBox4.DataSource = sc.LoadedTable; supplieridcomboBox4.ValueMember = "Supplier_ID"; supplieridcomboBox4.DisplayMember = "Supplier_Name"; } else if (LoginForm.USERTYPE == "manager") { Branchnamelabel2.Text = LoginForm.BNAME; BranchnamecomboBox1.Visible = false; BranchProductColletion bpc = new BranchProductColletion(); bpc.LoadAll2(LoginForm.BRCHID); productidcomboBox2.DataSource = bpc.LoadedTable; productidcomboBox2.DisplayMember = "PName"; productidcomboBox2.ValueMember = "PID"; SoldproducCollection sp = new SoldproducCollection(); sp.LoadAll(); datecomboBox3.DataSource = sp.LoadedTable; datecomboBox3.ValueMember = "Sold_Date"; datecomboBox3.DisplayMember = "Sold_Date"; SupplierCollection sc = new SupplierCollection(); sc.LoadAll(); supplieridcomboBox4.DataSource = sc.LoadedTable; supplieridcomboBox4.ValueMember = "Supplier_ID"; supplieridcomboBox4.DisplayMember = "Supplier_Name"; } }
public Branch_Inventory() { InitializeComponent(); if (LoginForm.USERTYPE == "hqmanager") { BranchIDlabel13.Visible = false; BranchCollection obj1 = new BranchCollection(); obj1.LoadAll(); BranchcomboBox1.DataSource = obj1.LoadedTable; BranchcomboBox1.DisplayMember = "Branch_Name"; BranchcomboBox1.ValueMember = "Branch_ID"; } else { BranchcomboBox1.Visible = false; BranchIDlabel13.Text = LoginForm.BNAME; } BranchProductColletion obj22 = new BranchProductColletion(); obj22.LoadAll(); comboBox1.DataSource = obj22.LoadedTable; comboBox1.DisplayMember = "PName"; comboBox1.ValueMember = "PID"; }