public async Task <IActionResult> Delete(String id) { var deleteRole = await _role.Delete(id); if (deleteRole) { return(RedirectToAction("Index")); } return(View()); }
public IActionResult DeleteRole(Role role) { var checkPerson = _roleRepo.Read(role.Id); if (checkPerson != null || checkPerson.Name != "Member") { _roleRepo.Delete(role.Id); return RedirectToAction("Index", "Roles"); } return View(); }
public async Task <IActionResult> Delete(String id) { var deleteRole = await _role.Delete(id); if (deleteRole) { return(Ok("Role Deleted")); } else { return(BadRequest(new { message = "Unable to delete Role details" })); } }
public ActionResult Delete(string id) { var iVal = 0; Utility.Operate(this, Operations.Delete, () => { iVal = _role.Delete(id); return(iVal); }); if (iVal > 0) { _cache.Remove(Constants.CACHE_KEY_ROLES); } return(Redirect("~/Admin/Roles/Index")); }
public ActionResult RemoveRole(long id) { try { dalRole.Delete(id); return(this.JsonFormat(new ExtResult { success = true })); } catch (Exception ex) { return(this.JsonFormat(new ExtResult { success = false, msg = ex.Message })); } }
public IActionResult Delete(Guid id) { try { if (id == null) { return(StatusCode(400, $"ID is not valid.")); } else { var res = _role.Delete(id); return(Json(res)); } } catch (Exception ex) { _logger.LogCritical($"Exception while get list of items.", ex); return(StatusCode(500, $"Exception while get list of items. {ex.Message}")); } }
public async Task <IActionResult> DeleteConfirmed(int id) { _db.Delete(id); _db.Save(); return(RedirectToAction(nameof(Index))); }
public IActionResult Delete(Guid id) { _roleService.Delete(id); return(Ok()); }
public virtual void Delete() { _role.Delete(); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int F_ID) { return(dal.Delete(F_ID)); }
public ResultModel Delete([FromBody] RoleModel obj) { return(_svr.Delete(obj.ID)); }
public void Delete(string id) { dao.Delete(id); }
public void Delete(Role objRole) { Roleobj.Delete(objRole); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(string ID) { return(dal.Delete(ID)); }