Web/cheweiQuery.aspx.cs

(完整代码) 1KB

using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace Maticsoft.Web
{
    //select a.chewei, case  when Flag is null then '空闲' else chepai  end as '车牌号'  from dbo.cheweixinxi a left join  dbo.cheliangxinxi b on a.chewei=b.chewei
    public partial class cheweiQuery : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {

                Info("");
            }
        }
        private void Info(string str)
        {
            BLL.cheliangxinxi bll = new Maticsoft.BLL.cheliangxinxi();
            DataSet ds = DBUtility.DbHelperSQL.Query("select a.chewei, case  when Flag='空' then '空闲' else chepai  end as '车牌号'  from dbo.cheweixinxi a left join  dbo.cheliangxinxi b on a.chewei=b.chewei  " + str);
            if (ds != null)
            {

                if (ds.Tables[0].Rows.Count > 0)
                {
                    DataGrid1.DataSource = ds.Tables[0];
                    DataGrid1.DataBind();
                    Label1.Text = "以上数据中共" + ds.Tables[0].Rows.Count + "条";
                }
                else
                {
                    DataGrid1.DataSource = null;
                    DataGrid1.DataBind();
                    Label1.Text = "以上数据中共0条";
                }
            }
        }
        protected void Button1_Click(object sender, EventArgs e)
        {
            string str = " where 1=1";
            if (this.TextBox1.Text != "")
            {
                str += " and a.chewei='" + this.TextBox1.Text + "'";
            }

            Info(str);
        }
    }
}

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。