Esempio n. 1
0
        private void menuItemNewPatient_Click(object sender, EventArgs e)
        {
            int             newPatientId = 0;
            EditPatientForm patientForm  = new EditPatientForm(newPatientId);

            patientForm.ShowDialog();
        }
Esempio n. 2
0
        private void EditItem(Patient item)
        {
            EditPatientForm form = new EditPatientForm(item);

            if (form.ShowDialog() == DialogResult.OK)
            {
                FillDataGridView(ezkoController.GetPatients());
            }
        }
Esempio n. 3
0
        private void menuItemCurrentPatient_Click(object sender, EventArgs e)
        {
            var currentUser          = Membership.CurrentUser;
            int currentUserPatientId = currentUser.PatientId.HasValue ? currentUser.PatientId.Value : 0;

            var editPatientForm = new EditPatientForm(currentUserPatientId);

            editPatientForm.ShowDialog();
            if (currentUserPatientId == 0)
            {
                int newPatientId = editPatientForm.PatientId;
            }
        }
Esempio n. 4
0
        /// <summary>
        /// Handles edit patient details button clicks
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EditPatientDetailsButton_Click(object sender, EventArgs e)
        {
            if (this.patientsListView.SelectedItems.Count == 0)
            {
                MessageBox.Show("Please select a Patient, then click the button again.", "Select a Patient to Edit Details");
                return;
            }
            int             selectedIndex      = this.patientsListView.SelectedIndices[0];
            Patient         theSelectedPatient = this.thePatientList[selectedIndex];
            EditPatientForm theEditPatientForm = new EditPatientForm(this, theSelectedPatient);

            theEditPatientForm.Show();
            this.Enabled = false;
        }
 private void btnEditPatient_Click(object sender, EventArgs e)
 {
     if (this.patientDataGridView.SelectedRows.Count == 0)
     {
         MessageBox.Show(this, Resources.MainForm_btnEditPatient_Click_Please_select_a_user_to_edit,
                         Resources.MainForm_buttonAddAppointment_Click_Error, MessageBoxButtons.OK,
                         MessageBoxIcon.Error);
     }
     else
     {
         var patient     = (Patient)this.patientDataGridView.SelectedRows[0].DataBoundItem;
         var editPatient = new EditPatientForm(patient);
         editPatient.ShowDialog();
         this.updateTable();
     }
 }