예제 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Login())
     {
         Response.Redirect("/login.aspx");
     }
     else
     {
         if (Session["currentproject"] != null)
         {
             Gantt1.prjID = long.Parse(Session["currentproject"].ToString());
             Session.Remove("currentproject");
         }
         Gantt1.MakeGantt();
         litPrint.Text = string.Format("<img src=/i/printer.gif border=0 style=\"cursor:pointer\" onclick=\"PrintGantt({0})\">", Gantt1.prjID);
         ProjectReport pr = new ProjectReport();
         pr.prjID         = Gantt1.prjID;
         pr.UC            = UC;
         litForecast.Text = pr.ForecastDate();
     }
 }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Login())
            {
                ClientScript.RegisterStartupScript(this.GetType(), "endsession", "<script>opener.location.href=opener.location.href;self.close();</script>");
            }
            else
            {
                switch (Request["Report"])
                {
                case "1":     // Gantt
                    Gantt1.prjID = long.Parse(Request["Prj"].ToString());
                    Gantt1.MakeGantt();
                    break;

                case "0":     // GanttPDF
                    Gantt1.NoRender = true;
                    Gantt1.prjID    = long.Parse(Request["Prj"].ToString());
                    Gantt1.MakeGantt();
                    Gantt1.Visible = false;
                    GetGanttPDF(Gantt1.Img1, Gantt1.Img2);
                    break;

                case "2":     // Timing per utente
                    ProjectReport pr = new ProjectReport();
                    pr.UC    = UC;
                    pr.prjID = long.Parse(Request["Prj"].ToString());
                    if (Request["Member"] != null)
                    {
                        pr.MemberId   = long.Parse(Request["Member"].ToString());
                        lblPrint.Text = pr.ProjectTiming(false, false);
                    }
                    else
                    {
                        lblPrint.Text = pr.ProjectTiming(false, true);
                    }
                    break;
                }
            }
        }