Ejemplo n.º 1
0
        public async Task <IActionResult> Edit(long id, [Bind("ModifiedUserId,ModifiedDateTime,BatchId,MarketId,ScheduleId,BatchStatusId,FileName,FilePath,RangeStartDOS,RangeEndDOS,StartDate,EndDate,StagingStartDate,StagingEndDate,BusinessUpdateStartDate,BusinessUpdateEndDate,ScrubStartDate,ScrubEndDate,StagingClaimCount,ProcessedClaimCount,ScrubClaimCount,SubmittedClaimCount,StagingErrorCount,BusinessUpdateErrorCount,ScrubErrorCount,FileGenerationErrorCount,IsPreAdjudicated,IsScrubEnabled,PurgeDate,BatchMessage,IsFailed,IsExportComplete,StagingPartitionKey,CachePartitionKey,IsParsed,ClmChargeAmt,ClmPatPaidAmt,ScrubbedClmChargeAmt,ScrubbedClmPatPaidAmt,BatchProcessTime")] PharmBatch pharmBatch)
        {
            if (id != pharmBatch.BatchId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    await repository.SaveBatch(pharmBatch);
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PharmBatchExists(pharmBatch.BatchId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(pharmBatch));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("ModifiedUserId,ModifiedDateTime,BatchId,MarketId,ScheduleId,BatchStatusId,FileName,FilePath,RangeStartDOS,RangeEndDOS,StartDate,EndDate,StagingStartDate,StagingEndDate,BusinessUpdateStartDate,BusinessUpdateEndDate,ScrubStartDate,ScrubEndDate,StagingClaimCount,ProcessedClaimCount,ScrubClaimCount,SubmittedClaimCount,StagingErrorCount,BusinessUpdateErrorCount,ScrubErrorCount,FileGenerationErrorCount,IsPreAdjudicated,IsScrubEnabled,PurgeDate,BatchMessage,IsFailed,IsExportComplete,StagingPartitionKey,CachePartitionKey,IsParsed,ClmChargeAmt,ClmPatPaidAmt,ScrubbedClmChargeAmt,ScrubbedClmPatPaidAmt,BatchProcessTime")] PharmBatch pharmBatch)
        {
            if (ModelState.IsValid)
            {
                await repository.SaveBatch(pharmBatch);

                return(RedirectToAction(nameof(Index)));
            }
            return(View(pharmBatch));
        }
Ejemplo n.º 3
0
        public async Task SaveBatch(PharmBatch batch)
        {
            PharmBatch bch = await context.PharmBatch.FirstOrDefaultAsync(x => x.BatchId == batch.BatchId);

            if (bch == null)
            {
                context.PharmBatch.Add(bch);
            }
            else
            {
                bch.BatchStatusId = batch.BatchStatusId;
            }
            await context.SaveChangesAsync();
        }