Beispiel #1
0
    public float getTotalCreditforEdit(string academic_year, string semester, string lectuere_id, SubCreditData oldData)
    {
        string prev_course = "";
        int    prev_sec    = 0;
        int    prev_subsec = 0;

        float totalCredit = new AddWorkLoad().getAddWorkLoad(academic_year, semester, lectuere_id).TotalCredit;

        List <LecturerTableData> lecturerData = new List <LecturerTableData>();

        lecturerData = new LecturerTable().getAllDegreeLecturerTable(academic_year, semester, lectuere_id);
        SubCreditData subcredit = new SubCreditData();

        foreach (LecturerTableData data in lecturerData)
        {
            if (!(data.AcademicYear == oldData.AcademicYear && data.Semester == oldData.Semester && data.Course_Code == oldData.Course_Code && data.Sec_No == oldData.Sec_No && data.SubSec_No == oldData.SubSec_No && data.Lecturer == oldData.Lecturer))
            {
                subcredit = new SubCredit().getSubCredit(data.AcademicYear, data.Semester, data.Course_Code, data.Sec_No, data.SubSec_No, data.Lecturer, data.Teaching_Day, data.Teaching_Start_Time, data.Teaching_End_Time, data.Course_Degree_Char);

                totalCredit += subcredit.SubCredit;

                // prev_course = data.Course_Code;
                // prev_sec = data.Sec_No;
                // prev_subsec = data.SubSec_No;
            }
        }


        return(totalCredit);
    }
Beispiel #2
0
    protected void btnSAVE_Click(object sender, EventArgs e)
    {
        try
        {
            lecturer      = Request.QueryString["lecturer"];
            academic_year = Request.QueryString["year"];
            semester      = Request.QueryString["semester"];

            string          result;
            AddWorkLoadData dataInsert = new AddWorkLoadData();
            dataInsert.AcademicYear = academic_year;
            dataInsert.Semester     = semester;
            dataInsert.Lecturer     = lecturer;
            dataInsert.HourRefer    = float.Parse(txthourRef.Text);
            dataInsert.TotalCredit  = float.Parse(txtTotalCredit.Text);

            result = new AddWorkLoad().insertAddWorkLoad(dataInsert);

            if (result == "OK")
            {
                divSuccess.Visible = true;
                divAdd.Visible     = false;
            }
            else
            {
                MsgValidate("ไม่สามารถเพิ่มตำแหน่งงานบริหาร กรุณาทำใหม่อีกครั้ง");
            }
        }
        catch (Exception err)
        {
            MsgValidate(err.ToString());
        }
    }
Beispiel #3
0
    public float getTotalCredit(string academic_year, string semester, string lectuere_id)
    {
        string prev_course = "";
        int    prev_sec    = 0;
        int    prev_subsec = 0;

        float totalCredit = new AddWorkLoad().getAddWorkLoad(academic_year, semester, lectuere_id).TotalCredit;

        List <LecturerTableData> lecturerData = new List <LecturerTableData>();

        lecturerData = new LecturerTable().getAllDegreeLecturerTable(academic_year, semester, lectuere_id);

        foreach (LecturerTableData data in lecturerData)
        {
            //if ((prev_course == "") || (prev_course != data.Course_Code) || (prev_sec != data.Sec_No) || (prev_subsec != data.SubSec_No))
            //    {

            SubCreditData subcredit = new SubCreditData();
            subcredit = new SubCredit().getSubCredit(data.AcademicYear, data.Semester, data.Course_Code, data.Sec_No, data.SubSec_No, data.Lecturer, data.Teaching_Day, data.Teaching_Start_Time, data.Teaching_End_Time, data.Course_Degree_Char);

            totalCredit += subcredit.SubCredit;

            prev_course = data.Course_Code;
            prev_sec    = data.Sec_No;
            prev_subsec = data.SubSec_No;

            //  }
        }


        return(totalCredit);
    }
