Example #1
0
 public ActionResult Create(Shops shop)
 {
     try
     {
         ShopsBLL db = new ShopsBLL();
         shop.S_CreateTime = DateTime.Now;
         shop.S_IsHasSetAdmin = false;
         db.Add(shop);
         db.SaveChanges();
         return Json(new { result = "ok" });
     }
     catch
     {
         return Json(new { result = "error" });
     }
 }
Example #2
0
 /// <summary>
 /// 创建新的 Shops 对象。
 /// </summary>
 /// <param name="s_ID">S_ID 属性的初始值。</param>
 public static Shops CreateShops(global::System.Int32 s_ID)
 {
     Shops shops = new Shops();
     shops.S_ID = s_ID;
     return shops;
 }
Example #3
0
 public ActionResult Edit(Shops shop)
 {
     try
     {
         ShopsBLL db = new ShopsBLL();
         db.Edit(shop, "S_Name", "S_Category", "S_ContactName", "S_ContactTel", "S_Address", "S_Remark");
         db.SaveChanges();
         return Json(new { result = "ok" });
     }
     catch
     {
         return Json(new { result = "error" });
     }
 }