Exemplo n.º 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();
            }
        }
Exemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["User"] == null)
            {
                Response.Redirect("Login.aspx");
            }
            else
            {
                Title = "Issue Edit";

                pid = Request.QueryString.Get("id");
                UserData user = (UserData)Session["User"];
                Currentmembers.Multiple = true;
                Othermembers.Multiple   = true;
                if (!IsPostBack)
                {
                    Dataservice.DatamanagementClient findata = new Dataservice.DatamanagementClient();
                    findata.Open();
                    issuemembers = findata.getissuemembers(pid);
                    issue        = findata.getissuedetails(pid);

                    projectmembers = findata.getprojectmembers((string)issue[3]);



                    project           = findata.getprojectdetails((string)issue[3]);
                    txtprojname.Value = (string)project[1];


                    txtprojt.Value = (string)project[1];
                    txtprojd.Value = (string)project[2];

                    for (int i = 0; i < projectmembers.Length; i++)
                    {
                        if ((string)projectmembers[i] == user.getID())
                        {
                        }
                        else
                        {
                            Boolean userisamember = false;
                            bool    issnotice     = false;
                            if (issuemembers != null)
                            {
                                for (int j = 0; j < issuemembers.Length; j++)
                                {
                                    if ((string)projectmembers[i] == (string)issuemembers[j])
                                    {
                                        userisamember = true;
                                    }
                                    else
                                    {
                                        userisamember = false;
                                    }
                                }
                            }

                            userdetails = findata.getspecificuserinformation((string)projectmembers[i]);
                            Object[][] userevents = findata.getalluserevents((string)projectmembers[i]);
                            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;
                                    }
                                }
                            }
                            object[][] userissnotice = findata.getissuenotifications((string)projectmembers[i]);

                            if (userissnotice != null)
                            {
                                for (int a = 0; a < userissnotice.Length; a++)
                                {
                                    if (Convert.ToInt32(pid) == Convert.ToInt32((string)userissnotice[a][1]))
                                    {
                                        issnotice = true;
                                    }
                                }
                            }


                            if (issnotice == false)
                            {
                                if (userisamember == true)
                                {
                                    Currentmembers.Items.Add(new ListItem(" " + priority(eventcount).ToString() + " " + (string)userdetails[0] + " " + (string)userdetails[2] + " ", (string)projectmembers[i].ToString()));
                                }
                                else
                                {
                                    Othermembers.Items.Add(new ListItem(" " + priority(eventcount).ToString() + " " + (string)userdetails[0] + " " + (string)userdetails[2] + " ", (string)projectmembers[i].ToString()));
                                }
                            }
                        }
                    }

                    findata.Close();
                }
            }
        }
Exemplo n.º 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();
            }
        }