예제 #1
0
        public IActionResult OnGet(int id)
        {
            Empleados = empleadosMethods.GetEmpleadoById(id);

            if (Empleados == null)
            {
                return(RedirectToPage(""));
            }
            else
            {
                return(Page());
            }
        }
예제 #2
0
        public void OnGet(int?Id)
        {
            if (Id.HasValue)
            {
                Empleados = empleadosMethods.GetEmpleadoById(Id.Value);

                //Roles = rolesMethods.GetAllRoles().Select(r => new SelectListItem { Value = r.Id.ToString(), Text = r.Nombre }).ToList();
                Roles = new SelectList(rolesMethods.GetAllRoles(), "Id", "Nombre");
            }
            else
            {
                Empleados = new Empleado();
            }
        }
예제 #3
0
 public void OnGet(int id)
 {
     this.Empelados = empleadosMethods.GetEmpleadoById(id);
 }