Example #1
0
        private void btAdicionar_Click(object sender, EventArgs e)
        {
            FormGerenciaMotor form = new FormGerenciaMotor();

            form.ShowDialog();
            motor.Create(form.M);
            AtualizaDGV();
        }
Example #2
0
 private void btViewMode_Click(object sender, EventArgs e)
 {
     if (dgvAdicionados.CurrentRow != null)
     {
         int key = int.Parse(dgvAdicionados.CurrentRow.Cells[0].Value.ToString());
         FormGerenciaMotor form = new FormGerenciaMotor(motor.Read(key), false);
         form.ShowDialog(this);
     }
     else
     {
         MessageBox.Show("Selecione uma linha para visualizar!", "Ops...", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
Example #3
0
        private void btEditar_Click(object sender, EventArgs e)
        {
            if (dgvPesquisar.CurrentRow != null)
            {
                int key = int.Parse(dgvPesquisar.CurrentRow.Cells[0].Value.ToString());
                FormGerenciaMotor form = new FormGerenciaMotor(motor.Read(key), true);
                form.ShowDialog(this);
                motor.Update(form.M);
            }
            else
            {
                MessageBox.Show("Selecione uma linha para Editar!", "Ops...", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            AtualizaDGV();
        }
Example #4
0
        private void btAdicionar_Click(object sender, EventArgs e)
        {
            FormGerenciaMotor form = new FormGerenciaMotor();

            form.ShowDialog();
        }