Example #1
0
        protected override object ReadRow(IRowReader reader)
        {
            Brand brand = Brand.New();

            // Table Fields
            brand.BrandId                      = reader.GetInt32("BrandId");
            brand.Name                         = reader.GetString("Name");
            brand.ShortName                    = reader.GetString("ShortName");
            brand.ApplicationName              = reader.GetString("ApplicationName");
            brand.OrganisationName             = reader.GetString("OrganisationName");
            brand.IsMasterBrand                = reader.GetBoolean("IsMasterBrand");
            brand.WebsiteUrl                   = reader.GetString("WebsiteUrl");
            brand.EmailFrom                    = reader.GetString("EmailFrom");
            brand.IsBrandSelectionAllowed      = reader.GetBoolean("IsBrandSelectionAllowed");
            brand.DisablePoweredByLogo         = reader.GetBoolean("DisablePoweredByLogo");
            brand.LoginPageUpperCopy           = reader.GetString("LoginPageUpperCopy");
            brand.LoginPageLowerCopy           = reader.GetString("LoginPageLowerCopy");
            brand.DefaultUsageRestrictionsCopy = reader.GetString("DefaultUsageRestrictionsCopy");
            brand.MyAccountCopy                = reader.GetString("MyAccountCopy");
            brand.AdminCopy                    = reader.GetString("AdminCopy");
            brand.TermsConditionsCopy          = reader.GetString("TermsConditionsCopy");
            brand.PrivacyPolicyCopy            = reader.GetString("PrivacyPolicyCopy");
            brand.HideFilterSearch             = reader.GetBoolean("HideFilterSearch");
            brand.HideCategorySearch           = reader.GetBoolean("HideCategorySearch");
            brand.DirectDownloadEnabled        = reader.GetBoolean("DirectDownloadEnabled");
            brand.IsDeleted                    = reader.GetBoolean("IsDeleted");
            brand.FilterMarkup                 = reader.GetString("FilterMarkup");

            // View Fields

            brand.IsDirty = false;
            brand.ChangedProperties.Clear();

            return(brand);
        }
Example #2
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.CIID)))
     {
         this._CIID = reader.GetInt32(_.CIID);
     }
     if ((false == reader.IsDBNull(_.UserGUID)))
     {
         this._UserGUID = reader.GetGuid(_.UserGUID);
     }
     if ((false == reader.IsDBNull(_.DGGUID)))
     {
         this._DGGUID = reader.GetGuid(_.DGGUID);
     }
     if ((false == reader.IsDBNull(_.ColName)))
     {
         this._ColName = reader.GetString(_.ColName);
     }
     if ((false == reader.IsDBNull(_.DisplayIndex)))
     {
         this._DisplayIndex = reader.GetInt32(_.DisplayIndex);
     }
     if ((false == reader.IsDBNull(_.CompanyID)))
     {
         this._CompanyID = reader.GetGuid(_.CompanyID);
     }
 }
