unit uViewConfiguracionDocPresupuesto; 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, uViewDetallesDTO, uViewDetallesArticulos, uViewConfiguracionCapitulo, cxGraphics, cxMaskEdit, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit, cxDBLookupComboBox, DB, uDAInterfaces, uDADataTable, uFormasPagoController, uBizFormasPago; type TfrViewConfiguracionDocPresupuesto = 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; dsFormaPago: TDADataSource; cbFormaPago: TcxLookupComboBox; protected FFormasPago : IBizFormaPago; FFormasPagoController : IFormasPagoController; public class function GetViewClass : TClass; override; class function DarEtiqueta : String; override; procedure CargarValores; override; procedure GuardarValores; override; end; var frViewConfiguracionDocPresupuesto: TfrViewConfiguracionDocPresupuesto; implementation {$R *.dfm} { TfrViewConfiguracionDocPresupuesto } uses uFactuGES_App, uTypesConstConfiguration, uPresupuestosClienteController, uBizPresupuestosCliente, uBizDetallesPresupuestoCliente, uDetallesPresupuestoClienteController; procedure TfrViewConfiguracionDocPresupuesto.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_PRESUPUESTOS, AppFactuGES.EmpresaActiva.ID); eObservaciones.Lines.Clear; eObservaciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_OBSERVACIONES_PRESUPUESTOS, AppFactuGES.EmpresaActiva.ID); // eCondiciones.Lines.Clear; // eCondiciones.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_CONDICIONES_PRESUPUESTOS, AppFactuGES.EmpresaActiva.ID); // cbFormaPago.EditValue := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_PRESUPUESTOS, AppFactuGES.EmpresaActiva.ID); // eFormaPago.Lines.Clear; // eFormaPago.Text := AppFactuGES.Configuracion.GetSettingAsString(teBD,CTE_FORMA_PAGO_OBRA); // frViewConfiguracionCapitulo.Controller := TDetallesPresupuestoClienteController.Create; // frViewConfiguracionCapitulo.Detalles := (frViewConfiguracionCapitulo.Controller as IDetallesPresupuestoClienteController).BuscarCapitulo(TIPO_CAPITULO_O); end; class function TfrViewConfiguracionDocPresupuesto.DarEtiqueta: String; begin Result := 'Documentos de Presupuesto'; end; class function TfrViewConfiguracionDocPresupuesto.GetViewClass: TClass; begin Result := TfrViewConfiguracionDocPresupuesto; end; procedure TfrViewConfiguracionDocPresupuesto.GuardarValores; begin inherited; // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_PRESUPUESTOS, eFormaPago.Text); // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_FORMA_PAGO_PRESUPUESTOS, AppFactuGES.EmpresaActiva.ID, cbFormaPago.EditValue); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_PLAZOS_ENTREGA_PRESUPUESTOS, AppFactuGES.EmpresaActiva.ID, ePlazosEntrega.Text); AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_OBSERVACIONES_PRESUPUESTOS, AppFactuGES.EmpresaActiva.ID, eObservaciones.Text); // AppFactuGES.Configuracion.SetSettingAsString(teBD, CTE_CONDICIONES_PRESUPUESTOS, AppFactuGES.EmpresaActiva.ID, eCondiciones.Text); // frViewConfiguracionCapitulo.Detalles.DataTable.ApplyUpdates; end; end.