コード例 #1
0
        public FormCafeteira()
        {
            InitializeComponent();
            CapsulasDeCafe capsula = new CapsulasDeCafe();

            dtCapsulas                = capsula.ListarCapsulas();
            cbxKitSabor.DataSource    = dtCapsulas;
            cbxKitSabor.DisplayMember = "Descrição";
            cbxKitSabor.ValueMember   = "capsulasID";
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        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;
        }