public static ProductSupply PopulateProductSupplyFromIDataReader(IDataReader dr)
        {
            ProductSupply result = new ProductSupply();

            result.ApplyTaxRate   = DataRecordHelper.GetDecimal(dr, "ApplyTaxRate");
            result.CreateTime     = DataRecordHelper.GetDateTime(dr, "CreateTime");
            result.CreateUser     = DataRecordHelper.GetInt32(dr, "CreateUser");
            result.DeliverySpan   = DataRecordHelper.GetString(dr, "DeliverySpan");
            result.IncludeFreight = (FreightIncludeType?)DataRecordHelper.GetNullableInt32(dr, "IncludeFreight");
            result.IncludeTax     = (TaxIncludeType)DataRecordHelper.GetInt32(dr, "IncludeTax");
            result.ModelID        = DataRecordHelper.GetNullableInt32(dr, "ModelID");
            result.ProductID      = DataRecordHelper.GetInt32(dr, "ProductID");
            result.QuoteEnd       = DataRecordHelper.GetDateTime(dr, "QuoteEnd");
            result.QuoteFrom      = DataRecordHelper.GetDateTime(dr, "QuoteFrom");
            result.QuoteMOQ       = DataRecordHelper.GetNullableInt32(dr, "QuoteMOQ");
            result.QuotePrice     = DataRecordHelper.GetNullableDecimal(dr, "QuotePrice");
            result.QuoteRenewal   = DataRecordHelper.GetInt32(dr, "QuoteRenewal");
            result.SupplierID     = DataRecordHelper.GetInt32(dr, "SupplierID");
            result.SupplyID       = DataRecordHelper.GetInt32(dr, "SupplyID");
            result.SupplyRegion   = DataRecordHelper.GetNullableInt32(dr, "SupplyRegion");
            result.SupplyStatus   = (ComponentStatus)DataRecordHelper.GetInt32(dr, "SupplyStatus");
            result.UpdateTime     = DataRecordHelper.GetDateTime(dr, "UpdateTime");
            result.UpdateUser     = DataRecordHelper.GetInt32(dr, "UpdateUser");
            result.WarrantySpan   = DataRecordHelper.GetString(dr, "WarrantySpan");

            return(result);
        }
        public static ProductPrice PopulateProductPriceFromIDataReader(IDataReader dr)
        {
            ProductPrice productPrice = new ProductPrice();

            productPrice.PriceID        = DataRecordHelper.GetInt32(dr, "PriceID");
            productPrice.ProductID      = DataRecordHelper.GetInt32(dr, "ProductID");
            productPrice.ModelID        = DataRecordHelper.GetInt32(dr, "ModelID");
            productPrice.DeliverySpan   = DataRecordHelper.GetString(dr, "DeliverySpan");
            productPrice.WarrantySpan   = DataRecordHelper.GetString(dr, "WarrantySpan");
            productPrice.IncludeFreight = (PriceIncludeType)DataRecordHelper.GetInt32(dr, "IncludeFreight");
            productPrice.IncludeTax     = (PriceIncludeType)DataRecordHelper.GetInt32(dr, "IncludeTax");
            productPrice.ApplyTaxRate   = DataRecordHelper.GetDecimal(dr, "ApplyTaxRate");
            productPrice.QuoteMOQ       = DataRecordHelper.GetInt32(dr, "QuoteMOQ");
            productPrice.PriceMarket    = DataRecordHelper.GetNullableDecimal(dr, "PriceMarket");
            productPrice.PricePromotion = DataRecordHelper.GetNullableDecimal(dr, "PricePromotion");
            productPrice.PriceFloor     = DataRecordHelper.GetNullableDecimal(dr, "PriceFloor");
            productPrice.PricePurchase  = DataRecordHelper.GetNullableDecimal(dr, "PricePurchase");
            productPrice.PriceGradeA    = DataRecordHelper.GetNullableDecimal(dr, "PriceGradeA");
            productPrice.PriceGradeB    = DataRecordHelper.GetNullableDecimal(dr, "PriceGradeB");
            productPrice.PriceGradeC    = DataRecordHelper.GetNullableDecimal(dr, "PriceGradeC");
            productPrice.PriceGradeD    = DataRecordHelper.GetNullableDecimal(dr, "PriceGradeD");
            productPrice.PriceGradeE    = DataRecordHelper.GetNullableDecimal(dr, "PriceGradeE");
            productPrice.SupplyRegion   = DataRecordHelper.GetInt32(dr, "SupplyRegion");
            productPrice.QuoteFrom      = DataRecordHelper.GetDateTime(dr, "QuoteFrom");
            productPrice.QuoteEnd       = DataRecordHelper.GetDateTime(dr, "QuoteEnd");
            productPrice.QuoteRenewal   = DataRecordHelper.GetInt32(dr, "QuoteRenewal");
            productPrice.SupplyStatus   = (ComponentStatus)DataRecordHelper.GetInt32(dr, "SupplyStatus");
            productPrice.CreateTime     = DataRecordHelper.GetDateTime(dr, "CreateTime");
            productPrice.CreateUser     = DataRecordHelper.GetInt32(dr, "CreateUser");
            productPrice.UpdateTime     = DataRecordHelper.GetDateTime(dr, "UpdateTime");
            productPrice.UpdateUser     = DataRecordHelper.GetInt32(dr, "UpdateUser");
            productPrice.SetSerializerData(CommonDataProvider.PopulateSerializerDataIDataRecord(dr));
            return(productPrice);
        }
