private void SetUnit() { cbxTUnit.DataSource = tLogic.FrmTransportSearchAll("", 0); cbxTUnit.DisplayMember = "单位名称"; cbxTUnit.ValueMember = "id"; cbxTUnit.SelectedIndex = -1; }
/* * 方法名称: SetDataGridView() * 方法功能描述:为DataGridView赋值; * * 创建人:冯雪 * 创建时间:2009-03-06 * * 修改人: * 修改时间: * 修改内容: * */ private void SetDataGridView() { dgvTranspor.DataSource = transportLogic.FrmTransportSearchAll("", 0); dgvTranspor.Columns["id"].Visible = false; dgvTranspor.Columns["inputDate"].Visible = false; dgvTranspor.Columns["inputMan"].Visible = false; //dgvTranspor.Rows[0].Selected = false; // 为负责人、邮编赋值; //cbxprincipal.DataSource = transportLogic.InitComboBox(1); //cbxprincipal.DisplayMember = "负责人"; //cbxprincipal.SelectedIndex = -1; //cbxPostCode.DataSource = transportLogic.InitComboBox(2); //cbxPostCode.DisplayMember = "邮编"; //cbxPostCode.SelectedIndex = -1; }
private void SetUnit() { TransportLogic tLogic = new TransportLogic(); cbx_tname.DataSource = tLogic.FrmTransportSearchAll("", 0); cbx_tname.DisplayMember = "单位名称"; cbx_tname.ValueMember = "id"; cbx_tname.SelectedIndex = -1; }