private void VindicateEquipment_Load(object sender, EventArgs e) { condition = this.Text.Trim(); switch (condition) { case "新建生产设备类别": { label1.Text = "设备类别"; dgvEInfo.DataSource = eLogic.SearchEquipmentKindAll(); break; } case "新建生产设备名称": { label1.Text = "设备名称"; dgvEInfo.DataSource = eLogic.SearchEquipmentNameAll(EkId); break; } case "新建生产设备规格": { label1.Text = "设备规格"; dgvEInfo.DataSource = eLogic.SearchEquipmentModelAll(); break; } } dgvEInfo.Columns["id"].Visible = false; dgvEInfo.Columns["inputDate"].Visible = false; dgvEInfo.Columns["inputMan"].Visible = false; dgvEInfo.Columns["备注"].Visible = false; txtValue.Focus(); }
private void SetKind() { cbxKind.DataSource = eLogic.SearchEquipmentKindAll(); cbxKind.DisplayMember = "设备类别"; cbxKind.ValueMember = "id"; cbxKind.Text = ""; cbxKind.SelectedIndex = -1; }
private void SetKind() { cbxKind.DisplayMember = "设备类别"; cbxKind.ValueMember = "id"; cbxKind.DataSource = eLogic.SearchEquipmentKindAll(); }