Exemple #1
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,LastName,RelationshipToPatient,HomePhone,EveningPhone,CellPhone,EmerContactEmail,EmerContactStreetAddress,EmerContactCity,EmerContactStateProvince,EmerContactZip,EmerContactCountry")] EmergencyContact emergencyContact)
        {
            if (id != emergencyContact.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(emergencyContact);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmergencyContactExists(emergencyContact.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(emergencyContact));
        }
Exemple #2
0
        public async Task <IActionResult> Edit(int id, [Bind("CholesterolRiskId,DateCholTaken,TotalCholesterol,LdlCholesterol,HdlCholesterol,Triglycerides,TakenAfterFasting,TotalCholGoal,LdlCholGoal,HdlCholGoal,TriglycerideGoal,Comments")] CholesterolRisk cholesterolRisk)
        {
            if (id != cholesterolRisk.CholesterolRiskId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(cholesterolRisk);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CholesterolRiskExists(cholesterolRisk.CholesterolRiskId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(cholesterolRisk));
        }
Exemple #3
0
        public async Task <IActionResult> Edit(int id, [Bind("AllergyHistoryId,DrugAllergen,ContactAllergen,InsectStingBites,AirborneInhaledAllergen,TypeOfReaction,Severity,Symptoms,MedTreatmentRequired,Comments")] AllergyHistory allergyHistory)
        {
            if (id != allergyHistory.AllergyHistoryId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(allergyHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AllergyHistoryExists(allergyHistory.AllergyHistoryId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(allergyHistory));
        }
        public async Task <IActionResult> Edit(int id, [Bind("BloodPressureRiskId,DateDateEntered,SystolicPressure,DiastolicPressure,PulseRate,DateTaken,TimeTaken,SystolicBpgoal,DiastolicBpgoal,Comments")] BloodPressureRisk bloodPressureRisk)
        {
            if (id != bloodPressureRisk.BloodPressureRiskId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(bloodPressureRisk);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!BloodPressureRiskExists(bloodPressureRisk.BloodPressureRiskId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(bloodPressureRisk));
        }
Exemple #5
0
        public async Task <IActionResult> Edit(int id, [Bind("ImmunizationsId,ImmunizationType,DateReceived,AdministeredBy,DateLastTetanus,Comments")] Immunizations immunizations)
        {
            if (id != immunizations.ImmunizationsId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(immunizations);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ImmunizationsExists(immunizations.ImmunizationsId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(immunizations));
        }
Exemple #6
0
        public async Task <IActionResult> Edit(int id, [Bind("DrugUseRiskId,RecreationalDrugUser,FrequencyUsed,YearsUsed,YearsQuit,DrugsCausedLifeProblems,DrugsCausedProblemsExpl,TreatedForDrugAbuse,YearTreated,TreatmentLength,TypeOfTreatment,Comments")] DrugUseRisk drugUseRisk)
        {
            if (id != drugUseRisk.DrugUseRiskId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(drugUseRisk);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!DrugUseRiskExists(drugUseRisk.DrugUseRiskId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(drugUseRisk));
        }
        public async Task <IActionResult> Edit(int id, [Bind("EarNoseThroatHistoryId,DiseaseDisorder,DiagnosisDate,CurrentStatus,DateResolved,MedicalProviderId,MedCareLocationId,Surgery")] EarNoseThroatHistory earNoseThroatHistory)
        {
            if (id != earNoseThroatHistory.EarNoseThroatHistoryId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(earNoseThroatHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EarNoseThroatHistoryExists(earNoseThroatHistory.EarNoseThroatHistoryId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(earNoseThroatHistory));
        }
Exemple #8
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,EmployerName,Address,City,State,ZipCode,PhoneNum")] Employment employment)
        {
            if (id != employment.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(employment);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EmploymentExists(employment.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(employment));
        }
        public async Task <IActionResult> Edit(int id, [Bind("ExerciseActivityRiskId,AnyExercise,TypeOfExercise,FrequencyOfExercise,DurationOfExercise,IntensityLevel,DurationGoal,Comments")] ExerciseActivityRisk exerciseActivityRisk)
        {
            if (id != exerciseActivityRisk.ExerciseActivityRiskId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(exerciseActivityRisk);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!ExerciseActivityRiskExists(exerciseActivityRisk.ExerciseActivityRiskId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(exerciseActivityRisk));
        }
Exemple #10
0
        public async Task <IActionResult> Edit(int id, [Bind("AsthmaRiskId,AsthmaHospitalization,AsthmaHospitalizationDate,AsthmaIcu,IcuAdmitDate,AsthmaTriggers,AsthmaSymptoms,AsthmaSeverity,MedicationForAsthma,MedicationName,Comments")] AsthmaRisk asthmaRisk)
        {
            if (id != asthmaRisk.AsthmaRiskId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(asthmaRisk);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AsthmaRiskExists(asthmaRisk.AsthmaRiskId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(asthmaRisk));
        }
Exemple #11
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,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)));
            }
            return(View(womensHealthHistory));
        }
        public async Task <IActionResult> Edit(int id, [Bind("MensHealthId,DateLastAnnualPhysical,DateNextAnnualPhysical,FamilyHistoryProstateCancer,DateLastProstateExam,LastProstateExamResults,DateNextProstateExam,DateLastPsa,LastPsaresults,PsaLevelTestNumber,DateNextPsatest,DateLastFecalOccultTest,FecalOccultResults,DateNextFecalOccultTest,DateLastSigmoidColonoscopyExam,SigmoidColonoscopyResults,DateNextSigmoidColonoscopy,MensHealthIssues,Comments")] MensHealth mensHealth)
        {
            if (id != mensHealth.MensHealthId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(mensHealth);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MensHealthExists(mensHealth.MensHealthId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(mensHealth));
        }
Exemple #13
0
        public async Task <IActionResult> Edit(int id, [Bind("FeedbackId,HowArchpointWasFound,EasyToUnderstand,SuggestionsForImprovements")] Feedback feedback)
        {
            if (id != feedback.FeedbackId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(feedback);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!FeedbackExists(feedback.FeedbackId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(feedback));
        }
        public async Task <IActionResult> Edit(int id, [Bind("EyeHistoryId,DateLastEyeExam,DateNextEyeExam,DateLastGlaucomaExam,DateNextGlaucomaExam,MedicalProviderId,Eyeglasses,ContactLenses,PrescriptionDate,ContactBrandName,EyeDiseaseDisorder,EyeDiseaseDisorderDiagnosisDate,EyeDiseaseDisorderStatus,EyeDiseaseDisorderResolveDate,PreviousEyeSurgery,EyeSurgeryProcedure,EyeSurgeryProcedureDate,MedCareLocationId,Comments")] EyeHistory eyeHistory)
        {
            if (id != eyeHistory.EyeHistoryId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(eyeHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!EyeHistoryExists(eyeHistory.EyeHistoryId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(eyeHistory));
        }
        public async Task <IActionResult> Edit(int id, [Bind("AlcoholRiskId,DrinkAlc,DailyDrinkCount,WeekendDrinkCount,SocialDrinkCount,YearsQuitDrinking,TreatedForAlcAbuse,YearTreated,LengthOfTreatment,TypeOfTreatment,Comments")] AlcoholRisk alcoholRisk)
        {
            if (id != alcoholRisk.AlcoholRiskId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(alcoholRisk);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!AlcoholRiskExists(alcoholRisk.AlcoholRiskId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(alcoholRisk));
        }
Exemple #16
0
        public async Task <IActionResult> Edit(int id, [Bind("SurgicalHistoryId,SurgeryProcedure,DateOfSurgeryProcedure,MedProviderId,MedCareLocationId,ProblemWithAnesthesia,AnesthesiaProblemExplanation")] SurgicalHistory surgicalHistory)
        {
            if (id != surgicalHistory.SurgicalHistoryId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(surgicalHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!SurgicalHistoryExists(surgicalHistory.SurgicalHistoryId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(surgicalHistory));
        }
        public async Task <IActionResult> Edit(int id, [Bind("A1cTestRiskId,DateEntered,DateTested,A1cTestResults,A1cTargetRangeGoal,Comments")] A1CTestRisk a1CTestRisk)
        {
            if (id != a1CTestRisk.A1cTestRiskId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(a1CTestRisk);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!A1CTestRiskExists(a1CTestRisk.A1cTestRiskId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(a1CTestRisk));
        }
Exemple #18
0
        public async Task <IActionResult> Edit(int id, [Bind("Id,PrimaryOrSecondary,InsuranceName,InsurancePhoneNum,InsuranceStreetAddress,InsuranceCity,InsuranceState,InsuranceCountry,PolicyIdNo,GroupNo,PlanEffectiveDate,AuthorizationPhoneNum,MedicareClaimNum,MedicaidClaimNum,MedicareMedicaidEffectiveDate,PolicyHolderFirstName,PolicyHolderMidInit,PolicyHolderLastName,RelationshipToPolicyHolder,DateOfBirth,SocialSecurityNo")] Insurance insurance)
        {
            if (id != insurance.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(insurance);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!InsuranceExists(insurance.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(insurance));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,DiseaseDisorder,DateOfDiagnosis,AgeAtOnset,Status,DateResolved,MedicalProviderId,Comments")] MedicalHistory medicalHistory)
        {
            if (id != medicalHistory.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(medicalHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MedicalHistoryExists(medicalHistory.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(medicalHistory));
        }
Exemple #20
0
        public async Task <IActionResult> Edit(int id, [Bind("CaregiversId,PatientFirstName,PatientMiddleInitial,patientLastName,RelationshipToPatient,StreetAddress,City,StateProvince,ZipCode,Country,PhoneNumber,EveningPhone,CellPhone,PatientCurrentlyInNursingFacility")] Caregivers caregivers)
        {
            if (id != caregivers.CaregiversId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(caregivers);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CaregiversExists(caregivers.CaregiversId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(caregivers));
        }
Exemple #21
0
        public async Task <IActionResult> Edit(int id, [Bind("CancerHistoryId,MedProviderId,TypeOfCancerTumor,DiagnosisDate,AgeAtDiagnosis,StageOfCancerTumor,MedCareLocationId,TreatmentReceived,TreatmentDate,Comments")] CancerHistory cancerHistory)
        {
            if (id != cancerHistory.CancerHistoryId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(cancerHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!CancerHistoryExists(cancerHistory.CancerHistoryId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(cancerHistory));
        }
        public async Task <IActionResult> Edit(int id, [Bind("TestsExamsId,TestExamType,TestExamResult,DateOfTestExam,ReaonForTestExam,MedCareLocationId")] TestsExams testsExams)
        {
            if (id != testsExams.TestsExamsId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(testsExams);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!TestsExamsExists(testsExams.TestsExamsId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(testsExams));
        }
Exemple #23
0
        public async Task <IActionResult> Edit(int id, [Bind("StdHistoryId,StdType,StdDateOfDiagnosis,StdStatus,StdDateResolved,StdMedication,Comments")] StdHistory stdHistory)
        {
            if (id != stdHistory.StdHistoryId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(stdHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!StdHistoryExists(stdHistory.StdHistoryId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(stdHistory));
        }
Exemple #24
0
        public async Task <IActionResult> Edit(int id, [Bind("UserId,UserFirstName,UserLastName,Password,EmailAddress,RelationshipToPatient")] User user)
        {
            if (id != user.UserId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(user);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!UserExists(user.UserId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(user));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,PrimaryOrNot,ActiveOrInactive,FirstName,LastName,TypeOfSpecialty,StreetAddress,City,State,ZipCode,Country,Phone,Fax,Email")] MedicalProvider medicalProvider)
        {
            if (id != medicalProvider.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(medicalProvider);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MedicalProviderExists(medicalProvider.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(medicalProvider));
        }
        public async Task <IActionResult> Edit(int id, [Bind("MedCareLocationId,LocationStreetAddress,LocationCity,LocationStateProvince,LocationZipCode,LocationCountry,LocationPhoneNum,LocationFax,LocationEmail,LocationName")] MedCareLocation medCareLocation)
        {
            if (id != medCareLocation.MedCareLocationId)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(medCareLocation);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MedCareLocationExists(medCareLocation.MedCareLocationId))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(medCareLocation));
        }
        public async Task <IActionResult> Edit(int id, [Bind("Id,FirstName,MiddleInitial,LastName,Sex,BloodType,DateOfBirth,SocialSecurityNum,StreetAddress,City,State,ZipCode,Country,HomePhone,CellPhone,Race,MaritalStatus,Religion")] PersonalInfo personalInfo)
        {
            if (id != personalInfo.Id)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(personalInfo);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!PersonalInfoExists(personalInfo.Id))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(personalInfo));
        }
        public async Task <IActionResult> Edit(int id, [Bind("ID,FamilyMember,FirstName,LastName,Disease,CauseOfDeath,Comments")] FamilyHistory familyHistory)
        {
            if (id != familyHistory.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(familyHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!FamilyHistoryExists(familyHistory.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(familyHistory));
        }
Exemple #29
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,Name,Physician,Quantity,Dosage,Reason,Type")] Medication medication)
        {
            if (id != medication.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(medication);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MedicationExists(medication.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(medication));
        }
Exemple #30
0
        public async Task <IActionResult> Edit(int id, [Bind("MentalHealthHistoryid,CurrentTreatmentForMentalDisorder,MedCareLocationId,TypeOfTreatment,TreatedInPast,MentalConditionDisorder,CurrentMedication,MedicalProviderId,Comments")] MentalHealthHistory mentalHealthHistory)
        {
            if (id != mentalHealthHistory.MentalHealthHistoryid)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(mentalHealthHistory);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!MentalHealthHistoryExists(mentalHealthHistory.MentalHealthHistoryid))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction(nameof(Index)));
            }
            return(View(mentalHealthHistory));
        }