void TxbSURVEY_ID_TextChanged(object sender, EventArgs e) { if (TxbSURVEY_ID.Text.StartsWith("YS")) { TxbSYSTEM_TYPE.Text = "雨水"; } else if (TxbSURVEY_ID.Text.StartsWith("WS")) { TxbSYSTEM_TYPE.Text = "污水"; } else { TxbSYSTEM_TYPE.ResetText(); } if (TxbSURVEY_ID.Text.Length == 10) { if (!this.m_PipePoint.IsExistSURVEYID(TxbSURVEY_ID.Text)) { TxbID.Text = this.m_PipePoint.GetHead() + TxbSURVEY_ID.Text.Substring(2); } else { MessageBox.Show("已存在该物探点号", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); TxbSURVEY_ID.Select(); return; } } else { TxbID.Clear(); } }
void TxbSURVEY_ID_TextChanged(object sender, EventArgs e) { if (TxbSURVEY_ID.Text.Length == 10) { if (!this.pCOMB.IsExistSURVEYID(TxbSURVEY_ID.Text)) { TxbID.Text = this.pCOMB.GetHead() + TxbSURVEY_ID.Text.Substring(2); } else { MessageBox.Show("已存在该物探点号", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); TxbSURVEY_ID.Select(); return; } } else { TxbID.Clear(); } }