public async Task <IActionResult> GetAllMainSubdivision()
        {
            var result = await _services.GetAllAsync();

            if (result.IsValid)
            {
                return(Ok(result.Result));
            }
            return(BadRequest(result.ErrorsList));
        }
Exemple #2
0
        public async Task <IActionResult> Index()
        {
            var result = await _services.GetAllAsync();

            if (result.IsValid)
            {
                return(View(result.Result));
            }
            TempData["ErrorsList"] = result.ErrorsList;
            return(View());
        }
Exemple #3
0
        public async Task <SelectList> GetMainSubdivision()
        {
            var subdivision = await _subdivisionsService.GetAllAsync();

            return(subdivision.IsValid ? new SelectList(subdivision.Result, "HashIdMain", "Name") : null);
        }
Exemple #4
0
        public async Task <IActionResult> Index()
        {
            var result = await _services.GetAllAsync();

            return(View(result));
        }
 public async Task <IActionResult> GetAllMainSubdivision()
 {
     return(Ok(await _services.GetAllAsync()));
 }