示例#1
0
        void Btn_AddNewCustomer_Click(object sender, EventArgs e)
        {
            Frm_CustomerEdit frm = new Frm_CustomerEdit();

            frm.ShowDialog();
            UpdateCustomers();
        }
示例#2
0
        void Btn_Edit_Click(object sender, EventArgs e)
        {
            Frm_CustomerEdit frm = new Frm_CustomerEdit(CUSTOMER_ID);

            frm.ShowDialog();
            frm.Dispose();
            UpdateDetails();
        }
示例#3
0
 void Btn_ModCustomer_Click(object sender, EventArgs e)
 {
     if (DGV_Customers.SelectedRows.Count > 0)
     {
         Frm_CustomerEdit frm = new Frm_CustomerEdit(int.Parse(DGV_Customers.SelectedRows[0].Cells[0].Value.ToString()));
         frm.ShowDialog();
         UpdateCustomers();
     }
     else
     {
         MessageBox.Show("Please select a customer!");
     }
 }