static void Main(string[] args) { EnterPagePL enterPagePL = new EnterPagePL(); enterPagePL.Output(); enterPagePL.Choise(); }
/// <summary> /// Users choise /// </summary> public void StartAdding() { string choise; Console.WriteLine(); Console.WriteLine("Choose option"); Console.WriteLine(); Console.WriteLine("1. Add new item "); Console.WriteLine("2. Show items list"); Console.WriteLine("0. Back"); Console.WriteLine(); choise = Console.ReadLine(); if (getChoise(choise, out int parsedChoise)) { if (parsedChoise == 0) { enterPageView.Choise(); } else if (parsedChoise == 1) { NewItem(); StartAdding(); } else if (parsedChoise == 2) { ShowAssortement(); StartAdding(); } } else { Console.WriteLine("Wrong choise"); } }
/// <summary> /// User choise /// </summary> /// <param name="enm"><see cref="Category"/></param> public virtual void UserChoise(ref Category enm) { try { string result = Console.ReadLine(); if (Int32.TryParse(result, out int intResult) && intResult == 10) { SearchName(); } else if (Int32.TryParse(result, out intResult) && intResult == 0) { enterPagePL.Output(); enterPagePL.Choise(); } else if (Int32.TryParse(result, out intResult) && intResult > 0 && intResult < 11) { ResultedEnumerbale = funcCategoty((Category)(--intResult)); } else { UserChoise(ref enm); } } catch { Console.WriteLine("Wrong choise"); } }
public void LoginProcess() { Output(); StartSignIn(); EnterPagePL enterPageView = new EnterPagePL(); enterPageView.Output(); enterPageView.Choise(); }
/// <summary> /// Registration result /// </summary> /// <param name="result"></param> public void RegistrationResult(bool result) { if (result) { Console.WriteLine("User have been regitered"); } else { Console.WriteLine("User haven't been regitered"); } enterPageView.Output(); enterPageView.Choise(); }
/// <summary> /// Input order /// </summary> public void InputOrder() { foreach (var i in getOrders()) { if (isUserRole()) { if (isUserLogined(i)) { OutputUserData(i); } } else { OutputUserData(i); } } Console.ReadKey(); enterPageView.Output(); enterPageView.Choise(); }