Esempio n. 1
0
        private void newProductToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var childForm = new ProductEditForm(null, user, null);

            childForm.MdiParent = this;
            childForm.Text      = "New Product";
            childForm.Show();
        }
Esempio n. 2
0
        private void productsGrid_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            var dr          = ds.Rows[e.RowIndex];
            var product     = new Product(Convert.ToInt64(dr["ProductId"]), dr["ProductName"].ToString(), dr["Description"].ToString(), Convert.ToInt16(dr["UnitId"]), Convert.ToInt16(dr["SupplierId"]));
            var productEdit = new ProductEditForm(product, user, this);

            productEdit.MdiParent = this.MdiParent;
            productEdit.Show();
        }