Ejemplo n.º 1
0
        public M_Design_Page GetModelFromReader(DataRow rdr)
        {
            M_Design_Page model = new M_Design_Page();

            model.ID       = Convert.ToInt32(rdr["ID"]);
            model.guid     = ConverToStr(rdr["Guid"]);
            model.page     = ConverToStr(rdr["page"]);
            model.comp     = ConverToStr(rdr["comp"]);
            model.CDate    = ConvertToDate(rdr["CDate"]);
            model.UPDate   = ConvertToDate(rdr["UPDate"]);
            model.UserID   = ConvertToInt(rdr["UserID"]);
            model.UserName = ConverToStr(rdr["UserName"]);
            model.Remind   = ConverToStr(rdr["Remind"]);
            model.labelArr = ConverToStr(rdr["labelArr"]);
            model.Title    = ConverToStr(rdr["Title"]);
            model.Meta     = ConverToStr(rdr["Meta"]);
            model.Resource = ConverToStr(rdr["Resource"]);
            model.Path     = ConverToStr(rdr["Path"]);
            model.ZType    = ConvertToInt(rdr["ZType"]);
            model.TlpID    = ConvertToInt(rdr["TlpID"]);
            model.SiteID   = ConvertToInt(rdr["SiteID"]);
            model.OrderID  = ConvertToInt(rdr["OrderID"]);
            //场景专用
            model.PreviewImg = ConverToStr(rdr["PreviewImg"]);
            model.ThumbImg   = ConverToStr(rdr["ThumbImg"]);
            model.scence     = ConverToStr(rdr["scence"]);
            model.Status     = ConvertToInt(rdr["Status"]);
            model.Score      = ConverToDouble(rdr["Score"]);
            model.Seflag     = ConverToStr(rdr["Seflag"]);
            model.CUser      = ConvertToInt(rdr["CUser"]);
            model.AccessPwd  = ConverToStr(rdr["AccessPwd"]);
            //站点专用
            return(model);
        }
Ejemplo n.º 2
0
        public override SqlParameter[] GetParameters()
        {
            M_Design_Page model = this;

            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            if (model.UPDate <= DateTime.MinValue)
            {
                model.UPDate = DateTime.Now;
            }
            if (string.IsNullOrEmpty(model.Title))
            {
                model.Title = "页面_" + DateTime.Now.ToString("yyyyMMdd");
            }
            if (string.IsNullOrEmpty(model.guid))
            {
                model.guid = System.Guid.NewGuid().ToString();
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.guid;
            sp[2].Value  = model.page;
            sp[3].Value  = model.comp;
            sp[4].Value  = model.CDate;
            sp[5].Value  = model.UPDate;
            sp[6].Value  = model.UserID;
            sp[7].Value  = model.UserName;
            sp[8].Value  = model.Remind;
            sp[9].Value  = model.labelArr;
            sp[10].Value = model.Title;
            sp[11].Value = model.Meta;
            sp[12].Value = model.Resource;
            sp[13].Value = model.Path;
            sp[14].Value = model.ZType;
            sp[15].Value = model.TlpID;
            sp[16].Value = model.SiteID;
            sp[17].Value = model.OrderID;
            sp[18].Value = model.scence;
            sp[19].Value = model.PreviewImg;
            sp[20].Value = model.ThumbImg;
            sp[21].Value = model.Status;
            sp[22].Value = model.Score;
            sp[23].Value = model.Seflag;
            sp[24].Value = model.CUser;
            sp[25].Value = model.AccessPwd;
            return(sp);
        }