예제 #1
0
        private DataTable ConsultaUsuariosFiscalia()
        {
            try
            {
                LogicaNegocio Ln = new LogicaNegocio();
                DataTable     dt = new DataTable("dt");

                dt = Ln.ListarUsuarios(null, 3, "");
                return(dt);
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "cartera", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                return(new DataTable());
            }
        }
예제 #2
0
 private bool CrearCarpetaEnRaiz(String nombreCarpeta)
 {
     try
     {
         //SPFolderCollection spfc = new SPFolderCollection();
         SPWeb    app       = SPContext.Current.Web;
         SPList   docList   = app.Lists["Documentos"];
         SPFolder newFolder = docList.RootFolder.SubFolders.Add(nombreCarpeta);
         return(true);
     }
     catch (Exception ex)
     {
         LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
         return(false);
     }
 }
        private void CargarEjecutivo()
        {
            cbxEjecutivo.Items.Clear();
            try
            {
                LogicaNegocio Ln = new LogicaNegocio();
                DataTable     dt = new DataTable("dt");

                dt = Ln.ListarUsuarios(null, 1, "");
                util.CargaDDLDxx(cbxEjecutivo, dt, "nombreApellido", "idUsuario");
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }
        }
예제 #4
0
        public byte[] GenerarReporte(string sp, Dictionary <string, string> datos, string id, Resumen objresumen)
        {
            System.Text.StringBuilder sDocumento = new System.Text.StringBuilder();
            string        html = string.Empty;
            LogicaNegocio Ln   = new LogicaNegocio();

            try
            {
                String xml = String.Empty;
                string descTipoTransaccion = System.Web.HttpUtility.HtmlDecode(Page.Request.QueryString["idTT"] as string);

                //IF PARA CADA REPORTE
                DataSet res1 = new DataSet();
                if (sp == "PorFacturacion")
                {
                    res1 = Ln.ConsultaDatosContabilidadXML(objresumen.idEmpresa.ToString(), objresumen.idOperacion.ToString(),
                                                           objresumen.idUsuario, objresumen.descCargo, descTipoTransaccion);
                    xml = res1.Tables[0].Rows[0][0].ToString();; //GenerarXMLContratoSubFianza(res1);
                }

                XDocument            newTree = new XDocument();
                XslCompiledTransform xsltt   = new XslCompiledTransform();

                using (XmlWriter writer = newTree.CreateWriter())
                {
                    xsltt.Load(@"C:/inetpub/wwwroot/wss/VirtualDirectories/80/xsl/request/" + sp + ".xslt");
                }
                using (var sw = new StringWriter())
                    using (var sr = new StringReader(xml))
                        using (var xr = XmlReader.Create(sr))
                        {
                            xsltt.Transform(xr, null, sw);
                            html = sw.ToString();
                        }
                try
                {
                    sDocumento.Append(html);
                    return(util.ConvertirAPDF_Control(sDocumento));
                }
                catch { }
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }
            return(null);
        }
        public byte[] GenerarReporte(string sp, Dictionary <string, string> datos, string id)
        {
            LogicaNegocio MTO = new LogicaNegocio();

            try
            {
                String xml = String.Empty;

                //IF PARA CADA REPORTE
                DataSet res1 = new DataSet();
                if (sp == "Ficha_Comercial")
                {
                    res1 = MTO.ConsultaFichaComercial(datos["IdEmpresa"], "ReportePosicionCliente");
                    for (int i = 0; i <= res1.Tables[0].Rows.Count - 1; i++)
                    {
                        xml = xml + res1.Tables[0].Rows[i][0].ToString();
                    }
                }

                XDocument            newTree = new XDocument();
                XslCompiledTransform xsltt   = new XslCompiledTransform();

                using (XmlWriter writer = newTree.CreateWriter())
                {
                    xsltt.Load(@"C:/inetpub/wwwroot/wss/VirtualDirectories/80/xsl/request/" + sp + ".xslt");
                }
                using (var sw = new StringWriter())
                    using (var sr = new StringReader(xml))
                        using (var xr = XmlReader.Create(sr))
                        {
                            xsltt.Transform(xr, null, sw);
                            html = sw.ToString();
                        }
                try
                {
                    sDocumento.Append(html);
                    return(util.ConvertirAPDF_Control(sDocumento));
                }
                catch { }
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }
            return(null);
        }
 void llenargrid()
 {
     try
     {
         LogicaNegocio Ln = new LogicaNegocio();
         DataTable     res;
         res             = Ln.ListarRendicionCliente("Keyla Sandoval");
         Grid.DataSource = res;
         Grid.DataBind();
     }
     catch (Exception ex)
     {
         LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
         Page.Session["Error"] = ex.Source.ToString() + ": " + ex.Message.ToString();
         Page.Response.Redirect("Mensaje.aspx");
     }
 }
