Exemple #1
0
        public override void OnLoad()
        {
            if (this.Registro != null)
            {
                if (this.GetFieldValue <int>("id_banco") > 0)
                {
                    this.Banco = new Bancos.Banco(this.Connection, this.GetFieldValue <int>("id_banco"));
                }
                else
                {
                    this.Banco = null;
                }

                if (this.GetFieldValue <int>("id_caja") > 0)
                {
                    this.Caja = new Cajas.Caja(this.Connection, this.GetFieldValue <int>("id_caja"));
                }
                else
                {
                    this.Caja = null;
                }

                if (this.GetFieldValue <int>("id_sucursal") > 0)
                {
                    this.Sucursal = new Lbl.Entidades.Sucursal(this.Connection, this.GetFieldValue <int>("id_sucursal"));
                }
                else
                {
                    this.Sucursal = null;
                }
            }
            base.OnLoad();
        }
Exemple #2
0
                public override void OnLoad()
                {
                        base.OnLoad();

                        if (this.GetFieldValue<int>("id_sucursal") != 0)
                                this.Sucursal = new Entidades.Sucursal(this.Connection, this.GetFieldValue<int>("id_sucursal"));
                        else
                                this.Sucursal = null;

                        if (this.GetFieldValue<int>("id_impresora") != 0)
                                this.Impresora = new Lbl.Impresion.Impresora(this.Connection, this.GetFieldValue<int>("id_impresora"));
                        else
                                this.Impresora = null;
                }
Exemple #3
0
        public override void ActualizarElemento()
        {
            Lbl.Entidades.Sucursal Suc = this.Elemento as Lbl.Entidades.Sucursal;

            Suc.Numero          = EntradaNumero.ValueInt;
            Suc.Nombre          = EntradaNombre.Text;
            Suc.Direccion       = EntradaDireccion.Text;
            Suc.Telefono        = EntradaTelefono.Text;
            Suc.Localidad       = EntradaLocalidad.Elemento as Lbl.Entidades.Localidad;
            Suc.SituacionOrigen = EntradaSituacionOrigen.Elemento as Lbl.Articulos.Situacion;
            Suc.CajaDiaria      = EntradaCajaDiaria.Elemento as Lbl.Cajas.Caja;
            Suc.CajaCheques     = EntradaCajaCheques.Elemento as Lbl.Cajas.Caja;

            base.ActualizarElemento();
        }
Exemple #4
0
        public override void ActualizarControl()
        {
            Lbl.Entidades.Sucursal Suc = this.Elemento as Lbl.Entidades.Sucursal;

            EntradaNumero.ValueInt          = Suc.Numero;
            EntradaNombre.Text              = Suc.Nombre;
            EntradaDireccion.Text           = Suc.Direccion;
            EntradaTelefono.Text            = Suc.Telefono;
            EntradaLocalidad.Elemento       = Suc.Localidad;
            EntradaSituacionOrigen.Elemento = Suc.SituacionOrigen;
            EntradaCajaDiaria.Elemento      = Suc.CajaDiaria;
            EntradaCajaCheques.Elemento     = Suc.CajaCheques;

            base.ActualizarControl();
        }
        public override void OnLoad()
        {
            if (this.GetFieldValue <int>("id_tipo") == 0)
            {
                this.Tipo = null;
            }
            else
            {
                this.Tipo = new Lbl.Comprobantes.Tipo(this.Connection, this.GetFieldValue <int>("id_tipo"));
            }

            if (this.GetFieldValue <int>("id_impresora") == 0)
            {
                this.Impresora = null;
            }
            else
            {
                this.Impresora = new Impresion.Impresora(this.Connection, this.GetFieldValue <int>("id_impresora"));
            }

            if (this.GetFieldValue <int>("id_pv") == 0)
            {
                this.PuntoDeVenta = null;
            }
            else
            {
                this.PuntoDeVenta = new Comprobantes.PuntoDeVenta(this.Connection, this.GetFieldValue <int>("id_pv"));
            }

            if (this.GetFieldValue <int>("id_sucursal") == 0)
            {
                this.Sucursal = null;
            }
            else
            {
                this.Sucursal = new Entidades.Sucursal(this.Connection, this.GetFieldValue <int>("id_sucursal"));
            }

            base.OnLoad();
        }
