EnVisageOnline/Main/Source/EnVisage/Code/BLL/ITeamManager.cs

47 lines
3.2 KiB
C#

using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using EnVisage.Models;
namespace EnVisage.Code.BLL
{
public interface ITeamManager
{
DbSet<Team> DataTable { get; }
void AddCapacityToTeam(Guid expCatId, Guid teamId, List<PeopleResourceModel.CapacityValues> values, bool isPlanned, bool skipWeekendingsValidation);
Dictionary<Guid, List<VW_ExpenditureCategory>> GetECsByTeamResources(List<Guid> teamIds);
Guid?[] GetPlannedCapacityCategoriesIds(Guid teamId);
List<Guid> GetProjectsIds(IEnumerable<Guid> teams);
Dictionary<Guid, List<Guid>> GetRelationsWithScenariosTree(List<Guid> teams, ScenarioType? scenarioType, ScenarioStatus? scenarioStatus);
TeamModel GetTeamByName(string name);
Dictionary<Guid, string> GetTeamNames(List<Guid> teams);
List<TeamAllocation> GetTeamsAllocation(List<Guid> teams, List<Guid> scenarios, List<Guid> expenditureCategories, DateTime? startDate, DateTime? endDate);
Dictionary<Guid, Dictionary<Guid, Dictionary<Guid, Dictionary<DateTime, TeamAllocation>>>> GetTeamsAllocationTree(List<Guid> teams, List<Guid> scenarios, List<Guid> expenditureCategories, DateTime? startDate, DateTime? endDate);
List<Guid> GetTeamsByCompanies(Guid userId, List<Guid> companies);
List<Team> GetTeamsByCompanyId(Guid companyId);
List<Team> GetTeamsByCompanyName(string CompanyName);
IQueryable<Team> GetTeamsByExpenditureCategory(Guid expCatId, Guid? userId);
List<Team> GetTeamsByProject(Guid projectId);
List<Guid> GetTeamsByUser(Guid userId);
List<Guid> GetTeamsByUserFiltered(string userId, List<Guid> resources);
List<Guid> GetTeamsByUserFiltered(string userId, List<Guid> teams, List<Guid> views);
List<Guid> GetTeamsByUserFiltered(string userId, List<Guid> teams, List<Guid> views, List<Guid> companies);
List<Guid> GetTeamsByViews(List<Guid> views);
List<Guid> GetTeamsByViewsByUser(List<Guid> views, Guid userId);
List<TeamSummaryInfoModel> GetTeamsInfo(List<Guid> teamIds, List<FiscalCalendar> fiscalCalendar);
List<TeamSummaryInfoModel> GetTeamsInfoByUser(string userId, List<Guid> teamIds, List<Guid> viewIds, List<FiscalCalendar> fiscalCalendar);
Dictionary<Guid, decimal> GetTeamsUOM(List<Guid> teams, DateTime datePoint);
List<TeamWithPermissionsModel> GetTeamsWithPermissionsByCurrentUser(List<Guid> teamIds);
List<TeamWithPermissionsModel> GetTeamsWithPermissionsByUser(string userId, List<Guid> teamIds);
TeamModel LoadTeamModel(Guid teamId);
IQueryable<Team> LoadTeams(IEnumerable<Guid> teams);
List<TeamWithResourcesModel> LoadTeamsWithResourcesByActualCapacityScenarios(List<Guid> expCatIds, List<Guid> actualCapacityScenarioIds);
IList<TeamWithResourcesModel> LoadTeamsWithResourcesByUser(Guid? userId, List<Guid> teams = null);
TeamWithResourcesModel LoadTeamWithResourcesById(Guid teamId);
void RemoveCapacityFromTeam(Guid expCatId, Guid teamId, List<PeopleResourceModel.CapacityValues> values, bool isPlanned, bool skipWeekendingsValidation);
Team Save(TeamModel model);
Team Save(TeamModel model, bool saveAsNew);
}
}