Пример #1
0
 public bool DeleteUser(string username)
 {
     try
     {
         return(serviceUser.DeleteUser(username));
     }
     catch {
         Console.ForegroundColor = ConsoleColor.Red;
         Console.WriteLine("Connection Error! Database Server Manager Unreacheable!");
         Console.ForegroundColor = ConsoleColor.DarkCyan;
     }
     return(false);
 }
Пример #2
0
        public static bool DeleteUser(string login)
        {
            ServiceUserClient serviceUser = new ServiceUserClient();

            try
            {
                return serviceUser.DeleteUser(login);
            }
            catch (Exception)
            {
                return false;
            }
        }
Пример #3
0
        public static bool DeleteUser(string login)
        {
            ServiceUserClient serviceUser = new ServiceUserClient();
            bool response = false;

            try
            {
                response = serviceUser.DeleteUser(login);
            }
            catch (Exception) { }
            finally
            {
                serviceUser.Close();
            }
            return(response);
        }
Пример #4
0
 /// <summary>
 /// Call WCF DeleteUser function
 /// </summary>
 /// <param name="login"></param>
 /// <returns></returns>
 public bool DeleteUser(string login)
 {
     return(_service.DeleteUser(login));
 }