Contratos -> mostrar teléfonos del cliente en la ficha del contrato
git-svn-id: https://192.168.0.254/svn/Proyectos.Acana_FactuGES2/trunk@491 f4e31baf-9722-1c47-927c-6f952f962d4b
This commit is contained in:
parent
18749d1756
commit
af71604151
@ -410,6 +410,7 @@ object srvContratosCliente: TsrvContratosCliente
|
|||||||
Name = 'REFERENCIA'
|
Name = 'REFERENCIA'
|
||||||
DataType = datString
|
DataType = datString
|
||||||
Size = 255
|
Size = 255
|
||||||
|
ServerAutoRefresh = True
|
||||||
DictionaryEntry = 'ContratosCliente_REFERENCIA'
|
DictionaryEntry = 'ContratosCliente_REFERENCIA'
|
||||||
end
|
end
|
||||||
item
|
item
|
||||||
|
|||||||
@ -15,8 +15,6 @@ inherited frViewContratoCliente: TfrViewContratoCliente
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
TabStop = False
|
TabStop = False
|
||||||
AutoContentSizes = [acsWidth, acsHeight]
|
AutoContentSizes = [acsWidth, acsHeight]
|
||||||
ExplicitWidth = 939
|
|
||||||
ExplicitHeight = 392
|
|
||||||
DesignSize = (
|
DesignSize = (
|
||||||
810
|
810
|
||||||
449)
|
449)
|
||||||
@ -182,17 +180,13 @@ inherited frViewContratoCliente: TfrViewContratoCliente
|
|||||||
Width = 224
|
Width = 224
|
||||||
end
|
end
|
||||||
inherited edtNIFCIF: TcxDBTextEdit
|
inherited edtNIFCIF: TcxDBTextEdit
|
||||||
Left = 301
|
ExplicitWidth = 103
|
||||||
ExplicitLeft = 301
|
Width = 103
|
||||||
end
|
end
|
||||||
inherited bVerFichaCliente: TBitBtn
|
inherited bVerFichaCliente: TBitBtn
|
||||||
Left = 212
|
Left = 212
|
||||||
ExplicitLeft = 212
|
ExplicitLeft = 212
|
||||||
end
|
end
|
||||||
inherited edtPersonaContacto: TcxDBTextEdit
|
|
||||||
ExplicitWidth = 283
|
|
||||||
Width = 283
|
|
||||||
end
|
|
||||||
inherited edtDireccion: TcxMemo
|
inherited edtDireccion: TcxMemo
|
||||||
ExplicitWidth = 121
|
ExplicitWidth = 121
|
||||||
Width = 121
|
Width = 121
|
||||||
@ -201,17 +195,13 @@ inherited frViewContratoCliente: TfrViewContratoCliente
|
|||||||
Left = 381
|
Left = 381
|
||||||
ExplicitLeft = 381
|
ExplicitLeft = 381
|
||||||
end
|
end
|
||||||
inherited bElegirPersonaContacto: TButton
|
|
||||||
Left = 381
|
|
||||||
ExplicitLeft = 381
|
|
||||||
end
|
|
||||||
inherited edtTelefonos: TcxTextEdit
|
inherited edtTelefonos: TcxTextEdit
|
||||||
Left = 226
|
|
||||||
ExplicitLeft = 226
|
|
||||||
ExplicitWidth = 193
|
ExplicitWidth = 193
|
||||||
Width = 193
|
Width = 193
|
||||||
end
|
end
|
||||||
inherited edtReferencia: TcxDBTextEdit
|
inherited edtReferencia: TcxDBTextEdit
|
||||||
|
Left = 268
|
||||||
|
ExplicitLeft = 268
|
||||||
ExplicitWidth = 103
|
ExplicitWidth = 103
|
||||||
Width = 103
|
Width = 103
|
||||||
end
|
end
|
||||||
|
|||||||
@ -21,7 +21,7 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
|
|||||||
447
|
447
|
||||||
224)
|
224)
|
||||||
object edtlNombre: TcxDBTextEdit
|
object edtlNombre: TcxDBTextEdit
|
||||||
Left = 71
|
Left = 66
|
||||||
Top = 41
|
Top = 41
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Anchors = [akLeft, akTop, akRight]
|
||||||
AutoSize = False
|
AutoSize = False
|
||||||
@ -43,8 +43,8 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
|
|||||||
Width = 224
|
Width = 224
|
||||||
end
|
end
|
||||||
object edtNIFCIF: TcxDBTextEdit
|
object edtNIFCIF: TcxDBTextEdit
|
||||||
Left = 334
|
Left = 66
|
||||||
Top = 41
|
Top = 68
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Anchors = [akLeft, akTop, akRight]
|
||||||
AutoSize = False
|
AutoSize = False
|
||||||
DataBinding.DataField = 'NIF_CIF'
|
DataBinding.DataField = 'NIF_CIF'
|
||||||
@ -154,12 +154,12 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
|
|||||||
end
|
end
|
||||||
object bVerFichaCliente: TBitBtn
|
object bVerFichaCliente: TBitBtn
|
||||||
Left = 245
|
Left = 245
|
||||||
Top = 185
|
Top = 181
|
||||||
Width = 192
|
Width = 192
|
||||||
Height = 25
|
Height = 25
|
||||||
Action = actVerContacto
|
Action = actVerContacto
|
||||||
Caption = 'Ver ficha completa del cliente...'
|
Caption = 'Ver ficha completa del cliente...'
|
||||||
TabOrder = 10
|
TabOrder = 8
|
||||||
Glyph.Data = {
|
Glyph.Data = {
|
||||||
36040000424D3604000000000000360000002800000010000000100000000100
|
36040000424D3604000000000000360000002800000010000000100000000100
|
||||||
2000000000000004000000000000000000000000000000000000FF00FF00FF00
|
2000000000000004000000000000000000000000000000000000FF00FF00FF00
|
||||||
@ -196,28 +196,8 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
|
|||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00
|
||||||
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
|
FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00FF00}
|
||||||
end
|
end
|
||||||
object edtPersonaContacto: TcxDBTextEdit
|
|
||||||
Left = 71
|
|
||||||
Top = 156
|
|
||||||
Anchors = [akLeft, akTop, akRight]
|
|
||||||
AutoSize = False
|
|
||||||
DataBinding.DataField = 'PERSONA_CONTACTO'
|
|
||||||
DataBinding.DataSource = dsContrato
|
|
||||||
ParentFont = False
|
|
||||||
Style.BorderColor = clWindowFrame
|
|
||||||
Style.BorderStyle = ebs3D
|
|
||||||
Style.HotTrack = False
|
|
||||||
Style.LookAndFeel.NativeStyle = True
|
|
||||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
|
||||||
StyleDisabled.TextColor = clWindowText
|
|
||||||
StyleFocused.LookAndFeel.NativeStyle = True
|
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
|
||||||
TabOrder = 8
|
|
||||||
Height = 21
|
|
||||||
Width = 283
|
|
||||||
end
|
|
||||||
object edtDireccion: TcxMemo
|
object edtDireccion: TcxMemo
|
||||||
Left = 71
|
Left = 66
|
||||||
Top = 95
|
Top = 95
|
||||||
Style.BorderColor = clWindowFrame
|
Style.BorderColor = clWindowFrame
|
||||||
Style.BorderStyle = ebs3D
|
Style.BorderStyle = ebs3D
|
||||||
@ -231,46 +211,38 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
|
|||||||
StyleFocused.LookAndFeel.NativeStyle = True
|
StyleFocused.LookAndFeel.NativeStyle = True
|
||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
TabOrder = 6
|
|
||||||
Height = 53
|
|
||||||
Width = 437
|
|
||||||
end
|
|
||||||
object bElegirDireccion: TButton
|
|
||||||
Left = 414
|
|
||||||
Top = 95
|
|
||||||
Width = 23
|
|
||||||
Height = 25
|
|
||||||
Action = actElegirDireccion
|
|
||||||
TabOrder = 7
|
|
||||||
end
|
|
||||||
object bElegirPersonaContacto: TButton
|
|
||||||
Left = 414
|
|
||||||
Top = 154
|
|
||||||
Width = 23
|
|
||||||
Height = 25
|
|
||||||
Action = actElegirPersonaContacto
|
|
||||||
TabOrder = 9
|
|
||||||
end
|
|
||||||
object edtTelefonos: TcxTextEdit
|
|
||||||
Left = 239
|
|
||||||
Top = 68
|
|
||||||
Style.BorderColor = clWindowFrame
|
|
||||||
Style.BorderStyle = ebs3D
|
|
||||||
Style.HotTrack = False
|
|
||||||
Style.LookAndFeel.Kind = lfStandard
|
|
||||||
Style.LookAndFeel.NativeStyle = True
|
|
||||||
StyleDisabled.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleDisabled.LookAndFeel.NativeStyle = True
|
|
||||||
StyleDisabled.TextColor = clWindowText
|
|
||||||
StyleFocused.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleFocused.LookAndFeel.NativeStyle = True
|
|
||||||
StyleHot.LookAndFeel.Kind = lfStandard
|
|
||||||
StyleHot.LookAndFeel.NativeStyle = True
|
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
|
Height = 53
|
||||||
|
Width = 437
|
||||||
|
end
|
||||||
|
object bElegirDireccion: TButton
|
||||||
|
Left = 414
|
||||||
|
Top = 95
|
||||||
|
Width = 23
|
||||||
|
Height = 25
|
||||||
|
Action = actElegirDireccion
|
||||||
|
TabOrder = 6
|
||||||
|
end
|
||||||
|
object edtTelefonos: TcxTextEdit
|
||||||
|
Left = 66
|
||||||
|
Top = 154
|
||||||
|
Style.BorderColor = clWindowFrame
|
||||||
|
Style.BorderStyle = ebs3D
|
||||||
|
Style.HotTrack = False
|
||||||
|
Style.LookAndFeel.Kind = lfStandard
|
||||||
|
Style.LookAndFeel.NativeStyle = True
|
||||||
|
StyleDisabled.LookAndFeel.Kind = lfStandard
|
||||||
|
StyleDisabled.LookAndFeel.NativeStyle = True
|
||||||
|
StyleDisabled.TextColor = clWindowText
|
||||||
|
StyleFocused.LookAndFeel.Kind = lfStandard
|
||||||
|
StyleFocused.LookAndFeel.NativeStyle = True
|
||||||
|
StyleHot.LookAndFeel.Kind = lfStandard
|
||||||
|
StyleHot.LookAndFeel.NativeStyle = True
|
||||||
|
TabOrder = 7
|
||||||
Width = 193
|
Width = 193
|
||||||
end
|
end
|
||||||
object edtReferencia: TcxDBTextEdit
|
object edtReferencia: TcxDBTextEdit
|
||||||
Left = 71
|
Left = 284
|
||||||
Top = 68
|
Top = 68
|
||||||
Anchors = [akLeft, akTop, akRight]
|
Anchors = [akLeft, akTop, akRight]
|
||||||
AutoSize = False
|
AutoSize = False
|
||||||
@ -317,37 +289,59 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
|
|||||||
ControlOptions.ShowBorder = False
|
ControlOptions.ShowBorder = False
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object dxLayoutControl1Group4: TdxLayoutGroup
|
object dxLayoutControl1Item1: TdxLayoutItem
|
||||||
ShowCaption = False
|
AutoAligns = [aaVertical]
|
||||||
Hidden = True
|
AlignHorz = ahClient
|
||||||
LayoutDirection = ldHorizontal
|
Caption = 'Nombre:'
|
||||||
ShowBorder = False
|
Control = edtlNombre
|
||||||
object dxLayoutControl1Item1: TdxLayoutItem
|
ControlOptions.ShowBorder = False
|
||||||
AutoAligns = [aaVertical]
|
|
||||||
AlignHorz = ahClient
|
|
||||||
Caption = 'Nombre:'
|
|
||||||
Control = edtlNombre
|
|
||||||
ControlOptions.ShowBorder = False
|
|
||||||
end
|
|
||||||
object dxLayoutControl1Item2: TdxLayoutItem
|
|
||||||
AutoAligns = [aaVertical]
|
|
||||||
AlignHorz = ahRight
|
|
||||||
Caption = 'NIF/CIF:'
|
|
||||||
Control = edtNIFCIF
|
|
||||||
ControlOptions.ShowBorder = False
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
object dxLayoutControl1Group7: TdxLayoutGroup
|
object dxLayoutControl1Group7: TdxLayoutGroup
|
||||||
ShowCaption = False
|
ShowCaption = False
|
||||||
Hidden = True
|
Hidden = True
|
||||||
LayoutDirection = ldHorizontal
|
|
||||||
ShowBorder = False
|
ShowBorder = False
|
||||||
object dxLayoutControl1Item11: TdxLayoutItem
|
object dxLayoutControl1Group3: TdxLayoutGroup
|
||||||
AutoAligns = [aaVertical]
|
ShowCaption = False
|
||||||
AlignHorz = ahClient
|
Hidden = True
|
||||||
Caption = 'Referencia:'
|
LayoutDirection = ldHorizontal
|
||||||
Control = edtReferencia
|
ShowBorder = False
|
||||||
ControlOptions.ShowBorder = False
|
object dxLayoutControl1Item2: TdxLayoutItem
|
||||||
|
AutoAligns = [aaVertical]
|
||||||
|
AlignHorz = ahClient
|
||||||
|
Caption = 'NIF/CIF:'
|
||||||
|
Control = edtNIFCIF
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
|
object dxLayoutControl1Item11: TdxLayoutItem
|
||||||
|
AutoAligns = [aaVertical]
|
||||||
|
AlignHorz = ahClient
|
||||||
|
Caption = 'Referencia:'
|
||||||
|
Control = edtReferencia
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
|
end
|
||||||
|
object dxLayoutControl1Group2: TdxLayoutGroup
|
||||||
|
ShowCaption = False
|
||||||
|
Hidden = True
|
||||||
|
LayoutDirection = ldHorizontal
|
||||||
|
ShowBorder = False
|
||||||
|
object dxLayoutControl1Item4: TdxLayoutItem
|
||||||
|
AutoAligns = []
|
||||||
|
AlignHorz = ahClient
|
||||||
|
AlignVert = avCenter
|
||||||
|
Caption = 'Direcci'#243'n:'
|
||||||
|
CaptionOptions.AlignVert = tavTop
|
||||||
|
Control = edtDireccion
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
|
object dxLayoutControl1Item5: TdxLayoutItem
|
||||||
|
AutoAligns = [aaVertical]
|
||||||
|
AlignHorz = ahRight
|
||||||
|
Caption = 'Button4'
|
||||||
|
ShowCaption = False
|
||||||
|
Control = bElegirDireccion
|
||||||
|
ControlOptions.ShowBorder = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object dxLayoutControl1Item10: TdxLayoutItem
|
object dxLayoutControl1Item10: TdxLayoutItem
|
||||||
AutoAligns = [aaVertical]
|
AutoAligns = [aaVertical]
|
||||||
@ -358,55 +352,6 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object dxLayoutControl1Group2: TdxLayoutGroup
|
|
||||||
ShowCaption = False
|
|
||||||
Hidden = True
|
|
||||||
ShowBorder = False
|
|
||||||
object dxLayoutControl1Group3: TdxLayoutGroup
|
|
||||||
ShowCaption = False
|
|
||||||
Hidden = True
|
|
||||||
LayoutDirection = ldHorizontal
|
|
||||||
ShowBorder = False
|
|
||||||
object dxLayoutControl1Item4: TdxLayoutItem
|
|
||||||
AutoAligns = []
|
|
||||||
AlignHorz = ahClient
|
|
||||||
AlignVert = avCenter
|
|
||||||
Caption = 'Direcci'#243'n'
|
|
||||||
CaptionOptions.AlignVert = tavTop
|
|
||||||
Control = edtDireccion
|
|
||||||
ControlOptions.ShowBorder = False
|
|
||||||
end
|
|
||||||
object dxLayoutControl1Item5: TdxLayoutItem
|
|
||||||
AutoAligns = [aaVertical]
|
|
||||||
AlignHorz = ahRight
|
|
||||||
Caption = 'Button4'
|
|
||||||
ShowCaption = False
|
|
||||||
Control = bElegirDireccion
|
|
||||||
ControlOptions.ShowBorder = False
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object dxLayoutControl1Group5: TdxLayoutGroup
|
|
||||||
ShowCaption = False
|
|
||||||
Hidden = True
|
|
||||||
LayoutDirection = ldHorizontal
|
|
||||||
ShowBorder = False
|
|
||||||
object dxLayoutControl1Item3: TdxLayoutItem
|
|
||||||
AutoAligns = []
|
|
||||||
AlignHorz = ahClient
|
|
||||||
AlignVert = avCenter
|
|
||||||
Caption = 'Contacto:'
|
|
||||||
Control = edtPersonaContacto
|
|
||||||
ControlOptions.ShowBorder = False
|
|
||||||
end
|
|
||||||
object dxLayoutControl1Item6: TdxLayoutItem
|
|
||||||
AutoAligns = [aaVertical]
|
|
||||||
AlignHorz = ahRight
|
|
||||||
ShowCaption = False
|
|
||||||
Control = bElegirPersonaContacto
|
|
||||||
ControlOptions.ShowBorder = False
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
object dxLayoutControl1Item9: TdxLayoutItem
|
object dxLayoutControl1Item9: TdxLayoutItem
|
||||||
AutoAligns = [aaVertical]
|
AutoAligns = [aaVertical]
|
||||||
AlignHorz = ahRight
|
AlignHorz = ahRight
|
||||||
@ -418,12 +363,12 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object dsCliente: TDADataSource
|
object dsCliente: TDADataSource
|
||||||
Left = 400
|
Left = 376
|
||||||
Top = 8
|
Top = 8
|
||||||
end
|
end
|
||||||
object ActionList1: TActionList
|
object ActionList1: TActionList
|
||||||
Images = PngImageList
|
Images = PngImageList
|
||||||
Left = 368
|
Left = 344
|
||||||
Top = 8
|
Top = 8
|
||||||
object actElegirContacto: TAction
|
object actElegirContacto: TAction
|
||||||
Caption = 'Elegir un cliente'
|
Caption = 'Elegir un cliente'
|
||||||
@ -446,11 +391,6 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
|
|||||||
OnExecute = actElegirDireccionExecute
|
OnExecute = actElegirDireccionExecute
|
||||||
OnUpdate = actElegirDireccionUpdate
|
OnUpdate = actElegirDireccionUpdate
|
||||||
end
|
end
|
||||||
object actElegirPersonaContacto: TAction
|
|
||||||
Caption = '...'
|
|
||||||
OnExecute = actElegirPersonaContactoExecute
|
|
||||||
OnUpdate = actElegirPersonaContactoUpdate
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
object PngImageList: TPngImageList
|
object PngImageList: TPngImageList
|
||||||
PngImages = <
|
PngImages = <
|
||||||
@ -531,12 +471,12 @@ inherited frViewDatosYSeleccionClienteContrato: TfrViewDatosYSeleccionClienteCon
|
|||||||
Name = 'PngImage2'
|
Name = 'PngImage2'
|
||||||
Background = clWindow
|
Background = clWindow
|
||||||
end>
|
end>
|
||||||
Left = 304
|
Left = 280
|
||||||
Top = 8
|
Top = 8
|
||||||
Bitmap = {}
|
Bitmap = {}
|
||||||
end
|
end
|
||||||
object dsContrato: TDADataSource
|
object dsContrato: TDADataSource
|
||||||
Left = 336
|
Left = 312
|
||||||
Top = 8
|
Top = 8
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -33,7 +33,6 @@ type
|
|||||||
property OnClienteChanged : TNotifyEvent read GetOnClienteChanged
|
property OnClienteChanged : TNotifyEvent read GetOnClienteChanged
|
||||||
write SetOnClienteChanged;
|
write SetOnClienteChanged;
|
||||||
|
|
||||||
procedure ElegirPersonaContacto;
|
|
||||||
procedure ElegirDireccionParaContrato;
|
procedure ElegirDireccionParaContrato;
|
||||||
procedure ElegirCliente;
|
procedure ElegirCliente;
|
||||||
procedure VerFichaCliente;
|
procedure VerFichaCliente;
|
||||||
@ -64,36 +63,25 @@ type
|
|||||||
dxLayoutControl1Group2: TdxLayoutGroup;
|
dxLayoutControl1Group2: TdxLayoutGroup;
|
||||||
dsContrato: TDADataSource;
|
dsContrato: TDADataSource;
|
||||||
actElegirDireccion: TAction;
|
actElegirDireccion: TAction;
|
||||||
actElegirPersonaContacto: TAction;
|
|
||||||
dxLayoutControl1Item3: TdxLayoutItem;
|
|
||||||
edtPersonaContacto: TcxDBTextEdit;
|
|
||||||
dxLayoutControl1Item4: TdxLayoutItem;
|
dxLayoutControl1Item4: TdxLayoutItem;
|
||||||
edtDireccion: TcxMemo;
|
edtDireccion: TcxMemo;
|
||||||
bElegirDireccion: TButton;
|
bElegirDireccion: TButton;
|
||||||
dxLayoutControl1Item5: TdxLayoutItem;
|
dxLayoutControl1Item5: TdxLayoutItem;
|
||||||
dxLayoutControl1Group3: TdxLayoutGroup;
|
|
||||||
dxLayoutControl1Item6: TdxLayoutItem;
|
|
||||||
bElegirPersonaContacto: TButton;
|
|
||||||
dxLayoutControl1Group5: TdxLayoutGroup;
|
|
||||||
dxLayoutControl1Item10: TdxLayoutItem;
|
dxLayoutControl1Item10: TdxLayoutItem;
|
||||||
edtTelefonos: TcxTextEdit;
|
edtTelefonos: TcxTextEdit;
|
||||||
dxLayoutControl1Item11: TdxLayoutItem;
|
dxLayoutControl1Item11: TdxLayoutItem;
|
||||||
edtReferencia: TcxDBTextEdit;
|
edtReferencia: TcxDBTextEdit;
|
||||||
dxLayoutControl1Group6: TdxLayoutGroup;
|
dxLayoutControl1Group6: TdxLayoutGroup;
|
||||||
dxLayoutControl1Group4: TdxLayoutGroup;
|
|
||||||
dxLayoutControl1Group7: TdxLayoutGroup;
|
dxLayoutControl1Group7: TdxLayoutGroup;
|
||||||
|
dxLayoutControl1Group3: TdxLayoutGroup;
|
||||||
procedure actElegirContactoExecute(Sender: TObject);
|
procedure actElegirContactoExecute(Sender: TObject);
|
||||||
procedure actAnadirContactoExecute(Sender: TObject);
|
procedure actAnadirContactoExecute(Sender: TObject);
|
||||||
procedure actVerContactoUpdate(Sender: TObject);
|
procedure actVerContactoUpdate(Sender: TObject);
|
||||||
procedure edtPersonaContactoPropertiesButtonClick(Sender: TObject;
|
|
||||||
AButtonIndex: Integer);
|
|
||||||
procedure edtDireccionPropertiesButtonClick(Sender: TObject;
|
procedure edtDireccionPropertiesButtonClick(Sender: TObject;
|
||||||
AButtonIndex: Integer);
|
AButtonIndex: Integer);
|
||||||
procedure actVerContactoExecute(Sender: TObject);
|
procedure actVerContactoExecute(Sender: TObject);
|
||||||
procedure actElegirDireccionUpdate(Sender: TObject);
|
procedure actElegirDireccionUpdate(Sender: TObject);
|
||||||
procedure actElegirDireccionExecute(Sender: TObject);
|
procedure actElegirDireccionExecute(Sender: TObject);
|
||||||
procedure actElegirPersonaContactoExecute(Sender: TObject);
|
|
||||||
procedure actElegirPersonaContactoUpdate(Sender: TObject);
|
|
||||||
|
|
||||||
private
|
private
|
||||||
FOnClienteChanged : TNotifyEvent;
|
FOnClienteChanged : TNotifyEvent;
|
||||||
@ -118,7 +106,6 @@ type
|
|||||||
public
|
public
|
||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure ElegirPersonaContacto;
|
|
||||||
procedure ElegirDireccionParaContrato;
|
procedure ElegirDireccionParaContrato;
|
||||||
procedure ElegirCliente;
|
procedure ElegirCliente;
|
||||||
procedure VerFichaCliente;
|
procedure VerFichaCliente;
|
||||||
@ -135,7 +122,7 @@ implementation
|
|||||||
{$R *.dfm}
|
{$R *.dfm}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
uDataModuleClientes, Math, uCustomView, uBizContactosPersonal, uDialogUtils;
|
uDataModuleClientes, Math, uCustomView, uDialogUtils;
|
||||||
|
|
||||||
|
|
||||||
procedure TfrViewDatosYSeleccionClienteContrato.actElegirContactoExecute(Sender: TObject);
|
procedure TfrViewDatosYSeleccionClienteContrato.actElegirContactoExecute(Sender: TObject);
|
||||||
@ -160,23 +147,6 @@ begin
|
|||||||
and (FCliente.Direcciones.RecordCount > 0);
|
and (FCliente.Direcciones.RecordCount > 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewDatosYSeleccionClienteContrato.actElegirPersonaContactoExecute(
|
|
||||||
Sender: TObject);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
ElegirPersonaContacto;
|
|
||||||
RefrescarDireccion;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrViewDatosYSeleccionClienteContrato.actElegirPersonaContactoUpdate(
|
|
||||||
Sender: TObject);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
(Sender as TAction).Enabled := Assigned(FCliente) and
|
|
||||||
Assigned(FCliente.Personal) and (FCliente.Personal.Active)
|
|
||||||
and (FCliente.Personal.RecordCount > 0);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrViewDatosYSeleccionClienteContrato.actAnadirContactoExecute(
|
procedure TfrViewDatosYSeleccionClienteContrato.actAnadirContactoExecute(
|
||||||
Sender: TObject);
|
Sender: TObject);
|
||||||
begin
|
begin
|
||||||
@ -216,7 +186,6 @@ begin
|
|||||||
edtlNombre.Enabled := False;
|
edtlNombre.Enabled := False;
|
||||||
edtNIFCIF.Enabled := False;
|
edtNIFCIF.Enabled := False;
|
||||||
edtDireccion.Enabled := False;
|
edtDireccion.Enabled := False;
|
||||||
edtPersonaContacto.Enabled := False;
|
|
||||||
edtReferencia.Enabled := False;
|
edtReferencia.Enabled := False;
|
||||||
edtTelefonos.Enabled := False;
|
edtTelefonos.Enabled := False;
|
||||||
end;
|
end;
|
||||||
@ -235,13 +204,6 @@ begin
|
|||||||
ElegirDireccionParaContrato;
|
ElegirDireccionParaContrato;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewDatosYSeleccionClienteContrato.edtPersonaContactoPropertiesButtonClick(
|
|
||||||
Sender: TObject; AButtonIndex: Integer);
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
ElegirPersonaContacto;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrViewDatosYSeleccionClienteContrato.ElegirCliente;
|
procedure TfrViewDatosYSeleccionClienteContrato.ElegirCliente;
|
||||||
var
|
var
|
||||||
ACliente : IBizCliente;
|
ACliente : IBizCliente;
|
||||||
@ -269,47 +231,33 @@ begin
|
|||||||
if Assigned(ADireccion) then
|
if Assigned(ADireccion) then
|
||||||
begin
|
begin
|
||||||
FContrato.Edit;
|
FContrato.Edit;
|
||||||
|
try
|
||||||
if ADireccion.IDIsNull then // Se ha elegido la dirección de razón social
|
if ADireccion.IDIsNull then // Se ha elegido la dirección de razón social
|
||||||
begin
|
begin
|
||||||
FContrato.ClearField('ID_DIRECCION');
|
FContrato.ClearField('ID_DIRECCION');
|
||||||
FContrato.ClearField('IMPORTE_PORTE');
|
FContrato.ClearField('IMPORTE_PORTE');
|
||||||
end
|
end
|
||||||
else begin
|
else begin
|
||||||
FContrato.ID_DIRECCION := ADireccion.ID;
|
FContrato.ID_DIRECCION := ADireccion.ID;
|
||||||
FContrato.IMPORTE_PORTE := ADireccion.PORTE;
|
FContrato.IMPORTE_PORTE := ADireccion.PORTE;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
with FContrato do
|
with FContrato do
|
||||||
begin
|
begin
|
||||||
CALLE := ADireccion.CALLE;
|
CALLE := ADireccion.CALLE;
|
||||||
POBLACION := ADireccion.POBLACION;
|
POBLACION := ADireccion.POBLACION;
|
||||||
CODIGO_POSTAL := ADireccion.CODIGO_POSTAL;
|
CODIGO_POSTAL := ADireccion.CODIGO_POSTAL;
|
||||||
PROVINCIA := ADireccion.PROVINCIA;
|
PROVINCIA := ADireccion.PROVINCIA;
|
||||||
PERSONA_CONTACTO := ADireccion.PERSONA_CONTACTO;
|
PERSONA_CONTACTO := ADireccion.PERSONA_CONTACTO;
|
||||||
TELEFONO := ADireccion.TELEFONO;
|
TELEFONO := ADireccion.TELEFONO;
|
||||||
MOVIL := ADireccion.MOVIL;
|
MOVIL := ADireccion.MOVIL;
|
||||||
|
end;
|
||||||
|
finally
|
||||||
|
FContrato.Post;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrViewDatosYSeleccionClienteContrato.ElegirPersonaContacto;
|
|
||||||
var
|
|
||||||
APersona : IBizContactoPersonal;
|
|
||||||
begin
|
|
||||||
inherited;
|
|
||||||
APersona := FClientesController.ElegirPersonaContacto(FCliente.Personal, 'El cliente dispone de personas de contacto dadas de alta en su ficha. Seleccione la que quiere utilizar.');
|
|
||||||
try
|
|
||||||
if Assigned(APersona) then
|
|
||||||
begin
|
|
||||||
FContrato.Edit;
|
|
||||||
FContrato.PERSONA_CONTACTO := APersona.NOMBRE;
|
|
||||||
end;
|
|
||||||
finally
|
|
||||||
APersona := NIL;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure TfrViewDatosYSeleccionClienteContrato.EscribirTextoDireccion;
|
procedure TfrViewDatosYSeleccionClienteContrato.EscribirTextoDireccion;
|
||||||
var
|
var
|
||||||
ACadena : String;
|
ACadena : String;
|
||||||
@ -350,10 +298,6 @@ begin
|
|||||||
if not FCliente.DataTable.Active then
|
if not FCliente.DataTable.Active then
|
||||||
FCliente.DataTable.Active := True;
|
FCliente.DataTable.Active := True;
|
||||||
|
|
||||||
//Solo podremos establecer persona de contacto si se ha asignado un cliente
|
|
||||||
if FCliente.ID > 0 then
|
|
||||||
edtPersonaContacto.Enabled := True;
|
|
||||||
|
|
||||||
ElegirDireccionParaContrato;
|
ElegirDireccionParaContrato;
|
||||||
EscribirTextoDireccion;
|
EscribirTextoDireccion;
|
||||||
EscribirTextoTelefonos;
|
EscribirTextoTelefonos;
|
||||||
@ -361,7 +305,6 @@ begin
|
|||||||
else begin
|
else begin
|
||||||
dsCliente.DataTable := NIL;
|
dsCliente.DataTable := NIL;
|
||||||
FCliente := NIL;
|
FCliente := NIL;
|
||||||
edtPersonaContacto.Enabled := False;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if Assigned(FOnClienteChanged) then
|
if Assigned(FOnClienteChanged) then
|
||||||
@ -431,12 +374,8 @@ begin
|
|||||||
|
|
||||||
// ¿Hay cliente en el contrato?
|
// ¿Hay cliente en el contrato?
|
||||||
if FCliente.ID > 0 then
|
if FCliente.ID > 0 then
|
||||||
begin
|
RefrescarDireccion
|
||||||
edtPersonaContacto.Enabled := True;
|
|
||||||
RefrescarDireccion;
|
|
||||||
end
|
|
||||||
else begin
|
else begin
|
||||||
edtPersonaContacto.Enabled := False;
|
|
||||||
edtDireccion.Lines.Clear;
|
edtDireccion.Lines.Clear;
|
||||||
edtTelefonos.Text := '';
|
edtTelefonos.Text := '';
|
||||||
end;
|
end;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user