Ejemplo n.º 1
0
 public string DeleteMultipleCartPricingRules(string cartRulesIds, Int32 storeID, Int32 portalID, string userName, string culture)
 {
     try
     {
         PriceRuleController priceRuleController = new PriceRuleController();
         priceRuleController.CartPriceMultipleRulesDelete(cartRulesIds, storeID, portalID, userName, culture);
         return "({ \"returnStatus\" : 1 , \"Message\" : \"Deleting multiple cart pricing rules 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 deleting cart pricing rule!\" })";
         }
     }
 }
Ejemplo n.º 2
0
 public CartPricingRuleInfo GetCartPricingRule(Int32 cartPriceRuleID, Int32 storeID, Int32 portalID, string userName, string culture)
 {
     CartPricingRuleInfo cartPricingRuleInfo = new CartPricingRuleInfo();
     PriceRuleController priceRuleController = new PriceRuleController();
     cartPricingRuleInfo = priceRuleController.GetCartPriceRules(cartPriceRuleID, storeID, portalID, userName, culture);
     return cartPricingRuleInfo;
 }
Ejemplo n.º 3
0
 public List<CartPriceRulePaging> GetCartPricingRules(string ruleName, System.Nullable<DateTime> startDate, System.Nullable<DateTime> endDate, System.Nullable<bool> isActive, Int32 storeID, Int32 portalID, string userName, string culture, int offset, int limit)
 {
     PriceRuleController priceRuleController = new PriceRuleController();
     return priceRuleController.GetCartPricingRules(ruleName, startDate, endDate, isActive, storeID, portalID, userName, culture, offset, limit);
 }
Ejemplo n.º 4
0
 public string SaveCartPricingRule(CartPricingRuleInfo objCartPriceRule, 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_CartPrincingRuleCount", P1);
         int maxAllowed = 3;
         int cartPriceRuleId = objCartPriceRule.CartPriceRule.CartPriceRuleID;
         if (cartPriceRuleId > 0)
         {
             maxAllowed++;
         }
         if (count < maxAllowed)
         {
             PriceRuleController priceRuleController = new PriceRuleController();
             priceRuleController.SaveCartPricingRule(objCartPriceRule, storeID, portalID, userName, culture, parentID);
             //return "({ \"returnStatus\" : 1 , \"Message\" : \"Saving cart 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 cart pricing rule!\" })";
         }
     }
 }
Ejemplo n.º 5
0
 public List<PortalRole> GetAllRoles(Int32 storeID, Int32 portalID, string userName, string culture)
 {
     try
     {
         List<PortalRole> portalRoleCollection = new List<PortalRole>();
         PriceRuleController priceRuleController = new PriceRuleController();
         portalRoleCollection = priceRuleController.GetPortalRoles(portalID, true, userName);
         return portalRoleCollection;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Ejemplo n.º 6
0
 public string SaveCartPricingRule(CartPricingRuleInfo objCartPriceRule, Int32 storeID, Int32 portalID, string userName, string culture, Array parentID)
 {
     try
     {
         PriceRuleController priceRuleController = new PriceRuleController();
         priceRuleController.SaveCartPricingRule(objCartPriceRule, storeID, portalID, userName, culture, parentID);
         return "({ \"returnStatus\" : 1 , \"Message\" : \"Saving cart 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 cart pricing rule!\" })";
         }
     }
 }