public static int AddItemstoCart(int itemID, decimal itemPrice, int itemQuantity, bool isItemPage, AspxCommonInfo aspxCommonObj) { try { var cartobj = new CartManageSQLProvider(); StoreSettingConfig ssc = new StoreSettingConfig(); if (cartobj.CheckItemCart(itemID, aspxCommonObj.StoreID, aspxCommonObj.PortalID, "0@")) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamNoCID(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("ItemID", itemID)); parameter.Add(new KeyValuePair <string, object>("Price", itemPrice)); parameter.Add(new KeyValuePair <string, object>("Quantity", itemQuantity)); OracleHandler sqlH = new OracleHandler(); int i; if (isItemPage) { i = sqlH.ExecuteNonQueryAsGivenType <int>("usp_Aspx_CheckCostVariantForItemDetail", parameter, "IsExist"); } else { // i = sqlH.ExecuteNonQueryAsGivenType<int>("usp_Aspx_CheckCostVariantForItem", parameter, "IsExist"); i = sqlH.ExecuteNonQueryAsGivenType <int>("usp_Aspx_CheckCostVariantForIt", parameter, "IsExist"); } return(i); } else { if (bool.Parse(ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, aspxCommonObj.StoreID, aspxCommonObj.PortalID, aspxCommonObj.CultureName))) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamNoCID(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("ItemID", itemID)); parameter.Add(new KeyValuePair <string, object>("Price", itemPrice)); parameter.Add(new KeyValuePair <string, object>("Quantity", itemQuantity)); parameter.Add(new KeyValuePair <string, object>("isItemPage", isItemPage)); OracleHandler sqlH = new OracleHandler(); int i; if (isItemPage) { i = sqlH.ExecuteNonQueryAsGivenType <int>("usp_Aspx_CheckCostVariantForItemDetail", parameter, "IsExist"); } else { i = sqlH.ExecuteNonQueryAsGivenType <int>("usp_Aspx_CheckCostVariantForIt", parameter, "IsExist"); } //i = sqlH.ExecuteNonQueryAsGivenType<int>("usp_Aspx_CheckCostVariantForItem", parameter, "IsExist"); return(i); } else { return(2); } } } catch (Exception e) { throw e; } }
public static int CountWishItems(AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamNoCID(aspxCommonObj); OracleHandler sqlH = new OracleHandler(); return(sqlH.ExecuteAsScalar <int>("usp_Aspx_GetWishItemsCount", parameter)); } catch (Exception e) { throw e; } }
public static List <ItemsCompareInfo> GetItemCompareList(AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamNoCID(aspxCommonObj); SQLHandler sqlH = new SQLHandler(); List <ItemsCompareInfo> lstItemCompare = sqlH.ExecuteAsList <ItemsCompareInfo>("usp_Aspx_GetCompareItemsList", parameter); return(lstItemCompare); } catch (Exception e) { throw e; } }
public static void AddUpdateRecentlyViewedItems(SaveCompareItemInfo addUpdateRecentObj, AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamNoCID(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("@itemSKU", addUpdateRecentObj.SKU)); parameter.Add(new KeyValuePair <string, object>("@ViewFromIP", addUpdateRecentObj.IP)); parameter.Add(new KeyValuePair <string, object>("@ViewedFromCountry", addUpdateRecentObj.CountryName)); SQLHandler sqlH = new SQLHandler(); sqlH.ExecuteNonQuery("usp_Aspx_AddRecentlyViewedItems", parameter); } catch (Exception e) { throw e; } }
public static void ReturnUpdate(RetunDetailsBasicInfo returnDetailObj, AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamNoCID(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("ReturnID", returnDetailObj.ReturnID)); parameter.Add(new KeyValuePair <string, object>("OrderID", returnDetailObj.OrderID)); parameter.Add(new KeyValuePair <string, object>("ReturnActionID", returnDetailObj.ReturnActionID)); parameter.Add(new KeyValuePair <string, object>("ReturnStatusID", returnDetailObj.ReturnStatusID)); parameter.Add(new KeyValuePair <string, object>("ShippingMethodID", returnDetailObj.shippingMethodID)); parameter.Add(new KeyValuePair <string, object>("ShippingCost", returnDetailObj.ShippingCost)); parameter.Add(new KeyValuePair <string, object>("OtherPostalCharges", returnDetailObj.OtherPostalCharges)); OracleHandler sqlH = new OracleHandler(); sqlH.ExecuteNonQuery("usp_Aspx_ReturnUpdate", parameter); } catch (Exception e) { throw e; } }