Example #1
0
        private void btnAddStaff_Click(object sender, EventArgs e)
        {
            frmAddOrEditStaff frm = new frmAddOrEditStaff();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                BindGrid();
            }
        }
Example #2
0
 private void btnEditStaff_Click(object sender, EventArgs e)
 {
     if (dgvStaff.CurrentRow != null)
     {
         int id = int.Parse(dgvStaff.CurrentRow.Cells[0].Value.ToString());
         frmAddOrEditStaff frm = new frmAddOrEditStaff();
         frm.id = id;
         if (frm.ShowDialog() == DialogResult.OK)
         {
             BindGrid();
         }
     }
     else
     {
         RtlMessageBox.Show($"یک شخص را انخاب کنید!", "خطا", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }