Exemplo n.º 1
0
 public ActionResult Edit([Bind(Include = "GenderId,GenderName")] Gender gender)
 {
     if (ModelState.IsValid)
     {
         db.Entry(gender).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(gender));
 }
Exemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "PriceId,Price1")] Price price)
 {
     if (ModelState.IsValid)
     {
         db.Entry(price).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(price));
 }
Exemplo n.º 3
0
 public ActionResult Edit([Bind(Include = "SpecialityId,SpecialityName")] Speciality speciality)
 {
     if (ModelState.IsValid)
     {
         db.Entry(speciality).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(speciality));
 }
Exemplo n.º 4
0
 public ActionResult Edit([Bind(Include = "ClientId,ClientName,GenderID,CityID,Address,Billing,PhoneNumber,Image,ClientEmail")] Client client)
 {
     if (ModelState.IsValid)
     {
         db.Entry(client).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CityID   = new SelectList(db.Cities, "CityId", "CityName", client.CityID);
     ViewBag.GenderID = new SelectList(db.Genders, "GenderId", "GenderName", client.GenderID);
     return(View(client));
 }
Exemplo n.º 5
0
 public ActionResult Edit([Bind(Include = "ProfileId,ProfileName,ProffesionID,CityID,PriceID,SpecialityID,GenderID,Bio,Image,Address,PhoneNumber,ProfileEmail")] Profile profile)
 {
     if (ModelState.IsValid)
     {
         db.Entry(profile).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.CityID       = new SelectList(db.Cities, "CityId", "CityName", profile.CityID);
     ViewBag.GenderID     = new SelectList(db.Genders, "GenderId", "GenderName", profile.GenderID);
     ViewBag.PriceID      = new SelectList(db.Prices, "PriceId", "Price1", profile.PriceID);
     ViewBag.ProffesionID = new SelectList(db.Proffesions, "ProffesionId", "ProffesionName", profile.ProffesionID);
     ViewBag.SpecialityID = new SelectList(db.Specialities, "SpecialityId", "SpecialityName", profile.SpecialityID);
     return(View(profile));
 }