Exemplo n.º 1
0
 private void buttonLogIn2_Click(object sender, EventArgs e)
 {
     try
     {
         //UserDonator user = service.GetUserDonator(txtUsername.Text);
         if (service.LogInUserDonator(txtUsername.Text, txtPassw.Text))
         {
             FormDonator formDonator = new FormDonator(service, txtUsername.Text);
             this.Hide();
             formDonator.Closed += (s, args) => this.Close();
             formDonator.Show();
             if (DonatorService.NeedsToBeNotified(service.GetUserDonator(txtUsername.Text).Id))
             {
                 MessageBox.Show("E nevoie de sangele tau!!! Sangele tau poate salva vieti. Doneaza acum");
             }
         }
         else
         {
             MessageBox.Show("Username or password incorect!!");
         }
     }
     catch (Exception err)
     {
         MessageBox.Show("Username or password incorect!!");
     }
 }