Exemplo n.º 1
0
        private void dgProducts_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.ColumnIndex == dgProducts.Columns["ColProductEdit"].Index && e.RowIndex >= 0)
            {
                if (myfrmProducts == null || myfrmProducts.IsDisposed)
                {
                    int index = e.RowIndex;

                    String EditingItemID = (String)dgProducts.Rows[index].Cells[1].Value;

                    myfrmProducts = new frmProducts(EditingItemID, myBusiness);

                    myfrmProducts.MdiParent = this.MdiParent;
                }
                myfrmProducts.Show();
            }
        }
Exemplo n.º 2
0
 private void addNewProductToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (myfrmProducts == null || myfrmProducts.IsDisposed)
     {
         myfrmProducts           = new frmProducts(this.business);
         myfrmProducts.MdiParent = this;
     }
     myfrmProducts.Show();
 }