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

            model.AID             = Convert.ToInt32(rdr["AID"]);
            model.ActiveUserID    = ConvertToInt(rdr["ActiveUserID"]);
            model.ActiveTitle     = ConverToStr(rdr["ActiveTitle"]);
            model.ActiveContext   = ConverToStr(rdr["ActiveContext"]);
            model.ActiveStateTime = ConvertToDate(rdr["ActiveStateTime"]);
            model.ActiveEndTime   = ConvertToDate(rdr["ActiveEndTime"]);
            model.ActiveAddTime   = ConvertToDate(rdr["ActiveAddTime"]);
            model.ActivePic       = ConverToStr(rdr["ActivePic"]);
            model.RoomID          = ConvertToInt(rdr["RoomID"]);
            rdr.Close();
            rdr.Dispose();
            return(model);
        }
示例#2
0
        public override SqlParameter[] GetParameters()
        {
            M_RoomActive model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value = model.AID;
            sp[1].Value = model.ActiveUserID;
            sp[2].Value = model.ActiveTitle;
            sp[3].Value = model.ActiveContext;
            sp[4].Value = model.ActiveStateTime;
            sp[5].Value = model.ActiveEndTime;
            sp[6].Value = model.ActiveAddTime;
            sp[7].Value = model.ActivePic;
            sp[8].Value = model.RoomID;


            return(sp);
        }