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(); } }
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(); } } }