예제 #1
0
        /// <summary>
        /// Binds the project summary.
        /// </summary>
        private void BindChangeLog()
        {
            var ascending  = SortMilestonesAscending ? "" : " desc";
            var milestones = MilestoneManager.GetByProjectId(ProjectId).Sort("SortOrder" + ascending).ToList();

            ChangeLogRepeater.DataSource = ViewMode == 1 ?
                                           milestones.Take(5) :
                                           milestones;

            ChangeLogRepeater.DataBind();
        }
예제 #2
0
        /// <summary>
        /// Binds the options.
        /// </summary>
        private void BindOptions()
        {
            List <ITUser> users = UserManager.GetUsersByProjectId(ProjectId, true);

            //Get Type
            DropIssueType.DataSource = IssueTypeManager.GetByProjectId(ProjectId);
            DropIssueType.DataBind();

            //Get Priority
            DropPriority.DataSource = PriorityManager.GetByProjectId(ProjectId);
            DropPriority.DataBind();

            //Get Resolutions
            DropResolution.DataSource = ResolutionManager.GetByProjectId(ProjectId);
            DropResolution.DataBind();

            //Get categories
            var categories = new CategoryTree();

            DropCategory.DataSource = categories.GetCategoryTreeByProjectId(ProjectId);
            DropCategory.DataBind();

            //Get milestones
            DropMilestone.DataSource = MilestoneManager.GetByProjectId(ProjectId);
            DropMilestone.DataBind();

            DropAffectedMilestone.DataSource = MilestoneManager.GetByProjectId(ProjectId);
            DropAffectedMilestone.DataBind();

            //Get Users
            DropAssignedTo.DataSource = users;
            DropAssignedTo.DataBind();

            DropOwned.DataSource = users;
            DropOwned.DataBind();

            DropStatus.DataSource = StatusManager.GetByProjectId(ProjectId);
            DropStatus.DataBind();

            lblDateCreated.Text  = DateTime.Now.ToString("f");
            lblLastModified.Text = DateTime.Now.ToString("f");

            if (!User.Identity.IsAuthenticated)
            {
                return;
            }

            lblReporter.Text       = Security.GetDisplayName();
            lblLastUpdateUser.Text = Security.GetDisplayName();
        }
        public String[] GetMilestones(int ProjectId)
        {
            if (ProjectManager.GetById(ProjectId).AccessType == Common.ProjectAccessType.Private && !ProjectManager.IsUserProjectMember(UserName, ProjectId))
            {
                throw new UnauthorizedAccessException(string.Format(LoggingManager.GetErrorMessageResource("ProjectAccessDenied"), UserName));
            }

            List <Milestone> milestones = MilestoneManager.GetByProjectId(ProjectId);
            List <String>    returnval  = new List <String>();

            foreach (Milestone item in milestones)
            {
                returnval.Add(item.Name.ToString());
            }
            return(returnval.ToArray());
        }
예제 #4
0
        /// <summary>
        /// Binds the milestones.
        /// </summary>
        private void BindMilestones()
        {
            grdMilestones.Columns[1].HeaderText = GetGlobalResourceObject("SharedResources", "Milestone").ToString();
            grdMilestones.Columns[2].HeaderText = GetGlobalResourceObject("SharedResources", "Image").ToString();
            grdMilestones.Columns[3].HeaderText = GetGlobalResourceObject("SharedResources", "DueDate").ToString();
            grdMilestones.Columns[4].HeaderText = GetGlobalResourceObject("SharedResources", "ReleaseDate").ToString();
            grdMilestones.Columns[5].HeaderText = GetLocalResourceObject("IsCompletedMilestone.Text").ToString();
            grdMilestones.Columns[6].HeaderText = GetGlobalResourceObject("SharedResources", "Notes").ToString();
            grdMilestones.Columns[7].HeaderText = GetGlobalResourceObject("SharedResources", "Order").ToString();


            grdMilestones.DataSource   = MilestoneManager.GetByProjectId(ProjectId);
            grdMilestones.DataKeyField = "Id";
            grdMilestones.DataBind();

            grdMilestones.Visible = grdMilestones.Items.Count != 0;
        }
