Beispiel #1
0
 private void button3_Click(object sender, EventArgs e)
 {
     this.e = new Entradas();
     this.e.DataEntrada = DateTime.Now;
        Conn.db.Entradas.Add(this.e);
        Conn.db.SaveChanges();
        popularCampos();
        desbloquearForm();
 }
Beispiel #2
0
 private void bloquearForm()
 {
     limparForm();
     tbDescricao.Enabled = false;
     tbNomeProduto.Enabled = false;
     tbQntd.Enabled = false;
     dgvTabela.Enabled = false;
     bAdicionarProduto.Enabled = false;
     bBuscarProduto.Enabled = false;
     bExcluir.Enabled = false;
     p = null;
     e = null;
 }
Beispiel #3
0
 private void button6_Click(object sender, EventArgs e)
 {
     BuscaEntradaForm bef = new BuscaEntradaForm();
     this.e = bef.iniciarForm();
     if (this.e != null)
     {
         popularCampos();
         popularTabela();
         desbloquearForm();
     }
     else
     {
         limparForm();
         bloquearForm();
     }
 }
 private void dgvTabela_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     int id =
         Convert.ToInt32(dgvTabela.Rows[dgvTabela.CurrentRow.Index].Cells[0].Value.ToString());
     var ent = (from en in Conn.db.Entradas
                 where en.idEntradas == id
                 select en).First();
     this.e = ent;
     Dispose();
 }