Beispiel #4
0
    public float getHourRef(string academic_year, string semester, string lectuere_id)
    {
        string prev_course = "";
        int    prev_sec    = 0;
        int    prev_subsec = 0;

        float hour_ref = new AddWorkLoad().getAddWorkLoad(academic_year, semester, lectuere_id).HourRefer;



        List <LecturerTableData> lecturerData = new List <LecturerTableData>();

        lecturerData = new LecturerTable().getAllDegreeLecturerTable(academic_year, semester, lectuere_id);

        foreach (LecturerTableData data in lecturerData)
        {
            //if ((prev_course == "") || (prev_course != data.Course_Code) || (prev_sec != data.Sec_No) || (prev_subsec != data.SubSec_No))
            //    {

            HourReferData hour_data = new HourReferData();

            CourseData course_data = new CourseData();
            course_data = new Course().getCourse(data.Course_Code);
            float credit = 0;

            SubCreditData subcredit = new SubCreditData();
            subcredit = new SubCredit().getSubCredit(data.AcademicYear, data.Semester, data.Course_Code, data.Sec_No, data.SubSec_No, data.Lecturer, data.Teaching_Day, data.Teaching_Start_Time, data.Teaching_End_Time, data.Course_Degree_Char);

            credit = subcredit.SubCredit;


            if (course_data.Course_DegreeLevel == "01")          // ปวช.
            {
                hour_data = new HourRefer().getHourRefer("U", data.Course_Type);
                hour_ref += hour_data.HourRefer * credit;
            }
            else if (course_data.Course_DegreeLevel == "02")           //ป.ตรี
            {
                hour_data = new HourRefer().getHourRefer("B", data.Course_Type);
                hour_ref += hour_data.HourRefer * credit;
            }
            else
            {               // บัณฑิต
                hour_data = new HourRefer().getHourRefer("M", data.Course_Type);
                hour_ref += hour_data.HourRefer * credit;
            }


            prev_course = data.Course_Code;
            prev_sec    = data.Sec_No;
            prev_subsec = data.SubSec_No;

            //  }
        }


        return(hour_ref);
    }
    protected void btnOK_Click(object sender, EventArgs e)
    {
        lecturer      = Request.QueryString["lecturer"];
        academic_year = Request.QueryString["year"];
        semester      = Request.QueryString["semester"];

        string result = new AddWorkLoad().deleteAddWorkLoad(academic_year, semester, lecturer);

        if (result == "OK")
        {
            divSuccess.Visible = true;
            divDelete.Visible  = false;
        }
        else
        {
            MsgValidate("ไม่สามารถลบข้อมูลได้ กรุณาทำใหม่อีกครั้ง");
        }
    }
