Beispiel #1
0
        //profile page of external authenticated user
        public ActionResult externalProfile()
        {
            patient             patient   = getCurrentpatient();
            externaluserProfile exprofile = new externaluserProfile();

            exprofile.birthDate = patient.birthDate;
            exprofile.type      = patient.type;
            exprofile.phone     = patient.phone;
            return(View(exprofile));
        }
Beispiel #2
0
 //update external profile page
 public ActionResult externalProfile(externaluserProfile externalPatient)
 {
     try
     {
         if (ModelState.IsValid)
         {
             patient currentPatient = getCurrentpatient();
             currentPatient.birthDate = externalPatient.birthDate;
             currentPatient.phone     = externalPatient.phone;
             currentPatient.type      = externalPatient.type;
             UpdateFields(currentPatient, db.Entry(currentPatient), p => p.type, p => p.birthDate, p => p.phone);
             db.Configuration.ValidateOnSaveEnabled = false;
             db.SaveChanges();
         }
         return(View(externalPatient));
     }
     catch (Exception)
     {
         ModelState.AddModelError(string.Empty, Resource1.updateProfileFaild);
         return(View(externalPatient));
     }
 }