Пример #1
0
        public ActionResult NewAddListYXY(T_YxPerson typ)
        {
            typ.AddTime   = MvcApplication.GetT_time();
            typ.ADDuserID = LoginUser.ID;
            typ.DEL       = 0;
            if (typ.ID <= 0)
            {
                T_YxPersonService.AddEntity(typ);
            }
            else
            {
                T_YxPersonService.EditEntity(typ);
            }

            return(Content("ok"));
        }
Пример #2
0
        public ActionResult DelListYXY()
        {
            var id   = Convert.ToInt64(Request["id"]);
            var temp = T_YxPersonService.LoadEntities(x => x.ID == id).FirstOrDefault();

            temp.DEL = 1;
            if (temp != null)
            {
                if (T_YxPersonService.EditEntity(temp))
                {
                    return(Json("ok", JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json("no", JsonRequestBehavior.AllowGet));
                }
            }
            else
            {
                return(Json("null", JsonRequestBehavior.AllowGet));
            }
        }