unit UEncabezado;

interface

uses
  Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
  Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Mask, Vcl.DBCtrls,
  Data.DB, Data.Win.ADODB, Vcl.Buttons, Vcl.ExtCtrls;

type
  TFEncabezado = class(TForm)
    Label1: TLabel;
    DBEdit1: TDBEdit;
    Label2: TLabel;
    DBEdit2: TDBEdit;
    Label3: TLabel;
    DBEdit3: TDBEdit;
    Label4: TLabel;
    DBEdit4: TDBEdit;
    Label5: TLabel;
    DBEdit5: TDBEdit;
    Label6: TLabel;
    DBEdit6: TDBEdit;
    Label7: TLabel;
    DBEdit7: TDBEdit;
    Label8: TLabel;
    DBEdit8: TDBEdit;
    Label9: TLabel;
    DBEdit9: TDBEdit;
    Label10: TLabel;
    DBEdit10: TDBEdit;
    Label11: TLabel;
    DBEdit11: TDBEdit;
    Label12: TLabel;
    DBEdit12: TDBEdit;
    Label13: TLabel;
    DBEdit13: TDBEdit;
    Label14: TLabel;
    DBEdit14: TDBEdit;
    Label15: TLabel;
    DBEdit15: TDBEdit;
    Panel1: TPanel;
    BtnEditar: TBitBtn;
    BtnGuardar: TBitBtn;
    TEncabezado: TADOTable;
    btnCancel: TBitBtn;
    BitBtn1: TBitBtn;
    DSEncabezado: TDataSource;
    Label16: TLabel;
    DBEdit16: TDBEdit;
    procedure BtnEditarClick(Sender: TObject);
    procedure btnCancelClick(Sender: TObject);
    procedure BtnGuardarClick(Sender: TObject);
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  FEncabezado: TFEncabezado;

implementation

{$R *.dfm}

uses Udm;

procedure TFEncabezado.BitBtn1Click(Sender: TObject);
begin
close
end;

procedure TFEncabezado.btnCancelClick(Sender: TObject);
begin
  TEncabezado.Cancel;
 BtnEditar.Enabled:= true;
 BtnCancel.Enabled:= false;
 BtnGuardar.Enabled:= false;
end;

procedure TFEncabezado.BtnEditarClick(Sender: TObject);
begin
 TEncabezado.Edit;
 BtnEditar.Enabled:= false;
 BtnCancel.Enabled:= true;
 BtnGuardar.Enabled:= true;
end;

procedure TFEncabezado.BtnGuardarClick(Sender: TObject);
begin
 TEncabezado.Post;
 BtnEditar.Enabled:= true;
 BtnCancel.Enabled:= false;
 BtnGuardar.Enabled:= false;
end;

end.
