Example #1
0
 public PrintLab(LabratoryService labsrv)
 {
     if (labsrv == null)
     {
         this.Close(); return;
     }
     InitializeComponent();
     labratoryService = labsrv;
     fillDatas();
 }
Example #2
0
        public static bool ValidateLabService(LabratoryService entity)
        {
            if (entity == null)
            {
                Methods.ShowStandardMsgBox(FormMessageType.Error, RscError.ValidationTitle, "خطا در بازحوانی اطلاعات فرم");
                return false;
            }
            if (DateTime.Compare(entity.InDate.Date, entity.DueDate.Date) > 0)
            {
                Methods.ShowStandardMsgBox(FormMessageType.Error, RscError.ValidationTitle, "موعد تحویل قبل از تاریخ ورود است");
                return false;
            }
            if (entity.Labratory == null)
            {
                Methods.ShowStandardMsgBox(FormMessageType.Error, RscError.ValidationTitle, "نام لابراتوار را وارد نمایید");
                return false;
            }
            if (entity.Patient == null)
            {
                Methods.ShowStandardMsgBox(FormMessageType.Error, RscError.ValidationTitle, "نام بیمار را وارد نمایید");
                return false;
            }
            if (entity.Doctor == null)
            {
                Methods.ShowStandardMsgBox(FormMessageType.Error, RscError.ValidationTitle, "نام پزشک را وارد نمایید");
                return false;
            }
            if (entity.Tooth == 0)
            {
                Methods.ShowStandardMsgBox(FormMessageType.Error, RscError.ValidationTitle, "دندانی انتخاب نشده است");
                return false;
            }

            return true;
        }
Example #3
0
 private void setLabservice(LabratoryService ls)
 {
     labratoryServiceBindingSource.DataSource = ls;
     //comboLab.SelectedItem = ls.Labratory;
 }
Example #4
0
 private void ClearForm()
 {
     grdLabSrvs.CurrentRow = null;
     LabratoryService item = new LabratoryService();
     ucTooth.ChildTooth = false;
     item.Context = DataLayer.GetContext();
     item.InDate = DateTime.Now;
     item.DueDate = DateTime.Now;
     item.ProCelainFusedToMetal = 1;
     item.Implant = 1;
     item.AllCeramic = 1;
     labratoryServiceBindingSource.DataSource = item;
     btnAdd.Enabled = true;
     comboDoctors.SelectedIndex = -1;
     comboPatient.SelectedIndex = -1;
     comboLab.Focus();
 }
Example #5
0
 /// <summary>
 /// Deprecated Method for adding a new object to the LabratoryServices EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToLabratoryServices(LabratoryService labratoryService)
 {
     base.AddObject("LabratoryServices", labratoryService);
 }
Example #6
0
 /// <summary>
 /// Create a new LabratoryService object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="tooth">Initial value of the Tooth property.</param>
 /// <param name="shade">Initial value of the Shade property.</param>
 /// <param name="dueDate">Initial value of the DueDate property.</param>
 /// <param name="inDate">Initial value of the InDate property.</param>
 /// <param name="proCelainFusedToMetal">Initial value of the ProCelainFusedToMetal property.</param>
 /// <param name="implant">Initial value of the Implant property.</param>
 /// <param name="allCeramic">Initial value of the AllCeramic property.</param>
 /// <param name="staining">Initial value of the Staining property.</param>
 /// <param name="patientId">Initial value of the PatientId property.</param>
 /// <param name="doctorId">Initial value of the DoctorId property.</param>
 /// <param name="labratoryId">Initial value of the LabratoryId property.</param>
 public static LabratoryService CreateLabratoryService(global::System.Int32 id, global::System.Int64 tooth, global::System.Byte shade, global::System.DateTime dueDate, global::System.DateTime inDate, global::System.Byte proCelainFusedToMetal, global::System.Byte implant, global::System.Byte allCeramic, global::System.Byte staining, global::System.Int32 patientId, global::System.Int32 doctorId, global::System.Int32 labratoryId)
 {
     LabratoryService labratoryService = new LabratoryService();
     labratoryService.Id = id;
     labratoryService.Tooth = tooth;
     labratoryService.Shade = shade;
     labratoryService.DueDate = dueDate;
     labratoryService.InDate = inDate;
     labratoryService.ProCelainFusedToMetal = proCelainFusedToMetal;
     labratoryService.Implant = implant;
     labratoryService.AllCeramic = allCeramic;
     labratoryService.Staining = staining;
     labratoryService.PatientId = patientId;
     labratoryService.DoctorId = doctorId;
     labratoryService.LabratoryId = labratoryId;
     return labratoryService;
 }