private void EmployeeManageForm_Load_1(object sender, EventArgs e) { string name = this.textBox1.Text.ToString(); string sql = "select u.UserNo,o.OrderNo,u.UserName,o.OrderNum,o.OrderDate from UserInfo u left join OrderInfo o on u.UserNo=o.UserNo"; this.dataGridView1.DataSource = DBhelper.Cha(sql).Tables[0]; }
private void year1_Load(object sender, EventArgs e) { string sql = "select * from year"; // 将数据库的year表绑定到“chart1-横向柱状统计表” 中 chart1.DataSource = DBhelper.Cha(sql).Tables[0]; }
private void btcar_Click(object sender, EventArgs e) { string cha = txtcar.Text.ToString().Trim(); string slq = string.Format("select * from CarInfo where Cancel= 1 and CarBrand like '%{0}%'", cha); dvcar.DataSource = DBhelper.Cha(slq).Tables[0]; }
private void PurchaseInfo_Load(object sender, EventArgs e) { //编写sql语句 string sql = "select PurchaseNo,ProductionID,InPrice,InNum,UserNo,CarNo,Cancel from PurchaseInfo where Cancel=1"; //导入 dvManufacturer dvManufacturer.DataSource = DBhelper.Cha(sql).Tables[0]; }
private void ProductionInfo_form_Load(object sender, EventArgs e) { //编写sql语句 string sql = "select * from ProductionInfo where Cancel=1"; //导入DataGridView dvProductionInfo.DataSource = DBhelper.Cha(sql).Tables[0]; }
private void year2cs_Load(object sender, EventArgs e) { //编写sql语句 string sql = "select * from year"; //横向圆盘统计图 // 将数据库的year表绑定到“chart1-横向柱状统计表” 中 chart2.DataSource = DBhelper.Cha(sql).Tables[0]; }
private void btsupply_Click(object sender, EventArgs e) { //获取txtsupply中的内容 string x = this.txtsupply.Text.ToString().Trim(); //编写sql语句 string sql = string.Format("select PurchaseNo,ProductionID,InPrice,InNum,UserNo,CarNo,Cancel from PurchaseInfo where CarNo like '%{0}%'", x); //导入 dvManufacturer dvManufacturer.DataSource = DBhelper.Cha(sql).Tables[0]; }
private void btsupply_Click(object sender, EventArgs e) { //获取文本框中的值 string cha = this.txtcha.Text.ToString().Trim(); //编写sql语句 string sql = string.Format("select * from ProductionInfo where Cancel=1 and ProductionBrand like '%{0}%'", cha); //导入DataGridView dvProductionInfo.DataSource = DBhelper.Cha(sql).Tables[0]; }
private void EmployeeManageForm_Load(object sender, EventArgs e) { string sql = "select u.UserNo JobNumder,o.CarNo VehicleNumber,u.UserName UserName,o.OrderDate SaleDate from UserInfo u left join OrderInfo o on u.UserNo=o.UserNo"; this.dataGridView1.DataSource = DBhelper.Cha(sql).Tables[0]; }
private void Car_Load(object sender, EventArgs e) { string slq = string.Format("select * from CarInfo where Cancel= 1"); dvcar.DataSource = DBhelper.Cha(slq).Tables[0]; }