예제 #7
0
        public Boolean InsertarActualizarPagoFacturacion(string idEmpresa, string idOperacion, string idUsuario, string cargoUser,
                                                         string Comentario, string NroDocumentoPago, string idBanco, string descBanco, string fechaPago, string idTipoPago, string DescTipoPago, string DescTipoTransaccion)
        {
            try
            {
                Boolean        dt;
                SqlParameter[] SqlParametros = new SqlParameter[13];
                SqlParametros[0]       = new SqlParameter("@idEmpresa", SqlDbType.NVarChar);
                SqlParametros[0].Value = idEmpresa;
                SqlParametros[1]       = new SqlParameter("@idOperacion", SqlDbType.NVarChar);
                SqlParametros[1].Value = idOperacion;
                SqlParametros[2]       = new SqlParameter("@idUsuario", SqlDbType.NVarChar);
                SqlParametros[2].Value = idUsuario;
                SqlParametros[3]       = new SqlParameter("@descCargo", SqlDbType.NVarChar);
                SqlParametros[3].Value = cargoUser;

                SqlParametros[4]       = new SqlParameter("@opcion", SqlDbType.NVarChar);
                SqlParametros[4].Value = "04";

                SqlParametros[5]        = new SqlParameter("@Comentario", SqlDbType.NVarChar);
                SqlParametros[5].Value  = Comentario;
                SqlParametros[6]        = new SqlParameter("@NroDocumentoPago", SqlDbType.NVarChar);
                SqlParametros[6].Value  = NroDocumentoPago;
                SqlParametros[7]        = new SqlParameter("@idBanco", SqlDbType.NVarChar);
                SqlParametros[7].Value  = idBanco;
                SqlParametros[8]        = new SqlParameter("@descBanco", SqlDbType.NVarChar);
                SqlParametros[8].Value  = descBanco;
                SqlParametros[9]        = new SqlParameter("@fechaPago", SqlDbType.NVarChar);
                SqlParametros[9].Value  = fechaPago;
                SqlParametros[10]       = new SqlParameter("@idTipoPago", SqlDbType.NVarChar);
                SqlParametros[10].Value = idTipoPago;
                SqlParametros[11]       = new SqlParameter("@DescTipoPago", SqlDbType.NVarChar);
                SqlParametros[11].Value = DescTipoPago;

                SqlParametros[12]       = new SqlParameter("@DescTipoTransaccion", SqlDbType.NVarChar);
                SqlParametros[12].Value = DescTipoTransaccion;

                dt = AD_Global.ejecutarAccion("GestionFacturacion", SqlParametros);
                return(dt);
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                return(false);
            }
        }
예제 #8
0
        public int CP_VerificarCertificado(string NroCertificado)
        {
            try
            {
                SqlParameter[] SqlParametros = new SqlParameter[1];
                SqlParametros[0]       = new SqlParameter("@NroCertificado", SqlDbType.NVarChar);
                SqlParametros[0].Value = NroCertificado;

                var resultado = AD_Global.traerPrimeraColumna("VerificarCertificado", SqlParametros);
                return(int.Parse(resultado));
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                return(-1);
            }
        }
        private void CargarGrilla(string empresa, string rut, string certificado, string ejecutivo)
        {
            try
            {
                LogicaNegocio Ln = new LogicaNegocio();
                DataTable     dt = new DataTable("dtAdministracion");

                dt = Ln.ListarAdministracionFondos(empresa, rut, certificado, ejecutivo);
                Page.Session["gvAdministracionFondos"] = dt;
                gvAdministracionFondos.DataSource      = dt;
                gvAdministracionFondos.DataBind();
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }
        }
