Esempio n. 1
0
        private void EnterLogin()
        {
            _writer.Writer(Properties.Resources.EnterLogin);
            int loginID = _reader.NumberReader();

            if (_logicTerminal.IsCorrectEmp(loginID))
            {
                TerminalConsole terminal = new TerminalConsole(loginID, _reader, _writer, _logicTerminal);
                terminal.TerminalMenu();
                MenuChooseSystem();
            }
            else
            {
                _writer.Writer(Properties.Resources.WrongUser);
                MenuChooseSystem();
            }
        }
Esempio n. 2
0
 private void DescribeAndProcessAction(EnumWorkType type)
 {
     if (string.IsNullOrWhiteSpace(txtEmpIdNum.Text))
     {
         lblName.Text = ShowError();
         timerClearDisplay.Start();
     }
     else
     {
         bool success = Int32.TryParse(txtEmpIdNum.Text, out int employeeId);
         if (success && _logic.IsCorrectEmp(employeeId))
         {
             _logic.ProcessAction(employeeId, type);
             Describe(employeeId, type);
             timerClearDisplay.Start();
         }
         else
         {
             lblName.Text = ShowError();
             timerClearDisplay.Start();
         }
     }
 }