unit uViewConfiguracionDocVarios; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo, cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls, ComCtrls, cxGraphics, DB, uDAInterfaces, uDADataTable, cxMaskEdit, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, uFormasPagoController, uBizFormasPago; type TfrViewConfiguracionDocVarios = class(TfrViewConfiguracionBase) PageControl1: TPageControl; pagNotas: TTabSheet; pagCondiciones: TTabSheet; Label1: TLabel; Label2: TLabel; Label4: TLabel; ePlazosEntrega: TMemo; eFormaPago: TMemo; eObservaciones: TMemo; eCondiciones: TcxRichEdit; cbFormaPago: TcxLookupComboBox; dsFormaPago: TDADataSource; protected FFormasPago : IBizFormaPago; FFormasPagoController : IFormasPagoController; public class function GetViewClass : TClass; override; class function DarEtiqueta : String; override; procedure CargarValores; override; procedure GuardarValores; override; end; var frViewConfiguracionDocVarios: TfrViewConfiguracionDocVarios; implementation {$R *.dfm} { TfrViewConfiguracionDocVARIOS } uses uFactuGES_App, uConfiguracionController, uPresupuestosClienteController; procedure TfrViewConfiguracionDocVarios.CargarValores; begin inherited; JvGradientHeaderPanel1.LabelCaption := JvGradientHeaderPanel1.LabelCaption + AppFactuGES.EmpresaActiva.NOMBRE; FFormasPago := Nil; FFormasPagoController := TFormasPagoController.Create; FFormasPago := FFormasPagoController.BuscarTodos; dsFormaPago.DataTable := FFormasPago.DataTable; dsFormaPago.DataTable.Active := True; ePlazosEntrega.Lines.Clear; ePlazosEntrega.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_PLAZOS_ENTREGA_VARIOS, AppFactuGES.EmpresaActiva.ID); eObservaciones.Lines.Clear; eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_VARIOS, AppFactuGES.EmpresaActiva.ID); eCondiciones.Lines.Clear; eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_VARIOS, AppFactuGES.EmpresaActiva.ID); cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_VARIOS, AppFactuGES.EmpresaActiva.ID); // eFormaPago.Lines.Clear; // eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_VARIOS); end; class function TfrViewConfiguracionDocVarios.DarEtiqueta: String; begin Result := 'Documentos varios'; end; class function TfrViewConfiguracionDocVarios.GetViewClass: TClass; begin Result := TfrViewConfiguracionDocVARIOS; end; procedure TfrViewConfiguracionDocVarios.GuardarValores; begin inherited; // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_VARIOS, eFormaPago.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_VARIOS, AppFactuGES.EmpresaActiva.ID, cbFormaPago.EditValue); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_VARIOS, AppFactuGES.EmpresaActiva.ID, ePlazosEntrega.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_VARIOS, AppFactuGES.EmpresaActiva.ID, eObservaciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_VARIOS, AppFactuGES.EmpresaActiva.ID, eCondiciones.Text); end; end.