private void bindingSourceExaminations_CurrentChanged(object sender, EventArgs e) { examination = bindingSourceExaminations.Current as Examination; if (examination.IsNull()) { return; } bindingSourceMessages.DataSource = null; bindingSourcePastExaminations.DataSource = null; if (open) { Extensions.Extensions.ShowWaitForm(description: "Sayfa yenileniyor..."); } labelControlNameSurname.Text = examination.Patient.NameSurname; lookUpEditDiagnosis.EditValue = examination.DiagnosisId; textEditNextDay.Text = examination.NextTime.IsNull() ? String.Empty : (Convert.ToDateTime(examination.NextTime) - examination.Time).Days.ToString(); checkEditCanSendMessage.Checked = examination.CanSendMessage; textBoxNote.Text = examination.DoctorNote; groupControlCurrentExamination.Text = String.Format("Şuanki Muayene Bilgisi ({0} Muayene)", examination.IsActive ? "Açık" : "Kapalı"); LaboratoryRequestSolClient client = Extensions.Extensions.GetLaboratoryRequest(); bindingSourceLabResult.DataSource = client.LaboratoryRequests(examination.Id, true); client.Close(); if (open) { SplashScreenManager.CloseForm(false); } }
public XtraFormExamDetails(Examination examination) { InitializeComponent(); labelControlDate.Text = examination.Time.ToString("D"); if (examination.NextTime != null) { labelControlNextDate.Text = examination.NextTime.IsNotNull() ? examination.NextTime.Value.ToString("D") : String.Empty; } labelControlDiagnosis.Text = examination.Diagnosis.DisplayName; textBoxDoctorNote.Text = examination.DoctorNote; PrescriptionSolClient client = Extensions.Extensions.GetPrescriptionService(); bindingSourcePrescription.DataSource = client.GetPrescriptionItems(examination.Id); LaboratoryRequestSolClient laboratoryRequest = Extensions.Extensions.GetLaboratoryRequest(); bindingSourceLabRequests.DataSource = laboratoryRequest.LaboratoryRequests(examination.Id, true); laboratoryRequest.Close(); client.Close(); SplashScreenManager.CloseForm(false); opensplash = true; }