private void Add_User_Click(object sender, EventArgs e) { this.Hide(); Adding_User_Form f = new Adding_User_Form(); f.ShowDialog(); this.Show(); }
public void TestAddLecturer() { Adding_User_Form form = new Adding_User_Form(); form.addUser(LecturerID, password, name, type, startTime, endTime, day); try { Assert.IsTrue(SqlWorker.GetDataSet("SELECT * from Users WHERE ID LIKE '" + LecturerID + "' AND PWD LIKE '" + password + "' AND Name LIKE '" + name + "' AND Type LIKE '" + type + "'").Tables[0].Rows.Count == 1); } catch { Assert.Fail(); } SqlWorker.GetDataSet("DELETE FROM Users WHERE ID='" + LecturerID + "'"); }