本文整理汇总了C#中ASC.Projects.Core.Domain.TaskFilter类的典型用法代码示例。如果您正苦于以下问题:C# TaskFilter类的具体用法?C# TaskFilter怎么用?C# TaskFilter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TaskFilter类属于ASC.Projects.Core.Domain命名空间,在下文中一共展示了TaskFilter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetByFilter
public virtual List<Project> GetByFilter(TaskFilter filter)
{
var listProjects = new List<Project>();
while (true)
{
var projects = projectDao.GetByFilter(filter).Where(CanRead).ToList();
if (filter.LastId != 0)
{
var lastProjectIndex = projects.FindIndex(r => r.ID == filter.LastId);
if (lastProjectIndex >= 0)
{
projects = projects.SkipWhile((r, index) => index <= lastProjectIndex).ToList();
}
}
listProjects.AddRange(projects);
if (filter.Max <= 0 || filter.Max>150000) break;
listProjects = listProjects.Take((int) filter.Max).ToList();
if (listProjects.Count == filter.Max || projects.Count == 0) break;
if (listProjects.Count != 0)
filter.LastId = listProjects.Last().ID;
filter.Offset += filter.Max;
}
return listProjects;
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:35,代码来源:ProjectEngine.cs
示例2: BuildUsersWithoutActiveTasks
public IList<object[]> BuildUsersWithoutActiveTasks(TaskFilter filter)
{
var result = new List<object[]>();
var users = new List<Guid>();
if (filter.UserId != Guid.Empty) users.Add(filter.UserId);
else if (filter.DepartmentId != Guid.Empty)
{
users.AddRange(CoreContext.UserManager.GetUsersByGroup(filter.DepartmentId).Select(u => u.ID));
}
else if (filter.HasProjectIds)
{
users.AddRange(projectDao.GetTeam(filter.ProjectIds).Select(r => r.ID));
}
else if (!filter.HasProjectIds)
{
users.AddRange(CoreContext.UserManager.GetUsers().Select(u => u.ID));
}
foreach (var row in reportDao.BuildUsersStatisticsReport(filter))
{
users.Remove((Guid)row[0]);
if ((long)row[1] == 0 && (long)row[2] == 0)
{
result.Add(row);
}
}
result.AddRange(users.Select(u => new object[] { u, 0, 0, 0 }));
return result;
}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:31,代码来源:ReportEngine.cs
示例3: GetByFilter
public List<TimeSpend> GetByFilter(TaskFilter filter)
{
var listTimeSpend = new List<TimeSpend>();
while (true)
{
var timeSpend = _timeSpendDao.GetByFilter(filter);
timeSpend = GetTasks(timeSpend).FindAll(r => ProjectSecurity.CanRead(r.Task));
if (filter.LastId != 0)
{
var lastTimeSpendIndex = timeSpend.FindIndex(r => r.ID == filter.LastId);
if (lastTimeSpendIndex >= 0)
{
timeSpend = timeSpend.SkipWhile((r, index) => index <= lastTimeSpendIndex).ToList();
}
}
listTimeSpend.AddRange(timeSpend);
if (filter.Max <= 0 || filter.Max > 150000) break;
listTimeSpend = listTimeSpend.Take((int)filter.Max).ToList();
if (listTimeSpend.Count == filter.Max || timeSpend.Count == 0) break;
if (listTimeSpend.Count != 0)
filter.LastId = listTimeSpend.Last().ID;
filter.Offset += filter.Max;
}
return listTimeSpend;
}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:35,代码来源:TimeTrackingEngine.cs
示例4: BuildReport
public static string BuildReport(ReportType reportType, TaskFilter filter, ReportViewType viewType, int templateID)
{
//prepare filter
if (templateID != 0 && !filter.FromDate.Equals(DateTime.MinValue))
{
var interval = filter.ToDate.DayOfYear - filter.FromDate.DayOfYear;
switch (reportType)
{
case ReportType.TasksByUsers:
case ReportType.TasksByProjects:
{
filter.FromDate = TenantUtil.DateTimeNow().Date.AddDays(-interval);
filter.ToDate = TenantUtil.DateTimeNow().Date;
}
break;
case ReportType.MilestonesNearest:
{
filter.FromDate = TenantUtil.DateTimeNow().Date;
filter.ToDate = TenantUtil.DateTimeNow().Date.AddDays(interval);
}
break;
}
}
//exec
var report = Report.CreateNewReport(reportType, filter);
var data = report.BuildReport().ToList();
if (!data.Any())
report = Report.CreateNewReport(ReportType.EmptyReport, filter);
return ReportTransformer.Transform(data.ToList(), report, filter.ViewType, viewType, templateID);
}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:35,代码来源:ReportHelper.cs
示例5: GetMessageByFilter
public IEnumerable<MessageWrapper> GetMessageByFilter(int projectid, int tag, Guid departament, Guid participant,
ApiDateTime createdStart, ApiDateTime createdStop, int lastId,
bool myProjects, bool follow)
{
var messageEngine = EngineFactory.GetMessageEngine();
var taskFilter = new TaskFilter
{
DepartmentId = departament,
UserId = participant,
FromDate = createdStart,
ToDate = createdStop,
SortBy = _context.SortBy,
SortOrder = !_context.SortDescending,
SearchText = _context.FilterValue,
TagId = tag,
Offset = _context.StartIndex,
Max = _context.Count,
MyProjects = myProjects,
LastId = lastId,
Follow = follow
};
if (projectid != 0)
taskFilter.ProjectIds.Add(projectid);
_context.SetDataPaginated();
_context.SetDataFiltered();
_context.SetDataSorted();
_context.TotalCount = messageEngine.GetByFilterCount(taskFilter);
return messageEngine.GetByFilter(taskFilter).NotFoundIfNull().Select(r => new MessageWrapper(r)).ToSmartList();
}
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:32,代码来源:ProjectApi.Messages.cs
示例6: GetProjectsByFilter
public IEnumerable<ProjectWrapperFull> GetProjectsByFilter(int tag, ProjectStatus? status, Guid participant, Guid manager, bool follow, int lastId)
{
var filter = new TaskFilter
{
ParticipantId = participant,
UserId = manager,
SortBy = _context.SortBy,
SortOrder = !_context.SortDescending,
SearchText = _context.FilterValue,
TagId = tag,
Follow = follow,
LastId = lastId,
Offset = _context.StartIndex,
Max = _context.Count
};
if (status != null)
filter.ProjectStatuses.Add((ProjectStatus)status);
_context.SetDataFiltered();
_context.SetDataPaginated();
_context.SetDataSorted();
return EngineFactory.GetProjectEngine().GetByFilter(filter).NotFoundIfNull().Select(r => new ProjectWrapperFull(r)).ToSmartList();
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:25,代码来源:ProjectApi.Projects.cs
示例7: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (UserID == Guid.Empty)
UserID = SecurityContext.CurrentAccount.ID;
var filter = new TaskFilter { ParticipantId = UserID, MyProjects = true };
var tasks = Global.EngineFactory.GetTaskEngine().GetByFilter(filter);
var projects = Global.EngineFactory.GetProjectEngine().GetByParticipant(UserID).Select(prj => new ProjectVm(prj)).OrderBy(r=> r.ProjectTitle).ToList();
foreach (var project in projects)
{
project.OpenedTasksCount = tasks.Count(t => t.Project.ID == project.ProjectId && t.Status == TaskStatus.Open);
project.ClosedTasksCount = tasks.Count(t => t.Project.ID == project.ProjectId && t.Status == TaskStatus.Closed);
}
ProjectsRepeater.DataSource = projects;
ProjectsRepeater.DataBind();
//load user activity
//
var activities = UserActivityManager.GetUserActivities(
TenantProvider.CurrentTenantID,
UserID,
ProductEntryPoint.ID,
new[] { ProductEntryPoint.ID },
UserActivityConstants.AllActionType,
null,
0, 10);
LastActivityRepeater.DataSource = activities.ConvertAll(a => new ActivityVm(a));
LastActivityRepeater.DataBind();
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:33,代码来源:ProjectActivity.ascx.cs
示例8: GetByFilter
public List<TimeSpend> GetByFilter(TaskFilter filter, bool isAdmin, bool checkAccess)
{
var query = CreateQuery();
if (filter.Max != 0 && !filter.Max.Equals(int.MaxValue))
{
query.SetFirstResult((int)filter.Offset);
query.SetMaxResults((int)filter.Max * 2);
}
if (!string.IsNullOrEmpty(filter.SortBy))
{
var sortColumns = filter.SortColumns["TimeSpend"];
sortColumns.Remove(filter.SortBy);
query.OrderBy("t." + filter.SortBy, filter.SortOrder);
foreach (var sort in sortColumns.Keys)
{
query.OrderBy("t." + sort, sortColumns[sort]);
}
}
query = CreateQueryFilter(query, filter, isAdmin, checkAccess);
using (var db = new DbManager(DatabaseId))
{
return db.ExecuteList(query).ConvertAll(ToTimeSpend);
}
}
开发者ID:vipwan,项目名称:CommunityServer,代码行数:30,代码来源:TimeSpendDao.cs
示例9: SaveReportTemplate
public ReportTemplateWrapper SaveReportTemplate(string name, string period, int periodItem, int hour, bool autoGenerated, ReportType reportType,
int tag, int project, TaskStatus? status, Guid departament, Guid userId, ReportTimeInterval reportTimeInterval,
ApiDateTime fromDate, ApiDateTime toDate, int viewType, bool noResponsible)
{
ProjectSecurity.DemandAuthentication();
if (name == null || name.Trim().Length == 0) throw new ArgumentNullException("name");
var filter = new TaskFilter
{
TagId = tag,
DepartmentId = departament,
UserId = userId,
TimeInterval = reportTimeInterval,
FromDate = fromDate,
ToDate = toDate,
ViewType = viewType,
NoResponsible = noResponsible
};
if (project != 0)
filter.ProjectIds.Add(project);
if (status != null)
filter.TaskStatuses.Add((TaskStatus)status);
var template = new ReportTemplate(reportType) { Filter = filter };
SaveOrUpdateTemplate(template, name, period, periodItem, hour, autoGenerated);
return new ReportTemplateWrapper(template);
}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:32,代码来源:ProjectApi.Reports.cs
示例10: GetTaskTimeByFilter
public IEnumerable<TimeWrapper> GetTaskTimeByFilter(int projectid, bool myProjects, int? milestone, bool myMilestones, int tag,
Guid departament, Guid participant, ApiDateTime createdStart, ApiDateTime createdStop, int lastId, PaymentStatus? status)
{
var taskFilter = new TaskFilter
{
DepartmentId = departament,
UserId = participant,
FromDate = createdStart,
ToDate = createdStop,
SortBy = _context.SortBy,
SortOrder = !_context.SortDescending,
SearchText = _context.FilterValue,
TagId = tag,
Offset = _context.StartIndex,
Max = _context.Count,
LastId = lastId,
MyProjects = myProjects,
MyMilestones = myMilestones,
Milestone = milestone
};
if (projectid != 0)
taskFilter.ProjectIds.Add(projectid);
if (status.HasValue)
taskFilter.PaymentStatuses.Add(status.Value);
_context.SetDataPaginated();
_context.SetDataFiltered();
_context.SetDataSorted();
return EngineFactory.GetTimeTrackingEngine().GetByFilter(taskFilter).NotFoundIfNull().Select(r => new TimeWrapper(r)).ToSmartList();
}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:33,代码来源:ProjectApi.TimeSpend.cs
示例11: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
CurrentUser = SecurityContext.CurrentAccount.ID;
var filter = new TaskFilter
{
SortBy = "title",
SortOrder = true,
ProjectStatuses = new List<ProjectStatus> { ProjectStatus.Open }
};
if (!ProjectSecurity.IsAdministrator(CurrentUser))
filter.ParticipantId = CurrentUser;
UserProjects = Global.EngineFactory.GetProjectEngine().GetByFilter(filter);
if (UserProjects.Any() && (Project == null || !UserProjects.Contains(Project)))
Project = UserProjects[0];
var tasks = Global.EngineFactory.GetTaskEngine().GetByProject(Project.ID, null, Guid.Empty);
OpenUserTasks = tasks.Where(r => r.Status == TaskStatus.Open).OrderBy(r => r.Title);
ClosedUserTasks = tasks.Where(r => r.Status == TaskStatus.Closed).OrderBy(r => r.Title);
Users = Global.EngineFactory.GetProjectEngine().GetTeam(Project.ID).OrderBy(r => DisplayUserSettings.GetFullUserName(r.UserInfo)).ToList();
if (!string.IsNullOrEmpty(Request.QueryString["taskId"]))
{
Target = int.Parse(Request.QueryString["taskId"]);
}
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:31,代码来源:TimeSpendActionTimer.ascx.cs
示例12: GetByFilter
public List<Milestone> GetByFilter(TaskFilter filter)
{
var listMilestones = new List<Milestone>();
while (true)
{
var milestones = _milestoneDao.GetByFilter(filter, ProjectSecurity.CurrentUserAdministrator);
if (filter.LastId != 0)
{
var lastMilestoneIndex = milestones.FindIndex(r => r.ID == filter.LastId);
if (lastMilestoneIndex >= 0)
{
milestones = milestones.SkipWhile((r, index) => index <= lastMilestoneIndex).ToList();
}
}
listMilestones.AddRange(milestones);
if (filter.Max <= 0 || filter.Max > 150000) break;
listMilestones = listMilestones.Take((int) filter.Max).ToList();
if (listMilestones.Count == filter.Max || milestones.Count == 0) break;
if (listMilestones.Count != 0)
filter.LastId = listMilestones.Last().ID;
filter.Offset += filter.Max;
}
return listMilestones;
}
开发者ID:haoasqui,项目名称:ONLYOFFICE-Server,代码行数:34,代码来源:MilestoneEngine.cs
示例13: GetByFilter
public List<TimeSpend> GetByFilter(TaskFilter filter)
{
var query = CreateQuery();
if (filter.Max != 0 && !filter.Max.Equals(int.MaxValue))
{
query.SetFirstResult((int)filter.Offset);
query.SetMaxResults((int)filter.Max * 2);
}
if (filter.ProjectIds.Count != 0)
{
query.Where(Exp.In("t.project_id", filter.ProjectIds));
}
if (filter.TagId != 0)
{
query.InnerJoin("projects_project_tag ptag", Exp.EqColumns("ptag.project_id", "t.project_id"));
query.Where("ptag.tag_id", filter.TagId);
}
if (!string.IsNullOrEmpty(filter.SortBy))
{
var sortColumns = filter.SortColumns["TimeSpend"];
sortColumns.Remove(filter.SortBy);
query.OrderBy("t." + filter.SortBy, filter.SortOrder);
foreach (var sort in sortColumns.Keys)
{
query.OrderBy("t." + sort, sortColumns[sort]);
}
}
if (filter.UserId != Guid.Empty)
{
query.Where("t.person_id", filter.UserId);
}
if (filter.DepartmentId != Guid.Empty)
{
query.InnerJoin("core_usergroup cug", Exp.Eq("cug.removed", false) & Exp.EqColumns("cug.userid", "t.person_id") & Exp.EqColumns("cug.tenant", "t.tenant_id"));
query.Where("cug.groupid", filter.DepartmentId);
}
if (!filter.FromDate.Equals(DateTime.MinValue) && !filter.FromDate.Equals(DateTime.MaxValue) &&
!filter.ToDate.Equals(DateTime.MinValue) && !filter.ToDate.Equals(DateTime.MaxValue))
{
query.Where(Exp.Between("t.date", filter.FromDate, filter.ToDate));
}
if (!string.IsNullOrEmpty(filter.SearchText))
{
query.Where(Exp.Like("t.note", filter.SearchText, SqlLike.AnyWhere));
}
return DbManager.ExecuteList(query).ConvertAll(r => ToTimeSpend(r));;
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:59,代码来源:TimeSpendDao.cs
示例14: GetClientVariables
protected override IEnumerable<KeyValuePair<string, object>> GetClientVariables(HttpContext context)
{
var filter = new TaskFilter
{
SortBy = "title",
SortOrder = true,
ProjectStatuses = new List<ProjectStatus> { ProjectStatus.Open }
};
var projects = Global.EngineFactory.GetProjectEngine().GetByFilter(filter)
.Select(pr => new
{
id = pr.ID,
title = pr.Title,
security = new
{
canCreateMilestone = ProjectSecurity.CanCreateMilestone(pr),
canCreateMessage = ProjectSecurity.CanCreateMessage(pr),
canCreateTask = ProjectSecurity.CanCreateTask(pr),
canEditTeam = ProjectSecurity.CanEditTeam(pr),
canReadFiles = ProjectSecurity.CanReadFiles(pr),
canReadMilestones = ProjectSecurity.CanReadMilestones(pr),
canReadMessages = ProjectSecurity.CanReadMessages(pr),
canReadTasks = ProjectSecurity.CanReadTasks(pr),
isInTeam = ProjectSecurity.IsInTeam(pr, SecurityContext.CurrentAccount.ID, false),
canLinkContact = ProjectSecurity.CanLinkContact(pr),
},
isPrivate = pr.Private,
status = pr.Status
});
var tags = Global.EngineFactory.GetTagEngine().GetTags().Select(r => new { id = r.Key, title = r.Value });
yield return RegisterObject("Projects", new { response = projects });
yield return RegisterObject("Tags", new { response = tags });
if (context.Request.UrlReferrer != null && string.IsNullOrEmpty(HttpUtility.ParseQueryString(context.Request.GetUrlRewriter().Query)["prjID"]) && string.IsNullOrEmpty(HttpUtility.ParseQueryString(context.Request.UrlReferrer.Query)["prjID"]))
{
filter = new TaskFilter
{
SortBy = "deadline",
SortOrder = false,
MilestoneStatuses = new List<MilestoneStatus> { MilestoneStatus.Open }
};
var milestones = Global.EngineFactory.GetMilestoneEngine().GetByFilter(filter)
.Select(m => new
{
id = m.ID,
title = m.Title,
deadline = SetDate(m.DeadLine, TimeZoneInfo.Local)
});
yield return RegisterObject("Milestones", new { response = milestones });
}
}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:57,代码来源:ClientUserResources.cs
示例15: ProjectCommonModule
protected ProjectCommonModule(Project currentProject)
{
CurrentProject = currentProject;
Filter = new TaskFilter
{
ProjectIds = new List<int> { CurrentProject.ID },
MilestoneStatuses = new List<MilestoneStatus> { MilestoneStatus.Open },
TaskStatuses = new List<TaskStatus> { TaskStatus.Open }
};
}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:11,代码来源:ModuleManager.cs
示例16: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
_hintPopup.Options.IsPopup = true;
_hintPopupTaskRemove.Options.IsPopup = true;
_hintPopupTaskRemind.Options.IsPopup = true;
moveTaskContainer.Options.IsPopup = true;
var filter = new TaskFilter();
if (RequestContext.IsInConcreteProject)
filter.ProjectIds.Add(RequestContext.GetCurrentProjectId());
AllTasksCount = Global.EngineFactory.GetTaskEngine().GetByFilterCount(filter);
}
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:14,代码来源:TaskList.ascx.cs
示例17: CreateNewReport
public static Report CreateNewReport(ReportType reportType, TaskFilter filter)
{
switch (reportType)
{
case ReportType.MilestonesExpired:
return new Report(new MilestonesExpiredReport(), filter);
case ReportType.MilestonesNearest:
return new Report(new MilestonesNearestReport(), filter);
case ReportType.ProjectsList:
return new Report(new ProjectsListReport(), filter);
case ReportType.ProjectsWithoutActiveMilestones:
return new Report(new ProjectsWithoutActiveMilestonesReport(), filter);
case ReportType.ProjectsWithoutActiveTasks:
return new Report(new ProjectsWithoutActiveTasksReport(), filter);
case ReportType.TasksByProjects:
return new Report(new TasksByProjectsReport(), filter);
case ReportType.TasksByUsers:
return new Report(new TasksByUsersReport(), filter);
case ReportType.TasksExpired:
return new Report(new TasksExpiredReport(), filter);
case ReportType.TimeSpend:
return new Report(new TimeSpendReport(), filter);
case ReportType.UsersWithoutActiveTasks:
return new Report(new UsersWithoutActiveTasksReport(), filter);
case ReportType.UsersWorkload:
return new Report(new UsersWorkloadReport(), filter);
case ReportType.UsersActivity:
return new Report(new UsersActivityReport(), filter);
case ReportType.EmptyReport:
return new Report(new EmptyReport(), filter);
}
throw new Exception("There is not report Type");
}
开发者ID:vipwan,项目名称:CommunityServer,代码行数:47,代码来源:ReportHelper.cs
示例18: GetByFilter
public List<Task> GetByFilter(TaskFilter filter)
{
var listTask = new List<Task>();
var showAll = !(filter.Max > 0 && filter.Max < 150000);
var taskStatus = filter.TaskStatuses.Any();
if (!taskStatus)
{
filter.TaskStatuses.Add(TaskStatus.Open);
}
do
{
var tasks = _taskDao.GetByFilter(filter).FindAll(CanRead);
var lastTaskIndex = tasks.FindIndex(r => r.ID == filter.LastId);
if (lastTaskIndex >= 0)
tasks = tasks.SkipWhile((r, index) => index <= lastTaskIndex).ToList();
listTask.AddRange(tasks);
listTask = listTask.Take((int) filter.Max).ToList();
if (listTask.Count != 0)
filter.LastId = listTask.Last().ID;
if ((showAll || (listTask.Count < filter.Max || tasks.Count == 0)) && !taskStatus)
{
filter.TaskStatuses.Clear();
taskStatus = true;
continue;
}
filter.Offset += filter.Max;
if (tasks.Count == 0 || showAll) break;
}
while (listTask.Count < filter.Max);
_subtaskDao.GetSubtasks(ref listTask);
return listTask;
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:45,代码来源:TaskEngine.cs
示例19: GetByFilterCount
public int GetByFilterCount(TaskFilter filter, bool isAdmin, bool checkAccess)
{
var query = new SqlQuery(TimeTrackingTable + " t")
.InnerJoin(TasksTable + " pt",
Exp.EqColumns("t.tenant_id", "pt.tenant_id") &
Exp.EqColumns("t.relative_task_id", "pt.id"))
.Select("t.id")
.Where("t.tenant_id", Tenant);
query = CreateQueryFilter(query, filter, isAdmin, checkAccess);
var queryCount = new SqlQuery().SelectCount().From(query, "t1");
using (var db = new DbManager(DatabaseId))
{
return db.ExecuteScalar<int>(queryCount);
}
}
开发者ID:vipwan,项目名称:CommunityServer,代码行数:19,代码来源:TimeSpendDao.cs
示例20: GetByFilter
public List<Milestone> GetByFilter(TaskFilter filter)
{
var listMilestones = new List<Milestone>();
while (true)
{
var milestones = milestoneDao.GetByFilter(filter).FindAll(CanRead);
if (filter.LastId != 0)
{
var lastMilestoneIndex = milestones.FindIndex(r => r.ID == filter.LastId);
if (lastMilestoneIndex >= 0)
{
milestones = milestones.SkipWhile((r, index) => index <= lastMilestoneIndex).ToList();
}
}
listMilestones.AddRange(milestones);
if (filter.ParticipantId.HasValue)
{
var tasks = taskDao.GetByResponsible(filter.ParticipantId.Value, new[] { TaskStatus.Open });
listMilestones = listMilestones.FindAll(milestone => tasks.Any(task => task.Milestone == milestone.ID));
}
if (filter.Max <= 0 || filter.Max > 150000) break;
listMilestones = listMilestones.Take((int) filter.Max).ToList();
if (listMilestones.Count == filter.Max || milestones.Count == 0) break;
if (listMilestones.Count != 0)
filter.LastId = listMilestones.Last().ID;
filter.Offset += filter.Max;
}
return listMilestones;
}
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:40,代码来源:MilestoneEngine.cs
注:本文中的ASC.Projects.Core.Domain.TaskFilter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论