Example #3
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.ModuleID)))
     {
         this._ModuleID = reader.GetInt32(_.ModuleID);
     }
     if ((false == reader.IsDBNull(_.MenuID)))
     {
         this._MenuID = reader.GetInt32(_.MenuID);
     }
     if ((false == reader.IsDBNull(_.ModuleCode)))
     {
         this._ModuleCode = reader.GetString(_.ModuleCode);
     }
     if ((false == reader.IsDBNull(_.ModuleName)))
     {
         this._ModuleName = reader.GetString(_.ModuleName);
     }
     if ((false == reader.IsDBNull(_.ActionCode)))
     {
         this._ActionCode = reader.GetString(_.ActionCode);
     }
     if ((false == reader.IsDBNull(_.TargetForm)))
     {
         this._TargetForm = reader.GetString(_.TargetForm);
     }
     if ((false == reader.IsDBNull(_.OrderSeq)))
     {
         this._OrderSeq = reader.GetInt32(_.OrderSeq);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #4
0
        protected override object ReadRow(IRowReader reader)
        {
            Category category = Category.New();

            // Table Fields
            category.CategoryId          = reader.GetInt32("CategoryId");
            category.ParentCategoryId    = reader.GetNullableInt32("ParentCategoryId");
            category.BrandId             = reader.GetInt32("BrandId");
            category.Name                = reader.GetString("Name");
            category.ExternalRef         = reader.GetString("ExternalRef");
            category.Message             = reader.GetString("Message");
            category.Synonyms            = reader.GetString("Synonyms");
            category.OwnerUserId         = reader.GetInt32("OwnerUserId");
            category.CategoryOrder       = reader.GetInt32("CategoryOrder");
            category.FullAssetCount      = reader.GetInt32("FullAssetCount");
            category.AvailableAssetCount = reader.GetInt32("AvailableAssetCount");

            // View Fields
            category.OwnerEmail = reader.GetString("OwnerEmail");
            category.OwnerName  = reader.GetString("OwnerName");

            category.IsDirty = false;
            category.ChangedProperties.Clear();

            return(category);
        }
Example #5
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.OrgID)))
     {
         this._OrgID = reader.GetInt32(_.OrgID);
     }
     if ((false == reader.IsDBNull(_.OrgGuID)))
     {
         this._OrgGuID = reader.GetGuid(_.OrgGuID);
     }
     if ((false == reader.IsDBNull(_.OrgNo)))
     {
         this._OrgNo = reader.GetString(_.OrgNo);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.OrgName)))
     {
         this._OrgName = reader.GetString(_.OrgName);
     }
     if ((false == reader.IsDBNull(_.IsFullOrg)))
     {
         this._IsFullOrg = reader.GetBoolean(_.IsFullOrg);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #6
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.EmpRightID)))
     {
         this._EmpRightID = reader.GetInt32(_.EmpRightID);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.EmpID)))
     {
         this._EmpID = reader.GetInt32(_.EmpID);
     }
     if ((false == reader.IsDBNull(_.ModuleID)))
     {
         this._ModuleID = reader.GetInt32(_.ModuleID);
     }
     if ((false == reader.IsDBNull(_.ActionCode)))
     {
         this._ActionCode = reader.GetString(_.ActionCode);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #7
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.CNID)))
     {
         this._CNID = reader.GetInt32(_.CNID);
     }
     if ((false == reader.IsDBNull(_.UserGUID)))
     {
         this._UserGUID = reader.GetGuid(_.UserGUID);
     }
     if ((false == reader.IsDBNull(_.DGGUID)))
     {
         this._DGGUID = reader.GetGuid(_.DGGUID);
     }
     if ((false == reader.IsDBNull(_.ColNameCode)))
     {
         this._ColNameCode = reader.GetString(_.ColNameCode);
     }
     if ((false == reader.IsDBNull(_.ColNameCN_Default)))
     {
         this._ColNameCN_Default = reader.GetString(_.ColNameCN_Default);
     }
     if ((false == reader.IsDBNull(_.ColNameCN_Custom)))
     {
         this._ColNameCN_Custom = reader.GetString(_.ColNameCN_Custom);
     }
     if ((false == reader.IsDBNull(_.ColIsShow)))
     {
         this._ColIsShow = reader.GetBoolean(_.ColIsShow);
     }
     if ((false == reader.IsDBNull(_.CompanyID)))
     {
         this._CompanyID = reader.GetGuid(_.CompanyID);
     }
 }
Example #8
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.MenuID)))
     {
         this._MenuID = reader.GetInt32(_.MenuID);
     }
     if ((false == reader.IsDBNull(_.MenuCode)))
     {
         this._MenuCode = reader.GetString(_.MenuCode);
     }
     if ((false == reader.IsDBNull(_.MenuName)))
     {
         this._MenuName = reader.GetString(_.MenuName);
     }
     if ((false == reader.IsDBNull(_.MenuType)))
     {
         this._MenuType = reader.GetString(_.MenuType);
     }
     if ((false == reader.IsDBNull(_.OrderSeq)))
     {
         this._OrderSeq = reader.GetInt32(_.OrderSeq);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #9
0
        /// <summary>
        /// 从对象obj中获取值传给当前实体,TOutput必须为class或接口
        /// TInput可以为class、IRowReader、NameValueCollection
        /// </summary>
        /// <typeparam name="TInput"></typeparam>
        /// <typeparam name="TOutput"></typeparam>
        /// <param name="obj"></param>
        /// <returns></returns>
        public static TOutput ConvertType <TInput, TOutput>(TInput obj)
        {
            if (obj == null)
            {
                return(default(TOutput));
            }

            if (obj is TOutput)
            {
                return((TOutput)(obj as object));
            }
            else
            {
                try
                {
                    TOutput t = CreateInstance <TOutput>();
                    foreach (PropertyInfo p in typeof(TOutput).GetProperties())
                    {
                        object value = null;
                        if (obj is IRowReader)
                        {
                            IRowReader reader = obj as IRowReader;
                            if (reader.IsDBNull(p.Name))
                            {
                                continue;
                            }
                            value = reader[p.Name];
                        }
                        else if (obj is NameValueCollection)
                        {
                            NameValueCollection reader = obj as NameValueCollection;
                            if (reader[p.Name] == null)
                            {
                                continue;
                            }
                            value = reader[p.Name];
                        }
                        else
                        {
                            value = GetPropertyValue(obj, p.Name);
                        }
                        if (value == null)
                        {
                            continue;
                        }
                        SetPropertyValue(t, p, value);
                    }

                    return(t);
                }
                catch (MySoftException ex)
                {
                    throw ex;
                }
                catch (Exception ex)
                {
                    throw new MySoftException(ex.Message);
                }
            }
        }
Example #10
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.EmpJobLineID)))
     {
         this._EmpJobLineID = reader.GetInt32(_.EmpJobLineID);
     }
     if ((false == reader.IsDBNull(_.EmpJobLineGuid)))
     {
         this._EmpJobLineGuid = reader.GetGuid(_.EmpJobLineGuid);
     }
     if ((false == reader.IsDBNull(_.EmpJobGuid)))
     {
         this._EmpJobGuid = reader.GetGuid(_.EmpJobGuid);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.JobID)))
     {
         this._JobID = reader.GetInt32(_.JobID);
     }
     if ((false == reader.IsDBNull(_.JobContext)))
     {
         this._JobContext = reader.GetString(_.JobContext);
     }
 }
