private void BindEditForm(object[] data) { supplierBAL = new BAL.SupplierBAL(); DataTable table = new DataTable(); table = supplierBAL.getSuppliers(data); BindFields(table); }
private void BindSupplierGrid(object[] data) { supplierBAL = new BAL.SupplierBAL(); DataTable table = new DataTable(); table = supplierBAL.getSuppliers(data); dataGridSupplier.DataSource = table; this.dataGridSupplier.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridSupplier_RowPostPaint); //dataGridUser.Columns[5].DefaultCellStyle.Format = "MM/dd/yyyy"; //dataGridUser.Columns[6].DefaultCellStyle.Format = "MM/dd/yyyy"; this.dataGridSupplier.Columns["SupplierId"].Visible = false; // Auto Resize dataGridSupplier.AutoResizeColumns(); dataGridSupplier.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; }
private void btnYes_Click(object sender, EventArgs e) { switch (OfModule) { case "User": BAL.UserBAL userBAL = new BAL.UserBAL(); if (userBAL.deleteUser(ToDeleteId)) { MessageBox.Show("Deleted Successfully"); this.Close(); } break; case "Customer": BAL.CustomerBAL customerBAL = new BAL.CustomerBAL(); if (customerBAL.deleteCustomer(ToDeleteId)) { MessageBox.Show("Deleted Successfully"); this.Close(); } break; case "Supplier": BAL.SupplierBAL supplierBAL = new BAL.SupplierBAL(); if (supplierBAL.deleteSupplier(ToDeleteId)) { MessageBox.Show("Deleted Successfully"); this.Close(); } break; case "Material": BAL.MaterialBAL materialBAL = new BAL.MaterialBAL(); if (materialBAL.deleteMaterial(ToDeleteId)) { MessageBox.Show("Deleted Successfully"); this.Close(); } break; default: break; } }
public EditSupplier(int SupplierId) { InitializeComponent(); supplierBAL = new BAL.SupplierBAL(); BindEditForm(new object[] { SupplierId, "" }); }
public AddSuppliers() { InitializeComponent(); supplierBAL = new BAL.SupplierBAL(); }