protected void Page_Load(object sender, EventArgs e)
 {
     Page.Title = "Report Details - eCMR";
     if (HttpContext.Current.Session["RoAccessLevel"] != null
         && HttpContext.Current.Session["RoAccessLevel"].ToString() == "5")
     {
         currentReportID = Request.QueryString["ReportID"];
         this.dbm = new DatabaseMgmt();
         rdCL = this.dbm.ReporDetailstforCL(currentReportID);
         if (rdCL != null)
         {
             currentCourseCode = rdCL.coCode;
             currentCourseName = rdCL.coName;
             reportCreateDate = String.Format("{0:dd MMM yyyy hh:mm:ss}", rdCL.reCreateDate);
             userCreateID = rdCL.usCreateID.ToString();
             retypeName = rdCL.reTyName;
             loadReportRepeater();
         }
         else
         {
             Response.Redirect("CL-Reports.aspx");
         }
     }
     else
     {
         Response.Redirect("Login.aspx");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     Page.Title = "Report Details - eCMR";
     if (HttpContext.Current.Session["RoAccessLevel"] != null
         && HttpContext.Current.Session["RoAccessLevel"].ToString() == "3")
     {
         sttR = Request.QueryString["sttR"];
         this.dbm = new DatabaseMgmt();
         if(sttR == "1")
         {
             listReportPreviewForAll = dbm.ListReportPreviewForaLL();
             titleStatisticReport = "Statistics Reports about CMRs";
         }
         else if (sttR == "2")
         {
             chartData = dbm.ListCoursesReportStatictis();
             titleStatisticReport = "Statistics Reports about Courses";
         }
         else
         {
             Response.Redirect("DLT-Dashboard.aspx");
         }
     }
     else
     {
         Response.Redirect("Login.aspx");
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "Create New Report - eCMR";
            if (HttpContext.Current.Session["RoAccessLevel"] != null
                && HttpContext.Current.Session["RoAccessLevel"].ToString() == "5")
            {
                currentCourseCode = Request.QueryString["Code"];
                this.dbm = new DatabaseMgmt();
                course = dbm.IsExistCourseCode(currentCourseCode);
                if (course != null)
                {
                    if(!IsPostBack)
                    {
                        rt = dbm.ListReportTypes();
                        string[]defaultData = rt[0].reTyFieldName;
                        HttpContext.Current.Session["ReportTypeID"] = rt[0].reTyID.ToString();
                        reporttypesDropDownList.DataTextField = "reTyName";
                        reporttypesDropDownList.DataValueField = "reTyID";
                        reporttypesDropDownList.DataSource = rt;
                        reporttypesDropDownList.DataBind();

                        RepeaterReport.DataSource = defaultData;
                        RepeaterReport.DataBind();
                    }
                }
                else
                {
                    Response.Redirect("CL-Dashboard.aspx");
                }
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "Adminitrators's Dashboard - eCMR";
            if (HttpContext.Current.Session["RoAccessLevel"] != null
                && HttpContext.Current.Session["RoAccessLevel"].ToString() == "1")
            {
                this.dbm = new DatabaseMgmt();
                this.userList = dbm.ListUsers();

                RepeaterCourse.DataSource = this.userList;
                RepeaterCourse.DataBind();
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Page.Title = "Comments Report - eCMR";
     if (HttpContext.Current.Session["RoAccessLevel"] != null
         && HttpContext.Current.Session["RoAccessLevel"].ToString() == "3")
     {
         this.dbm = new DatabaseMgmt();
         string currentUserID = HttpContext.Current.Session["UsID"].ToString();
         this.commentsReportList = dbm.ListCommentDetailsForDLT(currentUserID);
         RepeaterCourse.DataSource = this.commentsReportList;
         RepeaterCourse.DataBind();
     }
     else
     {
         Response.Redirect("Login.aspx");
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "Course Leader's Reports View - eCMR";
            if (HttpContext.Current.Session["RoAccessLevel"] != null
                && HttpContext.Current.Session["RoAccessLevel"].ToString() == "5")
            {
                this.dbm = new DatabaseMgmt();
                string currentCLID = HttpContext.Current.Session["UsID"].ToString();
                this.reportList = dbm.ListReportPreviewForCL(currentCLID);

                RepeaterCourse.DataSource = this.reportList;
                RepeaterCourse.DataBind();
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "Adminitrators's Dashboard - eCMR";
            if (HttpContext.Current.Session["RoAccessLevel"] != null
                && HttpContext.Current.Session["RoAccessLevel"].ToString() == "1")
            {
                userID = Request.QueryString["UserID"];
                this.dbm = new DatabaseMgmt();
                if (!IsPostBack)
                {
                    this.currentUser = dbm.FindUserByUserID(userID);
                    if (currentUser != null)
                    {
                        userAccount.Value = currentUser.usAccount;
                        userPassword.Value = currentUser.usPassword;
                        userFullName.Value = currentUser.usFullName;
                        bool usSex = currentUser.usSex;
                        if(usSex == true)
                        {
                            sexMale.Checked = true;
                            sexFemale.Checked = false;
                        }
                        else
                        {
                            sexMale.Checked = false;
                            sexFemale.Checked = true;
                        }
                        userAddress.Value = currentUser.usAddress;
                        userPhone.Value = currentUser.usPhone;
                        txtDate.Text = String.Format("{0:yyyy-MM-dd}", currentUser.usDateOfBirth);

                    }
                    else
                    {
                        Response.Redirect("ADM-CourseMgmt.aspx");
                    }
                }
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Page.Title = "Report Details - eCMR";
     if (HttpContext.Current.Session["RoAccessLevel"] != null
         && HttpContext.Current.Session["RoAccessLevel"].ToString() == "3")
     {
         currentReportID = Request.QueryString["ReportID"];
         if(currentReportID == null || currentReportID == @"")
         {
             Response.Redirect("DLT-Dashboard.aspx");
         }
         else
         {
             this.dbm = new DatabaseMgmt();
         }
     }
     else
     {
         Response.Redirect("Login.aspx");
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            Page.Title = "Adminitrators's Dashboard - eCMR";
            if (HttpContext.Current.Session["RoAccessLevel"] != null
                && HttpContext.Current.Session["RoAccessLevel"].ToString() == "1")
            {
                courseID = Request.QueryString["CourseID"];
                this.dbm = new DatabaseMgmt();
                if (!IsPostBack)
                {
                    this.course = dbm.FindCourseByID(courseID);
                    if (course != null)
                    {
                        courseCode.Value = course.coCode;
                        courseName.Value = course.coName;
                        courseDescription.Value = course.coDescription;
                        facultyID.InnerText = course.faID.ToString();
                        courseLeaderID.InnerText = course.coCL.ToString();
                        courseModeratorID.InnerText = course.coCM.ToString();

                        this.listFaculties = dbm.ListFaculties();
                        loadfacultiesDropDownList();

                        this.listCLs = dbm.ListCourseLeader();
                        loadCourseLeaderDropDownList();

                        this.listCMs = dbm.ListCourseModerator();
                        loadCourseModeratorDropDownList();
                    }
                    else
                    {
                        Response.Redirect("ADM-CourseMgmt.aspx");
                    }
                }
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Page.Title = "Login - eCMR";
     UserAutoLogIn();
     dbm = new DatabaseMgmt();
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     Page.Title = "Director of Learning and Quality's Dashboard - eCMR";
     if (HttpContext.Current.Session["RoAccessLevel"] != null
         && HttpContext.Current.Session["RoAccessLevel"].ToString() == "3")
     {
         this.dbm = new DatabaseMgmt();
     }
     else
     {
         Response.Redirect("Login.aspx");
     }
 }