Beispiel #1
0
        public M_UAction GetModelFromReader(DbDataReader rdr)
        {
            M_UAction model = new M_UAction();

            model.ID      = Convert.ToInt32(rdr["ID"]);
            model.action  = ConverToStr(rdr["action"]);
            model.title   = ConverToStr(rdr["title"]);
            model.pageurl = ConverToStr(rdr["pageurl"]);
            model.ip      = ConverToStr(rdr["ip"]);
            model.uid     = ConvertToInt(rdr["uid"]);
            model.uname   = ConverToStr(rdr["uname"]);
            model.cdate   = ConvertToDate(rdr["cdate"]);
            model.idflag  = ConverToStr(rdr["idflag"]);
            rdr.Close();
            return(model);
        }
Beispiel #2
0
        public override SqlParameter[] GetParameters()
        {
            M_UAction model = this;

            if (model.cdate <= DateTime.MinValue)
            {
                model.cdate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.action;
            sp[2].Value = model.title;
            sp[3].Value = model.pageurl;
            sp[4].Value = model.ip;
            sp[5].Value = model.uid;
            sp[6].Value = model.uname;
            sp[7].Value = model.cdate;
            sp[8].Value = model.idflag;
            return(sp);
        }