Exemplo 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();
        }
Exemplo 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();
 }
Exemplo 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);
        }
Exemplo 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();
        }
 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();
 }
Exemplo 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);
            }
        }
Exemplo 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();
        }
 private void btnRegister_Click(object sender, EventArgs e)
 {
     var frmedit = new PatientRegister();
     frmedit.ShowDialog();
     this.bdgPatient.Clear();
     this.bdgPatient.DataSource = patientRepo.GetAll();
 }
Exemplo 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);
 }
Exemplo 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);

        }