Current location - Training Enrollment Network - Books and materials - Ask for a C# library management system to change the password, and click OK.
Ask for a C# library management system to change the password, and click OK.
First, check the client. You can set flags for three text boxes, and set the Enable of the button to true only if all three text boxes are filled in, otherwise it will be false to prevent submission without filling in.

Then, in the focusout event of the textbox that confirms the new password, check whether the new password entered twice is the same. If it is different, there will be a hint. It is also possible to use messagebox and set a label to control the display and hiding.

Finally, get the new password and the old password in the click event of the confirmation button, and update the database when the old password meets the conditions.