Example #1
0
        private void btnInsertCustomer_Click(object sender, EventArgs e)
        {
            AddOREditeCustomers frmAddCustomers = new AddOREditeCustomers();

            if (frmAddCustomers.ShowDialog() == DialogResult.OK)
            {
                UsersBind();
            }
        }
Example #2
0
 private void btnEditeCustomer_Click(object sender, EventArgs e)
 {
     if (dgvCustomers.CurrentRow != null)
     {
         int userid = int.Parse(dgvCustomers.CurrentRow.Cells[0].Value.ToString());
         AddOREditeCustomers editCustomers = new AddOREditeCustomers();
         editCustomers.userId = userid;
         if (editCustomers.ShowDialog() == DialogResult.OK)
         {
             UsersBind();
         }
     }
     else
     {
         MessageBox.Show("لطفا یک نغر را انتخاب کنید", "خطا", MessageBoxButtons.OKCancel, MessageBoxIcon.Error);
     }
 }