Exemple #6
0
        public override void OnLoad()
        {
            base.OnLoad();

            if (this.GetFieldValue <int>("id_sucursal") != 0)
            {
                this.Sucursal = new Entidades.Sucursal(this.Connection, this.GetFieldValue <int>("id_sucursal"));
            }
            else
            {
                this.Sucursal = null;
            }

            if (this.GetFieldValue <int>("id_impresora") != 0)
            {
                this.Impresora = new Lbl.Impresion.Impresora(this.Connection, this.GetFieldValue <int>("id_impresora"));
            }
            else
            {
                this.Impresora = null;
            }
        }
Exemple #7
0
 public override void Crear()
 {
     this.Sucursal = Lbl.Sys.Config.Empresa.SucursalActual;
     base.Crear();
 }
Exemple #8
0
 public override void Crear()
 {
         base.Crear();
         this.Sucursal = Lbl.Sys.Config.Empresa.SucursalActual;
         this.Numero = this.Connection.FieldInt("SELECT MAX(id_pv)+1 FROM pvs");
 }
Exemple #9
0
 public override void Crear()
 {
     base.Crear();
     this.Sucursal = Lbl.Sys.Config.Empresa.SucursalActual;
     this.Numero   = this.Connection.FieldInt("SELECT MAX(id_pv)+1 FROM pvs");
 }
