public FormCafeteira() { InitializeComponent(); CapsulasDeCafe capsula = new CapsulasDeCafe(); dtCapsulas = capsula.ListarCapsulas(); cbxKitSabor.DataSource = dtCapsulas; cbxKitSabor.DisplayMember = "Descrição"; cbxKitSabor.ValueMember = "capsulasID"; }
public FormControleDeEstoque() { InitializeComponent(); dtpValidade.MinDate = DateTime.Now; dtpDataEntrada.MinDate = DateTime.Now; dtpDataSaida.MinDate = DateTime.Now; CapsulasDeCafe capsulas = new CapsulasDeCafe(); DataTable dtCapsulas = capsulas.ListarCapsulas(); cbxCapsulas.DataSource = dtCapsulas; cbxCapsulas.DisplayMember = "Descricao"; cbxCapsulas.ValueMember = "capsulasID"; tbxCapsulaID.Text = cbxCapsulas.SelectedIndex.ToString(); }
public FormKitCapsulas() { InitializeComponent(); KitSabor kitSabor = new KitSabor(); DataTable dtKitSabor = kitSabor.ListarKitSabor(); cbxKitSabor.DataSource = dtKitSabor; cbxKitSabor.DisplayMember = "Descricao"; cbxKitSabor.ValueMember = "KitSaborID"; CapsulasDeCafe capsulas = new CapsulasDeCafe(); DataTable dtCapsulas = capsulas.ListarCapsulas(); cbxTipoDeCapsulas.DataSource = dtCapsulas; cbxTipoDeCapsulas.DisplayMember = "Descricao"; cbxTipoDeCapsulas.ValueMember = "capsulasID"; KitCapsulas kitCapsulas = new KitCapsulas(); DataTable dtKitCapsulas = kitCapsulas.ListarKitCapsulas(); dgvKitCapsulas.DataSource = dtKitCapsulas; }