Example #1
0
        public ReferenceItem ReadItemFields(DataReaderAdapter reader, ReferenceItem item = null)
        {
            if (item == null)
            {
                item = new ReferenceItem();
            }

            item.Id                      = reader.GetInt64("ID");
            item.Name                    = reader.GetString("Name");
            item.Code                    = reader.GetString("Code");
            item.StartDate               = reader.GetDateTimeNull("StartDate");
            item.StartDate               = reader.GetDateTimeNull("EndDate");
            item.IsEnabledForOperator    = reader.GetBooleanNull("IsEnabledForOperator");
            item.IsEnabledForRegistrator = reader.GetBooleanNull("IsEnabledForRegistrator");
            return(item);
        }
Example #2
0
        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);
        }
Example #3
0
        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 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 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);
        }
Example #6
0
        public User ReadItemFields(DataReaderAdapter dataReader, User item = null)
        {
            if (item == null)
            {
                item = new User();
            }
            item.Id                    = dataReader.GetInt64("ID");
            item.Login                 = dataReader.GetString("Login");
            item.PasswordHash          = dataReader.GetString("PasswordHash");
            item.Department            = ReferencesMaterializer.Instance.ReadItemFields(dataReader, "DepartmentID", "DepartmentCode", "DepartmentName");
            item.DepartmentDisplayName = dataReader.GetString("DepartmentDisplayName");
            item.DeliveryPoint         = ReferencesMaterializer.Instance.ReadItemFields(dataReader, "DeliveryPointID", "DeliveryPointCode", "DeliveryPointName");
            item.Firstname             = dataReader.GetString("Firstname");
            item.Secondname            = dataReader.GetString("Secondname");
            item.Lastname              = dataReader.GetString("Lastname");
            item.IsBlocked             = dataReader.GetBooleanNull("IsBlocked");
            item.CreateDate            = dataReader.GetDateTime("CreateDate");
            item.UpdateDate            = dataReader.GetDateTime("UpdateDate");

            return(item);
        }
Example #7
0
 public Document ReadItemFields(DataReaderAdapter dataReader, Document item = null)
 {
     if (item == null)
     {
         item = new Document();
     }
     item.Id              = dataReader.GetInt64("ID");
     item.Series          = dataReader.GetString("Series");
     item.Number          = dataReader.GetString("Number");
     item.IssueDate       = dataReader.GetDateTimeNull("IssueDate");
     item.ExpirationDate  = dataReader.GetDateTimeNull("ExpirationDate");
     item.IsIssueCase     = dataReader.GetBooleanNull("IsIssueCase") ?? false;
     item.IssueDepartment = dataReader.GetString("IssueDepartment");
     item.CreateDate      = dataReader.GetDateTime("CreateDate");
     item.UpdateDate      = dataReader.GetDateTime("UpdateDate");
     item.DocumentType    = ReferencesMaterializer.Instance.ReadItemFields(
         dataReader,
         "DocumentTypeID",
         "DocumentTypeCode",
         "DocumentTypeName");
     return(item);
 }