Beispiel #1
0
        private void btnEditar_Click(object sender, EventArgs e)
        {
            Cadastrar.FrmCupom c = new Cadastrar.FrmCupom();
            c.Text            = "Alterar Cupom";
            c.label5.Text     = "Alterar  cupom";
            c.Codigo          = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);
            c.txtDesc.Text    = Convert.ToString(dataGridView1.CurrentRow.Cells[1].Value);
            c.txtCodB.Text    = Convert.ToString(dataGridView1.CurrentRow.Cells[2].Value);
            c.txtValor.Text   = Convert.ToString(dataGridView1.CurrentRow.Cells[3].Value);
            c.mskDataIni.Text = Convert.ToString(dataGridView1.CurrentRow.Cells[4].Value);
            c.mskDatafim.Text = Convert.ToString(dataGridView1.CurrentRow.Cells[5].Value);
            c.button1.Text    = "Alterar";
            c.button1.Click  -= c.button1_Click;
            c.button1.Click  += c.Alterar;

            c.ShowDialog();
            CarregarDadosGrid();
        }
Beispiel #2
0
 private void pictureBox6_Click(object sender, EventArgs e)
 {
     Cadastrar.FrmCupom c = new Cadastrar.FrmCupom();
     c.ShowDialog();
 }