public void restablecerCancelar()
        {
            switch (tcFisio.SelectedIndex)
            {
            case 0:
                GeneralC.deshabilitarControlesTabPage(tpInsumos);
                GeneralC.limpiarControles(tpInsumos);
                cancelar();
                enfermeria.idInsumo = ConstanteGeneral.PREDETERMINADO;
                txtCodigo.Clear();
                dtpFecha.Text             = Convert.ToString(GeneralC.obtenerFechaServidor());
                enfermeria.insumoAprovado = false;
                break;

            case 1:
                GeneralC.deshabilitarControlesTabPage(tpNotas);
                GeneralC.limpiarControles(tpNotas);
                enfermeria.idNota = ConstanteGeneral.PREDETERMINADO;
                cancelar();
                txtCodigo.Clear();
                dtpFecha.Text           = Convert.ToString(GeneralC.obtenerFechaServidor());
                enfermeria.notaAprobado = false;
                break;
            }
        }
Beispiel #2
0
        public void buscarInsumos()
        {
            List <string> parametros = new List <string>();

            DataTable tablaParametros    = new DataTable();
            DataTable tablasSeleccionado = new DataTable();

            tablaParametros.Columns.Add("Parametro", Type.GetType("System.Object"));
            tablaParametros.Columns.Add("Valor", Type.GetType("System.Object"));

            //object[] myObjArray = { "@pIdAtencion", idAtencion };
            //object[] myObjArray1 = { "@pFiltro", "" };

            DataView view = new DataView(enfermeria.dtInsumos);

            tablasSeleccionado = view.ToTable(true, new string[] { "id" }).Copy();
            tablasSeleccionado.Rows.RemoveAt(tablasSeleccionado.Rows.Count - 1);
            object[] myObjArray2 = { "@pTblSeleccionados", tablasSeleccionado };

            //tablaParametros.Rows.Add(myObjArray);
            //tablaParametros.Rows.Add(myObjArray1);
            tablaParametros.Rows.Add(myObjArray2);

            GeneralC.buscarDevuelveFila(Sentencias.BUSCAR_INSUMOS_ENFERMERIA,
                                        parametros,
                                        new GeneralC.cargarInfoFila(cargarInsumos),
                                        Mensajes.BUQEDA_INSUMOS, true, null, tablasSeleccionado, tablaParametros);
        }
        void agregarVia()
        {
            try
            {
                List <string> parametros = new List <string>();

                DataTable tablaParametros    = new DataTable();
                DataTable tablasSeleccionado = new DataTable();
                int       idEquivalencia;
                idEquivalencia = (int)dgvOrdenMedicamentos.Rows[dgvOrdenMedicamentos.CurrentCell.RowIndex].Cells["idEquivalencia"].Value;
                tablaParametros.Columns.Add("Parametro", Type.GetType("System.Object"));
                tablaParametros.Columns.Add("Valor", Type.GetType("System.Object"));

                object[] myObjArray = { "@pIdEquivalencia", idEquivalencia };

                tablaParametros.Rows.Add(myObjArray);

                GeneralC.buscarDevuelveFila(Sentencias.ORDEN_CLINICA_BUSCAR_MEDICAMENTOS_VIA,
                                            parametros,
                                            new GeneralC.cargarInfoFila(cargarVia),
                                            Mensajes.BUSQUEDA_VIA,
                                            true,
                                            null,
                                            tablasSeleccionado,
                                            tablaParametros);
            }
            catch (Exception ex)
            {
                Mensajes.mensajeError(ex);
            }
        }
 private void tsbGuardar_Click(object sender, EventArgs e)
 {
     if (dtpMuestra.Value.Date >= dtpResultado.Value.Date)
     {
         Mensajes.mensajeAdvertencia("La fecha de muestra, no puede ser igual o mayor a la fecha de resultado");
     }
     else
     {
         if (Mensajes.preguntaGuardar() == true)
         {
             try {
                 cargarResultadoLab();
                 ResultadoLaboratorioDAL.guardarResultadoLab(resultadoLab);
                 GeneralC.habilitarBotones(ref tstMenuPatron);
                 GeneralC.deshabilitarControles(this);
                 tsbGuardar.Enabled  = false;
                 tsbCancelar.Enabled = false;
                 btnSalir.Enabled    = true;
                 Mensajes.mensajeInformacion(Mensajes.CONFIRMACION_GUARDADO);
             }
             catch (Exception ex)
             {
                 Mensajes.mensajeError(ex);
             }
         }
     }
 }
