private List <Subject> GetSubjects()
 {
     if (Session["Subjects"] == null)
     {
         ArchiveLogic al    = new ArchiveLogic();
         Modul        modul = al.getModulById(Int32.Parse(Request.QueryString["ModulID"]));
         return(modul.Subjects.ToList <Subject>());
     }
     else
     {
         return((List <Subject>)Session["Subjects"]);
     }
 }
 private Modul GetModulByQuerystring()
 {
     if (Request.QueryString["ModulId"] == null)
     {
         Response.Redirect("Default.aspx");
         return(null);
     }
     else
     {
         ArchiveLogic al = new ArchiveLogic();
         return(al.getModulById(Int32.Parse(Request.QueryString["ModulId"])));
     }
 }
        /// <summary>
        /// created and opens the modules that belongs to the clicked job and redirects the user to the edit module page
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void jobList_Click(object sender, BulletedListEventArgs e)
        {
            String text  = jobList.Items[e.Index].Text;
            int    objId = Int16.Parse(text.Remove(text.IndexOf(':')));
            Job    job   = jobLogic.getJobById(objId);

            if (job != null)
            {
                PDFHandler handler = new PDFHandler();
                Modul      module  = logic.getModulById(job.ModulID);
                handler.CreatePDF(module, Server);

                if (HttpContext.Current.User.IsInRole("Freigabeberechtigter") || HttpContext.Current.User.IsInRole("Koordinator"))
                {
                    Response.Redirect(@"http://*****:*****@"http://localhost:56639/ModulBearbeiten.aspx?ModulID=" + job.ModulID);
                }
            }
        }