Beispiel #1
0
        public List <Models.GestionCambioResponsable> CatalogoCambioResponsable(Nullable <int> estado, string apellido1, string apellido2, string nombre)
        {
            OpenDbConn();

            DAL.GestionCambioResponsable cProfesional = new DAL.GestionCambioResponsable(cDblib);

            return(cProfesional.CatalogoCambioResponsable(estado, apellido1, apellido2, nombre));
        }
Beispiel #2
0
        public int GestionAsignacion(int idpeticion, int idficefin, int idrespdestino, int idinteresado)
        {
            OpenDbConn();

            try
            {
                DAL.GestionCambioResponsable cCambioResponsable = new DAL.GestionCambioResponsable(cDblib);
                //Estado 4. Impuesto por RRHH
                int idCambioResponsable = cCambioResponsable.GestionAnulacionAsignacion(idpeticion, idficefin, 4, idrespdestino);
                int idOtroResponsable   = cCambioResponsable.CambioEvalprogress(idinteresado, idrespdestino);
                return(idCambioResponsable);
            }
            catch (Exception ex)
            {
                throw new IBException(105, "No se ha podido gestionar la asignación", ex);
            }
        }
Beispiel #3
0
        public int GestionAnulacion(int idpeticion, int idficefin)
        {
            OpenDbConn();

            try
            {
                DAL.GestionCambioResponsable cCambioResponsable = new DAL.GestionCambioResponsable(cDblib);
                //Estado 5. Anulado
                int idCambioResponsable = cCambioResponsable.GestionAnulacionAsignacion(idpeticion, idficefin, 5, null);

                return(idCambioResponsable);
            }
            catch (Exception ex)
            {
                throw new IBException(105, "No se ha podido gestionar la anulación", ex);
            }
        }
Beispiel #4
0
        public void GestionCambioResponsableUPD(Nullable <int> idpeticion, int idficepi_interesado, Nullable <int> idficepidestino, int idficepifin)
        {
            Guid methodOwnerID = new Guid("e02a5adf-afea-44bb-9583-88cef9393b37");

            OpenDbConn();

            if (cDblib.Transaction.ownerID.Equals(new Guid()))
            {
                cDblib.beginTransaction(methodOwnerID);
            }

            try
            {
                DAL.GestionCambioResponsable cCambioResponsable = new DAL.GestionCambioResponsable(cDblib);

                //Estado 4. Impuesto por RRHH
                if (idpeticion != 0)
                {
                    int idCambioResponsable = cCambioResponsable.GestionAnulacionAsignacion(idpeticion, idficepifin, 4, idficepidestino);
                    int idOtroResponsable   = cCambioResponsable.CambioEvalprogress(idficepi_interesado, idficepidestino);
                }

                else
                {
                    int idOtroResponsableSinPeticion = cCambioResponsable.CambioEvalprogress(idficepi_interesado, idficepidestino);
                }


                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(new Guid()))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw new IBException(105, "No se ha podido gestionar el cambio de responsable", ex);
            }
        }