public string SavePricingRule(CatalogPricingRuleInfo objCatalogPricingRuleInfo, Int32 storeID, Int32 portalID, string userName, string culture, object parentID)
 {
     try
     {
         List<KeyValuePair<string, object>> p1 = new List<KeyValuePair<string, object>>();
         p1.Add(new KeyValuePair<string, object>("@StoreID", storeID));
         p1.Add(new KeyValuePair<string, object>("@PortalID", portalID));
         SQLHandler sql = new SQLHandler();
         int count = sql.ExecuteAsScalar<int>("usp_Aspx_CatalogPriceRuleCount", p1);
         int maxAllowed = 3;
         int catalogPriceRuleId = objCatalogPricingRuleInfo.CatalogPriceRule.CatalogPriceRuleID;
         if (catalogPriceRuleId > 0)
         {
             maxAllowed++;
         }
         if (count < maxAllowed)
         {
             PriceRuleController priceRuleController = new PriceRuleController();
             priceRuleController.SaveCatalogPricingRule(objCatalogPricingRuleInfo, storeID, portalID, userName,
                                                        culture, parentID);
             //return "({ \"returnStatus\" : 1 , \"Message\" : \"Saving catalog pricing rule successfully.\" })";
             return "success";
         }
         else
         {
             //return "({ \"returnStatus\" : -1 , \"Message\" : \"No more than 3 rules are allowed in Free version of AspxCommerce!\" })";
             return "notify";
         }
     }
     catch (Exception ex)
     {
         ErrorHandler errHandler = new ErrorHandler();
         if (errHandler.LogWCFException(ex))
         {
             return "({ \"returnStatus\" : -1 , \"errorMessage\" : \"" + ex.Message + "\" })";
         }
         else
         {
             return "({ \"returnStatus\" : -1, \"errorMessage\" : \"Error while saving catalog pricing rule!\" })";
         }
     }
 }
 public string SavePricingRule(CatalogPricingRuleInfo catalogPricingRuleInfo, Int32 storeID, Int32 portalID, string userName, string culture, Array parentID)
 {
     try
     {
         PriceRuleController priceRuleController = new PriceRuleController();
         priceRuleController.SaveCatalogPricingRule(catalogPricingRuleInfo, storeID, portalID, userName, culture, parentID);
         return "({ \"returnStatus\" : 1 , \"Message\" : \"Saving catalog pricing rule successfully.\" })";
     }
     catch (Exception ex)
     {
         ErrorHandler errHandler = new ErrorHandler();
         if (errHandler.LogWCFException(ex))
         {
             return "({ \"returnStatus\" : -1 , \"errorMessage\" : \"" + ex.Message + "\" })";
         }
         else
         {
             return "({ \"returnStatus\" : -1, \"errorMessage\" : \"Error while saving catalog pricing rule!\" })";
         }
     }
 }