Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["User"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            else
            {
                Title = "Issues";

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

                Object[][] issue = findata.getissues(user.getID());


                if (issue != null)
                {
                    for (int i = 0; i < issue.Length; i++)
                    {
                        Object[] projectdetails = findata.getprojectdetails((string)issue[i][3]);
                        object[] issteam        = findata.getissuemembers((string)issue[i][0]);
                        int      issmem         = 0;
                        if (issteam != null)
                        {
                            issmem = issteam.Length;
                        }

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


                        htmldata1 += "<div class=\"card horizontal hoverable " + colorchoice(Convert.ToInt32((string)issue[i][4])) + "\">";

                        /* 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)issue[i][1] + "</p>";
                        htmldata1 += "</span>";
                        htmldata1 += "<p class=\"trunctext\">Project: " + (string)projectdetails[1] + "</p>";
                        htmldata1 += "<p class=\"trunctext\">Issue members: " + issmem + "</p>";


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

                else
                {
                    htmldata1 += "";
                }


                object[] assignedissueids = findata.getassignedissues(user.getID());


                if (assignedissueids != null)
                {
                    for (int i = 0; i < assignedissueids.Length; i++)
                    {
                        object[] assigiss       = findata.getissuedetails((string)assignedissueids[0]);
                        Object[] projectdetails = findata.getprojectdetails((string)assigiss[3]);
                        object[] issteam        = findata.getissuemembers((string)assignedissueids[0]);
                        int      issmem         = 0;
                        if (issteam != null)
                        {
                            issmem = issteam.Length;
                        }

                        htmldata2 += "<a href=\"Issueview.aspx?id=" + assigiss[0].ToString() + "\">";
                        htmldata2 += "<div class=\"col s12 m3 l0\">";


                        htmldata2 += "<div class=\"card horizontal hoverable " + colorchoice(Convert.ToInt32((string)assigiss[4])) + "\">";

                        /* 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\">" + assigiss[1].ToString() + "</p>";
                        htmldata2 += "</span>";
                        htmldata2 += "<p class=\"trunctext\">Project: " + (string)projectdetails[1] + "</p>";
                        htmldata2 += "<p class=\"trunctext\">Issue members: " + issmem + "</p>";



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


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

                if (userproj != null)
                {
                    for (int i = 0; i < userproj.Length; i++)
                    {
                        object[][] issuedetails = findata.getissueflags((string)userproj[i][0]);

                        if (issuedetails != null)
                        {
                            object[] projdetails = findata.getprojectdetails((string)userproj[i][0]);


                            for (int j = 0; j < issuedetails.Length; j++)
                            {
                                htmldata3 += "<a href=\"Issueflagviewer.aspx?id=" + (string)issuedetails[j][0] + "\">";
                                htmldata3 += "<div class=\"col s12 m3 l0\">";


                                htmldata3 += "<div class=\"card horizontal hoverable\">";

                                /* htmldata += "<div class=\"card-image\">";
                                 *
                                 * htmldata += "<img style='width:200px;height:200px' class= \"responsive-img\" src = 'data:image/jpeg;base64," + UserData.Nopic + "'/>";
                                 *
                                 *
                                 * htmldata += "</div>";*/
                                htmldata3 += "<div class=\"card-stacked\">";
                                htmldata3 += "<div class=\"card-content black-text\">";
                                htmldata3 += "<span class=\"card-title\">" +
                                             "<p class=\" bold\">" + (string)issuedetails[j][3] + "</p>";
                                htmldata3 += "</span>";
                                htmldata3 += "<p class=\"trunctext\">Project: " + (string)projdetails[1] + "</p>";
                                htmldata3 += "<p class=\"trunctext\">Reporting member: " + (string)issuedetails[j][1] + "</p>";


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



                yourprojects.InnerHtml  = htmldata1;
                otherprojects.InnerHtml = htmldata2;
                flagged.InnerHtml       = htmldata3;
                findata.Close();
            }
        }
Beispiel #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();
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Title = "Chats";
            if (Session["User"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            else
            {
                UserData user = (UserData)Session["User"];
                Dataservice.DatamanagementClient findata = new Dataservice.DatamanagementClient();

                findata.Open();

                Object[][] projects      = findata.getprojects(user.getID());
                Object[][] otherprojects = findata.getassignedprojdetials(user.getID());
                Object[][] issue         = findata.getissues(user.getID());
                Object[][] otherissues   = findata.getassignedissdetials(user.getID());
                if (projects != null)
                {
                    for (int i = 0; i < projects.Length; i++)
                    {
                        object[] projmembers = findata.getprojectmembers((string)projects[i][0]);
                        int      nummem      = 0;
                        if (projmembers != null)
                        {
                            nummem = projmembers.Length;
                        }

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


                        htmldata1 += "<div class=\"card horizontal hoverable blue-grey\">";

                        /* 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=\"bold\">Members: " + nummem + "</p>";

                        htmldata1 += "</span>";


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

                if (otherprojects != null)
                {
                    for (int i = 0; i < otherprojects.Length; i++)
                    {
                        object[] projmembers = findata.getprojectmembers((string)otherprojects[i][0]);
                        int      nummem      = 0;
                        if (projmembers != null)
                        {
                            nummem = projmembers.Length;
                        }
                        htmldata1 += "<a href=\"Chatspecificproj.aspx?id=" + (string)otherprojects[i][0] + "\">";
                        htmldata1 += "<div class=\"col s12 m3 l0\">";


                        htmldata1 += "<div class=\"card horizontal hoverable blue-grey lighten-5\">";

                        htmldata1 += "<div class=\"card-stacked\">";
                        htmldata1 += "<div class=\"card-content black-text\">";
                        htmldata1 += "<span class=\"card-title\">" +
                                     "<p class=\"bold\">" + (string)otherprojects[i][1] + "</p>";
                        htmldata1 += "</span>";
                        htmldata1 += "<p class=\"bold\">Members: " + nummem + "</p>";

                        htmldata1 += "</span>";


                        htmldata1 += "</div>";
                        htmldata1 += "</div>";
                        htmldata1 += "</div>";
                        htmldata1 += "</div>";
                        htmldata1 += "</a>";
                    }
                }
                else
                {
                    htmldata1 += "";
                }
                if (issue != null)
                {
                    for (int i = 0; i < issue.Length; i++)
                    {
                        Object[] projectdetails = findata.getprojectdetails((string)issue[i][3]);

                        object[] issmembers = findata.getissuemembers((string)issue[i][0]);
                        int      nummem     = 0;
                        if (issmembers != null)
                        {
                            nummem = issmembers.Length;
                        }
                        htmldata2 += "<a href=\"Chatspecificissue.aspx?id=" + (string)issue[i][0] + "\">";
                        htmldata2 += "<div class=\"col s12 m3 l0\">";


                        htmldata2 += "<div class=\"card horizontal hoverable green\">";

                        /* 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\">" + (string)issue[i][1] + "</p>";
                        htmldata2 += "</span>";
                        htmldata2 += "<p class=\"trunctext\">Project: " + (string)projectdetails[1] + "</p>";
                        htmldata2 += "</span>";
                        htmldata2 += "<p class=\"bold\">Members: " + nummem + "</p>";


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

                if (otherissues != null)
                {
                    for (int i = 0; i < otherissues.Length; i++)
                    {
                        Object[] projectdetails = findata.getprojectdetails((string)otherissues[i][0]);
                        object[] issmembers     = findata.getissuemembers((string)otherissues[i][0]);
                        int      nummem         = 0;
                        if (issmembers != null)
                        {
                            nummem = issmembers.Length;
                        }

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


                        htmldata2 += "<div class=\"card horizontal hoverable cyan lighten-3\">";

                        /* 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\">" + (string)otherissues[i][1] + "</p>";
                        htmldata2 += "</span>";
                        htmldata2 += "<p class=\"trunctext\">Project: " + (string)projectdetails[1] + "</p>";
                        htmldata2 += "</span>";
                        htmldata2 += "<p class=\"bold\">Members: " + nummem + "</p>";

                        htmldata2 += "</div>";
                        htmldata2 += "</div>";
                        htmldata2 += "</div>";
                        htmldata2 += "</div>";
                        htmldata2 += "</a>";
                    }
                }
                else
                {
                    htmldata2 += "";
                }
                Projects.InnerHtml += htmldata1;
                Issues.InnerHtml   += htmldata2;
                findata.Close();
            }
        }