Exemplo n.º 1
0
 private void EditBarItem_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (prescription != null && !string.IsNullOrWhiteSpace(DescriptionME.Text) && DateTE.DateTime != null && DateTE.DateTime > DateTime.Now && !string.IsNullOrWhiteSpace(NameTE.Text))
     {
         prescription.Date        = DateTE.DateTime;
         prescription.Description = DescriptionME.Text;
         prescription.Patient     = patient;
         prescription.Name        = NameTE.Text;
         prescription.Name        = NameTE.Text;
         if (!_DB.UpdatePrescription(prescription))
         {
             XtraMessageBox.Show("Element is not edited!");
         }
         _prescription = _DB.GetPrescriptionForPatient(patient);
         PresciptionGridControl.DataSource = _prescription;
         ClearData();
     }
     else
     {
         XtraMessageBox.Show("All fields should be filled!");
     }
 }