コード例 #1
0
 public ActionResult Edit([Bind(Include = "Id,RoleName")] Role role)
 {
     if (ModelState.IsValid)
     {
         db.Entry(role).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(role));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "Id,Name,Speciality,RegNum,VatNum,Phone,Email,Address")] Supplier supplier)
 {
     if (ModelState.IsValid)
     {
         db.Entry(supplier).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(supplier));
 }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "Id,IdNumber,Name,LastName,PhoneNumber,Address,CountryId,Weight,Height,EmerName,EmerLastName,EmerAddress,EmerCell,Insured,InsurCompa,InsurAddress,InsurCell,IsVaccinated")] Patient patient)
 {
     if (ModelState.IsValid)
     {
         db.Entry(patient).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CountryId = new SelectList(db.Countries, "Id", "Name", patient.CountryId);
     return(View(patient));
 }
コード例 #4
0
 public ActionResult Edit([Bind(Include = "Id,Name,Physical_Address,ResAddress,Phone,Email,CampusId,ClinicTypeId")] HealthClinic healthClinic)
 {
     if (ModelState.IsValid)
     {
         db.Entry(healthClinic).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CampusId     = new SelectList(db.Campus, "Id", "Name", healthClinic.CampusId);
     ViewBag.ClinicTypeId = new SelectList(db.ClinicTypes, "Id", "TypeName", healthClinic.ClinicTypeId);
     return(View(healthClinic));
 }
コード例 #5
0
 public ActionResult Edit([Bind(Include = "Id,Name,CampusId,Address,TypeId")] Institution institution)
 {
     if (ModelState.IsValid)
     {
         db.Entry(institution).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CampusId = new SelectList(db.Campus, "Id", "Name", institution.CampusId);
     ViewBag.TypeId   = new SelectList(db.InstitutionTypes, "Id", "Type", institution.TypeId);
     return(View(institution));
 }
コード例 #6
0
 public ActionResult Edit([Bind(Include = "Id,Name,Cell,Email,Address,RaceId,GenderId,IsRegistered,SpecialityId,PractitionerTypeId")] MedicalPractitioner medicalPractitioner)
 {
     if (ModelState.IsValid)
     {
         db.Entry(medicalPractitioner).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.GenderId           = new SelectList(db.Genders, "Id", "Name", medicalPractitioner.GenderId);
     ViewBag.RaceId             = new SelectList(db.Races, "Id", "Type", medicalPractitioner.RaceId);
     ViewBag.SpecialityId       = new SelectList(db.Specialities, "Id", "Name", medicalPractitioner.SpecialityId);
     ViewBag.PractitionerTypeId = new SelectList(db.Types, "Id", "Name", medicalPractitioner.PractitionerTypeId);
     return(View(medicalPractitioner));
 }
コード例 #7
0
 public ActionResult Edit([Bind(Include = "Id,CampusId,CommentTypeId,PriorityId,Phone,CommentMethodID,Complaint,AttendedBy,Email")] Comment comment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(comment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CampusId        = new SelectList(db.Campus, "Id", "Name", comment.CampusId);
     ViewBag.CommentTypeId   = new SelectList(db.CommentTypes, "Id", "Type", comment.CommentTypeId);
     ViewBag.CommentMethodID = new SelectList(db.CommunicationMethods, "Id", "Method", comment.CommentMethodID);
     ViewBag.AttendedBy      = new SelectList(db.MedicalPractitioners, "Id", "Name", comment.AttendedBy);
     ViewBag.PriorityId      = new SelectList(db.Priorities, "Id", "Type", comment.PriorityId);
     return(View(comment));
 }
コード例 #8
0
 public ActionResult Edit([Bind(Include = "Id,Name,LastName,Address,Email,TimeId,OptionId,GenderId,TitleId,Date,Symptoms,Cellphone,Cellphone2,StudentNumber,ID_Number,Comorbidity,PractId")] PatientAppointment patientAppointment)
 {
     if (ModelState.IsValid)
     {
         db.Entry(patientAppointment).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.GenderId = new SelectList(db.Genders, "Id", "Name", patientAppointment.GenderId);
     ViewBag.OptionId = new SelectList(db.HealthOptions, "Id", "CheckUpOption", patientAppointment.OptionId);
     ViewBag.PractId  = new SelectList(db.MedicalPractitioners, "Id", "Name", patientAppointment.PractId);
     ViewBag.TimeId   = new SelectList(db.TimePreferences, "Id", "TimePreference1", patientAppointment.TimeId);
     ViewBag.TitleId  = new SelectList(db.UserTitles, "Id", "TitleName", patientAppointment.TitleId);
     return(View(patientAppointment));
 }
コード例 #9
0
 public ActionResult Edit([Bind(Include = "Id,CampusId,CategoryId,AssetDescriptionId,Model,AssignedToId,SerialNumber,Warranty,Guarantee,SupplierId,UsageTypeId,Location,AssetColor,Description,Price,Quantity")] Inventory inventory)
 {
     if (ModelState.IsValid)
     {
         db.Entry(inventory).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CategoryId         = new SelectList(db.AssetCategories, "Id", "CategoryName", inventory.CategoryId);
     ViewBag.AssetDescriptionId = new SelectList(db.AssetDescriptions, "Id", "AssetDescr", inventory.AssetDescriptionId);
     ViewBag.UsageTypeId        = new SelectList(db.AssetUsageTypes, "Id", "UsageTypeDescription", inventory.UsageTypeId);
     ViewBag.CampusId           = new SelectList(db.Campus, "Id", "Name", inventory.CampusId);
     ViewBag.SupplierId         = new SelectList(db.Suppliers, "Id", "Name", inventory.SupplierId);
     return(View(inventory));
 }