Пример #1
0
        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);
        }
Пример #2
0
 public Execution ReadItemFields(DataReaderAdapter dataReader, Execution item = null)
 {
     if (item == null)
     {
         item = new Execution();
     }
     item.Id                   = dataReader.GetInt64("ID");
     item.StatementID          = dataReader.GetInt64("StatementID");
     item.Validity             = dataReader.GetBoolean("Validity");
     item.Judicial             = dataReader.GetBoolean("Judicial");
     item.ExpertiseDate        = dataReader.GetDateTimeNull("ExpertiseDate");
     item.FinancialSanctions   = dataReader.GetFloatNull("FinancialSanctions");
     item.Straf                = dataReader.GetFloatNull("Straf");
     item.DescriptionExecution = dataReader.GetString("DescriptionExecution");
     item.LPU_Code             = dataReader.GetString("LPU_Code");
     item.LPU_Name             = dataReader.GetString("LPU_Name");
     return(item);
 }
Пример #3
0
        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);
        }
Пример #4
0
        public override void Fill(DataReaderAdapter adapter, NewsItem target)
        {
            base.Fill(adapter, target);

            target.ID            = adapter.GetInt32("ID");
            target.Title         = adapter.GetString("Title");
            target.Text          = adapter.GetString("Text");
            target.OwnerUserID   = adapter.GetInt32("OwnerUserID");
            target.OwnerUserName = adapter.GetString("OwnerUserName");
            target.AddedDate     = adapter.GetDateTime("AddedDate");
            target.LogoPath      = adapter.GetString("LogoPath");
            target.IsDeleted     = adapter.GetBoolean("IsDeleted");
        }
Пример #5
0
        public override void Fill(DataReaderAdapter adapter, User target)
        {
            base.Fill(adapter, target);

            target.ID             = adapter.GetInt32("ID");
            target.BirthDate      = adapter.GetDateTime("BirthDate");
            target.Email          = adapter.GetString("Email");
            target.FirstName      = adapter.GetString("FirstName");
            target.LastName       = adapter.GetString("LastName");
            target.UserName       = adapter.GetString("UserName");
            target.Password       = adapter.GetString("Password");
            target.IsActive       = adapter.GetBoolean("IsActive");
            target.RegisteredDate = adapter.GetDateTime("RegisteredDate");
            target.ActivationSalt = adapter.GetString("ActivationSalt");

            target.Roles = new List <string>();
            var roles = adapter.GetString("Roles");

            if (!string.IsNullOrEmpty(roles))
            {
                target.Roles.AddRange(roles.Split(','));
            }
        }
Пример #6
0
        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);
        }