コード例 #1
0
 public Task SaveTraitDeterminationResultRDTAsync(RDTSaveTraitDeterminationResultRequestArgs requestArgs)
 {
     return(DbContext.ExecuteNonQueryAsync(DataConstants.PR_RDT_SAVE_TRAIT_DETERMINATION_RESULT,
                                           CommandType.StoredProcedure, args =>
     {
         args.Add("@TVP", requestArgs.ToTvp());
     }));
 }
コード例 #2
0
        public async Task <IHttpActionResult> SaveTraitDeterminationResultRDT([FromBody] RDTSaveTraitDeterminationResultRequestArgs args)
        {
            var cropCodes = await _masterService.GetUserCropCodesAsync(User);

            args.Crops = string.Join(",", cropCodes);
            var items = await service.SaveTraitDeterminationResultRDTAsync(args);

            return(Ok(new
            {
                args.TotalRows,
                Data = items
            }));
        }
コード例 #3
0
        public async Task <DataTable> SaveTraitDeterminationResultRDTAsync(RDTSaveTraitDeterminationResultRequestArgs requestArgs)
        {
            await repository.SaveTraitDeterminationResultRDTAsync(requestArgs);

            var args = new TraitDeterminationResultRequestArgs
            {
                Crops      = requestArgs.Crops,
                Filter     = requestArgs.Filter,
                PageNumber = requestArgs.PageNumber,
                PageSize   = requestArgs.PageSize
            };
            var dt = await GetTraitDeterminationResultRDTAsync(args);

            //return totalrows back to controller
            requestArgs.TotalRows = args.TotalRows;
            return(dt);
        }