Пример #1
0
        private void class_filter_button_Click(object sender, EventArgs e)
        {
            this.Hide();
            Search_Class_By_Type_Form f = new Search_Class_By_Type_Form();

            f.ShowDialog();
            this.Show();
        }
Пример #2
0
        public void Test_Search_Class()
        {
            Search_Class_By_Type_Form form = new Search_Class_By_Type_Form();
            int count = 0;

            try
            {
                count = form.searchClass(true, true).Tables[0].Rows.Count;
            }
            catch {}

            SqlWorker.GetDataSet("INSERT INTO Class(Room,Capacity,IsLab,HasProjector,Hours,NumOfComputers,Days) VALUES('" + room + "','" + capacity + "','" + islab + "','" + hasProjector + "','" + hours + "','" + numComp + "','" + days + "')");
            try
            {
                Assert.IsTrue(form.searchClass(true, true).Tables[0].Rows.Count == count + 1);
            }
            catch
            {
                Assert.Fail();
            }
            SqlWorker.GetDataSet("DELETE FROM Class WHERE Room LIKE '" + room + "'");
        }