Table of Content
HAL Forum
procedure PutWindowRecord (
Integer wn,record NameVc Namer)
Description:
This procedure gets specified Window number and puts changed Record/Block into Window's contents, ie. used when changing any Edit Field
Parameters:
wn Window Number,every open Window has got its Number, here you specify to which Window you want to put Record
Namer any Vc or Block, Variable of Record Type(Register/Block Name), in example it is BarcodeVc Record
remote function Boolean ReadFirstItem(string,var record INVc,Boolean,Boolean);

function Boolean BarcodeDClassItemcodeEFAfter(Integer wn,Integer changed)
BEGIN
  Boolean res;
  record BarcodeVc Barcoder;
  record INVc INr;
  
  GetWindowRecord(wn,Barcoder);
  if (ReadFirstItem(Barcoder.Itemcode,INr,true,true)) then begin
    Barcoder.Comment = INr.Name;
    PutWindowRecord(wn,Barcoder);
  end else begin
    Beep;
  end;
  BarcodeDClassItemcodeEFAfter = res;
  RETURN;
END;
  
global
function Boolean BarcodeDClassAfterEditField(Integer wn,string fieldname,Integer fn, Integer rownr,Integer changed)
BEGIN
  Boolean res;

  switch (fieldname) begin
    case "Itemcode": res = BarcodeDClassItemcodeEFAfter(wn,changed);
  end;
  BarcodeDClassAfterEditField = res;
  RETURN;
END;

Related topics:
««