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

            model.ID          = ConvertToInt(rdr["ID"]);
            model.Alias       = ConverToStr(rdr["Alias"]);
            model.PreviewImg  = ConverToStr(rdr["PreviewImg"]);
            model.LogoContent = ConverToStr(rdr["LogoContent"]);
            model.ZStatus     = ConvertToInt(rdr["ZStatus"]);
            model.ZType       = ConvertToInt(rdr["ZType"]);
            model.AdminID     = ConvertToInt(rdr["AdminID"]);
            model.UserID      = ConvertToInt(rdr["UserID"]);
            model.UserName    = ConverToStr(rdr["UserName"]);
            model.CDate       = ConvertToDate(rdr["CDate"]);
            rdr.Close();
            return(model);
        }
Example #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Logo_Design model = this;

            SqlParameter[] sp = GetSP();
            if (model.CDate <= DateTime.MinValue)
            {
                model.CDate = DateTime.Now;
            }
            sp[0].Value = model.ID;
            sp[1].Value = model.Alias;
            sp[2].Value = model.PreviewImg;
            sp[3].Value = model.LogoContent;
            sp[4].Value = model.ZStatus;
            sp[5].Value = model.ZType;
            sp[6].Value = model.AdminID;
            sp[7].Value = model.UserID;
            sp[8].Value = model.UserName;
            sp[9].Value = model.CDate;
            return(sp);
        }