private void barButtonItemSave_ItemClick(object sender, ItemClickEventArgs e) { prescription.PrescriptionItems = prescriptionItems.Select(i => new PrescriptionItem { MedicamentId = i.MedicamentId, UsePerDay = i.UsePerDay, DoctorNote = i.DoctorNote, IsActive = true }).ToArray(); Extensions.Extensions.ShowWaitForm(description: "Reçeye sisteme kaydediliyor..."); PrescriptionSolClient client = Extensions.Extensions.GetPrescriptionService(); if (client.IsNull()) { return; } result = client.Insert(prescription); SplashScreenManager.CloseForm(false); Extensions.Extensions.ProcessResultMessage(result.Errors, (int)result.Result); if (result.Result == ExtensionsBLLResult.Success) { Close(); } }
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; }
public static PrescriptionSolClient GetPrescriptionService() { PrescriptionSolClient client; try { client = new PrescriptionSolClient(binding, new EndpointAddress(String.Format(GlobalVariables.ServiceRoot + "/{0}", "PrescriptionService.svc"))); client.Select(-1); } catch (Exception) { bool b = Program.TestService(); if (!b) { Application.Exit(); } client = new PrescriptionSolClient(binding, new EndpointAddress(String.Format(GlobalVariables.ServiceRoot + "/{0}", "PrescriptionService.svc"))); } return(client); }