public async Task <ActionResult> Index(int?cityId                  = null, string cityDistrict = null
                                               , int?propertyTypeId        = null
                                               , string phoneNumber        = null, int?dealTypeId = null
                                               , int?contactedPersonTypeId = null
                                               , int?negotiationStateId    = null)
        {
            //Filling dropdowns
            ViewBag.PropertyTypes = await _propertyManager.GetPropertyTypes();

            ViewBag.Cities = await _cityManager.GetCitiesForDropDown(40);

            ViewBag.DealTypes = await _contactsDiaryServices.ListDealTypes();

            ViewBag.NegotiationStages = await _contactsDiaryServices.ListNegotiationStages();

            ViewBag.PersonTypes = await _contactsDiaryServices.ListPersonType();

            ViewBag.Agents = await _agentServices.GetAgentsForDropDown();

            //---------

            var records = await _contactsDiaryServices.List(cityId : cityId, propertyTypeId : propertyTypeId
                                                            , phoneNumber : phoneNumber, dealTypeId : dealTypeId
                                                            , contactedPersonTypeId : contactedPersonTypeId
                                                            , cityDistrict : cityDistrict, negotiationStateId : negotiationStateId);

            return(View(records));
        }
Esempio n. 2
0
        public async Task <ActionResult> Index()
        {
            var currentlyLoggedUserId = User.Identity.GetUserId();
            var questions             = await _agentQuestionServices.List(userIssuingTheQuestionsId : currentlyLoggedUserId);

            //Filters setup
            ViewBag.Agents = await _agentServices.GetAgentsForDropDown();

            //------------

            return(View(questions));
        }
        // GET: ColleaguesDiary
        public async Task <ActionResult> Index()
        {
            //Dropdowns Init
            ViewBag.Cities = await _cityManager.GetCitiesForDropDown(40);

            ViewBag.Agents = await _agentServices.GetAgentsForDropDown();

            ViewBag.PartnerTypes = await _partnersManager.ListTypes();

            //

            var currUserId = User.Identity.GetUserId();
            var partners   = await _partnersManager.ListAsync(currUserId);

            return(View(partners));
        }
        // GET: AgentMaterials
        public async Task <ActionResult> Index()
        {
            //Filters
            ViewBag.Agents = await _agentServices.GetAgentsForDropDown();

            //-------

            var files = await _filesManager.List(User.Identity.GetUserId());

            var folders = await _folderManager.List(User.Identity.GetUserId());

            return(View(new AgentMaterialsIndexViewModel
            {
                Files = files,
                Folders = folders
            }));
        }