public ActionResult Edit(UserSetupType obj)
 {
    
     try
     {
         NSession.Update(obj);
         NSession.Flush();
     }
     catch (Exception ee)
     {
         return Json(new { errorMsg = "出错了" });
     }
     return Json(new { IsSuccess = "true" });
    
 }
        public JsonResult Create(UserSetupType obj)
        {
            try
            {
                obj.CreateOn = DateTime.Now;
                obj.CreateBy = GetCurrentAccount().Realname;



                RoleEnum displayType = (RoleEnum)System.Enum.Parse(typeof(RoleEnum), obj.SetupID.ToString());
                obj.SetupName = displayType.ToString();
                UserType user = NSession.Get<UserType>(obj.UId);
                obj.RealName = user.Realname;
                NSession.SaveOrUpdate(obj);
                NSession.Flush();
            }
            catch (Exception ee)
            {
                return Json(new { errorMsg = "出错了" });
            }
            return Json(new { IsSuccess = "true" });
        }