예제 #1
0
        public void addCustomerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            panel1.Visible = false;
            frmAddCustomer obj = new frmAddCustomer(0, "");

            obj.MdiParent = this;
            obj.Show();
        }
예제 #2
0
 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();
     }
 }
예제 #3
0
 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.");
     }
 }
예제 #4
0
        private void btnAddCustomer_Click(object sender, EventArgs e)
        {
            frmAddCustomer obj = new frmAddCustomer(0, "Product");

            obj.ShowDialog();
        }