Exemplo n.º 1
0
        private void button2_Click(object sender, EventArgs e)
        {
            string sql = "select * from addaccount where 账号='" + textBox1.Text + "'";

            DBOperation.BindDB(dataGridView1, sql);
            DBOperation.GetDataTable(sql);
        }
Exemplo n.º 2
0
        private void button3_Click(object sender, EventArgs e)
        {
            string sql = "select * from addaccount";

            DBOperation.BindDB(dataGridView1, sql);
            DBOperation.GetDataTable(sql);
        }
Exemplo n.º 3
0
        //static string constr = @"Data Source=DESKTOP-KDKK51O\SQLEXPRESS;Initial catalog=student;integrated Security=True";

        private void AccountManage_Load(object sender, EventArgs e)
        {
            string sql = "select * from addaccount";

            DBOperation.BindDB(dataGridView1, sql);
            DBOperation.GetDataTable(sql);
            comboBox1.Text = "请选择";
        }
Exemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            string sql = "";

            if (xb.Equals("借出信息"))
            {
                sql = "select * from income";
            }
            else
            {
                sql = "select * from incomein";
            }
            DBOperation.BindDB(dataGridView1, sql);
            DBOperation.GetDataTable(sql);
        }
Exemplo n.º 5
0
        private void button2_Click(object sender, EventArgs e)
        {
            if (xb.Equals("借出信息"))
            {
                if (comboBox1.Text.Equals("按金额"))
                {
                    string sql = "select * from income where 借出金额='" + textBox1.Text + "'";

                    DBOperation.BindDB(dataGridView1, sql);
                    DBOperation.GetDataTable(sql);
                }
                else
                {
                    string sql = "select * from income where 是否回收='" + textBox1.Text + "'";

                    DBOperation.BindDB(dataGridView1, sql);
                    DBOperation.GetDataTable(sql);
                }
            }
            else
            {
                if (comboBox1.Text.Equals("按金额"))
                {
                    string sql = "select * from incomein where 借入金额='" + textBox1.Text + "'";

                    DBOperation.BindDB(dataGridView1, sql);
                    DBOperation.GetDataTable(sql);
                }
                else
                {
                    string sql = "select * from incomein where 是否回收='" + textBox1.Text + "'";

                    DBOperation.BindDB(dataGridView1, sql);
                    DBOperation.GetDataTable(sql);
                }
            }
        }