Exemple #1
0
 private void toolStripAddProduct_Click(object sender, EventArgs e)
 {
     if (!funcIsFormOpen("productDetails"))
     {
         productDetails frmProdDetails = new productDetails(1);//Sent value denotes which tab to open
         frmProdDetails.MdiParent = this;
         frmProdDetails.Show();
     }
     else
     {
         funcBringToFront("productDetails");
     }
 }
Exemple #2
0
 protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
 {
     if (keyData == Keys.F2)//Add New Supplier
     {
         supplierDetails frmSupDetails = new supplierDetails(1);
         frmSupDetails.ShowDialog(this);
         funcPopulateSupplierList();
         return(true);
     }
     if (keyData == Keys.F3)//Add New Product
     {
         productDetails frmProdDetails = new productDetails(1);
         frmProdDetails.ShowDialog(this);
         funcPopulateProductList();
         return(true);
     }
     return(base.ProcessCmdKey(ref msg, keyData));
 }