unit uViewConfiguracionDocBano; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, uViewConfiguracionBase, cxControls, cxContainer, cxEdit, cxTextEdit, cxMemo, cxRichEdit, uViewBase, JvExControls, JvGradientHeaderPanel, StdCtrls, ExtCtrls, ComCtrls, uCustomView, uViewDetallesBase, uViewConfiguracionCapitulo, uViewDetallesDTO, uViewDetallesArticulos, cxGraphics, DB, uDAInterfaces, uDADataTable, cxMaskEdit, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, uFormasPagoController, uBizFormasPago; type TfrViewConfiguracionDocBANO = class(TfrViewConfiguracionBase) paginas: TPageControl; pagNotas: TTabSheet; Label1: TLabel; Label2: TLabel; Label4: TLabel; ePlazosEntrega: TMemo; eFormaPago: TMemo; eObservaciones: TMemo; pagCapitulo: TTabSheet; frViewConfiguracionCapitulo: TfrViewConfiguracionCapitulo; pagCondiciones: TTabSheet; 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 frViewConfiguracionDocBANO: TfrViewConfiguracionDocBANO; implementation {$R *.dfm} { TfrViewConfiguracionDocBANO } uses uFactuGES_App, uConfiguracionController, uPresupuestosClienteController, uBizDetallesPresupuestoCliente, uDetallesPresupuestoClienteController; procedure TfrViewConfiguracionDocBANO.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_BANO, AppFactuGES.EmpresaActiva.ID); eObservaciones.Lines.Clear; eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_BANO, AppFactuGES.EmpresaActiva.ID); eCondiciones.Lines.Clear; eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_BANO, AppFactuGES.EmpresaActiva.ID); cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_BANO, AppFactuGES.EmpresaActiva.ID); // eFormaPago.Lines.Clear; // eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_BANO); frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create; frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_B); end; class function TfrViewConfiguracionDocBANO.DarEtiqueta: String; begin Result := 'Documentos baņo'; end; class function TfrViewConfiguracionDocBANO.GetViewClass: TClass; begin Result := TfrViewConfiguracionDocBANO; end; procedure TfrViewConfiguracionDocBANO.GuardarValores; begin inherited; // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_BANO, eFormaPago.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_BANO, AppFactuGES.EmpresaActiva.ID, cbFormaPago.EditValue); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_BANO, AppFactuGES.EmpresaActiva.ID, ePlazosEntrega.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_BANO, AppFactuGES.EmpresaActiva.ID, eObservaciones.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_BANO, AppFactuGES.EmpresaActiva.ID, eCondiciones.Text); frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates; end; end.