Beispiel #5
0
 void iniciarlizarForm()
 {
     GeneralC.llenarCombo(Sentencias.CARGARPAIS,
                          Util.Constantes.ConstanteGeneral.VALUEMEMBER,
                          Util.Constantes.ConstanteGeneral.DISPLAYMEMBER,
                          cmbPais);
 }
Beispiel #6
0
        public void buscarDiagnostico()
        {
            List <string> parametros = new List <string>();

            DataTable tablaParametros    = new DataTable();
            DataTable tablasSeleccionado = new DataTable();

            tablaParametros.Columns.Add("Parametro", Type.GetType("System.Object"));
            tablaParametros.Columns.Add("Valor", Type.GetType("System.Object"));

            //object[] myObjArray = { "@pIdAtencion", idAtencion };
            //object[] myObjArray1 = { "@pFiltro", "" };

            DataView view = new DataView(ingreso.dtImpresion);

            tablasSeleccionado = view.ToTable(true, new string[] { "id" }).Copy();
            tablasSeleccionado.Rows.RemoveAt(tablasSeleccionado.Rows.Count - 1);
            object[] myObjArray2 = { "@pTblSeleccionados", tablasSeleccionado };

            //tablaParametros.Rows.Add(myObjArray);
            //tablaParametros.Rows.Add(myObjArray1);
            tablaParametros.Rows.Add(myObjArray2);

            GeneralC.buscarDevuelveFila(Sentencias.GENERAL_BUSCAR_DIAGNOSTICO,
                                        parametros,
                                        new GeneralC.cargarInfoFila(cargarDiagnostico),
                                        Mensajes.BUSQUEDA_PACIENTE, true, null, tablasSeleccionado, tablaParametros);
        }
