首页 > 其他 > 详细

通用用户权限管理系统组件4.0 版本 - 界面输入安全检查 - 为大规模开发软件系统做样例

时间:2014-01-23 22:59:41      阅读:510      评论:0      收藏:0      [点我收藏+]

公司要进行大规模软件系统开发,需要把一些关键的例子程序都写写好,为了加强软件系统的安全性,做了界面输入内容的安全性检查,下面是程序的运行效果。
bubuko.com,布布扣

bubuko.com,布布扣

安全性检查的代码参考如下

bubuko.com,布布扣
        private bool CheckInputSearch()
        {
            bool result = true;
            if (!BaseCheckInput.SqlSafe(this.txtSearch.Text))
            {
                this.txtSearch.SelectAll();
                this.txtSearch.Focus();
                result = false;
            }
            return result;
        }

        private void btnSearch_Click(object sender, EventArgs e)
        {
            if (this.CheckInputSearch())
            {
                // 设置鼠标繁忙状态,并保留原先的状态
                Cursor holdCursor = this.Cursor;
                this.Cursor = Cursors.WaitCursor;
                this.FormLoaded = false;
                // 设置查询条件
                this.Search();
                this.SetSearch();
                this.FormLoaded = true;
                // 设置鼠标默认状态,原来的光标状态
                this.Cursor = holdCursor;
            }
        }
bubuko.com,布布扣

通用用户权限管理系统组件4.0 版本 - 界面输入安全检查 - 为大规模开发软件系统做样例

原文:http://www.cnblogs.com/jirigala/p/3531198.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!