예제 #10
0
        protected void btnAgregar_Click(object sender, EventArgs e)
        {
            try
            {
                asignacionResumen(ref objresumen);
                LogicaNegocio MTO = new LogicaNegocio();
                MTO.GestionResponsableOperacion(objresumen.idOperacion, objresumen.idUsuario, objresumen.descCargo, "02");
                guardarArchivo();
                buscarArchivos();

                validarCriticos();
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                mensajeError("Se ha producido un error al guardar el documento. Por favor validar que en nombre del archivo no contenga caracteres especiales.");
            }
        }
예제 #11
0
        public byte[] GenerarReporte(int idEmpresa)
        {
            System.Text.StringBuilder sDocumento = new System.Text.StringBuilder();
            string        html = string.Empty;
            LogicaNegocio Ln   = new LogicaNegocio();

            try
            {
                String  xml  = String.Empty;
                DataSet res1 = new DataSet();

                res1 = Ln.ConsultaReporteScoring(idEmpresa, "usuario", "perfil");
                for (int i = 0; i < res1.Tables[0].Rows.Count; i++)
                {
                    xml = xml + res1.Tables[0].Rows[i][0].ToString();
                }

                XDocument            newTree = new XDocument();
                XslCompiledTransform xsltt   = new XslCompiledTransform();

                using (XmlWriter writer = newTree.CreateWriter())
                {
                    xsltt.Load(@"C:/inetpub/wwwroot/wss/VirtualDirectories/80/xsl/request/" + "Scoring" + ".xslt");
                }
                using (var sw = new StringWriter())
                    using (var sr = new StringReader(xml))
                        using (var xr = XmlReader.Create(sr))
                        {
                            xsltt.Transform(xr, null, sw);
                            html = sw.ToString();
                        }
                try
                {
                    sDocumento.Append(html);
                    return(util.ConvertirAPDF_Control(sDocumento));
                }
                catch { }
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }
            return(null);
        }