Пример #3
0
        public static User PopulateUserFromIDataReader(IDataReader dr)
        {
            User user = new User();

            user.UserID           = DataRecordHelper.GetInt32(dr, "UserID");
            user.UserType         = (UserType)DataRecordHelper.GetInt32(dr, "UserType");
            user.CompanyID        = DataRecordHelper.GetInt32(dr, "CompanyID", 0);
            user.OrganizationID   = DataRecordHelper.GetInt32(dr, "OrganizationID", 0);
            user.IsManager        = DataRecordHelper.GetInt32(dr, "IsManager", 2);
            user.UserName         = DataRecordHelper.GetString(dr, "LoginName");
            user.Password         = DataRecordHelper.GetString(dr, "Password");
            user.DisplayName      = DataRecordHelper.GetString(dr, "DisplayName", string.Empty);
            user.Email            = DataRecordHelper.GetString(dr, "UserEmail", string.Empty);
            user.Mobile           = DataRecordHelper.GetString(dr, "UserMobile", string.Empty);
            user.Phone            = DataRecordHelper.GetString(dr, "UserPhone", string.Empty);
            user.Fax              = DataRecordHelper.GetString(dr, "UserFax", string.Empty);
            user.Department       = DataRecordHelper.GetString(dr, "UserDepartment", string.Empty);
            user.Title            = DataRecordHelper.GetString(dr, "UserTitle", string.Empty);
            user.Remark           = DataRecordHelper.GetString(dr, "UserMemo", string.Empty);
            user.AccountStatus    = (AccountStatus)DataRecordHelper.GetInt32(dr, "UserStatus");
            user.PasswordQuestion = DataRecordHelper.GetString(dr, "PasswordQuestion", string.Empty);
            user.PasswordAnswer   = DataRecordHelper.GetString(dr, "PasswordAnswer", string.Empty);
            user.LastLockonDate   = DataRecordHelper.GetDateTime(dr, "LastLockTime", GlobalSettings.MinValue);
            user.LastActiveDate   = DataRecordHelper.GetDateTime(dr, "LastActiveTime", GlobalSettings.MinValue);
            user.CreateTime       = DataRecordHelper.GetDateTime(dr, "CreateTime", GlobalSettings.MinValue);
            user.CreateUser       = DataRecordHelper.GetInt32(dr, "CreateUser", 0);
            user.UpdateTime       = DataRecordHelper.GetDateTime(dr, "UpdateTime", GlobalSettings.MinValue);
            user.UpdateUser       = DataRecordHelper.GetInt32(dr, "UpdateUser", 0);
            user.SetSerializerData(PopulateSerializerDataIDataRecord(dr));
            return(user);
        }
Пример #4
0
 public static Module ConvertDataReader2ModuleEntity(IDataReader reader)
 {
     return(new Module(DataRecordHelper.GetInt32(reader, "ModuleID"),
                       DataRecordHelper.GetString(reader, "ModuleShortName"),
                       DataRecordHelper.GetString(reader, "ModuleName"),
                       DataRecordHelper.GetString(reader, "ModuleDesc")));
 }