Beispiel #6
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["login_data"] == null)
        {
            Response.Redirect("../index.aspx");
        }
        else
        {
            //ตรวจสอบสิทธิ์
            login_data = (UserLoginData)Session["login_data"];
            if (autro_obj.CheckGroupUser(login_data, group_var.officer_department) || autro_obj.CheckGroupUser(login_data, group_var.officer_faculty))
            {
                /*=============================*/
                if (!Page.IsPostBack)
                {
                    fail.Visible       = false;
                    divSuccess.Visible = false;

                    try
                    {
                        lecturer      = Request.QueryString["lecturer"];
                        academic_year = Request.QueryString["year"];
                        semester      = Request.QueryString["semester"];

                        AddWorkLoadData addWorkData = new AddWorkLoadData();
                        addWorkData = new AddWorkLoad().getAddWorkLoad(academic_year, semester, lecturer);

                        txthourRef.Text     = addWorkData.HourRefer.ToString();
                        txtTotalCredit.Text = addWorkData.TotalCredit.ToString();
                    }
                    catch (Exception err)
                    {
                        MsgValidate(err.ToString());
                    }
                }
                /*=============================*/
            }
            else
            {
                HttpContext.Current.Session["response"] = "ตรวจสอบไม่พบสิทธิ์การเข้าใช้งาน";
                HttpContext.Current.Response.Redirect("err_response.aspx");
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["login_data"] == null)
        {
            Response.Redirect("../index.aspx");
        }
        else
        {
            //ตรวจสอบสิทธิ์
            login_data = (UserLoginData)Session["login_data"];
            if (autro_obj.CheckGroupUser(login_data, group_var.officer_department) || autro_obj.CheckGroupUser(login_data, group_var.officer_faculty) || autro_obj.CheckGroupUser(login_data, group_var.lecturer))
            {
                /*=============================*/
                try
                {
                    string  lec_code = Request.QueryString["lecturer"];
                    SysUser lec      = new SysUser().getSysUser(lec_code);

                    bool authorized = false;

                    if (autro_obj.CheckGroupUser(login_data, group_var.lecturer))
                    {
                        if (lec_code == login_data.Nation_ID)
                        {
                            authorized = true;
                        }
                        else
                        {
                            authorized = false;
                        }
                    }
                    else if (autro_obj.CheckGroupUser(login_data, group_var.officer_faculty))
                    {
                        authorized = true;
                    }
                    else if (autro_obj.CheckGroupUser(login_data, group_var.officer_department))
                    {
                        List <string> department_authorized = autro_obj.getDepartment_Authorized(login_data, group_var.officer_department);

                        foreach (string dep in department_authorized)
                        {
                            if (dep == lec.DepartmentCode)
                            {
                                authorized = true;
                                break;
                            }
                        }
                    }

                    if (authorized == true)
                    {
                        string academic_year = Request.QueryString["year"];
                        string semester      = Request.QueryString["semester"];

                        string prev_course = "";
                        int    prev_sec    = 0;
                        int    prev_subsec = 0;

                        List <LecturerTableData> lecturerData = new List <LecturerTableData>();
                        lecturerData = new LecturerTable().getAllDegreeLecturerTable(academic_year, semester, lec_code);



                        headLecturer.Text = new AcademicPosition().getAcademicPosition(lec.AcademicPositionCode).AcademicPositionThName + " " + lec.ThName + " " + lec.ThSurName;

                        // Head Table
                        string[] ar  = { "ลำดับ", "ชื่อวิชา", "ตอนเรียน", "วัน", "เวลา", "ตัวคูณ", "หน่วยกิต", "ชั่วโมงอ้างอิง" };
                        Table    tb1 = new Table();
                        tb1.Attributes.Add("class", "table table-bordered table-striped table-hover");
                        tb1.Attributes.Add("id", "dt_basic");
                        TableHeaderRow tRowHead = new TableHeaderRow();
                        tRowHead.TableSection = TableRowSection.TableHeader;

                        for (int cellCtr = 1; cellCtr <= ar.Length; cellCtr++)
                        {
                            TableHeaderCell cellHead = new TableHeaderCell();
                            cellHead.Text = ar[cellCtr - 1];
                            cellHead.Attributes.Add("class", "text-center");
                            tRowHead.Cells.Add(cellHead);
                        }
                        tb1.Rows.Add(tRowHead);

                        int num = 1;

                        float         totalCredit  = 0;
                        float         totalHourRef = 0;
                        SubCreditData subcredit    = new SubCreditData();

                        TableCell cellDay  = new TableCell();
                        TableCell cellTime = new TableCell();

                        foreach (LecturerTableData data in lecturerData)
                        {
                            //if ((prev_course == "") || (prev_course != data.Course_Code) || (prev_sec != data.Sec_No) || (prev_subsec != data.SubSec_No))
                            //    {

                            CourseData course_data = new CourseData();
                            course_data = new Course().getCourse(data.Course_Code);

                            TableRow tRowBody = new TableRow();
                            tRowBody.TableSection = TableRowSection.TableBody;

                            TableCell cellNum = new TableCell();
                            cellNum.Attributes.Add("class", "text-center");
                            cellNum.Attributes.Add("style", "vertical-align:middle");
                            cellNum.Text = num.ToString();
                            tRowBody.Cells.Add(cellNum);

                            TableCell cellCourseName = new TableCell();
                            cellCourseName.Attributes.Add("style", "vertical-align:middle");
                            cellCourseName.Text = course_data.Course_Code + " " + course_data.Course_Engname;
                            tRowBody.Cells.Add(cellCourseName);

                            string course_type = "";
                            string course_sec  = "";

                            if (data.Course_Type == "1")
                            {
                                course_type = "S.";
                            }
                            else if (data.Course_Type == "2")
                            {
                                course_type = "L.";
                            }
                            else if (data.Course_Type == "4")
                            {
                                course_type = "T.";
                            }
                            else if (data.Course_Type == "5")
                            {
                                course_type = "M.";
                            }
                            else if (data.Course_Type == "6")
                            {
                                course_type = "SP.";
                            }
                            else if (data.Course_Type == "7")
                            {
                                course_type = "D.";
                            }

                            if (data.SubSec_No != 0)
                            {
                                course_sec = data.SubSec_No.ToString();
                            }
                            else
                            {
                                course_sec = data.Sec_No.ToString();
                            }

                            TableCell cellSec = new TableCell();
                            cellSec.Attributes.Add("class", "text-center");
                            cellSec.Attributes.Add("style", "vertical-align:middle");
                            cellSec.Text = course_type + course_sec;
                            tRowBody.Cells.Add(cellSec);

                            string day = "";

                            if (data.Teaching_Day == "1")
                            {
                                day = "Mon";
                            }
                            else if (data.Teaching_Day == "2")
                            {
                                day = "Tue";
                            }
                            if (data.Teaching_Day == "3")
                            {
                                day = "Wed";
                            }
                            if (data.Teaching_Day == "4")
                            {
                                day = "Thu";
                            }
                            if (data.Teaching_Day == "5")
                            {
                                day = "Fri";
                            }
                            if (data.Teaching_Day == "6")
                            {
                                day = "Sat";
                            }
                            if (data.Teaching_Day == "7")
                            {
                                day = "Sun";
                            }

                            cellDay = new TableCell();
                            cellDay.Attributes.Add("class", "text-center");
                            cellDay.Attributes.Add("style", "vertical-align:middle");
                            cellDay.Text = day;
                            tRowBody.Cells.Add(cellDay);

                            string teach_time = data.Teaching_Start_Time + " - " + data.Teaching_End_Time;

                            cellTime = new TableCell();
                            cellTime.Attributes.Add("class", "text-center");
                            cellTime.Attributes.Add("style", "vertical-align:middle");
                            cellTime.Text = teach_time;
                            tRowBody.Cells.Add(cellTime);


                            subcredit = new SubCredit().getSubCredit(data.AcademicYear, data.Semester, data.Course_Code, data.Sec_No, data.SubSec_No, data.Lecturer, data.Teaching_Day, data.Teaching_Start_Time, data.Teaching_End_Time, data.Course_Degree_Char);

                            float credit = subcredit.SubCredit;
                            totalCredit += subcredit.SubCredit;



                            HourReferData hour_data = new HourReferData();
                            float         hour_ref  = 0;

                            if (course_data.Course_DegreeLevel == "01")// ปวช.
                            {
                                hour_data = new HourRefer().getHourRefer("U", data.Course_Type);
                                hour_ref  = hour_data.HourRefer * credit;
                            }
                            else if (course_data.Course_DegreeLevel == "02") //ป.ตรี
                            {
                                hour_data = new HourRefer().getHourRefer("B", data.Course_Type);
                                hour_ref  = hour_data.HourRefer * credit;
                            }
                            else
                            { // บัณฑิต
                                hour_data = new HourRefer().getHourRefer("M", data.Course_Type);
                                hour_ref  = hour_data.HourRefer * credit;
                            }

                            totalHourRef += hour_ref;

                            TableCell cellMultiply = new TableCell();
                            cellMultiply.Attributes.Add("class", "text-center");
                            cellMultiply.Attributes.Add("style", "vertical-align:middle");
                            cellMultiply.Text = hour_data.HourRefer.ToString();
                            tRowBody.Cells.Add(cellMultiply);

                            TableCell cellCredit = new TableCell();
                            cellCredit.Attributes.Add("class", "text-center");
                            cellCredit.Attributes.Add("style", "vertical-align:middle");
                            cellCredit.Text = credit.ToString();
                            tRowBody.Cells.Add(cellCredit);

                            TableCell cellHourRef = new TableCell();
                            cellHourRef.Attributes.Add("class", "text-center");
                            cellHourRef.Attributes.Add("style", "vertical-align:middle");
                            cellHourRef.Text = hour_ref.ToString();
                            tRowBody.Cells.Add(cellHourRef);

                            tb1.Rows.Add(tRowBody);

                            num++;

                            prev_course = data.Course_Code;
                            prev_sec    = data.Sec_No;
                            prev_subsec = data.SubSec_No;
                        }

                        AddWorkLoadData AddWork_data = new AddWorkLoadData();
                        AddWork_data = new AddWorkLoad().getAddWorkLoad(academic_year, semester, lec_code);

                        if (AddWork_data.Lecturer != null)
                        {
                            totalCredit  += AddWork_data.TotalCredit;
                            totalHourRef += AddWork_data.HourRefer;

                            TableRow tRowBody1 = new TableRow();
                            tRowBody1.TableSection = TableRowSection.TableBody;

                            TableCell cellAddNum = new TableCell();
                            cellAddNum.Attributes.Add("class", "text-center");
                            cellAddNum.Attributes.Add("style", "vertical-align:middle");
                            cellAddNum.Text = num.ToString();
                            tRowBody1.Cells.Add(cellAddNum);

                            TableCell cellAddTitle = new TableCell();
                            cellAddTitle.Attributes.Add("class", "text-left");
                            cellAddTitle.Attributes.Add("style", "vertical-align:middle");
                            cellAddTitle.ColumnSpan = 5;
                            cellAddTitle.Text       = "ภาระงานต้นสังกัด";
                            tRowBody1.Cells.Add(cellAddTitle);

                            TableCell cellAddCredit = new TableCell();
                            cellAddCredit.Attributes.Add("class", "text-center");
                            cellAddCredit.Attributes.Add("style", "vertical-align:middle");
                            cellAddCredit.Text = AddWork_data.TotalCredit.ToString();
                            tRowBody1.Cells.Add(cellAddCredit);

                            TableCell cellAddHourRef = new TableCell();
                            cellAddHourRef.Attributes.Add("class", "text-center");
                            cellAddHourRef.Attributes.Add("style", "vertical-align:middle");
                            cellAddHourRef.Text = AddWork_data.HourRefer.ToString();
                            tRowBody1.Cells.Add(cellAddHourRef);

                            tb1.Rows.Add(tRowBody1);
                        }

                        //====================

                        TableFooterRow footRow = new TableFooterRow();
                        footRow.TableSection = TableRowSection.TableFooter;

                        TableCell cellSumTitle = new TableCell();
                        cellSumTitle.Attributes.Add("class", "text-right txt-blue-bold");
                        cellSumTitle.ColumnSpan = 6;
                        cellSumTitle.Text       = "รวม";
                        footRow.Cells.Add(cellSumTitle);

                        TableCell cell1 = new TableCell();
                        cell1.Attributes.Add("class", "text-center txt-blue-bold");
                        cell1.Text = totalCredit.ToString();
                        footRow.Cells.Add(cell1);

                        TableCell cell3 = new TableCell();
                        cell3.Attributes.Add("class", "text-center txt-blue-bold");
                        cell3.Text = totalHourRef.ToString();
                        footRow.Cells.Add(cell3);
                        tb1.Rows.Add(footRow);

                        TableRow  row  = new TableRow();
                        TableCell cell = new TableCell();
                        cell.Controls.Add(tb1);
                        row.Cells.Add(cell);
                        tblWorkLoad.Rows.Add(row);
                    }
                    else
                    {
                        HttpContext.Current.Session["response"] = "ตรวจสอบไม่พบสิทธิ์การเข้าใช้งาน";
                        HttpContext.Current.Response.Redirect("err_response.aspx");
                    }
                }
                catch (Exception err)
                {
                }
                /*=============================*/
            }
            else
            {
                HttpContext.Current.Session["response"] = "ตรวจสอบไม่พบสิทธิ์การเข้าใช้งาน";
                HttpContext.Current.Response.Redirect("err_response.aspx");
            }
        }
    }
