unit u_op_kam; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, DB, ADODB, bsSkinCtrls, StdCtrls, Mask, DBCtrls; type Tfrmkam = class(TForm) t_op_kam: TADOQuery; t_op_kam1: TDataSource; bsSkinButton2: TbsSkinButton; Label126: TLabel; DBEdit63: TDBEdit; Label1: TLabel; DBEdit1: TDBEdit; Label2: TLabel; DBEdit2: TDBEdit; procedure bsSkinButton2Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure t_op_kamAfterInsert(DataSet: TDataSet); private { Private declarations } public { Public declarations } bsno:string; end; var frmkam: Tfrmkam; implementation {$R *.dfm} procedure Tfrmkam.bsSkinButton2Click(Sender: TObject); begin if (t_op_kam.State=dsinsert)or(t_op_kam.State=dsedit) then t_op_kam.post; close; end; procedure Tfrmkam.FormShow(Sender: TObject); begin t_op_kam.Close; t_op_kam.Parameters.ParamByName('񅧏').Value:=bsno; t_op_kam.Open; end; procedure Tfrmkam.t_op_kamAfterInsert(DataSet: TDataSet); begin t_op_kam.fieldbyname('񅧏').AsString:=bsno; end; end.