Exemplo n.º 1
0
        public OOB.ResultadoEntidad <OOB.LibVenta.PosOffline.Empresa.Ficha> Empresa_Datos()
        {
            var result = new OOB.ResultadoEntidad <OOB.LibVenta.PosOffline.Empresa.Ficha>();

            var r01 = MyData.Empresa_Datos();

            if (r01.Result == DtoLib.Enumerados.EnumResult.isError)
            {
                result.Mensaje = r01.Mensaje;
                result.Result  = OOB.Enumerados.EnumResult.isError;
                return(result);
            }

            var nr = new OOB.LibVenta.PosOffline.Empresa.Ficha()
            {
                Auto            = r01.Entidad.Auto,
                CiRif           = r01.Entidad.CiRif,
                Nombre          = r01.Entidad.Nombre,
                DireccionFiscal = r01.Entidad.DireccionFiscal,
                Telefono        = r01.Entidad.Telefono,
            };

            result.Entidad = nr;

            return(result);
        }
Exemplo n.º 2
0
            public void setEmpresa(OOB.LibVenta.PosOffline.Empresa.Ficha ficha)
            {
                Limpiar();

                cirif = ficha.CiRif;
                if (Sistema.DatosNegociTicket_Rif.Trim() != "")
                {
                    cirif = Sistema.DatosNegociTicket_Rif.Trim();
                }

                var n = ficha.Nombre.Trim();

                if (Sistema.DatosNegociTicket_Nombre.Trim() != "")
                {
                    n = Sistema.DatosNegociTicket_Nombre.Trim();
                }

                var l = n.Length;

                if (n.Length > 120)
                {
                    razonsocial_1 = n.Substring(0, 40);
                    razonsocial_2 = n.Substring(40, 40);
                    razonsocial_3 = n.Substring(80, 40);
                }
                if (n.Length > 80 && n.Length <= 120)
                {
                    razonsocial_1 = n.Substring(0, 40);
                    razonsocial_2 = n.Substring(40, 40);
                    razonsocial_3 = n.Substring(80);
                }
                if (n.Length > 40 && n.Length <= 80)
                {
                    razonsocial_1 = n.Substring(0, 40);
                    razonsocial_2 = n.Substring(40);
                }
                if (n.Length > 0 && n.Length <= 40)
                {
                    razonsocial_1 = n.Substring(0);
                }

                var nd = ficha.DireccionFiscal.Trim();

                if (Sistema.DatosNegociTicket_Direccion.Trim() != "")
                {
                    nd = Sistema.DatosNegociTicket_Direccion.Trim();
                }

                var ld = nd.Length;

                if (nd.Length > 160)
                {
                    direcionFiscal_1 = nd.Substring(0, 40);
                    direcionFiscal_2 = nd.Substring(40, 40);
                    direcionFiscal_3 = nd.Substring(80, 40);
                    direcionFiscal_4 = nd.Substring(120, 40);
                }
                if (nd.Length > 120 && nd.Length <= 160)
                {
                    direcionFiscal_1 = nd.Substring(0, 40);
                    direcionFiscal_2 = nd.Substring(40, 40);
                    direcionFiscal_3 = nd.Substring(80, 40);
                    direcionFiscal_4 = nd.Substring(120, ld);
                }
                if (nd.Length > 80 && nd.Length <= 120)
                {
                    direcionFiscal_1 = nd.Substring(0, 40);
                    direcionFiscal_2 = nd.Substring(40, 40);
                    direcionFiscal_3 = nd.Substring(80);
                }
                if (nd.Length > 40 && nd.Length <= 80)
                {
                    direcionFiscal_1 = nd.Substring(0, 40);
                    direcionFiscal_2 = nd.Substring(40);
                }
                if (nd.Length > 0 && nd.Length <= 40)
                {
                    direcionFiscal_1 = nd.Substring(0);
                }

                var tlf  = ficha.Telefono.Trim();
                var ltlf = tlf.Length;

                if (ltlf > 80)
                {
                    telefono_1 = tlf.Substring(0, 40);
                    telefono_2 = tlf.Substring(40, 40);
                }
                if (ltlf > 40 && ltlf <= 80)
                {
                    telefono_1 = tlf.Substring(0, 40);
                    telefono_2 = tlf.Substring(40);
                }
                if (ltlf > 0 && ltlf <= 40)
                {
                    telefono_1 = tlf.Substring(0);
                }
            }