public JsonResult wenBenEdit(FormCollection form)
 {
     ResultBase_form result = new ResultBase_form();
     wx_requestRule m = new wx_requestRule();
     TryUpdateModel<wx_requestRule>(m, form);
     m.wID = UserDateTicket.wx_user.ID;
     m.cID = UserDateTicket.Company.ID;
     m.wxId = UserDateTicket.wx_user.wxId;
     m.reqestType = 0;
     m.responseType = 1;
     m.isLikeSearch = form["isLikeSearch"] == "1";
     if (m.ID == Guid.Empty)
     {
         m.ID = Guid.NewGuid();
         result.status = wx_requestRuleService.instance().Insert(m);
         wx_requestRuleContent rc = new wx_requestRuleContent();
         rc.rContent = Server.UrlDecode(form["rContent"]);
         rc.RuleID = m.ID;
         wx_requestRuleContentService.instance().Insert(rc);
     }
     else
     {
         wx_requestRuleContent rc = wx_requestRuleContentService.instance().SingleByRuleID(m.ID);
         rc.rContent = Server.UrlDecode(form["rContent"]);
         rc.RuleID = m.ID;
         wx_requestRuleContentService.instance().Update(rc);
         result.status = wx_requestRuleService.instance().Update(m);
     }
     result.msg = result.status == 0 ? "操作失败" : "操作成功";
     return Json(result, JsonRequestBehavior.AllowGet);
 }
        public JsonResult tuWenListEdit(FormCollection form)
        {
            ResultBase_form result = new ResultBase_form();
            wx_requestRuleContent m = new wx_requestRuleContent();
            TryUpdateModel<wx_requestRuleContent>(m, form);
            if (m.ID == Guid.Empty)
            {
                m.ID = Guid.NewGuid();
                result.status = wx_requestRuleContentService.instance().Insert(m);
            }
            else
            {
                result.status = wx_requestRuleContentService.instance().Update(m);
            }
            result.msg = result.status == 0 ? "操作失败" : "操作成功";
            return Json(result, JsonRequestBehavior.AllowGet);

        }
 public ActionResult tuWenListEdit(string id, string rid)
 {
     Guid ID;
     wx_requestRuleContent m = new wx_requestRuleContent();
     if (Guid.TryParse(id, out ID))
         m = wx_requestRuleContentService.instance().Single(ID);
     ViewBag.RID = rid;
     return View(m);
 }