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; }
//------------------------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); }
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; } }
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; } }
//------------------------------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; } }
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; } }
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; } }