コード例 #1
0
        //------------------get items by dyanamic Advance serach-----------------------

        public List <AdvanceSearchDetailsInfo> GetItemsByDyanamicAdvanceSearch(int offset, int limit, AspxCommonInfo aspxCommonObj, ItemsByDynamicAdvanceSearchInfo searchObj)
        {
            string spName = string.Empty;

            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));
                parameter.Add(new KeyValuePair <string, object>("CategoryID", searchObj.CategoryID));
                parameter.Add(new KeyValuePair <string, object>("IsGiftCard", searchObj.IsGiftCard));
                parameter.Add(new KeyValuePair <string, object>("SearchText", searchObj.SearchText));
                parameter.Add(new KeyValuePair <string, object>("BrandID", searchObj.BrandID));
                parameter.Add(new KeyValuePair <string, object>("PriceFrom", searchObj.PriceFrom));
                parameter.Add(new KeyValuePair <string, object>("PriceTo", searchObj.PriceTo));
                parameter.Add(new KeyValuePair <string, object>("Attributes", searchObj.AttributeIDs));
                parameter.Add(new KeyValuePair <string, object>("RowTotal", searchObj.RowTotal));
                OracleHandler sqlH = new OracleHandler();
                if (searchObj.SortBy == 1)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByItemIDDesc]";
                }
                else if (searchObj.SortBy == 2)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByItemID]";
                }
                else if (searchObj.SortBy == 3)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByPriceDesc]";
                }
                else if (searchObj.SortBy == 4)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByPrice]";
                }
                else if (searchObj.SortBy == 5)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByName]";
                }
                else if (searchObj.SortBy == 6)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByViewCount]";
                }
                else if (searchObj.SortBy == 7)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByIsFeatured]";
                }
                else if (searchObj.SortBy == 8)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByIsSpecial]";
                }
                else if (searchObj.SortBy == 9)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortBySoldItem]";
                }
                else if (searchObj.SortBy == 10)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByDiscount]";
                }
                else if (searchObj.SortBy == 11)
                {
                    spName = "usp_Aspx_AdvanceSearchSortByRatedValue";
                }
                List <AdvanceSearchDetailsInfo> lstAdvanceSearch = sqlH.ExecuteAsList <AdvanceSearchDetailsInfo>(spName, parameter);
                return(lstAdvanceSearch);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
コード例 #2
0
 public List<AdvanceSearchDetailsInfo> GetItemsByDyanamicAdvanceSearch(int offset, int limit, AspxCommonInfo aspxCommonObj, ItemsByDynamicAdvanceSearchInfo searchObj)
 {
     try
     {
         AdvanceSearchController asc = new AdvanceSearchController();
         List<AdvanceSearchDetailsInfo> lstAdvanceSearch = asc.GetItemsByDyanamicAdvanceSearch(offset, limit, aspxCommonObj, searchObj);
         return lstAdvanceSearch;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
コード例 #3
0
        //------------------get items by dyanamic Advance serach-----------------------

        public List <AdvanceSearchDetailsInfo> GetItemsByDyanamicAdvanceSearch(int offset, int limit, AspxCommonInfo aspxCommonObj, ItemsByDynamicAdvanceSearchInfo searchObj)
        {
            try
            {
                AdvanceSearchProvider           asp = new AdvanceSearchProvider();
                List <AdvanceSearchDetailsInfo> lstAdvanceSearch = asp.GetItemsByDyanamicAdvanceSearch(offset, limit, aspxCommonObj, searchObj);
                return(lstAdvanceSearch);
            }
            catch (Exception e)
            {
                throw e;
            }
        }
コード例 #4
0
        //------------------get items by dyanamic Advance serach-----------------------

        public List<AdvanceSearchDetailsInfo> GetItemsByDyanamicAdvanceSearch(int offset, int limit, AspxCommonInfo aspxCommonObj, ItemsByDynamicAdvanceSearchInfo searchObj)
        {
            string spName = string.Empty;
            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));
                parameter.Add(new KeyValuePair<string, object>("@CategoryID", searchObj.CategoryID));
                parameter.Add(new KeyValuePair<string, object>("@IsGiftCard", searchObj.IsGiftCard));
                parameter.Add(new KeyValuePair<string, object>("@SearchText", searchObj.SearchText));
                parameter.Add(new KeyValuePair<string, object>("@BrandID", searchObj.BrandID));
                parameter.Add(new KeyValuePair<string, object>("@PriceFrom", searchObj.PriceFrom));
                parameter.Add(new KeyValuePair<string, object>("@PriceTo", searchObj.PriceTo));
                parameter.Add(new KeyValuePair<string, object>("@Attributes", searchObj.AttributeIDs));
                parameter.Add(new KeyValuePair<string, object>("@RowTotal", searchObj.RowTotal));
                SQLHandler sqlH = new SQLHandler();
                if (searchObj.SortBy == 1)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByItemIDDesc]";
                }
                else if (searchObj.SortBy == 2)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByItemID]";
                }
                else if (searchObj.SortBy == 3)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByPriceDesc]";
                }
                else if (searchObj.SortBy == 4)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByPrice]";
                }
                else if (searchObj.SortBy == 5)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByName]";
                }
                else if (searchObj.SortBy == 6)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByViewCount]";
                }
                else if (searchObj.SortBy == 7)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByIsFeatured]";
                }
                else if (searchObj.SortBy == 8)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByIsSpecial]";
                }
                else if (searchObj.SortBy == 9)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortBySoldItem]";
                }
                else if (searchObj.SortBy == 10)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByDiscount]";
                }
                else if (searchObj.SortBy == 11)
                {
                    spName = "[dbo].[usp_Aspx_AdvanceSearchSortByRatedValue]";
                }
                List<AdvanceSearchDetailsInfo> lstAdvanceSearch = sqlH.ExecuteAsList<AdvanceSearchDetailsInfo>(spName, parameter);
                return lstAdvanceSearch;

            }
            catch (Exception e)
            {
                throw e;
            }
        }