コード例 #1
0
 private static string CheckEmail(string email)
 {
     if (email == "-1")
     {
         return(email);
     }
     else
     {
         bool temp = kanban.IsValidEmail(email) && kanban.IsUniqueEmail(email);
         if (temp)
         {
             return(email);
         }
         else
         {
             Console.ForegroundColor = ConsoleColor.Red;
             Log.Warn("Invalid input: email isnt a valid email or already been used in the system");
             Console.WriteLine("please enter a valid email address and make sure it hasn't been used in this system before.");
             Console.ResetColor();
             Console.Write("EmailAddress : ");
             email = Console.ReadLine();
             return(CheckEmail(email));
         }
     }
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: edentan/milestone-4-team20
 private static string CheckEmail(string email)
 {
     if (email == "-1")
     {
         return(email);
     }
     else
     {
         bool temp = kanban.IsValidEmail(email) && kanban.IsUniqueEmail(email);
         if (temp)
         {
             return(email);
         }
         else
         {
             Console.ForegroundColor = ConsoleColor.Red;
             Console.WriteLine("Invalid Email - please enter a valid email address and make sure that it hasn't been used in this system.");
             Console.ResetColor();
             //  Log.Instance.warn("Invalid input - Invalid Email");//log
             Console.ForegroundColor = ConsoleColor.DarkCyan;
             Console.Write("EmailAddress :");
             email = Console.ReadLine();
             return(CheckEmail(email));
         }
     }
 }