public static int CartPriceRuleAdd(CartPriceRule cartPriceRule, SqlTransaction tran, AspxCommonInfo aspxCommonObj)
       {
           List<KeyValuePair<string, object>> parameter =CommonParmBuilder.GetParamPUC(aspxCommonObj);
           parameter.Add(new KeyValuePair<string, object>("@CartPriceRuleName", cartPriceRule.CartPriceRuleName));
           parameter.Add(new KeyValuePair<string, object>("@CartPriceRuleDescription", cartPriceRule.CartPriceRuleDescription));
           parameter.Add(new KeyValuePair<string, object>("@Apply", cartPriceRule.Apply));
           parameter.Add(new KeyValuePair<string, object>("@Value", cartPriceRule.Value));
           parameter.Add(new KeyValuePair<string, object>("@ApplytoShippingAmount", cartPriceRule.ApplytoShippingAmount));
           parameter.Add(new KeyValuePair<string, object>("@DiscountQuantity", cartPriceRule.DiscountQuantity));
           parameter.Add(new KeyValuePair<string, object>("@DiscountStep", cartPriceRule.DiscountStep));
           parameter.Add(new KeyValuePair<string, object>("@FreeShipping", cartPriceRule.FreeShipping));
           parameter.Add(new KeyValuePair<string, object>("@IsFurtherProcessing", cartPriceRule.IsFurtherProcessing));
           parameter.Add(new KeyValuePair<string, object>("@FromDate", cartPriceRule.FromDate));
           parameter.Add(new KeyValuePair<string, object>("@ToDate", cartPriceRule.ToDate));
           parameter.Add(new KeyValuePair<string, object>("@Priority", cartPriceRule.Priority));
           parameter.Add(new KeyValuePair<string, object>("@IsActive", cartPriceRule.IsActive));
           try
           {
               SQLHandler sqlH = new SQLHandler();

               if (cartPriceRule.CartPriceRuleID > 0)
                   DeleteCartPricingRuleForEdit(tran, cartPriceRule.CartPriceRuleID, aspxCommonObj.PortalID);

               int cartPRID= sqlH.ExecuteNonQuery(tran, CommandType.StoredProcedure, "usp_Aspx_CartPriceRuleAdd", parameter, "@CartPriceRuleID");
               return cartPRID;

           }
           catch (Exception e)
           {
               throw e;
           }
       }
 public static void DeleteSearchTerm(string Ids, AspxCommonInfo aspxCommonObj)
 {
     List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
     parameter.Add(new KeyValuePair<string, object>("@SearchTermID", Ids));
     SQLHandler sqlH = new SQLHandler();
     sqlH.ExecuteNonQuery("usp_Aspx_DeleteSearchTerm", parameter);
 }
 public DataSet GetAdvanceSearchDataSet(string prefix, bool isActive, AspxCommonInfo aspxCommonObj, int CategoryID, bool IsGiftCard)
 {
     try
     {
         DataSet objHDSetting = new DataSet();
         if (!CacheHelper.Get("AdvanceSearchDataSet" + aspxCommonObj.StoreID.ToString() + aspxCommonObj.PortalID.ToString() + "_" + aspxCommonObj.CultureName, out objHDSetting))
         {
             int itemID = 0;
             List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPC(aspxCommonObj);
             parameterCollection.Add(new KeyValuePair<string, object>("@CategoryID", CategoryID));
             parameterCollection.Add(new KeyValuePair<string, object>("@IsGiftCard", IsGiftCard));
             parameterCollection.Add(new KeyValuePair<string, object>("@Prefix", prefix));
             parameterCollection.Add(new KeyValuePair<string, object>("@IsActive", isActive));
             parameterCollection.Add(new KeyValuePair<string, object>("@ItemID", itemID));
             parameterCollection.Add(new KeyValuePair<string, object>("@UserName", aspxCommonObj.UserName));
             SQLHandler sqlH = new SQLHandler();                    
             objHDSetting = sqlH.ExecuteAsDataSet("[dbo].[usp_Aspx_AdvanceSearch]", parameterCollection);
         }
         return objHDSetting;
     }
     catch (Exception e)
     {
         throw e;
     }
 }
        public List<CategoryInfo> GetAllCategoryForSearch(string prefix, bool isActive, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                int itemID = 0;
                List<CategoryInfo> catList = new List<CategoryInfo>();

                if (!CacheHelper.Get("CategoryForSearch" + aspxCommonObj.StoreID.ToString() + aspxCommonObj.PortalID.ToString() +"_" + aspxCommonObj.CultureName, out catList))
                {
                    List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                    parameterCollection.Add(new KeyValuePair<string, object>("@Prefix", prefix));
                    parameterCollection.Add(new KeyValuePair<string, object>("@IsActive", isActive));
                    parameterCollection.Add(new KeyValuePair<string, object>("@ItemID", itemID));
                    SQLHandler sqlH = new SQLHandler();
                    catList = sqlH.ExecuteAsList<CategoryInfo>("dbo.usp_Aspx_GetCategoryList",
                                                               parameterCollection);
                    CacheHelper.Add(catList, "CategoryForSearch" + aspxCommonObj.StoreID.ToString() + aspxCommonObj.PortalID.ToString() + "_" + aspxCommonObj.CultureName);
                }
                return catList;
            }
            catch (Exception e)
            {
                throw e;
            }
        }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            GetPortalCommonInfo(out StoreID, out PortalID, out UserName, out CultureName);
            AspxCommonInfo aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName);
            if (!IsPostBack)
            {

                IncludeJs("WishItems", "/js/DateTime/date.js", "/js/jquery.tipsy.js", "/Modules/AspxCommerce/AspxWishList/js/WishItems.js");
                IncludeCss("WishItemsCss", "/Modules/AspxCommerce/AspxWishList/css/WishItems.css");
                userFriendlyURL = IsUseFriendlyUrls;
                GetWishListItemsSettig(aspxCommonObj);
                StoreSettingConfig ssc = new StoreSettingConfig();
                ssc.GetStoreSettingParamThree(StoreSetting.DefaultProductImageURL, StoreSetting.ShowItemImagesInWishList,StoreSetting.ModuleCollapsible, out NoImageWishItemPath, out ShowWishedItemImage, out ModuleCollapsible, StoreID, PortalID, CultureName);
            }
            if (NoOfRecentAddedWishItems > 0)
            {
                BindMyWishList(aspxCommonObj);
            }
            IncludeLanguageJS();

        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
        public void AddUpdateCoupons(CouponSaveObj couponSaveObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
                parameter.Add(new KeyValuePair<string, object>("@CouponID", couponSaveObj.CouponID));
                parameter.Add(new KeyValuePair<string, object>("@CouponTypeID", couponSaveObj.CouponTypeID));
                parameter.Add(new KeyValuePair<string, object>("@CouponCode", couponSaveObj.CouponCode));
                parameter.Add(new KeyValuePair<string, object>("@CouponAmount", couponSaveObj.CouponAmount));
                parameter.Add(new KeyValuePair<string, object>("@IsPercentage", couponSaveObj.IsPercentage));
                parameter.Add(new KeyValuePair<string, object>("@ValidateFrom", couponSaveObj.ValidateFrom));
                parameter.Add(new KeyValuePair<string, object>("@ValidateTo", couponSaveObj.ValidateTo));
                parameter.Add(new KeyValuePair<string, object>("@IsActive", couponSaveObj.IsActive));
                parameter.Add(new KeyValuePair<string, object>("@SettingIDs", couponSaveObj.SettingIDs));
                parameter.Add(new KeyValuePair<string, object>("@SettingValues", couponSaveObj.SettingValues));
                parameter.Add(new KeyValuePair<string, object>("@PortalUser_UserName", couponSaveObj.PortalUser_UserName));

                parameter.Add(new KeyValuePair<string, object>("@StoreID", aspxCommonObj.StoreID));
                parameter.Add(new KeyValuePair<string, object>("@PortalID", aspxCommonObj.PortalID));
                parameter.Add(new KeyValuePair<string, object>("@CultureName", aspxCommonObj.CultureName));
                parameter.Add(new KeyValuePair<string, object>("@UserName", aspxCommonObj.UserName));
                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateCoupons", parameter);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public static void RewardPointsSaveUpdateNewRule(RewardPointsCommonInfo rewardPointsCommonObj,
                                                  AspxCommonInfo aspxCommonObj)
 {
     try
     {
         SQLHandler sqlH = new SQLHandler();
         List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
         parameter.Add(new KeyValuePair<string, object>("@RewardPointSettingsID",
                                                        rewardPointsCommonObj.RewardPointSettingsID));
         parameter.Add(new KeyValuePair<string, object>("@RewardRuleName", rewardPointsCommonObj.RewardRuleName));
         parameter.Add(new KeyValuePair<string, object>("@RewardRuleID", rewardPointsCommonObj.RewardRuleID));
         parameter.Add(new KeyValuePair<string, object>("@RewardRuleType", rewardPointsCommonObj.RewardRuleType));
         parameter.Add(new KeyValuePair<string, object>("@RewardPoints", rewardPointsCommonObj.RewardPoints));
         parameter.Add(new KeyValuePair<string, object>("@PurchaseAmount", rewardPointsCommonObj.PurchaseAmount));
         parameter.Add(new KeyValuePair<string, object>("@IsActive", rewardPointsCommonObj.IsActive));
         parameter.Add(new KeyValuePair<string, object>("@StoreID", aspxCommonObj.StoreID));
         parameter.Add(new KeyValuePair<string, object>("@PortalID", aspxCommonObj.PortalID));
         parameter.Add(new KeyValuePair<string, object>("@CulturName", aspxCommonObj.CultureName));
         parameter.Add(new KeyValuePair<string, object>("@UserName", aspxCommonObj.UserName));
         sqlH.ExecuteNonQuery("usp_Aspx_RewardPointsSaveUpdateNewRule", parameter);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 public bool ChangePassword(AspxCommonInfo aspxCommonObj, string newPassword, string retypePassword)
 {
     MembershipController m = new MembershipController();
     try
     {
         if (newPassword != "" && retypePassword != "" && newPassword == retypePassword && aspxCommonObj.UserName != "")
         {
             UserInfo sageUser = m.GetUserDetails(aspxCommonObj.PortalID, aspxCommonObj.UserName);
             // Guid userID = (Guid)member.ProviderUserKey;
             string password, passwordSalt;
             PasswordHelper.EnforcePasswordSecurity(m.PasswordFormat, newPassword, out password, out passwordSalt);
             UserInfo user = new UserInfo(sageUser.UserID, password, passwordSalt, m.PasswordFormat);
             m.ChangePassword(user);
             return true;
         }
         else
         {
             return false;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
        public static void RewardPointsSaveGeneralSettings(GeneralSettingsCommonInfo generalSettingobj,
                                                           AspxCommonInfo aspxCommonObj)
        {
            try
            {
                SQLHandler sqlH = new SQLHandler();
                List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
                parameter.Add(new KeyValuePair<string, object>("@RewardPoints", generalSettingobj.RewardPoints));
                parameter.Add(new KeyValuePair<string, object>("@RewardAmount", generalSettingobj.RewardExchangeRate));
                parameter.Add(new KeyValuePair<string, object>("@AddOrderStatusID", generalSettingobj.AddOrderStatusID));
                parameter.Add(new KeyValuePair<string, object>("@SubOrderStatusID", generalSettingobj.SubOrderStatusID));
                parameter.Add(new KeyValuePair<string, object>("@RewardPointsExpiresInDays",
                                                               generalSettingobj.RewardPointsExpiresInDays));
                parameter.Add(new KeyValuePair<string, object>("@MinRedeemBalance", generalSettingobj.MinRedeemBalance));
                parameter.Add(new KeyValuePair<string, object>("@BalanceCapped", generalSettingobj.BalanceCapped));
                parameter.Add(new KeyValuePair<string, object>("@IsActive", generalSettingobj.IsActive));
                parameter.Add(new KeyValuePair<string, object>("@StoreID", aspxCommonObj.StoreID));
                parameter.Add(new KeyValuePair<string, object>("@PortalID", aspxCommonObj.PortalID));
                parameter.Add(new KeyValuePair<string, object>("@CulturName", aspxCommonObj.CultureName));
                parameter.Add(new KeyValuePair<string, object>("@UserName", aspxCommonObj.UserName));
                sqlH.ExecuteNonQuery("usp_Aspx_RewardPointsSaveGeneralSettings", parameter);
            }
            catch (Exception e)
            {
                throw e;
            }

        }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         GetPortalCommonInfo(out StoreID, out PortalID, out CustomerID, out UserName, out CultureName, out SessionCode);
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName, CustomerID, SessionCode);
         if (!IsPostBack)
         {
             modulePath = this.AppRelativeTemplateSourceDirectory;
             ServicePath = ResolveUrl(modulePath);
             hst = AppLocalized.getLocale(modulePath);
             IncludeJs("ItemsCompare", "/js/jquery.cookie.js",
                 "/Modules/AspxCommerce/AspxCompareItems/js/ItemsCompare.js");
             IncludeCss("ItemsCompare", "/Modules/AspxCommerce/AspxCompareItems/css/module.css");
             StoreSettingConfig ssc = new StoreSettingConfig();
             DefaultImagePath = ssc.GetStoreSettingsByKey(StoreSetting.DefaultProductImageURL, StoreID, PortalID, CultureName);
         }
         IncludeLanguageJS();
         CompareItems(aspxCommonObj);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
    public void GetSpecialItemSetting()
    {
        AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
        aspxCommonObj.StoreID = StoreID;
        aspxCommonObj.PortalID = PortalID;
        aspxCommonObj.CultureName = CultureName;

        JavaScriptSerializer json_serializer = new JavaScriptSerializer();
        SpecialItemsController sic = new SpecialItemsController();
        SpecialItemsSettingInfo lstSpecialSetting = sic.GetSpecialItemsSetting(aspxCommonObj);

        if (lstSpecialSetting != null)
        {
            object obj = new
            {
                IsEnableSpecialItems = lstSpecialSetting.IsEnableSpecialItems,
                NoOfItemShown = lstSpecialSetting.NoOfItemShown,
                NoOfItemInRow = lstSpecialSetting.NoOfItemInRow,
                IsEnableSpecialItemsRss = lstSpecialSetting.IsEnableSpecialItemsRss,
                SpecialItemsRssCount = lstSpecialSetting.SpecialItemsRssCount,
                SpecialItemsRssPageName = lstSpecialSetting.SpecialItemsRssPageName,
                SpecialItemsDetailPageName = lstSpecialSetting.SpecialItemsDetailPageName,
                SpecialItemModulePath = SpecialItemModulePath
            };
            Settings = json_serializer.Serialize(obj);
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            string UserName = string.Empty;
            GetPortalCommonInfo(out  StoreID, out  PortalID, out  UserName, out  CultureName);
            AspxCommonInfo aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName);
            if (!IsPostBack)
            {

                StoreSettingConfig ssc = new StoreSettingConfig();
                MainCurrency = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, StoreID, PortalID, CultureName);
                if (Session["CurrencyCode"] != null && Session["CurrencyCode"].ToString() != "")
                {
                    SelectedCurrency = Session["CurrencyCode"].ToString();
                }
                else
                {
                    SelectedCurrency = MainCurrency;
                }
                IncludeJs("Currencyconversion", "/js/FancyDropDown/fancyDropDown.js");//
                IncludeCss("Currencyconversion", "/Templates/" + TemplateName + "/css/FancyDropDown/fancy.css", "/Modules/AspxCommerce/AspxCurrencyConverter/css/module.css");
            }
            IncludeLanguageJS();
            BindCurrencyList(aspxCommonObj);
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
    private void GetRssFeedContens(AspxCommonInfo aspxCommonObj, string pageURL, int count)
    {
        try
        {
            string[] path = pageURL.Split('?');
            string pagepath = path[0];
            HttpContext.Current.Response.Clear();
            HttpContext.Current.Response.ContentType = "text/xml";
            XmlTextWriter rssXml = new XmlTextWriter(HttpContext.Current.Response.OutputStream, Encoding.UTF8);

            rssXml.WriteStartDocument();

            rssXml.WriteStartElement("rss");
            rssXml.WriteAttributeString("version", "2.0");
            rssXml.WriteStartElement("channel");
            rssXml.WriteElementString("link", pagepath);
            rssXml.WriteElementString("title", getLocale("AspxCommerce Services"));
            GetItemRssFeedContents(aspxCommonObj, rssXml, pageURL,count);
            rssXml.WriteEndElement();
            rssXml.WriteEndElement();
            rssXml.WriteEndDocument();
            rssXml.Flush();
            rssXml.Close();
            HttpContext.Current.Response.End();

        }
        catch (Exception ex)
        {
            throw ex;
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         int StoreID, PortalID;
         string UserName, CultureName;
         GetPortalCommonInfo(out StoreID, out PortalID, out UserName, out CultureName);
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName); 
         if (!IsPostBack)
         {
             string templateName = TemplateName;
             IncludeJs("MegaCategoryView", "/js/jquery.cookie.js", "/Modules/AspxCommerce/AspxMegaCategory/js/hoverIntent.js", 
                 "/Modules/AspxCommerce/AspxMegaCategory/js/jquery.dcverticalmegamenu.1.3.js", 
                 "/Modules/AspxCommerce/AspxMegaCategory/js/jquery.dcmegamenu.1.3.3.js",
                 "/Modules/AspxCommerce/AspxMegaCategory/js/jquery.dcjqaccordion.2.7.js");
             IncludeCss("MegaCategoryView", "/Templates/" + templateName + "/css/MegaMenu/dcverticalmegamenu.css",
                 "/Templates/" + templateName + "/css/MegaMenu/dcmegamenu.css", "/Modules/AspxCommerce/AspxMegaCategory/css/module.css");
             StoreSettingConfig ssc = new StoreSettingConfig();
             ssc.GetStoreSettingParamTwo(StoreSetting.DefaultProductImageURL, StoreSetting.NewCategoryRss, out NoImageCategoryDetailPath,
                 out CategoryRss, StoreID, PortalID, CultureName);
             if (CategoryRss.ToLower() == "true")
             {
                 RssFeedUrl = ssc.GetStoreSettingsByKey(StoreSetting.RssFeedURL, StoreID, PortalID, CultureName);
             }
         }
         GetMegaCategorySetting(aspxCommonObj);
         GetCategoryMenuList(aspxCommonObj);
         IncludeLanguageJS();
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
 public static List<PricingRuleAttributeInfo> GetPricingRuleAttributes(AspxCommonInfo aspxCommonObj)
 {
     SQLHandler sqlHandler = new SQLHandler();
     List<KeyValuePair<string, object>> paramList = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
     List<PricingRuleAttributeInfo> lstPriceRuleAttr = sqlHandler.ExecuteAsList<PricingRuleAttributeInfo>("usp_Aspx_GetPricingRuleAttr", paramList);
     return lstPriceRuleAttr;
 }
 private void BindItemImageGallery(AspxCommonInfo aspxCommonObj)
 {
     SageFrameRoute parentPage = (SageFrameRoute)this.Page;
     string itemSKU = parentPage.Key;
     string costCombination = string.Empty;
     AspxCoreController obj = new AspxCoreController();
     ItemCommonInfo objItemInfo = obj.GetItemInfoFromSKU(itemSKU, aspxCommonObj);
     if (objItemInfo != null)
     {
         ItemID = objItemInfo.ItemID;
         ItemTypeID = objItemInfo.ItemTypeID;
     }
     if (ItemTypeID == 3)
     {
         List<GiftCardInfo> lstItemGallery = obj.GetGiftCardThemeImagesByItem(ItemID, aspxCommonObj);
         BindGiftGallery(lstItemGallery,aspxCommonObj);
     }
     else
     {
         List<VariantCombination> lstItemCombination = obj.GetCostVariantCombinationbyItemSku(itemSKU, aspxCommonObj);
         if (lstItemCombination != null && lstItemCombination.Count > 0)
         {
             costCombination = lstItemCombination[0].CombinationID.ToString();
         }
         else
         {
             costCombination = "0";
         }
         List<ItemsInfoSettings> lstItemGallery = obj.GetItemsImageGalleryInfoBySKU(itemSKU, aspxCommonObj, costCombination);
         BindGallery(lstItemGallery, aspxCommonObj);
     }
 }
        public static void NotificationSaveUpdateSettings(NotificationSettingsInfo saveUpdateInfo, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                parameterCollection.Add(new KeyValuePair<string, object>("@AllActive", saveUpdateInfo.AllActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@UserNotificationActive", saveUpdateInfo.UserNotificationActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@UserNotificationCount", saveUpdateInfo.UserNotificationCount));
                parameterCollection.Add(new KeyValuePair<string, object>("@SubscriptionNotificationActive ", saveUpdateInfo.SubscriptionNotificationActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@SubscriptionNotificationCount", saveUpdateInfo.SubscriptionNotificationCount));
                parameterCollection.Add(new KeyValuePair<string, object>("@OutofStockNotificationActive", saveUpdateInfo.OutofStockNotificationActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@OutofStockNotificationCount", saveUpdateInfo.OutofStockNotificationCount));
                parameterCollection.Add(new KeyValuePair<string, object>("@ItemsLowStockNotificationActive", saveUpdateInfo.ItemsLowStockNotificationActive));
                parameterCollection.Add(new KeyValuePair<string, object>("@ItemsLowStockCount", saveUpdateInfo.ItemsLowStockCount));
                parameterCollection.Add(new KeyValuePair<string, object>("@OrdersNotificationAtive", saveUpdateInfo.OrdersNotificationAtive));
                parameterCollection.Add(new KeyValuePair<string, object>("@OrdersNotificationCount", saveUpdateInfo.OrdersNotificationCount));
                SQLHandler sqlH = new SQLHandler();
                sqlH.ExecuteNonQuery("[dbo].[usp_Aspx_NotificationSaveUpdateSettings]", parameterCollection);

            }
            catch (Exception e)
            {
                throw e;
            }
        }
 /// <summary>
 /// To Get Parameter Having @StoreID,@PortalID
 /// </summary>
 /// <param name="aspxCommonObj"></param>
 /// <returns></returns>
 public static List<KeyValuePair<string, object>> GetParamSP(AspxCommonInfo aspxCommonObj)
 {
     List<KeyValuePair<string, object>> ParaMeter = new List<KeyValuePair<string, object>>();
     ParaMeter.Add(new KeyValuePair<string, object>("@StoreID", aspxCommonObj.StoreID));
     ParaMeter.Add(new KeyValuePair<string, object>("@PortalID", aspxCommonObj.PortalID));
     return ParaMeter;
 }
       public static int SaveCatalogPricingRule(CatalogPricingRuleInfo objCatalogPricingRuleInfo, AspxCommonInfo aspxCommonObj, List<int> parentID)
       {

           int catalogPriceRuleID = -1;
           catalogPriceRuleID = AspxCatalogPriceRuleProvider.CatalogPriceRuleAdd(objCatalogPricingRuleInfo.CatalogPriceRule, aspxCommonObj);

           if (catalogPriceRuleID > 0)
           {
               int count = 0;
               int cpID = 0;
               int catalogConditionID = 0;
               List<int> lstParent = parentID;//new JavaScriptSerializer().ConvertToType<List<object>>(parentID);

               foreach (CatalogPriceRuleCondition catalogPriceRuleCondition in objCatalogPricingRuleInfo.CatalogPriceRuleConditions)
               {
                   if (count == 1 && catalogConditionID > 1)
                       cpID = catalogConditionID - 1;
                   catalogPriceRuleCondition.ParentID = cpID + int.Parse(lstParent[count].ToString());
                   catalogPriceRuleCondition.CatalogPriceRuleID = catalogPriceRuleID;
                   catalogConditionID = AspxCatalogPriceRuleProvider.CatalogPriceRuleConditionAdd(catalogPriceRuleCondition, aspxCommonObj);
                   count++;
               }

               int catalogPriceRuleRoleID = -1;
               foreach (CatalogPriceRuleRole catalogPriceRuleRole in objCatalogPricingRuleInfo.CatalogPriceRuleRoles)
               {
                   catalogPriceRuleRole.CatalogPriceRuleID = catalogPriceRuleID;
                   catalogPriceRuleRoleID = AspxCatalogPriceRuleProvider.CatalogPriceRuleRoleAdd(catalogPriceRuleRole, aspxCommonObj);
               }
           }
           return 1;
       }
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
            base.GetPortalCommonInfo(out storeID, out portalID, out customerID, out userName, out cultureName, out sessionCode);
            aspxCommonObj = new AspxCommonInfo(storeID, portalID, userName, cultureName, customerID, sessionCode);

            StoreSettingConfig ssc = new StoreSettingConfig();
            ssc.GetStoreSettingParamTwo(StoreSetting.ShoppingCartURL,
                                            StoreSetting.ShowAddToCartButton,
                                            out ShoppingCartURL,
                                            out AllowAddToCart,
                                            storeID,
                                            portalID,
                                            cultureName
                                            );

            GetUserRecentActivity(aspxCommonObj);
            GetAddressBookDetails(aspxCommonObj);
            GetAllCountry();

           // IncludeJs("AccountUserDashboard", "/Modules/AspxCommerce/AspxUserDashBoard/js/userdashboard.js");
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
       

    }
 public static bool UpdateStoreLocation(AspxCommonInfo aspxCommonObj, string storeName, String storeDescription, string streetName, string localityName, string city, string state, string country, string zip, double latitude, double longitude)
 {
     List<KeyValuePair<string, object>> parameterCollection = CommonParmBuilder.GetParamSPU(aspxCommonObj);
     parameterCollection.Add(new KeyValuePair<string, object>("@StoreName", storeName));
     parameterCollection.Add(new KeyValuePair<string, object>("@StoreDescription", storeDescription));
     parameterCollection.Add(new KeyValuePair<string, object>("@StreetName", streetName));
     parameterCollection.Add(new KeyValuePair<string, object>("@LocalityName", localityName));
     parameterCollection.Add(new KeyValuePair<string, object>("@City", city));
     parameterCollection.Add(new KeyValuePair<string, object>("@State", state));
     parameterCollection.Add(new KeyValuePair<string, object>("@Country", country));
     parameterCollection.Add(new KeyValuePair<string, object>("@ZIP", zip));
     parameterCollection.Add(new KeyValuePair<string, object>("@Latitude", latitude));
     parameterCollection.Add(new KeyValuePair<string, object>("@Longitude", longitude));
     try
     {
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_StoreLocatorLocationUpdate", parameterCollection);
         return true;
     }
     catch (Exception e)
     {
         return false;
         throw e;
     }
 }
 public void AddUpdateUserAddress(AddressInfo addressObj,AspxCommonInfo aspxCommonObj)
 {
     List<KeyValuePair<string, object>> parameter = new List<KeyValuePair<string, object>>();
     parameter.Add(new KeyValuePair<string, object>("@AddressID", addressObj.AddressID));
     parameter.Add(new KeyValuePair<string, object>("@CustomerID", aspxCommonObj.CustomerID));
     parameter.Add(new KeyValuePair<string, object>("@FirstName", addressObj.FirstName));
     parameter.Add(new KeyValuePair<string, object>("@LastName", addressObj.LastName));
     parameter.Add(new KeyValuePair<string, object>("@Email", addressObj.Email));
     parameter.Add(new KeyValuePair<string, object>("@Company", addressObj.Company));
     parameter.Add(new KeyValuePair<string, object>("@Address1", addressObj.Address1));
     parameter.Add(new KeyValuePair<string,object>("@Address2",addressObj.Address2));
     parameter.Add(new KeyValuePair<string, object>("@City", addressObj.City));
     parameter.Add(new KeyValuePair<string, object>("@State", addressObj.State));
     parameter.Add(new KeyValuePair<string, object>("@Zip", addressObj.Zip));
     parameter.Add(new KeyValuePair<string, object>("@Phone", addressObj.Phone));
     parameter.Add(new KeyValuePair<string, object>("@Mobile", addressObj.Mobile));
     parameter.Add(new KeyValuePair<string, object>("@Fax", addressObj.Fax));
     parameter.Add(new KeyValuePair<string, object>("@WebSite", addressObj.Website));
     parameter.Add(new KeyValuePair<string, object>("@Country", addressObj.Country));
     parameter.Add(new KeyValuePair<string, object>("@IsDefaultShipping", addressObj.DefaultShipping));
     parameter.Add(new KeyValuePair<string, object>("@IsDefaultBilling", addressObj.DefaultBilling));
     parameter.Add(new KeyValuePair<string, object>("@StoreID", aspxCommonObj.StoreID));
     parameter.Add(new KeyValuePair<string, object>("@PortalID", aspxCommonObj.PortalID));
     parameter.Add(new KeyValuePair<string, object>("@UserName", aspxCommonObj.UserName));
     parameter.Add(new KeyValuePair<string, object>("@CultureName", aspxCommonObj.CultureName));
     SQLHandler sqlH = new SQLHandler();
     sqlH.ExecuteNonQuery("usp_Aspx_AddUpdateUserAddress", parameter);
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         SageFrameConfig pagebase = new SageFrameConfig();
         GetPortalCommonInfo(out  StoreID, out  PortalID, out  CustomerID, out  UserName, out  CultureName);
         if (!IsPostBack)
         {
             IncludeCss("ShoppingBagHeader", "/Templates/" + TemplateName + "/css/PopUp/style.css", 
                 "/Templates/" + TemplateName + "/css/MessageBox/style.css",
                 "/Modules/AspxCommerce/AspxShoppingBagHeader/css/module.css");
             IncludeJs("ShoppingBagHeader", "/js/PopUp/custom.js", "/js/MessageBox/jquery.easing.1.3.js", 
                 "/js/MessageBox/alertbox.js",
                 "/Modules/AspxCommerce/AspxShoppingBagHeader/js/ShoppingBag.js", "/js/Session.js");   
             UserModuleID = SageUserModuleID;
             if (HttpContext.Current.Session.SessionID != null)
             {
                 SessionCode = HttpContext.Current.Session.SessionID.ToString();
             }
             StoreSettingConfig ssc = new StoreSettingConfig();
             ssc.GetStoreSettingParamEight(StoreSetting.ShowMiniShoppingCart, StoreSetting.ShowAddToCartButton,
                 StoreSetting.AllowMultipleShippingAddress, StoreSetting.MinimumCartSubTotalAmount, StoreSetting.AllowAnonymousCheckOut, 
                 StoreSetting.ShoppingCartURL,StoreSetting.SingleCheckOutURL, StoreSetting.AllowRealTimeNotifications,
                 out ShowMiniShopCart, out AllowAddToCart, out AllowMultipleAddChkOut, out MinCartSubTotalAmount, out AllowAnonymousCheckOut,
                 out ShoppingCartURL, out SingleAddressChkOutURL, out AllowRealTimeNotifications, StoreID, PortalID, CultureName);
             AspxCommonInfo aspxCommonObj = new AspxCommonInfo(StoreID, PortalID,CultureName);
             BagType = AspxShoppingBagController.GetShoppingBagSetting(aspxCommonObj);
         }
         IncludeLanguageJS();
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
 private void GetMegaCategorySetting()
 {
     AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
     aspxCommonObj.StoreID = GetStoreID;
     aspxCommonObj.PortalID = GetPortalID;
     aspxCommonObj.CultureName = GetCurrentCultureName;
     JavaScriptSerializer json_serializer = new JavaScriptSerializer();
     MegaCategoryController objCat = new MegaCategoryController();
     MegaCategorySettingInfo megaCatSetting = objCat.GetMegaCategorySetting(aspxCommonObj);
     if (megaCatSetting != null)
     {
         object obj = new {
         ModeOfView = megaCatSetting.ModeOfView,
         NoOfColumn = megaCatSetting.NoOfColumn,
         ShowCatImage = megaCatSetting.ShowCategoryImage,
         ShowSubCatImage = megaCatSetting.ShowSubCategoryImage,
         Speed = megaCatSetting.Speed,
         Effect = megaCatSetting.Effect,
         EventMega = megaCatSetting.EventMega,
         Direction = megaCatSetting.Direction,
         MegaModulePath = MegaModulePath
     };
         Settings = json_serializer.Serialize(obj); 
     }
 }
 public void GetServiceItemSetting()
 {
     AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
     aspxCommonObj.StoreID = StoreID;
     aspxCommonObj.PortalID = PortalID;
     aspxCommonObj.CultureName = CultureName;
     ServiceItemController objService = new ServiceItemController();
     JavaScriptSerializer json_serializer = new JavaScriptSerializer();
     List<ServiceItemSettingInfo> lstServiceSetting = objService.GetServiceItemSetting(aspxCommonObj);
     if (lstServiceSetting != null && lstServiceSetting.Count > 0)
     {
         foreach (var serviceSetting in lstServiceSetting)
         {
             object obj = new
             {
                 IsEnableService = serviceSetting.IsEnableService,
                 ServiceCategoryInARow = serviceSetting.ServiceCategoryInARow,
                 ServiceCategoryCount = serviceSetting.ServiceCategoryCount,
                 IsEnableServiceRss = serviceSetting.IsEnableServiceRss,
                 ServiceRssCount = serviceSetting.ServiceRssCount,
                 ServiceRssPage = serviceSetting.ServiceRssPage,
                 ServiceDetailsPage = serviceSetting.ServiceDetailsPage,
                 ServiceItemDetailPage = serviceSetting.ServiceItemDetailsPage,
                 BookAnAppointmentPage = serviceSetting.BookAnAppointmentPage,
                 AppointmentSuccessPage = serviceSetting.AppointmentSuccessPage
             };
             Settings = json_serializer.Serialize(obj);
         }
     }
 }
 private void GetAllCategoryForSearch(AspxCommonInfo aspxCommonObj, string modulePath, string pageExtension)
 {
     bool isActive = true;
     string prefix = "---";
     List<CategoryInfo> lstCategory = AspxSearchController.GetAllCategoryForSearch(prefix, isActive, aspxCommonObj);
     if (lstCategory != null && lstCategory.Count > 0)
     {
         Elements = new StringBuilder();
         Elements.Append("<select id=\"sfSimpleSearchCategory\">");
         Elements.Append("<option value=\"0\" ><a href=\"#\"><span class=\"value\" category=\"--All Category--\">");
         Elements.Append(getLocale("--All Category--"));
         Elements.Append("</span></a></option>");
         foreach (CategoryInfo item in lstCategory)
         {
             Elements.Append("<option value=\"");
             Elements.Append(item.CategoryID);
             Elements.Append("\" isGiftCard=\"");
             Elements.Append(item.IsChecked);
             Elements.Append("\"><a href=\"#\"><span class=\"value\" category=\"");
             Elements.Append(item.LevelCategoryName);
             Elements.Append("\">");
             Elements.Append(item.LevelCategoryName);
             Elements.Append("</span></a></option>");
         }
         Elements.Append("</select>");
         litSSCat.Text = Elements.ToString();
     }
 }
Esempio n. 27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        HttpContext.Current.Response.Cache.SetAllowResponseInBrowserHistory(false);
        HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
        HttpContext.Current.Response.Cache.SetNoStore();
        Response.Cache.SetExpires(DateTime.Now);
        Response.Cache.SetValidUntilExpires(true);

        GetPortalCommonInfo(out StoreID, out PortalID, out CustomerID, out UserName, out CultureName, out SessionCode);
        aspxCommonObj = new AspxCommonInfo(StoreID, PortalID, UserName, CultureName, CustomerID, SessionCode);

        UserModuleIDCart = int.Parse(SageUserModuleID);

        try
        {
            CartModulePath = ResolveUrl(this.AppRelativeTemplateSourceDirectory);
            SageFrameConfig pagebase = new SageFrameConfig();            

            string template = TemplateName;
            StoreSettingConfig ssc = new StoreSettingConfig();
            ssc.GetStoreSettingParamNine(StoreSetting.DefaultProductImageURL,
                                        StoreSetting.AllowMultipleShippingAddress,
                                        StoreSetting.ShowItemImagesInCart,
                                        StoreSetting.MinimumCartSubTotalAmount,
                                        StoreSetting.AllowOutStockPurchase,
                                        StoreSetting.MultiCheckOutURL,
                                        StoreSetting.AllowShippingRateEstimate,
                                        StoreSetting.AllowCouponDiscount,
                                        StoreSetting.AllowRealTimeNotifications,
                                        out NoImageMyCartPath,
                                        out AllowMultipleAddShipping,
                                        out ShowItemImagesOnCart,
                                        out MinCartSubTotalAmount,
                                        out AllowOutStockPurchase,
                                        out MultipleAddressChkOutURL,
                                        out AllowShippingRateEstimate,
                                        out AllowCouponDiscount,
                                        out AllowRealTimeNotifications,
                                        StoreID,
                                        PortalID,
                                        CultureName
                                        );

            if (!IsPostBack)
            {
                IncludeCss("MyCart", "/Templates/" + template + "/css/GridView/tablesort.css",
                           "/Templates/" + template + "/css/MessageBox/style.css",
                           "/Templates/", template, "/css/ToolTip/tooltip.css",
                           "/Modules/AspxCommerce/AspxCart/css/module.css");
                IncludeJs("MyCart","/Modules/AspxCommerce/AspxCart/js/MyCart.js", "/js/encoder.js", "/js/MessageBox/alertbox.js", "/js/jquery.easing.1.3.js", "/js/jquery.tipsy.js", "/js/Session.js");
            }
            DisplayCartItems(template);
            IncludeLanguageJS();
            CouponInfo();
        }
        catch (Exception ex)
        {
            ProcessException(ex);
        }
    }
 protected void Button1_Click(object sender, EventArgs e)
 {
   
     try
     {
         DataTable resultsData = new DataTable();
         AspxCommonInfo aspxCommonObj = new AspxCommonInfo();
         aspxCommonObj.StoreID = GetStoreID;
         aspxCommonObj.PortalID = GetPortalID;
         aspxCommonObj.CultureName = GetCurrentCultureName;
         StoreSettingConfig ssc = new StoreSettingConfig();
         string CurrencyCode = ssc.GetStoreSettingsByKey(StoreSetting.MainCurrency, GetStoreID, GetPortalID, CultureName);
         string CurrencySymbol = StoreSetting.GetSymbolFromCurrencyCode(CurrencyCode, GetStoreID, GetPortalID);
         List<KeyValuePair<string, object>> parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         parameter.Add(new KeyValuePair<string, object>("@CurrencySymbol", CurrencySymbol));
         parameter.Add(new KeyValuePair<string, object>("@GiftCardType", _csvGiftCardHiddenCsv.Value));
         string filename = "MyReport_GiftCardItems" + "_" + DateTime.Now.ToString("M_dd_yyyy_H_M_s") + ".xls";
         string filePath = HttpContext.Current.Server.MapPath(ResolveUrl(this.AppRelativeTemplateSourceDirectory)) + filename;
         ExportLargeData excelLdata = new ExportLargeData();
         excelLdata.ExportTOExcel(filePath, "[dbo].[usp_Aspx_GetGiftCardReportsForExport]", parameter, resultsData);
     }
     catch (Exception ex)
     {
         ProcessException(ex);
     }
 }
    public void BindCurrencyList(AspxCommonInfo aspxCommonObj)
    {
        string aspxRootPath = ResolveUrl("~/");
        List<CurrencyInfo> lstCurrency = AspxCurrencyController.BindCurrencyList(aspxCommonObj);
        if (lstCurrency != null && lstCurrency.Count > 0)
        {
            StringBuilder options = new StringBuilder();
            options.Append("<select id=\"ddlCurrency\" class=\"makeMeFancy\">");
           

            foreach (CurrencyInfo item in lstCurrency)
            {
                if (item.CurrencyCode == SelectedCurrency)
                {
                    options.Append("<option selected=\"selected\" data-icon=\"");
                    options.Append(aspxRootPath);
                    options.Append("images/flags/");
                    options.Append(item.BaseImage);
                    options.Append("\"  data-html-text=\"");
                    options.Append(item.CurrencySymbol);
                    options.Append("-");
                    options.Append(item.CurrencyCode);
                    options.Append("\" region=");
                    options.Append(item.Region);
                    options.Append("  value=\"");
                    options.Append(item.CurrencyCode);
                    options.Append("\" >");
                    options.Append(item.CurrencySymbol);
                    options.Append("-");
                    options.Append(item.CurrencyCode);
                    options.Append("</option>");
                }
                else
                {
                    options.Append("<option data-icon=\"");
                    options.Append(aspxRootPath);
                    options.Append("images/flags/");
                    options.Append(item.BaseImage);
                    options.Append("\"  data-html-text=\"");
                    options.Append(item.CurrencySymbol);
                    options.Append("-");
                    options.Append(item.CurrencyCode);
                    options.Append("\" region=");
                    options.Append(item.Region);

                    options.Append("  value=\"");
                    options.Append(item.CurrencyCode);
                    options.Append("\" >");
                    options.Append(item.CurrencySymbol);
                    options.Append("-");
                    options.Append(item.CurrencyCode);
                    options.Append("</option>");
                }
            }
            options.Append("</select>");
            litCurrency.Text = options.ToString();

        }
    }
        public static void ImageBuilder(string imageFile, ImageType type, bool IsInTempFolder,AspxCommonInfo aspxCommonObj)
        {

            try
            {
                bool disposeSource = true;
                bool addFileExtensions = true;
                string tempFolder = string.Empty;
                string filename = imageFile;
                bool isExistImage = false;
                var resizeSetings = new ResizeSettings();
                resizeSetings.Format = "jpg";
                resizeSetings.Mode = FitMode.Max;
                switch (type)
                {
                    case ImageType.Large:
                        {
                            isExistImage = CheckIfImageExists(ImageType.Large, filename);
                            if (!(isExistImage))
                            {
                               ImageSettings imgStng=new ImageSettings(aspxCommonObj);
                               resizeSetings.MaxWidth = imgStng.itemLargeThumbNailWidth;
                               resizeSetings.MaxHeight = imgStng.itemLargeThumbNailHeight;
                               copyOriginalImageToRespectives(ImageType.Large, filename, resizeSetings,disposeSource, addFileExtensions);
                            }
                            break;
                        }
                    case ImageType.Medium:
                        {
                            isExistImage = CheckIfImageExists(ImageType.Medium, filename);
                            if (!(isExistImage))
                            {
                                ImageSettings imgStng = new ImageSettings(aspxCommonObj);
                                resizeSetings.MaxWidth = imgStng.itemMediumThumbNailWidth;
                                resizeSetings.MaxHeight = imgStng.itemMediumThumbNailHeight;
                                copyOriginalImageToRespectives(ImageType.Medium, filename, resizeSetings, disposeSource, addFileExtensions);
                            }
                            break;
                        }
                    case ImageType.Small:
                        {
                            isExistImage = CheckIfImageExists(ImageType.Medium, filename);
                            if (!(isExistImage))
                            {
                                ImageSettings imgStng = new ImageSettings(aspxCommonObj);
                                resizeSetings.MaxWidth = imgStng.itemSmallThumbNailWidth;
                                resizeSetings.MaxHeight = imgStng.itemSmallThumbNailHeight;
                                copyOriginalImageToRespectives(ImageType.Medium, filename, resizeSetings, disposeSource, addFileExtensions);
                            }
                            break;
                        }

                }

            }
            catch
            {
            }
        }
 public static List <ItemReviewDetailsInfo> GetItemRatingByReviewID(int itemReviewID, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         OracleHandler sqlH = new OracleHandler();
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("ItemReviewID", itemReviewID));
         List <ItemReviewDetailsInfo> lstItemRVDetail = sqlH.ExecuteAsList <ItemReviewDetailsInfo>("usp_Aspx_GetItemReviewDetails", parameter);
         return(lstItemRVDetail);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
        public List <ShippingMethodInfo> GetShippingMethods(int offset, int limit, ShippingMethodInfoByProvider shippingMethodObj, AspxCommonInfo aspxCommonObj)
        {
            List <ShippingMethodInfo> shipping;
            SQLHandler sqlH = new SQLHandler();
            List <KeyValuePair <string, object> > parameterCollection = new List <KeyValuePair <string, object> >();

            parameterCollection.Add(new KeyValuePair <string, object>("@offset", offset));
            parameterCollection.Add(new KeyValuePair <string, object>("@limit", limit));
            parameterCollection.Add(new KeyValuePair <string, object>("@ShippingMethodName", shippingMethodObj.ShippingMethodName));
            parameterCollection.Add(new KeyValuePair <string, object>("@DeliveryTime", shippingMethodObj.DeliveryTime));
            parameterCollection.Add(new KeyValuePair <string, object>("@WeightLimitFrom", shippingMethodObj.WeightLimitFrom));
            parameterCollection.Add(new KeyValuePair <string, object>("@WeightLimitTo", shippingMethodObj.WeightLimitTo));
            parameterCollection.Add(new KeyValuePair <string, object>("@IsActive", shippingMethodObj.IsActive));
            parameterCollection.Add(new KeyValuePair <string, object>("@StoreID", aspxCommonObj.StoreID));
            parameterCollection.Add(new KeyValuePair <string, object>("@PortalID", aspxCommonObj.PortalID));
            parameterCollection.Add(new KeyValuePair <string, object>("@CultureName", aspxCommonObj.CultureName));
            shipping = sqlH.ExecuteAsList <ShippingMethodInfo>("usp_Aspx_BindShippingMethodInGrid", parameterCollection);
            return(shipping);
        }
 public void SaveAndUpdateShippings(int shippingMethodID, string shippingMethodName, string imagePath, string alternateText, int displayOrder, string deliveryTime,
                                    decimal weightLimitFrom, decimal weightLimitTo, int shippingProviderID, bool isActive, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = new List <KeyValuePair <string, object> >();
         parameter.Add(new KeyValuePair <string, object>("@ShippingMethodID", shippingMethodID));
         parameter.Add(new KeyValuePair <string, object>("@ShippingMethodName", shippingMethodName));
         parameter.Add(new KeyValuePair <string, object>("@ImagePath", imagePath));
         parameter.Add(new KeyValuePair <string, object>("@AlternateText", alternateText));
         parameter.Add(new KeyValuePair <string, object>("@DisplayOrder", displayOrder));
         parameter.Add(new KeyValuePair <string, object>("@DeliveryTime", deliveryTime));
         parameter.Add(new KeyValuePair <string, object>("@WeightLimitFrom", weightLimitFrom));
         parameter.Add(new KeyValuePair <string, object>("@WeightLimitTo", weightLimitTo));
         parameter.Add(new KeyValuePair <string, object>("@ShippingProviderID", shippingProviderID));
         parameter.Add(new KeyValuePair <string, object>("@StoreID", aspxCommonObj.StoreID));
         parameter.Add(new KeyValuePair <string, object>("@PortalID", aspxCommonObj.PortalID));
         parameter.Add(new KeyValuePair <string, object>("@IsActive", isActive));
         parameter.Add(new KeyValuePair <string, object>("@UserName", aspxCommonObj.UserName));
         parameter.Add(new KeyValuePair <string, object>("@CultureName", aspxCommonObj.CultureName));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_SaveAndUpdateShippingMethods", parameter);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 34
0
        //--------------------------get customer class----------------

        public static List <TaxManageRulesInfo> GetTaxRules(int offset, int limit, TaxRuleDataInfo taxRuleDataObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("offset", offset));
                parameter.Add(new KeyValuePair <string, object>("limit", limit));
                parameter.Add(new KeyValuePair <string, object>("RuleName", taxRuleDataObj.TaxManageRuleName));
                parameter.Add(new KeyValuePair <string, object>("RoleName", taxRuleDataObj.RoleName));
                parameter.Add(new KeyValuePair <string, object>("ItemClassName", taxRuleDataObj.TaxItemClassName));
                parameter.Add(new KeyValuePair <string, object>("RateTitle", taxRuleDataObj.TaxRateTitle));
                parameter.Add(new KeyValuePair <string, object>("SearchPriority", taxRuleDataObj.Priority));
                parameter.Add(new KeyValuePair <string, object>("SearchDisplayOrder", taxRuleDataObj.DisplayOrder));
                OracleHandler             sqlh         = new OracleHandler();
                List <TaxManageRulesInfo> lstTaxManage = sqlh.ExecuteAsList <TaxManageRulesInfo>("usp_Aspx_GetTaxManageRules", parameter);
                return(lstTaxManage);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Esempio n. 35
0
        //-------------------save item tax class--------------------

        public static void SaveAndUpdateTaxItemClass(int taxItemClassID, string taxItemClassName, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("TaxItemClassID", taxItemClassID));
                parameter.Add(new KeyValuePair <string, object>("TaxItemClassName", taxItemClassName));
                OracleHandler sqlh = new OracleHandler();
                sqlh.ExecuteNonQuery("usp_Aspx_SaveAndUpdateTaxItemClass", parameter);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
 public static List <RatingLatestInfo> GetRecentItemReviewsAndRatings(int offset, int limit, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         OracleHandler sqlH = new OracleHandler();
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("offset", offset));
         parameter.Add(new KeyValuePair <string, object>("limit", limit));
         List <RatingLatestInfo> lstRatingNew = sqlH.ExecuteAsList <RatingLatestInfo>("usp_Aspx_GetRecentReviewsAndRatings", parameter);
         return(lstRatingNew);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
        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 bool CheckItemOutOfStock(int itemID, string costVariantsValueIDs, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSP(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("ItemID", itemID));
         parameter.Add(new KeyValuePair <string, object>("CostVariantsValueIDs", costVariantsValueIDs));
         OracleHandler sqlH = new OracleHandler();
         string        i    = sqlH.ExecuteNonQueryAsGivenType <string>("usp_Aspx_CheckItemOutOfStock", parameter, "IsOutOfStock");
         return(Convert.ToBoolean(i));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Esempio n. 39
0
 public static void ReturnSaveUpdate(ReturnSaveUpdateInfo ReturnSaveUpdateObj, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetFParamNoU(aspxCommonObj);
         parameterCollection.Add(new KeyValuePair <string, object>("@OrderID", ReturnSaveUpdateObj.OrderID));
         parameterCollection.Add(new KeyValuePair <string, object>("@ItemID", ReturnSaveUpdateObj.ItemID));
         parameterCollection.Add(new KeyValuePair <string, object>("@ItemName", ReturnSaveUpdateObj.ItemName));
         parameterCollection.Add(new KeyValuePair <string, object>("@CostVariantValueIDs", ReturnSaveUpdateObj.CostVariantIDs));
         parameterCollection.Add(new KeyValuePair <string, object>("@CostVariant", ReturnSaveUpdateObj.CostVariants));
         parameterCollection.Add(new KeyValuePair <string, object>("@Quantity", ReturnSaveUpdateObj.Quantity));
         parameterCollection.Add(new KeyValuePair <string, object>("@ReturnProductStatusID", ReturnSaveUpdateObj.ProductStatusID));
         parameterCollection.Add(new KeyValuePair <string, object>("@ReturnReasonID", ReturnSaveUpdateObj.ReturnReasonID));
         parameterCollection.Add(new KeyValuePair <string, object>("@OtherDetails", ReturnSaveUpdateObj.OtherDetails));
         parameterCollection.Add(new KeyValuePair <string, object>("@ReturnShippingAddressID", ReturnSaveUpdateObj.ReturnShippingAddressID));
         parameterCollection.Add(new KeyValuePair <string, object>("@AddedBy", aspxCommonObj.UserName));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_ReturnSaveUpdate", parameterCollection);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 40
0
 public static List <MyOrderListForReturnInfo> GetMyOrderListForReturn(int orderID, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPCtC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("@OrderID", orderID));
         SQLHandler sqlH = new SQLHandler();
         List <MyOrderListForReturnInfo> lstMyOrder = sqlH.ExecuteAsList <MyOrderListForReturnInfo>("usp_Aspx_GetMyOrdersForReturn", parameter);
         return(lstMyOrder);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 41
0
 public static List <ShareWishListItemInfo> GetShareWishListItemByID(int sharedWishID, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("@SharedWishID", sharedWishID));
         SQLHandler sqlH = new SQLHandler();
         List <ShareWishListItemInfo> lstShareWishItem = sqlH.ExecuteAsList <ShareWishListItemInfo>("[dbo].[usp_Aspx_GetShareWishListByID]", parameter);
         return(lstShareWishItem);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 42
0
        public static void UpdateUserProductReview(ItemReviewBasicInfo productReviewObj, AspxCommonInfo aspxCommonObj)
        {
            List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPU(aspxCommonObj);

            parameter.Add(new KeyValuePair <string, object>("@ItemID", productReviewObj.ItemID));
            parameter.Add(new KeyValuePair <string, object>("@ItemReviewID", productReviewObj.ItemReviewID));
            parameter.Add(new KeyValuePair <string, object>("@RatingIDs", productReviewObj.RatingIDs));
            parameter.Add(new KeyValuePair <string, object>("@RatingValues", productReviewObj.RatingValues));
            parameter.Add(new KeyValuePair <string, object>("@ReviewSummary", productReviewObj.ReviewSummary));
            parameter.Add(new KeyValuePair <string, object>("@Review", productReviewObj.Review));
            SQLHandler sqlH = new SQLHandler();

            sqlH.ExecuteNonQuery("usp_Aspx_GetUserProductReviewUpdate", parameter);
        }
Esempio n. 43
0
 //--------------------bind ShareWishList Email  in Grid--------------------------
 public static List <ShareWishListItemInfo> GetAllShareWishListItemMail(int offset, int limit, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("@offset", offset));
         parameter.Add(new KeyValuePair <string, object>("@limit", limit));
         SQLHandler sqlH = new SQLHandler();
         List <ShareWishListItemInfo> lstShareWishItem = sqlH.ExecuteAsList <ShareWishListItemInfo>("[dbo].[usp_Aspx_GetShareWishListMailDetailGrid]", parameter);
         return(lstShareWishItem);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 44
0
        //---------------User Item Reviews and Ratings-----------------------

        public static List <UserRatingInformationInfo> GetUserReviewsAndRatings(int offset, int limit, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("@offset", offset));
                parameter.Add(new KeyValuePair <string, object>("@limit", limit));
                SQLHandler sqlH = new SQLHandler();
                List <UserRatingInformationInfo> bind = sqlH.ExecuteAsList <UserRatingInformationInfo>("usp_Aspx_GetUserItemReviews", parameter);
                return(bind);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        public static int AddItemstoCartFromDetail(AddItemToCartInfo AddItemToCartObj, AspxCommonInfo aspxCommonObj, GiftCard giftCardDetail, CartKit kitInfo)
        {
            try
            {
                StoreSettingConfig ssc = new StoreSettingConfig();
                if (AspxCartController.CheckItemCart(AddItemToCartObj.ItemID, aspxCommonObj.StoreID, aspxCommonObj.PortalID, AddItemToCartObj.CostVariantIDs))
                {
                    decimal cartItemId = 0;
                    if (AddItemToCartObj.IsKitItem)
                    {
                        //if kit type
                        //logic
                        // serialize
                        //   kitInfo.Data into string and save it db and also description
                        //++price and weight will be from kit info it contains total configured price and weight
                        JavaScriptSerializer json_serializer = new JavaScriptSerializer();
                        string kitconfigureddata             = json_serializer.Serialize(kitInfo.Data);

                        List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUS(aspxCommonObj);
                        parameter.Add(new KeyValuePair <string, object>("ItemID", AddItemToCartObj.ItemID));
                        parameter.Add(new KeyValuePair <string, object>("Price", kitInfo.Price));
                        parameter.Add(new KeyValuePair <string, object>("Weight", kitInfo.Weight));
                        parameter.Add(new KeyValuePair <string, object>("Quantity", AddItemToCartObj.Quantity));
                        parameter.Add(new KeyValuePair <string, object>("CostVariantsValueIDs", AddItemToCartObj.CostVariantIDs));
                        parameter.Add(new KeyValuePair <string, object>("KitDescription", kitInfo.Description));
                        parameter.Add(new KeyValuePair <string, object>("KitData", kitconfigureddata));
                        OracleHandler sqlH = new OracleHandler();
                        //cartItemId = sqlH.ExecuteAsScalar<int>("usp_Aspx_AddToCart", parameter);
                        cartItemId = sqlH.ExecuteAsScalar <decimal>("usp_Aspx_AddToCart", parameter);
                    }
                    else
                    {
                        List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUS(aspxCommonObj);
                        parameter.Add(new KeyValuePair <string, object>("ItemID", AddItemToCartObj.ItemID));
                        parameter.Add(new KeyValuePair <string, object>("Price", AddItemToCartObj.Price));
                        parameter.Add(new KeyValuePair <string, object>("Weight", AddItemToCartObj.Weight));
                        parameter.Add(new KeyValuePair <string, object>("Quantity", AddItemToCartObj.Quantity));
                        parameter.Add(new KeyValuePair <string, object>("CostVariantsValueIDs", AddItemToCartObj.CostVariantIDs));
                        parameter.Add(new KeyValuePair <string, object>("KitDescription", null));
                        parameter.Add(new KeyValuePair <string, object>("KitData", null));
                        OracleHandler sqlH = new OracleHandler();
                        cartItemId = sqlH.ExecuteAsScalar <decimal>("usp_Aspx_AddToCart", parameter);
                    }

                    if (AddItemToCartObj.IsGiftCard == true && giftCardDetail != null)
                    {
                        List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >();
                        param.Add(new KeyValuePair <string, object>("CartItemId", cartItemId));
                        param.Add(new KeyValuePair <string, object>("ItemId", AddItemToCartObj.ItemID));
                        param.Add(new KeyValuePair <string, object>("GiftCardTypeId", giftCardDetail.GiftCardTypeId));
                        param.Add(new KeyValuePair <string, object>("GiftCardGraphicsId", giftCardDetail.GraphicThemeId));
                        param.Add(new KeyValuePair <string, object>("Amount", giftCardDetail.Price));
                        param.Add(new KeyValuePair <string, object>("GiftCardCode", giftCardDetail.GiftCardCode));
                        param.Add(new KeyValuePair <string, object>("RecipientName", giftCardDetail.RecipientName));
                        param.Add(new KeyValuePair <string, object>("RecipientEmail", giftCardDetail.RecipientEmail));
                        param.Add(new KeyValuePair <string, object>("SenderName", giftCardDetail.SenderName));
                        param.Add(new KeyValuePair <string, object>("SenderEmail", giftCardDetail.SenderEmail));
                        param.Add(new KeyValuePair <string, object>("Messege", giftCardDetail.Messege));
                        param.Add(new KeyValuePair <string, object>("StoreId", aspxCommonObj.StoreID));
                        param.Add(new KeyValuePair <string, object>("PortalId", aspxCommonObj.PortalID));
                        param.Add(new KeyValuePair <string, object>("CultureName", aspxCommonObj.CultureName));
                        param.Add(new KeyValuePair <string, object>("UserName", aspxCommonObj.UserName));
                        OracleHandler sqlH = new OracleHandler();
                        sqlH.ExecuteNonQuery("usp_Aspx_AddGiftCard", param);
                    }
                    return(1);
                }
                else
                {
                    if (bool.Parse(ssc.GetStoreSettingsByKey(StoreSetting.AllowOutStockPurchase, aspxCommonObj.StoreID, aspxCommonObj.PortalID, aspxCommonObj.CultureName)))
                    {
                        int cartItemId = 0;
                        if (AddItemToCartObj.IsKitItem)
                        {
                            List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUS(aspxCommonObj);
                            parameter.Add(new KeyValuePair <string, object>("ItemID", AddItemToCartObj.ItemID));
                            parameter.Add(new KeyValuePair <string, object>("Price", AddItemToCartObj.Price));
                            parameter.Add(new KeyValuePair <string, object>("Weight", AddItemToCartObj.Weight));
                            parameter.Add(new KeyValuePair <string, object>("Quantity", AddItemToCartObj.Quantity));
                            parameter.Add(new KeyValuePair <string, object>("CostVariantsValueIDs", AddItemToCartObj.CostVariantIDs));
                            parameter.Add(new KeyValuePair <string, object>("KitDescription", null));
                            parameter.Add(new KeyValuePair <string, object>("KitData", null));
                            OracleHandler sqlH = new OracleHandler();
                            cartItemId = sqlH.ExecuteAsScalar <int>("usp_Aspx_AddToCart", parameter);
                        }
                        else
                        {
                            List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUS(aspxCommonObj);
                            parameter.Add(new KeyValuePair <string, object>("ItemID", AddItemToCartObj.ItemID));
                            parameter.Add(new KeyValuePair <string, object>("Price", AddItemToCartObj.Price));
                            parameter.Add(new KeyValuePair <string, object>("Weight", AddItemToCartObj.Weight));
                            parameter.Add(new KeyValuePair <string, object>("Quantity", AddItemToCartObj.Quantity));
                            parameter.Add(new KeyValuePair <string, object>("CostVariantsValueIDs", AddItemToCartObj.CostVariantIDs));
                            parameter.Add(new KeyValuePair <string, object>("KitDescription", null));
                            parameter.Add(new KeyValuePair <string, object>("KitData", null));
                            OracleHandler sqlH = new OracleHandler();
                            cartItemId = sqlH.ExecuteAsScalar <int>("usp_Aspx_AddToCart", parameter);
                        }


                        if (AddItemToCartObj.IsGiftCard == true && giftCardDetail != null)
                        {
                            List <KeyValuePair <string, object> > param = new List <KeyValuePair <string, object> >();
                            param.Add(new KeyValuePair <string, object>("CartItemId", cartItemId));
                            param.Add(new KeyValuePair <string, object>("ItemId", AddItemToCartObj.ItemID));
                            param.Add(new KeyValuePair <string, object>("GiftCardTypeId", giftCardDetail.GiftCardTypeId));
                            param.Add(new KeyValuePair <string, object>("GiftCardGraphicsId", giftCardDetail.GraphicThemeId));
                            param.Add(new KeyValuePair <string, object>("Amount", giftCardDetail.Price));
                            param.Add(new KeyValuePair <string, object>("GiftCardCode", giftCardDetail.GiftCardCode));
                            param.Add(new KeyValuePair <string, object>("RecipientName", giftCardDetail.RecipientName));
                            param.Add(new KeyValuePair <string, object>("RecipientEmail", giftCardDetail.RecipientEmail));
                            param.Add(new KeyValuePair <string, object>("SenderName", giftCardDetail.SenderName));
                            param.Add(new KeyValuePair <string, object>("SenderEmail", giftCardDetail.SenderEmail));
                            param.Add(new KeyValuePair <string, object>("Messege", giftCardDetail.Messege));
                            param.Add(new KeyValuePair <string, object>("StoreId", aspxCommonObj.StoreID));
                            param.Add(new KeyValuePair <string, object>("PortalId", aspxCommonObj.PortalID));
                            param.Add(new KeyValuePair <string, object>("CultureName", aspxCommonObj.CultureName));
                            param.Add(new KeyValuePair <string, object>("UserName", aspxCommonObj.UserName));
                            OracleHandler sqlH = new OracleHandler();
                            sqlH.ExecuteNonQuery("usp_Aspx_AddGiftCard", param);
                        }
                        return(1);
                    }
                    else
                    {
                        return(2);
                    }
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        public List <ShippingMethodInfoByProvider> GetShippingMethodsByProvider(int offset, int limit, int shippingProviderId, AspxCommonInfo aspxCommonObj)
        {
            var sqlH = new SQLHandler();
            var parameterCollection = new List <KeyValuePair <string, object> >();

            parameterCollection.Add(new KeyValuePair <string, object>("@offset", offset));
            parameterCollection.Add(new KeyValuePair <string, object>("@limit", limit));
            parameterCollection.Add(new KeyValuePair <string, object>("@ShippingProviderId", shippingProviderId));
            parameterCollection.Add(new KeyValuePair <string, object>("@StoreID", aspxCommonObj.StoreID));
            parameterCollection.Add(new KeyValuePair <string, object>("@PortalID", aspxCommonObj.PortalID));
            parameterCollection.Add(new KeyValuePair <string, object>("@CultureName", aspxCommonObj.CultureName));
            var shipping = sqlH.ExecuteAsList <ShippingMethodInfoByProvider>("usp_Aspx_GetShippingMethodbyProvider", parameterCollection);

            return(shipping);
        }
        public static List <SearchTermInfo> GetSearchStatistics(int count, string commandName, AspxCommonInfo aspxCommonObj)
        {
            List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);

            parameter.Add(new KeyValuePair <string, object>("Count", count));
            parameter.Add(new KeyValuePair <string, object>("CommandName", commandName));
            OracleHandler         sqlH          = new OracleHandler();
            List <SearchTermInfo> lstSearchTerm = sqlH.ExecuteAsList <SearchTermInfo>("usp_Aspx_GetSearchTermStatistics", parameter);

            return(lstSearchTerm);
        }
Esempio n. 48
0
 public static void ReturnShippingAddressSaveUpdate(AddressBasicInfo addressObj, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetFParamNoU(aspxCommonObj);
         parameterCollection.Add(new KeyValuePair <string, object>("@OrderID", addressObj.OrderID));
         parameterCollection.Add(new KeyValuePair <string, object>("@ItemID", addressObj.ItemID));
         parameterCollection.Add(new KeyValuePair <string, object>("@CostVariantValueIDs", addressObj.CostVariantIDs));
         parameterCollection.Add(new KeyValuePair <string, object>("@AddressID", addressObj.AddressID));
         parameterCollection.Add(new KeyValuePair <string, object>("@FirstName", addressObj.FirstName));
         parameterCollection.Add(new KeyValuePair <string, object>("@LastName", addressObj.LastName));
         parameterCollection.Add(new KeyValuePair <string, object>("@Company", addressObj.Company));
         parameterCollection.Add(new KeyValuePair <string, object>("@Address1", addressObj.Address1));
         parameterCollection.Add(new KeyValuePair <string, object>("@Address2", addressObj.Address2));
         parameterCollection.Add(new KeyValuePair <string, object>("@City", addressObj.City));
         parameterCollection.Add(new KeyValuePair <string, object>("@State", addressObj.State));
         parameterCollection.Add(new KeyValuePair <string, object>("@Country", addressObj.Country));
         parameterCollection.Add(new KeyValuePair <string, object>("@Zip", addressObj.Zip));
         parameterCollection.Add(new KeyValuePair <string, object>("@Email", addressObj.Email));
         parameterCollection.Add(new KeyValuePair <string, object>("@Phone", addressObj.Phone));
         parameterCollection.Add(new KeyValuePair <string, object>("@Mobile", addressObj.Mobile));
         parameterCollection.Add(new KeyValuePair <string, object>("@AddedBy", aspxCommonObj.UserName));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_ReturnShippingAddressSaveUpdate", parameterCollection);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 49
0
        //--------------customer tax classes------------------

        public static List <TaxCustomerClassInfo> GetTaxCustomerClassDetails(int offset, int limit, string className, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("offset", offset));
                parameter.Add(new KeyValuePair <string, object>("limit", limit));
                parameter.Add(new KeyValuePair <string, object>("ClassName", className));
                OracleHandler sqlh = new OracleHandler();
                List <TaxCustomerClassInfo> lstTaxCtClass = sqlh.ExecuteAsList <TaxCustomerClassInfo>("usp_Aspx_GetTaxCustomerClass", parameter);
                return(lstTaxCtClass);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Esempio n. 50
0
 public static List <MyReturnListInfo> GetMyReturnsList(int offset, int limit, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPCtC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("@offset", offset));
         parameter.Add(new KeyValuePair <string, object>("@limit", limit));
         SQLHandler sqlH = new SQLHandler();
         List <MyReturnListInfo> lstMyReturn = sqlH.ExecuteAsList <MyReturnListInfo>("[usp_Aspx_GetMyReturnsList]", parameter);
         return(lstMyReturn);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 51
0
        public static List <StoreTaxesInfo> GetStoreSalesTaxes(int offset, int limit, TaxDateData taxDataObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("offset", offset));
                parameter.Add(new KeyValuePair <string, object>("limit", limit));
                parameter.Add(new KeyValuePair <string, object>("TaxManageRuleName", taxDataObj.taxRuleName));

                OracleHandler sqlh = new OracleHandler();
                if (taxDataObj.monthly == true)
                {
                    return(sqlh.ExecuteAsList <StoreTaxesInfo>("usp_Aspx_GetTaxRuleForStoreTaxReport", parameter));
                }
                if (taxDataObj.weekly == true)
                {
                    return(sqlh.ExecuteAsList <StoreTaxesInfo>("usp_Aspx_GetTaxDetailsByCurrentMonth", parameter));
                }
                if (taxDataObj.hourly == true)
                {
                    return(sqlh.ExecuteAsList <StoreTaxesInfo>("usp_Aspx_GetTaxReportDetailsBy24hours", parameter));
                }
                else
                {
                    return(new List <StoreTaxesInfo>());
                }
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Esempio n. 52
0
        public static List <ReturnItemsInfo> GetMyReturnsDetails(RetunDetailsBasicInfo returnDetailObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetFParamNoSCode(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("@ReturnID", returnDetailObj.ReturnID));
                parameter.Add(new KeyValuePair <string, object>("@OrderID", returnDetailObj.OrderID));
                SQLHandler             sqlh = new SQLHandler();
                List <ReturnItemsInfo> info = sqlh.ExecuteAsList <ReturnItemsInfo>("usp_Aspx_GetMyReturnsDetails", parameter);
                return(info);
            }

            catch (Exception e)
            {
                throw e;
            }
        }
Esempio n. 53
0
        //--------------tax rates------------------

        public static List <TaxRateInfo> GetTaxRateDetails(int offset, System.Nullable <int> limit, TaxRateDataTnfo taxRateDataObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("offset", offset));
                parameter.Add(new KeyValuePair <string, object>("limit", limit));
                parameter.Add(new KeyValuePair <string, object>("TaxName", taxRateDataObj.TaxName));
                parameter.Add(new KeyValuePair <string, object>("SearchCountry", taxRateDataObj.Country));
                parameter.Add(new KeyValuePair <string, object>("SerachState", taxRateDataObj.State));
                parameter.Add(new KeyValuePair <string, object>("Zip", taxRateDataObj.Zip));
                OracleHandler      sqlh       = new OracleHandler();
                List <TaxRateInfo> lstTaxRate = sqlh.ExecuteAsList <TaxRateInfo>("usp_Aspx_GetTaxRates", parameter);
                return(lstTaxRate);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Esempio n. 54
0
 public static List <ReturnDetailsInfo> GetReturnDetails(int offset, System.Nullable <int> limit, AspxCommonInfo aspxCommonObj, RetunDetailsBasicInfo returnDetailObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPC(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("@offset", offset));
         parameter.Add(new KeyValuePair <string, object>("@limit", limit));
         parameter.Add(new KeyValuePair <string, object>("@ReturnID", returnDetailObj.ReturnID));
         parameter.Add(new KeyValuePair <string, object>("@OrderID", returnDetailObj.OrderID));
         parameter.Add(new KeyValuePair <string, object>("@UserName", returnDetailObj.CustomerName));
         parameter.Add(new KeyValuePair <string, object>("@StatusName", returnDetailObj.ReturnStatus));
         parameter.Add(new KeyValuePair <string, object>("@DateAdded", returnDetailObj.DateAdded));
         parameter.Add(new KeyValuePair <string, object>("@DateModified", returnDetailObj.DateModified));
         SQLHandler sqlH = new SQLHandler();
         List <ReturnDetailsInfo> info = sqlH.ExecuteAsList <ReturnDetailsInfo>("usp_Aspx_GetReturnDetails", parameter);
         return(info);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 55
0
        //-------------------------UserDashBoard/User Downloadable Items------------------------------

        public static List <DownloadableItemsByCustomerInfo> GetCustomerDownloadableItems(int offset, int limit, string sku, string name, AspxCommonInfo aspxCommonObj, bool isActive)
        {
            try
            {
                List <DownloadableItemsByCustomerInfo> ml;
                SQLHandler Sq = new SQLHandler();
                List <KeyValuePair <string, object> > parameterCollection = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                parameterCollection.Add(new KeyValuePair <string, object>("@offset", offset));
                parameterCollection.Add(new KeyValuePair <string, object>("@limit", limit));
                parameterCollection.Add(new KeyValuePair <string, object>("@SKU", sku));
                parameterCollection.Add(new KeyValuePair <string, object>("@Name", name));
                parameterCollection.Add(new KeyValuePair <string, object>("@IsActive", isActive));
                ml = Sq.ExecuteAsList <DownloadableItemsByCustomerInfo>("dbo.usp_Aspx_GetCustomerDownloadableItems", parameterCollection);
                return(ml);
            }

            catch (Exception e)
            {
                throw e;
            }
        }
Esempio n. 56
0
 public static void UpdateDownloadCount(int itemID, int orderItemID, string downloadIP, AspxCommonInfo aspxCommonObj)
 {
     try
     {
         List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPU(aspxCommonObj);
         parameter.Add(new KeyValuePair <string, object>("@ItemID", itemID));
         parameter.Add(new KeyValuePair <string, object>("@OrderItemID", orderItemID));
         parameter.Add(new KeyValuePair <string, object>("@DownloadIP", downloadIP));
         SQLHandler sqlH = new SQLHandler();
         sqlH.ExecuteNonQuery("usp_Aspx_UpdateDownloadCount", parameter);
     }
     catch (Exception e)
     {
         throw e;
     }
 }
Esempio n. 57
0
        public static List <ReturnsShippingInfo> GetMyReturnsShippingMethod(RetunDetailsBasicInfo returnDetailObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetFullParam(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("@ReturnID", returnDetailObj.ReturnID));
                parameter.Add(new KeyValuePair <string, object>("@OrderID", returnDetailObj.OrderID));
                SQLHandler sqlh = new SQLHandler();
                List <ReturnsShippingInfo> info;
                info = sqlh.ExecuteAsList <ReturnsShippingInfo>("usp_Aspx_GetShippingMethodByTotalWeightForReturn", parameter);
                return(info);
            }

            catch (Exception e)
            {
                throw e;
            }
        }
Esempio n. 58
0
        //---------------------update rating/ review Items From User DashBoard-----------------------

        public static void UpdateItemRatingByUser(ItemReviewBasicInfo updateItemRatingObj, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                SQLHandler sqlH = new SQLHandler();
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPU(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("@ReviewSummary", updateItemRatingObj.ReviewSummary));
                parameter.Add(new KeyValuePair <string, object>("@Review", updateItemRatingObj.Review));
                parameter.Add(new KeyValuePair <string, object>("@ItemReviewID", updateItemRatingObj.ItemReviewID));
                parameter.Add(new KeyValuePair <string, object>("@ItemID", updateItemRatingObj.ItemID));
                parameter.Add(new KeyValuePair <string, object>("@UserBy", aspxCommonObj.UserName));
                sqlH.ExecuteNonQuery("usp_Aspx_UpdateItemRatingByUser", parameter);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Esempio n. 59
0
        //-----------User DashBoard/Recent History-------------------

        public static List <UserRecentCompareInfo> GetUserRecentlyComparedItems(int offset, int limit, AspxCommonInfo aspxCommonObj)
        {
            try
            {
                List <KeyValuePair <string, object> > parameter = CommonParmBuilder.GetParamSPUC(aspxCommonObj);
                parameter.Add(new KeyValuePair <string, object>("@offset", offset));
                parameter.Add(new KeyValuePair <string, object>("@limit", limit));
                SQLHandler sqlH = new SQLHandler();
                List <UserRecentCompareInfo> lstUserRCompare = sqlH.ExecuteAsList <UserRecentCompareInfo>("usp_Aspx_GetUserRecentlyComparedItems", parameter);
                return(lstUserRCompare);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
Esempio n. 60
0
 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));
         SQLHandler sqlh = new SQLHandler();
         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;
     }
 }