unit AlterarFilial;

interface

uses
  Windows, system.UItypes, IB_Access,  Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, TelaComum, ImgList, ExtCtrls, StdCtrls, Buttons, IB_Grid,
  UCBase, jpeg, System.ImageList;

type
  TfrmAlterarFilial = class(TfrmTelaComum)
    Label1: TLabel;
    edtFilial: TIB_LookupCombo;
    Image1: TImage;
    lblFilialAtual: TLabel;
    UCControls1: TUCControls;
    procedure FormCreate(Sender: TObject);
    procedure BtCancelarClick(Sender: TObject);
  private
    { Private declarations }
    CodFilialATual : Integer;
  public
    { Public declarations }
  end;

var
  frmAlterarFilial: TfrmAlterarFilial;

implementation

uses DataModulo, IB_Components, Principal;

{$R *.dfm}

procedure TfrmAlterarFilial.FormCreate(Sender: TObject);
begin
  inherited;
   CodFilialATual := Dados.qrFilial.FieldByName('COD_FILIAL').AsInteger;
   lblFilialAtual.Caption := Dados.qrFilial.FieldByName('APELIDO').AsString;
end;

procedure TfrmAlterarFilial.BtCancelarClick(Sender: TObject);
begin
  inherited;
   Dados.qrFilial.Locate('COD_FILIAL', CodFilialATual , [] ) ;
   ModalResult := mrCancel;
end;

end.
