private bool CargarData()
        {
            var rt = false;

            var r01 = Sistema.MyData.Configuracion_Pos_GetFicha();

            if (r01.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r01.Mensaje);
                return(rt);
            }
            _cnfActual = r01.Entidad;

            var r09 = Sistema.MyData.Sucursal_GetLista();

            if (r09.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r09.Mensaje);
                return(rt);
            }
            LSucursal.Clear();
            LSucursal.AddRange(r09.ListaD.OrderBy(o => o.nombre).ToList());

            return(true);
        }
Exemple #2
0
        public OOB.Resultado.FichaEntidad <OOB.Configuracion.Entidad.Ficha> Configuracion_Pos_GetFicha()
        {
            var result = new OOB.Resultado.FichaEntidad <OOB.Configuracion.Entidad.Ficha>();

            var r01 = MyData.Configuracion_Pos_GetFicha();

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

            var ent = r01.Entidad;
            var nr  = new OOB.Configuracion.Entidad.Ficha()
            {
                idCobrador                 = ent.idCobrador,
                idConceptoDevVenta         = ent.idConceptoDevVenta,
                idConceptoSalida           = ent.idConceptoSalida,
                idConceptoVenta            = ent.idConceptoVenta,
                idDeposito                 = ent.idDeposito,
                idMedioPagoDivisa          = ent.idMedioPagoDivisa,
                idMedioPagoEfectivo        = ent.idMedioPagoEfectivo,
                idMedioPagoElectronico     = ent.idMedioPagoElectronico,
                idMedioPagoOtros           = ent.idMedioPagoOtros,
                idSucursal                 = ent.idSucursal,
                idTransporte               = ent.idTransporte,
                idVendedor                 = ent.idVendedor,
                idTipoDocumentoVenta       = ent.idTipoDocVenta,
                idTipoDocumentoDevVenta    = ent.idTipoDocDevVenta,
                idTipoDocumentoNotaEntrega = ent.idTipoDocNotaEntrega,
                idSerieFactura             = ent.idFacturaSerie,
                idSerieNotaCredito         = ent.idNotaCreditoSerie,
                idSerieNotaEntrega         = ent.idNotaEntregaSerie,
                idSerieNotaDebito          = ent.idNotaDebitoSerie,
                //
                idClaveUsar                   = ent.idClaveUsar,
                idPrecioManejar               = ent.idPrecioManejar,
                validarExistencia             = ent.validarExistencia,
                activarBusquedaPorDescripcion = ent.activarBusquedaPorDescripcion,
                activarReepsaje               = ent.activarRepesaje,
                limiteInferiorRepesaje        = ent.limiteInferiorRepesaje,
                limiteSuperiorRepesaje        = ent.limiteSuperiorRepesaje,
                //
                estatus    = ent.estatus,
                modoPrecio = ent.modoPrecio,
            };

            result.Entidad = nr;

            return(result);
        }
        public bool CargarData()
        {
            var rt = false;

            var r01 = Sistema.MyData.Configuracion_Pos_GetFicha();

            if (r01.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r01.Mensaje);
                return(rt);
            }
            _cnfActual = r01.Entidad;
            _cnfActual.setSucursal(Sistema.Sucursal.id);
            _cnfActual.setDeposito(Sistema.Deposito.id);

            var filtro = new OOB.Sistema.MedioPago.Lista.Filtro();
            var r02    = Sistema.MyData.Sistema_MedioPago_GetLista(filtro);

            if (r02.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r02.Mensaje);
                return(rt);
            }
            LMedioEfectivo.Clear();
            LMedioEfectivo.AddRange(r02.ListaD);
            LMedioEfectivo.FirstOrDefault(f => f.id == r01.Entidad.idMedioPagoEfectivo);

            LMedioDivisa.Clear();
            LMedioDivisa.AddRange(r02.ListaD);
            LMedioElectronico.Clear();
            LMedioElectronico.AddRange(r02.ListaD);
            LMedioOtro.Clear();
            LMedioOtro.AddRange(r02.ListaD);

            var r03 = Sistema.MyData.Sistema_Serie_GetLista();

            if (r03.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r03.Mensaje);
                return(rt);
            }
            LSerieFactura.Clear();
            LSerieFactura.AddRange(r03.ListaD);
            LSerieNotaDebito.Clear();
            LSerieNotaDebito.AddRange(r03.ListaD);
            LSerieNotaCredito.Clear();
            LSerieNotaCredito.AddRange(r03.ListaD);
            LSerieNotaEntrega.Clear();
            LSerieNotaEntrega.AddRange(r03.ListaD);

            var r04 = Sistema.MyData.Concepto_GetLista();

            if (r04.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r04.Mensaje);
                return(rt);
            }
            LMovVenta.Clear();
            LMovVenta.AddRange(r04.ListaD);
            LMovDevVenta.Clear();
            LMovDevVenta.AddRange(r04.ListaD);
            LMovSalida.Clear();
            LMovSalida.AddRange(r04.ListaD);

            var r05 = Sistema.MyData.Sistema_Transporte_GetLista();

            if (r05.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r05.Mensaje);
                return(rt);
            }
            LTransporte.Clear();
            LTransporte.AddRange(r05.ListaD);

            var r06 = Sistema.MyData.Sistema_Cobrador_GetLista();

            if (r06.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r06.Mensaje);
                return(rt);
            }
            LCobrador.Clear();
            LCobrador.AddRange(r06.ListaD);

            var r07 = Sistema.MyData.Vendedor_GetLista();

            if (r07.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r07.Mensaje);
                return(rt);
            }
            LVendedor.Clear();
            LVendedor.AddRange(r07.ListaD);

            var r08 = Sistema.MyData.Sistema_TipoDocumento_GetLista();

            if (r08.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r08.Mensaje);
                return(rt);
            }
            LDocVenta.Clear();
            LDocVenta.AddRange(r08.ListaD);
            LDocNtCredito.Clear();
            LDocNtCredito.AddRange(r08.ListaD);
            LDocNtEntrega.Clear();
            LDocNtEntrega.AddRange(r08.ListaD);

            var r09 = Sistema.MyData.Sucursal_GetLista();

            if (r09.Result == OOB.Resultado.Enumerados.EnumResult.isError)
            {
                Helpers.Msg.Error(r09.Mensaje);
                return(rt);
            }
            LSucursal.Clear();
            LSucursal.AddRange(r09.ListaD.OrderBy(o => o.nombre).ToList());

            LClave.Clear();
            LClave.Add(new OOB.Sistema.Clave.Ficha()
            {
                id = "1", nombre = "Máxima"
            });
            LClave.Add(new OOB.Sistema.Clave.Ficha()
            {
                id = "2", nombre = "Media"
            });
            LClave.Add(new OOB.Sistema.Clave.Ficha()
            {
                id = "3", nombre = "Minima"
            });

            LModoPrecio.Clear();
            LModoPrecio.Add(new OOB.Sistema.ModoPrecio.Ficha()
            {
                id = "1", nombre = "Por Tipo Negocio/Sucursal"
            });
            LModoPrecio.Add(new OOB.Sistema.ModoPrecio.Ficha()
            {
                id = "2", nombre = "Por Precio Fijo"
            });
            LModoPrecio.Add(new OOB.Sistema.ModoPrecio.Ficha()
            {
                id = "3", nombre = "Libre"
            });

            LTarifaPrecio.Clear();
            LTarifaPrecio.Add(new OOB.Sistema.TarifaPrecio.Ficha()
            {
                id = "1", nombre = "Precio 1"
            });
            LTarifaPrecio.Add(new OOB.Sistema.TarifaPrecio.Ficha()
            {
                id = "2", nombre = "Precio 2"
            });
            LTarifaPrecio.Add(new OOB.Sistema.TarifaPrecio.Ficha()
            {
                id = "3", nombre = "Precio 3"
            });
            LTarifaPrecio.Add(new OOB.Sistema.TarifaPrecio.Ficha()
            {
                id = "4", nombre = "Precio 4"
            });
            LTarifaPrecio.Add(new OOB.Sistema.TarifaPrecio.Ficha()
            {
                id = "5", nombre = "Precio 5"
            });

            //
            setSucursal(Sistema.Sucursal.id);
            setDeposito(Sistema.Deposito.id);

            return(true);
        }