コード例 #1
0
        public async Task <IActionResult> Edit(int id, [Bind("C14Pk2,C14Pk,BurialLocSummary,BurialId,UniqId,Rack,LowPairNs,HighPairNs,BurialLocationNs,LowPairEw,HighPairEw,BurialLocationEw,BurialSubplot,Area,BurialNumber,Rack2,TubeNumber,Description,Size,Foci,C14Sample2017,Location,Questions,Conventional14cAgeBp,Column25,_14cCalendarDate,Calibrated95CalendarDateMax,Calibrated95CalendarDateMin,Calibrated95CalendarDateSpan,Calibrated95CalendarDateAvg,Category,Notes,Column33")] C14Data c14Data)
        {
            if (id != c14Data.C14Pk2)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(c14Data);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!C14DataExists(c14Data.C14Pk2))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(c14Data));
        }
コード例 #2
0
        public async Task <IActionResult> Edit(int id, [Bind("BurialNumber,Rack,NorthSouthNumber,NorthSouthLetter,EastWestNumber,EastWestLetter,Square,Area,TubeNumber,Description,SizeMl,Foci,C14Sample2017,Location,QuestionS,OtherNumber,Conventional14cAgeBp,_14cCalendarDate,Calibrated95CalendarDateMax,Calibrated95CalendarDateMin,Calibrated95CalendarDateSpan,Calibrated95CalendarDateAvg,Category,Notes")] C14Data c14Data)
        {
            if (id != c14Data.BurialNumber)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(c14Data);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!C14DataExists(c14Data.BurialNumber))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(c14Data));
        }
コード例 #3
0
        public async Task <IActionResult> Create([Bind("BurialNumber,Rack,NorthSouthNumber,NorthSouthLetter,EastWestNumber,EastWestLetter,Square,Area,TubeNumber,Description,SizeMl,Foci,C14Sample2017,Location,QuestionS,OtherNumber,Conventional14cAgeBp,_14cCalendarDate,Calibrated95CalendarDateMax,Calibrated95CalendarDateMin,Calibrated95CalendarDateSpan,Calibrated95CalendarDateAvg,Category,Notes")] C14Data c14Data)
        {
            if (ModelState.IsValid)
            {
                _context.Add(c14Data);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(c14Data));
        }
コード例 #4
0
        public async Task <IActionResult> Create([Bind("C14Pk2,C14Pk,BurialLocSummary,BurialId,UniqId,Rack,LowPairNs,HighPairNs,BurialLocationNs,LowPairEw,HighPairEw,BurialLocationEw,BurialSubplot,Area,BurialNumber,Rack2,TubeNumber,Description,Size,Foci,C14Sample2017,Location,Questions,Conventional14cAgeBp,Column25,_14cCalendarDate,Calibrated95CalendarDateMax,Calibrated95CalendarDateMin,Calibrated95CalendarDateSpan,Calibrated95CalendarDateAvg,Category,Notes,Column33")] C14Data c14Data)
        {
            if (ModelState.IsValid)
            {
                _context.Add(c14Data);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(c14Data));
        }