예제 #5
0
        /// <summary>
        /// Binds the options.
        /// </summary>
        private void BindOptions()
        {
            List <ITUser> users = UserManager.GetUsersByProjectId(ProjectId, true);

            //Get Type
            DropIssueType.DataSource = IssueTypeManager.GetByProjectId(ProjectId);
            DropIssueType.DataBind();

            //Get Priority
            DropPriority.DataSource = PriorityManager.GetByProjectId(ProjectId);
            DropPriority.DataBind();

            //Get Resolutions
            DropResolution.DataSource = ResolutionManager.GetByProjectId(ProjectId);
            DropResolution.DataBind();

            //Get categories
            var categories = new CategoryTree();

            DropCategory.DataSource = categories.GetCategoryTreeByProjectId(ProjectId);
            DropCategory.DataBind();

            //Get milestones
            DropMilestone.DataSource = MilestoneManager.GetByProjectId(ProjectId, false);
            DropMilestone.DataBind();

            DropAffectedMilestone.DataSource = MilestoneManager.GetByProjectId(ProjectId);
            DropAffectedMilestone.DataBind();

            //Get Users
            DropAssignedTo.DataSource = users;
            DropAssignedTo.DataBind();

            DropOwned.DataSource = users;
            DropOwned.DataBind();
            DropOwned.SelectedValue = User.Identity.Name;

            DropStatus.DataSource = StatusManager.GetByProjectId(ProjectId);
            DropStatus.DataBind();
        }
