private void checkSheet() { if (this.txtName.Text.Length == 0) { XtraMessageBox.Show("请输入姓名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } if (this.txtName.Text.IndexOf("_") <= 0) { XtraMessageBox.Show("请输入正确校验码", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } DataProcess dp = new DataProcess(); string result = dp.getResult(this.txtCode.Text.ToString().Trim()); if (result == "-1") { XtraMessageBox.Show("校验码不存在", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (result == "-2") { XtraMessageBox.Show("没有自检信息", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { FrmCheckSheet cs = new FrmCheckSheet(result); cs.Show(); } }
private void simpleButton1_Click(object sender, EventArgs e) { DataProcess dp = new DataProcess(); string result = dp.getResult(Patient.w_code); if (result == "-1") { XtraMessageBox.Show("校验码不存在", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else if (result == "-2") { XtraMessageBox.Show("没有自检信息", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { FrmCheckSheet cs = new FrmCheckSheet(result); cs.TopMost = true; cs.Show(); } }