Пример #5
0
        /// <summary>
        /// 获取文章
        /// </summary>
        /// <param name="dr"></param>
        public static Article ParseArticle(IDataReader dr)
        {
            Article result = new Article()
            {
                ID           = DataRecordHelper.GetInt32(dr, "ArticleID"),
                Title        = DataRecordHelper.GetString(dr, "ArticleTitle"),
                SubTitle     = DataRecordHelper.GetString(dr, "ArticleSubtitle"),
                Abstract     = DataRecordHelper.GetString(dr, "ArticleAbstract"),
                Content      = DataRecordHelper.GetString(dr, "ArticleContent"),
                Date         = DataRecordHelper.GetDateTime(dr, "ArticleDate"),
                CopyFrom     = DataRecordHelper.GetString(dr, "ArticleCopyFrom"),
                Author       = DataRecordHelper.GetString(dr, "ArticleAuthor"),
                Keywords     = DataRecordHelper.GetString(dr, "ArticleKeywords"),
                Image        = DataRecordHelper.GetInt32(dr, "ArticleImageID"),
                Category     = DataRecordHelper.GetInt32(dr, "CategoryID"),
                DisplayOrder = DataRecordHelper.GetInt32(dr, "DisplayOrder"),
                ArticleMemo  = DataRecordHelper.GetString(dr, "ArticleMemo"),
                Status       = (ComponentStatus)DataRecordHelper.GetInt32(dr, "ArticleStatus"),
                HitTimes     = DataRecordHelper.GetInt32(dr, "HitTimes"),
                CreateTime   = DataRecordHelper.GetDateTime(dr, "CreateTime"),
                CreateUser   = DataRecordHelper.GetInt32(dr, "CreateUser"),
                UpdateTime   = DataRecordHelper.GetDateTime(dr, "UpdateTime"),
                UpdateUser   = DataRecordHelper.GetInt32(dr, "UpdateUser"),
            };

            result.SetSerializerData(CommonDataProvider.PopulateSerializerDataIDataRecord(dr));

            return(result);
        }
Пример #6
0
        public static SerializerData PopulateSerializerDataIDataRecord(IDataRecord record)
        {
            SerializerData data = new SerializerData();

            data.Keys   = DataRecordHelper.GetString(record, "PropertyNames", string.Empty);
            data.Values = DataRecordHelper.GetString(record, "PropertyValues", string.Empty);
            return(data);
        }
Пример #7
0
 /// <summary>
 /// 标题前缀
 /// </summary>
 /// <param name="dr"></param>
 /// <returns></returns>
 public static TitlePrefixes ParseTitlePrefixes(IDataReader dr)
 {
     return(new TitlePrefixes()
     {
         ID = DataRecordHelper.GetInt32(dr, "TitleID"),
         Name = DataRecordHelper.GetString(dr, "Name"),
     });
 }
Пример #8
0
 public static ModuleAction ConvertDataReader2ModuleActionEntity(IDataReader reader)
 {
     return(new ModuleAction(DataRecordHelper.GetInt32(reader, "ModuleActionID"),
                             DataRecordHelper.GetInt32(reader, "ModuleID"),
                             DataRecordHelper.GetInt32(reader, "ActionID"),
                             DataRecordHelper.GetString(reader, "ModuleActionName"),
                             DataRecordHelper.GetString(reader, "ModuleActionDesc")));
 }
        public static ProductProperty PopulatePropertyValueFromIDataReader(IDataReader dr)
        {
            ProductProperty property = new ProductProperty();

            property.PropertyID    = DataRecordHelper.GetInt32(dr, "PropertyID");
            property.PropertyName  = DataRecordHelper.GetString(dr, "PropertyName");
            property.PropertyValue = DataRecordHelper.GetString(dr, "PropertyValue");
            return(property);
        }
Пример #10
0
        public static Tag PopulateTagFromIDataReader(IDataReader dr)
        {
            Tag tagCloud = new Tag();

            tagCloud.Name         = DataRecordHelper.GetString(dr, "TagName");
            tagCloud.ItemCount    = DataRecordHelper.GetInt32(dr, "TagHitCount");
            tagCloud.DateCreated  = DataRecordHelper.GetDateTime(dr, "CreateTime");
            tagCloud.LastModified = DataRecordHelper.GetDateTime(dr, "UpdateTime");
            return(tagCloud);
        }
