예제 #1
0
        public Empresa ObtenerEmpresa(string ruc)
        {
            try
            {
                if (myInfo == null)
                {
                    myInfo = new Empresas();
                }


                string codigoCatcher = myInfo.UseTesseract();
                myInfo.GetInfo(ruc, codigoCatcher);

                return(new Empresa()
                {
                    RazonSocial = myInfo.RazonSocial, ActividadComericioExterior = myInfo.ActividadComercioExterior, NombreComercial = myInfo.NombreComercial, Direccion = myInfo.Direccion, TipoComtribuyente = myInfo.TipoComtribuyente,
                    FechaInscripcion = myInfo.FechaInscripcion, EstadoContribuyente = myInfo.EstadoContribuyente, FechaInicioActividad = myInfo.FechaInicioActividad,
                    CondicionContribuyente = myInfo.CondicionContribuyente, SistemaEmisionComprobante = myInfo.SistemaEmisionComprobante, SistemaContabilidad = myInfo.SistemaContabilidad
                });
            }
            catch (Exception ex)
            {
                return(null);
            }
        }
예제 #2
0
        private bool noExisteRegistre()
        {
            try
            {
                if (myInfo == null)
                {
                    myInfo = new Empresas();
                }

                string codigoCatcher = myInfo.UseTesseract();
                myInfo.GetInfo(txtNroDocumento.Text, codigoCatcher);
                string direccion   = myInfo.ApeMaterno;
                string razonSocial = myInfo.Nombres;

                if (razonSocial != "Error!")
                {
                    fn.RegistrarOficial("Cliente", "Nombre,Numero,Telefono,Direccion,Referencia", "'" + razonSocial + "','" + txtNroDocumento.Text + "','','" + direccion + "',''");
                    return(true);
                }
                else
                {
                    return(false);
                }
            }
            catch
            {
                return(false);
            }
        }