//自定义绑定数据 private void requistionDate() { this.dataGridViewSUP.AutoGenerateColumns = false;// 关闭自动创建列 HY_BLL.HY_BomlistBLL hybombll = new HY_BomlistBLL(); string sql = "select * from HY_Supplier order by s_ID desc"; this.dataGridViewSUP.DataSource = hybombll.ExecuteQuery(sql); }
private void d_SKID_TextChanged(object sender, EventArgs e) { if (this.d_SKID.Text != string.Empty) { string skid = this.d_SKID.Text; HY_BLL.HY_BomlistBLL hybombll = new HY_BomlistBLL(); SqlDataReader sdr = hybombll.f_BomlistSelect(skid); while (sdr.Read()) { this.d_CID.Text = sdr["b_CID"].ToString(); this.d_CustomerID.Text = sdr["b_CustomerID"].ToString(); this.d_SPerson.Text = sdr["b_SPerson"].ToString(); this.d_SDate.Text = sdr["b_SDate"].ToString(); this.label1.Text = sdr["b_ModClass"].ToString(); } } }