Ejemplo n.º 1
0
        public int SetCouponAsActived(IDbTransaction tran, uint uiID, DateTime startDate, DateTime expDate,
                                      DateTime actDate, uint uiCustomerId)
        {
            int result = -1;

            try
            {
                CmpMoneyOffCouponsDB cmp = new CmpMoneyOffCouponsDB();

                result = cmp.UpdateState(tran, uiID, (int)CmpMoneyOffCouponsDB.MoneyOffCouponsStates.Actived, startDate, expDate, actDate, DateTime.MinValue, DateTime.MinValue, uiCustomerId, "", -1);
            }
            catch
            {
            }

            return(result);
        }
Ejemplo n.º 2
0
        public int SetCouponAsCancelled(IDbTransaction tran, uint uiID, DateTime cancelDate)
        {
            int result = -1;

            try
            {
                CmpMoneyOffCouponsDB cmp = new CmpMoneyOffCouponsDB();

                result = cmp.UpdateState(tran, uiID, (int)CmpMoneyOffCouponsDB.MoneyOffCouponsStates.Cancelled, DateTime.MinValue,
                                         DateTime.MinValue, DateTime.MinValue, DateTime.MinValue, cancelDate, 0,
                                         "", -1);
            }
            catch
            {
            }

            return(result);
        }
Ejemplo n.º 3
0
        public int SetCouponAsUsed(IDbTransaction tran, uint uiID, DateTime useDate, string strUsePlate, int iDPayId)
        {
            int result = -1;

            try
            {
                CmpMoneyOffCouponsDB cmp = new CmpMoneyOffCouponsDB();

                result = cmp.UpdateState(tran, uiID, (int)CmpMoneyOffCouponsDB.MoneyOffCouponsStates.Used, DateTime.MinValue,
                                         DateTime.MinValue, DateTime.MinValue, useDate, DateTime.MinValue, 0,
                                         strUsePlate, iDPayId);
            }
            catch
            {
            }

            return(result);
        }