/// <summary> /// Method used for confirm chosen action by Contractor. /// </summary> /// <param name="user"></param> /// <param name="choosenAction"></param> /// <returns></returns> public static bool CompleteActionForContractor(User user, char choosenAction) { Contractor contractor = (Contractor)user; ShowOffers showOffers = MainMenuHelper.ShowWorkOffers; switch (choosenAction) { case '1': { showOffers(); } break; case '2': { Console.WriteLine("Please, enter work offer name:"); string enteredWorkOfferName = Console.ReadLine(); var workOffer = WorkOffersStorage.GetWorkOffer(enteredWorkOfferName); contractor.CreateApplicationToWorkOffer(workOffer); } break; case '3': { var workOffers = WorkOffersStorage.GetWorkOffers(contractor); foreach (WorkOffer offer in workOffers) { offer.ShowWorkOfferInformation(); } } break; case '4': { Console.WriteLine("Please, enter work offer name:"); string enteredWorkOfferName = Console.ReadLine(); var workOffer = WorkOffersStorage.GetWorkOffer(enteredWorkOfferName); contractor.CheckUpConstructionWork(workOffer); } break; case '5': { Authentication.LogOut(); return(Constants.IfUserWantLogOut); } } return(Constants.IfUserWantContinue); }