コード例 #1
0
        public void AddUpdateCoupons(CouponSaveObj couponSaveObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
                parameter.Add(new KeyValuePair <string, object>("@CouponID", couponSaveObj.CouponID));
                parameter.Add(new KeyValuePair <string, object>("@CouponTypeID", couponSaveObj.CouponTypeID));
                parameter.Add(new KeyValuePair <string, object>("@CouponCode", couponSaveObj.CouponCode));
                parameter.Add(new KeyValuePair <string, object>("@CouponAmount", couponSaveObj.CouponAmount));
                parameter.Add(new KeyValuePair <string, object>("@IsPercentage", couponSaveObj.IsPercentage));
                parameter.Add(new KeyValuePair <string, object>("@ValidateFrom", couponSaveObj.ValidateFrom));
                parameter.Add(new KeyValuePair <string, object>("@ValidateTo", couponSaveObj.ValidateTo));
                parameter.Add(new KeyValuePair <string, object>("@IsActive", couponSaveObj.IsActive));
                parameter.Add(new KeyValuePair <string, object>("@SettingIDs", couponSaveObj.SettingIDs));
                parameter.Add(new KeyValuePair <string, object>("@SettingValues", couponSaveObj.SettingValues));
                parameter.Add(new KeyValuePair <string, object>("@PortalUser_UserName", couponSaveObj.PortalUser_UserName));

                parameter.Add(new KeyValuePair <string, object>("@StoreID", aspxCommonObj.StoreID));
                parameter.Add(new KeyValuePair <string, object>("@PortalID", aspxCommonObj.PortalID));
                parameter.Add(new KeyValuePair <string, object>("@CultureName", aspxCommonObj.CultureName));
                parameter.Add(new KeyValuePair <string, object>("@UserName", aspxCommonObj.UserName));
                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateCoupons", parameter);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #2
0
        public void AddUpdateCoupons(CouponSaveObj couponSaveObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
                parameter.Add(new KeyValuePair<string, object>("@CouponID", couponSaveObj.CouponID));
                parameter.Add(new KeyValuePair<string, object>("@CouponTypeID", couponSaveObj.CouponTypeID));
                parameter.Add(new KeyValuePair<string, object>("@CouponCode", couponSaveObj.CouponCode));
                parameter.Add(new KeyValuePair<string, object>("@CouponAmount", couponSaveObj.CouponAmount));
                parameter.Add(new KeyValuePair<string, object>("@IsPercentage", couponSaveObj.IsPercentage));
                parameter.Add(new KeyValuePair<string, object>("@ValidateFrom", couponSaveObj.ValidateFrom));
                parameter.Add(new KeyValuePair<string, object>("@ValidateTo", couponSaveObj.ValidateTo));
                parameter.Add(new KeyValuePair<string, object>("@IsActive", couponSaveObj.IsActive));
                parameter.Add(new KeyValuePair<string, object>("@SettingIDs", couponSaveObj.SettingIDs));
                parameter.Add(new KeyValuePair<string, object>("@SettingValues", couponSaveObj.SettingValues));
                parameter.Add(new KeyValuePair<string, object>("@PortalUser_UserName", couponSaveObj.PortalUser_UserName));

                parameter.Add(new KeyValuePair<string, object>("@StoreID", aspxCommonObj.StoreID));
                parameter.Add(new KeyValuePair<string, object>("@PortalID", aspxCommonObj.PortalID));
                parameter.Add(new KeyValuePair<string, object>("@CultureName", aspxCommonObj.CultureName));
                parameter.Add(new KeyValuePair<string, object>("@UserName", aspxCommonObj.UserName));
                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateCoupons", parameter);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
コード例 #3
0
 public static void AddUpdateCoupons(CouponSaveObj couponSaveObj, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         AspxCouponManageProvider.AddUpdateCoupons(couponSaveObj, aspxCommonObj);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #4
0
 public static void AddUpdateCoupons(CouponSaveObj couponSaveObj, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("CouponID", couponSaveObj.CouponID));
         parameter.Add(new KeyValuePair <string, object>("CouponTypeID", couponSaveObj.CouponTypeID));
         parameter.Add(new KeyValuePair <string, object>("CouponCode", couponSaveObj.CouponCode));
         parameter.Add(new KeyValuePair <string, object>("CouponAmount", couponSaveObj.CouponAmount));
         parameter.Add(new KeyValuePair <string, object>("IsPercentage", couponSaveObj.IsPercentage));
         parameter.Add(new KeyValuePair <string, object>("ValidateFrom", couponSaveObj.ValidateFrom));
         parameter.Add(new KeyValuePair <string, object>("ValidateTo", couponSaveObj.ValidateTo));
         parameter.Add(new KeyValuePair <string, object>("IsActive", couponSaveObj.IsActive));
         parameter.Add(new KeyValuePair <string, object>("SettingIDs", couponSaveObj.SettingIDs));
         parameter.Add(new KeyValuePair <string, object>("SettingValues", couponSaveObj.SettingValues));
         parameter.Add(new KeyValuePair <string, object>("PortalUser_UserName", couponSaveObj.PortalUser_UserName));
         OracleHandler sqlH = new OracleHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateCoupons", parameter);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
コード例 #5
0
        public string AddUpdateCouponDetails(CouponSaveObj couponSaveObj, CouponEmailInfo couponEmailObj, AspxCommonInfo aspxCommonObj)
        {
            string checkMessage = string.Empty;
            try
            {
                try
                {
                    AspxCouponManageController.AddUpdateCoupons(couponSaveObj, aspxCommonObj);
                    checkMessage += "dataSave" + ",";
                }
                catch (Exception)
                {
                    checkMessage += "dataSaveFail" + ",";
                }

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

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