示例#1
0
        public M_PageReg GetModelFromReader(DbDataReader rdr)
        {
            M_PageReg model = new M_PageReg();

            model.ID               = Convert.ToInt32(rdr["ID"]);
            model.CompanyName      = rdr["CompanyName"].ToString();
            model.PageTitle        = rdr["PageTitle"].ToString();
            model.Keyword          = rdr["Keyword"].ToString();
            model.Description      = rdr["Description"].ToString();
            model.LOGO             = rdr["LOGO"].ToString();
            model.Domain           = rdr["Domain"].ToString();
            model.Style            = Convert.ToInt32(rdr["Style"].ToString());
            model.NodeStyle        = Convert.ToInt32(rdr["NodeStyle"].ToString());
            model.NavHeight        = rdr["NavHeight"].ToString();
            model.NavColor         = rdr["NavColor"].ToString();
            model.NavBackground    = rdr["NavBackground"].ToString();
            model.TableName        = rdr["TableName"].ToString();
            model.Hits             = Convert.ToInt32(rdr["Hits"].ToString());
            model.InfoID           = Convert.ToInt32(rdr["InfoID"].ToString());
            model.Recommendation   = rdr["Recommendation"].ToString();
            model.Status           = Convert.ToInt32(rdr["Status"].ToString());
            model.UserID           = Convert.ToInt32(rdr["UserID"].ToString());
            model.UserName         = rdr["UserName"].ToString();
            model.ParentPageID     = Convert.ToInt32(rdr["ParentPageID"].ToString());
            model.ParentPageUserID = Convert.ToInt32(rdr["ParentPageUserID"].ToString());
            model.PageInfo         = rdr["PageInfo"].ToString();
            model.TopWords         = rdr["TopWords"].ToString();
            model.BottonWords      = rdr["BottonWords"].ToString();
            model.CreationTime     = Convert.ToDateTime(rdr["CreationTime"]);
            model.UpdateTime       = Convert.ToDateTime(rdr["UpdateTime"]);
            model.Template         = rdr["Template"].ToString();
            model.ModelID          = Convert.ToInt32(rdr["ModelID"]);
            rdr.Close();
            return(model);
        }
示例#2
0
        public override SqlParameter[] GetParameters()
        {
            M_PageReg model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.CompanyName;
            sp[2].Value  = model.PageTitle;
            sp[3].Value  = model.Keyword;
            sp[4].Value  = model.Description;
            sp[5].Value  = model.LOGO;
            sp[6].Value  = model.Domain;
            sp[7].Value  = model.Style;
            sp[8].Value  = model.NodeStyle;
            sp[9].Value  = model.NavHeight;
            sp[10].Value = model.NavColor;
            sp[11].Value = model.NavBackground;
            sp[12].Value = model.TableName;
            sp[13].Value = model.Hits;
            sp[14].Value = model.InfoID;
            sp[15].Value = model.Recommendation;
            sp[16].Value = model.Status;
            sp[17].Value = model.UserID;
            sp[18].Value = model.UserName;
            sp[19].Value = model.ParentPageID;
            sp[20].Value = model.ParentPageUserID;
            sp[21].Value = model.PageInfo;
            sp[22].Value = model.TopWords;
            sp[23].Value = model.BottonWords;
            sp[24].Value = model.CreationTime;
            sp[25].Value = model.UpdateTime;
            sp[26].Value = model.Template;
            sp[27].Value = model.ModelID;
            return(sp);
        }