예제 #1
0
        public ActionResult Delete(int id)
        {
            bool rpta = rolservice.Delete(id);

            if (rpta)
            {
                return(RedirectToAction("Index"));
            }
            return(View());
        }
예제 #2
0
        public async Task <IActionResult> DeleteRol([FromRoute] int id)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            await _servicioRol.Delete(id);

            return(Ok());
        }
예제 #3
0
        public async Task <IActionResult> Remove(int id)
        {
            try
            {
                var firmaid =
                    HttpContext.Session.GetInt32(Metrics.SessionKeys.FirmaId).Value;
                await _rolService.Delete(id, firmaid);

                return(Json(true));
            }
            catch (Exception e)
            {
                return(Json(false));
            }
        }
예제 #4
0
 public async Task Delete(int id)
 {
     await _rolService.Delete(id);
 }
예제 #5
0
 public IActionResult Delete(int id)
 {
     //Guardando en la variable lo que encuentre accediendo al modelo buscando ese id
     return(Ok(_rolService.Delete(id)));
 }
예제 #6
0
 public IActionResult Delete(string id)
 {
     return(Ok(
                _RolService.Delete(id)
                ));
 }
예제 #7
0
 public ApiResultModel <bool> Delete([FromBody] ROL aux) => GetApiResultModel(() => _rolService.Delete(aux));
예제 #8
0
 public IHttpActionResult Delete(List <string> ids)
 {
     return(Ok(_service.Delete(ids)));
 }