Пример #11
0
        public static ActivityItem PopulateActivityItemFromIDataReader(IDataReader dr)
        {
            ActivityItem codeActivity = new ActivityItem();

            codeActivity.ActivityID   = DataRecordHelper.GetInt32(dr, "ActivityID");
            codeActivity.ActivityKey  = DataRecordHelper.GetString(dr, "ActivityKey");
            codeActivity.ActivityName = DataRecordHelper.GetString(dr, "ActivityName");
            codeActivity.IsEnabled    = DataRecordHelper.GetBoolean(dr, "IsEnabled", true);
            return(codeActivity);
        }
Пример #12
0
 public static WordStatistic ReadStatistic(IDataReader dr)
 {
     return(new WordStatistic()
     {
         StatisticID = DataRecordHelper.GetInt32(dr, "StatisticID"),
         HitCount = DataRecordHelper.GetDecimal(dr, "HitCount"),
         SearchWord = DataRecordHelper.GetString(dr, "SearchWord"),
         CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"),
         UpdateTime = DataRecordHelper.GetDateTime(dr, "UpdateTime")
     });
 }
Пример #13
0
 public static LinkUrl ReadLinkUrl(IDataReader dr)
 {
     return(new LinkUrl()
     {
         ID = DataRecordHelper.GetInt32(dr, "ID"),
         CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"),
         CreateUser = DataRecordHelper.GetInt32(dr, "CreateUser"),
         Desc = DataRecordHelper.GetString(dr, "Desc"),
         Title = DataRecordHelper.GetString(dr, "Title"),
         Url = DataRecordHelper.GetString(dr, "Url")
     });
 }
Пример #14
0
 public static FriendLink ReadFriendLink(IDataReader dr)
 {
     return(new FriendLink()
     {
         ID = DataRecordHelper.GetInt32(dr, "ID"),
         CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"),
         CreateUser = DataRecordHelper.GetInt32(dr, "CreateUser"),
         Rank = DataRecordHelper.GetInt32(dr, "Rank"),
         Title = DataRecordHelper.GetString(dr, "Title"),
         Url = DataRecordHelper.GetString(dr, "Url")
     });
 }
Пример #15
0
        public static UserActivity PopulateUserActivityFromIDataReader(IDataReader dr)
        {
            UserActivity userActivity = new UserActivity();

            userActivity.UserActivityID  = DataRecordHelper.GetInt32(dr, "UserActivityID");
            userActivity.ActivityID      = DataRecordHelper.GetInt32(dr, "ActivityID");
            userActivity.ActivityTitle   = DataRecordHelper.GetString(dr, "ActivityTitle");
            userActivity.ActivityContent = DataRecordHelper.GetString(dr, "ActivityContent");
            userActivity.ActivityTime    = DataRecordHelper.GetDateTime(dr, "ActivityTime");
            userActivity.ActivityUser    = DataRecordHelper.GetInt32(dr, "ActivityUser");
            return(userActivity);
        }
Пример #16
0
 public static Role ConvertDataReader2RoleEntity(IDataReader reader)
 {
     return(new Role(DataRecordHelper.GetInt32(reader, "RoleID"),
                     DataRecordHelper.GetString(reader, "RoleName"),
                     DataRecordHelper.GetString(reader, "RoleDesc"),
                     DataRecordHelper.GetString(reader, "RoleMemo"),
                     DataRecordHelper.GetInt32(reader, "RoleStatus"),
                     DataRecordHelper.GetDateTime(reader, "CreateTime"),
                     DataRecordHelper.GetInt32(reader, "CreateUser"),
                     DataRecordHelper.GetDateTime(reader, "UpdateTime"),
                     DataRecordHelper.GetInt32(reader, "UpdateUser")));
 }
Пример #17
0
 public static FooterInfo ReadFooterInfo(IDataReader dr)
 {
     return(new FooterInfo()
     {
         ID = DataRecordHelper.GetInt32(dr, "ID"),
         AbouteHuaho = DataRecordHelper.GetString(dr, "AbouteHuaho"),
         ContactInfo = DataRecordHelper.GetString(dr, "ContactInfo"),
         HonerUser = DataRecordHelper.GetString(dr, "HonerUser"),
         RightNotice = DataRecordHelper.GetString(dr, "RightNotice"),
         WFList = DataRecordHelper.GetString(dr, "WFList"),
         Recruitment = DataRecordHelper.GetString(dr, "Recruitment")
     });
 }
 public static Shopping ReadShopping(IDataReader dr)
 {
     return(new Shopping()
     {
         CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"),
         ModelID = DataRecordHelper.GetInt32(dr, "ModelID"),
         ProductID = DataRecordHelper.GetInt32(dr, "ProductID"),
         Quantity = DataRecordHelper.GetInt32(dr, "Quantity"),
         ShoppingMemo = DataRecordHelper.GetString(dr, "ShoppingMemo"),
         ShoppingID = DataRecordHelper.GetInt32(dr, "ShoppingID"),
         UpdateTime = DataRecordHelper.GetDateTime(dr, "UpdateTime"),
         UserID = DataRecordHelper.GetString(dr, "UserID"),
     });
 }
