Пример #1
0
        public M_RoomMessage GetModelFromReader(DbDataReader rdr)
        {
            M_RoomMessage model = new M_RoomMessage();

            model.ID        = Convert.ToInt32(rdr["ID"]);
            model.SendID    = ConvertToInt(rdr["SendID"]);
            model.InceptID  = ConvertToInt(rdr["InceptID"]);
            model.Mcontent  = ConverToStr(rdr["Mcontent"]);
            model.Addtime   = ConvertToDate(rdr["Addtime"]);
            model.RestoreID = ConvertToInt(rdr["RestoreID"]);
            model.State     = ConvertToInt(rdr["State"]);
            rdr.Close();
            return(model);
        }
Пример #2
0
        public override SqlParameter[] GetParameters()
        {
            M_RoomMessage model = this;

            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.SendID;
            sp[2].Value = model.InceptID;
            sp[3].Value = model.Mcontent;
            sp[4].Value = model.Addtime;
            sp[5].Value = model.RestoreID;
            sp[6].Value = model.State;
            return(sp);
        }