public static void IssueGiftCardForMobile(List <OrderItem> itemList, int orderID, bool isActive, AspxCommonInfo aspxCommonObj) { foreach (OrderItem orderItemInfo in itemList) { if (orderItemInfo.IsGiftCard) { try { int giftCardId = GetGiftCardIdByCartItemId(orderItemInfo.CartItemId, aspxCommonObj.StoreID, aspxCommonObj.PortalID); if (giftCardId > 0) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("@GiftCardId", giftCardId)); parameter.Add(new KeyValuePair <string, object>("@GiftCardCode", GetGiftCardKey())); parameter.Add(new KeyValuePair <string, object>("@GiftCardPinCode", GetGiftPinCode())); parameter.Add(new KeyValuePair <string, object>("@OrderID", orderID)); parameter.Add(new KeyValuePair <string, object>("@IsActive", isActive)); parameter.Add(new KeyValuePair <string, object>("@AddedBy", aspxCommonObj.UserName)); SQLHandler sqlH = new SQLHandler(); sqlH.ExecuteNonQuery("usp_Aspx_IssueGiftCard ", parameter); int typeId = GetGiftCardType(aspxCommonObj.StoreID, aspxCommonObj.PortalID, giftCardId); if (typeId == 1) //if email type only { NotifyUser(giftCardId, aspxCommonObj); } } } catch (Exception e) { throw e; } } } }
public static List <RetunReportInfo> GetReturnReport(int offset, System.Nullable <int> limit, AspxCommonInfo aspxCommonObj, ReturnReportBasicInfo returnReportObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("offset", offset)); parameter.Add(new KeyValuePair <string, object>("limit", limit)); parameter.Add(new KeyValuePair <string, object>("ReturnStatus", returnReportObj.ReturnStatus)); OracleHandler sqlh = new OracleHandler(); if (returnReportObj.Monthly == true) { return(sqlh.ExecuteAsList <RetunReportInfo>("usp_Aspx_GetReturnReport", parameter)); } if (returnReportObj.Weekly == true) { return(sqlh.ExecuteAsList <RetunReportInfo>("usp_Aspx_GetReturnReportByCurrentMonth", parameter)); } if (returnReportObj.Hourly == true) { return(sqlh.ExecuteAsList <RetunReportInfo>("usp_Aspx_GetReturnReportBy24hours", parameter)); } else { return(new List <RetunReportInfo>()); } } catch (Exception e) { throw e; } }
public static void IssueGiftCard(string giftCardIds, int?orderID, AspxCommonInfo aspxCommonObj) { var ids = giftCardIds.Split('N'); foreach (var id in ids) { try { int giftCardId = int.Parse(id); List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("@GiftCardId", giftCardId)); parameter.Add(new KeyValuePair <string, object>("@GiftCardCode", GetGiftCardKey())); parameter.Add(new KeyValuePair <string, object>("@IsActive", true)); parameter.Add(new KeyValuePair <string, object>("@OrderID", orderID)); parameter.Add(new KeyValuePair <string, object>("@GiftCardPinCode", GetGiftPinCode())); parameter.Add(new KeyValuePair <string, object>("@AddedBy", aspxCommonObj.UserName)); SQLHandler sqlH = new SQLHandler(); sqlH.ExecuteNonQuery("usp_Aspx_IssueGiftCard ", parameter); int typeId = GetGiftCardType(aspxCommonObj.StoreID, aspxCommonObj.PortalID, giftCardId); if (typeId == 1) { NotifyUser(giftCardId, aspxCommonObj); } } catch (Exception e) { throw e; } } }
public static List <TotalOrderAmountInfo> GetTotalOrderAmountAdmindash(AspxCommonInfo aspxCommonObj) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); OracleHandler sqlH = new OracleHandler(); List <TotalOrderAmountInfo> lstTOAmount = sqlH.ExecuteAsList <TotalOrderAmountInfo>("usp_Aspx_GetTotalOrderAmountStatus", parameter); return(lstTOAmount); }
/// <summary> /// To Bind Attribute Item Type dropdown /// </summary> /// <returns></returns> public static List <AttributesItemTypeInfo> GetAttributesItemType(AspxCommonInfo aspxCommonObj) { List <AttributesItemTypeInfo> ml; SQLHandler sqlH = new SQLHandler(); List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSP(aspxCommonObj); ml = sqlH.ExecuteAsList <AttributesItemTypeInfo>("dbo.usp_Aspx_AttributesItemTypeGetAll", parameterCollection); return(ml); }
public static void UpdateRealTimeRate(AspxCommonInfo aspxCommonObj, string currencyCode, double rate) { SQLHandler sqlH = new SQLHandler(); List <KeyValuePair <string, object> > Parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); Parameter.Add(new KeyValuePair <string, object>("@CurrencyCode", currencyCode)); Parameter.Add(new KeyValuePair <string, object>("@Rate", rate)); sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_UpdateRealTimeRate]", Parameter); }
public static void DeleteWareHouse(int wareHouseId, AspxCommonInfo aspxCommonObj) { List <KeyValuePair <string, object> > paramCol = CommonParmBuilder.GetParamSP(aspxCommonObj); paramCol.Add(new KeyValuePair <string, object>("WareHouseID", wareHouseId)); OracleHandler sageSQL = new OracleHandler(); sageSQL.ExecuteNonQuery("[usp_Aspx_DeleteAspx_WareHouse]", paramCol); }
public static string GetCategoryCheckedItems(int CategoryID, AspxCommonInfo aspxCommonObj) { SQLHandler sqlHandler = new SQLHandler(); List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSP(aspxCommonObj); parameterCollection.Add(new KeyValuePair <string, object>("@CategoryID", CategoryID)); string categoryItem = sqlHandler.ExecuteAsScalar <string>("[dbo].[usp_Aspx_GetItemsByCategoryIDAdmin]", parameterCollection); return(categoryItem); }
public static List <SearchTermList> GetSearchedTermList(string search, AspxCommonInfo aspxCommonObj) { List <KeyValuePair <string, object> > paramCol = CommonParmBuilder.GetParamSP(aspxCommonObj); paramCol.Add(new KeyValuePair <string, object>("Search", search)); OracleHandler sageSQL = new OracleHandler(); List <SearchTermList> srInfo = sageSQL.ExecuteAsList <SearchTermList>("usp_Aspx_GetListSearched", paramCol); return(srInfo); }
public static ReviewStatusInfo GetUserReviewStatus(int itemID, AspxCommonInfo aspxCommonObj, string userIP) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("@ItemID", itemID)); parameter.Add(new KeyValuePair <string, object>("@UserIP", userIP)); SQLHandler sqlH = new SQLHandler(); return(sqlH.ExecuteAsObject <ReviewStatusInfo>("[usp_Aspx_CheckReviewExistByIPUser]", parameter)); }
public static List <InventoryDetailAdminDashInfo> GetInventoryDetails(int count, AspxCommonInfo aspxCommonObj) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("LowStockCount", count)); OracleHandler sqlH = new OracleHandler(); List <InventoryDetailAdminDashInfo> lstInvDetail = sqlH.ExecuteAsList <InventoryDetailAdminDashInfo>("usp_Aspx_GetInventoryDetailsAdminDash", parameter); return(lstInvDetail); }
public static List <CouponSettingKeyValueInfo> GetCouponSettingKeyValueInfo(int couponID, AspxCommonInfo aspxCommonObj) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("@CouponID", couponID)); SQLHandler sqlH = new SQLHandler(); List <CouponSettingKeyValueInfo> lstCoupKeyVal = sqlH.ExecuteAsList <CouponSettingKeyValueInfo>("usp_Aspx_GetCouponSettingKeyValueByCouponID", parameter); return(lstCoupKeyVal); }
public static List <WareHouseAddress> GetAllWareHouseById(int wareHouseID, AspxCommonInfo aspxCommonObj) { List <KeyValuePair <string, object> > paramCol = CommonParmBuilder.GetParamSP(aspxCommonObj); paramCol.Add(new KeyValuePair <string, object>("WareHouseID", wareHouseID)); OracleHandler sageSQL = new OracleHandler(); List <WareHouseAddress> wList = sageSQL.ExecuteAsList <WareHouseAddress>("usp_Aspx_SelectWareHouseByID", paramCol); return(wList); }
public static List <TopCustomerOrdererInfo> GetTopCustomerOrderAdmindash(int count, AspxCommonInfo aspxCommonObj) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("Count", count)); OracleHandler sqlH = new OracleHandler(); List <TopCustomerOrdererInfo> lstTCO = sqlH.ExecuteAsList <TopCustomerOrdererInfo>("usp_Aspx_GetTopCustomerAdmindash", parameter); return(lstTCO); }
public static double GetRatefromTable(AspxCommonInfo aspxCommonObj, string currencyCode) { SQLHandler sqlH = new SQLHandler(); List <KeyValuePair <string, object> > Parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); Parameter.Add(new KeyValuePair <string, object>("@CurrencyCode", currencyCode)); decimal rate = sqlH.ExecuteAsScalar <decimal>("[dbo].[usp_Aspx_GetRateFromTable]", Parameter); return(Convert.ToDouble(rate)); }
public static List <RefundStatics> GetTotalRefund(int day, AspxCommonInfo aspxCommonObj) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("Day", day)); OracleHandler sqlH = new OracleHandler(); List <RefundStatics> lstRefund = sqlH.ExecuteAsList <RefundStatics>("usp_GetTotalRefunded", parameter); return(lstRefund); }
public static List <VisitorNewOrderStatics> GetVisitorsNewOrder(int day, AspxCommonInfo aspxCommonObj) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("Day", day)); OracleHandler sqlH = new OracleHandler(); List <VisitorNewOrderStatics> lstVisitor = sqlH.ExecuteAsList <VisitorNewOrderStatics>("usp_Aspx_GetNewAccountNewOrderRatio", parameter); return(lstVisitor); }
public static bool CheckReviewByIP(int itemID, AspxCommonInfo aspxCommonObj, string userIP) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("@ItemID", itemID)); parameter.Add(new KeyValuePair <string, object>("@UserIP", userIP)); SQLHandler sqlH = new SQLHandler(); bool isReviewExist = sqlH.ExecuteNonQueryAsGivenType <bool>("usp_Aspx_CheckReviewAlreadyExist", parameter, "@IsReviewAlreadyExist"); return(isReviewExist); }
public static void SetStorePrimary(AspxCommonInfo aspxCommonObj, string currencyCode) { SQLHandler sqlH = new SQLHandler(); List <KeyValuePair <string, object> > Parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); Parameter.Add(new KeyValuePair <string, object>("@CurrencyCode", currencyCode)); sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_SetStorePrimary]", Parameter); StoreSettingConfig ssc = new StoreSettingConfig(); HttpContext.Current.Cache.Remove("AspxStoreSetting" + aspxCommonObj.PortalID.ToString() + aspxCommonObj.StoreID.ToString()); ssc.ResetStoreSettingKeys(aspxCommonObj.StoreID, aspxCommonObj.PortalID, aspxCommonObj.CultureName); }
public void DeleteCatalogAffectedPrice(AspxCommonInfo aspxCommonObj) { try { OracleHandler sqlHandler = new OracleHandler(); List <KeyValuePair <string, object> > paramList = CommonParmBuilder.GetParamSP(aspxCommonObj); sqlHandler.ExecuteNonQuery("usp_Aspx_CatalogAffectedPriceDelete", paramList); } catch (Exception e) { throw e; } }
public static List <OrderChartInfo> GetOrderChartDetailsBy24Hours(AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); OracleHandler sqlH = new OracleHandler(); return(sqlH.ExecuteAsList <OrderChartInfo>("usp_Aspx_GetOrderChartBy24hours", parameter));; } catch (Exception e) { throw e; } }
public static bool CheckReviewByIP(int itemID, AspxCommonInfo aspxCommonObj, string userIP) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("ItemID", itemID)); parameter.Add(new KeyValuePair <string, object>("UserIP", userIP)); OracleHandler sqlH = new OracleHandler(); //bool isReviewExist= sqlH.ExecuteNonQueryAsGivenType<bool>("usp_Aspx_CheckReviewAlreadyExist", parameter, "IsReviewAlreadyExist"); string isReviewExist = sqlH.ExecuteNonQueryAsGivenType <string>("usp_Aspx_CheckReviewAlreadyEx", parameter, "IsReviewAlreadyExist"); return(Convert.ToBoolean(isReviewExist)); //return isReviewExist; }
public static List <Notification> GetAllNotification(AspxCommonInfo aspxCommonObj, InsertNotificationInfo getNotificationObj) { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("itemId", getNotificationObj.ItemID)); parameter.Add(new KeyValuePair <string, object>("costVariantValuesIds", getNotificationObj.VariantID)); parameter.Add(new KeyValuePair <string, object>("ItemSKU", getNotificationObj.ItemSKU)); parameter.Add(new KeyValuePair <string, object>("UserEmail", getNotificationObj.Email)); OracleHandler sqlH = new OracleHandler(); List <Notification> lstNotification = sqlH.ExecuteAsList <Notification>("usp_Aspx_GetAllNotification", parameter); return(lstNotification); }
public static List <CurrrencyRateInfo> GetCountryCodeRates(AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); SQLHandler sqlH = new SQLHandler(); return(sqlH.ExecuteAsList <CurrrencyRateInfo>("[dbo].[usp_Aspx_GetCountryCodeRates]", parameter)); } catch (Exception e) { throw e; } }
public static void DeleteComparedItems(string compareItems, AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("@CompareItems", compareItems)); SQLHandler sqlH = new SQLHandler(); sqlH.ExecuteNonQuery("usp_Aspx_DeleteMultipleComparedItems", parameter); } catch (Exception e) { throw e; } }
public static void DeActivateCategory(int categoryID, AspxCommonInfo aspxCommonObj) { try { SQLHandler sqlHandler = new SQLHandler(); List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSP(aspxCommonObj); parameterCollection.Add(new KeyValuePair <string, object>("@CategoryID", categoryID)); sqlHandler.ExecuteNonQuery("dbo.usp_Aspx_DeActivateCategory", parameterCollection); } catch (Exception e) { throw e; } }
public static void DeleteSingleItemRating(string itemReviewID, AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("@ItemReviewID", itemReviewID)); SQLHandler sqlH = new SQLHandler(); sqlH.ExecuteNonQuery("usp_Aspx_DeleteSingleItemRatingInformation", parameter); } catch (Exception e) { throw e; } }
public static void DeleteMultipleTag(string itemTagIDs, AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("TagsIDS", itemTagIDs)); OracleHandler sqlH = new OracleHandler(); sqlH.ExecuteNonQuery("usp_Aspx_DeleteMultipleTags", parameter); } catch (Exception e) { throw e; } }
public static List <OrderChartInfo> GetOrderChartDetailsBycurentMonth(AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); OracleHandler sqlH = new OracleHandler(); List <OrderChartInfo> lstOrderChart = sqlH.ExecuteAsList <OrderChartInfo>("usp_Aspx_GetOrderDetailsByCurrentMonth", parameter); return(lstOrderChart); } catch (Exception e) { throw e; } }
public static void DeleteCostVariantForItem(int itemId, AspxCommonInfo aspxCommonObj) { try { List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj); parameter.Add(new KeyValuePair <string, object>("@ItemID", itemId)); SQLHandler sqlH = new SQLHandler(); sqlH.ExecuteNonQuery("usp_Aspx_DeleteCostVariantsDetailsByItemID", parameter); } catch (Exception e) { throw e; } }