コード例 #1
0
 public ActionResult Edit([Bind(Include = "patientID,name,phone,email")] Patient patient)
 {
     if (ModelState.IsValid)
     {
         db.Entry(patient).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(patient));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "doctorID,firstName,lastName,email,phone")] Doctor doctor)
 {
     if (ModelState.IsValid)
     {
         db.Entry(doctor).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(doctor));
 }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "appointmentID,description,appDate")] Appointment appointment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(appointment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(appointment));
 }
コード例 #4
0
 public ActionResult Edit([Bind(Include = "appointmentDetailID,prescriptionQuantityOrdered,price,appointmentID,patientID")] AppointmentDetail appointmentDetail)
 {
     if (ModelState.IsValid)
     {
         db.Entry(appointmentDetail).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.appointmentID = new SelectList(db.Appointments, "appointmentID", "description", appointmentDetail.appointmentID);
     ViewBag.patientID     = new SelectList(db.Patients, "patientID", "description", appointmentDetail.patientID);
     return(View(appointmentDetail));
 }
コード例 #5
0
 public ActionResult Edit([Bind(Include = "Id,Name,PhoneNo,Address,Email,Password")] Receptionist receptionist)
 {
     if (ModelState.IsValid)
     {
         receptionist.Name            = privacy.Encrypt(receptionist.Name);
         receptionist.Email           = privacy.Encrypt(receptionist.Email);
         receptionist.Password        = EncodePassword(receptionist.Password);
         receptionist.Address         = privacy.Encrypt(receptionist.Address);
         receptionist.PhoneNo         = privacy.Encrypt(receptionist.PhoneNo);
         db.Entry(receptionist).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Message = "Update Values Successfully";
     return(View(receptionist));
 }
コード例 #6
0
 public ActionResult Edit([Bind(Include = "Id,Name,Degree,Fees,Schedule,SpecialistId,Email,Password")] DoctorDetailsModel doctordetailsmodel, int SpecialistId)
 {
     if (ModelState.IsValid)
     {
         doctordetailsmodel.SpecialistId    = SpecialistId;
         doctordetailsmodel.Name            = privacy.Encrypt(doctordetailsmodel.Name);
         doctordetailsmodel.Email           = privacy.Encrypt(doctordetailsmodel.Email);
         doctordetailsmodel.Degree          = privacy.Encrypt(doctordetailsmodel.Degree);
         doctordetailsmodel.Password        = EncodePassword(doctordetailsmodel.Password);
         doctordetailsmodel.Schedule        = privacy.Encrypt(doctordetailsmodel.Schedule);
         db.Entry(doctordetailsmodel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.Message = "Update Values Successfully";
     return(View(doctordetailsmodel));
 }
コード例 #7
0
        public ActionResult Edit([Bind(Include = "Id,Name,Designation,Email,Password,Number")] Nurse nurse)
        {
            if (ModelState.IsValid)
            {
                nurse.Name  = privacy.Encrypt(nurse.Name);
                nurse.Email = privacy.Encrypt(nurse.Email);

                nurse.Password        = EncodePassword(nurse.Password);
                nurse.Designation     = privacy.Encrypt(nurse.Designation);
                nurse.Number          = privacy.Encrypt(nurse.Number);
                db.Entry(nurse).State = EntityState.Modified;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            ViewBag.Message = "Update Values Successfully";
            return(View(nurse));
        }
コード例 #8
0
 public void Update(Fiche fiche)
 {
     context.Entry(fiche).State = EntityState.Modified;
 }
コード例 #9
0
 public void Update(Client client)
 {
     context.Entry(client).State = EntityState.Modified;
 }
コード例 #10
0
 public void Update(Categorie categorie)
 {
     context.Entry(categorie).State = EntityState.Modified;
 }
コード例 #11
0
 public void Update(Materiel materiel)
 {
     context.Entry(materiel).State = EntityState.Modified;
 }
コード例 #12
0
 public void Update(Adresse adresse)
 {
     context.Entry(adresse).State = EntityState.Modified;
 }
コード例 #13
0
 public void Update(MaterielHasFiche data)
 {
     context.Entry(data).State = EntityState.Modified;
 }