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

            model.ID          = Convert.ToInt32(rdr["id"]);
            model.CateID      = Convert.ToInt32(rdr["CateID"]);
            model.Pid         = Convert.ToInt32(rdr["Pid"]);
            model.ReplyID     = Convert.ToInt32(rdr["ReplyID"]);
            model.ReplyUserID = Convert.ToInt32(rdr["ReplyUserID"]);
            model.Title       = rdr["Title"].ToString();
            model.MsgContent  = rdr["MsgContent"].ToString();
            model.IP          = ConverToStr(rdr["IP"]);
            model.ColledIDS   = ConverToStr(rdr["ColledIDS"]);
            model.MsgType     = ConvertToInt(rdr["MsgType"]);
            model.Status      = ConvertToInt(rdr["Status"]);
            model.CUser       = ConvertToInt(rdr["CUser"]);
            model.CUName      = ConverToStr(rdr["CUName"]);
            model.CDate       = ConvertToDate(rdr["CDate"]);
            model.SubTitle    = ConverToStr(rdr["SubTitle"]);
            model.PostFlag    = ConverToStr(rdr["PostFlag"]);
            model.Style       = ConverToStr(rdr["Style"]);
            model.OrderFlag   = ConvertToInt(rdr["OrderFlag"]);
            model.HitCount    = ConvertToInt(rdr["HitCount"]);
            model.IDCode      = ConverToStr(rdr["IDCode"]);
            model.LikeIDS     = ConverToStr(rdr["LikeIDS"]);
            model.R_CUser     = ConvertToInt(rdr["R_CUser"]);
            model.R_CUName    = ConverToStr(rdr["R_CUName"]);
            model.R_CDate     = ConvertToDate(rdr["R_CDate"]);
            model.Gid         = ConverToStr(rdr["Gid"]);
            rdr.Close();
            return(model);
        }
示例#2
0
        public override SqlParameter[] GetParameters()
        {
            M_Guest_Bar model = this;

            EmptyDeal();
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.CateID;
            sp[2].Value  = model.Pid;
            sp[3].Value  = model.ReplyID;
            sp[4].Value  = model.ReplyUserID;
            sp[5].Value  = model.Title;
            sp[6].Value  = model.MsgContent;
            sp[7].Value  = model.IP;
            sp[8].Value  = model.ColledIDS;
            sp[9].Value  = model.MsgType;
            sp[10].Value = model.Status;
            sp[11].Value = model.CUser;
            sp[12].Value = model.CUName;
            sp[13].Value = model.CDate;
            sp[14].Value = model.SubTitle;
            sp[15].Value = model.PostFlag;
            sp[16].Value = model.Style;
            sp[17].Value = model.OrderFlag;
            sp[18].Value = model.HitCount;
            sp[19].Value = model.IDCode;
            sp[20].Value = ConverToStr(model.LikeIDS);
            sp[21].Value = model.R_CUser;
            sp[22].Value = model.R_CUName;
            sp[23].Value = model.R_CDate;
            sp[24].Value = model.Gid;
            return(sp);
        }