public void CreateNewUser() { Console.WriteLine("Insert username:"******"Insert Date of Birth"); }while (!DateTime.TryParseExact(Console.ReadLine(), "dd/MM/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.None, out dob)); int age = InsertValidation.InsertIntRange(1, 100); _userLogic.AddUser(name, dob, age); }
public ConsoleAwardView() { _awardLogic = DependencyResolver.DependencyResolver.AwardLogic; Console.Clear(); Console.WriteLine("Welcome to AwardManager"); Console.WriteLine("What u want to do?"); bool flag = true; while (flag) { DisplayMenu(); switch (InsertValidation.InsertIntRange(1, 6)) { case 1: CreateNewAward(); break; case 2: DisplayAwards(); break; case 3: DisplayAwardUsers(); break; case 4: RemoveAward(); break; case 5: AddUser(); break; case 6: flag = false; break; } } }
public static void Main(string[] args) { bool flag = true; while (flag) { Console.Clear(); DisplayMenu(); switch (InsertValidation.InsertIntRange(1, 3)) { case 1: new ConsoleUserView(); break; case 2: new ConsoleAwardView(); break; case 3: flag = false; break; } } }