127 lines
3.8 KiB
ObjectPascal
127 lines
3.8 KiB
ObjectPascal
|
|
unit uViewMontaje;
|
|||
|
|
|
|||
|
|
interface
|
|||
|
|
|
|||
|
|
uses
|
|||
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|||
|
|
Dialogs, uViewBase, ExtCtrls, StdCtrls, Buttons, DB, uDADataTable,
|
|||
|
|
DBCtrls, Grids, DBGrids, uBizMontajes, Mask, ComCtrls, uCustomView,
|
|||
|
|
JvComponent, JvFormAutoSize, cxControls, cxContainer, cxEdit, cxTextEdit,
|
|||
|
|
cxDBEdit, cxGraphics, cxMaskEdit, cxDropDownEdit, cxImageComboBox,
|
|||
|
|
cxCalendar, dxLayoutControl, uViewDatosYSeleccionCliente;
|
|||
|
|
|
|||
|
|
type
|
|||
|
|
IViewMontaje = interface(IViewBase)
|
|||
|
|
['{A9189F38-9832-4919-9B98-56F345C2AACA}']
|
|||
|
|
function GetMontaje: IBizMontaje;
|
|||
|
|
procedure SetMontaje(const Value: IBizMontaje);
|
|||
|
|
property Montaje: IBizMontaje read GetMontaje write SetMontaje;
|
|||
|
|
|
|||
|
|
function GetViewClienteMontaje: TfrViewDatosYSeleccionCliente;
|
|||
|
|
procedure SetViewClienteMontaje(const Value: TfrViewDatosYSeleccionCliente);
|
|||
|
|
property ViewClienteMontaje: TfrViewDatosYSeleccionCliente read GetViewClienteMontaje;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
TfrViewMontaje = class(TfrViewBase, IViewMontaje)
|
|||
|
|
DADataSource: TDADataSource;
|
|||
|
|
cbSituacion: TcxDBComboBox;
|
|||
|
|
edtFechaFin: TcxDBDateEdit;
|
|||
|
|
dxLayoutControlMontajeGroup_Root: TdxLayoutGroup;
|
|||
|
|
dxLayoutControlMontaje: TdxLayoutControl;
|
|||
|
|
dxLayoutControlMontajeGroup1: TdxLayoutGroup;
|
|||
|
|
dxLayoutControlMontajeItem1: TdxLayoutItem;
|
|||
|
|
dxLayoutControlMontajeItem3: TdxLayoutItem;
|
|||
|
|
dxLayoutControlMontajeItem4: TdxLayoutItem;
|
|||
|
|
frViewClienteMontaje: TfrViewDatosYSeleccionCliente;
|
|||
|
|
dxLayoutControlMontajeGroup2: TdxLayoutGroup;
|
|||
|
|
dxLayoutControlMontajeItem5: TdxLayoutItem;
|
|||
|
|
edtFechaInicio: TcxDBDateEdit;
|
|||
|
|
dxLayoutControlMontajeGroup3: TdxLayoutGroup;
|
|||
|
|
procedure cbSituacionPropertiesInitPopup(Sender: TObject);
|
|||
|
|
procedure CustomViewCreate(Sender: TObject);
|
|||
|
|
procedure CustomViewDestroy(Sender: TObject);
|
|||
|
|
protected
|
|||
|
|
FMontaje: IBizMontaje;
|
|||
|
|
FViewClienteMontaje : TfrViewDatosYSeleccionCliente;
|
|||
|
|
|
|||
|
|
function GetMontaje: IBizMontaje;
|
|||
|
|
procedure SetMontaje(const Value: IBizMontaje); virtual;
|
|||
|
|
function GetViewClienteMontaje: TfrViewDatosYSeleccionCliente;
|
|||
|
|
procedure SetViewClienteMontaje(const Value: TfrViewDatosYSeleccionCliente);
|
|||
|
|
|
|||
|
|
public
|
|||
|
|
property Montaje: IBizMontaje read GetMontaje write SetMontaje;
|
|||
|
|
property ViewClienteMontaje: TfrViewDatosYSeleccionCliente read GetViewClienteMontaje;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
implementation
|
|||
|
|
|
|||
|
|
uses uDataModuleMontajes, uDataModuleContactos;
|
|||
|
|
|
|||
|
|
{$R *.dfm}
|
|||
|
|
{ TfrViewMontajes }
|
|||
|
|
|
|||
|
|
{
|
|||
|
|
******************************* TfrViewMontajes ********************************
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
procedure TfrViewMontaje.cbSituacionPropertiesInitPopup(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
inherited;
|
|||
|
|
with cbSituacion.Properties.Items do
|
|||
|
|
begin
|
|||
|
|
if Count = 0 then
|
|||
|
|
begin
|
|||
|
|
BeginUpdate;
|
|||
|
|
try
|
|||
|
|
Clear;
|
|||
|
|
AddStrings(Montaje.DarListaSituaciones);
|
|||
|
|
finally
|
|||
|
|
EndUpdate;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrViewMontaje.CustomViewCreate(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
inherited;
|
|||
|
|
FViewClienteMontaje := frViewClienteMontaje;
|
|||
|
|
FViewClienteMontaje.MsgElegirCliente := 'Elija el cliente al que se le realizar<61> el montaje.';
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrViewMontaje.CustomViewDestroy(Sender: TObject);
|
|||
|
|
begin
|
|||
|
|
FViewClienteMontaje := Nil;
|
|||
|
|
inherited;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
function TfrViewMontaje.GetMontaje: IBizMontaje;
|
|||
|
|
begin
|
|||
|
|
Result := FMontaje;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
function TfrViewMontaje.GetViewClienteMontaje: TfrViewDatosYSeleccionCliente;
|
|||
|
|
begin
|
|||
|
|
Result := FViewClienteMontaje;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrViewMontaje.SetMontaje(const Value: IBizMontaje);
|
|||
|
|
begin
|
|||
|
|
FMontaje := Value;
|
|||
|
|
if Assigned(FMontaje) then
|
|||
|
|
DADataSource.DataTable := FMontaje.DataTable
|
|||
|
|
else
|
|||
|
|
DADataSource.DataTable := NIL;
|
|||
|
|
|
|||
|
|
frViewClienteMontaje.Cliente := FMontaje.Cliente;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
procedure TfrViewMontaje.SetViewClienteMontaje(const Value: TfrViewDatosYSeleccionCliente);
|
|||
|
|
begin
|
|||
|
|
FViewClienteMontaje := Value;
|
|||
|
|
end;
|
|||
|
|
|
|||
|
|
end.
|
|||
|
|
|