예제 #6
0
        /// <summary>
        /// When the user changes the selected field type, show the corresponding list
        /// of possible values.
        /// </summary>
        /// <param name="s">The s.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void dropFieldSelectedIndexChanged(Object s, EventArgs e)
        {
            dropValue.Items.Clear();

            dropValue.Visible = false;
            txtValue.Visible  = false;
            DateValue.Visible = false;

            switch (dropField.SelectedValue)
            {
            case "IssueId":
            case "IssueTitle":
            case "IssueDescription":
            case "IssueVotes":
            case "IssueProgress":
            case "IssueEstimation":
            case "TimeLogged":
                txtValue.Visible = true;
                break;

            case "IssuePriorityId":
                dropValue.Visible = true;

                dropValue.DataSource     = PriorityManager.GetByProjectId(ProjectId);
                dropValue.DataTextField  = "Name";
                dropValue.DataValueField = "Id";
                break;

            case "IssueTypeId":
                dropValue.Visible = true;

                dropValue.DataSource     = IssueTypeManager.GetByProjectId(ProjectId);
                dropValue.DataTextField  = "Name";
                dropValue.DataValueField = "Id";
                break;

            case "IssueMilestoneId":
                dropValue.Visible = true;

                dropValue.DataSource     = MilestoneManager.GetByProjectId(ProjectId);
                dropValue.DataTextField  = "Name";
                dropValue.DataValueField = "Id";
                break;

            case "IssueAffectedMilestoneId":
                dropValue.Visible = true;

                dropValue.DataSource     = MilestoneManager.GetByProjectId(ProjectId);
                dropValue.DataTextField  = "Name";
                dropValue.DataValueField = "Id";
                break;

            case "IssueResolutionId":
                dropValue.Visible = true;

                dropValue.DataSource     = ResolutionManager.GetByProjectId(ProjectId);
                dropValue.DataTextField  = "Name";
                dropValue.DataValueField = "Id";
                break;

            case "IssueCategoryId":
                dropValue.Visible = true;

                var objCats = new CategoryTree();
                dropValue.DataSource     = objCats.GetCategoryTreeByProjectId(ProjectId);
                dropValue.DataTextField  = "Name";
                dropValue.DataValueField = "Id";

                break;

            case "IssueStatusId":
                dropValue.Visible = true;

                dropValue.DataSource     = StatusManager.GetByProjectId(ProjectId);
                dropValue.DataTextField  = "Name";
                dropValue.DataValueField = "Id";
                break;

            case "IssueAssignedUserId":
                dropValue.Visible = true;

                dropValue.DataSource     = UserManager.GetUsersByProjectId(ProjectId);
                dropValue.DataTextField  = "DisplayName";
                dropValue.DataValueField = "Id";
                break;

            case "IssueOwnerUserId":
                dropValue.Visible        = true;
                txtValue.Visible         = false;
                dropValue.DataSource     = UserManager.GetUsersByProjectId(ProjectId);
                dropValue.DataTextField  = "DisplayName";
                dropValue.DataValueField = "Id";
                break;

            case "IssueCreatorUserId":
                dropValue.Visible = true;

                dropValue.DataSource     = UserManager.GetUsersByProjectId(ProjectId);
                dropValue.DataTextField  = "DisplayName";
                dropValue.DataValueField = "Id";
                break;

            case "DateCreatedAsDate":
            case "LastUpdateAsDate":
            case "IssueDueDate":
                DateValue.Visible = true;
                break;

            case "CustomFieldName":

                dropValue.Visible   = false;
                txtValue.Visible    = true;   //show the text value field. Not needed.
                CustomFieldSelected = true;

                if (CustomFieldManager.GetByProjectId(ProjectId).Count > 0)
                {
                    dropField.DataSource     = CustomFieldManager.GetByProjectId(ProjectId);
                    dropField.DataTextField  = "Name";
                    dropField.DataValueField = "Name";
                    dropField.DataBind();    // bind to the new data source.
                    dropField.Items.Add(GetGlobalResourceObject("SharedResources", "DropDown_ResetFields").ToString());
                    dropField.Items.Insert(0, new ListItem(GetGlobalResourceObject("SharedResources", "DropDown_SelectCustomField").ToString(), "0"));
                }
                break;

            default:
                if (dropField.SelectedItem.Text.Equals(GetGlobalResourceObject("SharedResources", "DropDown_SelectCustomField").ToString()))
                {
                    return;
                }

                // The user decides to reset the fields
                if (dropField.SelectedItem.Text.Equals(GetGlobalResourceObject("SharedResources", "DropDown_ResetFields").ToString()))
                {
                    dropField.DataSource     = null;
                    dropField.DataSource     = RequiredFieldManager.GetRequiredFields();
                    dropField.DataTextField  = "Name";
                    dropField.DataValueField = "Value";
                    dropField.DataBind();
                }

                //RW Once the list is populated with any varying type of name,
                //we just default to this case, because we know it is not a standard field.
                else
                {
                    //check the type of this custom field and load the appropriate values.
                    var cf = CustomFieldManager.GetByProjectId(ProjectId).Find(c => c.Name == dropField.SelectedValue);

                    if (cf == null)
                    {
                        return;
                    }

                    CustomFieldSelected = true;
                    CustomFieldId       = cf.Id;
                    CustomFieldDataType = cf.DataType;

                    switch (cf.FieldType)
                    {
                    case CustomFieldType.DropDownList:
                        dropValue.Visible        = true;
                        dropValue.DataSource     = CustomFieldSelectionManager.GetByCustomFieldId(cf.Id);
                        dropValue.DataTextField  = "Name";
                        dropValue.DataValueField = "Value";
                        break;

                    case CustomFieldType.Date:
                        DateValue.Visible = true;
                        break;

                    case CustomFieldType.YesNo:
                        dropValue.Visible = true;
                        dropValue.Items.Add(new ListItem(GetGlobalResourceObject("SharedResources", "DropDown_SelectOne").ToString()));
                        dropValue.Items.Add(new ListItem(GetGlobalResourceObject("SharedResources", "Yes").ToString(), Boolean.TrueString));
                        dropValue.Items.Add(new ListItem(GetGlobalResourceObject("SharedResources", "No").ToString(), Boolean.FalseString));
                        break;

                    default:
                        txtValue.Visible = true;
                        break;
                    }
                }
                break;
            }
            try
            {
                dropValue.DataBind();
            }
            catch { }
        }
