// 重新设置数据 public int ResetData( string strRecPath, string strNewXml, byte[] baTimeStamp, out string strError) { strError = ""; this.RecPath = strRecPath; this.Timestamp = baTimeStamp; Debug.Assert(this.RecordDom != null); try { this.RecordDom.LoadXml(strNewXml); } catch (Exception ex) { strError = "xml装载到DOM时出错: " + ex.Message; return(-1); } // this.Initial(); this.Changed = false; // 2009/3/5 this.ItemDisplayState = ItemDisplayState.Normal; // this.RefreshListView(); return(0); }
// /// <summary> /// 重新设置数据 /// </summary> /// <param name="strRecPath">评注记录路径</param> /// <param name="strNewXml">评注记录 XML 内容</param> /// <param name="baTimeStamp">评注记录时间戳</param> /// <param name="strError">出错信息</param> /// <returns>-1: 出错。错误信息在 strError 中; 0: 成功</returns> public int ResetData( string strRecPath, string strNewXml, byte[] baTimeStamp, out string strError) { strError = ""; this.RecPath = strRecPath; this.Timestamp = baTimeStamp; Debug.Assert(this.RecordDom != null); try { this.RecordDom.LoadXml(strNewXml); } catch (Exception ex) { strError = "xml装载到DOM时出错: " + ex.Message; return -1; } this.Changed = false; this.ItemDisplayState = ItemDisplayState.Normal; return 0; }