unit CadTipoCombustivel;

interface

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

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

var
  frmCadTipoCombustivel: TfrmCadTipoCombustivel;

implementation

{$R *.dfm}

procedure TfrmCadTipoCombustivel.FormCreate(Sender: TObject);
begin
  inherited;
   Gera_Codigo := True;
end;

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

  inherited;

end;

end.
