git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@963 0c75b7a4-871f-7646-8a2f-f78d34cc349f
112 lines
3.1 KiB
ObjectPascal
112 lines
3.1 KiB
ObjectPascal
unit uEditorElegirPersonaContacto;
|
||
|
||
interface
|
||
|
||
uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,
|
||
Buttons, ExtCtrls, Mask, DBCtrls, DB, uDADataTable,
|
||
cxControls, cxContainer, cxEdit, cxTextEdit, cxDBEdit,
|
||
uIEditorElegirPersonaContacto, uCustomView,
|
||
uViewBase, uViewBarraSeleccion, JvExControls, JvComponent,
|
||
DBCGrids, uBizContactosPersonal, uDAInterfaces;
|
||
|
||
type
|
||
TfEditorElegirPersonaContacto = class(TForm, IEditorElegirPersonaContacto)
|
||
dsPersonas: TDADataSource;
|
||
frViewBarraSeleccion1: TfrViewBarraSeleccion;
|
||
lblTitle: TLabel;
|
||
lblComments: TLabel;
|
||
DBCtrlGrid1: TDBCtrlGrid;
|
||
ePuesto: TDBText;
|
||
eTelefono: TDBText;
|
||
eNombre: TDBText;
|
||
Label1: TLabel;
|
||
Label2: TLabel;
|
||
Label3: TLabel;
|
||
eMovil: TDBText;
|
||
Label4: TLabel;
|
||
eFax: TDBText;
|
||
Label5: TLabel;
|
||
eEMail: TDBText;
|
||
procedure frViewBarraSeleccion1actSeleccionarExecute(Sender: TObject);
|
||
procedure frViewBarraSeleccion1actCancelarExecute(Sender: TObject);
|
||
procedure DBCtrlGrid1DblClick(Sender: TObject);
|
||
procedure ComponenteDblClick(Sender: TObject);
|
||
|
||
protected
|
||
FPersonas: IBizContactoPersonal;
|
||
function GetPersonas: IBizContactoPersonal;
|
||
procedure SetPersonas(const Value: IBizContactoPersonal);
|
||
|
||
function GetPersonaSeleccionada: IBizContactoPersonal;
|
||
|
||
procedure SetMensaje (const AValue: String);
|
||
function GetMensaje: String;
|
||
public
|
||
property Mensaje : String read GetMensaje write SetMensaje;
|
||
property Personas: IBizContactoPersonal read GetPersonas write SetPersonas;
|
||
property PersonaSeleccionada: IBizContactoPersonal read GetPersonaSeleccionada;
|
||
end;
|
||
|
||
implementation
|
||
{$R *.dfm}
|
||
|
||
uses
|
||
uDireccionesContactoController;
|
||
|
||
{ TfEditorDireccionEntrega }
|
||
|
||
procedure TfEditorElegirPersonaContacto.DBCtrlGrid1DblClick(Sender: TObject);
|
||
begin
|
||
frViewBarraSeleccion1.actSeleccionar.Execute;
|
||
end;
|
||
|
||
procedure TfEditorElegirPersonaContacto.ComponenteDblClick(Sender: TObject);
|
||
begin
|
||
DBCtrlGrid1DblClick(Sender);
|
||
end;
|
||
|
||
procedure TfEditorElegirPersonaContacto.frViewBarraSeleccion1actCancelarExecute(
|
||
Sender: TObject);
|
||
begin
|
||
ModalResult := mrCancel;
|
||
end;
|
||
|
||
procedure TfEditorElegirPersonaContacto.frViewBarraSeleccion1actSeleccionarExecute(
|
||
Sender: TObject);
|
||
begin
|
||
ModalResult := mrOk;
|
||
end;
|
||
|
||
function TfEditorElegirPersonaContacto.GetPersonas: IBizContactoPersonal;
|
||
begin
|
||
Result := FPersonas;
|
||
end;
|
||
|
||
function TfEditorElegirPersonaContacto.GetPersonaSeleccionada: IBizContactoPersonal;
|
||
begin
|
||
// Devuelvo el mismo objeto que recibo pero con el punto de lectura
|
||
// posicionado en la direcci<63>n elegida.
|
||
Result := FPersonas;
|
||
end;
|
||
|
||
function TfEditorElegirPersonaContacto.GetMensaje: String;
|
||
begin
|
||
Result := lblComments.Caption;
|
||
end;
|
||
|
||
procedure TfEditorElegirPersonaContacto.SetPersonas(const Value: IBizContactoPersonal);
|
||
begin
|
||
FPersonas := Value;
|
||
if Assigned(FPersonas) then
|
||
dsPersonas.DataTable := FPersonas.DataTable
|
||
else
|
||
dsPersonas.DataTable := NIL;
|
||
end;
|
||
|
||
procedure TfEditorElegirPersonaContacto.SetMensaje(const AValue: String);
|
||
begin
|
||
lblComments.Caption := AValue;
|
||
end;
|
||
|
||
end.
|