Beispiel #1
0
        public override SqlParameter[] GetParameters()
        {
            M_Product model = this;

            if (model.AddTime <= DateTime.MinValue)
            {
                model.AddTime = DateTime.Now;
            }
            model.UpdateTime = DateTime.Now;
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.Class;
            sp[2].Value  = model.Nodeid;
            sp[3].Value  = model.ModelID;
            sp[4].Value  = model.ProCode;
            sp[5].Value  = model.BarCode;
            sp[6].Value  = model.Proname;
            sp[7].Value  = model.Kayword;
            sp[8].Value  = model.ProUnit;
            sp[9].Value  = model.Weight;
            sp[10].Value = model.ProClass;
            sp[11].Value = model.Properties;
            sp[12].Value = model.Sales;
            sp[13].Value = model.Proinfo;
            sp[14].Value = model.Procontent;
            sp[15].Value = model.Clearimg;
            sp[16].Value = model.Thumbnails;
            sp[17].Value = model.Producer;
            sp[18].Value = model.Brand;
            sp[19].Value = model.Allowed;
            sp[20].Value = model.Quota;
            sp[21].Value = model.DownQuota;
            sp[22].Value = model.Stock;
            sp[23].Value = model.StockDown;
            sp[24].Value = model.Rate;
            sp[25].Value = model.Rateset;
            sp[26].Value = model.Dengji;
            sp[27].Value = model.ShiPrice;
            sp[28].Value = model.LinPrice;
            sp[29].Value = model.Wholesales;
            sp[30].Value = model.Wholesaleone;
            sp[31].Value = model.Preset;
            sp[32].Value = model.Integral;
            sp[33].Value = model.Recommend;
            sp[34].Value = model.AllClickNum;
            sp[35].Value = model.UpdateTime;
            sp[36].Value = model.ModeTemplate;
            sp[37].Value = model.AddUser;
            sp[38].Value = model.DownCar;
            sp[39].Value = model.AddTime;
            sp[40].Value = model.TableName;
            sp[41].Value = model.Istrue;
            sp[42].Value = model.Isgood;
            sp[43].Value = model.Isnew;
            sp[44].Value = model.Ishot;
            sp[45].Value = model.Isbest;
            sp[46].Value = model.Wholesalesinfo;
            sp[47].Value = model.ItemID;
            sp[48].Value = model.ComModelID;
            sp[49].Value = model.Largess;
            sp[50].Value = model.IntegralNum;
            sp[51].Value = model.GuessXML;
            sp[52].Value = model.FirstNodeID;
            sp[53].Value = model.PointVal;
            sp[54].Value = model.BookPrice;
            sp[55].Value = model.UserType;
            sp[56].Value = model.UserPrice;
            sp[57].Value = model.FarePrice;
            sp[58].Value = model.ExpRemind;
            sp[59].Value = model.ParentID;
            sp[60].Value = model.UserID;
            sp[61].Value = model.UserShopID;
            sp[62].Value = model.BindIDS;
            sp[63].Value = model.OrderID;
            sp[64].Value = model.IDCPrice;
            sp[65].Value = model.Recycler;
            sp[66].Value = model.Quota_Json;
            sp[67].Value = model.DownQuota_Json;
            sp[68].Value = model.ShortProName;
            sp[69].Value = model.SpecialID;
            sp[70].Value = model.Addon;
            return(sp);
        }
