Exemple #1
0
        public M_Page GetModelFromReader(DbDataReader rdr)
        {
            M_Page model = new M_Page();

            model.ID             = Convert.ToInt32(rdr["ID"]);
            model.Proname        = rdr["Proname"].ToString();
            model.PageTitle      = rdr["PageTitle"].ToString();
            model.KeyWords       = rdr["KeyWords"].ToString();
            model.Description    = rdr["Description"].ToString();
            model.LOGO           = rdr["LOGO"].ToString();
            model.Domain         = rdr["Domain"].ToString();
            model.Style          = Convert.ToInt32(rdr["Style"]);
            model.HeadHeight     = Convert.ToInt32(rdr["HeadHeight"]);
            model.HeadColor      = rdr["HeadColor"].ToString();
            model.CommonModelID  = Convert.ToInt32(rdr["CommonModelID"]);
            model.TableName      = rdr["TableName"].ToString();
            model.Hits           = Convert.ToInt32(rdr["Hits"]);
            model.InfoID         = Convert.ToInt32(rdr["InfoID"]);
            model.Best           = Convert.ToInt32(rdr["Best"]);
            model.Status         = Convert.ToInt32(rdr["Status"]);
            model.UserID         = Convert.ToInt32(rdr["UserID"]);
            model.UserName       = rdr["UserName"].ToString();
            model.ParentPageID   = Convert.ToInt32(rdr["ParentPageID"]);
            model.ParentUserID   = Convert.ToInt32(rdr["ParentUserID"]);
            model.PageInfo       = rdr["PageInfo"].ToString();
            model.TopWords       = rdr["TopWords"].ToString();
            model.BottonWords    = rdr["BottonWords"].ToString();
            model.CreateTime     = Convert.ToDateTime(rdr["CreateTime"]);
            model.NodeStyle      = Convert.ToInt32(rdr["NodeStyle"]);
            model.HeadBackGround = rdr["HeadBackGround"].ToString();
            rdr.Close();
            return(model);
        }
Exemple #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Page model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.Proname;
            sp[2].Value  = model.PageTitle;
            sp[3].Value  = model.KeyWords;
            sp[4].Value  = model.Description;
            sp[5].Value  = model.LOGO;
            sp[6].Value  = model.Domain;
            sp[7].Value  = model.Style;
            sp[8].Value  = model.HeadHeight;
            sp[9].Value  = model.HeadColor;
            sp[10].Value = model.CommonModelID;
            sp[11].Value = model.TableName;
            sp[12].Value = model.Hits;
            sp[13].Value = model.InfoID;
            sp[14].Value = model.Best;
            sp[15].Value = model.Status;
            sp[16].Value = model.UserID;
            sp[17].Value = model.UserName;
            sp[18].Value = model.ParentPageID;
            sp[19].Value = model.ParentUserID;
            sp[20].Value = model.PageInfo;
            sp[21].Value = model.TopWords;
            sp[22].Value = model.BottonWords;
            sp[23].Value = model.CreateTime;
            sp[24].Value = model.NodeStyle;
            sp[25].Value = model.HeadBackGround;
            return(sp);
        }