示例#1
0
文件: frmPrincipal.cs 项目: KMSC999/K
 private void btnCadastrarMed_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["frmCadastroMed"] == null)
     {
         frmCadastroMed = new frmCadastroMed(this);
         frmCadastroMed.Show();
     }
 }
示例#2
0
文件: frmPrincipal.cs 项目: KMSC999/K
 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();
     }
 }