Example #1
0
        /// <summary>
        /// 领取优惠券
        /// </summary>
        public int ReceiveCoupons(CouponReceivingRecord entity)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("InsertCouponReceivingRecord");

            //DataCommand cmd = new DataCommand("InsertCouponReceivingRecord");
            cmd.SetParameter <CouponReceivingRecord>(entity);
            int result = cmd.ExecuteScalar <int>();

            return(result);
        }
Example #2
0
        /// 获取单个Coupon信息
        /// </summary>
        public CouponReceivingRecord LoadCouponReceivingRecord(int sysNo, int userSysNo)
        {
            IDataCommand cmd = IocManager.Instance.Resolve <IDataCommand>();

            cmd.CreateCommand("LoadCouponReceivingRecord");

            //DataCommand cmd = new DataCommand("LoadCouponReceivingRecord");
            cmd.SetParameter("@CouponSysNo", DbType.Int32, sysNo);
            cmd.SetParameter("@UserSysNo", DbType.Int32, userSysNo);
            CouponReceivingRecord result = cmd.ExecuteEntity <CouponReceivingRecord>();

            return(result);
        }