예제 #1
0
        public ActionResult Del(int ID)
        {
            string msg = "出错了!!";

            if (SYSPolicy.DeleteByID(ID) > 0)
            {
                msg = "ok";
            }
            return(Content(msg));
        }
예제 #2
0
        public ActionResult EditSave(SYSPolicy condition)
        {
            if (string.IsNullOrWhiteSpace(condition.Title))
            {
                return(Content("标题不能为空!!"));
            }
            if (string.IsNullOrWhiteSpace(condition.Contents))
            {
                return(Content("内容不能为空!!"));
            }
            string msg = "出错了";

            if (condition.UpdateByID() > 0)
            {
                msg = "ok";
            }
            return(Content(msg));
        }
예제 #3
0
        public ActionResult Save(SYSPolicy condition)
        {
            if (string.IsNullOrWhiteSpace(condition.Title))
            {
                return(Content("标题不能为空!!"));
            }
            if (string.IsNullOrWhiteSpace(condition.Contents))
            {
                return(Content("内容不能为空!!"));
            }
            string msg = "出错了";

            if (condition.InsertAndReturnIdentity() > 0)
            {
                msg = "ok";
            }
            return(Content(msg));
        }
예제 #4
0
        public ActionResult Index()
        {
            List <SYSPolicy> model = SYSPolicy.GetNavAdvs();

            return(View(model));
        }
예제 #5
0
        public ActionResult EditIndex(int ID)
        {
            SYSPolicy agentkow = SYSPolicy.GetEntityByID(ID);

            return(View(agentkow));
        }
예제 #6
0
 public ActionResult ProfityIndex()
 {
     ViewData["user"]      = C_UserVM.GetVMByID(CurrentUser.ID);
     ViewData["SYSPolicy"] = SYSPolicy.GetNavAdvsMobile();
     return(View());
 }