Re: TransferData( )

Posted by webmaster Guido on January 23, 2010

In Reply to Re: DbGrid/EditBox Search posted by FARHAN KARIMSHAH on January 22, 2010

: ... I'M ACTUALY RECONSTRUCTING A POINT OF SALE FROM SOURCE CODE ETC.. THE CREATOR OF THE POINT OF SALE USES THE FUNCTION/CODE OF TRANSFERDATA(SENDER), ANY IDEA WHAT IT MAY BE?

: 1-
: if tproduct.fieldbyname(mndx).asstring=uppercase(mdata.text) then begin
: TransferData(Sender);
: 2-
: procedure FORM1.TransferData(Sender: TObject);
: begin
: mquantity := 1;
: if mquantity <= tproductstock.value then begin
: muprice := tproductuprice.value;
: mnett := muprice*mquantity;
: {*******************APPEND SELL**************************}
: tsell.active := fals.... E.T.C.
: 3-
: procedure form1.dbgrid1DblClick(Sender: TObject);
: begin
: TransferData(Sender);
: edit3.caption := 'Enter Data ';
: end;


This code lets you only sell 1 item at a time, because of: mquantity := 1
It almost seems as if this is meant as a debugging test; maybe mquantity was set previously to a value that was obtained from an input? (a TEdit,...)
I suggest that you search for other parts of the code that assign something to mquantity.

Good luck!

Follow Ups