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">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="..\..\Lib\Articulos_controller.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Articulos_model.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Contactos_view.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Fabricantes_controller.dcp" />
|
||||
<DCCReference Include="..\..\Lib\Familias_controller.dcp" />
|
||||
<DCCReference Include="..\..\Lib\GUIBase.dcp" />
|
||||
<DCCReference Include="..\..\Lib\UnidadesMedida_controller.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_controller.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Articulos_model.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Contactos_view.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Fabricantes_controller.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\Familias_controller.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\GUIBase.dcp" />
|
||||
<DCCReference Include="C:\Documents and Settings\Usuario\UnidadesMedida_controller.dcp" />
|
||||
<DCCReference Include="uArticulosViewRegister.pas" />
|
||||
<DCCReference Include="uEditorArticulo.pas">
|
||||
<Form>fEditorArticulo</Form>
|
||||
|
||||
@ -85,6 +85,12 @@ inherited frViewArticulos: TfrViewArticulos
|
||||
DataBinding.FieldName = 'FABRICANTE'
|
||||
BestFitMaxWidth = 80
|
||||
end
|
||||
object cxGridViewREFERENCIA_FABR: TcxGridDBColumn
|
||||
Caption = 'Ref. fabricante'
|
||||
DataBinding.FieldName = 'REFERENCIA_FABRICANTE'
|
||||
BestFitMaxWidth = 60
|
||||
Width = 60
|
||||
end
|
||||
object cxGridViewDESCRIPCION: TcxGridDBColumn
|
||||
Caption = 'Descripci'#243'n'
|
||||
DataBinding.FieldName = 'DESCRIPCION'
|
||||
|
||||
@ -42,6 +42,7 @@ type
|
||||
TBXItem4: TTBXItem;
|
||||
TBXSeparatorItem3: TTBXSeparatorItem;
|
||||
actFabricante: TAction;
|
||||
cxGridViewREFERENCIA_FABR: TcxGridDBColumn;
|
||||
procedure cxGridViewIDCustomDrawCell(
|
||||
Sender: TcxCustomGridTableView; ACanvas: TcxCanvas;
|
||||
AViewInfo: TcxGridTableDataCellViewInfo; var ADone: Boolean);
|
||||
|
||||
@ -2,32 +2,66 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
|
||||
ParentBiDiMode = False
|
||||
OnShow = CustomViewShow
|
||||
inherited ToolBar1: TToolBar
|
||||
Height = 100
|
||||
ExplicitHeight = 100
|
||||
inherited ToolButton14: TToolButton
|
||||
Height = 73
|
||||
ExplicitHeight = 73
|
||||
inherited ToolButton3: TToolButton
|
||||
Wrap = False
|
||||
end
|
||||
inherited ToolButton9: TToolButton [5]
|
||||
Left = 121
|
||||
inherited ToolButton4: TToolButton
|
||||
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
|
||||
ExplicitLeft = 121
|
||||
ExplicitTop = 22
|
||||
end
|
||||
inherited FontName: TJvFontComboBox [6]
|
||||
Left = 266
|
||||
inherited FontSize: TEdit
|
||||
Top = 22
|
||||
ExplicitLeft = 266
|
||||
Width = 42
|
||||
ExplicitTop = 22
|
||||
ExplicitWidth = 42
|
||||
end
|
||||
inherited UpDown1: TUpDown
|
||||
Left = 411
|
||||
Left = 187
|
||||
Top = 22
|
||||
Width = 17
|
||||
ExplicitLeft = 411
|
||||
ExplicitLeft = 187
|
||||
ExplicitTop = 22
|
||||
ExplicitWidth = 17
|
||||
end
|
||||
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
|
||||
Top = 22
|
||||
Wrap = True
|
||||
@ -35,56 +69,29 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
|
||||
ExplicitTop = 22
|
||||
ExplicitHeight = 27
|
||||
end
|
||||
inherited ToolButton6: TToolButton
|
||||
inherited ToolButton9: TToolButton
|
||||
Left = 0
|
||||
Top = 49
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 49
|
||||
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
|
||||
Left = 0
|
||||
Top = 76
|
||||
ExplicitLeft = 0
|
||||
ExplicitTop = 76
|
||||
Left = 145
|
||||
Top = 49
|
||||
ExplicitLeft = 145
|
||||
ExplicitTop = 49
|
||||
end
|
||||
inherited ToolButton8: TToolButton [15]
|
||||
Left = 125
|
||||
Top = 76
|
||||
ExplicitLeft = 125
|
||||
ExplicitTop = 76
|
||||
inherited ToolButton11: TToolButton
|
||||
Left = 270
|
||||
Top = 49
|
||||
ExplicitLeft = 270
|
||||
ExplicitTop = 49
|
||||
end
|
||||
end
|
||||
inherited cxGrid: TcxGrid
|
||||
Top = 126
|
||||
Height = 178
|
||||
Top = 99
|
||||
Height = 205
|
||||
ExplicitTop = 99
|
||||
ExplicitHeight = 205
|
||||
inherited cxGridView: TcxGridDBTableView
|
||||
inherited cxGridViewTIPO: TcxGridDBColumn
|
||||
@ -107,14 +114,33 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
|
||||
end>
|
||||
Properties.OnButtonClick = cxGridViewREFERENCIAPropertiesButtonClick
|
||||
BestFitMaxWidth = 50
|
||||
Width = 90
|
||||
Width = 50
|
||||
end
|
||||
object cxGridViewREFERENCIA_PROVEEDOR: TcxGridDBColumn [6]
|
||||
Caption = 'Ref. proveedor'
|
||||
DataBinding.FieldName = 'REFERENCIA_PROVEEDOR'
|
||||
PropertiesClassName = 'TcxTextEditProperties'
|
||||
PropertiesClassName = 'TcxButtonEditProperties'
|
||||
Properties.Buttons = <
|
||||
item
|
||||
Default = True
|
||||
Kind = bkEllipsis
|
||||
end>
|
||||
Properties.OnButtonClick = cxGridViewREFERENCIA_PROVEEDORPropertiesButtonClick
|
||||
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
|
||||
inherited cxGridViewDESCRIPCION: TcxGridDBColumn
|
||||
Width = 298
|
||||
@ -123,7 +149,7 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
|
||||
BestFitMaxWidth = 50
|
||||
Width = 91
|
||||
end
|
||||
object cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn [9]
|
||||
object cxGridViewUNIDAD_MEDIDA: TcxGridDBColumn [10]
|
||||
Caption = 'Unid. medida'
|
||||
PropertiesClassName = 'TcxComboBoxProperties'
|
||||
Properties.ImmediatePost = True
|
||||
@ -154,7 +180,7 @@ inherited frViewDetallesArticulos: TfrViewDetallesArticulos
|
||||
end
|
||||
end
|
||||
inherited TBXDock1: TTBXDock
|
||||
Top = 100
|
||||
Top = 73
|
||||
ExplicitWidth = 451
|
||||
inherited TBXToolbar1: TTBXToolbar
|
||||
inherited TBXSubmenuItem1: TTBXSubmenuItem
|
||||
|
||||
@ -27,6 +27,7 @@ type
|
||||
actBuscarArticulo: TAction;
|
||||
TBXSeparatorItem8: TTBXSeparatorItem;
|
||||
TBXItem17: TTBXItem;
|
||||
cxGridViewREFERENCIA_FABRICANTE: TcxGridDBColumn;
|
||||
procedure CustomViewCreate(Sender: TObject);
|
||||
procedure CustomViewDestroy(Sender: TObject);
|
||||
procedure actAnadirArticulosExecute(Sender: TObject);
|
||||
@ -41,6 +42,10 @@ type
|
||||
procedure actDetalleCopiarExecute(Sender: TObject);
|
||||
procedure actDetallePegarExecute(Sender: TObject);
|
||||
procedure actDetalleCortarExecute(Sender: TObject);
|
||||
procedure cxGridViewREFERENCIA_PROVEEDORPropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
procedure cxGridViewREFERENCIA_FABRICANTEPropertiesButtonClick(
|
||||
Sender: TObject; AButtonIndex: Integer);
|
||||
private
|
||||
procedure RecuperarListaUnidadesMedida;
|
||||
protected
|
||||
@ -110,6 +115,20 @@ begin
|
||||
cxGridViewUNIDAD_MEDIDA.Visible := False;
|
||||
cxGridViewUNIDAD_MEDIDA.VisibleForCustomization := False;
|
||||
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
|
||||
cxGridView.EndUpdate;
|
||||
end;
|
||||
@ -125,6 +144,20 @@ begin
|
||||
actBuscarArticulo.Execute;
|
||||
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(
|
||||
AItem: TcxCustomGridTableItem): Boolean;
|
||||
var
|
||||
|
||||
Loading…
Reference in New Issue
Block a user