Example #1
0
        private bool ValidateInfoS()//验证分数
        {
            bool b = true;

            if (!ValidataInput.IsNumber(txtsMark.Text))
            {
                MessageBox.Show("分数必须为数字!", "系统消息", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(false);
            }
            string markS = txtsMark.Text;
            int    markI = Int32.Parse(markS);

            if (markI > 100 || markI < 0)
            {
                MessageBox.Show("分数必须在0-100之间", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return(false);
            }
            return(b);
        }