Beispiel #7
0
        private void tsbGuardar_Click(object sender, EventArgs e)
        {
            objListaPrecio.tblFuente.Filter = string.Empty;
            txtFiltro.ResetText();
            dgvMedicamento.EndEdit();
            dgvMedicamento.CommitEdit(DataGridViewDataErrorContexts.Commit);

            if (validarForm() && MessageBox.Show(Mensajes.GUARDAR_FORM, Mensajes.NOMBRE_SOFT, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
            {
                objListaPrecio.idLista = (txtBCodigo.Text.Equals(String.Empty) ? 0 : int.Parse(txtBCodigo.Text));
                objListaPrecio.nombre  = txtDescripcion.Text;
                objListaPrecio.tablaEquivalencia.AcceptChanges();
                try
                {
                    ListaPrecioEquivalenciaDAL.guardar(objListaPrecio);
                    txtBCodigo.Text = objListaPrecio.idLista.ToString();
                    cargarDetalleLista(int.Parse(txtBCodigo.Text));
                    GeneralC.posGuardar(this, tstMenuPatron, tsbNuevo, tsbBuscar, tstModificar, tsbAnular, null, Mensajes.CONFIRMACION_GUARDADO);
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
        }
Beispiel #8
0
        private void tsbAnular_Click(object sender, EventArgs e)
        {
            if (Mensajes.preguntaAnular())
            {
                try
                {
                    if (HemodialisisDAL.anularHemodialisis(hemodialisis.idHemodialisis, hemodialisis.auditoria))
                    {
                        GeneralC.deshabilitarBotones(ref tstMenuPatron);
                        GeneralC.limpiarControles(this);
                        GeneralC.deshabilitarControles(this);

                        btnSalir.Enabled  = true;
                        tsbBuscar.Enabled = true;
                        tsbNuevo.Enabled  = true;

                        Mensajes.mensajeInformacion(Mensajes.CONFIRMACION_ANULADO);
                    }
                }
                catch (Exception ex)
                {
                    Mensajes.mensajeError(ex);
                }
            }
        }
Beispiel #9
0
 private void tstModificar_Click(object sender, EventArgs e)
 {
     GeneralC.fnModificarForm(this, tstMenuPatron, tsbGuardar, tsbCancelar);
     buscarHCPacienteBtn.Enabled = false;
     dtpAdmision.Enabled         = false;
     deshabilitarControles();
 }
 public void guardarDatos()
 {
     try
     {
         if (validarForm() && MessageBox.Show(Mensajes.GUARDAR_FORM, Mensajes.NOMBRE_SOFT, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             try
             {
                 asignarDatos();
                 medicamento.guardar();
                 GeneralC.posGuardar(this, tstMenuPatron, tsbNuevo, tsbBuscar, tstModificar, tsbAnular, null, Mensajes.CONFIRMACION_GUARDADO);
                 btnSalir.Enabled      = true;
                 btBuscarOrden.Enabled = true;
                 tstImprimir.Enabled   = true;
             }
             catch (Exception ex)
             {
                 MessageBox.Show(ex.Message);
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, Mensajes.NOMBRE_SOFT, MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #11
0
        private void tsbGuardar_Click(object sender, EventArgs e)
        {
            if (validarCampos() == true)
            {
                if (Mensajes.preguntaGuardar())
                {
                    try
                    {
                        crearNuevaHemodialisis();

                        HemodialisisDAL.guardarHemodialisis(hemodialisis);

                        GeneralC.habilitarBotones(ref tstMenuPatron);
                        GeneralC.deshabilitarControles(this);
                        cargarHemodialisisMedicamento();

                        btnSalir.Enabled    = true;
                        tsbGuardar.Enabled  = false;
                        tsbCancelar.Enabled = false;

                        Mensajes.mensajeInformacion(Mensajes.CONFIRMACION_GUARDADO);
                    }
                    catch (Exception ex)
                    {
                        Mensajes.mensajeError(ex);
                    }
                }
            }
        }
 private void tsbCancelar_Click(object sender, EventArgs e)
 {
     GeneralC.fnCancelarForm(this, tstMenuPatron, tsbNuevo, tsbBuscar);
     medicamento.idSolicitud = ConstanteGeneral.PREDETERMINADO;
     btnSalir.Enabled        = true;
     btBuscarOrden.Enabled   = true;
 }
 private void tsbGuardar_Click(object sender, EventArgs e)
 {
     try
     {
         if (validarDatos() == true)
         {
             if (Mensajes.preguntaGuardar())
             {
                 dgvResultadoLaboratorio.EndEdit();
                 objetoSolicitudLabCrear();
                 SolicitudLabDAL.guardarSolicitudLab(solicitudLab);
                 GeneralC.deshabilitarBotones(ref tstMenuPatron);
                 GeneralC.deshabilitarControles(this);
                 tsbNuevo.Enabled    = true;
                 tsbBuscar.Enabled   = true;
                 tstImprimir.Enabled = true;
                 tsbAnular.Enabled   = true;
                 Mensajes.mensajeInformacion(Mensajes.CONFIRMACION_GUARDADO);
             }
         }
     }
     catch (Exception ex) {
         Mensajes.mensajeError(ex);
     }
 }
Beispiel #14
0
 private void IngresoUI_Load(object sender, EventArgs e)
 {
     GeneralC.posCargadoForm(this, tstMenuPatron, tsbNuevo, tsbBuscar);
     establecerGridview();
     btnSalir.Enabled = true;
     GeneralC.llenarCombo(Sentencias.ATENCION_CAUSA_EXTERNA + " " + Util.Constantes.ConstanteGeneral.CAUSA_EXTERNA + "",
                          Util.Constantes.ConstanteGeneral.VALUEMEMBER,
                          Util.Constantes.ConstanteGeneral.DISPLAYMEMBER,
                          cbCausaExterna);
     GeneralC.llenarCombo(Sentencias.ATENCION_INSTITUCION + " " + Util.Constantes.ConstanteGeneral.INSTITUCIÓN + "",
                          Util.Constantes.ConstanteGeneral.VALUEMEMBER,
                          Util.Constantes.ConstanteGeneral.DISPLAYMEMBER,
                          cbInstitucion);
     GeneralC.llenarCombo(Sentencias.ATENCION_CAMA + " " + Util.Constantes.ConstanteGeneral.CAMA + "",
                          Util.Constantes.ConstanteGeneral.VALUEMEMBER,
                          Util.Constantes.ConstanteGeneral.DISPLAYMEMBER,
                          cbCama);
     GeneralC.llenarCombo(Sentencias.GENERAL_ENTORNO_ATENCION,
                          Util.Constantes.ConstanteGeneral.VALUEMEMBER,
                          Util.Constantes.ConstanteGeneral.DISPLAYMEMBER,
                          cbEntorno);
     GeneralC.llenarCombo(Sentencias.GENERAL_AREA_ATENCION,
                          Util.Constantes.ConstanteGeneral.VALUEMEMBER,
                          Util.Constantes.ConstanteGeneral.DISPLAYMEMBER,
                          cbArea);
     GeneralC.llenarCombo(Sentencias.ATENCION_VIA_INGRESO + " " + Util.Constantes.ConstanteGeneral.VIA_INGRESO + "",
                          Util.Constantes.ConstanteGeneral.VALUEMEMBER,
                          Util.Constantes.ConstanteGeneral.DISPLAYMEMBER,
                          cbVia);
 }
Beispiel #15
0
 private void tsbCancelar_Click(object sender, EventArgs e)
 {
     GeneralC.fnCancelarForm(this, tstMenuPatron, tsbNuevo, tsbBuscar);
     paciente.idPaciente = 0;
     btnSalir.Enabled    = true;
     dtpNacimiento.ResetText();
 }
Beispiel #16
0
 private void tsbCancelar_Click(object sender, EventArgs e)
 {
     GeneralC.fnCancelarForm(this, tstMenuPatron, tsbNuevo, tsbBuscar);
     admision.idAdmision = ConstanteGeneral.PREDETERMINADO;
     btnSalir.Enabled    = true;
     dtpAdmision.ResetText();
 }
Beispiel #17
0
        public static void modificarTexto(string nombreColumnaDT,
                                          ref DataGridView dgv,
                                          bool puedeRepetirse,
                                          bool aceptaVacio,
                                          bool permitirCambios)
        {
            string valorNuevo, valorAnterior;
            int    indiceFila, indiceColumna;

            indiceFila    = dgv.CurrentCell.RowIndex;
            indiceColumna = dgv.CurrentCell.ColumnIndex;

            valorAnterior = dgv.Rows[indiceFila].Cells[indiceColumna].Value.ToString();
            dgv.Rows[indiceFila].Cells[indiceColumna].Value = "";
            ((DataTable)dgv.DataSource).AcceptChanges();

            VentanaEntradaDatosUI ventanaEntrada = new VentanaEntradaDatosUI();

            ventanaEntrada.obtenerTexto(valorAnterior);
            ventanaEntrada.obtenerEstado(permitirCambios);
            ventanaEntrada.ShowDialog();
            valorNuevo = ventanaEntrada.mostrarTexto();
            if ((string.IsNullOrEmpty(valorNuevo) && !aceptaVacio) ||
                !puedeRepetirse && GeneralC.valorExiste(nombreColumnaDT, valorNuevo, (DataTable)dgv.DataSource))
            {
                dgv.Rows[indiceFila].Cells[indiceColumna].Value = valorAnterior.ToUpper();
            }
            else if (!string.IsNullOrEmpty(valorNuevo))
            {
                dgv.Rows[indiceFila].Cells[indiceColumna].Value = valorNuevo.ToUpper();
            }
        }
Beispiel #18
0
 private void tsbNuevo_Click(object sender, EventArgs e)
 {
     GeneralC.formNuevo(this, tstMenuPatron, tsbGuardar, tsbCancelar);
     admision.idAdmision = ConstanteGeneral.PREDETERMINADO;
     dtpAdmision.ResetText();
     deshabilitarControles();
 }
Beispiel #19
0
 private void tstImprimir_Click(object sender, EventArgs e)
 {
     if (objListaPrecio.tablaEquivalencia.Rows.Count > 0)
     {
         GeneralC.generarPDF("Lista de Precio" + objListaPrecio.nombre + ".pdf", new string[] { "ID", "NOMBRE", "PRECIO", "VISIBLE" }, objListaPrecio.tablaEquivalencia);
     }
 }
Beispiel #20
0
 private void abrirObservacion()
 {
     GeneralC.abrirVentanaEntradaDatos(ref dgvEstancia,
                                       "Observación",
                                       "dgCodigoCUPSEstancia",
                                       tsBtGuardar.Enabled);
 }
Beispiel #21
0
 private void abrirObservacion()
 {
     GeneralC.abrirVentanaEntradaDatos(ref dgvOrdenOxigeno,
                                       "Observación",
                                       "dgDescripcionOrdenOxigeno",
                                       edicion);
 }
Beispiel #22
0
 private void tsBtModificar_Click(object sender, EventArgs e)
 {
     GeneralC.deshabilitarBotones(ref tstMenu);
     tsBtCancelar.Enabled = true;
     tsBtGuardar.Enabled  = true;
     dgvEstancia.Columns["dgExcluirEstancia"].ReadOnly = false;
 }
Beispiel #23
0
 private bool validarForm()
 {
     if (txtNombre.Text.Equals(""))
     {
         GeneralC.mostrarMensajeInformacio("Debe ingresar el nombre del usuario !", txtNombre);
         return(false);
     }
     else if (txtUsuario.Text.Equals(""))
     {
         GeneralC.mostrarMensajeInformacio("Debe ingresar el usuario !", txtUsuario);
         return(false);
     }
     else if (txtClave.Text.Equals(""))
     {
         GeneralC.mostrarMensajeInformacio("Debe ingresar la clave !", txtClave);
         return(false);
     }
     else if (txtBRol.Text.Equals(""))
     {
         GeneralC.mostrarMensajeInformacio("Debe escojer el rol para el usuario !", txtBRol);
         return(false);
     }
     else
     {
         return(true);
     }
 }
Beispiel #24
0
        public void cargarDatos()
        {
            List <string> paramas = new List <string>();

            paramas.Add(Convert.ToString(idPaciente));
            dtDatos = GeneralC.cargarResultadosSQL(Sentencias.PACIENTE_CARGAR, paramas);
            if (dtDatos.Rows.Count > 0)
            {
                tipoIdentificacion  = Convert.ToString(dtDatos.Rows[0].Field <int>("IdTipoIdentificacion"));
                documentoIndentidad = dtDatos.Rows[0].Field <string>("documento");
                idEps = dtDatos.Rows[0].Field <int>("IdEps");
                idMunicipioExpedicion = Convert.ToString(dtDatos.Rows[0].Field <int>("IdMunicipioExpedicion"));
                idMunicipioNacimiento = Convert.ToString(dtDatos.Rows[0].Field <int>("IdMunicipioNacimiento"));
                idMunicipioResidencia = Convert.ToString(dtDatos.Rows[0].Field <int>("IdMunicipioResidencia"));
                idRegimen             = Convert.ToString(dtDatos.Rows[0].Field <int>("idregimen"));
                idTipoAfiliacion      = Convert.ToString(dtDatos.Rows[0].Field <int>("idtipoafiliacion"));
                idZonaUrbana          = Convert.ToString(dtDatos.Rows[0].Field <int>("idzona"));
                idestrato             = Convert.ToString(dtDatos.Rows[0].Field <int>("idestratosocial"));
                idEstadoCivil         = Convert.ToString(dtDatos.Rows[0].Field <int>("idestadocivil"));
                primeroNombre         = dtDatos.Rows[0].Field <string>("PrimerNombre");
                segundoNombre         = dtDatos.Rows[0].Field <string>("SegundoNombre");
                primerApellido        = dtDatos.Rows[0].Field <string>("primerapellido");
                segundoApellido       = dtDatos.Rows[0].Field <string>("segundoapellido");
                idGenero        = Convert.ToString(dtDatos.Rows[0].Field <int>("idgenero"));
                fechaNacimiento = dtDatos.Rows[0].Field <DateTime>("FechaNacimiento");

                direccionResidencia = dtDatos.Rows[0].Field <string>("Direccion");
                telefono            = dtDatos.Rows[0].Field <string>("Telefono");
                celular             = dtDatos.Rows[0].Field <string>("Celular");
                correo = dtDatos.Rows[0].Field <string>("Correo");
            }
        }
Beispiel #25
0
 private void tsbCancelar_Click(object sender, EventArgs e)
 {
     if (GeneralC.fnCancelarForm(this, tstMenuPatron, tsbNuevo, tsbBuscar) == true)
     {
         btnSalir.Enabled = true;
     }
 }
Beispiel #26
0
        private void tsBtModificar_Click(object sender, EventArgs e)
        {
            switch (tcEnfermeria.SelectedIndex)
            {
            case 0:
                botonesEditar();
                opciones();
                break;

            case 1:
                botonesEditar();
                GeneralC.habilitarControlesTabPage(tpNotas);
                break;

            case 2:
                botonesEditar();
                GeneralC.habilitarControlesTabPage(tpParaclinicos);
                break;

            case 3:
                botonesEditar();
                GeneralC.habilitarControlesTabPage(tpProcedimientos);
                break;

            case 4:
                botonesEditar();
                GeneralC.habilitarControlesTabPage(tpGlucometrias);
                break;
            }
        }
Beispiel #27
0
 private void tsbNuevo_Click(object sender, EventArgs e)
 {
     GeneralC.formNuevo(this, tstMenuPatron, tsbGuardar, tsbCancelar);
     GeneralC.deshabilitarControles(this);
     btBuscarContrato.Enabled = true;
     btnSalir.Enabled         = true;
 }
Beispiel #28
0
 public void cargarPaciente(DataRow fila)
 {
     paciente.idPaciente = fila.Field <int>("idPaciente");
     txtEPS.Text         = fila.Field <string>("eps");
     paciente.cargarUbicaciones();
     paciente.cargarDatos();
     cmbDocumento.SelectedValue = paciente.tipoIdentificacion;
     txtIdentificacion.Text     = Convert.ToString(paciente.documentoIndentidad);
     GeneralC.cargarUbicacionGeografica(paciente.dtUbicacion, paciente.idMunicipioExpedicion, ref cmbPaisDocumento, ref cmbDepartamentoDoc, ref cmbCiudadDocumento);
     GeneralC.cargarUbicacionGeografica(paciente.dtUbicacion, paciente.idMunicipioNacimiento, ref cmbPaisNacimiento, ref cmbDepartamentoNac, ref cmbCiudadNacimiento);
     GeneralC.cargarUbicacionGeografica(paciente.dtUbicacion, paciente.idMunicipioResidencia, ref cmbPaisResidencia, ref cmbDepartamentoRes, ref cmbCiudadResidencia);
     txtPrimerNombre.Text         = paciente.primeroNombre;
     txtSegundoNombre.Text        = paciente.segundoNombre;
     txtPrimerApellido.Text       = paciente.primerApellido;
     txtSegundoApellido.Text      = paciente.segundoApellido;
     cmbSexo.SelectedValue        = paciente.idGenero;
     cmbEstrato.SelectedValue     = paciente.idestrato;
     cmbZona.SelectedValue        = paciente.idZonaUrbana;
     cmbRegimen.SelectedValue     = paciente.idRegimen;
     cmbAfiliacion.SelectedValue  = paciente.idTipoAfiliacion;
     cmbEstadoCivil.SelectedValue = paciente.idEstadoCivil;
     txtDireccion.Text            = paciente.direccionResidencia;
     txtTelefono.Text             = paciente.telefono;
     txtCelular.Text     = paciente.celular;
     txtEmail.Text       = paciente.correo;
     dtpNacimiento.Value = paciente.fechaNacimiento;
     GeneralC.calcularEdad(dtpNacimiento, ref edad);
     txtEdad.Text         = edad;
     tstModificar.Enabled = true;
     tsbAnular.Enabled    = true;
     btnSalir.Enabled     = true;
 }
 private void dgvOrdenMedicamentos_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         GeneralC.deshabilitarColumnas(dgvOrdenMedicamentos);
         if (edicion)
         {
             dgvOrdenMedicamentos.Columns["Dosis"].ReadOnly       = false;
             dgvOrdenMedicamentos.Columns["Horario"].ReadOnly     = false;
             dgvOrdenMedicamentos.Columns["HoraInicial"].ReadOnly = false;
             dgvOrdenMedicamentos.Columns["Suspender"].ReadOnly   = false;
             if (GeneralC.verificarUbicacionCelda(e, dgvOrdenMedicamentos, "quitar") & e.RowIndex < dgvOrdenMedicamentos.Rows.Count - 1)
             {
                 if (Mensajes.preguntaAnular())
                 {
                     dgvOrdenMedicamentos.Rows.RemoveAt(e.RowIndex);
                 }
             }
             else if (GeneralC.verificarUbicacionCelda(e, dgvOrdenMedicamentos, "agregar") & e.RowIndex == dgvOrdenMedicamentos.Rows.Count - 1)
             {
                 agregarMedicamento();
             }
             else if (GeneralC.verificarUbicacionCelda(e, dgvOrdenMedicamentos, "viaAdmin") & e.RowIndex != dgvOrdenMedicamentos.Rows.Count - 1)
             {
                 agregarVia();
             }
         }
     }
 }
        void cargarConfiguracionMedica(DataRow fila)
        {
            configuracionProcedimientoMedico.idConfiguracion = fila.Field <int>("CodigoConfiguracion");
            List <string> listaParametros = new List <string>();

            listaParametros.Add(configuracionProcedimientoMedico.idConfiguracion.ToString());
            DataRow filaResultado = GeneralC.obtenerRegistroCompleto(Sentencias.PRODUCTO_CARGAR, listaParametros);

            if (filaResultado != null)
            {
                configuracionProcedimientoMedico.idItem             = filaResultado.Field <string>("idItem");
                configuracionProcedimientoMedico.descripcionItem    = filaResultado.Field <string>("descripcionItem");
                configuracionProcedimientoMedico.idCliente          = filaResultado.Field <int>("idCliente");
                configuracionProcedimientoMedico.descripcionCliente = filaResultado.Field <string>("descripcionCliente");
                configuracionProcedimientoMedico.moduloHc           = filaResultado.Field <bool>("moduloHc");
                configuracionProcedimientoMedico.moduloFc           = filaResultado.Field <bool>("moduloFc");
                configuracionProcedimientoMedico.noRepetible        = filaResultado.Field <bool>("noRepetible");
                configuracionProcedimientoMedico.paquete            = filaResultado.Field <bool>("paquete");
                configuracionProcedimientoMedico.tipo = filaResultado.Field <string>("tipoItem");

                txtBNombreCliente.Text = filaResultado.Field <string>("nombreCliente");
                //txtBCodigo.Text = configuracionProcedimientoMedico.idConfiguracion.ToString();
                txtBNombreProcedimiento.Text = configuracionProcedimientoMedico.descripcionItem;

                //GeneralC.posBuscar(this, tstMenuPatron, tsbNuevo, tsbBuscar, btnModificar, tsbAnular);
            }
        }