private void btnOK_Click(object sender, EventArgs e) { itemInterval.top = float.Parse(nTBXTopDepth.Text); itemInterval.bot = float.Parse(nTBXBotDepth.Text); itemInterval.calTVD(sJH); itemInterval.sText = this.tbxStext.Text; itemInterval.sProperty = this.tbxBackColor.Text; if (itemInterval.bot > itemInterval.top) { //查找是否存在,存在更改,不存在再添加 if (itemInterval.sID == "") { cXmlDocSectionWell.addDataItemIntervalProperty(filePathTemple, sIDTrack, itemInterval); cXmlDocSectionWell.sortSelectTrackItem(filePathTemple, sIDTrack); } else { cXmlDocSectionWell.setDataIntervalProperty(filePathTemple, itemInterval); } } else { MessageBox.Show("顶底深不正确。"); } }
private void btnOK_Click(object sender, EventArgs e) { itemInterval.top = float.Parse(nTBXTopDepth.Text); itemInterval.bot = float.Parse(nTBXBotDepth.Text); itemInterval.calTVD(sJH); string sJSJL = "0"; if (cbbSelect.SelectedItem.ToString() != "") { sJSJL = cbbSelect.SelectedItem.ToString(); } itemInterval.sProperty = sJSJL; cXmlDocSectionWell.setDataIntervalProperty(filePathTemple, itemInterval); }