예제 #7
0
        /// <summary>
        /// Handles the DayRender event of the prjCalendar control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.Web.UI.WebControls.DayRenderEventArgs"/> instance containing the event data.</param>
        protected void prjCalendar_DayRender(object sender, System.Web.UI.WebControls.DayRenderEventArgs e)
        {
            if (e.Day.IsToday)
            {
                //TODO: If issues are due today in 7 days or less then create as red, else use blue?
            }


            List <QueryClause> queryClauses = new List <QueryClause>();

            switch (dropView.SelectedValue)
            {
            case "IssueDueDates":
                QueryClause q = new QueryClause("AND", "iv.[IssueDueDate]", "=", e.Day.Date.ToShortDateString(), SqlDbType.DateTime);
                queryClauses.Add(q);

                q = new QueryClause("AND", "iv.[Disabled]", "=", "false", SqlDbType.Bit);
                queryClauses.Add(q);

                List <Issue> issues = IssueManager.PerformQuery(queryClauses, ProjectId);
                foreach (Issue issue in issues)
                {
                    if (issue.Visibility == (int)IssueVisibility.Private && issue.AssignedDisplayName != Security.GetUserName() && issue.CreatorDisplayName != Security.GetUserName() && (!UserManager.IsSuperUser() || !UserManager.IsInRole(issue.ProjectId, Globals.ProjectAdminRole)))
                    {
                        continue;
                    }

                    string cssClass = string.Empty;

                    if (issue.DueDate <= DateTime.Today)
                    {
                        cssClass = "calIssuePastDue";
                    }
                    else
                    {
                        cssClass = "calIssue";
                    }

                    if (issue.Visibility == (int)IssueVisibility.Private)
                    {
                        cssClass += " calIssuePrivate";
                    }

                    string title = string.Format(@"<div id=""issue"" class=""{3}""><a href=""{4}{2}"">{0} - {1}</a></div>", issue.FullId.ToUpper(), issue.Title, issue.Id, cssClass, Page.ResolveUrl("~/Issues/IssueDetail.aspx?id="));
                    e.Cell.Controls.Add(new LiteralControl(title));
                }
                break;

            case "MilestoneDueDates":
                List <Milestone> milestones = MilestoneManager.GetByProjectId(ProjectId).FindAll(m => m.DueDate == e.Day.Date);
                foreach (Milestone m in milestones)
                {
                    string cssClass = string.Empty;

                    if (m.DueDate <= DateTime.Today)
                    {
                        cssClass = "calIssuePastDue";
                    }
                    else
                    {
                        cssClass = "calIssue";
                    }

                    string projectName = ProjectManager.GetById(ProjectId).Name;
                    string title       = string.Format(@"<div id=""issue"" class=""{4}""><a href=""{6}{2}&m={3}"">{1} - {0} </a><br/>{5}</div>", m.Name, projectName, m.ProjectId, m.Id, cssClass, m.Notes, Page.ResolveUrl("~/Issues/IssueDetail.aspx?pid="));
                    e.Cell.Controls.Add(new LiteralControl(title));
                }
                break;
            }


            //Set the calendar to week mode only showing the selected week.
            if (dropCalendarView.SelectedValue == "Week")
            {
                if (Week(e.Day.Date) != Week(prjCalendar.VisibleDate))
                {
                    e.Cell.Visible = false;
                }
                e.Cell.Height = new Unit("300px");
            }
            else
            {
                //e.Cell.Height = new Unit("80px");
                //e.Cell.Width = new Unit("80px");
            }
        }
