コード例 #1
0
        public M_Shop_SuitPro GetModelFromReader(DbDataReader rdr)
        {
            M_Shop_SuitPro model = new M_Shop_SuitPro();

            model.ID      = ConvertToInt(rdr["ID"]);
            model.Name    = ConverToStr(rdr["Name"]);
            model.ProIDS  = ConverToStr(rdr["ProIDS"]);
            model.AdminID = ConvertToInt(rdr["AdminID"]);
            model.ZStatus = ConvertToInt(rdr["ZStatus"]);
            model.CDate   = ConvertToDate(rdr["CDate"]);
            model.Remind  = ConverToStr(rdr["Remind"]);
            rdr.Close();
            return(model);
        }
コード例 #2
0
        public override SqlParameter[] GetParameters()
        {
            M_Shop_SuitPro model = this;

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