booksubscriptionquery.aspx.cs

来自「管理系统源码 很好的用于参考很好对开发毕业设计很有帮助」· CS 代码 · 共 59 行

CS
59
字号
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//该源码下载自【编程联盟】ASp.Net下载中心 【 http://aspx.bcbbs.net 】
//该源码下载自【编程联盟】ASp.Net下载中心 【 http://aspx.bcbbs.net 】
//该源码下载自【编程联盟】ASp.Net下载中心 【 http://aspx.bcbbs.net 】

public partial class Pages_BookSubscriptionQuery : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void btnQuery_Click(object sender, ImageClickEventArgs e)
    {
        //查询条件
        string strWhere;
        //查询标志
        string Query_Flag;

        //判断查询内容是否为空
        if (txtQueryContent.Text.Trim() != "")
        {
            if (CheckBox1.Checked == true)
            {
                strWhere = " " + ddlBook.SelectedItem.Value + " like '%" + txtQueryContent.Text.Trim() + "%'";
            }
            else
            {
                strWhere = " " + ddlBook.SelectedValue + " = '" + txtQueryContent.Text.Trim() + "'";
            }

            //设置查询标志
            Query_Flag = "1";
            //将条件存到session中
            Session["strWhere"] = strWhere;

            //关闭子窗体,刷新父窗体
            Response.Write("<script>window.close();window.opener.location='BookSubscription.aspx?Query_Flag=" + Query_Flag + "'; </script>");
        }
        else
        {
            Response.Write("<script>alert('请输入查询内容!'); </script>");
        }
    }
    protected void btnCancel_Click(object sender, ImageClickEventArgs e)
    {
        //关闭子窗体
        Response.Write("<script>window.close(); </script>");
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?