Exemple #1
0
        public ResultObject Edit(SystemRes m)
        {
            if (string.IsNullOrEmpty(m.Name))
            {
                return(new ResultObject("名称不能为空"));
            }

            if (m.Id > 0)
            {
                var flag = systemResDao.Update(m);
                return(new ResultObject(flag));
            }
            else
            {
                var flag = systemResDao.Insert(m);
                return(new ResultObject(flag));
            }
        }
Exemple #2
0
        public IActionResult Edit(long id = 0, long parentId = 0)
        {
            var m = systemResBusiness.SingleById(id);

            if (m == null)
            {
                m              = new SystemRes();
                m.Status       = 1;
                m.Type         = 1;
                m.Operations   = "查看";
                ViewBag.parent = systemResBusiness.SingleById(parentId);
            }
            else
            {
                ViewBag.parent = systemResBusiness.SingleById(m.ParentId);
            }

            ViewBag.m = m;
            return(View());
        }
Exemple #3
0
        public IActionResult DoEdit(SystemRes m)
        {
            var ro = systemResBusiness.Edit(m);

            return(Json(ro));
        }