예제 #12
0
        public DataTable GestionBitacoraPago(string xmlBitacora, string NroCertificado, int?IdMotivo, int?IdCausa, int?IdAcreedor, DateTime?FechaCobro, DateTime?FechaPago, string NroDocumento, int?Monto, string Comentario, int?IdBitacoraPago, string IdUsuario, string RazonSocial, int IdOpcion)
        {
            try
            {
                DataTable      dt            = new DataTable();
                SqlParameter[] SqlParametros = new SqlParameter[14];
                SqlParametros[0]        = new SqlParameter("@xmlBitacora", SqlDbType.Xml);
                SqlParametros[0].Value  = xmlBitacora;
                SqlParametros[1]        = new SqlParameter("@NroCertificado", SqlDbType.NVarChar);
                SqlParametros[1].Value  = NroCertificado;
                SqlParametros[2]        = new SqlParameter("@IdMotivo", SqlDbType.Int);
                SqlParametros[2].Value  = IdMotivo;
                SqlParametros[3]        = new SqlParameter("@IdCausa", SqlDbType.Int);
                SqlParametros[3].Value  = IdCausa;
                SqlParametros[4]        = new SqlParameter("@IdAcreedor", SqlDbType.Int);
                SqlParametros[4].Value  = IdAcreedor;
                SqlParametros[5]        = new SqlParameter("@FechaCobro", SqlDbType.DateTime);
                SqlParametros[5].Value  = FechaCobro;
                SqlParametros[6]        = new SqlParameter("@FechaPago", SqlDbType.DateTime);
                SqlParametros[6].Value  = FechaPago;
                SqlParametros[7]        = new SqlParameter("@NroDocumento", SqlDbType.NVarChar);
                SqlParametros[7].Value  = NroDocumento;
                SqlParametros[8]        = new SqlParameter("@Monto", SqlDbType.Int);
                SqlParametros[8].Value  = Monto;
                SqlParametros[9]        = new SqlParameter("@Comentario", SqlDbType.NVarChar);
                SqlParametros[9].Value  = Comentario;
                SqlParametros[10]       = new SqlParameter("@IdBitacoraPago", SqlDbType.Int);
                SqlParametros[10].Value = IdBitacoraPago;
                SqlParametros[11]       = new SqlParameter("@IdUsuario", SqlDbType.NVarChar);
                SqlParametros[11].Value = IdUsuario;
                SqlParametros[12]       = new SqlParameter("@RazonSocial", SqlDbType.NVarChar);
                SqlParametros[12].Value = RazonSocial;
                SqlParametros[13]       = new SqlParameter("@IdOpcion", SqlDbType.Int);
                SqlParametros[13].Value = IdOpcion;

                dt = AD_Global.ejecutarConsultas("GestionBitacoraPago", SqlParametros);
                return(dt);
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                return(new DataTable());
            }
        }
        private void llenarGridCompromisos()
        {
            asignacionResumen(ref objresumen);
            LogicaNegocio Ln = new LogicaNegocio();
            DataSet       res;

            try
            {
                res = Ln.ListarCompromisos(objresumen.idOperacion.ToString());

                //Cargar datos de form superior
                string razonSocial = res.Tables[1].Rows[0]["RazonSocial"].ToString();

                string operacion = res.Tables[1].Rows[0]["Operacion"].ToString();
                string ejecutivo = res.Tables[1].Rows[0]["Ejecutivo"].ToString();
                string etapa     = res.Tables[1].Rows[0]["Etapa"].ToString();
                string canal     = res.Tables[1].Rows[0]["Canal"].ToString();
                string fondo     = res.Tables[1].Rows[0]["Fondo"].ToString();
                string montoOper = res.Tables[1].Rows[0]["MontoOperacion"].ToString();
                string montoCom  = res.Tables[1].Rows[0]["MontoComision"].ToString();

                this.txtRazonSocial.Text    = razonSocial;
                this.txtOperacion.Text      = operacion;
                this.txtEjecutivo.Text      = ejecutivo;
                this.txtEtapa.Text          = etapa;
                this.txtFondo.Text          = fondo;
                this.txtMontoOperacion.Text = montoOper;
                this.txtMontoComision.Text  = montoCom;
                this.txtCanal.Text          = canal;

                if (res.Tables[0].Rows.Count > 0)
                {
                    ResultadosBusqueda.DataSource = res.Tables[0];
                    ResultadosBusqueda.DataBind();
                }
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                Page.Session["Error"] = ex.Source.ToString() + ": " + ex.Message.ToString();
                Page.Response.Redirect("Mensaje.aspx");
            }
        }
        public byte[] GenerarReporte(string sp, Dictionary <string, string> datos, string id, Resumen objresumen)
        {
            LogicaNegocio LN = new LogicaNegocio();

            try
            {
                string  xml  = string.Empty;
                DataSet res1 = new DataSet();
                if (sp == "Prepago")
                {
                    res1 = LN.ConsultaReporteBDDevolucion(datos["IdEmpresa"], datos["IdOperacion"], datos["Ncertificado"], "DocumentoCurse", "admin", "ReporteDevoluciones");
                    xml  = res1.Tables[0].Rows[0][0].ToString();  //GenerarXMLContratoSubFianza(res1);
                }

                XDocument            newTree = new XDocument();
                XslCompiledTransform xsltt   = new XslCompiledTransform();

                using (XmlWriter writer = newTree.CreateWriter())
                {
                    xsltt.Load(@"C:/inetpub/wwwroot/wss/VirtualDirectories/80/xsl/request/" + sp + ".xslt");
                }

                using (var sw = new StringWriter())
                    using (var sr = new StringReader(xml))
                        using (var xr = XmlReader.Create(sr))
                        {
                            xsltt.Transform(xr, null, sw);
                            html = sw.ToString();
                        }

                try
                {
                    sDocumento.Append(html);
                    return(util.ConvertirAPDF_Control(sDocumento));
                }
                catch { }
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }
            return(null);
        }