Beispiel #8
0
    protected void btnSEARCH_Click(object sender, EventArgs e)
    {
        SysUser lecturerALL = new SysUser();

        lecturerALL = new SysUser().getSysUser(txtLecturerID.Text);

        int num = 1;

        if (lecturerALL.IdCode != null)
        {
            divShow.Visible = true;
        }
        else
        {
            divShow.Visible = false;
        }


        // Head Table
        string[] ar  = { "ลำดับ", "ชื่ออาจารย์", "ตำแหน่ง", "ชั่วโมงสอนอ้างอิง", "หน่วยกิตรวม", "ภาระงานสอน ชั่วโมง/หน่วยกิต", "เพิ่ม", "แก้ไข", "ลบ" };
        Table    tb1 = new Table();

        tb1.Attributes.Add("class", "table table-bordered table-striped table-hover");
        tb1.Attributes.Add("id", "dt_basic");
        TableHeaderRow tRowHead = new TableHeaderRow();

        tRowHead.TableSection = TableRowSection.TableHeader;

        for (int cellCtr = 1; cellCtr <= ar.Length; cellCtr++)
        {
            TableHeaderCell cellHead = new TableHeaderCell();
            cellHead.Text = ar[cellCtr - 1];
            cellHead.Attributes.Add("class", "text-center");
            tRowHead.Cells.Add(cellHead);
        }
        tb1.Rows.Add(tRowHead);



        TableRow tRowBody = new TableRow();

        tRowBody.TableSection = TableRowSection.TableBody;

        TableCell cellNum = new TableCell();

        cellNum.Attributes.Add("class", "text-center");
        cellNum.Text = num.ToString();
        tRowBody.Cells.Add(cellNum);

        TableCell cellName = new TableCell();

        cellName.Text = new AcademicPosition().getAcademicPosition(lecturerALL.AcademicPositionCode).AcademicPositionThName + " " + lecturerALL.ThName + " " + lecturerALL.ThSurName;
        tRowBody.Cells.Add(cellName);

        TableCell cellPosition = new TableCell();

        cellPosition.Attributes.Add("class", "text-center");
        cellPosition.Text = new BoardPos().getBoardPos(lecturerALL.Position).Position_Thai;
        tRowBody.Cells.Add(cellPosition);

        TableCell cellHourRef = new TableCell();

        cellHourRef.Attributes.Add("class", "text-center");
        cellHourRef.Text = new WorkLoadCalculate().getHourRef(txtACADEMIC_YEAR.Text, ddlSEMESTER.SelectedValue, lecturerALL.IdCode).ToString();
        tRowBody.Cells.Add(cellHourRef);

        TableCell cellTotalCredit = new TableCell();

        cellTotalCredit.Attributes.Add("class", "text-center");
        cellTotalCredit.Text = new WorkLoadCalculate().getTotalCredit(txtACADEMIC_YEAR.Text, ddlSEMESTER.SelectedValue, lecturerALL.IdCode).ToString();
        tRowBody.Cells.Add(cellTotalCredit);

        Sysuser2 user2 = new Sysuser2();

        user2 = new Sysuser2().getSysuser2(lecturerALL.IdCode);
        WorkLoadConfigData workload = new WorkLoadConfigData();

        workload = new WorkLoadConfig().getWorkLoadConfig(user2.Lecturer_Type, lecturerALL.Position);

        TableCell cellLoad = new TableCell();

        cellLoad.Attributes.Add("class", "text-center");
        cellLoad.Text = workload.HourReference.ToString() + " / " + workload.TotalCredit.ToString();
        tRowBody.Cells.Add(cellLoad);

        string    urlAdd = "AddWorkLoad.aspx?lecturer=" + lecturerALL.IdCode + "&year=" + txtACADEMIC_YEAR.Text + "&semester=" + ddlSEMESTER.SelectedValue;
        HyperLink hypAdd = new HyperLink();

        hypAdd.Text = "<h4><i class='fa fa-book'></i></h4>";
        hypAdd.Attributes.Add("data-target", "#modal001");
        hypAdd.Attributes.Add("data-toggle", "modal");
        hypAdd.NavigateUrl = urlAdd;
        hypAdd.ToolTip     = "Add";
        hypAdd.Target      = "_Blank";

        TableCell cellAdd = new TableCell();

        cellAdd.Width = 100;
        cellAdd.Attributes.Add("class", "text-center");
        cellAdd.Controls.Add(hypAdd);
        tRowBody.Cells.Add(cellAdd);

        float add_ref    = new AddWorkLoad().getAddWorkLoad(txtACADEMIC_YEAR.Text, ddlSEMESTER.SelectedValue, lecturerALL.IdCode).HourRefer;
        float add_credit = new AddWorkLoad().getAddWorkLoad(txtACADEMIC_YEAR.Text, ddlSEMESTER.SelectedValue, lecturerALL.IdCode).HourRefer;

        string    urlUpdate = "#";
        string    urlDelete = "#";
        HyperLink hypUpdate = new HyperLink();
        HyperLink hypDelete = new HyperLink();

        if (add_credit + add_ref == 0)
        {
            hypUpdate.Text = "<h4><i class='fa fa-ban'></i></h4>";
            hypUpdate.Attributes.Add("data-target", "#modal001");
            hypUpdate.ToolTip = "Update";
            hypUpdate.Target  = "_Blank";

            hypDelete.Text    = "<h4><i class='fa fa-ban'></i></h4>";
            hypDelete.ToolTip = "Delete";
            hypDelete.Target  = "_Blank";
        }
        else
        {
            urlUpdate = "EditWorkLoad.aspx?lecturer=" + lecturerALL.IdCode + "&year=" + txtACADEMIC_YEAR.Text + "&semester=" + ddlSEMESTER.SelectedValue;

            urlDelete = "delAddWorkLoad.aspx?lecturer=" + lecturerALL.IdCode + "&year=" + txtACADEMIC_YEAR.Text + "&semester=" + ddlSEMESTER.SelectedValue;

            hypUpdate.Text = "<h4><i class='fa fa-edit'></i></h4>";
            hypUpdate.Attributes.Add("data-target", "#modal001");
            hypUpdate.Attributes.Add("data-toggle", "modal");
            hypUpdate.NavigateUrl = urlUpdate;
            hypUpdate.ToolTip     = "Update";
            hypUpdate.Target      = "_Blank";

            hypDelete.Text = "<h4><i class='fa fa-trash-o'></i></h4>";
            hypDelete.Attributes.Add("data-target", "#modal001");
            hypDelete.Attributes.Add("data-toggle", "modal");
            hypDelete.NavigateUrl = urlDelete;
            hypDelete.ToolTip     = "Delete";
            hypDelete.Target      = "_Blank";
        }



        TableCell cellUpdate = new TableCell();

        cellUpdate.Width = 100;
        cellUpdate.Attributes.Add("class", "text-center");
        cellUpdate.Controls.Add(hypUpdate);
        tRowBody.Cells.Add(cellUpdate);

        TableCell cellDelete = new TableCell();

        cellDelete.Width = 100;
        cellDelete.Attributes.Add("class", "text-center");
        cellDelete.Controls.Add(hypDelete);
        tRowBody.Cells.Add(cellDelete);

        tb1.Rows.Add(tRowBody);

        num++;

        TableRow  row  = new TableRow();
        TableCell cell = new TableCell();

        cell.Controls.Add(tb1);
        row.Cells.Add(cell);
        tblWorkLoad.Rows.Add(row);
    }