Exemple #10
0
        private bool GuardarConfig()
        {
            if (EntradaEmpresaEmail.Text.Length <= 5 || EntradaEmpresaEmail.Text.IndexOf('@') <= 0 || EntradaEmpresaEmail.Text.IndexOf('.') <= 0)
            {
                Lui.Forms.MessageBox.Show("Por favor escriba una dirección de correo electrónico (e-mail) válida.", "Validación");
                return(true);
            }


            if (EntradaEmpresaNombre.Text.Length <= 5 || EntradaEmpresaNombre.Text == "Nombre de la empresa")
            {
                Lui.Forms.MessageBox.Show("Por favor escriba el nombre de la empresa.", "Validación");
                return(true);
            }


            Lbl.Entidades.Pais NuevoPais = EntradaPais.Elemento as Lbl.Entidades.Pais;
            if (NuevoPais == null || NuevoPais.Existe == false)
            {
                Lui.Forms.MessageBox.Show("Por favor seleccione el país.", "Validación");
                return(true);
            }

            var Trans = this.Connection.BeginTransaction();

            if (NuevoPais.Id != IdPaisOriginal)
            {
                Lbl.Sys.Config.CambiarPais(NuevoPais);
            }

            int Sucursal = EntradaSucursal.ValueInt;

            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Stock.CodigoPredet", EntradaArticulosCodigoPredet.TextKey, 0);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Stock.Multideposito", EntradaStockMultideposito.TextKey, 0);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Stock.Decimales", EntradaStockDecimales.TextKey, 0);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Stock.DepositoPredet", EntradaStockDepositoPredet.Text, 0);;
            if (EntradaStockDepositoPredetSuc.ValueInt > 0)
            {
                Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Stock.DepositoPredet", EntradaStockDepositoPredetSuc.Text, Sucursal);
            }
            else
            {
                Lfx.Workspace.Master.CurrentConfig.DeleteGlobalSetting("Sistema.Stock.DepositoPredet", Sucursal);
            }

            Lbl.Sys.Config.Empresa.Nombre      = EntradaEmpresaNombre.Text;
            Lbl.Sys.Config.Empresa.RazonSocial = EntradaEmpresaRazonSocial.Text;
            if (EntradaEmpresaClaveTributaria.Text.Length > 0)
            {
                Lbl.Sys.Config.Empresa.ClaveTributaria = new Lbl.Personas.Claves.Cuit(EntradaEmpresaClaveTributaria.Text);
            }
            else
            {
                Lbl.Sys.Config.Empresa.ClaveTributaria = null;
            }
            Lbl.Sys.Config.Empresa.SituacionTributaria = EntradaEmpresaSituacion.ValueInt;
            Lbl.Sys.Config.Empresa.Email = EntradaEmpresaEmail.Text;
            Lbl.Sys.Config.Empresa.Id    = EntradaEmpresaId.ValueInt;
            Lbl.Sys.Config.Empresa.NumeroIngresosBrutos = EntradaIngresosBrutos.Text;
            Lbl.Sys.Config.Empresa.InicioDeActividades  = Lfx.Types.Parsing.ParseDate(EntradaInicioActividades.Text);

            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Backup.Tipo", EntradaBackup.TextKey, Lfx.Environment.SystemInformation.MachineName);
            if (EntradaModoPantalla.TextKey == "*")
            {
                Lfx.Workspace.Master.CurrentConfig.DeleteGlobalSetting("Sistema.Apariencia.ModoPantalla", Lfx.Environment.SystemInformation.MachineName);
            }
            else
            {
                Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Apariencia.ModoPantalla", EntradaModoPantalla.TextKey, Lfx.Environment.SystemInformation.MachineName);
            }
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Actualizaciones.Nivel", EntradaActualizaciones.TextKey);

            if (this.Logo.ImagenCambio)
            {
                if (this.Logo.Existe == false)
                {
                    this.Logo.SetId(1);
                }
                this.Logo.Guardar();
            }

            string NombreMaquina = System.Environment.MachineName;

            //Guardo información sobre los PV
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.PV", EntradaPV.Text, Sucursal);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.ABC.PV", EntradaPVABC.Text, Sucursal);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.NC.PV", EntradaPVNC.Text, Sucursal);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.ND.PV", EntradaPVND.Text, Sucursal);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.R.PV", EntradaPVR.Text, Sucursal);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.RC.PV", EntradaPVRC.Text, NombreMaquina);

            if (EntradaPV2.ValueInt != 0)
            {
                Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.PV", EntradaPV2.Text, NombreMaquina, Sucursal);
            }
            if (EntradaPVABC2.ValueInt != 0)
            {
                Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.ABC.PV", EntradaPVABC2.Text, NombreMaquina, Sucursal);
            }
            if (EntradaPVNC2.ValueInt != 0)
            {
                Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.NC.PV", EntradaPVNC2.Text, NombreMaquina, Sucursal);
            }
            if (EntradaPVND2.ValueInt != 0)
            {
                Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.ND.PV", EntradaPVND2.Text, NombreMaquina, Sucursal);
            }
            if (EntradaPVR2.ValueInt != 0)
            {
                Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.R.PV", EntradaPVR2.Text, NombreMaquina, Sucursal);
            }
            if (EntradaPVRC2.ValueInt != 0)
            {
                Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.RC.PV", EntradaPVRC2.Text, NombreMaquina, Sucursal);
            }

            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.ClientePredet", EntradaClientePredet.Text);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.FormaPagoPredet", EntradaFormaPagoPredet.Text);

            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.CambiaPrecioItemFactura", EntradaCambiaPrecioComprob.Value ? 1 : 0);

            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Cuentas.LimiteCreditoPredet", EntradaLimiteCredito.ValueDecimal);

            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Provincia", EntradaProvincia.ValueInt);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Localidad", EntradaLocalidad.ValueInt);

            EntradaMonedaUnidadMonetariaMinima.ValueDecimal = Lbl.Sys.Config.Moneda.UnidadMonetariaMinima;

            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Moneda.Decimales", EntradaMonedaDecimalesUnitarios.ValueInt);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Moneda.DecimalesCosto", EntradaMonedaDecimalesCosto.ValueInt);
            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Moneda.DecimalesFinal", EntradaMonedaDecimalesFinal.ValueInt);
            Lbl.Sys.Config.Moneda.Decimales      = EntradaMonedaDecimalesUnitarios.ValueInt;
            Lbl.Sys.Config.Moneda.DecimalesCosto = EntradaMonedaDecimalesCosto.ValueInt;
            Lbl.Sys.Config.Moneda.DecimalesFinal = EntradaMonedaDecimalesFinal.ValueInt;

            Lfx.Workspace.Master.CurrentConfig.Empresa.SucursalActual = EntradaSucursal.ValueInt;


            Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Configurado", "1", 0);

            if (this.PrimeraVez)
            {
                // Hago cambios referentes al país donde está configurado el sistema

                Lbl.Entidades.Pais Pais = EntradaPais.Elemento as Lbl.Entidades.Pais;
                if (Pais != null)
                {
                    Lbl.Sys.Config.CambiarPais(Pais);
                }

                // Cambio la sucursal 1 y el cliente consumidor final a la localidad proporcionada
                Lbl.Entidades.Localidad Loc = EntradaLocalidad.Elemento as Lbl.Entidades.Localidad;
                if (Loc != null)
                {
                    Lbl.Entidades.Sucursal Suc1 = new Lbl.Entidades.Sucursal(this.Connection, 1);
                    Suc1.Localidad = Loc;
                    Suc1.Guardar();

                    Lbl.Personas.Persona ConsFinal = new Lbl.Personas.Persona(this.Connection, 999);
                    ConsFinal.Localidad = Loc;
                    ConsFinal.Guardar();
                }

                Lbl.Sys.Config.Cargar();

                this.PrimeraVez = false;
            }

            Trans.Commit();
            Trans.Dispose();

            return(false);
        }
