Esempio n. 1
0
 public ActionResult Detail(S_Province model)
 {
     if (bll.Update(model))
     {
         return RedirectToAction("Index");
     }
     else
     {
         return Content("操作失败");
     }
 }
Esempio n. 2
0
 public ActionResult Add(S_Province model)
 {
     if (bll.Add(model))
     {
         return RedirectToAction("Index");
     }
     else
     {
         return Content("操作失败");
     }
 }
Esempio n. 3
0
 public ActionResult Update(S_Province model)
 {
     //S_Province model = new S_Province();
     //model.ProvinceID = id;
     //model.ProvinceName = Request["ProvinceName"] ?? "默认";
     //model.S_City.Add(new S_City() { CityID = 1 });
     if (bll.Update(model))
     {
         return RedirectToAction("Detail");
     }
     else
     {
         return Content("操作失败");
     }
 }
Esempio n. 4
0
 public int Update(S_Province t)
 {
     db.Entry<S_Province>(t).State = System.Data.Entity.EntityState.Modified;
     return db.SaveChanges();
 }
Esempio n. 5
0
 public int Add(S_Province t)
 {
     db.S_Province.Add(t);
     return db.SaveChanges();
 }
Esempio n. 6
0
 public bool Update(S_Province t)
 {
     return dal.Update(t) > 0;
 }
Esempio n. 7
0
 public bool Add(S_Province t)
 {
     return dal.Add(t) > 0;
 }