public static FormProduct Instance() { if (sForm == null) { sForm = new FormProduct(); } return(sForm); }
private void productMasterFileToolStripMenuItem_Click(object sender, EventArgs e) { CloseAllChild(); Form sForm = FormProduct.Instance(); sForm.MdiParent = this; sForm.Show(); sForm.Activate(); }
private void FormProduct_Load(object sender, EventArgs e) { WindowState = FormWindowState.Maximized; daFormProductList = new MySqlDataAdapter("", clsConnection.CN); LoadProduct("SELECT tblproduct.productcode, tblproduct.productname, tblcategory.categoryname, tblcategory.categorycode, tblsupplier.suppliername, tblsupplier.suppliercode, tblproduct.unitprice, tblproduct.sellingprice, tblproduct.stock FROM tblproduct RIGHT JOIN tblcategory ON tblproduct.categoryautoid = tblcategory.autoid RIGHT JOIN tblsupplier ON tblproduct.supplierautoid = tblsupplier.autoid ORDER BY tblproduct.autoid ASC"); publicFormProduct = this; }