Exemplo n.º 1
0
        private void EliminarPresentacion()
        {
            CLS_Presentacion Clase = new CLS_Presentacion();

            Clase.Id_Presentacion = txtId.Text.Trim();
            Clase.Usuario         = Id_Usuario;
            if (check_Activo.Checked)
            {
                Clase.Activo = "1";
            }
            else
            {
                Clase.Activo = "0";
            }
            Clase.MtdEliminarPresentacion();
            if (Clase.Exito)
            {
                if (check_Activo.Checked)
                {
                    CargarPresentacion("0");
                }
                else
                {
                    CargarPresentacion("1");
                }

                XtraMessageBox.Show("Se ha Inhabilitado la presentación con exito");
                LimpiarCampos();
            }
            else
            {
                XtraMessageBox.Show(Clase.Mensaje);
            }
        }
Exemplo n.º 2
0
        private void InsertarPresentacion()
        {
            CLS_Presentacion Clase = new CLS_Presentacion();

            Clase.Id_Presentacion     = txtId.Text.Trim();
            Clase.Nombre_Presentacion = txtNombre.Text.Trim();
            Clase.Id_TipoAplicacion   = text_Tipo.Tag.ToString().Trim();
            Clase.Id_Unidad           = glue_Unidad.EditValue.ToString();
            Clase.Usuario             = Id_Usuario;

            if (glue_Empresa.EditValue != null)
            {
                Clase.c_codigo_eps = glue_Empresa.EditValue.ToString();
                Clase.MtdInsertarPresentacion();

                if (Clase.Exito)
                {
                    CargarPresentacion("1");
                    XtraMessageBox.Show("Se ha Insertado el registro con exito");
                    LimpiarCampos();
                }
                else
                {
                    XtraMessageBox.Show(Clase.Mensaje);
                }
            }
        }
Exemplo n.º 3
0
        private void CargarPresentacion(string Activo)
        {
            dtgPresentacion.DataSource = null;
            CLS_Presentacion Clase = new CLS_Presentacion();

            Clase.Activo            = Activo;
            Clase.Id_TipoAplicacion = IdTipo;

            if (glue_Empresa.EditValue != null)
            {
                Clase.c_codigo_eps = glue_Empresa.EditValue.ToString();
                Clase.MtdSeleccionarPresentacion();
                if (Clase.Exito)
                {
                    dtgPresentacion.DataSource = Clase.Datos;
                }
            }
        }