Ejemplo n.º 1
0
        public IActionResult Index()
        {
            var list = _countryRepos.GetAll().Select(u => new CountryVM
            {
                Id   = u.Id,
                Name = u.Name,
                Flag = "/Uploads/" + u.Flag
            }).ToList();;

            return(View(list));
        }
Ejemplo n.º 2
0
        //to direct to form page
        public IActionResult reqQuoteForm(string[] chkBoxArr2)
        {
            reqQuoteFormVM vm = new reqQuoteFormVM()
            {
                SelectCountry = _countryRepo.GetAll()
                                .Select(s => new SelectListItem {
                    Value = s.ID.ToString(), Text = s.CountryName
                })
                                .OrderBy(b => b.Text)
                                .ToList(),
                PropertyTypes        = _propertyRepo.GetAllPropertyTypes().ToList(),
                SelectPropertyStatus = _propertyRepo.GetAllPropertyStatus()
                                       .Select(s => new SelectListItem {
                    Value = s.ID.ToString(), Text = s.Status
                })
                                       .ToList(),
                SelectedServices = _reqQuoteRepo.GetServicesListById(chkBoxArr2).ToList()
            };

            return(View(vm));
        }