示例#1
0
 private void LoginHuman()
 {
     if (isUser == true)
     {
         if (_readRepositoryUser.GetByLoginAndPassword(textBoxLogin.Text, textBoxPassword.Text).Count == 1)
         {
             MessageBox.Show("Zalogowano");
             carView = new CarView();
             carView.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Niepoprawne Dane");
         }
     }
     else
     {
         if (_readRepositoryAdministrator.GetByLogin(textBoxLogin.Text, textBoxPassword.Text).Count == 1)
         {
             MessageBox.Show("Zalogowano");
             administratorPanel = new AdministratorPanel();
             administratorPanel.Show();
             this.Hide();
         }
         else
         {
             MessageBox.Show("Niepoprawne Dane");
         }
     }
 }
示例#2
0
        private void buttonPrevious_Click(object sender, EventArgs e)
        {
            if (returnToStartWindow == true)
            {
                startWindow = new StartWindow();
                startWindow.Show();
            }
            else
            {
                administratorPanel = new AdministratorPanel();
                administratorPanel.Show();
            }

            this.Visible = false;
        }
示例#3
0
 private void buttonPrevious_Click(object sender, EventArgs e)
 {
     administratorPanel = new AdministratorPanel();
     administratorPanel.Show();
     this.Hide();
 }