/// <summary>
 /// 验证数据
 /// </summary>
 /// <returns></returns>
 private bool CheckData()
 {
     if (!string.IsNullOrEmpty(txtUserName.Text.Trim()))
     {
         if (CommonHelp.CheckString(txtUserName.Text.Trim()))
         {
             hidInfo.Value = "姓名不能输入特殊字符!";
             txtUserName.Focus();
             return(false);
         }
     }
     return(true);
 }
Esempio n. 2
0
        /// <summary>
        /// 验证数据
        /// </summary>
        private bool CheckData()
        {
            if (!string.IsNullOrEmpty(txtFName.Text))
            {
                if (CommonHelp.CheckString(txtFName.Text.Trim()))
                {
                    hidInfo.Value = "功能名称中不能包含特殊字符!";
                    txtFName.Focus();
                    return(false);
                }
            }
            else
            {
                hidInfo.Value = "功能名称不能为空!";
                txtFName.Focus();
                return(false);
            }
            if (MenuFunctionQuery.IsExisitName(this.MenuID, txtFName.Text.Trim()))
            {
                hidInfo.Value = "此功能名称已经存在!";
                txtFName.Focus();
                return(false);
            }

            if (!string.IsNullOrEmpty(txtFCode.Text))
            {
                if (CommonHelp.CheckString(txtFCode.Text.Trim()))
                {
                    hidInfo.Value = "代码名称中不能包含特殊字符!";
                    txtFCode.Focus();
                    return(false);
                }
            }
            else
            {
                hidInfo.Value = "代码名称不能为空!";
                txtFCode.Focus();
                return(false);
            }


            if (MenuFunctionQuery.IsExisitCode(this.MenuID, txtFCode.Text.Trim()))
            {
                hidInfo.Value = "此代码名称已经存在!";
                txtFCode.Focus();
                return(false);
            }
            return(true);
        }
Esempio n. 3
0
 /// <summary>
 /// 验证数据
 /// </summary>
 /// <returns></returns>
 private bool CheckData()
 {
     if (!string.IsNullOrEmpty(txtMenuName.Text.Trim()))
     {
         if (CommonHelp.CheckString(txtMenuName.Text.Trim()))
         {
             hidInfo.Value = "菜单名称中不能包含特殊字符!";
             txtMenuName.Focus();
             return(false);
         }
     }
     else
     {
         hidInfo.Value = "菜单名称不能为空!";
         txtMenuName.Focus();
         return(false);
     }
     return(true);
 }
        /// <summary>
        /// 验证数据
        /// 作者:姚东
        /// 时间:20100919
        /// </summary>
        /// <returns></returns>
        private bool CheckData()
        {
            if (!string.IsNullOrEmpty(txtName.Text.Trim()))
            {
                if (CommonHelp.CheckString(txtName.Text.Trim()))
                {
                    hidInfo.Value = "姓名中不能包含特殊字符!";
                    return(false);
                }
            }

            if (!string.IsNullOrEmpty(txtAccount.Text.Trim()))
            {
                if (CommonHelp.CheckString(txtAccount.Text.Trim()))
                {
                    hidInfo.Value = "账号中不能包含特殊字符!";
                    return(false);
                }
            }
            return(true);
        }