public static DialogResult updateTrackData(string filePathOper, string sTrackID) { string sJH = cXmlDocSectionWell.getNodeInnerText(filePathOper, cXmlDocSectionWell.fullPathJH); XmlNode selectTrack = cXmlBase.selectNodeByID(filePathOper, sTrackID); string typeTrackstr = cXmlDocSectionWell.getTrackTypeByID(filePathOper, sTrackID); DialogResult resultRet = DialogResult.OK; if (typeTrackstr == TypeTrack.组分.ToString()) { FormSectionDataLogComposition newDataImport = new FormSectionDataLogComposition(sJH, typeTrackstr, filePathOper, sTrackID); resultRet = newDataImport.ShowDialog(); } else if (typeTrackstr == TypeTrack.深度尺.ToString()) { FormSettingSectionDepthRuler setRuler = new FormSettingSectionDepthRuler(filePathOper, sTrackID); resultRet = setRuler.ShowDialog(); } else if (typeTrackstr != TypeTrack.曲线道.ToString()) { FormDataImportWell formInputDataTableSingleWell = new FormDataImportWell(sJH, typeTrackstr, filePathOper, sTrackID); resultRet = formInputDataTableSingleWell.ShowDialog(); } return(resultRet); }
//节点名存ID 通过id xml和 treeview 关联 public static DialogResult updateTrackData(string sJHSelected, TreeNode selectNode, string filePathOper) { string sTrackID = selectNode.Name; XmlNode selectXmlNode = cXmlBase.selectNodeByID(filePathOper, sTrackID); string typeTrackstr = selectNode.Tag.ToString(); DialogResult resultRet = DialogResult.OK; if (selectNode.Level == 1) { if (selectNode.Tag.ToString() == TypeTrack.深度尺.ToString()) { FormSettingSectionDepthRuler setRuler = new FormSettingSectionDepthRuler(filePathOper, sTrackID); resultRet = setRuler.ShowDialog(); } else { FormDataImportWell formInputDataTableSingleWell = new FormDataImportWell(sJHSelected, typeTrackstr, filePathOper, sTrackID); resultRet = formInputDataTableSingleWell.ShowDialog(); } } if (selectNode.Level == 2) { if (selectNode.Parent.Tag.ToString() == TypeTrack.曲线道.ToString()) { TypeTrack typetrack = (TypeTrack)Enum.Parse(typeof(TypeTrack), selectNode.Parent.Tag.ToString()); string sLogName = selectNode.Tag.ToString(); FormSectionDataLog formInputDataTableSingleWell = new FormSectionDataLog(sJHSelected, sLogName, typetrack.ToString(), filePathOper, sTrackID); resultRet = formInputDataTableSingleWell.ShowDialog(); } }//end lever2 return(resultRet); }