private void bAddNewUser_Click(object sender, EventArgs e) { var ep = new EnterPassword("MANAGER"); ep.ShowDialog(); if (ep.Passed) { var ansu = new AddNewStaffUser(); ansu.ShowDialog(); } }
private void bWithdrawMoney_Click(object sender, EventArgs e) { var ep = new EnterPassword("MANAGER"); ep.ShowDialog(); if (ep.Passed) { var wm = new WithdrawMoney(ep.LogginedPerson); wm.ShowDialog(); } }
private void bLightCutOff_Click(object sender, EventArgs e) { TextFileWriter.TextFileWriterInstance() .AddSomeDataToLogReport("кнопка \"Выключить свет\" была нажата.", Options.FileTypeActionsLogs); Options.OptionsInstance().TakeScreenShot(); var ep = new EnterPassword("ADMINISTRATOR"); ep.ShowDialog(); if (ep.Passed) { timer.Stop(); var lco = new LightCutOff(_currentOpenedSessionsList); lco.ShowDialog(); _currentOpenedSessionsList = BoomGamebarController.InstanceBgController().GetAllOpenedDaySessions(); dgvOpenedSessions.Invalidate(); timer.Start(); if (lco.AllSessionAreClosedAndApplicationCanBeClosed) { _exit = true; Close(); } } }