public GetUserProfilesByUserIdsSpecification(Guid[] userIds, CommonSpecParams specParams) : base(x => (userIds.Contains(x.UserId)) && ((x.FirstName.ToLower().Contains(specParams.Search)) || (x.LastName.ToLower().Contains(specParams.Search)) || (string.IsNullOrEmpty(specParams.Search))) ) { AddInclude(x => x.AppUser); AddOrderBy(x => x.FirstName); ApplyPaging(specParams.PageSize * (specParams.PageIndex - 1), specParams.PageSize); if (!string.IsNullOrEmpty(specParams.Sort)) { switch (specParams.Sort) { case "nameAsc": AddOrderBy(p => p.FirstName); break; case "nameDesc": AddOrderByDescending(p => p.FirstName); break; default: AddOrderBy(p => p.FirstName); break; } } }
public GetUserProfilesCountSpecification(CommonSpecParams specParams) : base(x => ((x.FirstName.Contains(specParams.Search)) && (x.LastName.Contains(specParams.Search))) || string.IsNullOrEmpty(specParams.Search) ) { }
public GetSchedulerSpecification(CommonSpecParams specParams, int campaignId, int userProfileId) : base(x => (x.UserProfileId == userProfileId) && (x.CampaignId == campaignId) && ( (x.FirstName.Contains(specParams.Search)) || (x.LastName.Contains(specParams.Search)) || (x.Company.Contains(specParams.Search)) || (string.IsNullOrEmpty(specParams.Search)) ) ) { AddOrderBy(x => x.FirstName); ApplyPaging(specParams.PageSize * (specParams.PageIndex - 1), specParams.PageSize); if (!string.IsNullOrEmpty(specParams.Sort)) { switch (specParams.Sort) { case "nameAsc": AddOrderBy(p => p.FirstName); break; case "nameDesc": AddOrderByDescending(p => p.FirstName); break; default: AddOrderBy(p => p.FirstName); break; } } }
public GetCampaignsSpecification(CommonSpecParams specParams) : base(x => ((x.CampaignName.ToLower().Contains(specParams.Search)) || (x.Plan.ToLower().Contains(specParams.Search)) || (x.Client.ToLower().Contains(specParams.Search))) || string.IsNullOrEmpty(specParams.Search) ) { AddInclude(x => x.CampaignAssignments); AddOrderBy(x => x.CampaignName); ApplyPaging(specParams.PageSize * (specParams.PageIndex - 1), specParams.PageSize); if (!string.IsNullOrEmpty(specParams.Sort)) { switch (specParams.Sort) { case "nameAsc": AddOrderBy(p => p.CampaignName); break; case "nameDesc": AddOrderByDescending(p => p.CampaignName); break; default: AddOrderBy(p => p.CampaignName); break; } } }
public GetUserProfilesByDepartmentSpecification(int departmentId, CommonSpecParams specParams) : base(x => (x.DepartmentId == departmentId) && (((x.FirstName.Contains(specParams.Search)) && (x.LastName.Contains(specParams.Search))) || string.IsNullOrEmpty(specParams.Search)) ) { AddOrderBy(x => x.FirstName); ApplyPaging(specParams.PageSize * (specParams.PageIndex - 1), specParams.PageSize); if (!string.IsNullOrEmpty(specParams.Sort)) { switch (specParams.Sort) { case "nameAsc": AddOrderBy(p => p.FirstName); break; case "nameDesc": AddOrderByDescending(p => p.FirstName); break; default: AddOrderBy(p => p.FirstName); break; } } }
public GetDepartmentsSpecification(CommonSpecParams specParams) : base(x => ((x.Name.Contains(specParams.Search)) || (x.Description.ToLower().Contains(specParams.Search)) || (x.ShortName.ToLower().Contains(specParams.Search))) || string.IsNullOrEmpty(specParams.Search) ) { AddOrderBy(x => x.Name); ApplyPaging(specParams.PageSize * (specParams.PageIndex - 1), specParams.PageSize); if (!string.IsNullOrEmpty(specParams.Sort)) { switch (specParams.Sort) { case "nameAsc": AddOrderBy(p => p.Name); break; case "nameDesc": AddOrderByDescending(p => p.Name); break; default: AddOrderBy(p => p.Name); break; } } }
public GetUserProfilesByUserIdsCountSpecification(Guid[] userIds, CommonSpecParams specParams) : base(x => (userIds.Contains(x.UserId)) && ((x.FirstName.ToLower().Contains(specParams.Search)) || (x.LastName.ToLower().Contains(specParams.Search)) || (string.IsNullOrEmpty(specParams.Search))) ) { }
public GetCampaignsCountSpecification(CommonSpecParams specParams) : base(x => ((x.CampaignName.ToLower().Contains(specParams.Search)) || (x.Plan.ToLower().Contains(specParams.Search)) || (x.Client.ToLower().Contains(specParams.Search))) || string.IsNullOrEmpty(specParams.Search) ) { }
public GetDepartmentsCountSpecification(CommonSpecParams specParams) : base(x => ((x.Name.Contains(specParams.Search)) || (x.Description.ToLower().Contains(specParams.Search)) || (x.ShortName.ToLower().Contains(specParams.Search))) || string.IsNullOrEmpty(specParams.Search) ) { }
public GetUserProfilesByDepartmentCountSpecification(int departmentId, CommonSpecParams specParams) : base(x => (x.DepartmentId == departmentId) && (((x.FirstName.Contains(specParams.Search)) && (x.LastName.Contains(specParams.Search))) || string.IsNullOrEmpty(specParams.Search)) ) { }
public GetSdrGroupByManagerIdCountSpecification(int managerId, CommonSpecParams specParams) : base(x => (x.ManagerId == managerId) && ( (x.Sdr.FirstName.Contains(specParams.Search)) || (x.Sdr.LastName.Contains(specParams.Search)) ) ) { AddInclude(s => s.Sdr); }
public GetSchedulerCountSpecification(CommonSpecParams specParams, int campaignId, int userProfileId) : base(x => (x.UserProfileId == userProfileId) && (x.CampaignId == campaignId) && ( (x.FirstName.Contains(specParams.Search)) || (x.LastName.Contains(specParams.Search)) || (x.Company.Contains(specParams.Search)) || (string.IsNullOrEmpty(specParams.Search)) ) ) { }
public GetWagesSpecification(CommonSpecParams specParams) : base() { AddOrderBy(x => x.CampaignType); ApplyPaging(specParams.PageSize * (specParams.PageIndex - 1), specParams.PageSize); if (!string.IsNullOrEmpty(specParams.Sort)) { switch (specParams.Sort) { case "nameAsc": AddOrderBy(p => p.CampaignType); break; case "nameDesc": AddOrderByDescending(p => p.CampaignType); break; default: AddOrderBy(p => p.CampaignType); break; } } }