unit CadTipoPagamento;

interface

uses
  Windows, system.UItypes, IB_Access,  Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ModeloCadastro, Mask, IB_Controls, StdCtrls, UCBase, ImgList,
  AppEvnts, IB_Components, ExtCtrls, jpeg, Grids, IB_Grid, Buttons,
  ComCtrls, IB_EditButton, System.ImageList;

type
  TfrmCadTipoPagamento = class(TFrModeloCadastro)
    GroupBox2: TGroupBox;
    dbCodigo: TIB_Text;
    edtDescricao: TIB_Edit;
    procedure FormCreate(Sender: TObject);
    procedure BtGravarClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  frmCadTipoPagamento: TfrmCadTipoPagamento;

implementation

{$R *.dfm}

procedure TfrmCadTipoPagamento.FormCreate(Sender: TObject);
begin
   Gera_Codigo := True;
   Descricao_Unica := True;
   Campo_Tabela := 'DESCRICAO';
   inherited;
end;

procedure TfrmCadTipoPagamento.BtGravarClick(Sender: TObject);
begin
   if Trim(edtDescricao.Text) = '' then
   begin
      MessageDlg('Informe a descrição', mtWarning, [mbOK], 0);
      edtDescricao.SetFocus ;
      Exit;
   end;
  inherited;
end;

end.
