Example #1
0
        public M_Shop_PrintTlp GetModelFromReader(DbDataReader rdr)
        {
            M_Shop_PrintTlp model = new M_Shop_PrintTlp();

            model.ID      = Convert.ToInt32(rdr["ID"]);
            model.Alias   = ConverToStr(rdr["Alias"]);
            model.Content = ConverToStr(rdr["Content"]);
            model.Remind  = ConverToStr(rdr["Remind"]);
            model.AdminID = Convert.ToInt32(rdr["AdminID"]);
            model.CDate   = ConvertToDate(rdr["CDate"]);
            return(model);
        }
Example #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Shop_PrintTlp model = this;

            if (CDate <= DateTime.MinValue)
            {
                CDate = DateTime.Now;
            }
            SqlParameter[] sp = GetSP();
            sp[0].Value = model.ID;
            sp[1].Value = model.Alias;
            sp[2].Value = model.Content;
            sp[3].Value = model.Remind;
            sp[4].Value = model.AdminID;
            sp[5].Value = model.CDate;
            return(sp);
        }