Exemple #1
0
        public IEnumerable <Province> GetEstados()
        {
            Functions.WriteLog(TraceLevel.Info);
            var result = _appService.GetProvinces();

            Functions.WriteLog(TraceLevel.Info, args: result);
            return(result);
        }
        public async Task GetProvinceDropdown()
        {
            try
            {
                List <Province> prov   = new List <Province>();
                var             output = await _provinceAppService.GetProvinces(null, false);

                for (int i = 0; i < output.Count(); i++)
                {
                    prov.Add(new Province()
                    {
                        text = output[i].Description, parentId = output[i].Id.ToString()
                    });
                }
                ViewData["provinces"] = prov;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #3
0
        public async Task <ActionResult> Index()
        {
            var output = await _provinceAppService.GetProvinces(null, false);

            return(View(output));
        }