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

            model.ID         = ConvertToInt(rdr["ID"]);
            model.Title      = ConverToStr(rdr["Title"]);
            model.MsgContent = ConverToStr(rdr["MsgContent"]);
            model.PushDevice = ConverToStr(rdr["PushDevice"]);
            model.PushTag    = ConverToStr(rdr["PushTag"]);
            model.PushAlias  = ConverToStr(rdr["PushAlias"]);
            model.PushPlat   = ConvertToInt(rdr["PushPlat"]);
            model.PushType   = ConverToStr(rdr["PushType"]);
            model.MsgType    = ConverToStr(rdr["MsgType"]);
            model.Remind     = ConverToStr(rdr["Remind"]);
            model.Result     = ConverToStr(rdr["Result"]);
            model.CDate      = ConvertToDate(rdr["CDate"]);
            rdr.Close();
            return(model);
        }
示例#2
0
        public override SqlParameter[] GetParameters()
        {
            M_Mobile_PushMsg model = this;

            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value  = model.ID;
            sp[1].Value  = model.Title;
            sp[2].Value  = model.MsgContent;
            sp[3].Value  = model.PushDevice;
            sp[4].Value  = model.PushTag;
            sp[5].Value  = model.PushAlias;
            sp[6].Value  = model.PushPlat;
            sp[7].Value  = model.PushType;
            sp[8].Value  = model.MsgType;
            sp[9].Value  = model.Remind;
            sp[10].Value = model.Result;
            sp[11].Value = model.CDate;
            return(sp);
        }