Пример #19
0
 public static CompanyCredit ReadCompanyCredit(IDataReader dr)
 {
     return(new CompanyCredit()
     {
         CreditID = DataRecordHelper.GetInt32(dr, "CreditID"),
         SupplierID = DataRecordHelper.GetInt32(dr, "SupplierID"),
         CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"),
         CreateUser = DataRecordHelper.GetInt32(dr, "CreateUser"),
         CreditAmount = DataRecordHelper.GetDecimal(dr, "CreditAmount"),
         CreditDate = DataRecordHelper.GetDateTime(dr, "CreditDate"),
         CreditDelta = DataRecordHelper.GetDecimal(dr, "CreditDelta"),
         CreditDesc = DataRecordHelper.GetString(dr, "CreditDesc"),
         CreditMemo = DataRecordHelper.GetString(dr, "CreditMemo")
     });
 }
Пример #20
0
 public override List <ModuleActionKeyValue> ModuleActionKeyValues(string userName)
 {
     using (IDataReader reader = DataHelper.ExecuteReader(CommandType.StoredProcedure, "sp_Permission_ModuleActionValues", new ELParameter("UserName", DbType.String, userName)))
     {
         List <ModuleActionKeyValue> dics = new List <ModuleActionKeyValue>();
         ModuleActionKeyValue        makv = null;
         while (reader.Read())
         {
             makv = new ModuleActionKeyValue(DataRecordHelper.GetString(reader, "ModuleName"),
                                             DataRecordHelper.GetString(reader, "ActionName"));
             dics.Add(makv);
         }
         return(dics);
     }
 }
Пример #21
0
 public static CompanyDeposit ReadCompanyDeposit(IDataReader dr)
 {
     return(new CompanyDeposit()
     {
         CompanyID = DataRecordHelper.GetInt32(dr, "CompanyID"),
         CreateTime = DataRecordHelper.GetDateTime(dr, "CreateTime"),
         CreateUser = DataRecordHelper.GetInt32(dr, "CreateUser"),
         DepositAmount = DataRecordHelper.GetDecimal(dr, "DepositAmount"),
         DepositDate = DataRecordHelper.GetDateTime(dr, "DepositDate"),
         DepositDelta = DataRecordHelper.GetDecimal(dr, "DepositDelta"),
         DepositDesc = DataRecordHelper.GetString(dr, "DepositDesc"),
         DepositID = DataRecordHelper.GetInt32(dr, "DepositID"),
         DepositMemo = DataRecordHelper.GetString(dr, "DepositMemo"),
         DepositType = (DepositType)DataRecordHelper.GetInt32(dr, "DepositType")
     });
 }
Пример #22
0
        public static Area PopulateAreaFromIDataReader(IDataReader dr)
        {
            Area codeRegion = new Area();

            codeRegion.RegionID     = DataRecordHelper.GetInt32(dr, "RegionID");
            codeRegion.RegionType   = (AreaType)DataRecordHelper.GetInt32(dr, "RegionType");
            codeRegion.RegionCode   = DataRecordHelper.GetString(dr, "RegionCode");
            codeRegion.DistrictCode = DataRecordHelper.GetString(dr, "DistrictCode");
            codeRegion.RegionName   = DataRecordHelper.GetString(dr, "RegionName");
            codeRegion.RegionDesc   = DataRecordHelper.GetString(dr, "RegionDesc");
            codeRegion.RegionMemo   = DataRecordHelper.GetString(dr, "RegionMemo");
            codeRegion.RegionStatus = (ComponentStatus)DataRecordHelper.GetInt32(dr, "RegionStatus");
            codeRegion.CreateTime   = DataRecordHelper.GetDateTime(dr, "CreateTime");
            codeRegion.UpdateTime   = DataRecordHelper.GetDateTime(dr, "UpdateTime");
            return(codeRegion);
        }
