public ICollection<RelaxWorkItem> GetWorkItemsByPage(RelaxWorkItemType baseEntity, string page, string pageSize) { ICollection<RelaxWorkItem> workItems = new List<RelaxWorkItem>(); try { int pg; int pgSize; int.TryParse(page, out pg); int.TryParse(pageSize, out pgSize); var repository = new WorkItemRepository(baseEntity); if (pg != 0 && pgSize != 0) workItems = repository.GetWorkItems(baseEntity.TfsTeamProject, baseEntity.Name, pg, pgSize); else workItems = repository.GetWorkItems(baseEntity.TfsTeamProject, baseEntity.Name, 1, 6); } catch (Exception e) { _eventLog.WriteEntry(e.Message, EventLogEntryType.Error); return null; } return workItems; }
public ICollection<RelaxWorkItem> GetWorkItems(RelaxWorkItemType baseEntity) { ICollection<RelaxWorkItem> workItems = new List<RelaxWorkItem>(); try { var repository = new WorkItemRepository(baseEntity); workItems = repository.GetWorkItems(baseEntity.TfsTeamProject, baseEntity.Name); } catch (Exception e) { _eventLog.WriteEntry(e.Message, EventLogEntryType.Error); return null; } return workItems; }