コード例 #1
0
        public async Task <IEnumerable <ClaimViewModel> > GetAverageDaysOpenTasks()
        {
            List <Expression <Func <Claim, bool> > > filterPredicates = new List <Expression <Func <Claim, bool> > >();

            filterPredicates.Add(p => p.ClaimStatusId == 2);

            return(EntityToViewModelMapper.ClaimsMap(this.ClaimRepository.Find(filterPredicates).ToList()));
        }
コード例 #2
0
        public async Task <IEnumerable <ClaimViewModel> > GetOverdueClaims(string userId)
        {
            List <Expression <Func <Claim, bool> > > filterPredicates = new List <Expression <Func <Claim, bool> > >();

            filterPredicates.Add(p => p.AdjusterId == userId);
            filterPredicates.Add(p => p.DueDate < DateTime.Today);
            return(EntityToViewModelMapper.ClaimsMap(this.ClaimRepository.Find(filterPredicates).ToList()));
        }
コード例 #3
0
        public async Task <IEnumerable <ClaimNotesViewModel> > GetAllClaimNotes(string userId, int claimId)
        {
            List <Expression <Func <ClaimNote, bool> > > filterPredicates = new List <Expression <Func <ClaimNote, bool> > >();

            filterPredicates.Add(p => p.ClaimId == claimId);

            return(EntityToViewModelMapper.Map(this.ClaimNoteRepository.Find(filterPredicates)));
        }
コード例 #4
0
        public async Task <IEnumerable <ClaimDocumentViewModel> > GetAllClaimDocuments(string userId, int claimId, UploadFileType fileType)
        {
            List <Expression <Func <ClaimDocumentMapping, bool> > > filterPredicates = new List <Expression <Func <ClaimDocumentMapping, bool> > >();

            filterPredicates.Add(p => p.ClaimId == claimId);
            filterPredicates.Add(p => p.FileType == fileType.ToString());

            return(EntityToViewModelMapper.Map(this.ClaimDocumentRepository.Find(filterPredicates)));
        }
コード例 #5
0
        public IEnumerable <InvoiceViewModel> GetAllInvoicesforPdf(string userId, int claimId, int invoiceId)
        {
            List <Expression <Func <Invoice, bool> > > filterPredicates = new List <Expression <Func <Invoice, bool> > >();

            filterPredicates.Add(p => p.ClaimId == claimId);
            filterPredicates.Add(p => p.InvoiceId == invoiceId);

            return(EntityToViewModelMapper.Map(this.InvoiceRepository.Find(filterPredicates)));
        }
コード例 #6
0
        public IEnumerable <TimeLogViewModel> GetAllTimeLogsforPdf(string userId, int claimId, int timelogId)
        {
            List <Expression <Func <TimeLog, bool> > > filterPredicates = new List <Expression <Func <TimeLog, bool> > >();

            filterPredicates.Add(p => p.ClaimId == claimId);
            filterPredicates.Add(p => p.TimeLogId == timelogId);

            return(EntityToViewModelMapper.Map(this.TimeLogRepository.Find(filterPredicates)));
        }
コード例 #7
0
        public InvoiceDocumentViewModel GetAllAspNetUsersImage(string userId, UploadFileType fileType)
        {
            List <Expression <Func <InvoiceDocumentMapping, bool> > > filterPredicates = new List <Expression <Func <InvoiceDocumentMapping, bool> > >();

            filterPredicates.Add(p => p.UserId == userId);
            filterPredicates.Add(p => p.FileType == fileType.ToString());

            return(EntityToViewModelMapper.MapImage(this.InvoiceDocumentRepository.Find(filterPredicates)));
        }
コード例 #8
0
        public async Task <ServiceCategoryViewModel> Create(ServiceCategoryViewModel serviceCategory)
        {
            ServiceCategory obj = ViewModelToEntityMapper.Map(serviceCategory);


            var serviceCategoryInfo = this.ServiceCategoryRepository.Add(obj);

            return(EntityToViewModelMapper.Map(serviceCategoryInfo));
        }
コード例 #9
0
        public async Task <IEnumerable <InvoiceDocumentViewModel> > GetAllGeneratedInvoices(string userId, int claimId, string applicationUrl, string claimNo)
        {
            List <Expression <Func <InvoiceDocumentMapping, bool> > > filterPredicates = new List <Expression <Func <InvoiceDocumentMapping, bool> > >();

            filterPredicates.Add(p => p.UserId == userId);
            filterPredicates.Add(p => p.ClaimId == claimId);

            return(EntityToViewModelMapper.Map(this.InvoiceDocumentRepository.Find(filterPredicates), applicationUrl, claimNo));
        }
コード例 #10
0
        public async Task <IEnumerable <ClaimNotesViewModel> > GetClaimNotesAssigneToMe(string userId)
        {
            List <Expression <Func <ClaimNote, bool> > > filterPredicates = new List <Expression <Func <ClaimNote, bool> > >();

            filterPredicates.Add(p => p.AssignedTo == userId);
            filterPredicates.Add(p => p.IsTask == true);

            return(EntityToViewModelMapper.Map(this.ClaimNoteRepository.Find(filterPredicates).ToList()));
        }
コード例 #11
0
        public async Task <IEnumerable <FileNameViewModel> > Find(FileNameViewModel viewModel)
        {
            List <Expression <Func <FileNameCode, bool> > > filterPredicate = new List <Expression <Func <FileNameCode, bool> > >();

            if (viewModel != null)
            {
                filterPredicate.Add(p => (!string.IsNullOrWhiteSpace(p.LocationName) && p.LocationName.Contains(viewModel.LocationName)) ||
                                    (!string.IsNullOrWhiteSpace(p.FileNumberPrefix) && p.FileNumberPrefix.Contains(viewModel.FileNumberPrefix)));
            }
            return(EntityToViewModelMapper.Map(this.FileNameRepository.Find(filterPredicate)));
        }
