private void buttonLogIn_Click(object sender, EventArgs e) { string username, parola; username = comboBoxNumeCentru.GetItemText(comboBoxNumeCentru.SelectedItem); parola = textBoxParolaCentru.Text; if (username.Equals("") || parola.Equals("")) { MessageBoxButtons buttons = MessageBoxButtons.OK; MessageBox.Show(this, "Trebuie sa completati ambele campuri", "Eroare!", buttons); } else { int result = serviceCentru.Login(username, parola); if (result >= 0) { Form formMainView = new FormCentru(serviceDonator, username); this.Hide(); formMainView.Closed += (s, args) => this.Close(); formMainView.ShowDialog(); } else { MessageBoxButtons buttons = MessageBoxButtons.OK; MessageBox.Show(this, "Parola nu corespunde cu numele centrului!", "Eroare!", buttons); } } }
public FormModificareDonator(Donator donator, DonatorService service, FormCentru parinte) { this.parinte = parinte; this.service = service; this.donator = donator; InitializeComponent(); textBoxGreutate.Text = donator.Greutate.ToString(); textBoxPuls.Text = donator.Puls.ToString(); textBoxTensSist.Text = donator.TensiuneSistolica.ToString(); textBoxTensDiast.Text = donator.TensiuneDiastolica.ToString(); }
public CerereForm(string message, Cerere cerere, Stoc stoc, CentruTransfuzie centru, FormCentru parentForm) : this(message, cerere, stoc, centru) { this.parentForm = parentForm; }