Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Save New
Message
De
15/07/2008 09:45:11
 
 
À
15/07/2008 09:41:04
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Divers
Thread ID:
01331292
Message ID:
01331360
Vues:
7
I don't have a "New" button on this form. I have "Save", "Save & New", and "Cancel".

>>On a data entry form, the client wants me to implement a "Save & New" button. This button will save the current entity being edited (or added) and add a new entity for editng without exiting the form. Some values from the current entity need to be carried over the the new entity.
>>
>>What is the best way to do this?
>
>One simple way among many; if you have a new button on the form is to call its PerformClick method
>
>
>private void btnSave_Click(object sender, EventArgs e)
>{
>     base.OnClick(e);
>     btnNew.PerformClick();
>}
>
>
>
>Make sure that CloseOnSave is not set to true.
>You could also easily roll your own button or subclass the mmButtonSave overiding the click event handler, calling the base click code and then add the code to perform the new. Lots of different ways depending on your need and flavor. Best way... probably depends. I would probably just roll my own as there isn't that much code to do a save and a new.
>
>Tim
Thanks,
Dan Jurden
djurden@outlook.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform