Guardar el ancho de las columnas en el grid.

git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@634 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
David Arranz 2015-10-26 22:22:59 +00:00
parent aeec1b181f
commit bb15a17ab2
11 changed files with 42 additions and 28 deletions

View File

@ -60,7 +60,7 @@ implementation
uses uses
uDADataTable, uDAInterfaces, cxVariants; uDADataTable, uDAInterfaces, cxVariants, uDMBase;
procedure TRecordInfos.Notify(Ptr: Pointer; Action: TListNotification); procedure TRecordInfos.Notify(Ptr: Pointer; Action: TListNotification);
@ -360,6 +360,7 @@ begin
Acolumn.MinWidth := 10; Acolumn.MinWidth := 10;
if AColumn.Width > AColumn.BestFitMaxWidth then if AColumn.Width > AColumn.BestFitMaxWidth then
AColumn.Width := AColumn.BestFitMaxWidth; AColumn.Width := AColumn.BestFitMaxWidth;
//dmBase.EscribirLog(AColumn.DataBinding.FieldName + ' -> ' + IntToStr(AColumn.Width) + ' -> ' + IntToStr(AColumn.BestFitMaxWidth));
end; end;
finally finally
AView.EndUpdate; AView.EndUpdate;

View File

@ -69,13 +69,13 @@ begin
ALogFileName := ALogFileName + PathDelim + 'Rodax Software' + PathDelim + 'FactuGES' + PathDelim; ALogFileName := ALogFileName + PathDelim + 'Rodax Software' + PathDelim + 'FactuGES' + PathDelim;
if SysUtils.ForceDirectories(ALogFileName) then if SysUtils.ForceDirectories(ALogFileName) then
begin begin
{SE COMENTA PORQUE TUESTA LA PARTE CLIENTE SI SE DESEA ARREGLAR ACTUALIZAR LAS JV de tecsitel //SE COMENTA PORQUE TUESTA LA PARTE CLIENTE SI SE DESEA ARREGLAR ACTUALIZAR LAS JV de tecsitel
JvLogFile.Active := False; JvLogFile.Active := False;
JvLogFile.FileName := ALogFileName + 'ClientLog.txt'; JvLogFile.FileName := ALogFileName + 'ClientLog.txt';
JvLogFile.AutoSave := True; JvLogFile.AutoSave := True;
JvLogFile.Active := True; JvLogFile.Active := True;
JvLogFile.Clear; JvLogFile.Clear;
}
end end
else else
raise Exception.Create('Error al crear directorio para Log: ' + IntToStr(GetLastError)); raise Exception.Create('Error al crear directorio para Log: ' + IntToStr(GetLastError));
@ -143,14 +143,14 @@ end;
procedure TdmBase.EscribirLog(const AMensaje: String); procedure TdmBase.EscribirLog(const AMensaje: String);
begin begin
{
FEscribirLog.Acquire; FEscribirLog.Acquire;
try try
JvLogFile.Add(AMensaje); JvLogFile.Add(AMensaje);
finally finally
FEscribirLog.Release; FEscribirLog.Release;
end; end;
}
end; end;
end. end.

View File

