public async Task <ActionResult> DeleteRole(string id) { RoleDAL dal = new RoleDAL(); await dal.Delete(id); return(ToJsonResult("Success")); }
public ActionResult Delete(int id, FormCollection collection) { string msg = "删除失败"; try { if (id != 0) { var role = roleDAL.GetRoleByID(id); ////先删除子表,再删除主表 //foreach (var role in account.Role) { // var RoleModel = roleDAL.GetRoleByID(role.RoleID); // account.Role.Remove(RoleModel); //} roleDAL.Delete(role); } // TODO: Add delete logic here //return RedirectToAction("Index"); msg = "删除成功"; return(Content(msg)); } catch { return(Content(msg)); //return View(); } }
public int Delete(RoleML Role) { try { return(RoleDAL.Delete(Role)); } catch (Exception ex) { throw new Exception(String.Format("{0}.Delete: {1}", core, ex)); } }
static public int Delete(int id) { return(RoleDAL.Delete(id)); }
public virtual void Delete(int id) { RoleDAL.Delete(id); }
public void Delete(int id) { dal.Delete(id); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int Rl_ID) { return(dal.Delete(Rl_ID)); }
/// <summary> /// 物理删除 /// </summary> /// <param name="id"></param> public static void Delete(int id) { RoleDAL.Delete(id); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int RoleId) { return(dal.Delete(RoleId)); }
public int delete(Role _model) { return(dal.Delete(_model)); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int Id) { return(dal.Delete(Id)); }
/// <summary> /// 删除一条数据 /// </summary> public bool Delete(int ID) { return(dal.Delete(ID)); }
public int Delete(long id) { return(RoleDAL.Delete(id)); }
public override bool Delete(ORules role) { return(rule.Delete(role)); }