コード例 #1
0
        // GET: Ubicaciones/Details/5
        public async Task <IActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(NotFound());
            }
            UbicacionVendedor ubicacion = await _ubicacionesService.GetUbicacionVendedorById(id);

            if (ubicacion == null)
            {
                return(NotFound());
            }
            return(View(ubicacion));
        }
コード例 #2
0
        public async Task <IActionResult> Miperfil()
        {
            string   vendedorId    = _userManager.GetUserId(User);
            Vendedor nuevoVendedor = await _vendedoresService.ObtenerVendedorDesdedIdentity(vendedorId);

            UbicacionVendedor ubicacionVendedor = await _ubicacionesVendedoresService.GetUbicacionVendedorById(nuevoVendedor.Id);

            VendedorUbicacionVM vendedorUbicacionVM = new VendedorUbicacionVM()
            {
                vendedor  = nuevoVendedor,
                ubicacion = ubicacionVendedor
            };

            ViewData["VendedorUbicacionVM"] = vendedorUbicacionVM;
            return(View(nuevoVendedor));
        }