public OpenWorkItemsResult GetDefaultWorkItem() { OpenWorkItemsResult result = new OpenWorkItemsResult(); _dummyNumber--; result.Number = _dummyNumber; result.UseApplications = UseApplications; var type = result.GetType(); var properties = type.GetProperties(); foreach (var kp in ContextValues.Where(kp => kp.Value != 0)) { if (FindProperty(properties, kp.Key, out PropertyInfo property)) { property.SetValue(result, kp.Value); } } if (AppendIfMissing?.Any() ?? false) { foreach (var kp in AppendIfMissing.Where(kp => kp.Value != 0)) { if (FindProperty(properties, kp.Key, out PropertyInfo property) && !ContextValues.ContainsKey(kp.Key)) { property.SetValue(result, kp.Value); } } } return(result); }
public SelectList MilestoneSelect(OpenWorkItemsResult item = null, bool withIndirectOptions = false) { var items = AllMilestones.ToList(); if (withIndirectOptions) { items.InsertRange(0, new IndirectMilestones().GetSelectListItems()); } return(new SelectList(items, "Value", "Text", item?.MilestoneId)); }
public SelectList ProjectSelect(OpenWorkItemsResult item = null) { return((item?.UseApplications ?? true) ? new SelectList(ProjectsByApp[item?.ApplicationId ?? 0].Concat(ProjectsWithoutApps[item?.TeamId ?? 0]).OrderBy(row => row.Text), "Value", "Text", item?.ProjectId) : new SelectList(ProjectsByTeam[item?.TeamId ?? 0], "Value", "Text", item?.ProjectId)); }
public SelectList AppSelect(OpenWorkItemsResult item = null) { return(new SelectList(AllApps[item.TeamId], "Value", "Text", item?.ApplicationId)); }
public SelectList TeamSelect(OpenWorkItemsResult item = null) { return(new SelectList(Teams, "Value", "Text", item?.TeamId)); }
public SelectList CloseReasonSelect(OpenWorkItemsResult item = null) { return(new SelectList(CloseReasons, "Value", "Text", item?.CloseReasonId)); }
public SelectList SizeSelect(OpenWorkItemsResult item = null) { return(new SelectList(Sizes, "Value", "Text", item?.SizeId)); }
public static IHtmlContent MilestoneDisplay(this IHtmlHelper <dynamic> html, OpenWorkItemsResult item) { throw new NotImplementedException(); }
public SelectList ProjectSelect(OpenWorkItemsResult item = null) { return(new SelectList(AllProjects[item?.ApplicationId ?? 0], "Value", "Text", item?.ProjectId)); }
public SelectList MilestoneSelect(OpenWorkItemsResult item = null) { return(new SelectList(Milestones, "Value", "Text", item?.MilestoneId)); }