예제 #1
0
        public M_Templata GetModelFromReader(DbDataReader rdr)
        {
            M_Templata model = new M_Templata();

            model.TemplateID      = Convert.ToInt32(rdr["TemplateID"]);
            model.TemplateName    = ConverToStr(rdr["TemplateName"]);
            model.TemplateUrl     = ConverToStr(rdr["TemplateUrl"]);
            model.TemplateType    = ConvertToInt(rdr["TemplateType"]);
            model.OpenType        = ConverToStr(rdr["OpenType"]);
            model.UserGroup       = ConverToStr(rdr["UserGroup"]);
            model.Addtime         = ConvertToDate(rdr["Addtime"]);
            model.IsTrue          = ConvertToInt(rdr["IsTrue"]);
            model.UserID          = ConvertToInt(rdr["Userid"]);
            model.Username        = ConverToStr(rdr["UserName"]);
            model.OrderID         = ConvertToInt(rdr["OrderID"]);
            model.ParentID        = ConvertToInt(rdr["ParentID"]);
            model.Modelinfo       = ConverToStr(rdr["Modelinfo"]);
            model.Identifiers     = ConverToStr(rdr["identifiers"]);
            model.NodeFileEx      = ConverToStr(rdr["NodeFileEx"]);
            model.ContentFileEx   = ConverToStr(rdr["ContentFileEx"]);
            model.Nodeimgurl      = ConverToStr(rdr["Nodeimgurl"]);
            model.Nodeimgtext     = ConverToStr(rdr["Nodeimgtext"]);
            model.Pagecontent     = ConverToStr(rdr["Pagecontent"]);
            model.PageMetakeyword = ConverToStr(rdr["PageMetakeyword"]);
            model.PageMetakeyinfo = ConverToStr(rdr["PageMetakeyinfo"]);
            model.Linkurl         = ConverToStr(rdr["linkurl"]);
            model.Linkimg         = ConverToStr(rdr["linkimg"]);
            model.Linktxt         = ConverToStr(rdr["linktxt"]);
            model.ParentNode      = ConvertToInt(rdr["ParentNode"]);
            model.NeedAudit       = ConvertToInt(rdr["NeedAudit"]);
            rdr.Close();
            return(model);
        }
예제 #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Templata model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.TemplateID;
            sp[1].Value  = model.TemplateName;
            sp[2].Value  = model.TemplateUrl;
            sp[3].Value  = model.TemplateType;
            sp[4].Value  = model.OpenType;
            sp[5].Value  = model.UserGroup;
            sp[6].Value  = model.Addtime;
            sp[7].Value  = model.IsTrue;
            sp[8].Value  = model.UserID;
            sp[9].Value  = model.Username;
            sp[10].Value = model.OrderID;
            sp[11].Value = model.ParentID;
            sp[12].Value = model.Modelinfo;
            sp[13].Value = model.Identifiers;
            sp[14].Value = model.NodeFileEx;
            sp[15].Value = model.ContentFileEx;
            sp[16].Value = model.Nodeimgurl;
            sp[17].Value = model.Nodeimgtext;
            sp[18].Value = model.Pagecontent;
            sp[19].Value = model.PageMetakeyword;
            sp[20].Value = model.PageMetakeyinfo;
            sp[21].Value = model.Linkurl;
            sp[22].Value = model.Linkimg;
            sp[23].Value = model.Linktxt;
            sp[24].Value = model.ParentNode;
            sp[25].Value = model.NeedAudit;
            return(sp);
        }