示例#1
0
        private void btExcluir_Click(object sender, EventArgs e)
        {
            if (codigo > 0)
            {
                cbProduto.Text        = produtoexcluido;
                txtEstoqueMinimo.Text = estoqueminexcluido;

                DALConexao    cx  = new DALConexao(DadosDaConexao.StringDaConexao);
                BLLMixUnidade bll = new BLLMixUnidade(cx);
                bll.Excluir(codigo);
                this.CarregaDados();
            }
        }
示例#2
0
        private void dgvDados_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                cbProduto.Text        = dgvDados.Rows[e.RowIndex].Cells[5].Value.ToString();
                txtEstoqueMinimo.Text = dgvDados.Rows[e.RowIndex].Cells[10].Value.ToString();


                this.idExcluir = Convert.ToInt32(dgvDados.Rows[e.RowIndex].Cells[0].Value);
                DALConexao    cx  = new DALConexao(DadosDaConexao.StringDaConexao);
                BLLMixUnidade bll = new BLLMixUnidade(cx);
                bll.Excluir(idExcluir);
                this.CarregaDados();
            }
        }