Home > Back-end >  Save not remind rzpagecontrol closed from data
Save not remind rzpagecontrol closed from data

Time:10-04

Page a formA control another fromB fromB is placed in rzpagecontrol1, when closed fromB fromA control, when you are editing data of fromB, how in the formA reminded to save or cancel fromB the data?

CodePudding user response:

Want to see you is how to control closed?
FormB "closed", refers to the release of the Form object or remove pagecontrol page? Or is it just hide? Or call the Close? .

In addition, the "how to save in formA reminder or cancel the data in the fromB?"
- from the single responsibility principle consideration, this matter, should be handled by FormB: in "closed", namely to make prompt, trigger to FormA FormB and control way of "closed"

CodePudding user response:

When the data is modified, set a variable to ON, and in FormB CloseQuery events, and judge the value of the variable, when ON, shows that value have change, according to the need, if it closed, set canClose=true if you do not save, is set canClose=false

CodePudding user response:

refer to the second floor wangwei244157887 response:
when the data is modified, set a variable to ON, and in FormB CloseQuery events, and judge the value of the variable, when ON, shows that value have change, according to the need, if it closed, set canClose=true if you do not save, is set canClose=false


FormA is how to control the FORMB "closed"?
  • Related