Ejemplo n.º 1
0
        private void btnAgregar_Click(object sender, EventArgs e)
        {
            EdicionMedicamentos frm = new EdicionMedicamentos();

            frm.ShowDialog();
            CargarMedicamentos();
        }
Ejemplo n.º 2
0
        private void btnModificar_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show(this, "Esta Seguro que quiere modificar este Medicamento", "Advertencia", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK)
            {
                EdicionMedicamentos frm = new EdicionMedicamentos();
                frm.txbIDMedicamento.Text     = dgvMedicamentos.CurrentRow.Cells["idMedicamento"].Value.ToString();
                frm.txbNombreMedicamento.Text = dgvMedicamentos.CurrentRow.Cells["nombre"].Value.ToString();
                frm.txbConcentracion.Text     = dgvMedicamentos.CurrentRow.Cells["concentracion"].Value.ToString();
                frm.txbPresentacion.Text      = dgvMedicamentos.CurrentRow.Cells["presentacion"].Value.ToString();
                frm.txtVia.Text = dgvMedicamentos.CurrentRow.Cells["via"].Value.ToString();

                frm.ShowDialog();
                CargarMedicamentos();
            }
        }