107 lines
3.6 KiB
ObjectPascal
107 lines
3.6 KiB
ObjectPascal
|
|
{
|
|||
|
|
===============================================================================
|
|||
|
|
Copyright (<EFBFBD>) 2006. Rodax Software.
|
|||
|
|
===============================================================================
|
|||
|
|
Los contenidos de este fichero son propiedad de Rodax Software titular del
|
|||
|
|
copyright. Este fichero s<EFBFBD>lo podr<EFBFBD> ser copiado, distribuido y utilizado,
|
|||
|
|
en su totalidad o en parte, con el permiso escrito de Rodax Software, o de
|
|||
|
|
acuerdo con los t<EFBFBD>rminos y condiciones establecidas en el acuerdo/contrato
|
|||
|
|
bajo el que se suministra.
|
|||
|
|
-----------------------------------------------------------------------------
|
|||
|
|
Web: www.rodax-software.com
|
|||
|
|
===============================================================================
|
|||
|
|
Fecha primera versi<EFBFBD>n: 22-05-2006
|
|||
|
|
Versi<EFBFBD>n actual: 1.0.0
|
|||
|
|
Fecha versi<EFBFBD>n actual: 22-05-2006
|
|||
|
|
===============================================================================
|
|||
|
|
Modificaciones:
|
|||
|
|
|
|||
|
|
Fecha Comentarios
|
|||
|
|
---------------------------------------------------------------------------
|
|||
|
|
===============================================================================
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
unit uViewProyectoObra;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
cxGraphics, DB, uDADataTable, dxLayoutControl, cxLookupEdit, cxDBLookupEdit,
|
|||
|
|
cxDBLookupComboBox, cxMemo, cxDBEdit, cxSpinEdit, cxCalc, cxCheckBox,
|
|||
|
|
cxDropDownEdit, cxContainer, cxEdit, cxTextEdit, cxMaskEdit, cxCalendar,
|
|||
|
|
Classes, Controls, cxControls,
|
|||
|
|
|
|||
|
|
uViewBase, uBizObra, ComCtrls, ToolWin, ImgList, PngImageList, ActnList,
|
|||
|
|
Forms, uCustomView, uViewDocumentosAsociados;
|
|||
|
|
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
IViewProyectoObra = interface(IViewBase)
|
|||
|
|
['{68EFF4B3-B966-48DA-AA5D-2BDE61A65213}']
|
|||
|
|
function GetProyectoObra: IBizProyectosObra;
|
|||
|
|
procedure SetProyectoObra(const Value: IBizProyectosObra);
|
|||
|
|
property ProyectoObra: IBizProyectosObra read GetProyectoObra write SetProyectoObra;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
TfrViewProyectoObra = class(TfrViewBase, IViewProyectoObra)
|
|||
|
|
dxLayoutControl1Group_Root: TdxLayoutGroup;
|
|||
|
|
dxLayoutControl1: TdxLayoutControl;
|
|||
|
|
DADataSource: TDADataSource;
|
|||
|
|
cbTipoProyecto: TcxDBComboBox;
|
|||
|
|
dxLayoutControl1Item3: TdxLayoutItem;
|
|||
|
|
edtAceptado: TcxDBCheckBox;
|
|||
|
|
dxLayoutControl1Item2: TdxLayoutItem;
|
|||
|
|
dxLayoutControl1Group6: TdxLayoutGroup;
|
|||
|
|
dxLayoutControl1Item1: TdxLayoutItem;
|
|||
|
|
edtDescripcion: TcxDBTextEdit;
|
|||
|
|
dxLayoutControl1Group3: TdxLayoutGroup;
|
|||
|
|
dxLayoutControl1Item4: TdxLayoutItem;
|
|||
|
|
edtlNombre: TcxDBTextEdit;
|
|||
|
|
DADataSource2: TDADataSource;
|
|||
|
|
procedure CustomViewCreate(Sender: TObject);
|
|||
|
|
private
|
|||
|
|
FProyectoObra: IBizProyectosObra;
|
|||
|
|
function GetProyectoObra: IBizProyectosObra;
|
|||
|
|
procedure SetProyectoObra(const Value: IBizProyectosObra);
|
|||
|
|
public
|
|||
|
|
property ProyectoObra: IBizProyectosObra read GetProyectoObra write SetProyectoObra;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
var
|
|||
|
|
frViewProyectoObra: TfrViewProyectoObra;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
{$R *.dfm}
|
|||
|
|
|
|||
|
|
procedure TfrViewProyectoObra.CustomViewCreate(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
inherited;
|
|||
|
|
cbTipoProyecto.Properties.Items.Add(TIPO_ANTEPROYECTO);
|
|||
|
|
cbTipoProyecto.Properties.Items.Add(TIPO_BASICO);
|
|||
|
|
cbTipoProyecto.Properties.Items.Add(TIPO_EJECUCION);
|
|||
|
|
cbTipoProyecto.Properties.Items.Add(TIPO_SEGURIDAD);
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
function TfrViewProyectoObra.GetProyectoObra: IBizProyectosObra;
|
|||
|
|
begin
|
|||
|
|
Result := FProyectoObra;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrViewProyectoObra.SetProyectoObra(const Value: IBizProyectosObra);
|
|||
|
|
begin
|
|||
|
|
FProyectoObra := Value;
|
|||
|
|
|
|||
|
|
if Assigned(FProyectoObra) then
|
|||
|
|
begin
|
|||
|
|
DADataSource.DataTable := FProyectoObra.DataTable;
|
|||
|
|
DADataSource2.DataTable := FProyectoObra.Obra.DataTable;
|
|||
|
|
end
|
|||
|
|
else
|
|||
|
|
begin
|
|||
|
|
DADataSource.DataTable := Nil;
|
|||
|
|
DADataSource2.DataTable := Nil;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end.
|