protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["supervisorsignin"] != null)
     {
         supervvisor = Session["supervisorsignin"] as _Supervisor;
         if (RouteData.Values["id"] != null)
         {
             thesis.ThesisID = Convert.ToInt64(RouteData.Values["id"]);
             thesis          = thesis.GetById(Convert.ToInt64(RouteData.Values["id"]));
             listStudent     = student.GetForSupervisor(supervvisor.SupervisorId);
             if (listStudent.Count < 1)
             {
                 btnEdit.Enabled = false;
             }
             if (!IsPostBack)
             {
                 GetData();
             }
         }
         else
         {
             Response.Redirect("/Supervisor/Thesis");
         }
     }
     else
     {
         Response.Redirect("/Home");
     }
 }
Beispiel #2
0
        private void DownloadFile(long?id)
        {
            thesis = thesis.GetSubmissionById(id);

            Response.ContentType = "application/octet-stream";
            Response.AddHeader("Content-Disposition", "attachment; filename=" + thesis.FileName);
            Response.TransmitFile(Server.MapPath(thesis.FilePath));
            Response.Flush();
            Response.End();
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["supervisorsignin"] != null)
     {
         // Check Downlaod request for File ID
         if (Request.Url.AbsolutePath.Contains("Supervisor/Submission/Downlaod/"))
         {
             if (RouteData.Values["id"] != null)
             {
                 DownloadFile(Convert.ToInt64(RouteData.Values["id"]));
                 //redirect back
             }
         }
         else
         {
             // Get Submission for Thesis ID
             if (RouteData.Values["id"] != null)
             {
                 thesis = thesis.GetById(Convert.ToInt64(RouteData.Values["id"]));
                 if (!IsPostBack)
                 {
                     GetData();
                 }
             }
             else
             {
                 Response.Redirect("/Supervisor/Thesis");
             }
         }
         if (Session["success"] != null)
         {
             pnlResponseSuccess.Visible = true;
             Session["success"]         = null;
         }
         else if (Session["fail"] != null)
         {
             pnlResponseFail.Visible = true;
             Session["fail"]         = null;
         }
         if (Session["approved"] != null)
         {
             pnlApprovedmsg.Visible = true;
             Session["approved"]    = null;
         }
         if (Session["disapproved"] != null)
         {
             pnlDisApprovedmsg.Visible = true;
             Session["disapproved"]    = null;
         }
     }
     else
     {
         Response.Redirect("/Home");
     }
 }
Beispiel #4
0
        private void GetData()
        {
            thesis = thesis.GetSubmissionById(Convert.ToInt64(RouteData.Values["id"]));

            if (thesis.Review != null)
            {
                btnReview.Visible  = false;
                txtReview.Text     = thesis.Review;
                txtReview.ReadOnly = true;
            }
        }
Beispiel #5
0
        private void GetData()
        {
            thesis = thesis.GetGTCSubmissionById(Convert.ToInt64(RouteData.Values["id"]));
            var review = thesis.GTCReviews.Where(x => x.gtc_id == supervisor.SupervisorId).FirstOrDefault();

            if (review.gtc_review1 != "")
            {
                btnReview.Visible  = false;
                txtReview.Text     = review.gtc_review1;
                txtReview.ReadOnly = true;
            }
        }
Beispiel #6
0
 private void GetData()
 {
     thesis = thesis.GetSubmissionById(Convert.ToInt64(RouteData.Values["id"]));
     if (thesis.Review != null)
     {
         lblReview.Text = thesis.Review;
     }
     else
     {
         Session.Add("review-notadded", true);
         Response.Redirect("/Student/Thesis/History");
     }
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["studentsignin"] != null)
     {
         student = Session["studentsignin"] as _Student;
         thesis.Student.StudentId = student.StudentId;
         thesis = thesis.GetByStudentId();
         if (!IsPostBack)
         {
             GetData();
         }
     }
     else
     {
         Response.Redirect("/Home");
     }
 }
Beispiel #8
0
 private void GetData()
 {
     thesis.Student = student;
     thesis         = thesis.GetByStudentId();
     if (thesis != null)
     {
         if (thesis.GTCReviews.Count != 0)
         {
             gvGTCReview.DataSource = thesis.GTCReviews;
             gvGTCReview.DataBind();
         }
         else
         {
             Session.Add("review-notadded", true);
             Response.Redirect("/Student/Thesis/History");
         }
     }
 }
Beispiel #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            pnlResponseFail.Visible = false;
            if (Session["studentsignin"] != null)
            {
                if (Request.Url.AbsolutePath.Contains("Student/Submission/Downlaod/"))
                {
                    if (RouteData.Values["id"] != null)
                    {
                        DownloadFile(Convert.ToInt64(RouteData.Values["id"]));
                        //redirect back
                    }
                }
                else
                {
                    student = Session["studentsignin"] as _Student;
                    thesis.Student.StudentId = student.StudentId;
                    thesis = thesis.GetByStudentId();

                    if (thesis != null)
                    {
                        GetData();
                    }
                    else
                    {
                        Response.Redirect("/Student/Thesis");
                    }

                    if (Session["review-notadded"] != null)
                    {
                        pnlResponseFail.Visible = true;
                        Session.Remove("review-notadded");
                    }
                }
            }
            else
            {
                Response.Redirect("/Home");
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     // Check User is sign in
     if (Session["adminsignin"] != null)
     {
         if (RouteData.Values["id"] != null)
         {
             if (!IsPostBack)
             {
                 thesis = thesis.GetById(Convert.ToInt64(RouteData.Values["id"]));
                 GetData();
             }
         }
         else
         {
             Response.Redirect("/Admin/Report/Review");
         }
     }
     else
     {
         Response.Redirect("/Home");
     }
 }
Beispiel #11
0
 private void GetData()
 {
     thesis.Student.StudentId = student.StudentId;
     thesis = thesis.GetByStudentId();
 }