Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Title = "Meeting Add";
            if (Session["User"] != null)
            {
                Dataservice.DatamanagementClient findata = new Dataservice.DatamanagementClient();
                findata.Open();
                UserData user = (UserData)Session["User"];
                if (!IsPostBack)
                {
                    Object[][] userprojects = findata.getprojects(user.getID());

                    if (userprojects != null)
                    {
                        for (int i = 0; i < userprojects.Length; i++)
                        {
                            Projchoose.Items.Add(new ListItem(" " + (string)userprojects[i][1], userprojects[i][0].ToString()));
                        }
                    }
                    else
                    {
                        addmembers();
                    }
                }


                findata.Close();
            }
            else
            {
                Response.Redirect("Login.aspx");
            }
        }
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 btnDeleteAcc_Click(object sender, EventArgs e)
        {
            user = (UserData)(Session["User"]);
            Userservice.UserserviceClient    service = new  Userservice.UserserviceClient();
            Dataservice.DatamanagementClient findata = new Dataservice.DatamanagementClient();
            Chatmanagement.ChatClient        chat    = new Chatmanagement.ChatClient();
            service.Open();
            findata.Open();
            chat.Open();

            Object[][] getuserprojects = findata.getprojects(user.getID());
            if (getuserprojects != null)
            {
                for (int j = 0; j < getuserprojects.Length; j++)
                {
                    string   pid            = (string)getuserprojects[j][0];
                    int      team           = findata.deleteprojteam(pid);
                    int      delete         = findata.deleteallprojnotificaion(pid);
                    int      deleteprojchat = chat.deleteprojchat(pid);
                    int      deltepissflags = findata.deleteissflagproj(pid);
                    object[] getmeetingid   = findata.getprojmeetings(pid);

                    if (getmeetingid != null)
                    {
                        for (int i = 0; i < getmeetingid.Length; i++)
                        {
                            int meetmemdel = findata.deletemeetingmembers((string)getmeetingid[i]);

                            if (meetmemdel == 1)
                            {
                                findata.deletemeeting((string)getmeetingid[i]);
                            }
                        }
                    }



                    object[][] getprojiss = findata.getprojissues(pid);

                    if (getprojiss != null)
                    {
                        for (int i = 0; i < getprojiss.Length; i++)
                        {
                            object[] issnotice = findata.getissnoticeiss((string)getprojiss[i][0]);
                            if (issnotice != null)
                            {
                                findata.deleteissnoticeiss((string)getprojiss[i][0]);
                            }
                            chat.deleteissuechat((string)getprojiss[i][0]);

                            findata.deleteissue((string)getprojiss[i][0]);
                        }
                    }


                    int proj = findata.deleteproject(pid);
                }
            }
            int projchat     = chat.deleteprojchatuser(user.getID());
            int isschat      = chat.deleteisschatuser(user.getID());
            int meetinglinks = findata.deleteuserfrommeetinglink(user.getID());
            int projteams    = findata.deleteuserfromprojteams(user.getID());
            int issteams     = findata.deleteuserfromissteams(user.getID());
            int issflag      = findata.deleteuserfromisflags(user.getID());
            int deletedvents = findata.deletealluserevents(user.getID());

            int deletetasks = findata.deleteallusertasks(user.getID());
            int deletepic   = findata.deleteallpictures(user.getID());


            int result = service.deleteUser(user.getID());

            if (result == 1)//if the result is one then the user is deleted and redirected to the index page
            {
                Session["User"] = null;
                //Response.Write("<script>alert('User Account Deleted!');</script>");
                Response.Redirect("Default.aspx");
            }

            service.Close();
            findata.Close();
            chat.Close();
        }
Beispiel #4
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();
            }
        }
Beispiel #5
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 #6
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();
            }
        }