예제 #1
0
        public IActionResult GetAjaxHandlerAddresses()
        {
            var adrressesVMs = _addressApplicationService.GetAll();

            return(Json(new
            {
                aaData = adrressesVMs,
                success = true
            }));
        }
예제 #2
0
        private void LoadDropDowns()
        {
            var addresses = _addressApplicationService.GetAll()
                            .Select(address => new SelectListItem
            {
                Value = address.DT_RowId,
                Text  = $"{address.Street} - {address.Number} - {address.City} - {address.CEP}"
            }).ToList();

            ViewData["Addresses"] = addresses;

            var optionsTypes = _clientApplicationService.GetAllOptionsTypes()
                               .Select(option => new SelectListItem
            {
                Value = option.DT_RowId,
                Text  = $"{option.Name} - {option.EClientType}"
            }).ToList();

            ViewData["OptionsTypes"] = optionsTypes;
        }