示例#1
0
        private void btnNewCustomer_Click(object sender, EventArgs e)
        {
            frm_AddCustomer frm_AddCustomer = new frm_AddCustomer();

            if (frm_AddCustomer.ShowDialog() == DialogResult.OK)
            {
                DataBinding();
            }
        }
示例#2
0
 private void btnEditCustomer_Click(object sender, EventArgs e)
 {
     if (dgvcustomers.CurrentRow != null)
     {
         int             customerid     = int.Parse(dgvcustomers.CurrentRow.Cells[0].Value.ToString());
         frm_AddCustomer frm_AddCustome = new frm_AddCustomer();
         frm_AddCustome.CustomerID = customerid;
         if (frm_AddCustome.ShowDialog() == DialogResult.OK)
         {
             DataBinding();
         }
     }
     else
     {
         MessageBox.Show("یک نفر رو انتخاب کن");
     }
 }