Exemplo n.º 1
0
 public static CartExistInfo CheckCustomerCartExist(AspxCommonInfo aspxCommonObj)
 {
     List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPSCt(aspxCommonObj);
     SQLHandler sqlH = new SQLHandler();
     CartExistInfo objCartExist= sqlH.ExecuteAsObject<CartExistInfo>("usp_Aspx_CheckCartExists", parameter);
     return objCartExist;
 }
Exemplo n.º 2
0
 //------------------------Clear My Carts----------------------------
 
 public static void ClearAllCartItems(int cartID, AspxCommonInfo aspxCommonObj)
 {
     List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPSCt(aspxCommonObj);
     parameter.Add(new KeyValuePair<string, object>("@CartID", cartID));
     SQLHandler sqlH = new SQLHandler();
     sqlH.ExecuteNonQuery("usp_Aspx_ClearCartItems", parameter);
 }
Exemplo n.º 3
0
 public static bool CheckAddressAlreadyExist(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPSCt(aspxCommonObj);
         SQLHandler sqlH    = new SQLHandler();
         bool       isExist = sqlH.ExecuteNonQueryAsGivenType <bool>("usp_Aspx_CheckForMultipleAddress", parameter, "@IsExist");
         return(isExist);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemplo n.º 4
0
 public static decimal GetTotalCartItemPrice(AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPSCt(aspxCommonObj);
         SQLHandler sqlH      = new SQLHandler();
         decimal    cartPrice = sqlH.ExecuteAsScalar <decimal>("usp_Aspx_GetCartItemsTotalAmount", parameter);
         return(cartPrice);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemplo n.º 5
0
 //------------------------------Delete Cart Items--------------------------
 
 public static void DeleteCartItem(int cartID, int cartItemID, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPSCt(aspxCommonObj);
         parameter.Add(new KeyValuePair<string, object>("@CartID", cartID));
         parameter.Add(new KeyValuePair<string, object>("@CartItemID", cartItemID));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_DeleteCartItem", parameter);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemplo n.º 6
0
 public static decimal CheckItemQuantity(int itemID, AspxCommonInfo aspxCommonObj, string itemCostVariantIDs)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPSCt(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("ItemID", itemID));
         parameter.Add(new KeyValuePair <string, object>("ItemCostVariantIDs", itemCostVariantIDs));
         OracleHandler sqlH     = new OracleHandler();
         decimal       retValue = sqlH.ExecuteAsScalar <decimal>("usp_Aspx_CheckItemQuantity", parameter);
         return(retValue);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Exemplo n.º 7
0
 public static ItemCartInfo CheckItemQuantityInCart(int itemID, AspxCommonInfo aspxCommonObj, string itemCostVariantIDs)
 {
     try
     {
         List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPSCt(aspxCommonObj);
         parameter.Add(new KeyValuePair<string, object>("@ItemID", itemID));
         parameter.Add(new KeyValuePair<string, object>("@ItemCostVariantIDs", itemCostVariantIDs));
         SQLHandler sqlH = new SQLHandler();
         ItemCartInfo itemCartObj = sqlH.ExecuteAsObject<ItemCartInfo>("usp_Aspx_CheckCustomerQuantityInCart", parameter);
         return itemCartObj;
     }
     catch (Exception e)
     {
         throw e;
     }
 }