예제 #15
0
        private void llenarGridComentarios()
        {
            asignacionResumen(ref objresumen);
            LogicaNegocio Ln = new LogicaNegocio();
            DataTable     res;

            try
            {
                res = Ln.ListarComentarios(objresumen.idOperacion.ToString());
                ResultadosBusqueda.DataSource = res;
                ResultadosBusqueda.DataBind();
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                Page.Session["Error"] = ex.Source.ToString() + ": " + ex.Message.ToString();
                Page.Response.Redirect("Mensaje.aspx");
            }
        }
예제 #16
0
        public DataTable ListarCausas()
        {
            try
            {
                DataTable      dt            = new DataTable();
                SqlParameter[] SqlParametros = new SqlParameter[0];

                //SqlParametros[0] = new SqlParameter("@opcion", SqlDbType.NChar);
                //SqlParametros[0].Value = Constantes.OPCION.LISTAGENERAL;

                dt = AD_Global.ejecutarConsultas("ListarCausas", SqlParametros);
                return(dt);
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                return(new DataTable());
            }
        }
 protected DataTable ServiciosGarantia(string Tipo)
 {
     try
     {
         SPWeb app = SPContext.Current.Web;
         app.AllowUnsafeUpdates = true;
         SPList  items = app.Lists["ServiciosGarantia"];
         SPQuery query = new SPQuery();
         query.Query = "<Where><And><Eq><FieldRef Name='Habilitado'/><Value Type='Boolean'>1</Value></Eq><Eq><FieldRef Name='Tipo'/><Value Type='TEXT'>" + Tipo + "</Value></Eq></And></Where>" +
                       "<OrderBy><FieldRef Name='Nombre' Ascending='TRUE' /></OrderBy>";
         SPListItemCollection collListItems = items.GetItems(query);
         return(collListItems.GetDataTable());
     }
     catch (Exception ex)
     {
         LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
         return(new DataTable());
     }
 }
예제 #18
0
        private DataTable ActividadEconomica()
        {
            try
            {
                SPWeb app = SPContext.Current.Web;
                app.AllowUnsafeUpdates = true;
                app = SPContext.Current.Web;
                app.AllowUnsafeUpdates = true;
                SPList listData = app.Lists["ActividadEconomica"];
                SPListItemCollection collListItems = listData.GetItems();

                return(collListItems.GetDataTable());
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                return(new DataTable());
            }
        }
예제 #19
0
        public DataTable ListarRendicionCliente(string Usuario)
        {
            try
            {
                DataTable dt = new DataTable();
                //AD_Global objDatos = new AD_Global();
                SqlParameter[] SqlParametros = new SqlParameter[1];
                SqlParametros[0]       = new SqlParameter("@usuario", SqlDbType.NChar);
                SqlParametros[0].Value = Usuario;

                dt = AD_Global.ejecutarConsultas("BuscarRendicionesUsuario", SqlParametros);
                return(dt);
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                return(new DataTable());
            }
        }
        private void CargarEjecutivo(string cargo, string nombreUsuario)
        {
            try
            {
                LogicaNegocio Ln = new LogicaNegocio();
                cbxEjecutivo.Items.Clear();
                DataTable dt = new DataTable("dt");

                if (cargo == "Sub-Gerente Comercial")
                {
                    dt = Ln.ListarUsuarios(null, null, nombreUsuario);
                }
                else
                {
                    dt = Ln.ListarUsuarios(null, 1, "");
                }

                util.CargaDDLDxx(cbxEjecutivo, dt, "nombreApellido", "idUsuario");

                if (cargo == "Sub-Gerente Comercial")
                {
                    ListEditItem TipoEjecutivo = cbxEjecutivo.Items.FindByText(nombreUsuario);
                    if (TipoEjecutivo != null)
                    {
                        cbxEjecutivo.Text     = nombreUsuario;
                        cbxEjecutivo.ReadOnly = true;
                    }
                }
                else
                {
                    ListEditItem TipoEjecutivo = cbxEjecutivo.Items.FindByText(nombreUsuario);
                    if (TipoEjecutivo != null)
                    {
                        cbxEjecutivo.Text     = nombreUsuario;
                        cbxEjecutivo.ReadOnly = false;
                    }
                }
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }
        }
        protected void gvAcreedores_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
        {
            try
            {
                SPWeb         app2  = SPContext.Current.Web;
                bool          crear = false;
                LogicaNegocio LN    = new LogicaNegocio();

                crear = LN.Acreedores(3, e.NewValues["Rut"].ToString(), 0, e.NewValues["Nombre"].ToString(), e.NewValues["Domicilio"].ToString(), Convert.ToInt32(e.NewValues["IdTipoAcreedor"]), Convert.ToInt32(e.NewValues["IdRegion"]), Convert.ToInt32(e.NewValues["Idprovincia"]), Convert.ToInt32(e.NewValues["IdComuna"]), util.ObtenerValor(app2.CurrentUser.Name));
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }

            gvAcreedores.CancelEdit();
            e.Cancel = true;

            CargarAcreedores(txtAcreedor.Text.Trim(), txtRutAcreedor.Text.Trim());
        }
