Esempio n. 1
0
        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();
            }
        }
Esempio n. 3
0
 public int Delete(RoleML Role)
 {
     try
     {
         return(RoleDAL.Delete(Role));
     }
     catch (Exception ex)
     {
         throw new Exception(String.Format("{0}.Delete: {1}", core, ex));
     }
 }
Esempio n. 4
0
 static public int Delete(int id)
 {
     return(RoleDAL.Delete(id));
 }
Esempio n. 5
0
 public virtual void Delete(int id)
 {
     RoleDAL.Delete(id);
 }
Esempio n. 6
0
 public void Delete(int id)
 {
     dal.Delete(id);
 }
Esempio n. 7
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(int Rl_ID)
 {
     return(dal.Delete(Rl_ID));
 }
Esempio n. 8
0
 /// <summary>
 /// 物理删除
 /// </summary>
 /// <param name="id"></param>
 public static void Delete(int id)
 {
     RoleDAL.Delete(id);
 }
Esempio n. 9
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(int RoleId)
 {
     return(dal.Delete(RoleId));
 }
Esempio n. 10
0
 public int delete(Role _model)
 {
     return(dal.Delete(_model));
 }
Esempio n. 11
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(int Id)
 {
     return(dal.Delete(Id));
 }
Esempio n. 12
0
 /// <summary>
 /// 删除一条数据
 /// </summary>
 public bool Delete(int ID)
 {
     return(dal.Delete(ID));
 }
Esempio n. 13
0
 public int Delete(long id)
 {
     return(RoleDAL.Delete(id));
 }
Esempio n. 14
0
 public override bool Delete(ORules role)
 {
     return(rule.Delete(role));
 }