public void UpdateCouponUser(int couponUserID, int couponStatusID, int storeID, int portalID, string cultureName)
 {
     try
     {
         CouponManageSQLProvider cmSQLProvider = new CouponManageSQLProvider();
         cmSQLProvider.UpdateCouponUser(couponUserID, couponStatusID, storeID, portalID, cultureName);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public List<CouponUserListInfo> GetCouponUserList(int offset, int limit, int couponID, string couponCode, string userName, System.Nullable<int> couponStatusID, int storeID, int portalID, string cultureName)
 {
     try
     {
         CouponManageSQLProvider cmSQLProvider = new CouponManageSQLProvider();
         return cmSQLProvider.GetCouponUserList(offset, limit, couponID, couponCode, userName, couponStatusID, storeID, portalID, cultureName);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public void DeleteCouponUser(string couponUserID, int storeID, int portalID, string userName)
        {
            try
            {
                CouponManageSQLProvider cmSQLProvider = new CouponManageSQLProvider();
                cmSQLProvider.DeleteCouponUser(couponUserID, storeID, portalID, userName);
            }
            catch (Exception ex)
            {
                throw ex;
            }

        }
 public void UpdateCouponUserRecord(string couponCode, int storeID, int portalID, string userName)
 {
     try
     {
         CouponManageSQLProvider cmSQLProvider = new CouponManageSQLProvider();
         cmSQLProvider.UpdateCouponUserRecord(couponCode, storeID, portalID, userName);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public List<CouponUserInfo> GetCouponUserDetails(int offset, System.Nullable<int> limit, string couponCode, string userName, System.Nullable<int> couponStatusId, string validFrom, string validTo, int storeId, int portalId, string cultureName)
 {
     try
     {
         CouponManageSQLProvider cmSQLProvider = new CouponManageSQLProvider();
         return cmSQLProvider.GetCouponUserDetails(offset, limit, couponCode, userName, couponStatusId, validFrom, validTo, storeId, portalId, cultureName);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public List<CouponPortalUserListInfo> GetPortalUsersByCouponID(int offset, int limit, int couponID, int storeID, int portalID, string customerName, string cultureName)
 {
     try
     {
         CouponManageSQLProvider cmSqlProvider = new CouponManageSQLProvider();
         return cmSqlProvider.GetPortalUsersList(offset, limit, couponID, storeID, portalID, customerName, cultureName);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public CouponVerificationInfo VerifyCouponCode(decimal totalCost, string couponCode, int storeID, int portalID, string userName, int appliedCount)
 {
     try
     {
         CouponManageSQLProvider cmSqlProvider = new CouponManageSQLProvider();
         CouponVerificationInfo info = cmSqlProvider.VerifyUserCoupon(totalCost, couponCode, storeID, portalID, userName, appliedCount);
         return info;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public List<CouponStatusInfo> GetCouponStatus()
 {
     try
     {
         CouponManageSQLProvider cmSqlProvider = new CouponManageSQLProvider();
         return cmSqlProvider.BindCouponStatus();
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public List<CouponSettingKeyValueInfo> GetSettinKeyValueByCouponID(int couponID, int storeID, int portalID)
 {
     try
     {
         CouponManageSQLProvider cmSqlProvider = new CouponManageSQLProvider();
         return cmSqlProvider.GetCouponSettingKeyValueInfo(couponID, storeID, portalID);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public string AddUpdateCouponDetails(int couponID, int couponTypeID, string couponCode, string couponAmount, string validateFrom, string validateTo,
                                             string isActive, int storeID, int portalID, string cultureName, string userName, string settingIDs, string settingValues,
                                             string portalUserCustomerName, string portalUserEmailID, string portalUserUserName, string senderEmail, string subject, ArrayList messageBody)
        {
            string checkMessage = string.Empty;
            try
            {
                CouponManageSQLProvider cmSQLProvider = new CouponManageSQLProvider();
                try
                {
                    cmSQLProvider.AddUpdateCoupons(couponID, couponTypeID, couponCode, couponAmount, validateFrom,
                                                   validateTo, isActive, storeID, portalID, cultureName, userName,
                                                   settingIDs, settingValues, portalUserUserName);
                    checkMessage += "dataSave" + ",";
                }
                catch (Exception)
                {
                    checkMessage += "dataSaveFail" + ",";
                }

                if (checkMessage == "dataSave,")
                {
                    if (portalUserEmailID != "")
                    {
                        try
                        {
                            cmSQLProvider.SendCouponCodeEmail(senderEmail, portalUserEmailID, subject, messageBody);
                            checkMessage += "emailSend";
                        }
                        catch (Exception)
                        {
                            checkMessage += "emailSendFail";
                        }
                    }
                    else
                    {
                        checkMessage += "emailIDBlank";
                    }
                }
                else
                {
                    checkMessage += "emailSendFail";
                }

                return checkMessage;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        public List<CouponInfo> GetCouponDetails(int offset, int limit, System.Nullable<int> couponTypeID, string couponCode, System.Nullable<DateTime> validateFrom, System.Nullable<DateTime> validateTo, int storeId, int portalId, string cultureName)
        {
            try
            {
                CouponManageSQLProvider cmSQLProvider = new CouponManageSQLProvider();
                return cmSQLProvider.BindAllCouponDetails(offset, limit, couponTypeID, couponCode, validateFrom, validateTo, storeId, portalId, cultureName);

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
示例#12
0
        public void ReduceCouponUsed(string couponCode, int storeID, int portalID, string userName, int orderID)
        {
            CouponManageSQLProvider csm = new CouponManageSQLProvider();

            csm.UpdateCouponUserRecord(couponCode, storeID, portalID, userName, orderID);
        }
 public void ReduceCouponUsed(string couponCode,int storeID,int portalID,string userName)
 {
     CouponManageSQLProvider csm = new CouponManageSQLProvider();
     csm.UpdateCouponUserRecord(couponCode, storeID, portalID, userName);
 }
    public void AddUpdateCouponDetails(int couponID, int couponTypeID, string couponCode, string couponAmount, string validateFrom, string validateTo,
         string isActive, int storeID, int portalID, string cultureName, string userName, string settingIDs, string settingValues,
         string PortalUser_CustomerName, string PortalUser_EmailID, string PortalUser_UserName, string SenderEmail, string Subject, ArrayList MessageBody)
    {
        try
        {
            CouponManageSQLProvider cmSQLProvider = new CouponManageSQLProvider();
            cmSQLProvider.AddUpdateCoupons(couponID, couponTypeID, couponCode, couponAmount, validateFrom, validateTo, isActive, storeID, portalID, cultureName, userName, settingIDs, settingValues, PortalUser_UserName);
            if (PortalUser_EmailID != "")
            {
                cmSQLProvider.SendCouponCodeEmail(SenderEmail, PortalUser_EmailID, Subject, MessageBody);
            }

        }
        catch (Exception ex)
        {
            throw ex;
        }
    }