public Nomernik.History ReadItemFields(DataReaderAdapter reader, Nomernik.History item = null) { if (item == null) { item = new Nomernik.History(); } try { item.Id = reader.GetInt64("ID"); item.LoadDate = reader.GetDateTime("LoadDate"); item.FileDate = reader.GetDateTime("FileDate"); item.UserID = reader.GetInt64Null("UserID"); item.CountAll = reader.GetInt64Null("CountAll"); item.CountOur = reader.GetInt64Null("CountOur"); item.CountChange = reader.GetInt64Null("CountChange"); item.Firstname = reader.GetString("Firstname"); item.Secondname = reader.GetString("Secondname"); item.Lastname = reader.GetString("Lastname"); } catch { item = null; } return(item); }
public PolicyInfo ReadItemFields(DataReaderAdapter dataReader, PolicyInfo item = null) { if (item == null) { item = new PolicyInfo(); } item.Id = dataReader.GetInt64("ID"); item.Series = dataReader.GetString("Series"); item.Number = dataReader.GetString("Number"); item.UnifiedPolicyNumber = dataReader.GetString("UnifiedPolicyNumber"); item.OGRN = dataReader.GetString("OGRN"); item.OKATO = dataReader.GetString("OKATO"); item.StartDate = dataReader.GetDateTimeNull("StartDate"); item.EndDate = dataReader.GetDateTimeNull("EndDate"); item.CreateDate = dataReader.GetDateTime("CreateDate"); item.UpdateDate = dataReader.GetDateTime("UpdateDate"); item.PolicyType = ReferencesMaterializer.Instance.ReadItemFields( dataReader, "PolicyTypeID", "PolicyTypeCode", "PolicyTypeName"); item.SmoId = dataReader.GetInt64Null("SmoId"); item.SmoName = dataReader.GetString("SmoName"); return(item); }
public ClientAcquisitionEmployee ReadItemFields(DataReaderAdapter reader, ClientAcquisitionEmployee item = null) { if (item == null) { item = new ClientAcquisitionEmployee(); } item.Id = reader.GetInt64("ID"); item.UserId = reader.GetInt64Null("UserId"); item.Firstname = reader.GetString("Firstname"); if (string.IsNullOrEmpty(item.Firstname)) { item.Firstname = reader.GetString("First_n"); } item.Lastname = reader.GetString("Lastname"); if (string.IsNullOrEmpty(item.Lastname)) { item.Lastname = reader.GetString("Last_n"); } item.Secondname = reader.GetString("Secondname"); if (string.IsNullOrEmpty(item.Secondname)) { item.Secondname = reader.GetString("Second_n"); } return(item); }
public Post ReadItemFields(DataReaderAdapter dataReader, Post item = null) { if (item == null) { item = new Post(); } item.Id = dataReader.GetInt64("ID"); item.Title = dataReader.GetString("Title"); item.Content = dataReader.GetString("Content"); item.CreateDate = dataReader.GetDateTime("CreateDate"); item.CreateUser = new User() { Id = dataReader.GetInt64("CreateUserID"), Lastname = dataReader.GetString("CreateLastname"), Firstname = dataReader.GetString("CreateFirstname"), Secondname = dataReader.GetString("CreateSecondname"), }; item.UpdateDate = dataReader.GetDateTimeNull("UpdateDate"); item.UpdateUser = new User() { Id = dataReader.GetInt64Null("UpdateUserID") ?? 0, Lastname = dataReader.GetString("UpdateLastname"), Firstname = dataReader.GetString("UpdateFirstname"), Secondname = dataReader.GetString("UpdateSecondname"), }; item.Disabled = dataReader.GetBooleanNull("Disabled") ?? false; return(item); }
public NOMP ReadItemFields2(DataReaderAdapter reader, NOMP item = null) { if (item == null) { item = new NOMP(); } item.Id = 0; //item.S_CARD = reader.GetString("S_CARD"); //item.N_CARD = reader.GetInt64Null("N_CARD"); item.ENP = reader.GetString("UnifiedPolicyNumber"); item.VSN = reader.GetString("TemporaryPolicyNumber"); item.LPU_ID = reader.GetInt64Null("LPU_ID"); item.DATE_IN = reader.GetDateTimeNull("DATE_IN"); item.SPOS = reader.GetInt32Null("SPOS"); item.ClientID = reader.GetInt64Null("ClientID"); return(item); }
public File ReadItemFields(DataReaderAdapter dataReader, File item = null) { if (item == null) { item = new File(); } item.Id = dataReader.GetInt64("FileID"); item.StatementID = dataReader.GetInt64Null("StatementID"); item.StatementStatusID = dataReader.GetInt64Null("StatementStatusID"); item.AttachmentDate = dataReader.GetDateTime("AttachmentDate"); item.UserID = dataReader.GetInt64("UserID"); item.FileName = dataReader.GetString("FileName"); item.FIleUrl = dataReader.GetString("FIleUrl"); item.NominationID = dataReader.GetInt64Null("NominationID"); item.Comment = dataReader.GetString("Comment"); return(item); }
public ReferenceUniversalItem ReadItemFields(DataReaderAdapter reader, ReferenceUniversalItem item = null) { if (item == null) { item = new ReferenceUniversalItem(); } item.ReferenceName = reader.GetString("ReferenceName"); item.Id = reader.GetInt64("ID"); item.Name = reader.GetString("Name"); item.Code = reader.GetString("Code"); item.StartDate = reader.GetDateTimeNull("StartDate"); item.EndDate = reader.GetDateTimeNull("EndDate"); item.IsEnabledForOperator = reader.GetBooleanNull("IsEnabledForOperator"); item.IsEnabledForRegistrator = reader.GetBooleanNull("IsEnabledForRegistrator"); item.SMO = reader.GetString("SMO"); item.DisplayName = reader.GetString("DisplayName"); item.District = reader.GetString("District"); item.Address = reader.GetString("Address"); item.Phone = reader.GetString("Phone"); item.WorkHours = reader.GetString("WorkHours"); item.IsDigitPolicyAbailable = reader.GetBooleanNull("IsEnabledForRegistrator"); item.ParentId = reader.GetInt64Null("ParentId"); item.IsMFC = reader.GetBooleanNull("IsMFC"); item.DeliveryCenterId = reader.GetInt64Null("DeliveryCenterId"); item.DeliveryPointHeadId = reader.GetInt64Null("DeliveryPointHeadId"); item.SendSms = reader.GetBooleanNull("SendSms"); item.LPU_ID_AIS = reader.GetInt64Null("LPU_ID_AIS"); item.FIL_ID = reader.GetInt64Null("FIL_ID"); item.MCOD = reader.GetString("MCOD"); item.FULLNAME = reader.GetString("FULLNAME"); item.OGRN = reader.GetString("OGRN"); item.FCOD = reader.GetString("FCOD"); item.Lastname = reader.GetString("Lastname"); item.Firstname = reader.GetString("Firstname"); item.Secondname = reader.GetString("Secondname"); item.ErrCode = reader.GetString("ErrCode"); return(item); }
public STOP ReadItemFields1(DataReaderAdapter reader, STOP item = null) { if (item == null) { item = new STOP(); } item.Id = reader.GetInt64("ID"); item.SCENARIO = reader.GetString("SCENARIO"); item.S_CARD = reader.GetString("S_CARD"); item.N_CARD = reader.GetString("N_CARD"); item.ENP = reader.GetString("UnifiedPolicyNumber"); item.VSN = reader.GetString("TemporaryPolicyNumber"); item.QZ = reader.GetInt64Null("QZ"); item.DATE_END = reader.GetDateTimeNull("DATE_END"); item.DATE_ARC = reader.GetDateTimeNull("DATE_ARC"); item.IST = reader.GetString("IST"); item.ClientID = reader.GetInt64Null("ClientID"); return(item); }
public Policy ReadItemFields(DataReaderAdapter reader, Policy item = null) { if (item == null) { item = new Policy(); } item.Id = reader.GetInt64("ID"); item.RegionId = reader.GetInt64("RegionId"); item.TemporaryPolicyNumber = reader.GetString("TemporaryPolicyNumber"); item.UnifiedPolicyNumber = reader.GetString("UnifiedPolicyNumber"); item.PolicySeries = reader.GetString("PolicySeries"); item.PolicyNumber = reader.GetString("PolicyNumber"); item.PolicyStatus.Id = reader.GetInt64Null("StatusId") ?? 0;; item.PolicyStatus.Name = reader.GetString("StatusName"); item.ClientVisitDate = reader.GetDateTimeNull("ClientVisitDate"); item.ApplicationMethod = reader.GetString("ApplicationMethod"); item.DeliveryCenter.Id = reader.GetInt64Null("DeliveryCenterId") ?? 0; item.DeliveryCenter.Code = reader.GetString("DeliveryCenterCode"); item.DeliveryCenter.Name = reader.GetString("DeliveryCenterName"); item.Firstname = reader.GetString("FirstName"); item.Secondname = reader.GetString("Secondname"); item.Lastname = reader.GetString("Lastname"); item.Sex = reader.GetString("Sex"); item.Birthday = reader.GetDateTimeNull("Birthday"); item.Phone = reader.GetString("Phone"); item.Category = reader.GetString("Category"); item.Citizenship = reader.GetString("Citizenship"); item.DeliveryPoint.Id = reader.GetInt64Null("DeliveryPointId") ?? 0; item.DeliveryPoint.Code = reader.GetString("DeliveryPointCode"); item.DeliveryPoint.Name = reader.GetString("DeliveryPointName"); item.IssueDate = reader.GetDateTimeNull("IssueDate"); item.StatusDate = reader.GetDateTimeNull("StatusDate"); item.NomernikStatus = reader.GetString("NomernikStatus"); item.LPU = reader.GetString("LPU"); item.AttachmentDate = reader.GetDateTimeNull("AttachmentDate"); item.AttachmentMethod = reader.GetString("AttachmentMethod"); item.BlankNumber = reader.GetString("BlankNumber"); item.SaveDate = reader.GetDateTimeNull("SaveDate"); return(item); }
public ClientPretension ReadItemFields(DataReaderAdapter dataReader, ClientPretension item = null) { if (item == null) { item = new ClientPretension(); } item.Id = dataReader.GetInt64("ID"); item.Generator = dataReader.GetInt64("Generator"); item.ClientID = dataReader.GetInt64("ClientID"); item.LPU_ID = dataReader.GetInt64Null("LPU_ID"); item.DATE_IN = dataReader.GetDateTimeNull("DATE_IN"); item.M_nakt = dataReader.GetString("M_nakt"); item.MedicalCenterId = dataReader.GetInt64Null("MedicalCenterId"); item.M_mo = dataReader.GetString("M_mo"); item.M_mcod = dataReader.GetString("M_mcod"); item.M_period = dataReader.GetString("M_period"); item.M_snpol = dataReader.GetString("M_snpol"); return(item); }
public BSOInfo ReadItemFields(DataReaderAdapter dataReader, BSOInfo item = null) { if (item == null) { item = new BSOInfo(); } item.Id = dataReader.GetInt64("BSO_ID"); item.PolicyPartyNumber = dataReader.GetString("PolicyPartyNumber"); item.TemporaryPolicyNumber = dataReader.GetString("TemporaryPolicyNumber"); item.Status = BSOStatusRefMaterializer.Instance.ReadItemFields(dataReader, "StatusID", "StatusName"); item.StatusDate = dataReader.GetDateTimeNull("StatusDate"); item.Comment = dataReader.GetString("Comment"); item.DeliveryCenterId = dataReader.GetInt64Null("DeliveryCenterID"); item.DeliveryCenter = dataReader.GetString("DeliveryCenter"); item.DeliveryPointId = dataReader.GetInt64Null("DeliveryPointID"); item.DeliveryPoint = dataReader.GetString("DeliveryPoint"); item.ResponsibleID = dataReader.GetInt64Null("ResponsibleID"); item.ResponsibleName = dataReader.GetString("ResponsibleName"); item.ChangeDate = dataReader.GetDateTimeNull("ChangeDate"); return(item); }
public BSOHistoryItem ReadItemFields(DataReaderAdapter reader, BSOHistoryItem item = null) { if (item == null) { item = new BSOHistoryItem(); } item.Id = reader.GetInt64("BSO_ID"); item.Status = BSOStatusRefMaterializer.Instance.ReadItemFields(reader, "StatusID", "StatusName"); item.StatusDate = reader.GetDateTimeNull("StatusDate"); item.VisitGroupId = reader.GetInt64Null("VisitGroupId"); item.Comment = reader.GetString("Comment"); item.DeliveryCenterId = reader.GetInt64Null("DeliveryCenterID"); item.DeliveryCenter = reader.GetString("DeliveryCenter"); item.DeliveryPointId = reader.GetInt64Null("DeliveryPointId"); item.DeliveryPoint = reader.GetString("DeliveryPoint"); item.UserId = reader.GetInt64("UserID"); item.ResponsibleID = reader.GetInt64Null("ResponsibleID"); item.ChangeDate = reader.GetDateTimeNull("ChangeDate"); return(item); }
public NomernikForClient ReadItemFields(DataReaderAdapter reader, NomernikForClient item = null) { if (item == null) { item = new NomernikForClient(); } item.Id = reader.GetInt64("ID"); item.S_CARD = reader.GetString("S_CARD"); item.N_CARD = reader.GetString("N_CARD"); item.ENP = reader.GetString("UnifiedPolicyNumber"); item.VSN = reader.GetString("TemporaryPolicyNumber"); item.LPU_ID = reader.GetInt64Null("LPU_ID"); item.DATE_IN = reader.GetDateTimeNull("DATE_IN"); item.SPOS = reader.GetInt32Null("SPOS"); item.ClientID = reader.GetInt64Null("ClientID"); item.LoadDate = reader.GetDateTime("LoadDate"); item.FileDate = reader.GetDateTime("FileDate"); item.Firstname = reader.GetString("Firstname"); item.Secondname = reader.GetString("Secondname"); item.Lastname = reader.GetString("Lastname"); return(item); }
public SmsBase ReadItemFields(DataReaderAdapter reader, SmsBase item = null) { if (item == null) { item = new SmsBase(); } item.SenderId = reader.GetString("SenderId"); item.ClientId = reader.GetInt64("ClientId"); item.VisitGroupId = reader.GetInt64("VisitGroupId"); item.VisitId = reader.GetInt64("VisitId"); item.Phone = reader.GetString("Phone"); item.Message = reader.GetString("Message"); item.CreateDate = reader.GetDateTime("CreateDate"); item.Comment = reader.GetString("Comment"); item.StatusIdInside = reader.GetInt64Null("StatusIdInside"); item.StatusFromService = reader.GetString("StatusFromService"); item.MessageFromService = reader.GetString("MessageFromService"); item.SendDate = reader.GetDateTimeNull("SendDate"); item.StatusIdRepeat = reader.GetInt64Null("StatusIdRepeat"); item.StatuRepeatDate = reader.GetDateTimeNull("StatuRepeatDate"); return(item); }
public SmsTemplate ReadItemFields(DataReaderAdapter dataReader, SmsTemplate item = null) { if (item == null) { item = new SmsTemplate(); } item.SenderId = string.IsNullOrEmpty(dataReader.GetString("SenderId")) ? dataReader.GetString("SenderId") : dataReader.GetString("SenderId").Trim(); item.Phone = dataReader.GetString("Phone"); item.Message = dataReader.GetString("Message"); item.CreateDate = dataReader.GetDateTimeNull("CreateDate"); item.StatusId = dataReader.GetInt64Null("StatusId"); return(item); }
public Nomernik.ClientShotInfo ReadItemFields(DataReaderAdapter reader, Nomernik.ClientShotInfo item = null) { if (item == null) { item = new Nomernik.ClientShotInfo(); } item.Id = 0; item.Firstname = reader.GetString("Firstname"); item.Secondname = reader.GetString("Secondname"); item.Lastname = reader.GetString("Lastname"); item.Birthday = reader.GetDateTimeNull("Birthday"); item.ClientID = reader.GetInt64Null("ClientID"); return(item); }
public StatementStatus ReadItemFields(DataReaderAdapter dataReader, StatementStatus item = null) { if (item == null) { item = new StatementStatus(); } item.Id = dataReader.GetInt64("ID"); item.StatementID = dataReader.GetInt64("StatementID"); item.UserID = dataReader.GetInt64("UserID"); item.StatusDate = dataReader.GetDateTime("StatusDate"); item.StatusID = dataReader.GetInt64("StatusID"); item.Comment = dataReader.GetString("Comment"); item.AssignedToUserID = dataReader.GetInt64Null("AssignedToUserID"); item.ExecuteToDate = dataReader.GetDateTimeNull("ExecuteToDate"); return(item); }
public DeliveryCenter ReadItemFields(DataReaderAdapter reader) { DeliveryCenter dc = new DeliveryCenter(); dc.Id = reader.GetInt64("DeliveryCenterID"); dc.Name = reader.GetString("DeliveryCenterName"); dc.Code = reader.GetString("DeliveryCenterCode"); dc.Address = reader.GetString("DeliveryCenterAddress"); dc.DisplayName = reader.GetString("DeliveryCenterDisplayName"); dc.District = reader.GetString("DeliveryCenterDistrict"); dc.IsDigitPolicyAbailable = reader.GetBooleanNull("DeliveryCenterIsDigitPolicyAbailable"); dc.ParentId = reader.GetInt64Null("DeliveryCenterParentId"); dc.Phone = reader.GetString("DeliveryCenterPhone"); dc.SMO = reader.GetString("DeliveryCenterSMO"); dc.WorkHours = reader.GetString("DeliveryCenterWorkHours"); return(dc); }
public ClientVisitHistoryItem ReadItemFields(DataReaderAdapter reader, ClientVisitHistoryItem item = null) { if (item == null) { item = new ClientVisitHistoryItem(); } item.ClientVisitId = reader.GetInt64("ClientVisitId"); item.Status = ReferencesMaterializer.Instance.ReadItemFields(reader, "StatusId", "StatusCode", "StatusName"); item.StatusDate = reader.GetDateTime("StatusDate"); item.UserId = reader.GetInt64Null("UserId"); item.UserLogin = reader.GetString("UserLogin"); item.UserFirstname = reader.GetString("UserFirstname"); item.UserLastname = reader.GetString("UserLastname"); item.UserSecondname = reader.GetString("UserSecondname"); return(item); }
public ClientVisitInfo ReadItemFields(DataReaderAdapter reader, ClientVisitInfo item = null) { if (item == null) { item = new ClientVisitInfo(); } item.Id = reader.GetInt64("ID"); item.ClientId = reader.GetInt64("ClientId"); item.VisitGroupId = reader.GetInt64("VisitGroupId"); item.StatusDate = reader.GetDateTime("StatusDate"); item.Firstname = reader.GetString("FirstName"); item.Secondname = reader.GetString("Secondname"); item.Lastname = reader.GetString("Lastname"); item.Sex = reader.GetString("Sex"); item.Birthday = reader.GetDateTimeNull("Birthday"); item.TemporaryPolicyNumber = reader.GetString("TemporaryPolicyNumber"); item.TemporaryPolicyDate = reader.GetDateTimeNull("TemporaryPolicyDate"); item.UnifiedPolicyNumber = reader.GetString("UnifiedPolicyNumber"); item.PolicySeries = reader.GetString("PolicySeries"); item.PolicyNumber = reader.GetString("PolicyNumber"); item.FundResponseApplyingMessage = reader.GetString("FundResponseApplyingMessage"); item.IsReadyToFundSubmitRequest = reader.GetBoolean("IsReadyToFundSubmitRequest"); item.IsDifficultCase = reader.GetBoolean("IsDifficultCase"); item.PolicyIssueDate = reader.GetDateTimeNull("PolicyIssueDate"); item.SNILS = reader.GetString("SNILS"); item.PolicyParty = reader.GetString("PolicyParty"); item.Status = ReferencesMaterializer.Instance.ReadItemFields(reader, "StatusID", "StatusCode", "StatusName"); item.Scenario = ReferencesMaterializer.Instance.ReadItemFields(reader, "ScenarioID", "ScenarioCode", "ScenarioName"); item.Comment = reader.GetString("Comment"); item.DeliveryCenter = ReferencesMaterializer.Instance.ReadItemFields(reader, "DeliveryCenterId", "DeliveryCenterCode", "DeliveryCenter"); item.DeliveryPoint = reader.GetString("DeliveryPoint"); item.Phone = reader.GetString("Phone"); item.UserId = reader.GetInt64Null("UserId"); item.ClientAcquisitionEmployee = reader.GetString("ClientAcquisitionEmployee"); item.Citizenship = reader.GetString("Citizenship"); return(item); }
public StatementInfo ReadItemFields(DataReaderAdapter dataReader, StatementInfo item = null) { if (item == null) { item = new StatementInfo(); } item.Id = dataReader.GetInt64("ID"); item.Firstname = dataReader.GetString("FirstName"); item.Secondname = dataReader.GetString("Secondname"); item.Lastname = dataReader.GetString("Lastname"); item.Birthday = dataReader.GetDateTimeNull("Birthday"); item.SubjectInsuranceID = dataReader.GetInt64Null("SubjectInsuranceID"); item.CreateDate = dataReader.GetDateTime("CreateDate"); item.LastStatusDate = dataReader.GetDateTimeNull("LastStatusDate"); item.ClientID = dataReader.GetInt64Null("ClientID"); item.LastStatementStatusID = dataReader.GetInt64Null("LastStatementStatusID"); item.CuratorID = dataReader.GetInt64Null("CuratorID"); item.ResponsibleID = dataReader.GetInt64Null("ResponsibleID"); item.ReasonID = dataReader.GetInt64Null("ReasonID"); item.ExpertiseID = dataReader.GetInt64Null("ExpertiseID"); item.ExecutiveID = dataReader.GetInt64Null("ExecutiveID"); return(item); }
public Representative ReadItemFields(DataReaderAdapter reader, Representative item = null) { if (item == null) { item = new Representative(); } item.Id = reader.GetInt64("ID"); item.Firstname = reader.GetString("FirstName"); item.Secondname = reader.GetString("Secondname"); item.Lastname = reader.GetString("Lastname"); item.Birthday = reader.GetDateTimeNull("Birthday"); item.IssueDate = reader.GetDateTimeNull("IssueDate"); item.IssueDepartment = reader.GetString("IssueDepartment"); item.Number = reader.GetString("Number"); item.Series = reader.GetString("Series"); item.RepresentativeTypeId = reader.GetInt64Null("RepresentativeTypeId"); if (reader.IsNotNull("DocumentTypeId")) { item.DocumentType = ReferencesMaterializer.Instance.ReadItemFields(reader, "DocumentTypeID", "DocumentTypeCode", "DocumentTypeName"); } return(item); }
public ClientPretension ReadItemFields(DataReaderAdapter dataReader, ClientPretension item = null) { if (item == null) { item = new ClientPretension(); } item.Generator = dataReader.GetInt64("Generator"); item.ClientID = dataReader.GetInt64("ClientID"); item.LPU_ID = dataReader.GetInt64Null("LPU_ID"); item.DATE_IN = dataReader.GetDateTimeNull("DATE_IN"); item.M_nakt = dataReader.GetString("M_nakt"); item.M_dakt = dataReader.GetDateTimeNull("M_dakt"); item.M_expert_Id = dataReader.GetInt64Null("M_expert_Id"); item.MedicalCenterId = dataReader.GetInt64Null("MedicalCenterId"); item.M_mo = dataReader.GetString("M_mo"); item.M_mcod = dataReader.GetString("M_mcod"); item.MCOD = dataReader.GetString("MCOD"); item.M_period = dataReader.GetString("M_period"); item.M_snpol = dataReader.GetString("M_snpol"); item.M_fd = dataReader.GetString("M_fd"); item.M_nd1 = dataReader.GetString("M_nd1"); item.M_nd2 = dataReader.GetString("M_nd2"); item.IsConfirm = dataReader.GetBooleanNull("IsConfirm"); item.M_osn230_Id = dataReader.GetInt64Null("M_osn230_Id"); item.M_straf = dataReader.GetFloatNull("M_straf"); item.PeriodFrom = dataReader.GetDateTimeNull("PeriodFrom"); item.PeriodTo = dataReader.GetDateTimeNull("PeriodTo"); item.Coefficient = dataReader.GetFloatNull("Coefficient"); item.UserId = dataReader.GetInt64Null("UserId"); item.UserFIO = dataReader.GetString("UserFIO"); item.UserPosition = dataReader.GetString("Position"); item.CreateDate = dataReader.GetDateTime("CreateDate"); item.UpdateUserId = dataReader.GetInt64Null("UpdateUserId"); item.UpdateUserFIO = dataReader.GetString("UpdateUserFIO"); item.UpdateDate = dataReader.GetDateTimeNull("UpdateDate"); item.FileNameLPU = dataReader.GetString("FileNameLPU"); item.FileUrlLPU = dataReader.GetString("FileUrlLPU"); item.FileName2 = dataReader.GetString("FileName2"); item.FileUrl2 = dataReader.GetString("FileUrl2"); return(item); }
public ClientVisit.SaveData ReadItemFields(DataReaderAdapter dataReader, ClientVisit.SaveData clientVisit = null) { if (clientVisit == null) { clientVisit = new ClientVisit.SaveData(); } clientVisit.DeliveryCenterId = dataReader.GetInt64("DeliveryCenterID"); clientVisit.MedicalCentreId = dataReader.GetInt64Null("MedicalCenterID"); clientVisit.PolicyPartyNumber = dataReader.GetString("PolicyParty"); clientVisit.Status = dataReader.GetInt64Null("Status") ?? 12; clientVisit.StatusDate = dataReader.GetDateTimeNull("DP"); clientVisit.TemporaryPolicyNumber = dataReader.GetString("TemporaryPolicyNumber"); clientVisit.TemporaryPolicyDate = dataReader.GetDateTimeNull("TemporaryPolicyDate"); string scnCode = dataReader.GetString("SCN"); string JT = dataReader.GetString("JT"); if (JT == "r" || scnCode == "POK") { clientVisit.Status = ClientVisitStatuses.PolicyIssued.Id; clientVisit.IssueDate = clientVisit.StatusDate; } FillPolicyData(dataReader, clientVisit); clientVisit.NewClientInfo.Lastname = dataReader.GetString("NewClientLastname"); long?NewClientLastnameTypeId = dataReader.GetInt64Null("NewClientLastnameTypeId"); if (!NewClientLastnameTypeId.HasValue) { NewClientLastnameTypeId = 1; } clientVisit.NewClientInfo.LastnameTypeId = NewClientLastnameTypeId.Value; clientVisit.NewClientInfo.Firstname = dataReader.GetString("NewClientFirstname"); long?NewClientFirstnameTypeId = dataReader.GetInt64Null("NewClientFirstnameTypeId"); if (!NewClientFirstnameTypeId.HasValue) { NewClientFirstnameTypeId = 1; } clientVisit.NewClientInfo.FirstnameTypeId = NewClientFirstnameTypeId.Value; clientVisit.NewClientInfo.Secondname = dataReader.GetString("NewClientSecondname"); long?NewClientSecondnameTypeId = dataReader.GetInt64Null("NewClientSecondnameTypeId"); if (!NewClientSecondnameTypeId.HasValue) { NewClientSecondnameTypeId = 1; } clientVisit.NewClientInfo.SecondnameTypeId = NewClientSecondnameTypeId.Value; clientVisit.NewClientInfo.Birthday = dataReader.GetDateTimeNull("NewBirthDate"); clientVisit.NewClientInfo.Sex = dataReader.GetInt64("Sex").ToString()[0]; clientVisit.NewClientInfo.Category = dataReader.GetInt64Null("ClientCategoryId") ?? 1; string unformattedPhone = dataReader.GetString("Phone") ?? string.Empty; string phone = string.Concat(unformattedPhone.Where(c => char.IsDigit(c))); clientVisit.Phone = dataReader.GetString("Phone"); if (phone.Length == 10) { clientVisit.Phone = string.Format("({0}){1}-{2}-{3}", phone.Substring(0, 3), phone.Substring(3, 3), phone.Substring(6, 2), phone.Substring(8, 2)); } else if (phone.Length == 11 && (phone[0] == '8' || phone[0] == '7')) { clientVisit.Phone = string.Format("({0}){1}-{2}-{3}", phone.Substring(1, 3), phone.Substring(4, 3), phone.Substring(7, 2), phone.Substring(9, 2)); } else if (phone.Length == 12 && phone[0] == '+' && phone[1] == '7') { clientVisit.Phone = string.Format("({0}){1}-{2}-{3}", phone.Substring(2, 3), phone.Substring(5, 3), phone.Substring(8, 2), phone.Substring(10, 2)); } else if (phone.Length == 7) { clientVisit.Phone = string.Format("(000){0}-{1}-{2}", phone.Substring(0, 3), phone.Substring(3, 2), phone.Substring(5, 2)); } if (!string.IsNullOrEmpty(unformattedPhone)) { clientVisit.Comment = clientVisit.Comment + string.Format(" Телефон из старой системы: {0}", unformattedPhone); } clientVisit.NewDocument.DocumentTypeId = dataReader.GetInt64Null("NewDocumentTypeID"); clientVisit.NewDocument.Series = dataReader.GetString("NewDocumentSeries"); clientVisit.NewDocument.Number = dataReader.GetString("NewDocumentNumber"); clientVisit.NewDocument.IssueDate = dataReader.GetDateTimeNull("NewDocumentIssueDate"); clientVisit.NewDocument.IssueDepartment = dataReader.GetString("DocumentIssueDepartment"); clientVisit.NewClientInfo.SNILS = dataReader.GetString("NewSNILS"); clientVisit.NewClientInfo.Citizenship = dataReader.GetInt64("Citizenship"); clientVisit.RegistrationAddressDate = dataReader.GetDateTimeNull("AddressRegistrationDate"); clientVisit.CarrierId = dataReader.GetInt64Null("CarrierID"); clientVisit.Representative.RepresentativeTypeId = 1; if (dataReader.GetInt32Null("RepresentativeTypeCode").HasValue) { clientVisit.Representative.RepresentativeTypeId = dataReader.GetInt32Null("RepresentativeTypeCode") + 1; } clientVisit.ApplicationMethodId = dataReader.GetInt64Null("ApplicationMethodID"); clientVisit.GOZNAKTypeId = dataReader.GetInt64Null("GoznakTypeID"); clientVisit.GOZNAKDate = dataReader.GetDateTimeNull("GOZNAKDate"); clientVisit.RegistratorId = 1; clientVisit.NewDocument.ExpirationDate = dataReader.GetDateTimeNull("NewDocumentExpirationDate"); clientVisit.ClientCategoryId = dataReader.GetInt64Null("UralsibClientCategory"); clientVisit.NewDocument.IsIssueCase = false; clientVisit.OldSystemId = dataReader.GetInt64Null("OldSystemId"); clientVisit.UniqueId = dataReader.GetInt64Null("UniqueId"); clientVisit.LivingAddress.TerritoryCode = "45"; clientVisit.LivingAddress.RegionCode = "000"; clientVisit.LivingAddress.Region = "г Москва"; clientVisit.LivingAddress.RegionId = "0c5b2444-70a0-4932-980c-b4dc0d3f02b5"; long?livingStreetCode = dataReader.GetInt64Null("LivingStreetCode"); clientVisit.LivingAddress.StreetCode = livingStreetCode.HasValue ? livingStreetCode.ToString() : null; clientVisit.LivingAddress.Street = dataReader.GetString("LivingStreetname"); clientVisit.LivingAddress.House = dataReader.GetString("LivingHouse"); clientVisit.LivingAddress.Housing = dataReader.GetString("LivingHousing"); clientVisit.LivingAddress.Building = dataReader.GetString("LivingBuilding"); clientVisit.LivingAddress.Appartment = dataReader.GetString("LivingAppartment"); clientVisit.LivingAddress.TerritoryCode = "45"; clientVisit.LivingAddress.RegionCode = "000"; clientVisit.RegistrationAddress.Region = dataReader.GetString("RegistrationRegionName"); clientVisit.RegistrationAddress.Area = dataReader.GetString("RegistrationAreaName"); clientVisit.RegistrationAddress.City = dataReader.GetString("RegistrationCityName"); clientVisit.RegistrationAddress.Street = dataReader.GetString("RegistrationStreetName"); clientVisit.RegistrationAddress.House = dataReader.GetString("RegistrationHouse"); clientVisit.RegistrationAddress.Housing = dataReader.GetString("RegistrationHousing"); clientVisit.RegistrationAddress.Building = dataReader.GetString("RegistrationBuilding"); clientVisit.RegistrationAddress.Appartment = dataReader.GetString("RegistrationAppartment"); string C_OKATO = dataReader.GetString("C_OKATO"); if (!string.IsNullOrEmpty(C_OKATO) && C_OKATO.Length == 5) { clientVisit.RegistrationAddress.TerritoryCode = C_OKATO.Substring(0, 2); clientVisit.RegistrationAddress.RegionCode = C_OKATO.Substring(2, 3); } clientVisit.NewForeignDocument.DocumentTypeId = dataReader.GetInt64Null("ForeignDocumentType"); clientVisit.NewForeignDocument.Series = dataReader.GetString("ForeignDocumentSeries"); clientVisit.NewForeignDocument.Number = dataReader.GetString("ForeignDocumentNumber"); clientVisit.NewForeignDocument.IssueDate = dataReader.GetDateTimeNull("ForeignDocumentIssueDate"); clientVisit.OldClientInfo.Lastname = dataReader.GetString("OldLastname"); clientVisit.OldClientInfo.Firstname = dataReader.GetString("OldFirstname"); clientVisit.OldClientInfo.Secondname = dataReader.GetString("OldSecondname"); clientVisit.OldClientInfo.Birthday = dataReader.GetDateTimeNull("OldBirthdate"); clientVisit.OldClientInfo.Sex = dataReader.GetInt64Null("OldSex").HasValue ? dataReader.GetInt64Null("OldSex").ToString()[0] : new char?(); clientVisit.OldClientInfo.LastnameTypeId = 1; clientVisit.OldClientInfo.FirstnameTypeId = 1; clientVisit.OldClientInfo.SecondnameTypeId = 1; clientVisit.OldDocument.DocumentTypeId = dataReader.GetInt64Null("OldDocumentId"); clientVisit.OldDocument.Series = dataReader.GetString("OldDocumentSeries"); clientVisit.OldDocument.Number = dataReader.GetString("OldDocumentNumber"); clientVisit.OldDocument.IssueDate = dataReader.GetDateTimeNull("OldDocumentDate"); clientVisit.ScenarioId = dataReader.GetInt64Null("ScenarioID"); clientVisit.Representative.Lastname = dataReader.GetString("RepresentativeLastname"); clientVisit.Representative.Firstname = dataReader.GetString("RepresentativeFirstname"); clientVisit.Representative.Secondname = dataReader.GetString("RepresentativeSecondname"); clientVisit.Representative.Series = dataReader.GetString("RepresentativeSeries"); clientVisit.Representative.Number = dataReader.GetString("RepresentativeNumber"); clientVisit.Representative.IssueDate = dataReader.GetDateTimeNull("RepresentativeIssueDate"); clientVisit.Representative.Birthday = dataReader.GetDateTimeNull("RepresentativeBirthDate"); clientVisit.NewClientInfo.Birthplace = dataReader.GetString("NewBirthplace"); clientVisit.Comment = clientVisit.Comment + " " + dataReader.GetString("comment"); return(clientVisit); }
public BaseReport ReadItemFields(DataReaderAdapter dataReader, BaseReport item = null) { if (item == null) { item = new BaseReport(); } item.Id = dataReader.GetInt64("ID"); item.Firstname = dataReader.GetString("FirstName"); item.Secondname = dataReader.GetString("Secondname"); item.Lastname = dataReader.GetString("Lastname"); item.Birthday = dataReader.GetDateTimeNull("Birthday"); item.SubjectInsuranceID = dataReader.GetInt64Null("SubjectInsuranceID"); item.CreateDate = dataReader.GetDateTime("CreateDate"); item.LastStatusDate = dataReader.GetDateTimeNull("LastStatusDate"); item.ClientID = dataReader.GetInt64Null("ClientID"); item.LastStatementStatusID = dataReader.GetInt64Null("LastStatementStatusID"); item.CuratorID = dataReader.GetInt64Null("CuratorID"); item.ResponsibleID = dataReader.GetInt64Null("ResponsibleID"); item.ExecutiveID = dataReader.GetInt64Null("ExecutiveID"); item.SubjectInsuranceName = dataReader.GetString("SubjectInsuranceName"); item.LastStatusName = dataReader.GetString("LastStatusName"); item.CuratorFIO = dataReader.GetString("CuratorFIO"); item.ResponsibleFIO = dataReader.GetString("ResponsibleFIO"); item.ExecutiveFIO = dataReader.GetString("ExecutiveFIO"); item.Phone = dataReader.GetString("Phone"); item.Email = dataReader.GetString("Email"); item.VisitGroupID = dataReader.GetInt64Null("VisitGroupID"); item.MedDocumentTypeID = dataReader.GetInt64Null("MedDocumentTypeID"); item.MedDocumentTypeName = dataReader.GetString("MedDocumentTypeName"); item.UnifiedPolicyNumber = dataReader.GetString("UnifiedPolicyNumber"); item.LocalityID = dataReader.GetInt64Null("LocalityID"); item.LocalityName = dataReader.GetString("LocalityName"); item.IncidentDate = dataReader.GetDateTimeNull("IncidentDate"); item.Description = dataReader.GetString("Description"); item.IncomingСhannelID = dataReader.GetInt64Null("IncomingСhannelID"); item.IncomingСhannelName = dataReader.GetString("IncomingСhannelName"); item.AuthorID = dataReader.GetInt64Null("AuthorID"); item.AuthorFIO = dataReader.GetString("AuthorFIO"); item.StatusComment = dataReader.GetString("StatusComment"); item.AssignedToUserID = dataReader.GetInt64Null("AssignedToUserID"); item.AssignedToUserFIO = dataReader.GetString("AssignedToUserFIO"); item.ExecuteToDate = dataReader.GetDateTimeNull("ExecuteToDate"); item.Validity = dataReader.GetBoolean("Validity"); item.Judicial = dataReader.GetBoolean("Judicial"); item.ExpertiseID = dataReader.GetInt64Null("ExpertiseID"); item.ExpertiseName = dataReader.GetString("ExpertiseName"); item.ExpertiseDate = dataReader.GetDateTimeNull("ExpertiseDate"); item.FinancialSanctions = dataReader.GetFloatNull("FinancialSanctions"); item.Straf = dataReader.GetFloatNull("Straf"); item.ReasonID = dataReader.GetInt64Null("ReasonID"); item.ReasonName = dataReader.GetString("ReasonName"); item.DescriptionExecution = dataReader.GetString("DescriptionExecution"); item.LPU_Code = dataReader.GetString("LPU_Code"); item.LPU_Name = dataReader.GetString("LPU_Name"); return(item); }
public Statement ReadItemFields(DataReaderAdapter dataReader, Statement item = null) { if (item == null) { item = new Statement(); } item.Id = dataReader.GetInt64("ID"); item.CreateDate = dataReader.GetDateTime("CreateDate"); item.LastStatementStatusID = dataReader.GetInt64("LastStatementStatusID"); item.CuratorID = dataReader.GetInt64Null("CuratorID"); item.ResponsibleID = dataReader.GetInt64Null("ResponsibleID"); item.ExecutiveID = dataReader.GetInt64Null("ExecutiveID"); item.LastStatusDate = dataReader.GetDateTimeNull("LastStatusDate"); item.StatementTypeID = dataReader.GetInt64("StatementTypeID"); item.Lastname = dataReader.GetString("Lastname"); item.Firstname = dataReader.GetString("Firstname"); item.Secondname = dataReader.GetString("Secondname"); item.Birthday = dataReader.GetDateTimeNull("Birthday"); item.Sex = dataReader.GetString("Sex"); item.Phone = dataReader.GetString("Phone"); item.Email = dataReader.GetString("Email"); item.ClientID = dataReader.GetInt64Null("ClientID"); item.VisitGroupID = dataReader.GetInt64Null("VisitGroupID"); item.MedDocumentTypeID = dataReader.GetInt64Null("MedDocumentTypeID"); item.Series = dataReader.GetString("Series"); item.Number = dataReader.GetString("Number"); item.ReasonID = dataReader.GetInt64Null("ReasonID"); item.UnifiedPolicyNumber = dataReader.GetString("UnifiedPolicyNumber"); item.SubjectInsuranceID = dataReader.GetInt64Null("SubjectInsuranceID") ?? default(long); item.LocalityID = dataReader.GetInt64Null("LocalityID"); item.IncidentDate = dataReader.GetDateTime("IncidentDate"); item.Description = dataReader.GetString("Description"); item.ExpertiseID = dataReader.GetInt64Null("ExpertiseID"); item.IncomingChannelID = dataReader.GetInt64Null("IncomingСhannelID") ?? default(long); item.UpdateDate = dataReader.GetDateTimeNull("UpdateDate"); return(item); }
public ClientVisit ReadItemFields(DataReaderAdapter reader, ClientVisit item = null) { if (item == null) { item = new ClientVisit(); } item.Id = reader.GetInt64("ID"); item.ClientId = reader.GetInt64("ClientID"); item.Scenario = ReferencesMaterializer.Instance.ReadItemFields( reader, "ScenarioId", "ScenarioCode", "ScenarioName"); item.StatusDate = reader.GetDateTime("StatusDate"); item.Status = ReferencesMaterializer.Instance.ReadItemFields( reader, "StatusId", "StatusCode", "StatusName"); item.VisitGroupId = reader.GetInt64("VisitGroupId"); item.DeliveryCenter = DeliveryCenterMaterializer.Instance.ReadItemFields(reader); item.DeliveryPointId = reader.GetInt64Null("DeliveryPointId"); item.TemporaryPolicyNumber = reader.GetString("TemporaryPolicyNumber"); item.TemporaryPolicyExpirationDate = reader.GetDateTimeNull("TemporaryPolicyExpirationDate"); item.TemporaryPolicyDate = reader.GetDateTimeNull("TemporaryPolicyDate"); item.OldClientInfo.Id = reader.GetInt64("OldClientVersionID"); item.NewClientInfo.Id = reader.GetInt64("NewClientVersionID"); item.OldDocument.Id = reader.GetInt64("OldClientDocumentID"); item.NewDocument.Id = reader.GetInt64("NewClientDocumentID"); item.NewForeignDocument.Id = reader.GetInt64("NewForeignDocumentID"); item.OldForeignDocument.Id = reader.GetInt64("OldForeignDocumentID"); item.LivingAddress.Id = reader.GetInt64("ClientLivingAddressID"); item.RegistrationAddress.Id = reader.GetInt64("ClientOfficialAddressID"); item.OldPolicy.Id = reader.GetInt64("OldClientPolicyID"); item.NewPolicy.Id = reader.GetInt64("NewClientPolicyID"); item.RegistrationAddressDate = reader.GetDateTimeNull("RegistryAddressDate"); item.Registrator.Id = reader.GetInt64("RegistratorId"); item.IsActual = reader.GetBoolean("IsActual"); item.InfoSource = reader.GetString("InfoSource"); item.AttachmentDate = reader.GetDateTimeNull("AttachmentDate"); item.AttachmentType = new ReferenceItem() { Id = reader.GetInt64Null("AttachmentTypeID") ?? 0 }; item.MedicalCentre = new ReferenceItem() { Id = reader.GetInt64Null("MedicalCentreID") ?? 0 }; item.DeregistrationDate = reader.GetDateTimeNull("DeregistrationDate"); item.ArchivationDate = reader.GetDateTimeNull("ArchivationDate"); item.IssueDate = reader.GetDateTimeNull("IssueDate"); item.CreateDate = reader.GetDateTime("CreateDate"); item.UpdateDate = reader.GetDateTime("UpdateDate"); item.PhotoFileName = reader.GetString("PhotoFileName"); item.SignatureFileName = reader.GetString("SignatureFileName"); item.Representative.Id = reader.GetInt64("RepresentativeID"); item.CarrierId = reader.GetInt64Null("CarrierID"); item.ApplicationMethodId = reader.GetInt64Null("ApplicationMethodID"); item.Comment = reader.GetString("Comment"); item.GOZNAKDate = reader.GetDateTimeNull("GOZNAKDate"); item.ClientCategoryId = reader.GetInt64Null("ClientCategoryId"); item.ClientAcquisitionEmployee = reader.GetString("ClientAcquisitionEmployee"); item.ClientContacts = reader.GetString("ClientContacts"); item.Phone = reader.GetString("Phone"); item.Email = reader.GetString("Email"); item.UralsibCard = reader.GetBoolean("UralsibCard"); item.PolicyPartyNumber = reader.GetString("PolicyPartyNumber"); item.GOZNAKType = ReferencesMaterializer.Instance.ReadItemFields( reader, "GOZNAKTypeID", "GOZNAKTypeCode", "GOZNAKTypeName"); item.PolicyBlanc = reader.GetString("PolicyBlanc"); item.FundResponseApplyingMessage = reader.GetString("FundResponseApplyingMessage"); item.IsReadyToFundSubmitRequest = reader.GetBoolean("IsReadyToFundSubmitRequest"); item.IsDifficultCase = reader.GetBoolean("IsDifficultCase"); return(item); }