private void btnEnter2Program_Click(object sender, EventArgs e) { string userName, password; bool permitted = false; userName = tbUserName.Text.ToString(); password = markedtbPWD.Text.ToString(); login = new ModelLoginning(); login.UserLogin = userName; login.UserPassword = password; AdmissionFacility admissionFacility = new AdmissionFacility(true); permitted = admissionFacility.tryAccess(login); if (permitted) { tb070.Text = userName + " logged"; } else { tb070.Text = userName + " not logged"; } // // // // }
public mainForm() { login = new ModelLoginning(); InitializeComponent(); }