Пример #1
0
        public async Task <IActionResult> Edit(int id, [Bind("WomensHealthHistoryId,MedCareProviderId,DateLastClinicialBreastExam,ResultsLastBreastExam,DateNextBreastExam,DateLastMammogram,ResultsLastMammogram,DateNextMammogram,DateLastPapExam,ResultsLastPapExam,DateNextPapExam,WomensDiseaseDisorder,DateOfDiagnosis,WomensDiseaseDisorderStatus,DateResolved,WomensHealthSurgeryProcedure,DateOfSurgeryProcedure,MedCareLocationId,AgePeriodsStarted,PeriodsRegular,PeriodProblems,PeriodFlow,StillHavingPeriods,BirthControlMethod,HormoneReplacementTherapy,HrtDateStarted,HrtDateStopped,NumOfPregnancies,NumOfLiveBirths,NumOfPrematureBirths,NumOfStillBirths,NumOfMiscarriages,NumOfCsections,NumOfElectiveAbortions,PregnancyComplications")] WomensHealthHistory womensHealthHistory)
        {
            if (id != womensHealthHistory.WomensHealthHistoryId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(womensHealthHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!WomensHealthHistoryExists(womensHealthHistory.WomensHealthHistoryId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            ViewData["MedCareLocationId"] = new SelectList(_context.MedCareLocation, "LocationId", "LocationCity", womensHealthHistory.MedCareLocationId);
            ViewData["MedCareProviderId"] = new SelectList(_context.MedicalProvider, "MedProviderId", "ActiveOrInactive", womensHealthHistory.MedCareProviderId);
            return(View(womensHealthHistory));
        }
Пример #2
0
        public async Task <IActionResult> Create([Bind("WomensHealthHistoryId,MedCareProviderId,DateLastClinicialBreastExam,ResultsLastBreastExam,DateNextBreastExam,DateLastMammogram,ResultsLastMammogram,DateNextMammogram,DateLastPapExam,ResultsLastPapExam,DateNextPapExam,WomensDiseaseDisorder,DateOfDiagnosis,WomensDiseaseDisorderStatus,DateResolved,WomensHealthSurgeryProcedure,DateOfSurgeryProcedure,AgePeriodsStarted,PeriodsRegular,PeriodProblems,PeriodFlow,StillHavingPeriods,BirthControlMethod,HormoneReplacementTherapy,HrtDateStarted,HrtDateStopped,NumOfPregnancies,NumOfLiveBirths,NumOfPrematureBirths,NumOfStillBirths,NumOfMiscarriages,NumOfCsections,NumOfElectiveAbortions,PregnancyComplications")] WomensHealthHistory womensHealthHistory)
        {
            if (ModelState.IsValid)
            {
                _context.Add(womensHealthHistory);
                await _context.SaveChangesAsync();

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