예제 #22
0
        public DataTable ConsultarOperacion(int IdOperacion)
        {
            try
            {
                DataTable      dt            = new DataTable();
                SqlParameter[] SqlParametros = new SqlParameter[2];
                SqlParametros[0]       = new SqlParameter("@idOperacion", SqlDbType.Int);
                SqlParametros[0].Value = IdOperacion;
                SqlParametros[1]       = new SqlParameter("@accion", SqlDbType.Int);
                SqlParametros[1].Value = 6;

                dt = AD_Global.ejecutarConsultas("GestionOperaciones", SqlParametros);
                return(dt);
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                return(new DataTable());
            }
        }
예제 #23
0
 protected void btnAdjuntar_Click1(object sender, EventArgs e)
 {
     try
     {
         asignacionResumen(ref objresumen);
         String carpetaEmpresa = util.RemoverSignosAcentos(System.Web.HttpUtility.HtmlDecode(lbEmpresa.Text));
         carpetaEmpresa = carpetaEmpresa.Length > 100 ? carpetaEmpresa.Substring(0, 100) : carpetaEmpresa;
         carpetaEmpresa = lbRut.Text.Split('-')[0] + "_" + carpetaEmpresa;
         String carpetaArea = objresumen.area.ToUpper();
         String idOperacion = objresumen.idOperacion.ToString();
         cargarDocumento(carpetaEmpresa, carpetaArea, idOperacion);
         Page.Session["Resumen"]  = objresumen;
         Page.Session["BUSQUEDA"] = ViewState["BUSQUEDA"];
         Page.Response.Redirect("DocumentoCurse.aspx");
     }
     catch (Exception ex)
     {
         LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
     }
 }
예제 #24
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         try
         {
             lblTitulo.Text  = "Advertencia"; //"oListItem["Titulo"].ToString(); ;
             lblMensaje.Text = "No se pudo culminar su solicitud, por favor comuniquese con el administrador del sistema.  Detalle: ";
             if (Page.Session["Error"] != null)
             {
                 lblMensaje.Text = lblMensaje.Text + Page.Session["Error"].ToString();
             }
         }
         catch (Exception ex)
         {
             lblTitulo.Text  = "Error";
             lblMensaje.Text = ex.Source.ToString() + ex.Message.ToString();
             LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
         }
     }
 }