Beispiel #2
0
        public M_Product GetModelFromReader(DataRow rdr)
        {
            M_Product model = new M_Product();

            model.ID             = Convert.ToInt32(rdr["ID"]);
            model.Class          = ConvertToInt(rdr["Class"]);
            model.Nodeid         = ConvertToInt(rdr["Nodeid"]);
            model.ModelID        = ConvertToInt(rdr["ModelID"]);
            model.AllClickNum    = ConvertToInt(rdr["AllClickNum"]);
            model.ProCode        = ConverToStr(rdr["ProCode"]);
            model.BarCode        = ConverToStr(rdr["BarCode"]);
            model.Proname        = ConverToStr(rdr["Proname"]);
            model.Kayword        = ConverToStr(rdr["Kayword"]);
            model.ProUnit        = ConverToStr(rdr["ProUnit"]);
            model.Weight         = ConverToDouble(rdr["Weight"]);
            model.ProClass       = ConvertToInt(rdr["ProClass"]);
            model.Properties     = ConvertToInt(rdr["Properties"]);
            model.Sales          = ConvertToInt(rdr["Sales"]);
            model.Proinfo        = ConverToStr(rdr["Proinfo"]);
            model.Procontent     = ConverToStr(rdr["Procontent"]);
            model.Clearimg       = ConverToStr(rdr["Clearimg"]);
            model.Thumbnails     = ConverToStr(rdr["Thumbnails"]);
            model.Producer       = ConverToStr(rdr["Producer"]);
            model.Brand          = ConverToStr(rdr["Brand"]);
            model.Allowed        = ConvertToInt(rdr["Allowed"]);
            model.Quota          = ConvertToInt(rdr["Quota"]);
            model.DownQuota      = ConvertToInt(rdr["DownQuota"]);
            model.Stock          = ConvertToInt(rdr["Stock"]);
            model.StockDown      = ConvertToInt(rdr["StockDown"]);
            model.Rate           = ConverToDouble(rdr["Rate"]);
            model.Rateset        = ConvertToInt(rdr["Rateset"]);
            model.Dengji         = ConvertToInt(rdr["Dengji"]);
            model.ShiPrice       = ConverToDouble(rdr["ShiPrice"]);
            model.LinPrice       = ConverToDouble(rdr["LinPrice"]);
            model.Wholesales     = ConvertToInt(rdr["Wholesales"]);
            model.Wholesaleone   = ConvertToInt(rdr["Wholesaleone"]);
            model.Preset         = ConverToStr(rdr["Preset"]);
            model.Integral       = ConvertToInt(rdr["Integral"]);
            model.Recommend      = ConvertToInt(rdr["Recommend"]);
            model.AllClickNum    = ConvertToInt(rdr["AllClickNum"]);
            model.UpdateTime     = ConvertToDate(rdr["UpdateTime"]);
            model.ModeTemplate   = ConverToStr(rdr["ModeTemplate"]);
            model.AddUser        = ConverToStr(rdr["AddUser"]);
            model.DownCar        = ConvertToInt(rdr["DownCar"]);
            model.AddTime        = ConvertToDate(rdr["AddTime"]);
            model.TableName      = ConverToStr(rdr["TableName"]);
            model.Istrue         = ConvertToInt(rdr["Istrue"]);
            model.Isgood         = ConvertToInt(rdr["Isgood"]);
            model.Isnew          = ConvertToInt(rdr["isnew"]);
            model.Ishot          = ConvertToInt(rdr["ishot"]);
            model.Isbest         = ConvertToInt(rdr["isbest"]);
            model.Wholesalesinfo = ConverToStr(rdr["Wholesalesinfo"]);
            model.ItemID         = ConvertToInt(rdr["ItemID"]);
            model.ComModelID     = ConvertToInt(rdr["ComModelID"]);
            model.Largess        = ConvertToInt(rdr["Largess"]);
            model.IntegralNum    = ConvertToInt(rdr["IntegralNum"]);
            model.GuessXML       = ConverToStr(rdr["GuessXML"]);
            model.OrderID        = ConvertToInt(rdr["OrderID"]);
            model.FirstNodeID    = ConvertToInt(rdr["FirstNodeID"]);
            model.PointVal       = ConverToDouble(rdr["PointVal"]);
            model.isStand        = ConvertToInt(rdr["isStand"]);
            model.UserShopID     = ConvertToInt(rdr["UserShopID"]);
            model.BookPrice      = ConverToDouble(rdr["BookPrice"]);
            model.UserType       = ConvertToInt(rdr["UserType"]);
            model.UserPrice      = ConverToStr(rdr["UserPrice"]);
            model.Recycler       = ConverToBool(rdr["Recycler"]);
            model.FarePrice      = ConverToStr(rdr["FarePrice"]);
            model.ExpRemind      = ConvertToInt(rdr["ExpRemind"]);
            model.ParentID       = ConvertToInt(rdr["ParentID"]);
            model.UserID         = ConvertToInt(rdr["UserID"]);
            model.BindIDS        = ConverToStr(rdr["BindIDS"]);
            model.IDCPrice       = ConverToStr(rdr["IDCPrice"]);
            model.Quota_Json     = ConverToStr(rdr["Quota_Json"]);
            model.DownQuota_Json = ConverToStr(rdr["DownQuota_Json"]);
            model.ShortProName   = ConverToStr(rdr["ShortProName"]);
            model.SpecialID      = ConverToStr(rdr["SpecialID"]);
            model.Addon          = ConverToStr(rdr["Addon"]);
            return(model);
        }