public B2CSearchBlock Fetch()
        {
            B2CSearchBlock b2CSearchBlock = new B2CSearchBlock();

            _customerDataManagementContext.LoadStoredProc("dm.usp_B2CSearchBlock")
            .ExecuteStoredProc((handler) =>
            {
                b2CSearchBlock.Roles = handler.ReadToList <Role>();
                handler.NextResult();
                b2CSearchBlock.Experience = handler.ReadToList <TotalExperience>();
                handler.NextResult();
                b2CSearchBlock.Country = handler.ReadToList <SearchCountry>();
                handler.NextResult();
                b2CSearchBlock.State = handler.ReadToList <SearchState>();
                handler.NextResult();
                b2CSearchBlock.City = handler.ReadToList <SearchCity>();
                handler.NextResult();
                b2CSearchBlock.Area = handler.ReadToList <SearchArea>();
                handler.NextResult();
                b2CSearchBlock.Age = handler.ReadToList <SearchAge>();
                handler.NextResult();
                b2CSearchBlock.Salary = handler.ReadToList <SearchSalary>();
                handler.NextResult();
                b2CSearchBlock.Tags = handler.ReadToList <BToCTags>();
            });
            return(b2CSearchBlock);
        }
Ejemplo n.º 2
0
        public CustomerDataSearchBlock Fetch()
        {
            CustomerDataSearchBlock customerDataSearchBlock = new CustomerDataSearchBlock();

            _customerDataManagementContext.LoadStoredProc("dm.usp_CDSearchBlock")
            .ExecuteStoredProc((handler) =>
            {
                customerDataSearchBlock.Country = handler.ReadToList <SearchCountry>();
                handler.NextResult();
                customerDataSearchBlock.State = handler.ReadToList <SearchState>();
                handler.NextResult();
                customerDataSearchBlock.City = handler.ReadToList <SearchCity>();
                handler.NextResult();
                customerDataSearchBlock.Network = handler.ReadToList <SearchNetwork>();
                handler.NextResult();
                customerDataSearchBlock.BusinessVertical = handler.ReadToList <SearchBusinessVertical>();
                handler.NextResult();
                customerDataSearchBlock.CustomerName = handler.ReadToList <SearchCustomerName>();
                handler.NextResult();
                customerDataSearchBlock.DataQuality = handler.ReadToList <SearchDataQuality>();
                handler.NextResult();
                customerDataSearchBlock.Tags = handler.ReadToList <CustomerTags>();
            });
            return(customerDataSearchBlock);
        }
        public IEnumerable<SelectListItem> Get()
        {
            IList<Role> roles;
            IList<TotalExperience> experence;
            IList<SearchCountry> country;
            IList<SearchState> state;
            IList<SearchCity> city;
            IList<SearchArea> area;
            IList<SearchSalary> salary;
            IList<SearchAge> age;
            IList<BToCTags> tags;
            
            _customerDataManagementContext.LoadStoredProc("dm.usp_B2CSearchBlock")               
               .ExecuteStoredProc((handler) =>
               {
                   roles = handler.ReadToList<Role>();
                   handler.NextResult();
                   experence = handler.ReadToList<TotalExperience>();
                   handler.NextResult();
                   country = handler.ReadToList<SearchCountry>();
                   handler.NextResult();
                   state = handler.ReadToList<SearchState>();
                   handler.NextResult();
                   city = handler.ReadToList<SearchCity>();
                   handler.NextResult();
                   area = handler.ReadToList<SearchArea>();
                   handler.NextResult();
                   age = handler.ReadToList<SearchAge>();
                   handler.NextResult();
                   salary = handler.ReadToList<SearchSalary>();
                   handler.NextResult();
                   tags = handler.ReadToList<BToCTags>();
               });

            var area1 = _customerDataManagementContext.BusinessToCustomer
                .Select(x => x.City.Trim())
                .Distinct<string>()
                .OrderBy(x => x).ToArray();

            return area1.Where(x => !string.IsNullOrWhiteSpace(x)).Select(x =>
             new SelectListItem()
             {
                 Value = x,
                 Text = x
             }).AsEnumerable<SelectListItem>();
        }
        public B2BSearchBlock Fetch()
        {
            B2BSearchBlock b2BSearchBlock = new B2BSearchBlock();

            _customerDataManagementContext.LoadStoredProc("dm.usp_B2BSearchBlock")
            .ExecuteStoredProc((handler) =>
            {
                b2BSearchBlock.Country = handler.ReadToList <SearchCountry>();
                handler.NextResult();
                b2BSearchBlock.State = handler.ReadToList <SearchState>();
                handler.NextResult();
                b2BSearchBlock.City = handler.ReadToList <SearchCity>();
                handler.NextResult();
                b2BSearchBlock.Area = handler.ReadToList <SearchArea>();
                handler.NextResult();
                b2BSearchBlock.BusinessCategory = handler.ReadToList <BusinessCategory>();
                handler.NextResult();
                b2BSearchBlock.Desigination = handler.ReadToList <SearchDesigination>();
                handler.NextResult();
                b2BSearchBlock.Tags = handler.ReadToList <BToBTags>();
            });
            return(b2BSearchBlock);
        }