예제 #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)));
        }
        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));
        }
        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()));
        }
        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);
        }
 public async Task <IEnumerable <TimeLogUnitViewModel> > GetAllTimeLogUnits()
 {
     return(EntityToViewModelMapper.Map(this.TimeLogUnitRepository.AllRecords));
 }
 public async Task <IEnumerable <TaxSettingViewModel> > Find(List <Expression <Func <TaxSetting, bool> > > filterPredicates)
 {
     return(EntityToViewModelMapper.Map(this.TaxSettingRepository.Find(filterPredicates)).OrderBy(e => e.TaxRate));
 }
        public async Task <TaxSettingViewModel> Find(int Id)
        {
            var taxSettingInfo = this.TaxSettingRepository.Find(Id);

            return(EntityToViewModelMapper.Map(taxSettingInfo));
        }
 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)));
 }
 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));
 }
 public async Task <TimeLogUnitViewModel> Find(int unitId)
 {
     return(EntityToViewModelMapper.Map(this.TimeLogUnitRepository.Find(unitId)));
 }
 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)));
 }