예제 #25
0
        protected void gvBitacora_RowInserting(object sender, DevExpress.Web.Data.ASPxDataInsertingEventArgs e)
        {
            try
            {
                LogicaNegocio Ln       = new LogicaNegocio();
                SPWeb         app2     = SPContext.Current.Web;
                bool          ingresar = false;

                //ingresar = Ln.Gestion_BitacoraPago(null, e.NewValues["NCF"].ToString(), int.Parse(e.NewValues["IdMotivo"].ToString()), int.Parse(e.NewValues["IdCausa"].ToString()), 0, Convert.ToDateTime(e.NewValues["FechaCobro"]), Convert.ToDateTime(e.NewValues["FechaPago"].ToString()), e.NewValues["NroDocumento"].ToString(), int.Parse(e.NewValues["Monto"].ToString()), e.NewValues["Comentario"].ToString(), null, util.ObtenerValor(app2.CurrentUser.Name), 3);
                ingresar = Ln.Gestion_BitacoraPago(null, e.NewValues["NCF"].ToString(), int.Parse(e.NewValues["IdMotivo"].ToString()), int.Parse(e.NewValues["IdCausa"].ToString()), int.Parse(e.NewValues["IdBanco"].ToString()), Convert.ToDateTime(e.NewValues["FechaCobro"]), Convert.ToDateTime(e.NewValues["FechaPago"].ToString()), e.NewValues["NroDocumento"].ToString(), int.Parse(e.NewValues["Monto"].ToString()), e.NewValues["Cuota"].ToString(), int.Parse(e.NewValues["IdAcreedor"].ToString()), e.NewValues["Comentario"].ToString(), null, util.ObtenerValor(app2.CurrentUser.Name), 3);
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }

            gvBitacora.CancelEdit();
            e.Cancel = true;

            string[] parametros = new string[] { "buscar", txtCertificado.Text.Trim(), txtRazonSocial.Text.Trim() };
            CargarBitacora(parametros);
        }
        protected void inicializacionGrillas()
        {
            asignacionResumen(ref objresumen);
            try
            {
                if (ViewState["ServiciosEmpresa"] != null)
                {
                    tbServiciosOperaciones1.DataSource = (DataTable)ViewState["ServiciosEmpresa"];;
                    tbServiciosOperaciones1.DataBind();
                }
                if (ViewState["ServiciosGarantia"] != null)
                {
                    tbServiciosGarantia1.DataSource = (DataTable)ViewState["ServiciosGarantia"];;
                    tbServiciosGarantia1.DataBind();
                }
                if (ViewState["ServicioFiscalia"] != null)
                {
                    DataTable dt1 = new DataTable();
                    dt1 = (DataTable)ViewState["ServicioFiscalia"];

                    for (int i = 0; i <= gridFiscalia.Rows.Count - 1; i++)
                    {
                        dt1.Rows[i]["Valor"] = System.Web.HttpUtility.HtmlDecode((gridFiscalia.Rows[i].FindControl("txtValor") as TextBox).Text);
                    }
                    ViewState["ServicioFiscalia"] = dt1;
                    dt1 = null;

                    gridFiscalia.DataSource = (DataTable)ViewState["ServicioFiscalia"];
                    gridFiscalia.DataBind();
                }
            }

            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }
        }
        private void CargarGrilla()
        {
            LogicaNegocio MTO = new LogicaNegocio();
            DataTable     res;

            try
            {
                string mes       = (ddlMes.SelectedItem != null) ? (ddlMes.SelectedItem.Text.ToLower().Contains("seleccione")) ? "" : ddlMes.SelectedItem.Text : "";
                string etapa     = (ddlEtapa.SelectedItem != null) ? (ddlEtapa.SelectedItem.Text.ToLower().Contains("seleccione")) ? "" : ddlEtapa.SelectedItem.Text : "";
                string ejecutivo = (ddlEjecutivo.SelectedItem != null) ? (ddlEjecutivo.SelectedItem.Text.ToLower().Contains("seleccione")) ? "" : ddlEjecutivo.SelectedItem.Text : "";
                string empresa   = txtRazonSocial.Text;
                string canal     = (ddlCanal.SelectedItem != null) ? (ddlCanal.SelectedItem.Text.ToLower().Contains("seleccione")) ? "" : ddlCanal.SelectedItem.Text : "";
                string fondo     = (ddlFondo.SelectedItem != null) ? (ddlFondo.SelectedItem.Text.ToLower().Contains("seleccione")) ? "" : ddlFondo.SelectedItem.Text : "";

                if (string.IsNullOrEmpty(mes) && string.IsNullOrEmpty(etapa) && string.IsNullOrEmpty(ejecutivo) && string.IsNullOrEmpty(empresa) && string.IsNullOrEmpty(canal) && string.IsNullOrEmpty(fondo))
                {
                    aplicaFiltros = false;
                }
                else
                {
                    aplicaFiltros = true;
                }


                res = MTO.ListarSeguimientoCompromisos(mes, etapa, ejecutivo, empresa, canal, fondo);
                ResultadosBusqueda.DataSource = res;
                //Page.Session["tabla"] = res;
                ResultadosBusqueda.DataBind();
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
                Page.Session["Error"] = ex.Source.ToString() + ": " + ex.Message.ToString();
                Page.Response.Redirect("Mensaje.aspx");
            }
        }
        private void CargarEjecutivo(string cargo, string nombre)
        {
            ddlEjecutivo.Items.Clear();
            try
            {
                LogicaNegocio Ln = new LogicaNegocio();
                DataTable     dt = new DataTable("dt");

                dt = Ln.ListarUsuarios(null, 1, "");
                util.CargaDDL(ddlEjecutivo, dt, "nombreApellido", "idUsuario");

                if (cargo == "Sub-Gerente Comercial")
                {
                    ddlEjecutivo.SelectedIndex = ddlEjecutivo.Items.IndexOf(ddlEjecutivo.Items.FindByText(nombre.Trim()));
                    ddlEjecutivo.Enabled       = false;
                    //if (ddlEjecutivo != null)
                    //{
                    //    ddlEjecutivo.Text = nombre;
                    //    ddlEjecutivo. = true;
                    //}
                }
                //else
                //{
                //    ListEditItem TipoEjecutivo = ddlEjecutivo.Items.FindByText(nombre);
                //    if (TipoEjecutivo != null)
                //    {
                //        ddlEjecutivo.Text = nombre;
                //        ddlEjecutivo.ReadOnly = true;
                //    }
                //}
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);
            }
        }
