Inventario: creación de pestañas de almacenes/obras un poco más rápida.

git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@728 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
David Arranz 2008-11-04 18:01:45 +00:00
parent 6eec6e6931
commit d7e17fd787
2 changed files with 31 additions and 21 deletions

View File

@ -3,7 +3,7 @@ inherited frViewInventario: TfrViewInventario
RootLevelOptions.DetailTabsPosition = dtpTop
OnActiveTabChanged = cxGridActiveTabChanged
inherited cxGridView: TcxGridDBTableView
DataController.KeyFieldNames = 'ID_ALMACEN; ID_ARTICULO'
DataController.KeyFieldNames = 'RECID'
DataController.Summary.DefaultGroupSummaryItems = <
item
Format = ',0.00 '#8364';-,0.00 '#8364

View File

@ -166,17 +166,22 @@ begin
if Assigned(FAlmacenes) then
begin
cxGridLevel.Caption := 'Todos los almacenes';
if not FAlmacenes.DataTable.Active then
FAlmacenes.DataTable.Active := True;
cxGrid.BeginUpdate;
try
cxGridLevel.Caption := 'Todos los almacenes';
if not FAlmacenes.DataTable.Active then
FAlmacenes.DataTable.Active := True;
FAlmacenes.First;
while not FAlmacenes.EOF do
begin
Nivel := cxGrid.Levels.Add;
Nivel.Caption := FAlmacenes.NOMBRE;
Nivel.Tag := FAlmacenes.ID;
FAlmacenes.Next;
FAlmacenes.First;
while not FAlmacenes.EOF do
begin
Nivel := cxGrid.Levels.Add;
Nivel.Caption := FAlmacenes.NOMBRE;
Nivel.Tag := FAlmacenes.ID;
FAlmacenes.Next;
end;
finally
cxGrid.EndUpdate;
end;
end;
end;
@ -198,17 +203,22 @@ begin
if Assigned(FObras) then
begin
cxGridLevel.Caption := 'Todos las obras';
if not FObras.DataTable.Active then
FObras.DataTable.Active := True;
cxGrid.BeginUpdate;
try
cxGridLevel.Caption := 'Todos las obras';
if not FObras.DataTable.Active then
FObras.DataTable.Active := True;
FObras.First;
while not FObras.EOF do
begin
Nivel := cxGrid.Levels.Add;
Nivel.Caption := FObras.NOMBRE;
Nivel.Tag := FObras.ID;
FObras.Next;
FObras.First;
while not FObras.EOF do
begin
Nivel := cxGrid.Levels.Add;
Nivel.Caption := FObras.NOMBRE;
Nivel.Tag := FObras.ID;
FObras.Next;
end;
finally
cxGrid.EndUpdate;
end;
end;
end;