public void addCustomerToolStripMenuItem_Click(object sender, EventArgs e) { panel1.Visible = false; frmAddCustomer obj = new frmAddCustomer(0, ""); obj.MdiParent = this; obj.Show(); }
private void editToolStripMenuItem_Click(object sender, EventArgs e) { if (dgvListOfCustomer.CurrentRow.Index > -1) { DataGridViewRow row = dgvListOfCustomer.Rows[dgvListOfCustomer.CurrentCell.RowIndex]; frmAddCustomer obj = new frmAddCustomer(Convert.ToInt32(row.Cells["CustomerID"].Value), ""); obj.ShowDialog(); } }
private void btnEditCustomer_Click(object sender, EventArgs e) { if (dgvListOfCustomer.CurrentRow.Index >= 0) { frmAddCustomer obj = new frmAddCustomer(Convert.ToInt32(dgvListOfCustomer.Rows[dgvListOfCustomer.CurrentRow.Index].Cells["Cust ID"].Value.ToString()), "List"); obj.ShowDialog(); } else { MessageBox.Show("Select Row First."); } }
private void btnAddCustomer_Click(object sender, EventArgs e) { frmAddCustomer obj = new frmAddCustomer(0, "Product"); obj.ShowDialog(); }