Пример #1
0
        protected void Search_Batch_Test_Btn_Click(object sender, EventArgs e)
        {
            string keyword = Search_Batch_Test_Console.Text;

            DataTable temp_table = new DataTable();

            temp_table.Columns.Add(new DataColumn("Batch_Test_ID", typeof(string)));
            temp_table.Columns.Add(new DataColumn("Batch_ID", typeof(string)));
            temp_table.Columns.Add(new DataColumn("Test_ID", typeof(string)));
            temp_table.Columns.Add(new DataColumn("TimeStamp", typeof(string)));


            for (int i = 0; i < find.Test_NAME(keyword).Rows.Count; i++)
            {
                for (int j = 0; j < find.Batch_Test_TestID(find.Test_NAME(keyword).Rows[i]["Test_ID"].ToString()).Rows.Count; j++)
                {
                    temp_table.ImportRow(find.Batch_Test_TestID(find.Test_NAME(keyword).Rows[i]["Test_ID"].ToString()).Rows[j]);
                }
            }

            for (int i = 0; i < find.Batch_Name(keyword).Rows.Count; i++)
            {
                for (int j = 0; j < find.Batch_Test_BATCHID(find.Batch_Name(keyword).Rows[i]["Batch_ID"].ToString()).Rows.Count; j++)
                {
                    temp_table.ImportRow(find.Batch_Test_BATCHID(find.Batch_Name(keyword).Rows[i]["Batch_ID"].ToString()).Rows[j]);
                }
            }

            All_Test.DataSource = temp_table;
            All_Test.DataBind();
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string batch_id = find.Students(Student_ID()).Rows.Count != 0 ? find.Students(Student_ID()).Rows[0]["Batch_ID"].ToString() : "0";

            All_Test.DataSource = find.Batch_Test_BATCHID(batch_id);
            All_Test.DataBind();
        }
Пример #3
0
        void Load_Databases()
        {
            All_Batch.DataSource = search.Batches();
            All_Batch.DataBind();

            All_Test.DataSource = search.Test();
            All_Test.DataBind();
        }
Пример #4
0
        void Load_Tests(string value, string keyword)
        {
            Batch_ID.Value = value;

            DataTable temp_table = new DataTable();

            temp_table.Columns.Add(new DataColumn("Test_ID", typeof(string)));
            temp_table.Columns.Add(new DataColumn("Name", typeof(string)));
            temp_table.Columns.Add(new DataColumn("Details", typeof(string)));
            temp_table.Columns.Add(new DataColumn("TimeStamp", typeof(string)));

            DataTable remain_table = new DataTable();

            remain_table.Columns.Add(new DataColumn("Test_ID", typeof(string)));
            remain_table.Columns.Add(new DataColumn("Name", typeof(string)));
            remain_table.Columns.Add(new DataColumn("Details", typeof(string)));
            remain_table.Columns.Add(new DataColumn("TimeStamp", typeof(string)));

            if (keyword == "")
            {
                for (int i = 0; i < search.Test().Rows.Count; i++)
                {
                    if (find.Batch_Test(Batch_ID.Value, search.Test().Rows[i]["Test_ID"].ToString()).Rows.Count != 0)
                    {
                        temp_table.ImportRow(search.Test().Rows[i]);
                    }
                    else
                    {
                        remain_table.ImportRow(search.Test().Rows[i]);
                    }
                }

                for (int i = 0; i < remain_table.Rows.Count; i++)
                {
                    temp_table.ImportRow(remain_table.Rows[i]);
                }
            }
            else
            {
                for (int i = 0; i < search.Test().Rows.Count; i++)
                {
                    if (find.Batch_Test(Batch_ID.Value, search.Test().Rows[i]["Test_ID"].ToString()).Rows.Count != 0 && find.Test_NAME(keyword).Rows.Count != 0)
                    {
                        temp_table.ImportRow(search.Test().Rows[i]);
                    }
                    else
                    {
                        remain_table.ImportRow(search.Test().Rows[i]);
                    }
                }
            }


            All_Test.DataSource = temp_table;
            All_Test.DataBind();
        }
Пример #5
0
        protected void Find_Btn_Click(object sender, EventArgs e)
        {
            string batch_id = find.Students(Student_ID()).Rows[0]["Batch_ID"].ToString();

            DataTable temp_table = new DataTable();

            temp_table.Columns.Add(new DataColumn("Batch_Test_ID", typeof(string)));
            temp_table.Columns.Add(new DataColumn("Batch_ID", typeof(string)));
            temp_table.Columns.Add(new DataColumn("Test_ID", typeof(string)));
            temp_table.Columns.Add(new DataColumn("TimeStamp", typeof(string)));

            for (int i = 0; i < find.Test_NAME(Search_Console.Text).Rows.Count; i++)
            {
                string test_id_temp = find.Test_NAME(Search_Console.Text).Rows[i]["Test_ID"].ToString();
                if (find.Batch_Test(batch_id, test_id_temp).Rows.Count != 0)
                {
                    temp_table.ImportRow(find.Batch_Test(batch_id, test_id_temp).Rows[0]);
                }
            }
            All_Test.DataSource = temp_table;
            All_Test.DataBind();
        }
Пример #6
0
        protected void Student_Search_Button_Click(object sender, EventArgs e)
        {
            string keyword = Student_Search_Console.Text;

            DataTable temp_table = new DataTable();

            temp_table.Columns.Add(new DataColumn("Giving_ID", typeof(string)));
            temp_table.Columns.Add(new DataColumn("Student_ID", typeof(string)));
            temp_table.Columns.Add(new DataColumn("Batch_Test_ID", typeof(string)));
            temp_table.Columns.Add(new DataColumn("TimeStamp", typeof(string)));


            for (int i = 0; i < find.Student_Name(keyword).Rows.Count; i++)
            {
                for (int j = 0; j < find.Giving(find.Student_Name(keyword).Rows[i]["Student_Id"].ToString(), batch_test_id_fld.Value).Rows.Count; j++)
                {
                    temp_table.ImportRow(find.Giving(find.Student_Name(keyword).Rows[i]["Student_Id"].ToString(), batch_test_id_fld.Value).Rows[j]);
                }
            }


            All_Test.DataSource = temp_table;
            All_Test.DataBind();
        }
Пример #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     All_Test.DataSource = search.Batch_Test();
     All_Test.DataBind();
 }