コード例 #12
0
        public async Task <IEnumerable <InvoiceViewModel> > Find(IEnumerable <FilterParameterViewModel> viewModel)
        {
            List <Expression <Func <Invoice, bool> > > filterPredicates = new List <Expression <Func <Invoice, bool> > >();

            foreach (FilterParameterViewModel model in viewModel)
            {
                foreach (int companyId in model.CompanyId)
                {
                    filterPredicates.Add(p => p.InvoiceClaim.CompanyId == companyId);
                }
            }

            return(EntityToViewModelMapper.Map(this.InvoiceRepository.Find(filterPredicates)));
        }
コード例 #13
0
        public async Task <ServiceCategoryViewModel> Update(ServiceCategoryViewModel serviceCategory)
        {
            var serviceCategoryInfo = this.ServiceCategoryRepository.Find(serviceCategory.ServiceCategoryId);

            if (serviceCategoryInfo != null)
            {
                serviceCategoryInfo = ViewModelToEntityMapper.Map(serviceCategory, serviceCategoryInfo);
                serviceCategoryInfo = this.ServiceCategoryRepository.Update(serviceCategoryInfo);

                return(EntityToViewModelMapper.Map(serviceCategoryInfo));
            }

            return(serviceCategory);
        }
コード例 #14
0
 public async Task <IEnumerable <TimeLogUnitViewModel> > GetAllTimeLogUnits()
 {
     return(EntityToViewModelMapper.Map(this.TimeLogUnitRepository.AllRecords));
 }
コード例 #15
0
 public async Task <IEnumerable <TaxSettingViewModel> > Find(List <Expression <Func <TaxSetting, bool> > > filterPredicates)
 {
     return(EntityToViewModelMapper.Map(this.TaxSettingRepository.Find(filterPredicates)).OrderBy(e => e.TaxRate));
 }
コード例 #16
0
        public async Task <TaxSettingViewModel> Find(int Id)
        {
            var taxSettingInfo = this.TaxSettingRepository.Find(Id);

            return(EntityToViewModelMapper.Map(taxSettingInfo));
        }
コード例 #17
0
 public async Task <IEnumerable <TaxSettingViewModel> > GetAllTaxSettings()
 {
     return(EntityToViewModelMapper.Map(this.TaxSettingRepository.AllRecords));
 }
コード例 #18
0
 public async Task <IEnumerable <ClaimNotesViewModel> > Find(List <Expression <Func <ClaimNote, bool> > > filterPredicates)
 {
     return(EntityToViewModelMapper.Map(this.ClaimNoteRepository.Find(filterPredicates).ToList()));
 }
コード例 #19
0
 public async Task <ClaimNotesViewModel> Find(int claimNoteId)
 {
     return(EntityToViewModelMapper.Map(this.ClaimNoteRepository.Find(claimNoteId)));
 }
コード例 #20
0
 public async Task <IEnumerable <UserViewModel> > GetAllUsers()
 {
     return(EntityToViewModelMapper.Map(this._userRepository.AllRecords.ToList()));
 }
コード例 #21
0
 public async Task <UserViewModel> Find(string userID)
 {
     return(EntityToViewModelMapper.Map(this._userRepository.Find(userID)));
 }
コード例 #22
0
 public async Task <IEnumerable <TypeOfLossViewModel> > Find(List <Expression <Func <TypeOfLoss, bool> > > filterPredicate)
 {
     return(EntityToViewModelMapper.Map(this.TypeOfLossRepository.Find(filterPredicate)));
 }
コード例 #23
0
 public InvoiceDocumentViewModel Find(int documentId)
 {
     return(EntityToViewModelMapper.Map(this.InvoiceDocumentRepository.Find(documentId)));
 }
コード例 #24
0
 public async Task <IEnumerable <AlertViewModel> > GetAllSystemAlerts()
 {
     return(EntityToViewModelMapper.Map(this._systemAlertsRepository.AllRecords.ToList()));
 }
コード例 #25
0
 public async Task <AlertViewModel> Find(int alertId)
 {
     return(EntityToViewModelMapper.Map(this._systemAlertsRepository.Find(alertId)));
 }
コード例 #26
0
 public async Task <IEnumerable <UserViewModel> > Find(List <Expression <Func <AspNetUser, bool> > > filterPredicates)
 {
     return(EntityToViewModelMapper.Map(this.UserRepository.Find(filterPredicates).ToList()));
 }
コード例 #27
0
 public async Task <IEnumerable <TypeOfLossViewModel> > GetAllTypeOfLoss()
 {
     return(EntityToViewModelMapper.Map(this.TypeOfLossRepository.AllRecords));
 }
コード例 #28
0
 public async Task <TimeLogUnitViewModel> Find(int unitId)
 {
     return(EntityToViewModelMapper.Map(this.TimeLogUnitRepository.Find(unitId)));
 }
コード例 #29
0
 public IEnumerable <InvoiceDocumentViewModel> Find(List <Expression <Func <InvoiceDocumentMapping, bool> > > filterPredicates, string applicationUrl, string claimNo)
 {
     return(EntityToViewModelMapper.Map(this.InvoiceDocumentRepository.Find(filterPredicates), applicationUrl, claimNo));
 }
コード例 #30
0
 public async Task <TypeOfLossViewModel> Find(int lossTypeId)
 {
     return(EntityToViewModelMapper.Map(this.TypeOfLossRepository.Find(lossTypeId)));
 }