Пример #23
0
        public static Favorite PopulateFavoriteFromIDataReader(IDataReader dr)
        {
            Favorite favorite = new Favorite();

            favorite.FavoriteID    = DataRecordHelper.GetInt32(dr, "FavoriteID");
            favorite.UserID        = DataRecordHelper.GetInt32(dr, "UserID");
            favorite.FavoriteType  = (FavoriteType)DataRecordHelper.GetInt32(dr, "FavoriteType");
            favorite.FavoriteTitle = DataRecordHelper.GetString(dr, "FavoriteTitle");
            favorite.RelatedID     = DataRecordHelper.GetInt32(dr, "RelatedID");
            favorite.FavoriteUrl   = DataRecordHelper.GetString(dr, "FavoriteUrl");
            favorite.FavoriteLevel = DataRecordHelper.GetInt32(dr, "FavoriteLevel");
            favorite.FavoriteMemo  = DataRecordHelper.GetString(dr, "FavoriteMemo");
            favorite.CreateTime    = DataRecordHelper.GetDateTime(dr, "CreateTime");
            favorite.UpdateTime    = DataRecordHelper.GetDateTime(dr, "UpdateTime");
            return(favorite);
        }
Пример #24
0
 public static Pending ReadPending(IDataReader reader)
 {
     return(new Pending()
     {
         ID = DataRecordHelper.GetInt32(reader, "ID"),
         CompanyID = DataRecordHelper.GetInt32(reader, "CompanyID"),
         CompanyType = (CompanyType)DataRecordHelper.GetInt32(reader, "CompanyType"),
         Status = (PendingStatus)DataRecordHelper.GetInt32(reader, "Status"),
         CreateTime = DataRecordHelper.GetDateTime(reader, "CreateTime"),
         CreateUser = DataRecordHelper.GetInt32(reader, "CreateUser"),
         DenyReason = DataRecordHelper.GetString(reader, "DenyReason"),
         Description = DataRecordHelper.GetString(reader, "Description"),
         UpdateTime = DataRecordHelper.GetDateTime(reader, "UpdateTime"),
         UpdateUser = DataRecordHelper.GetInt32(reader, "UpdateUser")
     });
 }
