Ejemplo n.º 1
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            var frmedit = new PatientRegister();

            frmedit.ShowDialog();
            this.bdgPatient.Clear();
            this.bdgPatient.DataSource = patientRepo.GetAll();
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Handles the Click event of the btnRegister control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void BtnRegisterClick(object sender, EventArgs e)
 {
     var registerform = new PatientRegister();
     var result = registerform.ShowDialog();
     if (result != DialogResult.Yes) return;
     this._selectedPatient = registerform.Patient;
     UpdateForm(registerform.Patient);
     UpdateButtonStatus();
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Handles the Click event of the btnRegister control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void btnRegister_Click(object sender, EventArgs e)
        {
            var registerform = new PatientRegister();
            var result       = registerform.ShowDialog();

            if (result != System.Windows.Forms.DialogResult.Yes)
            {
                return;
            }
            UpdateForm(registerform.Patient);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Handles the Click event of the btnRegister control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void BtnRegisterClick(object sender, EventArgs e)
        {
            var registerform = new PatientRegister();
            var result       = registerform.ShowDialog();

            if (result != DialogResult.Yes)
            {
                return;
            }
            this._selectedPatient = registerform.Patient;
            UpdateForm(registerform.Patient);
            UpdateButtonStatus();
        }
Ejemplo n.º 5
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     this.bdgPatient.EndEdit();
     var patient = (Patient)this.bdgPatient.Current;
     if (patient == null)
     {
         MessageDialog.Instance.ShowMessage(this, "M001", "Bệnh nhân");
         return;
     }
     var frmedit = new PatientRegister(patient);
     frmedit.ShowDialog();
     this.bdgPatient.Clear();
     this.bdgPatient.DataSource = patientRepo.GetAll();
 }
Ejemplo n.º 6
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            var frmedit = new PatientRegister();

            frmedit.ShowDialog();
            this.bdgPatient.Clear();
            if (AppContext.LoggedInUser.Role > MedicineRoles.SupperManager)
            {
                this.bdgPatient.DataSource = patientRepo.GetByNameAndYear(this.txtPatientName.Text, (int?)this.txtBirthYear.ValueObject, AppContext.CurrentClinic.Id);
            }
            else
            {
                this.bdgPatient.DataSource = patientRepo.GetByNameAndYear(this.txtPatientName.Text, (int?)this.txtBirthYear.ValueObject);
            }
        }
Ejemplo n.º 7
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            this.bdgPatient.EndEdit();
            var patient = (Patient)this.bdgPatient.Current;

            if (patient == null)
            {
                MessageDialog.Instance.ShowMessage(this, "M001", "Bệnh nhân");
                return;
            }
            var frmedit = new PatientRegister(patient);

            frmedit.ShowDialog();
            this.bdgPatient.Clear();
            this.bdgPatient.DataSource = patientRepo.GetAll();
        }
Ejemplo n.º 8
0
 private void btnRegister_Click(object sender, EventArgs e)
 {
     var frmedit = new PatientRegister();
     frmedit.ShowDialog();
     this.bdgPatient.Clear();
     this.bdgPatient.DataSource = patientRepo.GetAll();
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Handles the Click event of the btnRegister control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 private void btnRegister_Click(object sender, EventArgs e) {
     var registerform = new PatientRegister();
     var result = registerform.ShowDialog();
     if (result != System.Windows.Forms.DialogResult.Yes) return;
     UpdateForm(registerform.Patient);
 }
Ejemplo n.º 10
0
        private void btnRegister_Click(object sender, EventArgs e)
        {
            var frmedit = new PatientRegister();
            frmedit.ShowDialog();
            this.bdgPatient.Clear();
            if (AppContext.LoggedInUser.Role > MedicineRoles.SupperManager)
                this.bdgPatient.DataSource = patientRepo.GetByNameAndYear(this.txtPatientName.Text, (int?)this.txtBirthYear.ValueObject, AppContext.CurrentClinic.Id);
            else this.bdgPatient.DataSource = patientRepo.GetByNameAndYear(this.txtPatientName.Text, (int?)this.txtBirthYear.ValueObject);

        }