Exemple #11
0
                private bool GuardarConfig()
                {
                        if (EntradaEmpresaEmail.Text.Length <= 5 || EntradaEmpresaEmail.Text.IndexOf('@') <= 0 || EntradaEmpresaEmail.Text.IndexOf('.') <= 0) {
                                Lui.Forms.MessageBox.Show("Por favor escriba una dirección de correo electrónico (e-mail) válida.", "Validación");
                                return true;
                        }


                        if (EntradaEmpresaNombre.Text.Length <= 5 || EntradaEmpresaNombre.Text == "Nombre de la empresa") {
                                Lui.Forms.MessageBox.Show("Por favor escriba el nombre de la empresa.", "Validación");
                                return true;
                        }


                        Lbl.Entidades.Pais NuevoPais = EntradaPais.Elemento as Lbl.Entidades.Pais;
                        if (NuevoPais == null || NuevoPais.Existe == false) {
                                Lui.Forms.MessageBox.Show("Por favor seleccione el país.", "Validación");
                                return true;
                        }

                        if (NuevoPais.Id != IdPaisOriginal)
                                Lbl.Sys.Config.CambiarPais(NuevoPais);

                        int Sucursal = EntradaSucursal.ValueInt;

                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Stock.CodigoPredet", EntradaArticulosCodigoPredet.TextKey, 0);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Stock.Multideposito", EntradaStockMultideposito.TextKey, 0);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Stock.Decimales", EntradaStockDecimales.TextKey, 0);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Stock.DepositoPredet", EntradaStockDepositoPredet.Text, 0); ;
                        if (EntradaStockDepositoPredetSuc.ValueInt > 0)
                                Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Stock.DepositoPredet", EntradaStockDepositoPredetSuc.Text, Sucursal);
                        else
                                Lfx.Workspace.Master.CurrentConfig.DeleteGlobalSetting("Sistema.Stock.DepositoPredet", Sucursal);

                        Lbl.Sys.Config.Empresa.Nombre = EntradaEmpresaNombre.Text;
                        Lbl.Sys.Config.Empresa.RazonSocial = EntradaEmpresaRazonSocial.Text;
                        if (EntradaEmpresaClaveTributaria.Text.Length > 0)
                                Lbl.Sys.Config.Empresa.ClaveTributaria = new Lbl.Personas.Claves.Cuit(EntradaEmpresaClaveTributaria.Text);
                        else
                                Lbl.Sys.Config.Empresa.ClaveTributaria = null;
                        Lbl.Sys.Config.Empresa.SituacionTributaria = EntradaEmpresaSituacion.ValueInt;
                        Lbl.Sys.Config.Empresa.Email = EntradaEmpresaEmail.Text;
                        Lbl.Sys.Config.Empresa.Id = EntradaEmpresaId.ValueInt;

                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Backup.Tipo", EntradaBackup.TextKey, Lfx.Environment.SystemInformation.MachineName);
                        if (EntradaModoPantalla.TextKey == "*")
                                Lfx.Workspace.Master.CurrentConfig.DeleteGlobalSetting("Sistema.Apariencia.ModoPantalla", Lfx.Environment.SystemInformation.MachineName);
                        else
                                Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Apariencia.ModoPantalla", EntradaModoPantalla.TextKey, Lfx.Environment.SystemInformation.MachineName);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Datos.Aislacion", EntradaAislacion.TextKey);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Actualizaciones.Nivel", EntradaActualizaciones.TextKey);

                        //Guardo información sobre los PV
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.PV", EntradaPV.Text, Sucursal);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.ABC.PV", EntradaPVABC.Text, Sucursal);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.NC.PV", EntradaPVNC.Text, Sucursal);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.ND.PV", EntradaPVND.Text, Sucursal);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.R.PV", EntradaPVR.Text, Sucursal);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.RC.PV", EntradaPVRC.Text, System.Environment.MachineName);

                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.ClientePredet", EntradaClientePredet.Text);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.FormaPagoPredet", EntradaFormaPagoPredet.Text);

                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Documentos.CambiaPrecioItemFactura", EntradaCambiaPrecioComprob.Value ? 1 : 0);

                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Cuentas.LimiteCreditoPredet", EntradaLimiteCredito.ValueDecimal);

                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Provincia", EntradaProvincia.ValueInt);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Localidad", EntradaLocalidad.ValueInt);

                        EntradaMonedaUnidadMonetariaMinima.ValueDecimal = Lbl.Sys.Config.Moneda.UnidadMonetariaMinima;

                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Moneda.Decimales", EntradaMonedaDecimalesUnitarios.ValueInt);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Moneda.DecimalesCosto", EntradaMonedaDecimalesCosto.ValueInt);
                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Moneda.DecimalesFinal", EntradaMonedaDecimalesFinal.ValueInt);
                        Lbl.Sys.Config.Moneda.Decimales = EntradaMonedaDecimalesUnitarios.ValueInt;
                        Lbl.Sys.Config.Moneda.DecimalesCosto = EntradaMonedaDecimalesCosto.ValueInt;
                        Lbl.Sys.Config.Moneda.DecimalesFinal = EntradaMonedaDecimalesFinal.ValueInt;

                        Lfx.Workspace.Master.CurrentConfig.Empresa.SucursalActual = EntradaSucursal.ValueInt;


                        Lfx.Workspace.Master.CurrentConfig.WriteGlobalSetting("Sistema.Configurado", "1", 0);

                        if (this.PrimeraVez) {
                                // Hago cambios referentes al país donde está configurado el sistema

                                Lbl.Entidades.Pais Pais = EntradaPais.Elemento as Lbl.Entidades.Pais;
                                if (Pais != null)
                                        Lbl.Sys.Config.CambiarPais(Pais);

                                using (System.Data.IDbTransaction Trans = this.Connection.BeginTransaction()) {
                                        // Cambio la sucursal 1 y el cliente consumidor final a la localidad proporcionada
                                        Lbl.Entidades.Localidad Loc = EntradaLocalidad.Elemento as Lbl.Entidades.Localidad;
                                        if (Loc != null) {
                                                Lbl.Entidades.Sucursal Suc1 = new Lbl.Entidades.Sucursal(this.Connection, 1);
                                                Suc1.Localidad = Loc;
                                                Suc1.Guardar();

                                                Lbl.Personas.Persona ConsFinal = new Lbl.Personas.Persona(this.Connection, 999);
                                                ConsFinal.Localidad = Loc;
                                                ConsFinal.Guardar();
                                        }
                                        Trans.Commit();
                                }

                                Lbl.Sys.Config.Cargar();

                                this.PrimeraVez = false;
                        }

                        return false;
                }
