Пример #1
0
 // GET: WeShop
 public ActionResult Index()
 {
     WeShop m = WeShopService.instance().GetEneityByCompanyID(UserDateTicket.Company.ID);
     if (m == null)
         m = new WeShop();
     return View(m);
 }
Пример #2
0
 public JsonResult Index(FormCollection form)
 {
     ResultBase_form result = new ResultBase_form();
     WeShop m = new WeShop();
     TryUpdateModel<WeShop>(m, form);
     m.CompanyID = UserDateTicket.Company.ID;
     if (m.ID == Guid.Empty)
         result.status = WeShopService.instance().Insert(m);
     else
         result.status = WeShopService.instance().Update(m);
     result.msg = result.status == 0 ? "操作失败" : "操作成功";
     result.ResultURL = "/WeShop/Index";
     return Json(result, JsonRequestBehavior.AllowGet);
 }