unit EditAddResult;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons;

type
  TfmEditAddResult = class(TForm)
    lbl1: TLabel;
    lbl2: TLabel;
    lbl3: TLabel;
    BitBtn1: TBitBtn;
    edt1: TEdit;
    edt2: TEdit;
    edt3: TEdit;
    chk1: TCheckBox;
    procedure BitBtn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  fmEditAddResult: TfmEditAddResult;

implementation

uses dmu;

{$R *.dfm}

procedure TfmEditAddResult.BitBtn1Click(Sender: TObject);
begin
try
dm.tbl3.Edit;
dm.tbl3.FieldByName('Фамилия').AsString:=fmEditAddResult.edt1.Text;
dm.tbl3.FieldByName('Имя').AsString:=fmEditAddResult.edt2.Text;
dm.tbl3.FieldByName('Отчество').AsString:=fmEditAddResult.edt3.Text;

dm.tbl3.FieldByName('Доступ').AsBoolean:=fmEditAddResult.chk1.Checked;
dm.tbl3.Post;
except
  ShowMessage('Проверьте введенные вами данные!');
end;
close;
end;

end.
