public async Task <IActionResult> Edit(int BurialId, [Bind("EntryId,BurialId,BodyAnalysisYear,YearExcavated,MonthExcavated,DayExcavated,ArtifactsDescription,DescriptionOfTaken,OsteologyNotes,BurialSituation,GamousId,FieldBook,FieldBookPgnumber,DataEntryExpertInitials,DataEntryCheckerInitials,ByuSample,RackNumber,ShelfNumber,Tomb,Cluster,BodySex,GeSex,SexMethod,GeFunctionTotal,AgeRangeAtDeath,AgeEstimateAtDeath,AgeMethod,AgeCode,AgeCodeSingle,BurialPreservation,BurialWrapping,FaceBundle,HairColorCode,HairColor,LengthM,LengthCm,SkullAtMagazine,PostcraniaAtMagazine,ToBeConfirmed,OsteologyUnknownComment,Goods,HairTaken,SoftTissueTaken,BoneTaken,ToothTaken,TextileTaken,ArtifactFound,BurialSampleTaken,BurialWestToHead,BurialWestToFeet,BurialSouthToHead,BurialSouthToFeet,EastToHead,EastToFeet,BurialDepth,HeadDirection,BurialDirection,Notes1,Notes2,Notes3,Notes4,Notes5,Notes6,Notes7,Notes8,Notes9,TimeEntered,InCluster,ClusterNumber,ShaftNumber,SharedShaft,ExcavationRecorderFirstName,ExcavationRecorderMiddleName,ExcavationRecorderLastName")] MainEntries mainEntries)
        {
            if (BurialId != mainEntries.EntryId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(mainEntries);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MainEntriesExists(mainEntries.EntryId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(View("~/Views/Home/Confirmation.cshtml"));
            }
            ViewData["BurialId"] = new SelectList(_context.BurialRecords, "BurialId", "BurialId", mainEntries.BurialId);
            return(View(mainEntries));
        }
 private void FillMainEntries()
 {
     foreach (var namespaceInCycle in cycle.Namespaces)
     {
         MainEntries.Add(namespaceInCycle);
     }
 }
        public IActionResult EditView(long burialId)
        {
            MainEntries      mainEntryEdit       = _context.MainEntries.Where(m => m.BurialId == burialId).First();
            BurialRecords    burialRecordEdit    = _context.BurialRecords.Where(m => m.BurialId == burialId).First();
            BodyMeasurements bodyMeasurementEdit = _context.BodyMeasurements.Where(m => m.BurialId == burialId).First();

            /*          InputViewModel record = _context.MainEntries.Where(m => m.BurialId == burialId).First();
             */
            /*            return View("EditRecord", mainEntryEdit, burialRecordEdit, bodyMeasurementEdit);
             */
            return(View());
        }
Example #4
0
        public ActionResult <MainEntries> Get(int id)
        {
            MainEntries obj = _context.MainEntries.Where(e => e.BurialId == id).FirstOrDefault();

            if (obj is null)
            {
                obj = new MainEntries
                {
                    BurialId = id
                };
            }

            return(obj);
        }