예제 #8
0
        /// <summary>
        /// Binds a data source to the invoked server control and all its child controls.
        /// </summary>
        public new void DataBind()
        {
            //Private issue check
            DataSource = IssueManager.StripPrivateIssuesForRequestor(DataSource, Security.GetUserName()).ToList();

            if (DataSource.Count > 0)
            {
                gvIssues.Visible              = true;
                pager.Visible                 = true;
                ScrollPanel.Visible           = true;
                OptionsContainerPanel.Visible = true;

                var pId = Request.QueryString.Get("pid", -1);

                //get custom fields for project
                if (pId > Globals.NEW_ID)
                {
                    var customFields = CustomFieldManager.GetByProjectId(pId);

                    var nrColumns = FIXED_COLUMNS;
                    //checks if its initial load to add custom controls and checkboxes
                    if (gvIssues.Columns.Count <= nrColumns + 1)
                    {
                        var firstIssue = DataSource[0];

                        //if there is custom fields add them
                        if (firstIssue.IssueCustomFields.Count > 0)
                        {
                            foreach (var value in firstIssue.IssueCustomFields)
                            {
                                //increments nr of columns
                                nrColumns++;

                                //create checkbox item
                                var lstValue = new ListItem(value.FieldName, nrColumns.ToString());

                                //find custom controls that has been checked and check them
                                var selected = Array.IndexOf(_arrIssueColumns, nrColumns.ToString()) >= 0;
                                if (selected)
                                {
                                    lstValue.Selected = true;
                                }

                                //add item to checkbox list
                                lstIssueColumns.Items.Add(lstValue);

                                //create column for custom control
                                var tf = new TemplateField {
                                    HeaderText = value.FieldName, SortExpression = value.DatabaseFieldName.Replace(" ", "[]")
                                };
                                tf.HeaderStyle.Wrap = false;
                                gvIssues.Columns.Add(tf);
                            }
                        }
                    }
                }

                DisplayColumns();
                SelectColumnsPanel.Visible = true;
                lblResults.Visible         = false;

                if (ShowProjectColumn)
                {
                    gvIssues.Columns[0].Visible      = false;
                    LeftButtonContainerPanel.Visible = false;
                }
                else
                {
                    gvIssues.Columns[4].Visible = false;
                    lstIssueColumns.Items.Remove(lstIssueColumns.Items.FindByValue("4"));

                    var projectId = _dataSource[0].ProjectId;

                    //hide votes column if issue voting is disabled
                    if (!ProjectManager.GetById(projectId).AllowIssueVoting)
                    {
                        gvIssues.Columns[4].Visible = false;
                        lstIssueColumns.Items.Remove(lstIssueColumns.Items.FindByValue("4"));
                    }

                    if (Page.User.Identity.IsAuthenticated && UserManager.HasPermission(projectId, Common.Permission.EditIssue.ToString()))
                    {
                        LeftButtonContainerPanel.Visible = true;

                        // performance enhancement
                        // WRH 2012-04-06
                        // only load these if the user has permission to do so
                        var categories = new CategoryTree();
                        dropCategory.DataSource = categories.GetCategoryTreeByProjectId(projectId);
                        dropCategory.DataBind();
                        dropMilestone.DataSource = MilestoneManager.GetByProjectId(projectId);
                        dropMilestone.DataBind();
                        dropAffectedMilestone.DataSource = dropMilestone.DataSource;
                        dropAffectedMilestone.DataBind();
                        dropOwner.DataSource = UserManager.GetUsersByProjectId(projectId);
                        dropOwner.DataBind();
                        dropPriority.DataSource = PriorityManager.GetByProjectId(projectId);
                        dropPriority.DataBind();
                        dropStatus.DataSource = StatusManager.GetByProjectId(projectId);
                        dropStatus.DataBind();
                        dropType.DataSource = IssueTypeManager.GetByProjectId(projectId);
                        dropType.DataBind();
                        dropAssigned.DataSource = UserManager.GetUsersByProjectId(projectId);
                        dropAssigned.DataBind();
                        dropResolution.DataSource = ResolutionManager.GetByProjectId(projectId);
                        dropResolution.DataBind();
                        chkDueDateReset.Checked = false;
                    }
                    else
                    {
                        //hide selection column for unauthenticated users
                        gvIssues.Columns[0].Visible      = false;
                        LeftButtonContainerPanel.Visible = false;
                    }
                }

                foreach (var item in _arrIssueColumns.Select(colIndex => lstIssueColumns.Items.FindByValue(colIndex)).Where(item => item != null))
                {
                    item.Selected = true;
                }

                gvIssues.DataSource = DataSource;
                gvIssues.DataBind();
            }
            else
            {
                ScrollPanel.Visible           = false;
                OptionsContainerPanel.Visible = false;
                lblResults.Visible            = true;
                gvIssues.Visible = false;
                pager.Visible    = false;
            }
        }
예제 #9
0
        /// <summary>
        /// Returns a valid project Milestone.
        /// </summary>
        /// <param name="p">A Project</param>
        /// <returns>Random Milestone</returns>
        public Milestone GetMilestone()
        {
            List <Milestone> miles = MilestoneManager.GetByProjectId(p.Id);

            return(miles[rng.Next(0, miles.Count)]);
        }
예제 #10
0
 /// <summary>
 /// Handles the Validate event of the MilestoneValidation control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Web.UI.WebControls.ServerValidateEventArgs"/> instance containing the event data.</param>
 protected void MilestoneValidation_Validate(object sender, ServerValidateEventArgs e)
 {
     //validate that at least one Milestone exists.
     e.IsValid = MilestoneManager.GetByProjectId(ProjectId).Count > 0;
 }
