Example #1
0
 private void btnCadastrarMed_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["frmCadastroMed"] == null)
     {
         frmCadastroMed = new frmCadastroMed(this);
         frmCadastroMed.Show();
     }
 }
Example #2
0
 private void btnEditarMed_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["frmCadastroMed"] == null)
     {
         medicamento           = new Medicamento();
         medicamentoController = new MedicamentoController();
         int id = Convert.ToInt32(dgvMedicamentos.SelectedRows[0].Cells[0].Value.ToString());
         medicamento    = medicamentoController.ObterMedicamentoId(id);
         frmCadastroMed = new frmCadastroMed(this, medicamento);
         frmCadastroMed.Show();
     }
 }