/// <summary> ///根据account删除User /// </summary> /// <param name="account"></param> /// <returns></returns> public static bool Delete(string account) { UserService service = new UserService(); try { if (service.SearchUserByAccount(account) != null) { return(service.DeleteUserByAccount(account)); } else { return(true); } } catch (Exception e) { Console.WriteLine("\n异常信息:\n{0}", e.Message); return(false); } finally { service.CloseConnection(); } }