///<summary> ///新增编辑后保存 ///</summary> ///<param name="library"></param> /// <returns></returns> public bool SaveDictfastcomment(Dictfastcomment library) { int nflag = 0; //新增 if (library.Dictfastcommentid == 0 || library.Dictfastcommentid == null) { try { library.Dictfastcommentid = getSeqID("SEQ_DICTFASTCOMMENT"); insert("Dict.InsertDictfastcomment", library); nflag = 1; List <LogInfo> logLst = getLogInfo <Dictfastcomment>(new Dictfastcomment(), library); AddMaintenanceLog("Dictfastcomment", int.Parse(library.Dictfastcommentid.ToString()), logLst, "新增", library.Modulename, library.Fastcode, modulename); CacheHelper.RemoveAllCache("daan.SelectDictfastcommentresult"); } catch (Exception ex) { nflag = 0; throw new Exception(ex.Message); } } else//保存 { try { Dictfastcomment olddictfastcomment = GetDictfastcommentInfo(library); nflag = update("Dict.UpdateDictfastcomment", library); List <LogInfo> logLst = getLogInfo <Dictfastcomment>(olddictfastcomment, library); AddMaintenanceLog("Dictfastcomment", int.Parse(library.Dictfastcommentid.ToString()), logLst, "修改", library.Modulename, library.Fastcode, modulename); CacheHelper.RemoveAllCache("daan.SelectDictfastcommentresult"); } catch (Exception ex) { throw new Exception(ex.Message); } } return(nflag > 0); }