/// <summary> /// Deprecated Method for adding a new object to the PolicySet EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToPolicySet(Policy policy) { base.AddObject("PolicySet", policy); }
/// <summary> /// Create a new Policy object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="fAM">Initial value of the FAM property.</param> /// <param name="iM">Initial value of the IM property.</param> /// <param name="vIDP">Initial value of the VIDP property.</param> /// <param name="n_POL">Initial value of the N_POL property.</param> /// <param name="sEX">Initial value of the SEX property.</param> /// <param name="dOCTYPE">Initial value of the DOCTYPE property.</param> /// <param name="sN_PASP">Initial value of the SN_PASP property.</param> public static Policy CreatePolicy(global::System.Int32 id, global::System.String fAM, global::System.String iM, global::System.String vIDP, global::System.String n_POL, global::System.Int32 sEX, global::System.Int32 dOCTYPE, global::System.String sN_PASP) { Policy policy = new Policy(); policy.Id = id; policy.FAM = fAM; policy.IM = iM; policy.VIDP = vIDP; policy.N_POL = n_POL; policy.SEX = sEX; policy.DOCTYPE = dOCTYPE; policy.SN_PASP = sN_PASP; return policy; }
public static List<TicketPrintData> Select(Policy policy, int doctorId, DateTime ticketTime, int clientId) { var result = new List<TicketPrintData>(); var prnTicket = new TicketPrintData(); var person = VistaMed.People.FirstOrDefault(x => x.Id == doctorId); if(person != null) { prnTicket.DoctorName = person.LastName + " " + person.FirstName + " " + person.PatrName; prnTicket.Cabinet = person.Office; if(person.Organisation != null) { prnTicket.LpuName = person.Organisation.ShortName; } } prnTicket.ClientCode = "*" + clientId.ToString() + "*"; prnTicket.Fio = policy.FAM + " " + policy.IM + " " + policy.OT; prnTicket.Birthday = policy.DR.Value; prnTicket.Passport = PrintTalonData.getPolicyTypeName(policy) + " " + policy.SN_PASP; prnTicket.PolicyName = policy.Smo.Name + " " + policy.S_POL + " №" + policy.N_POL; prnTicket.Snils = policy.SNILS; prnTicket.TalonDateTime = DateTime.Today.Add(ticketTime.TimeOfDay); prnTicket.SexName = policy.SEX == 1 ? "Муж." : "Жен."; result.Add(prnTicket); return result; }
private static PrintTalonData FindTalon(Policy policy) { var talon = talons.FirstOrDefault(x => x.SnPol == policy.SNPOL); if (talon == null) { talon = new PrintTalonData(policy); talons.Add(talon); while(talons.Count > 100) talons.RemoveAt(0); } return talon; }
public static List<PrintTalonData> Select(Policy policy) { var result = new List<PrintTalonData>(); if (policy == null) policy = (Policy) HttpContext.Current.Session["policy"]; if (policy != null) { var talon = FindTalon(policy); result.Add(talon); } return result; }
public static string getPolicyTypeName(Policy policy) { var result = ""; switch (policy.DOCTYPE) { case 14: result = "Паспорт гражданина РФ"; break; case 10: result = "Свидетельство о регистрации ходатайства о признании иммигранта беженцем"; break; case 11: result = "Вид на жительство"; break; case 12: result = "Удостоверение беженца в РФ"; break; case 13: result = "Временное удостоверение личности гражданина РФ"; break; case 1: result = "Паспорт гражданина СССР"; break; case 2: result = "Загранпаспорт гражданина СССР"; break; case 16: result = "Паспорт моряка"; break; case 17: result = "Военный билет офицера запаса"; break; case 18: result = "Иные документы"; break; case 15: result = "Заграничный паспорт гражданина РФ"; break; case 3: result = "Свидетельство о рождении"; break; case 4: result = "Удостоверение личности офицера"; break; case 5: result = "Справка об освобождении из места лишения свободы"; break; case 6: result = "Паспорт Минморфлота"; break; case 7: result = "Военный билет"; break; case 8: result = "Дипломатический паспорт гражданина РФ"; break; case 9: result = "Иностранный паспорт"; break; case 0: result = ""; break; } return result; }
public PrintTalonData(Policy policy) { Snils = policy.SNILS; var card = DataContext.CardSet.FirstOrDefault(x => x.SnPol == policy.SNPOL); if (card != null) { CardNum = card.CardNum; DocDateTime = card.DocDateTime; if (string.IsNullOrEmpty(Snils)) Snils = card.Snils; } Fio = string.Join(" ", policy.FAM, policy.IM, policy.OT).Trim(); Birthday = policy.DR; AddressReg = policy.ADRESSREG; DocTypeName = getPolicyTypeName(policy); DocSerNum = policy.SN_PASP; SmoName = policy.Smo.Name; if (policy.DP != null) SmoName += " с " + policy.DP.Value.ToShortDateString(); if (policy.DENDP != null) SmoName += " по " + policy.DENDP.Value.ToShortDateString(); switch (policy.VIDP) { case "1": PolicyTypeName = "Полис ОМС старого образца"; break; case "2": PolicyTypeName = "Временное свидетельство"; break; case "3": PolicyTypeName = "Полис ОМС единого образца"; break; } PolicySerial = policy.S_POL; PolicyNumber = policy.N_POL; PolicyDateBeg = policy.DP; }