コード例 #1
0
 public ActionResult Edit([Bind(Include = "id,name,minute_number,sms_number,price")] tariffs tariffs)
 {
     if (ModelState.IsValid)
     {
         db.Entry(tariffs).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(tariffs));
 }
コード例 #2
0
 public ActionResult Edit([Bind(Include = "id,name")] regions regions)
 {
     if (ModelState.IsValid)
     {
         db.Entry(regions).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(regions));
 }
コード例 #3
0
 public ActionResult Edit([Bind(Include = "id,address,passport_info,birthday,sex")] personal_data personal_data)
 {
     if (ModelState.IsValid)
     {
         db.Entry(personal_data).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(personal_data));
 }
コード例 #4
0
 public ActionResult Edit([Bind(Include = "id,full_name,experience,salary,id_region")] operators operators)
 {
     if (ModelState.IsValid)
     {
         db.Entry(operators).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.id_region = new SelectList(db.regions, "id", "name", operators.id_region);
     return(View(operators));
 }
コード例 #5
0
 public ActionResult Edit([Bind(Include = "id,date,payment_value,id_subscriber_tariff")] payments payments)
 {
     if (ModelState.IsValid)
     {
         db.Entry(payments).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.id_subscriber_tariff = new SelectList(db.subscriber_tariff_list, "id", "id", payments.id_subscriber_tariff);
     return(View(payments));
 }
コード例 #6
0
 public ActionResult Edit([Bind(Include = "id,id_personal_data,full_name,telephone_number,id_region")] subscribers subscribers)
 {
     if (ModelState.IsValid)
     {
         db.Entry(subscribers).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.id_personal_data = new SelectList(db.personal_data, "id", "address", subscribers.id_personal_data);
     ViewBag.id_region        = new SelectList(db.regions, "id", "name", subscribers.id_region);
     return(View(subscribers));
 }
コード例 #7
0
 public ActionResult Edit([Bind(Include = "id,id_tariff,id_subscriber,date")] subscriber_tariff_list subscriber_tariff_list)
 {
     if (ModelState.IsValid)
     {
         db.Entry(subscriber_tariff_list).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.id_subscriber = new SelectList(db.subscribers, "id", "full_name", subscriber_tariff_list.id_subscriber);
     ViewBag.id_tariff     = new SelectList(db.tariffs, "id", "name", subscriber_tariff_list.id_tariff);
     return(View(subscriber_tariff_list));
 }