Beispiel #1
0
        private void btnAddPatient_Click(object sender, EventArgs e)
        {
            frmAddOrEdit frm = new frmAddOrEdit();

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