Exemplo n.º 1
0
 public PatientHistory(VisitService vis)
 {
     ServiceName = vis.Service.Title;
     DoctorName = vis.Visit.Doctor.FirstName + " " + vis.Visit.Doctor.LastName;
     Teeth = vis.ToothDescription;
     string insNames = "";
     foreach (VisitServiceInsurance visins in vis.VisitServiceInsurances)
         insNames += visins.InsuranceDef.Insurance.Title + ", ";
     if (insNames.Any()) insNames = insNames.TrimEnd(", ".ToArray());
     Insurance = insNames;
     Cost = vis.Cost;
     Discount = vis.Discount;
     visit = vis.Visit;
 }
Exemplo n.º 2
0
        public static bool Validate(VisitService entity)
        {
            if (entity == null)
                return false;

            if (entity.Tooth == 0)
            {
                Methods.ShowStandardMsgBox(FormMessageType.Error, RscError.ValidationTitle, RscError.VisitServiceToothNull);
                return false;
            }
            else if (entity.ServiceId == 0)
            {
                Methods.ShowStandardMsgBox(FormMessageType.Error, RscError.ValidationTitle, RscError.VisitServiceServiceNull);
                return false;
            }

            return true;
        }
Exemplo n.º 3
0
 /// <summary>
 /// Create a new VisitService object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="visitId">Initial value of the VisitId property.</param>
 /// <param name="cost">Initial value of the Cost property.</param>
 /// <param name="discount">Initial value of the Discount property.</param>
 /// <param name="finalCost">Initial value of the FinalCost property.</param>
 /// <param name="tooth">Initial value of the Tooth property.</param>
 /// <param name="serviceId">Initial value of the ServiceId property.</param>
 public static VisitService CreateVisitService(global::System.Int32 id, global::System.Int32 visitId, global::System.Double cost, global::System.Double discount, global::System.Double finalCost, global::System.Int64 tooth, global::System.Int32 serviceId)
 {
     VisitService visitService = new VisitService();
     visitService.Id = id;
     visitService.VisitId = visitId;
     visitService.Cost = cost;
     visitService.Discount = discount;
     visitService.FinalCost = finalCost;
     visitService.Tooth = tooth;
     visitService.ServiceId = serviceId;
     return visitService;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the VisitServices EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToVisitServices(VisitService visitService)
 {
     base.AddObject("VisitServices", visitService);
 }