@ -52,7 +52,7 @@
<Borland.Personality>Delphi.Personality</Borland.Personality> <Borland.Personality>Delphi.Personality</Borland.Personality>
<Borland.ProjectType>VCLApplication</Borland.ProjectType> <Borland.ProjectType>VCLApplication</Borland.ProjectType>
<BorlandProject> <BorlandProject>
<BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">2</VersionInfo><VersionInfo Name="MinorVer">6</VersionInfo><VersionInfo Name="Release">9</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">2.6.9.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">2.6.9.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages> <BorlandProject><Delphi.Personality><Parameters><Parameters Name="UseLauncher">False</Parameters><Parameters Name="LoadAllSymbols">True</Parameters><Parameters Name="LoadUnspecifiedSymbols">False</Parameters></Parameters><Language><Language Name="RootDir">C:\Archivos de programa\Borland\Delphi7\Bin\</Language></Language><VersionInfo><VersionInfo Name="IncludeVerInfo">True</VersionInfo><VersionInfo Name="AutoIncBuild">False</VersionInfo><VersionInfo Name="MajorVer">2</VersionInfo><VersionInfo Name="MinorVer">7</VersionInfo><VersionInfo Name="Release">0</VersionInfo><VersionInfo Name="Build">0</VersionInfo><VersionInfo Name="Debug">False</VersionInfo><VersionInfo Name="PreRelease">False</VersionInfo><VersionInfo Name="Special">False</VersionInfo><VersionInfo Name="Private">False</VersionInfo><VersionInfo Name="DLL">False</VersionInfo><VersionInfo Name="Locale">3082</VersionInfo><VersionInfo Name="CodePage">1252</VersionInfo></VersionInfo><VersionInfoKeys><VersionInfoKeys Name="CompanyName">Rodax Software S.L.</VersionInfoKeys><VersionInfoKeys Name="FileDescription"></VersionInfoKeys><VersionInfoKeys Name="FileVersion">2.7.0.0</VersionInfoKeys><VersionInfoKeys Name="InternalName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys><VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys><VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys><VersionInfoKeys Name="ProductName">FactuGES</VersionInfoKeys><VersionInfoKeys Name="ProductVersion">2.7.0.0</VersionInfoKeys><VersionInfoKeys Name="Comments"></VersionInfoKeys></VersionInfoKeys><Excluded_Packages>
<Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages> <Excluded_Packages Name="C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl">File C:\Documents and Settings\All Users\Documentos\RAD Studio\5.0\Bpl\dxPScxScheduler2LnkD11.bpl not found</Excluded_Packages>
</Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject> </Excluded_Packages><Source><Source Name="MainSource">FactuGES.dpr</Source></Source></Delphi.Personality><ModelSupport>False</ModelSupport></BorlandProject></BorlandProject>

View File

@ -1,7 +1,7 @@
MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Factuges.ico" MAINICON ICON "C:\Codigo Acana\Resources\Iconos\Factuges.ico"
1 VERSIONINFO 1 VERSIONINFO
FILEVERSION 2,6,9,0 FILEVERSION 2,7,0,0
PRODUCTVERSION 2,6,9,0 PRODUCTVERSION 2,7,0,0
FILEFLAGSMASK 0x3FL FILEFLAGSMASK 0x3FL
FILEFLAGS 0x00L FILEFLAGS 0x00L
FILEOS 0x40004L FILEOS 0x40004L
@ -13,10 +13,10 @@ BEGIN
BLOCK "0C0A04E4" BLOCK "0C0A04E4"
BEGIN BEGIN
VALUE "CompanyName", "Rodax Software S.L.\0" VALUE "CompanyName", "Rodax Software S.L.\0"
VALUE "FileVersion", "2.6.9.0\0" VALUE "FileVersion", "2.7.0.0\0"
VALUE "InternalName", "FactuGES\0" VALUE "InternalName", "FactuGES\0"
VALUE "ProductName", "FactuGES\0" VALUE "ProductName", "FactuGES\0"
VALUE "ProductVersion", "2.6.9.0\0" VALUE "ProductVersion", "2.7.0.0\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

Binary file not shown.

View File

@ -147,13 +147,15 @@ inherited frViewDetallesBase: TfrViewDetallesBase
end end
object cxGrid: TcxGrid object cxGrid: TcxGrid
Left = 0 Left = 0
Top = 72 Top = 75
Width = 451 Width = 451
Height = 232 Height = 229
Align = alClient Align = alClient
TabOrder = 1 TabOrder = 1
LookAndFeel.Kind = lfStandard LookAndFeel.Kind = lfStandard
LookAndFeel.NativeStyle = True LookAndFeel.NativeStyle = True
ExplicitTop = 72
ExplicitHeight = 232
object cxGridView: TcxGridDBTableView object cxGridView: TcxGridDBTableView
OnKeyDown = cxGridViewKeyDown OnKeyDown = cxGridViewKeyDown
NavigatorButtons.ConfirmDelete = False NavigatorButtons.ConfirmDelete = False
@ -385,7 +387,7 @@ inherited frViewDetallesBase: TfrViewDetallesBase
Left = 0 Left = 0
Top = 46 Top = 46
Width = 451 Width = 451
Height = 26 Height = 29
BackgroundOnToolbars = False BackgroundOnToolbars = False
UseParentBackground = True UseParentBackground = True
object TBXToolbar1: TTBXToolbar object TBXToolbar1: TTBXToolbar

View File

@ -314,7 +314,6 @@ begin
end; end;
procedure TfrViewDetallesBase.AjustarAncho; procedure TfrViewDetallesBase.AjustarAncho;
begin begin
if Assigned(_FocusedView) then begin if Assigned(_FocusedView) then begin
@ -754,7 +753,7 @@ begin
if Assigned(FDetalles) then if Assigned(FDetalles) then
begin begin
DADataSource.DataTable := FDetalles.DataTable; DADataSource.DataTable := FDetalles.DataTable;
//RestoreFromIniFile; // la restauración de las columnas sólo funciona cuando hay datos. RestoreFromIniFile; // la restauración de las columnas sólo funciona cuando hay datos.
AjustarAncho; AjustarAncho;
end end
else else

View File

@ -343,6 +343,7 @@ begin
inherited; inherited;
if Assigned(_FocusedView) then if Assigned(_FocusedView) then
begin begin
// AjustarAncho; <- No activar porque pisa los anchos que ha puesto el usuario.
AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data AIniFile := GetSpecialFolderPath(CSIDL_APPDATA); //[Current Users]\Application Data
AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim; AIniFile := AIniFile + PathDelim + 'Rodax Software' + PathDelim + GetAppName + PathDelim;
@ -352,13 +353,14 @@ begin
_FocusedView.RestoreFromIniFile(AIniFile + 'grid.xml', True, False, []); _FocusedView.RestoreFromIniFile(AIniFile + 'grid.xml', True, False, []);
end; end;
AjustarAncho;
end; end;
procedure TfrViewGridBase.RestoreFromRegistry(const Path: String); procedure TfrViewGridBase.RestoreFromRegistry(const Path: String);
begin begin
if Assigned(_FocusedView) then if Assigned(_FocusedView) then
begin
_FocusedView.RestoreFromRegistry(Path + '\\GridSettings\\' + Self.Name, False, False, [], Self.Name); _FocusedView.RestoreFromRegistry(Path + '\\GridSettings\\' + Self.Name, False, False, [], Self.Name);
end;
end; end;
procedure TfrViewGridBase.RestoreGridStatus; procedure TfrViewGridBase.RestoreGridStatus;
@ -450,7 +452,6 @@ begin
ForceDirectories(AIniFile); ForceDirectories(AIniFile);
_FocusedView.StoreToIniFile(AIniFile + 'grid.xml', False, []); _FocusedView.StoreToIniFile(AIniFile + 'grid.xml', False, []);
// _FocusedView.StoreToRegistry(Path + '\\GridSettings\\' + Self.Name, False, [], Self.Name);
end; end;
end; end;
@ -458,7 +459,9 @@ procedure TfrViewGridBase.StoreToRegistry(const Path: String);
begin begin
inherited; inherited;
if Assigned(_FocusedView) then if Assigned(_FocusedView) then
begin
_FocusedView.StoreToRegistry(Path + '\\GridSettings\\' + Self.Name, False, [], Self.Name); _FocusedView.StoreToRegistry(Path + '\\GridSettings\\' + Self.Name, False, [], Self.Name);
end;
end; end;
procedure TfrViewGridBase.FiltrarGrid(TextoFiltro : String); procedure TfrViewGridBase.FiltrarGrid(TextoFiltro : String);

View File