예제 #11
0
        /// <summary>
        /// Handles the ItemDataBound event of the rptProject control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="T:System.Web.UI.WebControls.RepeaterItemEventArgs"/> instance containing the event data.</param>
        private void rptProject_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            //check permissions
            if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)
            {
                Project p = (Project)e.Item.DataItem;

                if (!Context.User.Identity.IsAuthenticated || !UserManager.HasPermission(p.Id, Common.Permission.AddIssue.ToString()))
                {
                    e.Item.FindControl("ReportIssue").Visible = false;
                }

                if (!Context.User.Identity.IsAuthenticated || !UserManager.HasPermission(p.Id, Common.Permission.AdminEditProject.ToString()))
                {
                    e.Item.FindControl("Settings").Visible = false;
                }

                Image ProjectImage = (Image)e.Item.FindControl("ProjectImage");
                ProjectImage.ImageUrl = string.Format("~/DownloadAttachment.axd?id={0}&mode=project", p.Id);

                Label OpenIssuesLink    = (Label)e.Item.FindControl("OpenIssues");
                Label NextMilestoneDue  = (Label)e.Item.FindControl("NextMilestoneDue");
                Label MilestoneComplete = (Label)e.Item.FindControl("MilestoneComplete");

                string milestone = string.Empty;

                List <Milestone> milestoneList = MilestoneManager.GetByProjectId(p.Id);
                milestoneList = milestoneList.FindAll(m => m.DueDate.HasValue && m.IsCompleted != true);

                if (milestoneList.Count > 0)
                {
                    List <Milestone> sortedMilestoneList = milestoneList.Sort <Milestone>("DueDate").ToList();
                    Milestone        mileStone           = sortedMilestoneList[0];
                    if (mileStone != null)
                    {
                        milestone = ((DateTime)mileStone.DueDate).ToShortDateString();
                        int[] progressValues = ProjectManager.GetRoadMapProgress(p.Id, mileStone.Id);
                        if (progressValues[0] != 0 || progressValues[1] != 0)
                        {
                            double percent = progressValues[0] * 100 / progressValues[1];
                            MilestoneComplete.Text = string.Format("{0}%", percent);
                        }
                        else
                        {
                            MilestoneComplete.Text = "0%";
                        }
                    }
                    else
                    {
                        milestone = GetLocalResourceObject("None").ToString();
                    }

                    NextMilestoneDue.Text = string.Format(GetLocalResourceObject("NextMilestoneDue").ToString(), milestone);
                }
                else
                {
                    NextMilestoneDue.Text = string.Format(GetLocalResourceObject("NextMilestoneDue").ToString(), GetLocalResourceObject("NoDueDatesSet").ToString());
                }

                var status = StatusManager.GetByProjectId(p.Id);

                if (status.Count > 0)
                {
                    //get total open issues
                    var queryClauses = new List <QueryClause>
                    {
                        new QueryClause("AND", "iv.[IsClosed]", "=", "0", SqlDbType.Int),
                        new QueryClause("AND", "iv.[Disabled]", "=", "0", SqlDbType.Int)
                    };

                    var issueList = IssueManager.PerformQuery(queryClauses, null, p.Id);

                    OpenIssuesLink.Text = string.Format(GetLocalResourceObject("OpenIssuesCount").ToString(), issueList.Count);

                    var closedStatus = status.FindAll(s => s.IsClosedState);

                    if (closedStatus.Count.Equals(0))
                    {
                        // No open issue statuses means there is a problem with the setup of the system.
                        OpenIssuesLink.Text = GetLocalResourceObject("NoClosedStatus").ToString();
                    }
                }
                else
                {
                    // Warn users of a problem
                    OpenIssuesLink.Text = GetLocalResourceObject("NoStatusSet").ToString();
                }


                HyperLink atu = (HyperLink)e.Item.FindControl("AssignedToUser");
                Control   AssignedUserFilter = e.Item.FindControl("AssignedUserFilter");
                if (Context.User.Identity.IsAuthenticated && ProjectManager.IsUserProjectMember(User.Identity.Name, p.Id))
                {
                    System.Web.Security.MembershipUser user = UserManager.GetUser(User.Identity.Name);
                    atu.NavigateUrl = string.Format("~/Issues/IssueList.aspx?pid={0}&u={1}", p.Id, user.UserName);
                }
                else
                {
                    AssignedUserFilter.Visible = false;
                }
            }
        }
예제 #12
0
 /// <summary>
 /// Binds the roadmap.
 /// </summary>
 private void BindRoadmap()
 {
     RoadmapRepeater.DataSource = MilestoneManager.GetByProjectId(ProjectId, false);
     RoadmapRepeater.DataBind();
 }