Artículos: referencia del fabricante en los grid de detalles.
git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@341 0c75b7a4-871f-7646-8a2f-f78d34cc349f
This commit is contained in:
parent
6bb2c6c607
commit
a0f44df1f7
@ -54,13 +54,13 @@
|
|||||||
<DelphiCompile Include="Articulos_view.dpk">
|
<DelphiCompile Include="Articulos_view.dpk">
|
||||||
<MainSource>MainSource</MainSource>
|
<MainSource>MainSource</MainSource>
|
||||||
</DelphiCompile>
|
</DelphiCompile>
|
||||||
<DCCReference Include="..\..\Lib\Articulos_controller.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_controller.dcp" />
|
||||||
<DCCReference Include="..\..\Lib\Articulos_model.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_model.dcp" />
|
||||||
<DCCReference Include="..\..\Lib\Contactos_view.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\Contactos_view.dcp" />
|
||||||
<DCCReference Include="..\..\Lib\Fabricantes_controller.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\Fabricantes_controller.dcp" />
|
||||||
<DCCReference Include="..\..\Lib\Familias_controller.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\Familias_controller.dcp" />
|
||||||
<DCCReference Include="..\..\Lib\GUIBase.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
|
||||||
<DCCReference Include="..\..\Lib\UnidadesMedida_controller.dcp" />
|
<DCCReference Include="C:\Documents and Settings\Usuario\UnidadesMedida_controller.dcp" />
|
||||||
<DCCReference Include="uArticulosViewRegister.pas" />
|
<DCCReference Include="uArticulosViewRegister.pas" />
|
||||||
<DCCReference Include="uEditorArticulo.pas">
|
<DCCReference Include="uEditorArticulo.pas">
|
||||||
<Form>fEditorArticulo</Form>
|
<Form>fEditorArticulo</Form>
|
||||||
|
|||||||
@ -85,6 +85,12 @@ inherited frViewArticulos: TfrViewArticulos
|
|||||||
DataBinding.FieldName = 'FABRICANTE'
|
DataBinding.FieldName = 'FABRICANTE'
|
||||||
BestFitMaxWidth = 80
|
BestFitMaxWidth = 80
|
||||||
end
|
end
|
||||||
|
object cxGridViewREFERENCIA_FABR: TcxGridDBColumn
|
||||||
|
Caption = 'Ref. fabricante'
|
||||||
|
DataBinding.FieldName = 'REFERENCIA_FABRICANTE'
|
||||||
|
BestFitMaxWidth = 60
|
||||||
|
Width = 60
|
||||||
|
end
|
||||||
object cxGridViewDESCRIPCION: TcxGridDBColumn
|
object cxGridViewDESCRIPCION: TcxGridDBColumn
|
||||||
Caption = 'Descripci'#243'n'
|
Caption = 'Descripci'#243'n'
|
||||||
DataBinding.FieldName = 'DESCRIPCION'
|
DataBinding.FieldName = 'DESCRIPCION'
|
||||||
|
|||||||
@ -42,6 +42,7 @@ type
|
|||||||
TBXItem4: TTBXItem;
|
TBXItem4: TTBXItem;
|
||||||
TBXSeparatorItem3: TTBXSeparatorItem;
|
TBXSeparatorItem3: TTBXSeparatorItem;
|
||||||
actFabricante: TAction;
|
actFabricante: TAction;
|
||||||
|
cxGridViewREFERENCIA_FABR: TcxGridDBColumn;
|
||||||
procedure cxGridViewIDCustomDrawCell(
|
procedure cxGridViewIDCustomDrawCell(
|
||||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||||
|
|||||||
@ -2,32 +2,66 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
|
|||||||
ParentBiDiMode = False
|
ParentBiDiMode = False
|
||||||
OnShow = CustomViewShow
|
OnShow = CustomViewShow
|
||||||
inherited ToolBar1: TToolBar
|
inherited ToolBar1: TToolBar
|
||||||
Height = 100
|
Height = 73
|
||||||
ExplicitHeight = 100
|
ExplicitHeight = 73
|
||||||
inherited ToolButton14: TToolButton
|
inherited ToolButton3: TToolButton
|
||||||
Wrap = False
|
Wrap = False
|
||||||
end
|
end
|
||||||
inherited ToolButton9: TToolButton [5]
|
inherited ToolButton4: TToolButton
|
||||||
Left = 121
|
Left = 278
|
||||||
|
Top = 0
|
||||||
|
ExplicitLeft = 278
|
||||||
|
ExplicitTop = 0
|
||||||
|
end
|
||||||
|
inherited ToolButton14: TToolButton
|
||||||
|
Left = 334
|
||||||
|
Top = 0
|
||||||
|
ExplicitLeft = 334
|
||||||
|
ExplicitTop = 0
|
||||||
|
end
|
||||||
|
inherited FontName: TJvFontComboBox
|
||||||
Top = 22
|
Top = 22
|
||||||
ExplicitLeft = 121
|
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
end
|
end
|
||||||
inherited FontName: TJvFontComboBox [6]
|
inherited FontSize: TEdit
|
||||||
Left = 266
|
|
||||||
Top = 22
|
Top = 22
|
||||||
ExplicitLeft = 266
|
Width = 42
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
|
ExplicitWidth = 42
|
||||||
end
|
end
|
||||||
inherited UpDown1: TUpDown
|
inherited UpDown1: TUpDown
|
||||||
Left = 411
|
Left = 187
|
||||||
Top = 22
|
Top = 22
|
||||||
Width = 17
|
Width = 17
|
||||||
ExplicitLeft = 411
|
ExplicitLeft = 187
|
||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
ExplicitWidth = 17
|
ExplicitWidth = 17
|
||||||
end
|
end
|
||||||
inherited ToolButton13: TToolButton
|
inherited ToolButton13: TToolButton
|
||||||
|
Left = 204
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 204
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton6: TToolButton
|
||||||
|
Left = 212
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 212
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton7: TToolButton
|
||||||
|
Left = 278
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 278
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton8: TToolButton
|
||||||
|
Left = 345
|
||||||
|
Top = 22
|
||||||
|
ExplicitLeft = 345
|
||||||
|
ExplicitTop = 22
|
||||||
|
end
|
||||||
|
inherited ToolButton12: TToolButton
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 22
|
Top = 22
|
||||||
Wrap = True
|
Wrap = True
|
||||||
@ -35,56 +69,29 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
|
|||||||
ExplicitTop = 22
|
ExplicitTop = 22
|
||||||
ExplicitHeight = 27
|
ExplicitHeight = 27
|
||||||
end
|
end
|
||||||
inherited ToolButton6: TToolButton
|
inherited ToolButton9: TToolButton
|
||||||
Left = 0
|
Left = 0
|
||||||
Top = 49
|
Top = 49
|
||||||
ExplicitLeft = 0
|
ExplicitLeft = 0
|
||||||
ExplicitTop = 49
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton7: TToolButton
|
|
||||||
Left = 66
|
|
||||||
Top = 49
|
|
||||||
ExplicitLeft = 66
|
|
||||||
ExplicitTop = 49
|
|
||||||
end
|
|
||||||
inherited FontSize: TEdit [11]
|
|
||||||
Left = 133
|
|
||||||
Top = 49
|
|
||||||
Width = 42
|
|
||||||
ExplicitLeft = 133
|
|
||||||
ExplicitTop = 49
|
|
||||||
ExplicitWidth = 42
|
|
||||||
end
|
|
||||||
inherited ToolButton11: TToolButton [12]
|
|
||||||
Left = 175
|
|
||||||
Top = 49
|
|
||||||
ExplicitLeft = 175
|
|
||||||
ExplicitTop = 49
|
|
||||||
end
|
|
||||||
inherited ToolButton12: TToolButton [13]
|
|
||||||
Left = 0
|
|
||||||
Top = 49
|
|
||||||
Wrap = True
|
|
||||||
ExplicitLeft = 0
|
|
||||||
ExplicitTop = 49
|
|
||||||
ExplicitHeight = 27
|
|
||||||
end
|
|
||||||
inherited ToolButton10: TToolButton
|
inherited ToolButton10: TToolButton
|
||||||
Left = 0
|
Left = 145
|
||||||
Top = 76
|
Top = 49
|
||||||
ExplicitLeft = 0
|
ExplicitLeft = 145
|
||||||
ExplicitTop = 76
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
inherited ToolButton8: TToolButton [15]
|
inherited ToolButton11: TToolButton
|
||||||
Left = 125
|
Left = 270
|
||||||
Top = 76
|
Top = 49
|
||||||
ExplicitLeft = 125
|
ExplicitLeft = 270
|
||||||
ExplicitTop = 76
|
ExplicitTop = 49
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited cxGrid: TcxGrid
|
inherited cxGrid: TcxGrid
|
||||||
Top = 126
|
Top = 99
|
||||||
Height = 178
|
Height = 205
|
||||||
|
ExplicitTop = 99
|
||||||
ExplicitHeight = 205
|
ExplicitHeight = 205
|
||||||
inherited cxGridView: TcxGridDBTableView
|
inherited cxGridView: TcxGridDBTableView
|
||||||
inherited cxGridViewTIPO: TcxGridDBColumn
|
inherited cxGridViewTIPO: TcxGridDBColumn
|
||||||
@ -107,14 +114,33 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
|
|||||||
end>
|
end>
|
||||||
Properties.OnButtonClick = cxGridViewREFERENCIAPropertiesButtonClick
|
Properties.OnButtonClick = cxGridViewREFERENCIAPropertiesButtonClick
|
||||||
BestFitMaxWidth = 50
|
BestFitMaxWidth = 50
|
||||||
Width = 90
|
Width = 50
|
||||||
end
|
end
|
||||||
object cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn [6]
|
object cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn [6]
|
||||||
Caption = 'Ref. proveedor'
|
Caption = 'Ref. proveedor'
|
||||||
DataBinding.FieldName = 'REFERENCIA_PROVEEDOR'
|
DataBinding.FieldName = 'REFERENCIA_PROVEEDOR'
|
||||||
PropertiesClassName = 'TcxTextEditProperties'
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = cxGridViewREFERENCIA_PROVEEDORPropertiesButtonClick
|
||||||
BestFitMaxWidth = 50
|
BestFitMaxWidth = 50
|
||||||
Width = 90
|
Width = 50
|
||||||
|
end
|
||||||
|
object cxGridViewREFERENCIA_FABRICANTE: TcxGridDBColumn [7]
|
||||||
|
Caption = 'Ref. fabricante'
|
||||||
|
DataBinding.FieldName = 'REFERENCIA_FABRICANTE'
|
||||||
|
PropertiesClassName = 'TcxButtonEditProperties'
|
||||||
|
Properties.Buttons = <
|
||||||
|
item
|
||||||
|
Default = True
|
||||||
|
Kind = bkEllipsis
|
||||||
|
end>
|
||||||
|
Properties.OnButtonClick = cxGridViewREFERENCIA_FABRICANTEPropertiesButtonClick
|
||||||
|
BestFitMaxWidth = 50
|
||||||
|
Width = 50
|
||||||
end
|
end
|
||||||
inherited cxGridViewDESCRIPCION: TcxGridDBColumn
|
inherited cxGridViewDESCRIPCION: TcxGridDBColumn
|
||||||
Width = 298
|
Width = 298
|
||||||
@ -123,7 +149,7 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
|
|||||||
BestFitMaxWidth = 50
|
BestFitMaxWidth = 50
|
||||||
Width = 91
|
Width = 91
|
||||||
end
|
end
|
||||||
object cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn [9]
|
object cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn [10]
|
||||||
Caption = 'Unid. medida'
|
Caption = 'Unid. medida'
|
||||||
PropertiesClassName = 'TcxComboBoxProperties'
|
PropertiesClassName = 'TcxComboBoxProperties'
|
||||||
Properties.ImmediatePost = True
|
Properties.ImmediatePost = True
|
||||||
@ -154,7 +180,7 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
inherited TBXDock1: TTBXDock
|
inherited TBXDock1: TTBXDock
|
||||||
Top = 100
|
Top = 73
|
||||||
ExplicitWidth = 451
|
ExplicitWidth = 451
|
||||||
inherited TBXToolbar1: TTBXToolbar
|
inherited TBXToolbar1: TTBXToolbar
|
||||||
inherited TBXSubmenuItem1: TTBXSubmenuItem
|
inherited TBXSubmenuItem1: TTBXSubmenuItem
|
||||||
|
|||||||
@ -27,6 +27,7 @@ type
|
|||||||
actBuscarArticulo: TAction;
|
actBuscarArticulo: TAction;
|
||||||
TBXSeparatorItem8: TTBXSeparatorItem;
|
TBXSeparatorItem8: TTBXSeparatorItem;
|
||||||
TBXItem17: TTBXItem;
|
TBXItem17: TTBXItem;
|
||||||
|
cxGridViewREFERENCIA_FABRICANTE: TcxGridDBColumn;
|
||||||
procedure CustomViewCreate(Sender: TObject);
|
procedure CustomViewCreate(Sender: TObject);
|
||||||
procedure CustomViewDestroy(Sender: TObject);
|
procedure CustomViewDestroy(Sender: TObject);
|
||||||
procedure actAnadirArticulosExecute(Sender: TObject);
|
procedure actAnadirArticulosExecute(Sender: TObject);
|
||||||
@ -41,6 +42,10 @@ type
|
|||||||
procedure actDetalleCopiarExecute(Sender: TObject);
|
procedure actDetalleCopiarExecute(Sender: TObject);
|
||||||
procedure actDetallePegarExecute(Sender: TObject);
|
procedure actDetallePegarExecute(Sender: TObject);
|
||||||
procedure actDetalleCortarExecute(Sender: TObject);
|
procedure actDetalleCortarExecute(Sender: TObject);
|
||||||
|
procedure cxGridViewREFERENCIA_PROVEEDORPropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
procedure cxGridViewREFERENCIA_FABRICANTEPropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
private
|
private
|
||||||
procedure RecuperarListaUnidadesMedida;
|
procedure RecuperarListaUnidadesMedida;
|
||||||
protected
|
protected
|
||||||
@ -110,6 +115,20 @@ begin
|
|||||||
cxGridViewUNIDAD_MEDIDA.Visible := False;
|
cxGridViewUNIDAD_MEDIDA.Visible := False;
|
||||||
cxGridViewUNIDAD_MEDIDA.VisibleForCustomization := False;
|
cxGridViewUNIDAD_MEDIDA.VisibleForCustomization := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
if Assigned(FindField('REFERENCIA_FABRICANTE')) then
|
||||||
|
begin
|
||||||
|
cxGridViewREFERENCIA_FABRICANTE.DataBinding.FieldName := 'REFERENCIA_FABRICANTE';
|
||||||
|
cxGridViewREFERENCIA_FABRICANTE.Visible := True;
|
||||||
|
cxGridViewREFERENCIA_FABRICANTE.VisibleForCustomization := True;
|
||||||
|
end
|
||||||
|
else begin
|
||||||
|
cxGridViewREFERENCIA_FABRICANTE.DataBinding.FieldName := '';
|
||||||
|
cxGridViewREFERENCIA_FABRICANTE.Visible := False;
|
||||||
|
cxGridViewREFERENCIA_FABRICANTE.VisibleForCustomization := False;
|
||||||
|
end;
|
||||||
|
|
||||||
finally
|
finally
|
||||||
cxGridView.EndUpdate;
|
cxGridView.EndUpdate;
|
||||||
end;
|
end;
|
||||||
@ -125,6 +144,20 @@ begin
|
|||||||
actBuscarArticulo.Execute;
|
actBuscarArticulo.Execute;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewDetallesArticulos.cxGridViewREFERENCIA_FABRICANTEPropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
actBuscarArticulo.Execute;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrViewDetallesArticulos.cxGridViewREFERENCIA_PROVEEDORPropertiesButtonClick(
|
||||||
|
Sender: TObject; AButtonIndex: Integer);
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
actBuscarArticulo.Execute;
|
||||||
|
end;
|
||||||
|
|
||||||
function TfrViewDetallesArticulos.EsTipoEditable(
|
function TfrViewDetallesArticulos.EsTipoEditable(
|
||||||
AItem: TcxCustomGridTableItem): Boolean;
|
AItem: TcxCustomGridTableItem): Boolean;
|
||||||
var
|
var
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user