Пример #1
0
        protected void PutData(System.Data.SqlClient.SqlDataReader aReader)
        {
            if (aReader == null)
            {
                throw new Exception();
            }
            this.ShopID = Convert.ToInt16(aReader["ShopID"]);

            this.HeadID                 = Convert.ToInt16(aReader["HeadID"]);
            this.IsCommend              = Convert.ToByte(aReader["IsCommend"]);
            this.IsHot                  = Convert.ToByte(aReader["IsHot"]);
            this.IsNew                  = Convert.ToByte(aReader["IsNew"]);
            this.IsCanSellToShop        = Convert.ToBoolean(aReader["IsCanSellToShop"]);
            this.SellToShopPrice        = Convert.ToInt32(aReader["SellToShopPrice"]);
            this.IsBuyMustVip           = Convert.ToBoolean(aReader["IsBuyMustVip"]);
            this.IsBind                 = Convert.ToBoolean(aReader["IsBind"]);
            this.ItemDesc               = Convert.ToString(aReader["ItemDesc"]);
            this.itemid                 = Convert.ToInt16(aReader["ItemId"]);
            this.itemName               = Convert.ToString(aReader["itemName"]);
            this.originalPrice          = Convert.ToInt32(aReader["BuyoriginalPrice"]);
            this.ratePrice              = Convert.ToInt32(aReader["BuyRatePrice"]);
            this.validDate              = Convert.ToInt16(aReader["ValidDate"]);
            this.PriceType              = (PriceType)Enum.Parse(typeof(PriceType), Convert.ToInt16(aReader["BuyPriceType"]).ToString(), true);
            this.IsHidden               = Convert.ToBoolean(aReader["IsHidden"]);
            this.BelongSort             = Convert.ToInt16(aReader["BelongSort"]);
            this.UnitName               = Convert.ToString(aReader["UnitName"]);
            this.itemType               = (EItemType )Enum.Parse(typeof(EItemType), Convert.ToInt16(aReader["itemType"]).ToString(), true);
            this._itemSort              = (EItemSort)Enum.Parse(typeof(EItemSort), Convert.ToInt16(aReader["ItemSort"]).ToString(), true);
            this._DataForClientVersions = sDataVersionSplit + Convert.ToString(aReader["ForClientVersions"]) + sDataVersionSplit;
        }
Пример #2
0
        protected void PutData(System.Data.SqlClient.SqlDataReader aReader)
        {
            if (aReader == null) throw new Exception();
            this.ShopID = Convert.ToInt16(aReader["ShopID"]);

            this.HeadID = Convert.ToInt16(aReader["HeadID"]);
            this.IsCommend = Convert.ToByte(aReader["IsCommend"]);
            this.IsHot = Convert.ToByte(aReader["IsHot"]);
            this.IsNew = Convert.ToByte(aReader["IsNew"]);
            this.IsCanSellToShop = Convert.ToBoolean(aReader["IsCanSellToShop"]);
            this.SellToShopPrice = Convert.ToInt32(aReader["SellToShopPrice"]);
            this.IsBuyMustVip = Convert.ToBoolean(aReader["IsBuyMustVip"]);
            this.IsBind = Convert.ToBoolean(aReader["IsBind"]);
            this.ItemDesc = Convert.ToString(aReader["ItemDesc"]);
            this.itemid = Convert.ToInt16(aReader["ItemId"]);
            this.itemName = Convert.ToString(aReader["itemName"]);
            this.originalPrice = Convert.ToInt32(aReader["BuyoriginalPrice"]);
            this.ratePrice = Convert.ToInt32(aReader["BuyRatePrice"]);
            this.validDate = Convert.ToInt16(aReader["ValidDate"]);
            this.PriceType = (PriceType)Enum.Parse(typeof(PriceType), Convert.ToInt16(aReader["BuyPriceType"]).ToString(), true);
            this.IsHidden = Convert.ToBoolean(aReader["IsHidden"]);
            this.BelongSort = Convert.ToInt16(aReader["BelongSort"]);
            this.UnitName = Convert.ToString(aReader["UnitName"]);
            this.itemType = (EItemType )Enum.Parse(typeof(EItemType), Convert.ToInt16(aReader["itemType"]).ToString(), true);
            this._itemSort = (EItemSort)Enum.Parse(typeof(EItemSort), Convert.ToInt16(aReader["ItemSort"]).ToString(), true);
            this._DataForClientVersions = sDataVersionSplit + Convert.ToString(aReader["ForClientVersions"]) + sDataVersionSplit;
        }