git-svn-id: https://192.168.0.254/svn/Proyectos.EstudioCarnicero_ProGestion/trunk@4 1b8572a8-2d6b-b84e-8c90-20ed86fa4eca
108 lines
3.4 KiB
ObjectPascal
108 lines
3.4 KiB
ObjectPascal
unit uViewReciboCliente;
|
|
|
|
interface
|
|
|
|
uses uViewBase, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxDropDownEdit,
|
|
cxCalendar, cxDBEdit, DB, uDADataTable, dxLayoutControl, Forms, uCustomView,
|
|
Classes, Controls, cxControls, uViewDatosYSeleccionContacto2, uBizRecibosCliente;
|
|
|
|
type
|
|
IViewReciboCliente = interface(IViewBase)
|
|
['{F7360591-10AD-4F62-91F3-41B11F565848}']
|
|
function GetReciboCliente: IBizRecibosCliente;
|
|
procedure SetReciboCliente(const Value: IBizRecibosCliente);
|
|
property ReciboCliente: IBizRecibosCliente read GetReciboCliente write SetReciboCliente;
|
|
end;
|
|
|
|
TfrViewReciboCliente = class(TfrViewBase, IViewReciboCliente)
|
|
DADataSource: TDADataSource;
|
|
dxLayoutControl1Group_Root: TdxLayoutGroup;
|
|
dxLayoutControl1: TdxLayoutControl;
|
|
dxLayoutControl1Item2: TdxLayoutItem;
|
|
frViewDatosYSeleccionContacto21: TfrViewDatosYSeleccionContacto2;
|
|
dxLayoutControl1Item1: TdxLayoutItem;
|
|
edtFecha: TcxDBDateEdit;
|
|
dxLayoutControl1Item3: TdxLayoutItem;
|
|
procedure frViewDatosYSeleccionContacto21actElegirContactoExecute(Sender: TObject);
|
|
procedure frViewDatosYSeleccionContacto21actAnadirContactoExecute(Sender: TObject);
|
|
procedure frViewDatosYSeleccionContacto21actVerContactoExecute(Sender: TObject);
|
|
procedure frViewDatosYSeleccionContacto21edtlNombrePropertiesEditValueChanged(Sender: TObject);
|
|
private
|
|
FReciboCliente : IBizRecibosCliente;
|
|
// procedure OnObraChanged(Sender : TObject);
|
|
protected
|
|
function GetReciboCliente: IBizRecibosCliente;
|
|
procedure SetReciboCliente(const Value: IBizRecibosCliente);
|
|
public
|
|
property ReciboCliente: IBizRecibosCliente read GetReciboCliente write SetReciboCliente;
|
|
end;
|
|
|
|
var
|
|
frViewReciboCliente: TfrViewReciboCliente;
|
|
|
|
implementation
|
|
|
|
uses uBizContacto, uDataModuleContactos;
|
|
|
|
{$R *.dfm}
|
|
|
|
{ TfrViewReciboCliente }
|
|
|
|
function TfrViewReciboCliente.GetReciboCliente: IBizRecibosCliente;
|
|
begin
|
|
Result := FReciboCliente;
|
|
end;
|
|
|
|
procedure TfrViewReciboCliente.SetReciboCliente(const Value: IBizRecibosCliente);
|
|
begin
|
|
|
|
{
|
|
frViewObraRecibo1.Obra := dmObras.GetItem(FReciboCliente.CODIGOOBRA);
|
|
frViewObraRecibo1.OnObraChanged := OnObraChanged;
|
|
}
|
|
end;
|
|
|
|
procedure TfrViewReciboCliente.frViewDatosYSeleccionContacto21actElegirContactoExecute(
|
|
Sender: TObject);
|
|
begin
|
|
inherited;
|
|
frViewDatosYSeleccionContacto21.actElegirContactoExecute(Sender);
|
|
end;
|
|
|
|
procedure TfrViewReciboCliente.frViewDatosYSeleccionContacto21actAnadirContactoExecute(
|
|
Sender: TObject);
|
|
begin
|
|
inherited;
|
|
frViewDatosYSeleccionContacto21.actAnadirContactoExecute(Sender);
|
|
end;
|
|
|
|
procedure TfrViewReciboCliente.frViewDatosYSeleccionContacto21actVerContactoExecute(
|
|
Sender: TObject);
|
|
var
|
|
AContacto : IBizContacto;
|
|
begin
|
|
inherited;
|
|
AContacto := dmContactos.GetContacto(FReciboCliente.CODIGOCONTACTO);
|
|
try
|
|
AContacto.Show;
|
|
finally
|
|
AContacto := NIL;
|
|
end;
|
|
end;
|
|
|
|
procedure TfrViewReciboCliente.frViewDatosYSeleccionContacto21edtlNombrePropertiesEditValueChanged(Sender: TObject);
|
|
begin
|
|
inherited;
|
|
if Assigned(FReciboCliente) then
|
|
with (Sender as TcxDBTextEdit) do
|
|
Enabled := (FReciboCliente.CODIGOCONTACTO <> 0)
|
|
end;
|
|
|
|
{procedure TfrViewReciboCliente.OnObraChanged(Sender: TObject);
|
|
begin
|
|
FReciboCliente.Obra := frViewObraRecibo1.Obra;
|
|
frViewDatosYSeleccionContacto21.Contacto := FReciboCliente.Obra.Cliente;
|
|
end;}
|
|
|
|
end.
|