[stackoverflow] [progress Openedge Abl] How To Write Code For Cancel Button To...

Status
Not open for further replies.
S

sri

Guest
I have written a simple code to search some data's from the database and display it in the browser (br1) , it contains the following layout screenshot

DO:
Enable
oadd oupdate odelete ocancel with frame default-frame.

Find First Customer where Customer.Cust-Num =input oCustNum exclusive-lock NO-ERROR .

if available customer

THEN DO:

message "1" view-as alert-box.

update
Customer.Name = input oName
Customer.Balance = input oBalance
Customer.Discount = input oDiscount
Customer.Credit-Limit = input oCredit-Limit
Customer.Phone = input oPhone
Customer.Contact = input oContact .

br1:refresh().
end.

if not available customer

THEN DO:

message "2" view-as alert-box.
Create Customer.

assign
Customer.Cust-Num = input oCustNum
Customer.Name = input oName
Customer.Balance = input oBalance
Customer.Discount = input oDiscount
Customer.Credit-Limit = input oCredit-Limit
Customer.Phone = input oPhone
Customer.Contact = input oContact .

end.
END.


i have written the code of save update and add in save button.

now when the cancel button is pressed i need to undo / rollback the data's to the original value before add/update is done.

could anyone help me please?

Continue reading...
 
Status
Not open for further replies.
Top