Example #1
0
        public ActionResult Delete(IEnumerable <int> ids)
        {
            if (ids == null || ids.Count() == 0)
            {
                return(new ResponseModel <int>(ErrorCode.success, 0));
            }
            var count = role.Delete(ids);

            if (count == -1)
            {
                return(new ResponseModel <string>(ErrorCode.record_has_been_used, ""));
            }
            if (count > 0)
            {
                return(new ResponseModel <string>(ErrorCode.success, ""));
            }
            else
            {
                return(new ResponseModel <string>(ErrorCode.server_exception, ""));
            }
        }
Example #2
0
 public static bool Delete(Guid roleGuid)
 {
     Business.Role roleController = new Business.Role();
     return(roleController.Delete(roleGuid));
 }