Пример #25
0
        public static TemporaryAttachment PopulateTemporaryAttachmentFromIDataReader(IDataReader dr)
        {
            TemporaryAttachment temporaryAttachment = new TemporaryAttachment();

            temporaryAttachment.AttachmentID     = DataRecordHelper.GetGuid(dr, "AttachmentID");
            temporaryAttachment.UserID           = DataRecordHelper.GetInt32(dr, "UserID");
            temporaryAttachment.AttachmentType   = (AttachmentType)DataRecordHelper.GetInt32(dr, "AttachmentType");
            temporaryAttachment.FileName         = DataRecordHelper.GetString(dr, "FileName");
            temporaryAttachment.FriendlyFileName = DataRecordHelper.GetString(dr, "FriendlyFileName");
            temporaryAttachment.ContentType      = DataRecordHelper.GetString(dr, "ContentType");
            temporaryAttachment.ContentSize      = DataRecordHelper.GetInt64(dr, "ContentSize");
            temporaryAttachment.Height           = DataRecordHelper.GetInt32(dr, "Height");
            temporaryAttachment.Width            = DataRecordHelper.GetInt32(dr, "Width");
            temporaryAttachment.DisplayOrder     = DataRecordHelper.GetInt32(dr, "DisplayOrder");
            return(temporaryAttachment);
        }
        public static ProductPicture PopulateProductPictureFromIDataReader(IDataReader dr)
        {
            ProductPicture productPicture = new ProductPicture();

            productPicture.PictureID     = DataRecordHelper.GetInt32(dr, "PictureID");
            productPicture.ProductID     = DataRecordHelper.GetInt32(dr, "ProductID");
            productPicture.ModelID       = DataRecordHelper.GetInt32(dr, "ModelID");
            productPicture.DisplayOrder  = DataRecordHelper.GetInt32(dr, "DisplayOrder");
            productPicture.PictureName   = DataRecordHelper.GetString(dr, "PictureName");
            productPicture.PictureFile   = DataRecordHelper.GetString(dr, "PictureFile");
            productPicture.PictureStatus = (ComponentStatus)DataRecordHelper.GetInt32(dr, "PictureStatus");
            productPicture.CreateTime    = DataRecordHelper.GetDateTime(dr, "CreateTime");
            productPicture.CreateUser    = DataRecordHelper.GetInt32(dr, "CreateUser");
            productPicture.UpdateTime    = DataRecordHelper.GetDateTime(dr, "UpdateTime");
            productPicture.UpdateUser    = DataRecordHelper.GetInt32(dr, "UpdateUser");
            return(productPicture);
        }
        public ProductModel PopulateProductModelFromIDataReader(IDataReader dr)
        {
            ProductModel productModel = new ProductModel();

            productModel.ModelID     = DataRecordHelper.GetInt32(dr, "ModelID");
            productModel.ProductID   = DataRecordHelper.GetInt32(dr, "ProductID");
            productModel.ModelCode   = DataRecordHelper.GetString(dr, "ModelCode");
            productModel.ModelName   = DataRecordHelper.GetString(dr, "ModelName");
            productModel.ModelDesc   = DataRecordHelper.GetString(dr, "ModelDesc");
            productModel.ModelStatus = (ComponentStatus)DataRecordHelper.GetInt32(dr, "ModelStatus");
            productModel.CreateTime  = DataRecordHelper.GetDateTime(dr, "CreateTime");
            productModel.CreateUser  = DataRecordHelper.GetInt32(dr, "CreateUser");
            productModel.UpdateTime  = DataRecordHelper.GetDateTime(dr, "UpdateTime");
            productModel.UpdateUser  = DataRecordHelper.GetInt32(dr, "UpdateUser");
            productModel.SetSerializerData(CommonDataProvider.PopulateSerializerDataIDataRecord(dr));
            return(productModel);
        }
        public static ProductCategory PopulateCategoryFromIDataReader(IDataReader dr)
        {
            ProductCategory category = new ProductCategory();

            category.CategoryID     = DataRecordHelper.GetInt32(dr, "CategoryID");
            category.CategoryName   = DataRecordHelper.GetString(dr, "CategoryName");
            category.CategoryDesc   = DataRecordHelper.GetString(dr, "CategoryDesc");
            category.ParentID       = DataRecordHelper.GetInt32(dr, "ParentID");
            category.PropertyID     = DataRecordHelper.GetInt32(dr, "PropertyID");
            category.DisplayOrder   = DataRecordHelper.GetInt32(dr, "DisplayOrder");
            category.CategoryStatus = (ComponentStatus)DataRecordHelper.GetInt32(dr, "CategoryStatus");
            category.CreateTime     = DataRecordHelper.GetDateTime(dr, "CreateTime");
            category.CreateUser     = DataRecordHelper.GetInt32(dr, "CreateUser");
            category.UpdateTime     = DataRecordHelper.GetDateTime(dr, "UpdateTime");
            category.UpdateUser     = DataRecordHelper.GetInt32(dr, "UpdateUser");
            return(category);
        }
Пример #29
0
        public static CompanyQualification PopulateQualificationFromIDataReader(IDataReader dr)
        {
            CompanyQualification qualification = new CompanyQualification();

            qualification.QualificationID     = DataRecordHelper.GetInt32(dr, "QualificationID");
            qualification.CompanyID           = DataRecordHelper.GetInt32(dr, "CompanyID");
            qualification.QualificationFile   = DataRecordHelper.GetString(dr, "QualificationFile");
            qualification.QualificationName   = DataRecordHelper.GetString(dr, "QualificationName");
            qualification.QualificationDesc   = DataRecordHelper.GetString(dr, "QualificationDesc");
            qualification.QualificationMemo   = DataRecordHelper.GetString(dr, "QualificationMemo");
            qualification.QualificationStatus = (ComponentStatus)DataRecordHelper.GetInt32(dr, "QualificationStatus");
            qualification.CreateTime          = DataRecordHelper.GetDateTime(dr, "CreateTime");
            qualification.CreateUser          = DataRecordHelper.GetInt32(dr, "CreateUser");
            qualification.UpdateTime          = DataRecordHelper.GetDateTime(dr, "UpdateTime");
            qualification.UpdateUser          = DataRecordHelper.GetInt32(dr, "UpdateUser");
            return(qualification);
        }