Example #11
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.DictItemID)))
     {
         this._DictItemID = reader.GetInt32(_.DictItemID);
     }
     if ((false == reader.IsDBNull(_.DictGroupName)))
     {
         this._DictGroupName = reader.GetString(_.DictGroupName);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.ItemCode)))
     {
         this._ItemCode = reader.GetString(_.ItemCode);
     }
     if ((false == reader.IsDBNull(_.ItemName)))
     {
         this._ItemName = reader.GetString(_.ItemName);
     }
     if ((false == reader.IsDBNull(_.ValueType)))
     {
         this._ValueType = reader.GetString(_.ValueType);
     }
     if ((false == reader.IsDBNull(_.IsSys)))
     {
         this._IsSys = reader.GetBoolean(_.IsSys);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #12
0
        protected override object ReadRow(IRowReader reader)
        {
            AuditAssetHistory auditAssetHistory = AuditAssetHistory.New();

            // Table Fields
            auditAssetHistory.AuditAssetHistoryId = reader.GetInt32("AuditAssetHistoryId");
            auditAssetHistory.SessionId           = reader.GetString("SessionId");
            auditAssetHistory.IpAddress           = reader.GetString("IpAddress");
            auditAssetHistory.AuditAssetActionId  = reader.GetInt32("AuditAssetActionId");
            auditAssetHistory.UserId  = reader.GetInt32("UserId");
            auditAssetHistory.AssetId = reader.GetInt32("AssetId");
            auditAssetHistory.Notes   = reader.GetString("Notes");
            auditAssetHistory.Date    = reader.GetDateTime("Date");

            // View Fields
            auditAssetHistory.Description        = reader.GetString("Description");
            auditAssetHistory.UserPrimaryBrandId = reader.GetInt32("UserPrimaryBrandId");
            auditAssetHistory.AssetBrandId       = reader.GetInt32("AssetBrandId");
            auditAssetHistory.UserName           = reader.GetString("UserName");
            auditAssetHistory.UserEmail          = reader.GetString("UserEmail");
            auditAssetHistory.Title = reader.GetString("Title");

            auditAssetHistory.IsDirty = false;
            auditAssetHistory.ChangedProperties.Clear();

            return(auditAssetHistory);
        }
        protected override object ReadRow(IRowReader reader)
        {
            OrderItem orderItem = OrderItem.New();

            // Table Fields
            orderItem.OrderItemId           = reader.GetInt32("OrderItemId");
            orderItem.OrderId               = reader.GetInt32("OrderId");
            orderItem.AssetId               = reader.GetInt32("AssetId");
            orderItem.Notes                 = reader.GetString("Notes");
            orderItem.RequiredByDate        = reader.GetNullableDateTime("RequiredByDate");
            orderItem.OrderItemStatusId     = reader.GetInt32("OrderItemStatusId");
            orderItem.OrderItemStatusDate   = reader.GetNullableDateTime("OrderItemStatusDate");
            orderItem.OrderItemStatusUserId = reader.GetNullableInt32("OrderItemStatusUserId");
            orderItem.AssignedToUserId      = reader.GetNullableInt32("AssignedToUserId");
            orderItem.CreateDate            = reader.GetDateTime("CreateDate");

            // View Fields
            orderItem.UserId            = reader.GetInt32("UserId");
            orderItem.AssetUploadUserId = reader.GetInt32("AssetUploadUserId");
            orderItem.AssetBrandId      = reader.GetInt32("AssetBrandId");

            orderItem.IsDirty = false;
            orderItem.ChangedProperties.Clear();

            return(orderItem);
        }
Example #14
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.SeedID)))
     {
         this._SeedID = reader.GetInt32(_.SeedID);
     }
     if ((false == reader.IsDBNull(_.SeedGuID)))
     {
         this._SeedGuID = reader.GetGuid(_.SeedGuID);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.TableName)))
     {
         this._TableName = reader.GetString(_.TableName);
     }
     if ((false == reader.IsDBNull(_.Year)))
     {
         this._Year = reader.GetInt32(_.Year);
     }
     if ((false == reader.IsDBNull(_.Month)))
     {
         this._Month = reader.GetInt32(_.Month);
     }
     if ((false == reader.IsDBNull(_.Day)))
     {
         this._Day = reader.GetInt32(_.Day);
     }
     if ((false == reader.IsDBNull(_.SeedValue)))
     {
         this._SeedValue = reader.GetInt32(_.SeedValue);
     }
 }
        protected override object ReadRow(IRowReader reader)
        {
            Homepage homepage = Homepage.New();

            // Table Fields
            homepage.HomepageId           = reader.GetInt32("HomepageId");
            homepage.BrandId              = reader.GetInt32("BrandId");
            homepage.IntroText            = reader.GetString("IntroText");
            homepage.Url1                 = reader.GetString("Url1");
            homepage.Url2                 = reader.GetString("Url2");
            homepage.Url3                 = reader.GetString("Url3");
            homepage.Url4                 = reader.GetString("Url4");
            homepage.BumperPageHtml       = reader.GetString("BumperPageHtml");
            homepage.BumperPageSkip       = reader.GetBoolean("BumperPageSkip");
            homepage.CustomHtml           = reader.GetString("CustomHtml");
            homepage.HomepageTypeId       = reader.GetInt32("HomepageTypeId");
            homepage.IsPublished          = reader.GetBoolean("IsPublished");
            homepage.LastModifiedByUserId = reader.GetInt32("LastModifiedByUserId");
            homepage.LastModifiedDate     = reader.GetDateTime("LastModifiedDate");

            // View Fields
            homepage.BrandName = reader.GetString("BrandName");

            homepage.IsDirty = false;
            homepage.ChangedProperties.Clear();

            return(homepage);
        }
