This repository has been archived on 2024-12-02. You can view files and clone it, but cannot push or open issues or pull requests.
AlonsoYSal_FactuGES/Modulos/Pagos/Cliente/uEditorPagosCliente.pas
2007-06-21 16:02:50 +00:00

67 lines
1.7 KiB
ObjectPascal

unit uEditorPagosCliente;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, uEditorPagos, Menus, DB, uDADataTable, JvAppStorage,
JvAppRegistryStorage, JvComponent, JvFormPlacement, ImgList,
PngImageList, StdActns, ActnList, ComCtrls, TB2ExtItems, TBXExtItems,
TBX, TB2Item, TB2Dock, TB2Toolbar, pngimage, ExtCtrls, JvExControls,
JvNavigationPane, JvComponentBase;
type
IEditorPagosCliente = interface(IEditorPagos)
['{2260CC06-258F-4C2C-8ED6-69782EE6F5D0}']
end;
TfEditorPagosCliente = class(TfEditorPagos, IEditorPagosCliente)
procedure actEliminarExecute(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
end;
var
fEditorPagosCliente: TfEditorPagosCliente;
implementation
{$R *.dfm}
{ TfEditorPagosCliente }
uses uEditorUtils,
uViewPagosCliente, uBizPagos, uViewPagos;
function ShowEditorPagosCliente (ABizObject : TDADataTableRules): TModalResult;
var
AEditor: TfEditorPagosCliente;
begin
AEditor := TfEditorPagosCliente.Create(Application);
try
AEditor.Pagos := (ABizObject as IBizPagosCliente);
Result := AEditor.ShowModal;
finally
AEditor.Release;
end;
end;
procedure TfEditorPagosCliente.actEliminarExecute(Sender: TObject);
begin
if (Application.MessageBox('¿Desea borrar este pago de cliente?', 'Atención', MB_YESNO) = IDYES) then
begin
inherited;
ViewGrid.RefreshGrid;
end;
end;
constructor TfEditorPagosCliente.Create(AOwner: TComponent);
begin
inherited;
ViewGrid := CreateView(TfrViewPagosCliente) as IViewPagos;
end;
initialization
RegisterEditor(IBizPagosCliente, ShowEditorPagosCliente, etItems);
end.