Exemple #1
0
 private bool Update()
 {
     return(DBCouponAppliedToItem.Update(
                this.guid,
                this.couponID,
                this.itemID,
                this.appliedType,
                this.usePercentage,
                this.discount,
                this.giftType,
                this.giftProducts,
                this.giftCustomProducts));
 }
Exemple #2
0
        private bool Create()
        {
            this.guid = Guid.NewGuid();

            int rowsAffected = DBCouponAppliedToItem.Create(
                this.guid,
                this.couponID,
                this.itemID,
                this.appliedType,
                this.usePercentage,
                this.discount,
                this.giftType,
                this.giftProducts,
                this.giftCustomProducts);

            return(rowsAffected > 0);
        }
Exemple #3
0
 private void GetCouponAppliedToItem(Guid guid)
 {
     using (IDataReader reader = DBCouponAppliedToItem.GetOne(guid))
     {
         if (reader.Read())
         {
             this.guid               = new Guid(reader["Guid"].ToString());
             this.couponID           = Convert.ToInt32(reader["CouponID"]);
             this.itemID             = Convert.ToInt32(reader["ItemID"]);
             this.appliedType        = Convert.ToInt32(reader["AppliedType"]);
             this.usePercentage      = Convert.ToBoolean(reader["UsePercentage"]);
             this.discount           = Convert.ToDecimal(reader["Discount"]);
             this.giftType           = Convert.ToInt32(reader["GiftType"]);
             this.giftProducts       = reader["GiftProducts"].ToString();
             this.giftCustomProducts = reader["GiftCustomProducts"].ToString();
         }
     }
 }
Exemple #4
0
        public static List <CouponAppliedToItem> GetByCoupon(int couponId, int appliedType)
        {
            IDataReader reader = DBCouponAppliedToItem.GetByCoupon(couponId, appliedType);

            return(LoadListFromReader(reader));
        }
Exemple #5
0
 public static bool DeleteByCoupon(int couponId)
 {
     return(DBCouponAppliedToItem.DeleteByCoupon(couponId));
 }
Exemple #6
0
 public static bool Delete(Guid guid)
 {
     return(DBCouponAppliedToItem.Delete(guid));
 }