コード例 #1
0
        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;
            }
        }
コード例 #2
0
    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;
        }
    }