Exemplo n.º 1
0
 /// <summary>
 /// 添加类型绑定
 /// </summary>
 /// <returns></returns>
 public ActionResult Create()
 {
     CategoryItemsBLL CategoryItemsBLL = new BLL.CategoryItemsBLL();
     var type = CategoryItemsBLL.SelectWhere(m => m.C_Category == "S_Category");
     ViewBag.S_Category = new SelectList(type, "CI_ID", "CI_Name");
     return View();
 }
Exemplo n.º 2
0
 /// <summary>
 /// 修改类型绑定
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult Edit(int id)
 {
     Shops shop = new ShopsBLL().Find(id);
     CategoryItemsBLL CategoryItemsBLL = new BLL.CategoryItemsBLL();
     var type = CategoryItemsBLL.SelectWhere(m => m.C_Category == "S_Category");
     ViewBag.S_Category = new SelectList(type, "CI_ID", "CI_Name", shop.S_Category);
     return View(shop);
 }