Esempio n. 1
0
        //获取追加的备注信息
        public ActionResult GetZhuiJiaBak()
        {
            long?id      = int.Parse(Request["PID"]);
            var  rtzjbak = T_ZhuaiJiaBakService.LoadEntities(x => x.FGJHTML_id == id).FirstOrDefault();

            return(Json(rtzjbak == null?"": rtzjbak.BAK, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        //追加备注信息
        public ActionResult AddZhuiJia()
        {
            long?  id    = int.Parse(Request["PID"]);
            string bak   = Request["Bak"];
            var    zjbak = T_ZhuaiJiaBakService.LoadEntities(x => x.FGJHTML_id == id).FirstOrDefault();

            //如果空那么新增信息
            if (zjbak == null)
            {
                T_ZhuaiJiaBak newT = new T_ZhuaiJiaBak();
                newT.ADDtime    = MvcApplication.GetT_time();
                newT.AddUser    = LoginUser.ID;
                newT.BAK        = bak;
                newT.DEL        = 0;
                newT.FGJHTML_id = id;
                T_ZhuaiJiaBakService.AddEntity(newT);
                return(Json(new { ret = "ok", msg = "添加成功!" }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                zjbak.ADDtime = MvcApplication.GetT_time();
                zjbak.BAK     = bak;
                if (T_ZhuaiJiaBakService.EditEntity(zjbak))
                {
                    return(Json(new { ret = "ok", msg = "修改成功!" }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new { ret = "no", msg = "修改失败,请联系管理员!" }, JsonRequestBehavior.AllowGet));
                }
            }
        }