public JsonResult Create(DictionaryClassType obj)
 {
     try
     {
         NSession.SaveOrUpdate(obj);
         NSession.Flush();
     }
     catch (Exception ee)
     {
         return Json(new { IsSuccess = false, ErrorMsg = "出错了" });
     }
     return Json(new { IsSuccess = true });
 }
        public ActionResult Edit(DictionaryClassType obj)
        {

            try
            {
   
                DictionaryClassType c = GetById(obj.Id);
                NSession.CreateSQLQuery("update Dictionarys set DicCode='" + obj.Code + "' where DicCode='" + c.Code + "' ")
                  .UniqueResult();
                NSession.Clear();
                NSession.Update(obj);
                NSession.Flush();
            }
            catch (Exception ee)
            {
                return Json(new { IsSuccess = false, ErrorMsg = "出错了" });
            }
            return Json(new { IsSuccess = true });

        }