public int Update_Discount(DiscountZone discountZone)
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.UpdateDiscountCoupon(discountZone));
            }
        }
        catch
        {
            throw;
        }
    }
    public int Ad_Store(DiscountZone discountZone)
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.InsertDiscountStore(discountZone));
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable LoadList_DZ_Top5_Discount()
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.LoadList_DZ_Top5_Discount());
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable LoadListRecentDiscountHomePage()
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.LoadListRecentDiscountHomePage());
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable Load_ListComments(DiscountZone discountZone)
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.Load_ListComments(discountZone));
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable Load_WonCouponPrintingInformation(DiscountZone discountZone)
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.Load_WonCouponPrintingInformation(discountZone));
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable Load_DiscountByCategory(DiscountZone discountZone)
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.Load_DiscountByCategory(discountZone));
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable LoadDiscuntSoreType(DiscountZone discountZone)
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.LoadDiscuntSoreType(discountZone));
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable Load_RightPanelPopularCouponAndDealCategoriesCount()
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.Load_RightPanelPopularCouponAndDealCategoriesCount());
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable LoadRecord_BS_SpecificDiscount(DiscountZone discountZone)
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.LoadRecord_BS_SpecificDiscount(discountZone));
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable Load_RightPanelFeaturedStores()
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.Load_RightPanelFeaturedStores());
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable LoadDiscountListLeftPannel()
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.LoadDiscountListLeftPannel());
            }
        }
        catch
        {
            throw;
        }
    }
    public DataTable GenerateCouponCode()
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.GenerateCouponCode());
            }
        }
        catch
        {
            throw;
        }
    }
    public int AdSubcriptionEmailAddress(DiscountZone discountZone)
    {
        int _ActionResult = -1;

        try
        {
            using (BC_DiscountZone bc = new BC_DiscountZone())
            {
                return(bc.AdSubcriptionEmailAddress(discountZone));
            }
        }
        catch
        {
            throw;
        }
    }
Esempio n. 15
0
    /// <summary>
    /// Increments a productsReview HitCounterField.
    /// </summary>
    /// <param name="objProduct"></param>
    /// <returns></returns>
    public bool IncrementDiscountCounter(int _ProfileID, int _CouponID)
    {
        int _ActionResult = -1;

        if (!this.IsAlreadyUpdated(_ProfileID, _CouponID))
        {
            try
            {
                using (BC_DiscountZone bc = new BC_DiscountZone())
                {
                    _ActionResult = bc.IncrementDiscountCounter(_ProfileID, _CouponID);
                    if (_ActionResult > 0)
                    {
                        this.KeepTrackOfHitCounter(_ProfileID, _CouponID);
                    }
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
        return(_ActionResult > 0 ? true : false);
    }