public Inicio() { ElementoTipo = typeof(Lbl.Pagos.FormaDePago); TableName = "formaspago"; KeyColumn = new Lazaro.Pres.Field("formaspago.id_formapago", "Cód.", Lfx.Data.InputFieldTypes.Serial, 0); Columns = new Lazaro.Pres.FieldCollection() { new Lazaro.Pres.Field("formaspago.nombre", "Nombre", Lfx.Data.InputFieldTypes.Text, 320), new Lazaro.Pres.Field("formaspago.tipo", "Tipo", 240, new Dictionary <int, string>() { { 1, "Efectivo" }, { 2, "Cheque (propio)" }, { 3, "Cuenta corriente" }, { 4, "Tarjeta" }, { 6, "Caja" }, { 7, "Otro" }, { 8, "Cheque (terceros)" } }), new Lazaro.Pres.Field("formaspago.id_caja", "Caja", Lfx.Data.InputFieldTypes.Relation, 320), new Lazaro.Pres.Field("formaspago.descuento", "Desc./Recargo", Lfx.Data.InputFieldTypes.Numeric, 120), new Lazaro.Pres.Field("formaspago.retencion", "Retención", Lfx.Data.InputFieldTypes.Numeric, 120), new Lazaro.Pres.Field("formaspago.pagos", "Pagos", Lfx.Data.InputFieldTypes.Bool, 96), new Lazaro.Pres.Field("formaspago.cobros", "Cobros", Lfx.Data.InputFieldTypes.Bool, 96), }; OrderBy = "formaspago.nombre"; }
/// <summary> /// Actualiza el control con los datos del elemento. /// </summary> public override void ActualizarControl() { Lazaro.Pres.Forms.Section Sect = new Lazaro.Pres.Forms.Section("Campos adicionales"); this.Tabla = Lfx.Workspace.Master.Tables[m_Elemento.TablaDatos]; //Tabla.Connection = this.Connection; if (Tabla.Tags != null) { foreach (Lfx.Data.Tag Tg in Tabla.Tags) { if (Tg.Internal == false) { Lazaro.Pres.Field Fld = new Lazaro.Pres.Field(Tg.FieldName, Tg.Label, Tg.InputFieldType); if (string.IsNullOrEmpty(Tg.LblType) == false) { Fld.LblType = Lbl.Instanciador.InferirTipo(Tg.LblType); } if (Tg.Access > 0) { Lbl.Sys.Permisos.Operaciones Oper = (Lbl.Sys.Permisos.Operaciones)(Tg.Access); if (Lbl.Sys.Config.Actual.UsuarioConectado.TienePermiso(m_Elemento, Oper) == false) { Fld.ReadOnly = true; } } Fld.Relation = Tg.Relation; Sect.Fields.Add(Fld); } } } this.FromSection(Sect); base.ActualizarControl(); }
public Inicio() { ElementoTipo = typeof(Lbl.Pagos.FormaDePago); TableName = "formaspago"; KeyColumn = new Lazaro.Pres.Field("formaspago.id_formapago", "Cód.", Lfx.Data.InputFieldTypes.Serial, 0); Columns = new Lazaro.Pres.FieldCollection() { new Lazaro.Pres.Field("formaspago.nombre", "Nombre", Lfx.Data.InputFieldTypes.Text, 320), new Lazaro.Pres.Field("formaspago.tipo", "Tipo", 240, new Dictionary<int, string>() { { 1, "Efectivo" }, { 2, "Cheque (propio)" }, { 3, "Cuenta corriente" }, { 4, "Tarjeta" }, { 6, "Caja" }, { 7, "Otro" }, { 8, "Cheque (terceros)" } }), new Lazaro.Pres.Field("formaspago.id_caja", "Caja", Lfx.Data.InputFieldTypes.Relation, 320), new Lazaro.Pres.Field("formaspago.descuento", "Desc./Recargo", Lfx.Data.InputFieldTypes.Numeric, 120), new Lazaro.Pres.Field("formaspago.retencion", "Retención", Lfx.Data.InputFieldTypes.Numeric, 120), new Lazaro.Pres.Field("formaspago.pagos", "Pagos", Lfx.Data.InputFieldTypes.Bool, 96), new Lazaro.Pres.Field("formaspago.cobros", "Cobros", Lfx.Data.InputFieldTypes.Bool, 96), }; OrderBy = "formaspago.nombre"; }
/// <summary> /// Actualiza el control con los datos del elemento. /// </summary> public override void ActualizarControl() { Lazaro.Pres.Forms.Section Sect = new Lazaro.Pres.Forms.Section("Campos adicionales"); this.Tabla = m_Elemento.Connection.Tables[m_Elemento.TablaDatos]; Tabla.Connection = this.Connection; if (Tabla.Tags != null) { foreach (Lfx.Data.Tag Tg in Tabla.Tags) { if (Tg.Internal == false) { Lazaro.Pres.Field Fld = new Lazaro.Pres.Field(Tg.FieldName, Tg.Label, Tg.InputFieldType); if (string.IsNullOrEmpty(Tg.LblType) == false) { Fld.LblType = Lbl.Instanciador.InferirTipo(Tg.LblType); } if (Tg.Access > 0) { Lbl.Sys.Permisos.Operaciones Oper = (Lbl.Sys.Permisos.Operaciones)(Tg.Access); if (Lbl.Sys.Config.Actual.UsuarioConectado.TienePermiso(m_Elemento, Oper) == false) { Fld.ReadOnly = true; } } Fld.Relation = Tg.Relation; Sect.Fields.Add(Fld); } } } this.FromSection(Sect); base.ActualizarControl(); }
public Inicio() { ElementoTipo = typeof(Lbl.Bancos.Banco); TableName = "bancos"; KeyColumn = new Lazaro.Pres.Field("bancos.id_banco", "Cód.", Lfx.Data.InputFieldTypes.Serial, 0); Columns = new Lazaro.Pres.FieldCollection() { new Lazaro.Pres.Field("bancos.nombre", "Nombre", Lfx.Data.InputFieldTypes.Text, 320), new Lazaro.Pres.Field("bancos.url", "Página", Lfx.Data.InputFieldTypes.Text, 320) }; OrderBy = "bancos.nombre"; }
public Inicio() { ElementoTipo = typeof(Lbl.Impuestos.Alicuota); TableName = "alicuotas"; OrderBy = "nombre"; KeyColumn = new Lazaro.Pres.Field("id_alicuota", "Cód.", Lfx.Data.InputFieldTypes.Serial, 0); Columns = new Lazaro.Pres.FieldCollection() { new Lazaro.Pres.Field("nombre", "Nombre", Lfx.Data.InputFieldTypes.Text, 240), new Lazaro.Pres.Field("porcentaje", "Porcentaje", Lfx.Data.InputFieldTypes.Numeric, 160), new Lazaro.Pres.Field("importe_minimo", "Imp. Mín.", Lfx.Data.InputFieldTypes.Currency, 160) }; }
public Inicio() { ElementoTipo = typeof(Lbl.Pagos.Plan); TableName = "tarjetas_planes"; KeyColumn = new Lazaro.Pres.Field("tarjetas_planes.id_plan", "Cód.", Lfx.Data.InputFieldTypes.Serial, 0); Columns = new Lazaro.Pres.FieldCollection() { new Lazaro.Pres.Field("tarjetas_planes.nombre", "Nombre", Lfx.Data.InputFieldTypes.Text, 320), new Lazaro.Pres.Field("tarjetas_planes.cuotas", "Cuotas", Lfx.Data.InputFieldTypes.Integer, 96), new Lazaro.Pres.Field("tarjetas_planes.interes", "Desc./Recargo", Lfx.Data.InputFieldTypes.Numeric, 120), new Lazaro.Pres.Field("tarjetas_planes.comision", "Retención", Lfx.Data.InputFieldTypes.Numeric, 120) }; OrderBy = "tarjetas_planes.nombre"; }
public Inicio() { ElementoTipo = typeof(Lbl.Entidades.Moneda); TableName = "monedas"; KeyColumn = new Lazaro.Pres.Field("monedas.id_moneda", "Cód.", Lfx.Data.InputFieldTypes.Serial, 0); Columns = new Lazaro.Pres.FieldCollection() { new Lazaro.Pres.Field("monedas.nombre", "Nombre", Lfx.Data.InputFieldTypes.Text, 320), new Lazaro.Pres.Field("monedas.signo", "Signo", Lfx.Data.InputFieldTypes.Text, 70), new Lazaro.Pres.Field("monedas.iso", "Cod. ISO", Lfx.Data.InputFieldTypes.Text, 80), new Lazaro.Pres.Field("monedas.cotizacion", "Cotizacion", Lfx.Data.InputFieldTypes.Currency, 100) }; OrderBy = "monedas.nombre"; }