Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Title = "Issue Report";
            if (Session["User"] != null)
            {
                if (!IsPostBack)
                {
                    UserData user = (UserData)Session["User"];
                    findata = new Dataservice.DatamanagementClient();
                    findata.Open();

                    object[] userassingedproj = findata.getassignedprojects(user.getID());

                    if (userassingedproj != null)
                    {
                        for (int i = 0; i < userassingedproj.Length; i++)
                        {
                            object[] projdetails = findata.getprojectdetails((string)userassingedproj[i]);

                            Projectchoose.Items.Add(new ListItem(" " + (string)projdetails[1], projdetails[0].ToString()));
                        }
                    }



                    findata.Close();
                }
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Title = "Member Profile";

            if (Session["User"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            else
            {
                Title = "Fincal: Member Profile";


                UserData user = (UserData)(Session["User"]);
                Dataservice.DatamanagementClient findata = new Dataservice.DatamanagementClient();
                userid = Request.QueryString.Get("uid");
                findata.Open();
                proj = findata.getprojects(userid);
                iss  = findata.getissues(userid);

                userdata = findata.getspecificuserinformation(userid);

                if (userdata != null)
                {
                    Object[][] userevents = findata.getalluserevents(userid);
                    int        eventcount = 0;
                    if (userevents != null)
                    {
                        for (int j = 0; j < userevents.Length; j++)
                        {
                            DateTime credate = DateTime.Parse((string)userevents[j][1]);



                            int result = DateTime.Compare(credate, DateTime.Now.AddDays(14));

                            if (result < 0)
                            {
                                eventcount += 1;
                            }
                        }
                    }


                    if (proj != null)
                    {
                        for (int i = 0; i < proj.Length; i++)
                        {
                            projnum += 1;
                        }
                    }
                    else
                    {
                        projnum = 0;
                    }

                    if (iss != null)
                    {
                        for (int i = 0; i < iss.Length; i++)
                        {
                            isnum += 1;
                        }
                    }
                    else
                    {
                        isnum = 0;
                    }
                    txtusername.Value = (string)userdata[0];

                    txtemail.Value    = (string)userdata[1];
                    txtskill.Value    = (string)userdata[2];
                    txtgit.Value      = (string)userdata[3];
                    txtproj.Value     = projnum.ToString();
                    txtiss.Value      = isnum.ToString();
                    txtschedule.Value = priority(eventcount).ToString();


                    object[][] userprojects       = findata.getprojects(user.getID());
                    object[]   memberassignedprog = findata.getassignedprojects(userid);
                    object[][] membernotice       = findata.getprojnotification(userid);
                    if (userprojects != null)
                    {
                        for (int i = 0; i < userprojects.Length; i++)
                        {
                            bool ismem = false;
                            if (memberassignedprog != null)
                            {
                                for (int j = 0; j < memberassignedprog.Length; j++)
                                {
                                    if (Convert.ToInt32((string)userprojects[i][0]) == Convert.ToInt32((string)memberassignedprog[j]))
                                    {
                                        ismem = true;
                                    }
                                }
                            }

                            if (membernotice != null)
                            {
                                for (int j = 0; j < membernotice.Length; j++)
                                {
                                    if (Convert.ToInt32((string)userprojects[i][0]) == Convert.ToInt32((string)membernotice[j][1]))
                                    {
                                        ismem = true;
                                    }
                                }
                            }

                            if (ismem == false)
                            {
                                Projectchoose.Items.Add(new ListItem(" " + (string)userprojects[i][1], userprojects[i][0].ToString()));
                            }
                        }
                    }
                }


                findata.Close();
            }
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["User"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            else
            {
                Title = "Projects";

                UserData user = (UserData)Session["User"];
                Dataservice.DatamanagementClient findata = new Dataservice.DatamanagementClient();
                findata.Open();

                Object[][] projects = findata.getprojects(user.getID());


                if (projects != null)
                {
                    for (int i = 0; i < projects.Length; i++)
                    {
                        object[] projteam   = findata.getprojectmembers((string)projects[i][0]);
                        object[] projissues = findata.getprojissues((string)projects[i][0]);

                        int projmem = 0;
                        if (projteam != null)
                        {
                            projmem = projteam.Length;
                        }

                        int projis = 0;
                        if (projissues != null)
                        {
                            projis = projissues.Length;
                        }

                        htmldata1 += "<a href=\"Projectedit.aspx?id=" + (string)projects[i][0] + "\">";
                        htmldata1 += "<div class=\"col s12 m3 l0\">";


                        htmldata1 += "<div class=\"card horizontal hoverable green lighten-2\">";

                        /* htmldata += "<div class=\"card-image\">";
                         *
                         * htmldata += "<img style='width:200px;height:200px' class= \"responsive-img\" src = 'data:image/jpeg;base64," + UserData.Nopic + "'/>";
                         *
                         *
                         * htmldata += "</div>";*/
                        htmldata1 += "<div class=\"card-stacked\">";
                        htmldata1 += "<div class=\"card-content black-text\">";
                        htmldata1 += "<span class=\"card-title\">" +
                                     "<p class=\"bold\">" + (string)projects[i][1] + "</p>";
                        htmldata1 += "</span>";
                        htmldata1 += "<p class=\"trunctext\">Project members: " + projmem + "</p>";
                        htmldata1 += "<p class=\"trunctext\">Project issues: " + projis + "</p>";

                        htmldata1 += "</div>";
                        htmldata1 += "</div>";
                        htmldata1 += "</div>";
                        htmldata1 += "</div>";
                        htmldata1 += "</a>";
                    }
                }

                else
                {
                    htmldata1 += "";
                }


                object[] assignedprojectsids = findata.getassignedprojects(user.getID());


                if (assignedprojectsids != null)
                {
                    for (int i = 0; i < assignedprojectsids.Length; i++)
                    {
                        object[] assigproj  = findata.getprojectdetails((string)assignedprojectsids[i]);
                        object[] projteam   = findata.getprojectmembers((string)assignedprojectsids[i]);
                        object[] projleader = findata.getspecificuserinformation((string)assigproj[3]);
                        int      projmem    = 0;
                        if (projteam != null)
                        {
                            projmem = projteam.Length;
                        }
                        htmldata2 += "<a href=\"Projectview.aspx?id=" + assigproj[0].ToString() + "\">";
                        htmldata2 += "<div class=\"col s12 m3 l0\">";


                        htmldata2 += "<div class=\"card horizontal hoverable lime lighten-2\">";

                        /* htmldata += "<div class=\"card-image\">";
                         *
                         * htmldata += "<img style='width:200px;height:200px' class= \"responsive-img\" src = 'data:image/jpeg;base64," + UserData.Nopic + "'/>";
                         *
                         *
                         * htmldata += "</div>";*/
                        htmldata2 += "<div class=\"card-stacked\">";
                        htmldata2 += "<div class=\"card-content black-text\">";
                        htmldata2 += "<span class=\"card-title\">" +
                                     "<p class=\" bold\">" + assigproj[1].ToString() + "</p>";
                        htmldata2 += "</span>";
                        htmldata2 += "<p class=\"trunctext\">Project owner: " + (string)projleader[0] + "</p>";
                        htmldata2 += "<p class=\"trunctext\">Project members: " + projmem + "</p>";


                        htmldata2 += "</div>";
                        htmldata2 += "</div>";
                        htmldata2 += "</div>";
                        htmldata2 += "</div>";
                        htmldata2 += "</a>";
                    }
                }
                else
                {
                    htmldata2 += "";
                }

                yourprojects.InnerHtml  = htmldata1;
                otherprojects.InnerHtml = htmldata2;

                findata.Close();
            }
        }