Example #16
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.RateTaxID)))
     {
         this._RateTaxID = reader.GetInt32(_.RateTaxID);
     }
     if ((false == reader.IsDBNull(_.RateTaxGuid)))
     {
         this._RateTaxGuid = reader.GetGuid(_.RateTaxGuid);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.CurrencyCode)))
     {
         this._CurrencyCode = reader.GetString(_.CurrencyCode);
     }
     if ((false == reader.IsDBNull(_.ExchangeRate)))
     {
         this._ExchangeRate = reader.GetDecimal(_.ExchangeRate);
     }
     if ((false == reader.IsDBNull(_.RateDate)))
     {
         this._RateDate = reader.GetDateTime(_.RateDate);
     }
     if ((false == reader.IsDBNull(_.Remark)))
     {
         this._Remark = reader.GetString(_.Remark);
     }
     if ((false == reader.IsDBNull(_.CreatedEmpID)))
     {
         this._CreatedEmpID = reader.GetInt32(_.CreatedEmpID);
     }
     if ((false == reader.IsDBNull(_.CreatedEmpName)))
     {
         this._CreatedEmpName = reader.GetString(_.CreatedEmpName);
     }
     if ((false == reader.IsDBNull(_.CreatedTime)))
     {
         this._CreatedTime = reader.GetDateTime(_.CreatedTime);
     }
     if ((false == reader.IsDBNull(_.UpdatedEmpID)))
     {
         this._UpdatedEmpID = reader.GetInt32(_.UpdatedEmpID);
     }
     if ((false == reader.IsDBNull(_.UpdatedEmpName)))
     {
         this._UpdatedEmpName = reader.GetString(_.UpdatedEmpName);
     }
     if ((false == reader.IsDBNull(_.UpdatedTime)))
     {
         this._UpdatedTime = reader.GetDateTime(_.UpdatedTime);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #17
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.ExpLineID)))
     {
         this._ExpLineID = reader.GetInt32(_.ExpLineID);
     }
     if ((false == reader.IsDBNull(_.ExpLineGuID)))
     {
         this._ExpLineGuID = reader.GetGuid(_.ExpLineGuID);
     }
     if ((false == reader.IsDBNull(_.ExpGuID)))
     {
         this._ExpGuID = reader.GetGuid(_.ExpGuID);
     }
     if ((false == reader.IsDBNull(_.ExpName)))
     {
         this._ExpName = reader.GetString(_.ExpName);
     }
     if ((false == reader.IsDBNull(_.Amount)))
     {
         this._Amount = reader.GetDecimal(_.Amount);
     }
     if ((false == reader.IsDBNull(_.ChkAmount)))
     {
         this._ChkAmount = reader.GetDecimal(_.ChkAmount);
     }
     if ((false == reader.IsDBNull(_.Remark)))
     {
         this._Remark = reader.GetString(_.Remark);
     }
     if ((false == reader.IsDBNull(_.CreatedTime)))
     {
         this._CreatedTime = reader.GetDateTime(_.CreatedTime);
     }
     if ((false == reader.IsDBNull(_.CreatedEmpID)))
     {
         this._CreatedEmpID = reader.GetInt32(_.CreatedEmpID);
     }
     if ((false == reader.IsDBNull(_.CreatedEmpName)))
     {
         this._CreatedEmpName = reader.GetString(_.CreatedEmpName);
     }
     if ((false == reader.IsDBNull(_.UpdatedTime)))
     {
         this._UpdatedTime = reader.GetDateTime(_.UpdatedTime);
     }
     if ((false == reader.IsDBNull(_.UpdatedEmpID)))
     {
         this._UpdatedEmpID = reader.GetInt32(_.UpdatedEmpID);
     }
     if ((false == reader.IsDBNull(_.UpdatedEmpName)))
     {
         this._UpdatedEmpName = reader.GetString(_.UpdatedEmpName);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #18
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.MID)))
     {
         this._MID = reader.GetInt32(_.MID);
     }
     if ((false == reader.IsDBNull(_.MGuid)))
     {
         this._MGuid = reader.GetGuid(_.MGuid);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.AttachType)))
     {
         this._AttachType = reader.GetString(_.AttachType);
     }
     if ((false == reader.IsDBNull(_.MappingIdentifier)))
     {
         this._MappingIdentifier = reader.GetString(_.MappingIdentifier);
     }
     if ((false == reader.IsDBNull(_.PhysicalRootPath)))
     {
         this._PhysicalRootPath = reader.GetString(_.PhysicalRootPath);
     }
     if ((false == reader.IsDBNull(_.IsEffect)))
     {
         this._IsEffect = reader.GetBoolean(_.IsEffect);
     }
     if ((false == reader.IsDBNull(_.CreatedEmpID)))
     {
         this._CreatedEmpID = reader.GetInt32(_.CreatedEmpID);
     }
     if ((false == reader.IsDBNull(_.CreatedEmpName)))
     {
         this._CreatedEmpName = reader.GetString(_.CreatedEmpName);
     }
     if ((false == reader.IsDBNull(_.CreatedTime)))
     {
         this._CreatedTime = reader.GetDateTime(_.CreatedTime);
     }
     if ((false == reader.IsDBNull(_.UpdatedEmpID)))
     {
         this._UpdatedEmpID = reader.GetInt32(_.UpdatedEmpID);
     }
     if ((false == reader.IsDBNull(_.UpdatedEmpName)))
     {
         this._UpdatedEmpName = reader.GetString(_.UpdatedEmpName);
     }
     if ((false == reader.IsDBNull(_.UpdatedTime)))
     {
         this._UpdatedTime = reader.GetDateTime(_.UpdatedTime);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #19
0
 public TableReader(IRowReader rowReader, ITypeConverterResolver typeConverterResolver,
                    IPropertyMapper propertyMapper, IModelValidator modelValidator)
 {
     RowReader             = rowReader;
     TypeConverterResolver = typeConverterResolver;
     PropertyMapper        = propertyMapper;
     ModelValidator        = modelValidator;
 }
Example #20
0
        public object ReadSingleRow(IRowReader reader)
        {
            if (reader.Read())
            {
                return(ReadRow(reader));
            }

            return(null);
        }
Example #21
0
        public string GetValue(uint rowIndex, string colName)
        {
            IRowReader row = GetRow(rowIndex);

            if (row == null)
            {
                return(null);
            }
            return(row.Get(colName));
        }
Example #22
0
        public object ReadRowSet(IRowReader reader)
        {
            IEntityList list = CreateObjectList();

            while (reader.Read())
            {
                list.Add(ReadRow(reader));
            }
            return(list);
        }
Example #23
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.WFAuditID)))
     {
         this._WFAuditID = reader.GetInt32(_.WFAuditID);
     }
     if ((false == reader.IsDBNull(_.WFAuditGuid)))
     {
         this._WFAuditGuid = reader.GetGuid(_.WFAuditGuid);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.TableName)))
     {
         this._TableName = reader.GetString(_.TableName);
     }
     if ((false == reader.IsDBNull(_.WFNamae)))
     {
         this._WFNamae = reader.GetString(_.WFNamae);
     }
     if ((false == reader.IsDBNull(_.CreatedEmpID)))
     {
         this._CreatedEmpID = reader.GetInt32(_.CreatedEmpID);
     }
     if ((false == reader.IsDBNull(_.CreatedEmpName)))
     {
         this._CreatedEmpName = reader.GetString(_.CreatedEmpName);
     }
     if ((false == reader.IsDBNull(_.CreatedTime)))
     {
         this._CreatedTime = reader.GetDateTime(_.CreatedTime);
     }
     if ((false == reader.IsDBNull(_.UpdatedEmpID)))
     {
         this._UpdatedEmpID = reader.GetInt32(_.UpdatedEmpID);
     }
     if ((false == reader.IsDBNull(_.UpdatedEmpName)))
     {
         this._UpdatedEmpName = reader.GetString(_.UpdatedEmpName);
     }
     if ((false == reader.IsDBNull(_.UpdatedTime)))
     {
         this._UpdatedTime = reader.GetDateTime(_.UpdatedTime);
     }
     if ((false == reader.IsDBNull(_.IsStop)))
     {
         this._IsStop = reader.GetBoolean(_.IsStop);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #24
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.RptSectionID)))
     {
         this._RptSectionID = reader.GetInt32(_.RptSectionID);
     }
     if ((false == reader.IsDBNull(_.RptSectionGuID)))
     {
         this._RptSectionGuID = reader.GetGuid(_.RptSectionGuID);
     }
     if ((false == reader.IsDBNull(_.SysRptGuID)))
     {
         this._SysRptGuID = reader.GetGuid(_.SysRptGuID);
     }
     if ((false == reader.IsDBNull(_.SectionName)))
     {
         this._SectionName = reader.GetString(_.SectionName);
     }
     if ((false == reader.IsDBNull(_.SectionChsName)))
     {
         this._SectionChsName = reader.GetString(_.SectionChsName);
     }
     if ((false == reader.IsDBNull(_.IsRepeatBody)))
     {
         this._IsRepeatBody = reader.GetBoolean(_.IsRepeatBody);
     }
     if ((false == reader.IsDBNull(_.MaxRow)))
     {
         this._MaxRow = reader.GetInt32(_.MaxRow);
     }
     if ((false == reader.IsDBNull(_.RowHeight)))
     {
         this._RowHeight = reader.GetInt32(_.RowHeight);
     }
     if ((false == reader.IsDBNull(_.SectionWidth)))
     {
         this._SectionWidth = reader.GetInt32(_.SectionWidth);
     }
     if ((false == reader.IsDBNull(_.SectionHeight)))
     {
         this._SectionHeight = reader.GetInt32(_.SectionHeight);
     }
     if ((false == reader.IsDBNull(_.IsRepeatInPage)))
     {
         this._IsRepeatInPage = reader.GetBoolean(_.IsRepeatInPage);
     }
     if ((false == reader.IsDBNull(_.OrderSeq)))
     {
         this._OrderSeq = reader.GetInt32(_.OrderSeq);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #25
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.WF_TableFieldID)))
     {
         this._WF_TableFieldID = reader.GetInt32(_.WF_TableFieldID);
     }
     if ((false == reader.IsDBNull(_.WF_TableID)))
     {
         this._WF_TableID = reader.GetInt32(_.WF_TableID);
     }
     if ((false == reader.IsDBNull(_.WF_FieldChsName)))
     {
         this._WF_FieldChsName = reader.GetString(_.WF_FieldChsName);
     }
     if ((false == reader.IsDBNull(_.WF_FieldEngName)))
     {
         this._WF_FieldEngName = reader.GetString(_.WF_FieldEngName);
     }
     if ((false == reader.IsDBNull(_.WF_FieldType)))
     {
         this._WF_FieldType = reader.GetString(_.WF_FieldType);
     }
     if ((false == reader.IsDBNull(_.IsKeyGuid)))
     {
         this._IsKeyGuid = reader.GetBoolean(_.IsKeyGuid);
     }
     if ((false == reader.IsDBNull(_.CreatedEmpID)))
     {
         this._CreatedEmpID = reader.GetInt32(_.CreatedEmpID);
     }
     if ((false == reader.IsDBNull(_.CreatedEmpName)))
     {
         this._CreatedEmpName = reader.GetString(_.CreatedEmpName);
     }
     if ((false == reader.IsDBNull(_.CreatedTime)))
     {
         this._CreatedTime = reader.GetDateTime(_.CreatedTime);
     }
     if ((false == reader.IsDBNull(_.UpdatedEmpID)))
     {
         this._UpdatedEmpID = reader.GetInt32(_.UpdatedEmpID);
     }
     if ((false == reader.IsDBNull(_.UpdatedEmpName)))
     {
         this._UpdatedEmpName = reader.GetString(_.UpdatedEmpName);
     }
     if ((false == reader.IsDBNull(_.UpdatedTime)))
     {
         this._UpdatedTime = reader.GetDateTime(_.UpdatedTime);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #26
0
        protected override object ReadRow(IRowReader reader)
        {
            User user = User.New();

            // Table Fields
            user.UserId                  = reader.GetInt32("UserId");
            user.FirstName               = reader.GetString("FirstName");
            user.LastName                = reader.GetString("LastName");
            user.Email                   = reader.GetString("Email");
            user.Password                = reader.GetString("Password");
            user.PasswordSalt            = reader.GetString("PasswordSalt");
            user.PasswordExpiryDate      = reader.GetNullableDateTime("PasswordExpiryDate");
            user.IsPasswordNonExpiring   = reader.GetBoolean("IsPasswordNonExpiring");
            user.IsEmployee              = reader.GetBoolean("IsEmployee");
            user.IsEngineer              = reader.GetBoolean("IsEngineer");
            user.CompanyName             = reader.GetString("CompanyName");
            user.PrimaryBrandId          = reader.GetInt32("PrimaryBrandId");
            user.CountryId               = reader.GetNullableInt32("CountryId");
            user.PhoneNumber             = reader.GetString("PhoneNumber");
            user.MobileNumber            = reader.GetString("MobileNumber");
            user.RegisterDate            = reader.GetDateTime("RegisterDate");
            user.LastLoginDate           = reader.GetNullableDateTime("LastLoginDate");
            user.AccountExpiryDate       = reader.GetNullableDateTime("AccountExpiryDate");
            user.IsAccountNonExpiring    = reader.GetBoolean("IsAccountNonExpiring");
            user.IsSuspended             = reader.GetBoolean("IsSuspended");
            user.UserRoleId              = reader.GetInt32("UserRoleId");
            user.UserStatusId            = reader.GetInt32("UserStatusId");
            user.UseWorkflow             = reader.GetBoolean("UseWorkflow");
            user.WorkflowId              = reader.GetNullableInt32("WorkflowId");
            user.Notes                   = reader.GetString("Notes");
            user.IsAllowedExternalAccess = reader.GetBoolean("IsAllowedExternalAccess");
            user.ApproverUserId          = reader.GetNullableInt32("ApproverUserId");
            user.CatalogueAssetIdList    = reader.GetString("CatalogueAssetIdList");
            user.IsDeleted               = reader.GetBoolean("IsDeleted");
            user.Guid = reader.GetString("Guid");
            user.EnableFilePathIngestion = reader.GetBoolean("EnableFilePathIngestion");
            user.UserAPIToken            = reader.GetString("UserAPIToken");
            user.SessionAPIToken         = reader.GetString("SessionAPIToken");
            user.LastAPIOperation        = reader.GetNullableDateTime("LastAPIOperation");

            // View Fields
            user.FullName          = reader.GetString("FullName");
            user.IsPasswordExpired = reader.GetNullableBoolean("IsPasswordExpired");
            user.IsAccountExpired  = reader.GetNullableBoolean("IsAccountExpired");
            user.BrandName         = reader.GetString("BrandName");
            user.UserStatusName    = reader.GetString("UserStatusName");
            user.UserRoleName      = reader.GetString("UserRoleName");

            user.IsDirty = false;
            user.ChangedProperties.Clear();

            return(user);
        }
Example #27
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.FormRightID)))
     {
         this._FormRightID = reader.GetInt32(_.FormRightID);
     }
     if ((false == reader.IsDBNull(_.NameSpace)))
     {
         this._NameSpace = reader.GetString(_.NameSpace);
     }
     if ((false == reader.IsDBNull(_.FormEngName)))
     {
         this._FormEngName = reader.GetString(_.FormEngName);
     }
     if ((false == reader.IsDBNull(_.FormChsName)))
     {
         this._FormChsName = reader.GetString(_.FormChsName);
     }
     if ((false == reader.IsDBNull(_.UserControlEngName)))
     {
         this._UserControlEngName = reader.GetString(_.UserControlEngName);
     }
     if ((false == reader.IsDBNull(_.UserControlChsName)))
     {
         this._UserControlChsName = reader.GetString(_.UserControlChsName);
     }
     if ((false == reader.IsDBNull(_.OprControlEngName)))
     {
         this._OprControlEngName = reader.GetString(_.OprControlEngName);
     }
     if ((false == reader.IsDBNull(_.OprControlChsName)))
     {
         this._OprControlChsName = reader.GetString(_.OprControlChsName);
     }
     if ((false == reader.IsDBNull(_.OprPropertyName)))
     {
         this._OprPropertyName = reader.GetString(_.OprPropertyName);
     }
     if ((false == reader.IsDBNull(_.ModuleID)))
     {
         this._ModuleID = reader.GetInt32(_.ModuleID);
     }
     if ((false == reader.IsDBNull(_.ActionCode)))
     {
         this._ActionCode = reader.GetString(_.ActionCode);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #28
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.WF_FunLineID)))
     {
         this._WF_FunLineID = reader.GetInt32(_.WF_FunLineID);
     }
     if ((false == reader.IsDBNull(_.WF_FunLineGuid)))
     {
         this._WF_FunLineGuid = reader.GetGuid(_.WF_FunLineGuid);
     }
     if ((false == reader.IsDBNull(_.WF_FunGuid)))
     {
         this._WF_FunGuid = reader.GetGuid(_.WF_FunGuid);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.TableName)))
     {
         this._TableName = reader.GetString(_.TableName);
     }
     if ((false == reader.IsDBNull(_.FieldName)))
     {
         this._FieldName = reader.GetString(_.FieldName);
     }
     if ((false == reader.IsDBNull(_.OperationChar)))
     {
         this._OperationChar = reader.GetString(_.OperationChar);
     }
     if ((false == reader.IsDBNull(_.FieldValue)))
     {
         this._FieldValue = reader.GetString(_.FieldValue);
     }
     if ((false == reader.IsDBNull(_.AndOr)))
     {
         this._AndOr = reader.GetString(_.AndOr);
     }
     if ((false == reader.IsDBNull(_.SeqNo)))
     {
         this._SeqNo = reader.GetInt32(_.SeqNo);
     }
     if ((false == reader.IsDBNull(_.GroupNo)))
     {
         this._GroupNo = reader.GetString(_.GroupNo);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #29
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.SysEmpRoleID)))
     {
         this._SysEmpRoleID = reader.GetInt32(_.SysEmpRoleID);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.EmpID)))
     {
         this._EmpID = reader.GetInt32(_.EmpID);
     }
     if ((false == reader.IsDBNull(_.RoleIDs)))
     {
         this._RoleIDs = reader.GetString(_.RoleIDs);
     }
     if ((false == reader.IsDBNull(_.RoleNames)))
     {
         this._RoleNames = reader.GetString(_.RoleNames);
     }
     if ((false == reader.IsDBNull(_.ReadOrgIDs)))
     {
         this._ReadOrgIDs = reader.GetString(_.ReadOrgIDs);
     }
     if ((false == reader.IsDBNull(_.EditOrgIDs)))
     {
         this._EditOrgIDs = reader.GetString(_.EditOrgIDs);
     }
     if ((false == reader.IsDBNull(_.ReadDeptIDs)))
     {
         this._ReadDeptIDs = reader.GetString(_.ReadDeptIDs);
     }
     if ((false == reader.IsDBNull(_.EditDeptIDs)))
     {
         this._EditDeptIDs = reader.GetString(_.EditDeptIDs);
     }
     if ((false == reader.IsDBNull(_.ReadEmpIDs)))
     {
         this._ReadEmpIDs = reader.GetString(_.ReadEmpIDs);
     }
     if ((false == reader.IsDBNull(_.EditEmpIDs)))
     {
         this._EditEmpIDs = reader.GetString(_.EditEmpIDs);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
Example #30
0
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.DeptID)))
     {
         this._DeptID = reader.GetInt32(_.DeptID);
     }
     if ((false == reader.IsDBNull(_.OrgID)))
     {
         this._OrgID = reader.GetInt32(_.OrgID);
     }
     if ((false == reader.IsDBNull(_.OrgGuID)))
     {
         this._OrgGuID = reader.GetGuid(_.OrgGuID);
     }
     if ((false == reader.IsDBNull(_.GCompanyID)))
     {
         this._GCompanyID = reader.GetGuid(_.GCompanyID);
     }
     if ((false == reader.IsDBNull(_.DeptNo)))
     {
         this._DeptNo = reader.GetString(_.DeptNo);
     }
     if ((false == reader.IsDBNull(_.DeptName)))
     {
         this._DeptName = reader.GetString(_.DeptName);
     }
     if ((false == reader.IsDBNull(_.ParentID)))
     {
         this._ParentID = reader.GetInt32(_.ParentID);
     }
     if ((false == reader.IsDBNull(_.ParentIDPath)))
     {
         this._ParentIDPath = reader.GetString(_.ParentIDPath);
     }
     if ((false == reader.IsDBNull(_.ManagerEmpID)))
     {
         this._ManagerEmpID = reader.GetInt32(_.ManagerEmpID);
     }
     if ((false == reader.IsDBNull(_.ManagerEmpName)))
     {
         this._ManagerEmpName = reader.GetString(_.ManagerEmpName);
     }
     if ((false == reader.IsDBNull(_.IsActive)))
     {
         this._IsActive = reader.GetInt32(_.IsActive);
     }
     if ((false == reader.IsDBNull(_.IsDeleted)))
     {
         this._IsDeleted = reader.GetBoolean(_.IsDeleted);
     }
 }
 /// <summary>
 /// 给当前实体赋值
 /// </summary>
 protected override void SetValues(IRowReader reader)
 {
     if ((false == reader.IsDBNull(_.iid)))
     {
         this._iid = reader.GetInt64(_.iid);
     }
     if ((false == reader.IsDBNull(_.priority)))
     {
         this._priority = reader.GetInt32(_.priority);
     }
     if ((false == reader.IsDBNull(_.target_type)))
     {
         this._target_type = reader.GetInt32(_.target_type);
     }
     if ((false == reader.IsDBNull(_.target)))
     {
         this._target = reader.GetString(_.target);
     }
     if ((false == reader.IsDBNull(_.title)))
     {
         this._title = reader.GetString(_.title);
     }
     if ((false == reader.IsDBNull(_.info)))
     {
         this._info = reader.GetString(_.info);
     }
     if ((false == reader.IsDBNull(_.reserve_time)))
     {
         this._reserve_time = reader.GetInt32(_.reserve_time);
     }
     if ((false == reader.IsDBNull(_.send_time)))
     {
         this._send_time = reader.GetDateTime(_.send_time);
     }
     if ((false == reader.IsDBNull(_.status)))
     {
         this._status = reader.GetString(_.status);
     }
     if ((false == reader.IsDBNull(_.try_times)))
     {
         this._try_times = reader.GetInt32(_.try_times);
     }
     if ((false == reader.IsDBNull(_.status_message)))
     {
         this._status_message = reader.GetString(_.status_message);
     }
     if ((false == reader.IsDBNull(_.app_id)))
     {
         this._app_id = reader.GetString(_.app_id);
     }
 }
Example #32
0
 /// <summary>
 /// 重载SetValues
 /// </summary>
 /// <param name="reader"></param>
 protected override void SetValues(IRowReader reader)
 { }