For Programmers: Free Programming Magazines  


Home > Archive > Clarion > February 2005 > How i can code Updateing for Quantity in Editinplace Methode.









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author How i can code Updateing for Quantity in Editinplace Methode.
alhajj@gmail.com

2005-02-20, 8:55 pm

hi all
I need ur Help for the Correct way to Write code to ubdate Quantity
between three table (ItemCard,Ubdate Purchase and update sales)

example:

I have three table (ItemCard,Ubdate Purchase and update sales). and
there r (Ite:Quantity field in Item Card Table),(Pud:Quantity Field in
Purchase table) and (Sad:Quantity Field in Sales table)
i try to write Code in update purchase procedure, after
Restfromask(request,Response)

if Response = RequestCompleted
case Request
of InsertRecord
ITE:ItemCode = Queue:Browse.PUD:ItemCode
if Access:ItemCard.Fetch(ITE:Key_ItemCode) = LEVEL:Benign
ITE:Qty += Queue:Browse.PUD:Quantity


IF Access:ItemCard.Update() <> LEVEL:Benign

STOP('No Items like This There'&ERROR())
end

else
stop( 'Did not find item' )
end


of ChangeRecord
ITE:ItemCode = Queue:Browse.PUD:Itemcode
if Access:ItemCard.Fetch(ITE:Key_ItemCode) = LEVEl:Benign
ITE:QTY -= loc:SAVQty ! Loc:SavQty is Temp var to return
clac Quantity ( i clip this Var from askrecord method)
ITE:QTY += Queue:Browse.PUD:Quantity
Stop('ITE:QTY = '& ITE:Qty)
IF Access:ItemCard.Update() <> LEVEL:Benign

STOP('No Items like this There'&ERROR())
end
end

of DeleteRecord
ITE:ItemCode = PUD:Itemcode
if Access:ItemCard.Fetch(ITE:Key_ItemCode) = Level:Benign
ITE:Qty -= Queue:Browse.PUD:Quantity

end
IF Access:ItemCard.Update() <> LEVEL:Benign

STOP('No Items like this There'&ERROR())
end
end
end

((Same Code in update sales Procedure
is this the fit way to update quantity if yes
why The result of quantity is wrong ?
else
please provide me with sloution.))
Thanks

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com