private void ProjectClicked(object sender, EventArgs e, ProjectObject project)
        {
            // check if project is private, if it is then
            // if(project.isPrivate == 1)

            /* if ((project.user != UserObject.loggedUser.iduser) && project.isPrivate == 1) // if the user isn't the project owner
             * {
             *   // go to db, try to return a row from allowedusers which has this project id and this userid
             *   // formname. showdialouge
             *
             *   DataTable isUserAllowed = Connection.GetDbConn().GetDataTable(SqlProject.CheckUserAccess(UserObject.loggedUser.iduser, project.idproject));
             *
             *  if (isUserAllowed.Rows.Count == 0) // if no result
             *  {
             *
             *  }
             *
             * } */
            // checked if user is in this project's 'allowUsers' table
            // if so, open displaybugsform, if not then show message box advising of no access
            // post project - poster is added to allowedaccess table + project is created
            ProjectObject.Projects.Clear(); //clear the list, we will need to clear all lists when more are added
            // i dont want to have to pass the display instance all the way to here
            ProjectObject.UserProjects.Clear();
            display.DisplayBugsForm(project.idproject.ToString());
        }
Beispiel #2
0
        private void Button_Back_Click(object sender, EventArgs e)
        {
            //THIS NEEDS TO BE CHANGED, IDEALLY WHEN PAGE LOADED, CREATE BUG INSTANCE INSTEAD OF ANOTHER QUERY

            /* DataTable bugInfo = Connection.GetDbConn().GetDataTable(SqlBug.GetOneBug(currentBug.idbug));
             * DataRow row = bugInfo.Rows[0]; */
            BugObject.Bugs.Clear();
            UpdateObject.Updates.Clear();
            display.DisplayBugsForm(currentBug.project);
        }
 /// <summary>
 /// Run this when a project's panel is clicked on
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 /// <param name="id"></param>
 private void ProjectClicked(object sender, EventArgs e, string id)
 {
     ProjectObject.Projects.Clear();
     ProjectObject.UserProjects.Clear();
     display.DisplayBugsForm(id);
 }
 private void Button_Back_Click(object sender, EventArgs e)
 {
     display.DisplayBugsForm(currentProject);
 }
 private void ProjectClicked(object sender, EventArgs e, string project)
 {
     display.DisplayBugsForm(project);
 }