private void DonateSuccessButton_Click(object sender, EventArgs e) { Employee pas11st = new Employee(); pas11st.EmployeeId = this.UserIDTextBox.Text; pas11st.EmployeePassword = this.PasswordTextOLD.Text; Employee pas22nd = new Employee(); pas22nd.EmployeeId = this.UserIDTextBox.Text; pas22nd.EmployeePassword = this.NewPasswordTEXTBOx.Text; AeMployeeRepisotary empRepod11 = new AeMployeeRepisotary(); if (empRepod11.UserLoginVerification(pas11st)) { empRepod11.Updater(pas22nd); MessageBox.Show("Changed Success", "Update"); } else { MessageBox.Show("your ID or OLd Password did not Matched", "Failed"); } }
private void LoginButton_Click(object sender, EventArgs e) { Employee user = new Employee(); user.EmployeeId = this.EmpLogintextBox1.Text; user.EmployeePassword = this.EmpLoginPassbox.Text; string uid = this.EmpLogintextBox1.Text; string pass = this.EmpLogintextBox1.Text; // Home h = new Home(uid, pass); // h.Show(); // this.Hide(); AeMployeeRepisotary empRepo = new AeMployeeRepisotary(); if (empRepo.UserLoginVerification(user)) { Enter00Employee00000 h = new Enter00Employee00000(uid, pass); h.Show(); this.Hide(); } else { MessageBox.Show("Invalid ID or Password", "Login Failed"); } }