コード例 #1
0
ファイル: Main.cs プロジェクト: gokhankaya21/CRM-Program
        private void newProductToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var childForm = new ProductEditForm(null, user, null);

            childForm.MdiParent = this;
            childForm.Text      = "New Product";
            childForm.Show();
        }
コード例 #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();
        }