예제 #29
0
        public List <LoggingError> getLogErrorToday(string start_date, string end_date)
        {
            List <LoggingError> lst_log_error = new List <LoggingError>();
            TeraManager         tmm           = new TeraManager();
            DataTable           dt            = new DataTable();

            try {
                string strQuery = string.Empty;
                strQuery  = " select CAST(CAST(update_ts AS  TIMESTAMP(6)) AS VARCHAR(19)) as update_ts ";
                strQuery += " ,stream_key ,process_name ,auto_analyze_log ,sys_log  ";
                strQuery += " FROM DATALAB_OPER.PSS_TODAY_ERROR_LOG ";
                strQuery += " where CAST(CAST(update_ts AS date FORMAT 'YYYY-MM-DD') AS VARCHAR(10)) between '" + start_date + "' and ";
                strQuery += " '" + end_date + "' ";
                strQuery += " order by update_ts desc ";

                dt = tmm.GetDataTableTera(strQuery);
                LoggingError logError;

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    logError                  = new LoggingError();
                    logError.Update_ts        = dt.Rows[i]["update_ts"].ToString();
                    logError.Stream_key       = dt.Rows[i]["stream_key"].ToString();
                    logError.Process_name     = dt.Rows[i]["process_name"].ToString();
                    logError.Auto_analyze_log = dt.Rows[i]["auto_analyze_log"].ToString();
                    logError.Sys_log          = dt.Rows[i]["sys_log"].ToString();

                    lst_log_error.Add(logError);
                }
            } catch (Exception e) {
                System.Console.WriteLine(e.Message.ToString());
            }


            return(lst_log_error);
        }
예제 #30
0
        public string buscarMensaje(int idmensaje)
        {
            string mensaje = string.Empty;

            try
            {
                SPWeb   app    = SPContext.Current.Web;
                SPList  Lista  = app.Lists["Mensajes"];
                SPQuery oQuery = new SPQuery();
                oQuery.Query = "<Where><Eq><FieldRef Name='ID'/><Value Type='TEXT'>" + idmensaje + "</Value></Eq></Where>";
                SPListItemCollection ColecLista = Lista.GetItems(oQuery);
                foreach (SPListItem oListItem in ColecLista)
                {
                    mensaje = (oListItem["Mensaje"].ToString());
                }
            }
            catch (Exception ex)
            {
                LoggingError.PostEventRegister(ex, ConfigurationManager.AppSettings["pathLog"].ToString(), "", "", ConfigurationManager.AppSettings["logName"].ToString(), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledLog"].ToString()), Convert.ToBoolean(ConfigurationManager.AppSettings["enabledEventViewer"].ToString()), ConfigurationManager.AppSettings["registerEventsTypes"].ToString(), EventLogEntryType.Error);

                mensaje = ex.Source.ToString() + ex.Message.ToString();
            }
            return(mensaje.Replace("<p>", ""));
        }