Ejemplo n.º 1
0
 public TicketForm(MainWindowForm form, int ticketId)
 {
     this.mainForm = form;
     this.ticketId = ticketId;
     mainForm.openWindows.Add(this);
     InitializeComponent();
     UI_Init();
 }
Ejemplo n.º 2
0
 private void LoginBtn_Click(object sender, EventArgs e)
 {
     try
     {
         Common.Solver solver = ticketService.Login(LoginUsernameTextBox.Text, LoginPasswordTextBox.Text);
         if (solver != null)
         {
             WelcomeWindowHelpLabel.Text = "Login sucessful!";
             this.Hide();
             MainWindowForm mainWindowForm = new MainWindowForm(solver);
             mainWindowForm.ShowDialog();
             this.Close();
         }
         else
         {
             WelcomeWindowHelpLabel.Text = "Wrong credentials!";
         }
     }
     catch
     {
         WelcomeWindowHelpLabel.Text = "Error connecting with the service!";
     }
 }