@ -95,16 +95,25 @@ object RptPedidosProveedor: TRptPedidosProveedor
'ENDEDOR,'#10' PROVEEDOR.NOMBRE,'#10' PROVEEDOR.FAX,'#10#10' CONTRATOS_CLIEN' + 'ENDEDOR,'#10' PROVEEDOR.NOMBRE,'#10' PROVEEDOR.FAX,'#10#10' CONTRATOS_CLIEN' +
'TE.referencia as referencia_contrato,'#10' CONTRATOS_CLIENTE.refere' + 'TE.referencia as referencia_contrato,'#10' CONTRATOS_CLIENTE.refere' +
'ncia_CLIENTE,'#10' CLIENTES.NOMBRE AS NOMBRE_CLIENTE,'#10' '#10' PEDIDOS_' + 'ncia_CLIENTE,'#10' CLIENTES.NOMBRE AS NOMBRE_CLIENTE,'#10' '#10' PEDIDOS_' +
'PROVEEDOR.ID_ALMACEN,'#10' PEDIDOS_PROVEEDOR.CALLE,'#10' PEDIDOS_PROVE' + 'PROVEEDOR.ID_ALMACEN,'#10' '#10' IIF ((PEDIDOS_PROVEEDOR.ID_ALMACEN = ' +
'EDOR.POBLACION,'#10' PEDIDOS_PROVEEDOR.PROVINCIA,'#10' PEDIDOS_PROVEED' + '0), PEDIDOS_PROVEEDOR.CALLE, ALMACENES.CALLE) AS CALLE,'#10' IIF ((' +
'OR.CODIGO_POSTAL,'#10' PEDIDOS_PROVEEDOR.PERSONA_CONTACTO,'#10' PEDIDO' + 'PEDIDOS_PROVEEDOR.ID_ALMACEN = 0), PEDIDOS_PROVEEDOR.POBLACION, ' +
'S_PROVEEDOR.TELEFONO'#10#10'FROM'#10' PEDIDOS_PROVEEDOR'#10' LEFT OUTER JOIN' + 'ALMACENES.POBLACION) AS POBLACION,'#10' IIF ((PEDIDOS_PROVEEDOR.ID_' +
' CONTACTOS PROVEEDOR ON (PROVEEDOR .ID = PEDIDOS_PROVEEDOR.ID_PR' + 'ALMACEN = 0), PEDIDOS_PROVEEDOR.PROVINCIA, ALMACENES.PROVINCIA) ' +
'OVEEDOR)'#10' LEFT OUTER JOIN CONTACTOS VENDEDORES ON (VENDEDORES.I' + 'AS PROVINCIA,'#10' IIF ((PEDIDOS_PROVEEDOR.ID_ALMACEN = 0), PEDIDOS' +
'D = PEDIDOS_PROVEEDOR.ID_VENDEDOR)'#10' LEFT OUTER JOIN CONTRATOS_C' + '_PROVEEDOR.CODIGO_POSTAL, ALMACENES.CODIGO_POSTAL) AS CODIGO_POS' +
'LIENTE ON (CONTRATOS_CLIENTE.ID = PEDIDOS_PROVEEDOR.ID_CONTRATO_' + 'TAL,'#10' IIF ((PEDIDOS_PROVEEDOR.ID_ALMACEN = 0), PEDIDOS_PROVEEDO' +
'CLIENTE)'#10' LEFT OUTER JOIN CONTACTOS CLIENTES ON (CLIENTES.ID = ' + 'R.PERSONA_CONTACTO, ALMACENES.PERSONA_CONTACTO) AS PERSONA_CONTA' +
'CONTRATOS_CLIENTE.ID_CLIENTE)'#10'WHERE PEDIDOS_PROVEEDOR.ID = :ID'#10 'CTO,'#10' IIF ((PEDIDOS_PROVEEDOR.ID_ALMACEN = 0), PEDIDOS_PROVEEDO' +
'R.TELEFONO, ALMACENES.TELEFONO) AS TELEFONO'#10#10'FROM'#10' PEDIDOS_PROV' +
'EEDOR'#10' LEFT OUTER JOIN CONTACTOS PROVEEDOR ON (PROVEEDOR .ID = ' +
'PEDIDOS_PROVEEDOR.ID_PROVEEDOR)'#10' LEFT OUTER JOIN CONTACTOS VEND' +
'EDORES ON (VENDEDORES.ID = PEDIDOS_PROVEEDOR.ID_VENDEDOR)'#10' LEFT' +
' OUTER JOIN CONTRATOS_CLIENTE ON (CONTRATOS_CLIENTE.ID = PEDIDOS' +
'_PROVEEDOR.ID_CONTRATO_CLIENTE)'#10' LEFT OUTER JOIN CONTACTOS CLIE' +
'NTES ON (CLIENTES.ID = CONTRATOS_CLIENTE.ID_CLIENTE)'#10' LEFT OUTE' +
'R JOIN ALMACENES ON (ALMACENES.ID = PEDIDOS_PROVEEDOR.ID_ALMACEN' +
')'#10'WHERE PEDIDOS_PROVEEDOR.ID = :ID'#10
StatementType = stSQL StatementType = stSQL
ColumnMappings = < ColumnMappings = <
item item

View File

@ -16,7 +16,7 @@ BEGIN
VALUE "FileVersion", "2.6.9.0\0" VALUE "FileVersion", "2.6.9.0\0"
VALUE "ProductName", "FactuGES (Servidor)\0" VALUE "ProductName", "FactuGES (Servidor)\0"
VALUE "ProductVersion", "2.6.9.0\0" VALUE "ProductVersion", "2.6.9.0\0"
VALUE "CompileDate", "viernes, 23 de octubre de 2015 14:13\0" VALUE "CompileDate", "lunes, 26 de octubre de 2015 22:39\0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"

Binary file not shown.