Patent/PatentSH.aspx.cs
(开头部分) 1KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class Patent_PatentSH : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindDataGridView("");
}
}
protected void butQuery_Click(object sender, EventArgs e)
{
string strWhere = "";
if (patentName.Text.Trim() != "")
{
strWhere = " patentName like '%" + patentName.Text.Trim() + "%'";
}
if (patentType.SelectedIndex != 0)
{
strWhere = strWhere + " and patentType='" + patentType.SelectedItem.Text + "'";
}
if (patentAudit.SelectedIndex != 0)
{
strWhere = strWhere + " and patentAudit='" + patentAudit.SelectedItem.Text + "'";
}
if (strWhere.Length > 4 && strWhere.Substring(0, 4) == " and")
{
strWhere = "1=1 " + strWhere;
}
BindDataGridView(strWhere);
}
protected void BindDataGridView(string strWhere)
{
ExecuteSql exec = new ExecuteSql();
string strSql = "select * from dbo.patent";
if (strWhere != "")
{
strSql = strSql + string.Format(" where {0} ", strWhere);
}
DataTable dt = exec.execSQLTable(strSql);
Grid1.DataSource = dt;
后面还有 3 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读 AI
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
