예제 #1
0
        public JsonResult Modify(Dept dept)
        {
            DeptRule rule = new DeptRule();

            try
            {
                if (rule.Update(dept.ID, dept.Name))
                {
                    return(GetDept(dept.ID));
                }
                else
                {
                    throw new Exception();
                }
            }
            catch
            {
                return(null);
            }
        }