Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["id"] != null && Request.QueryString["path"] != null && Request.QueryString["video_link"] != null)
            {
                //TestimonialDAO tdao = new TestimonialDAO();
                string id       = Request.QueryString["id"];
                string fullPath = Request.QueryString["path"];
                string link     = Request.QueryString["video_link"];
                int    id_num   = Convert.ToInt32(id);
                if (!System.IO.File.Exists(fullPath))
                {
                    Response.Redirect("Home.aspx");
                }
                else
                {
                    System.IO.File.Delete(fullPath);
                    Course_elearnDAO cdao = new Course_elearnDAO();
                    cdao.delete_Material(id_num, fullPath);
                    cdao.delete_link(id_num, link);
                    //set audit
                    User   currentUser = (User)Session["currentUser"];
                    string filename    = Path.GetFileName(fullPath);
                    setAudit(currentUser, "course", "update", id, "deleted material link: " + filename);
                }

                Response.Redirect("viewModuleInfo.aspx?id=" + id_num);
            }
        }
Beispiel #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Request.QueryString["id"] != null && Request.QueryString["video_link"] != null)
            {
                //TestimonialDAO tdao = new TestimonialDAO();
                string id     = Request.QueryString["id"];
                string link   = Request.QueryString["video_link"];
                int    id_num = Convert.ToInt32(id);

                User             currentUser = (User)Session["currentUser"];
                Course_elearnDAO cdao        = new Course_elearnDAO();
                cdao.delete_link(id_num, link);
                setAudit(currentUser, "course", "update", id, "deleted material link: " + link);

                Response.Redirect("viewModuleInfo.aspx?id=" + id_num);
            }
        }