Example #1
0
 private void bAddNewUser_Click(object sender, EventArgs e)
 {
     var ep = new EnterPassword("MANAGER");
     ep.ShowDialog();
     if (ep.Passed)
     {
         var ansu = new AddNewStaffUser();
         ansu.ShowDialog();
     }
 }
Example #2
0
 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();
     }
 }
Example #3
0
 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();
         }
     }
 }