Exemple #12
0
 public override void Crear()
 {
         this.Sucursal = Lbl.Sys.Config.Empresa.SucursalActual;
         base.Crear();
 }
Exemple #13
0
                public override void OnLoad()
                {
                        if (this.GetFieldValue<int>("id_tipo") == 0)
                                this.Tipo = null;
                        else
                                this.Tipo = new Lbl.Comprobantes.Tipo(this.Connection, this.GetFieldValue<int>("id_tipo"));

                        if (this.GetFieldValue<int>("id_impresora") == 0)
                                this.Impresora = null;
                        else
                                this.Impresora = new Impresion.Impresora(this.Connection, this.GetFieldValue<int>("id_impresora"));

                        if (this.GetFieldValue<int>("id_pv") == 0)
                                this.PuntoDeVenta = null;
                        else
                                this.PuntoDeVenta = new Comprobantes.PuntoDeVenta(this.Connection, this.GetFieldValue<int>("id_pv"));

                        if (this.GetFieldValue<int>("id_sucursal") == 0)
                                this.Sucursal = null;
                        else
                                this.Sucursal = new Entidades.Sucursal(this.Connection, this.GetFieldValue<int>("id_sucursal"));

                        base.OnLoad();
                }
Exemple #14
0
                public override void OnLoad()
                {
                        if (this.Registro != null) {
                                if (this.GetFieldValue<int>("id_banco") > 0)
                                        this.Banco = new Bancos.Banco(this.Connection, this.GetFieldValue<int>("id_banco"));
                                else
                                        this.Banco = null;

                                if (this.GetFieldValue<int>("id_caja") > 0)
                                        this.Caja = new Cajas.Caja(this.Connection, this.GetFieldValue<int>("id_caja"));
                                else
                                        this.Caja = null;

                                if (this.GetFieldValue<int>("id_sucursal") > 0)
                                        this.Sucursal = new Lbl.Entidades.Sucursal(this.Connection, this.GetFieldValue<int>("id_sucursal"));
                                else
                                        this.Sucursal = null;
                        }
                        base.OnLoad();
                }