uses datmod;
{$R *.dfm}
procedure TfmPolom.DBNavigator1Click(Sender: TObject; Button: TNavigateBtn);
Var
a : string;
begin
if button = nbInsert then
begin
fmDatMod.IBStoredProc1.StoredProcName := 'POLOMKA_KOD_AUTOINC';
fmdatmod.IBStoredProc1.ExecProc;
a := fmdatmod.IBStoredProc1.ParamByName('NEW_VALUE').AsString;
fmdatmod.t_polomka.FieldByName('kod').AsString:=a;
end;
end;
end.
unit price;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Mask, DBCtrls, ExtCtrls, Grids, DBGrids, Menus;
type
TfmPrice = class(TForm)
GroupBox1: TGroupBox;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
DBLookupComboBox1: TDBLookupComboBox;
Button1: TButton;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
procedure DBNavigator1Click(Sender: TObject; Button: TNavigateBtn);
procedure Button1Click(Sender: TObject);
procedure DBGrid1DblClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
flag : string;
end;
var
fmPrice: TfmPrice;
implementation
uses datmod, zapchast;
{$R *.dfm}
procedure TfmPrice.Button1Click(Sender: TObject);
begin
fmZapchast.Show;
fmZapchast.flag := 'price';
end;
procedure TfmPrice.DBGrid1DblClick(Sender: TObject);
begin
if flag = 'adres' then
begin
fmdatmod.t_pos_rem.edit;
fmdatmod.t_pos_remFK_PRICE.AsString := fmdatmod.t_priceKOD.AsString;
fmPrice.Close;
end;
end;
procedure TfmPrice.DBNavigator1Click(Sender: TObject; Button: TNavigateBtn);
Var
a : string;
begin
if button = nbInsert then
begin
fmDatMod.IBStoredProc1.StoredProcName := 'PRICE_KOD_AUTOINC';
fmdatmod.IBStoredProc1.ExecProc;