博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C#组合查询小Demo
阅读量:4655 次
发布时间:2019-06-09

本文共 772 字,大约阅读时间需要 2 分钟。

namespace WindowsFormsApplication1{    public partial class Form1 : Form    {        string Sql = "select * from T_AttWorkers";        public Form1()        {            InitializeComponent();            this.InitalList();        }        private void InitalList()        {            this.listBox1.Items.Add("编号");            this.listBox1.Items.Add("姓名");            this.listBox2.Items.Add("等于");            this.listBox2.Items.Add("不等于");            this.textBox1.Text = Sql;        }        private void button1_Click(object sender, EventArgs e)        {            Sql += " where ";            Sql += "WorkerId = ";            Sql += this.comboBox1.Text.Trim();            this.textBox1.Text = Sql;        }    }}

 

转载于:https://www.cnblogs.com/SuperLady/p/5709823.html

你可能感兴趣的文章