コード例 #1
0
        private void checkSheet()
        {
            if (this.txtOrder.Text.Length == 0)
            {
                XtraMessageBox.Show("请输入姓名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            if (this.txtOrder.Text.IndexOf("_") <= 0)
            {
                XtraMessageBox.Show("请输入正确校验码", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            DataProcess dp     = new DataProcess();
            string      result = dp.getResult(this.txtOrder.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();
            }
        }
コード例 #2
0
        private bool ValidateInfo()
        {
            bool rtn = true;

            if (pExist())
            {
                killP();
            }
            if (this.txtOrder.Text.Length == 0)
            {
                //XtraMessageBox.Show("请输入姓名", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                XtraMessageBox.Show("请输入校验码", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                rtn = false;
            }
            //else if (this.txtOrder.Text.IndexOf("_")<= 0)
            //{
            //    XtraMessageBox.Show("姓名中需要包含校验码,用下划线隔开!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    rtn = false;
            //}
            //else if (this.txtSex.SelectedIndex < 0)
            //{
            //    XtraMessageBox.Show("请选择性别", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    rtn = false;
            //}
            //else if (this.txtBirthDay.Text.Length == 0)
            //{
            //    XtraMessageBox.Show("请输入出生日期", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    rtn = false;
            //}
            //else if (this.txtBirthPlace.Text.Length == 0)
            //{
            //    XtraMessageBox.Show("请输入出生地", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            //    rtn = false;
            //}
            if (rtn)
            {
                DataProcess dp  = new DataProcess();
                string      msg = dp.validOrder2(this.txtOrder.Text.Trim());
                if (msg.Length > 0)
                {
                    XtraMessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    rtn = false;
                }
            }
            return(rtn);
        }