private void buttonBack_Click(object sender, EventArgs e) { Main_Menu main = new Main_Menu(); main.Show(); this.Hide(); }
private void buttonLogin_Click(object sender, EventArgs e) { Pharmacy_ContextDataContext pharmacyContext = new Pharmacy_ContextDataContext(); string empName = textBoxEmployeeName.Text; string empPassword = textBoxEmployeePassword.Text; object list = employee.GetEmployee(empName); if (empName != "") { if (empPassword != "") { var x = from a in pharmacyContext.Employee_Infos where a.Employee_Name == empName && a.Password == empPassword select a; if (x.Any()) { Main_Menu m1 = new Main_Menu(); m1.Show(); this.Hide(); } else { MessageBox.Show("Not Matched", "Incorrect Information"); } } else { MessageBox.Show("Please Enter Your Password", "No Password"); } } else { MessageBox.Show("Please Enter Your Name", "No Employee Name"); } /*object obj = employee.GetEmployee(empName);*/ }