/**************************************************************supplier******************************/ public void Supplier_Changed(object sender, EventArgs e) { if (_supForm != null) { if (_supForm.GetSupplierBox() != "System.Data.DataRowView") { if (_supForm.GetSupplierBox() != "-1") { String supID = _supForm.GetSupplierBox(); if (supID != null) { Supplier _supplier = new Supplier(); _supplier.changeSupplier(supID); } } } } }
public void delete_supplier_btn_click(object sender, EventArgs e) { if (MessageBox.Show("Are you sure you want Delete this Supplier", "Confirm Deletion", MessageBoxButtons.OKCancel) == DialogResult.OK) { _supForm = (SupplierForm)((Button)(sender)).GetContainerControl(); String supID = _supForm.GetSupplierBox(); Supplier _supplier = new Supplier(); _supplier.Delete(supID); _supForm.Close(); } }