public void BorrarAcciones(List <Models.Accion> lista)
        {
            Guid methodOwnerID = new Guid("74122BF0-F33B-48BE-B665-9C1A70AF00BC");

            OpenDbConn();

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

            try
            {
                DAL.Accion cAccion = new DAL.Accion(cDblib);
                foreach (Models.Accion oAccion in lista)
                {
                    cAccion.Delete(oAccion.t383_idaccion);
                }
                //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 ex;
            }
        }
示例#2
0
        public void BorrarAsuntos(List <Models.AsuntoCat> lista)
        {
            Guid methodOwnerID = new Guid("82F2A026-5ACD-4755-B72F-20E87BEC7B68");

            OpenDbConn();

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

            try
            {
                DAL.AsuntoT cAsunto = new DAL.AsuntoT(cDblib);
                foreach (Models.AsuntoCat asunto in lista)
                {
                    cAsunto.Borrar(asunto.idAsunto);
                }
                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }
            }
            catch (Exception ex)
            {//rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
        internal int Insert(Models.TareaPendientePreventa oTareaPendientePreventa)
        {
            Guid methodOwnerID = new Guid("7251e550-0f7f-4000-a3f6-4648ea4d9e16");

            OpenDbConn();

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

            try{
                DAL.TareaPendientePreventa cTareaPendientePreventa = new DAL.TareaPendientePreventa(cDblib);

                int idTareaPendientePreventa = cTareaPendientePreventa.Insert(oTareaPendientePreventa);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idTareaPendientePreventa);
            }
            catch (Exception ex) {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
        internal int Insert(Models.TipoDocumento oTipoDocumento)
        {
            Guid methodOwnerID = new Guid("d5c7e134-54e7-45dc-8725-5f9030f61108");

            OpenDbConn();

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

            try{
                DAL.TipoDocumento cTipoDocumento = new DAL.TipoDocumento(cDblib);

                int idTipoDocumento = cTipoDocumento.Insert(oTipoDocumento);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idTipoDocumento);
            }
            catch (Exception ex) {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
示例#5
0
        public void BorrarAcciones(List <Models.AccionT> lista)
        {
            Guid methodOwnerID = new Guid("3BC30F92-578A-4551-807F-74019A4DE66F");

            OpenDbConn();

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

            try
            {
                DAL.AccionT cAccion = new DAL.AccionT(cDblib);
                foreach (Models.AccionT oAccion in lista)
                {
                    cAccion.Delete(oAccion.T601_idaccion);
                }
                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }
            }
            catch (Exception ex)
            {//rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
示例#6
0
        internal int Insert(Models.ConceptoTareaPendiente oConceptoTareaPendiente)
        {
            Guid methodOwnerID = new Guid("7fad1727-093b-4828-bada-8354318615fc");

            OpenDbConn();

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

            try{
                DAL.ConceptoTareaPendiente cConceptoTareaPendiente = new DAL.ConceptoTareaPendiente(cDblib);

                int idConceptoTareaPendiente = cConceptoTareaPendiente.Insert(oConceptoTareaPendiente);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idConceptoTareaPendiente);
            }
            catch (Exception ex) {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
        public void BorrarAsuntos(List <Models.AsuntoCat> lista)
        {
            Guid methodOwnerID = new Guid("E9A166FC-09E5-4F26-B30C-1E4009A64EBA");

            OpenDbConn();

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

            try
            {
                DAL.AsuntoPT cAsunto = new DAL.AsuntoPT(cDblib);
                foreach (Models.AsuntoCat asunto in lista)
                {
                    cAsunto.Borrar(asunto.idAsunto);
                }
                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }
            }
            catch (Exception ex)
            {//rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
示例#8
0
        public int grabarArea(Models.AreaPreventa oAreaPreventa, List <Models.FiguraAreaPreventa> lstFigurasArea)
        {
            Guid methodOwnerID  = new Guid("532e7c11-3ff0-4640-b531-d9a267300e9b");
            int  idAreaPreventa = 0;
            int  nFiguras       = 0;

            OpenDbConn();

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

            try
            {
                DAL.AreaPreventa cAreaPreventa = new DAL.AreaPreventa(cDblib);

                DataTable dtFiguras = new DataTable();
                dtFiguras.Columns.Add(new DataColumn("col_1", typeof(int)));
                dtFiguras.Columns.Add(new DataColumn("col_2", typeof(char)));


                //Recorremos la lista
                foreach (Models.FiguraAreaPreventa oFiguras in lstFigurasArea)
                {
                    DataRow row = dtFiguras.NewRow();
                    row["col_1"] = oFiguras.t001_idficepi;
                    row["col_2"] = oFiguras.ta202_figura;

                    dtFiguras.Rows.Add(row);
                }

                idAreaPreventa = cAreaPreventa.grabarArea(oAreaPreventa);

                nFiguras = cAreaPreventa.grabarFigurasArea(oAreaPreventa.ta200_idareapreventa, dtFiguras);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idAreaPreventa);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
        internal List <Models.TipoTareaPreventa> GrabarListaTareas(List <Models.TipoTareaPreventa> lstTiposTareaPreventa)
        {
            Guid methodOwnerID = new Guid("f672bc44-f3fc-4102-8b50-2d3452b19198");

            OpenDbConn();

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

            try

            {
                //Datatable de tipos de tareas preventa
                DataTable dtTipoTareas = new DataTable();
                dtTipoTareas.Columns.Add(new DataColumn("ta219_idtipotareapreventa", typeof(int)));
                dtTipoTareas.Columns.Add(new DataColumn("ta219_denominacion", typeof(string)));
                dtTipoTareas.Columns.Add(new DataColumn("ta219_orden", typeof(int)));
                dtTipoTareas.Columns.Add(new DataColumn("ta219_activa", typeof(bool)));

                foreach (Models.TipoTareaPreventa oTipoTarea in lstTiposTareaPreventa)
                {
                    DataRow rowAccion = dtTipoTareas.NewRow();
                    rowAccion["ta219_idtipotareapreventa"] = oTipoTarea.ta219_idtipotareapreventa;
                    rowAccion["ta219_denominacion"]        = oTipoTarea.ta219_denominacion;
                    rowAccion["ta219_orden"]  = oTipoTarea.ta219_orden;
                    rowAccion["ta219_activa"] = oTipoTarea.ta219_estadoactiva;
                    dtTipoTareas.Rows.Add(rowAccion);
                }


                DAL.TipoTareaPreventa cTipoTareaPreventa = new DAL.TipoTareaPreventa(cDblib);

                List <Models.TipoTareaPreventa> lstTipoTareaPreventa = cTipoTareaPreventa.GrabarTareas(dtTipoTareas);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(lstTiposTareaPreventa);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(new Guid()))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
        public int grabarSubArea(Models.SubareaPreventa oSubAreaPreventa, List <Models.FiguraSubareaPreventa> lstFigurasArea)
        {
            Guid methodOwnerID     = new Guid("91fe2269-b98f-4376-bcdb-06a3e750c744");
            int  idSubAreaPreventa = 0;
            int  nFiguras          = 0;

            OpenDbConn();

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

            try
            {
                DAL.SubareaPreventa cSubAreaPreventa = new DAL.SubareaPreventa(cDblib);

                DataTable dtFiguras = new DataTable();
                dtFiguras.Columns.Add(new DataColumn("col_1", typeof(int)));
                dtFiguras.Columns.Add(new DataColumn("col_2", typeof(char)));


                //Recorremos la lista
                foreach (Models.FiguraSubareaPreventa oFiguras in lstFigurasArea)
                {
                    DataRow row = dtFiguras.NewRow();
                    row["col_1"] = oFiguras.t001_idficepi;
                    row["col_2"] = oFiguras.ta203_figura;

                    dtFiguras.Rows.Add(row);
                }

                idSubAreaPreventa = cSubAreaPreventa.grabarSubArea(oSubAreaPreventa);

                nFiguras = cSubAreaPreventa.grabarFigurasSubArea(oSubAreaPreventa.ta201_idsubareapreventa, dtFiguras);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idSubAreaPreventa);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
        public int Update(int t001_idficepi)
        {
            Guid methodOwnerID = new Guid("766e8f17-07e4-474c-8502-972905aa1d1c");

            OpenDbConn();

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

            try
            {
                DAL.MIEQUIPO miequipo = new DAL.MIEQUIPO(cDblib);
                int          result   = miequipo.Update(t001_idficepi);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(result);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(new Guid()))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw new IBException(104, "Ocurrió un error al intentar confirmar el equipo en base de datos.", ex);
            }
        }
        public void BorrarAsuntos(List <Models.AsuntoCat> lista)
        {
            Guid methodOwnerID = new Guid("24F47F9E-3364-41FF-A033-51DCB288D780");

            OpenDbConn();

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

            try
            {
                DAL.AsuntoCat cAsunto = new DAL.AsuntoCat(cDblib);
                foreach (Models.AsuntoCat asunto in lista)
                {
                    cAsunto.Borrar(asunto.idAsunto);
                }
                //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 ex;
            }
        }
        /// <summary>
        /// Operaciones CRUD
        /// </summary>
        /// <param name="oCSV"></param>
        public void MantenerCatalogo(string tabla, List <IB.Progress.Models.VisionesAjenasArbol> oVisualizadores)
        {
            Guid methodOwnerID = new Guid("e93c88d6-8698-4cdb-a28d-416fe3d01648");

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

            try
            {
                DAL.VisionesAjenasArbol cArbol  = new DAL.VisionesAjenasArbol(cDblib);
                int       idficepi_visualizador = 0;
                DataTable dtVisualizados        = new DataTable();
                dtVisualizados.Columns.Add(new DataColumn("visualizado", typeof(int)));
                dtVisualizados.Columns.Add(new DataColumn("accion", typeof(char)));

                //Recorremos la lista
                foreach (IB.Progress.Models.VisionesAjenasArbol oVisualizador in oVisualizadores)
                {
                    DataRow row = dtVisualizados.NewRow();
                    row["visualizado"] = oVisualizador.Idficepi_visualizado;
                    if (oVisualizador.T949_accion != null)
                    {
                        row["accion"] = oVisualizador.T949_accion;
                    }

                    dtVisualizados.Rows.Add(row);

                    idficepi_visualizador = oVisualizador.Idficepi_visualizador;
                }
                //HACEMOS INSERT
                cArbol.Insert(tabla, idficepi_visualizador, dtVisualizados);

                //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(106, "Ocurrió un error al intentar grabar a los visualizadores.", ex);
            }
        }
示例#14
0
        //public int Delete(Int32 ta201_idsubareapreventa, Int32 t001_idficepi)
        //{
        //    Guid methodOwnerID = new Guid("b6a8a7d3-00cd-461c-8224-0e14e1671b67");

        //    OpenDbConn();

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

        //    try
        //    {

        //        DAL.FiguraSubareaPreventa cFiguraSubareaPreventa = new DAL.FiguraSubareaPreventa(cDblib);

        //        int result = cFiguraSubareaPreventa.Delete(ta201_idsubareapreventa, t001_idficepi);

        //        //Finalizar transacción
        //        if (cDblib.Transaction.ownerID.Equals(methodOwnerID)) cDblib.commitTransaction(methodOwnerID);

        //        return result;
        //    }
        //    catch (Exception ex)
        //    {
        //        //rollback
        //        if (cDblib.Transaction.ownerID.Equals(new Guid())) cDblib.rollbackTransaction(methodOwnerID);

        //        throw ex;
        //    }
        //}
        //public int DeleteFigura(Int32 ta201_idsubareapreventa, Int32 t001_idficepi, String ta203_figura)
        //{
        //    Guid methodOwnerID = new Guid("85eaefff-ed87-41b2-bbbc-c81469b10758");

        //    OpenDbConn();

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

        //    try
        //    {

        //        DAL.FiguraSubareaPreventa cFiguraSubareaPreventa = new DAL.FiguraSubareaPreventa(cDblib);

        //        int result = cFiguraSubareaPreventa.DeleteFigura(ta201_idsubareapreventa, t001_idficepi, ta203_figura);

        //        //Finalizar transacción
        //        if (cDblib.Transaction.ownerID.Equals(methodOwnerID)) cDblib.commitTransaction(methodOwnerID);

        //        return result;
        //    }
        //    catch (Exception ex)
        //    {
        //        //rollback
        //        if (cDblib.Transaction.ownerID.Equals(new Guid())) cDblib.rollbackTransaction(methodOwnerID);

        //        throw ex;
        //    }
        //}
        public void ActualizarFiguras(Int32 ta201_idsubareapreventa, List <IB.SUPER.ADM.SIC.Models.FiguraSubareaPreventa> lstFiguras)
        {
            Guid methodOwnerID = new Guid("0F1686CA-A369-4850-B591-9F57F5129E34");

            OpenDbConn();
            if (cDblib.Transaction.ownerID.Equals(new Guid()))
            {
                cDblib.beginTransaction(methodOwnerID);
            }
            DataTable dtFiguras = new DataTable();

            try
            {
                DAL.FiguraSubareaPreventa cFiguraSubareaPreventa = new DAL.FiguraSubareaPreventa(cDblib);

                #region Creo el datatable para pasarselo al proc almacenado
                //dtFiguras.Columns.Add(new DataColumn("item", typeof(int)));
                dtFiguras.Columns.Add(new DataColumn("t001_idficepi", typeof(int)));
                dtFiguras.Columns.Add(new DataColumn("figura", typeof(char)));
                foreach (IB.SUPER.ADM.SIC.Models.FiguraSubareaPreventa oFigura in lstFiguras)
                {
                    DataRow row = dtFiguras.NewRow();
                    //row["item"] = oFigura.ta201_idsubareapreventa;
                    row["t001_idficepi"] = oFigura.t001_idficepi;
                    row["figura"]        = oFigura.ta203_figura;

                    dtFiguras.Rows.Add(row);
                }
                #endregion

                cFiguraSubareaPreventa.ActualizarFiguras(ta201_idsubareapreventa, dtFiguras);

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

                throw ex;
            }
            finally
            {
                dtFiguras.Dispose();
            }
        }
        public string Insert(IB.Progress.Models.TRAMITACIONCAMBIOROL_INS oTRAMITACIONCAMBIOROL)
        {
            Guid methodOwnerID = new Guid("fcdd9d71-5b97-4b47-b221-0287c3d0b499");

            OpenDbConn();

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

            try{
                IB.Progress.DAL.TramitacionCambioRol cTRAMITACIONCAMBIOROL = new IB.Progress.DAL.TramitacionCambioRol(cDblib);

                string idTRAMITACIONCAMBIOROL = cTRAMITACIONCAMBIOROL.Insert(oTRAMITACIONCAMBIOROL);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idTRAMITACIONCAMBIOROL);
            }
            catch (Exception ex) {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(new Guid()))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
示例#16
0
        public void UpdateColectivoForzado(List <IB.Progress.Models.Colectivo> lista)
        {
            Guid methodOwnerID = new Guid("ba344d53-f0ab-48cd-a12f-fcb276b6debe");

            OpenDbConn();

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

            try
            {
                DAL.ColectivoFormulario cColectivo = new DAL.ColectivoFormulario(cDblib);

                DataTable dtColectivo = new DataTable();
                dtColectivo.Columns.Add(new DataColumn("col_1", typeof(int)));
                dtColectivo.Columns.Add(new DataColumn("col_2", typeof(int)));
                dtColectivo.Columns.Add(new DataColumn("col_3", typeof(int)));

                //Recorremos la lista
                foreach (IB.Progress.Models.Colectivo oColectivo in lista)
                {
                    DataRow row = dtColectivo.NewRow();
                    row["col_1"] = oColectivo.t001_idficepi;
                    row["col_2"] = oColectivo.t941_idcolectivo;
                    row["col_3"] = DBNull.Value;

                    dtColectivo.Rows.Add(row);
                }
                //HACEMOS INSERT
                cColectivo.UpdateColectivoForzado(dtColectivo);


                //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(103, "Ocurrió un error al actualizar pantalla mantenimiento de colectivo forzado.", ex);
            }
        }
示例#17
0
        public int Insert(Models.SolicitudPreventa oSolicitudPreventa)
        {
            Guid methodOwnerID = new Guid("8fbbab16-8b11-41ea-b4bc-bef98a9e13bd");

            OpenDbConn();

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

            try
            {
                DAL.SolicitudPreventa cSolicitudPreventa = new DAL.SolicitudPreventa(cDblib);

                oSolicitudPreventa.t001_idficepi_promotor = int.Parse(HttpContext.Current.Session["IDFICEPI_PC_ACTUAL"].ToString());

                int idSolicitudPreventa = cSolicitudPreventa.Insert(oSolicitudPreventa);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idSolicitudPreventa);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
示例#18
0
        public int Insert(Models.SubareaPreventa oSubareaPreventa)
        {
            Guid methodOwnerID = new Guid("f70cdb21-9a9c-47a4-8046-4a0725a74b3d");

            OpenDbConn();

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

            try
            {
                DAL.SubareaPreventa cSubareaPreventa = new DAL.SubareaPreventa(cDblib);

                int idSubareaPreventa = cSubareaPreventa.Insert(oSubareaPreventa);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idSubareaPreventa);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
        public int UpdateFecha(DateTime fecha)
        {
            Guid methodOwnerID = new Guid("5b8d8077-8746-4fbd-ae74-eb7f5647b5f7");

            OpenDbConn();

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

            try
            {
                DAL.VALORACIONESPROGRESS cVALORACIONESPROGRESS = new DAL.VALORACIONESPROGRESS(cDblib);

                int result = cVALORACIONESPROGRESS.UpdateFecha(fecha);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(result);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(new Guid()))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw new IBException(106, "Ocurrió un error al intentar actualizar la fecha.", ex);
            }
        }
        public int Insert(Models.FiguraAreaPreventa oFiguraAreaPreventa)
        {
            Guid methodOwnerID = new Guid("f7969532-eb41-40a0-98b2-15dfb5c2d980");

            OpenDbConn();

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

            try
            {
                DAL.FiguraAreaPreventa cFiguraAreaPreventa = new DAL.FiguraAreaPreventa(cDblib);

                int idFiguraAreaPreventa = cFiguraAreaPreventa.Insert(oFiguraAreaPreventa);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idFiguraAreaPreventa);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
示例#21
0
        public int RechazarIncorporacion(List <string> listapeticiones, string MotivoRechazo)
        {
            Guid methodOwnerID = new Guid("40ac43e3-e371-4008-b51e-0c5518db7cbd");

            OpenDbConn();

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

            try
            {
                DAL.GestionarIncorporaciones cGestionarIncorporaciones = new DAL.GestionarIncorporaciones(cDblib);

                int idGestionarIncorporaciones = cGestionarIncorporaciones.RechazarIncorporacion(string.Join(",", listapeticiones), MotivoRechazo);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idGestionarIncorporaciones);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(new Guid()))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw new IBException(119, "Ocurrió un error al intentar rechazar la incorporación del profesional.", ex);
            }
        }
        public int Insert(Models.SALDOSSAP oSALDOSSAP)
        {
            Guid methodOwnerID = new Guid("00e023c4-b023-40c9-a0a9-35babef8c832");

            OpenDbConn();

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

            try
            {
                DAL.SALDOSSAP cSALDOSSAP = new DAL.SALDOSSAP(cDblib);

                int idSALDOSSAP = cSALDOSSAP.Insert(oSALDOSSAP);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idSALDOSSAP);
            }
            catch (Exception ex)
            {
                //rollback
                //if (cDblib.Transaction.ownerID.Equals(new Guid())) cDblib.rollbackTransaction(methodOwnerID);
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }
                throw ex;
            }
        }
        internal int Insert(Models.UnidadPreventa oUnidadPreventa)
        {
            Guid methodOwnerID = new Guid("A680B03B-7A19-40D9-B4DC-3FEFDBCBB960");

            OpenDbConn();

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

            try
            {
                DAL.UnidadPreventa cUnidadPreventa = new DAL.UnidadPreventa(cDblib);

                int idUnidadPreventa = cUnidadPreventa.Insert(oUnidadPreventa);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idUnidadPreventa);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
        public int Insert(Models.MOTIVOOCFA oMOTIVOOCFA)
        {
            Guid methodOwnerID = new Guid("b70fc40f-b61f-408b-94d1-fa4a138331dc");

            OpenDbConn();

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

            try
            {
                DAL.MOTIVOOCFA cMOTIVOOCFA = new DAL.MOTIVOOCFA(cDblib);

                int idMOTIVOOCFA = cMOTIVOOCFA.Insert(oMOTIVOOCFA);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idMOTIVOOCFA);
            }
            catch (Exception ex)
            {
                //rollback
                //if (cDblib.Transaction.ownerID.Equals(new Guid())) cDblib.rollbackTransaction(methodOwnerID);
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }
                throw ex;
            }
        }
        internal int Insert(enumOrigenEdicion enumProp, Models.Documento oDocumento)
        {
            Guid methodOwnerID = new Guid("548b91d6-0710-4cde-9f7a-ec19de863862");

            OpenDbConn();

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

            try
            {
                DAL.Documento cDocumento = new DAL.Documento(cDblib);

                int idDocumento = cDocumento.Insert(enumProp, oDocumento);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idDocumento);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
示例#26
0
        public int Insert(Models.PRIOALERTAS oPRIOALERTAS)
        {
            Guid methodOwnerID = new Guid("afb9ebac-943a-4752-a77c-b7d83c7eee80");

            OpenDbConn();

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

            try
            {
                DAL.PRIOALERTAS cPRIOALERTAS = new DAL.PRIOALERTAS(cDblib);

                int idPRIOALERTAS = cPRIOALERTAS.Insert(oPRIOALERTAS);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idPRIOALERTAS);
            }
            catch (Exception ex)
            {
                //rollback
                //if (cDblib.Transaction.ownerID.Equals(new Guid())) cDblib.rollbackTransaction(methodOwnerID);
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }
                throw ex;
            }
        }
        public int DeleteRango(int t314_idusuario, DateTime dDesde, DateTime dHasta)
        {
            Guid methodOwnerID = new Guid("0ddf5a5b-b78d-42fa-b054-3b051f8c127d");

            OpenDbConn();

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

            try
            {
                DAL.ConsumoIAP cConsumoIAP = new DAL.ConsumoIAP(cDblib);

                int result = cConsumoIAP.DeleteRango(t314_idusuario, dDesde, dHasta);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(result);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
示例#28
0
        internal int Insert(Models.EjecutorTareaPreventa oEjecutorTareaPreventa)
        {
            Guid methodOwnerID = new Guid("521885ca-75bf-471c-af33-813d4b5dc803");

            OpenDbConn();

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

            try
            {
                DAL.EjecutorTareaPreventa cEjecutorTareaPreventa = new DAL.EjecutorTareaPreventa(cDblib);

                int idEjecutorTareaPreventa = cEjecutorTareaPreventa.Insert(oEjecutorTareaPreventa);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idEjecutorTareaPreventa);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(new Guid()))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
示例#29
0
        public int Update(Models.ReceptoresAvisos oReceptoresAvisos)
        {
            Guid methodOwnerID = new Guid("D8198EC4-92C4-49ED-9054-2C550CE39AFD");

            OpenDbConn();

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

            try
            {
                DAL.ReceptoresAvisos cReceptoresAvisos = new DAL.ReceptoresAvisos(cDblib);

                int result = cReceptoresAvisos.Update(oReceptoresAvisos);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(result);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }
        internal int Insert(Models.FiguraSubareaPreventa oFiguraSubareaPreventa)
        {
            Guid methodOwnerID = new Guid("9467a74f-e890-4cf2-9e12-4930dca042e1");

            OpenDbConn();

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

            try
            {
                DAL.FiguraSubareaPreventa cFiguraSubareaPreventa = new DAL.FiguraSubareaPreventa(cDblib);

                int idFiguraSubareaPreventa = cFiguraSubareaPreventa.Insert(oFiguraSubareaPreventa);

                //Finalizar transacción
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.commitTransaction(methodOwnerID);
                }

                return(idFiguraSubareaPreventa);
            }
            catch (Exception ex)
            {
                //rollback
                if (cDblib.Transaction.ownerID.Equals(methodOwnerID))
                {
                    cDblib.rollbackTransaction(methodOwnerID);
                }

                throw ex;
            }
        }