public TownCenterType(TownCenterService townCenterService, WorkersService workersService)
     : base("TownCenter")
 {
     this.townCenterService = townCenterService;
     this.workersService    = workersService;
     ReceiveCreationEvents  = true;
 }
Esempio n. 2
0
 public CostFormationView()
 {
     InitializeComponent();
     serviceCompOp  = new CustQuotaCompOpService();
     serviceItem    = new ItemsService();
     serviceCQ      = new CustQuotasService();
     serviceOp      = new OperationService();
     serviceWorkers = new WorkersService();
     familyService  = new OPFamilyService();
     companyService = new CompanyService();
     tcsService     = new TBCostFormationService();
     rb100PercentServices.IsChecked = true;
 }
Esempio n. 3
0
 public LoginController(IWorkerContext context, IConfiguration configuration)
 {
     _context    = context;
     userService = new WorkersService(_context, configuration);
 }
Esempio n. 4
0
        static void Main(string[] args)
        {
            #region Supermarket objects

            var workers = new List <Worker> {
                new Worker("Avi"), new Worker("Eti"), new Worker("Mosh")
            };
            List <Cashier> cashiers = workers.Select(worker => new Cashier(worker)).ToList();
            var            products = new Dictionary <string, int> {
                { "Banana", 7 }, { "Bread", 10 }, { "Water", 8 }, { "Gums", 5 }
            };

            #endregion

            #region Services

            var lineService     = new LineService(new SupermarketLine <Customer>());
            var cashiersService = new CashiersService(cashiers, lineService, products);
            var workersService  = new WorkersService(workers, cashiersService);

            #endregion

            #region Management Menus

            var lineManagementMenu = new NumericMenu("Line Management Menu",
                                                     new List <IMenuOption>
            {
                new LineAdderOption(lineService),
                new LineMoverOption(lineService),
                new LineCustomersOption(lineService)
            });

            var cashiersManagementMenu = new NumericMenu("Cashiers Management Menu",
                                                         new List <IMenuOption>
            {
                new CashiersRegistersOption(cashiersService),
                new CashiersOpeningDateOption(cashiersService),
                new CashierIsolationOption(cashiersService)
            });

            var workersManagementMenu = new NumericMenu("Workers Management Menu",
                                                        new List <IMenuOption>
            {
                new WorkerCheckInOption(workersService),
                new WorkerCheckOutOption(workersService),
                new WorkersRegistersOption(workersService)
            });

            #endregion

            // The main menu that contains all the management menus
            var mainMenu = new NumericMenu("Main Menu", new List <IMenuOption>
            {
                lineManagementMenu, cashiersManagementMenu, workersManagementMenu
            });

            try
            {
                mainMenu.Action();
            }
            catch (Exception e)
            {
                System.Console.WriteLine($"MamaSuper process has failed! Failure message:\n{e.Message}");
            }
        }