protected void HeaderActions_ActionPerformed(object sender, CommandEventArgs e) { switch (e.CommandName.ToLowerInvariant()) { case "save": ContactInfo contact = EditedObject as ContactInfo; AuthorizeModifyRequest(contact); try { if (ContactForm.Validate() && ContactForm.Store()) { ContactForm.Merge(); BaseInfo data = ContactForm.Data as BaseInfo; data.Generalized.SetObject(); Filter = null; ShowChangesSaved(); } } catch (Exception exception) { HandleException(exception); } break; case "logout": credentialProvider.SetCredential(new NetworkCredential()); URLHelper.Redirect(UrlResolver.ResolveUrl(LoginPageUrl)); break; } }
protected void HeaderActions_ActionPerformed(object sender, CommandEventArgs e) { if (e.CommandName.ToLowerInvariant() == "save") { ContactInfo contact = EditedObject as ContactInfo; AuthorizeModifyRequest(contact); try { if (ContactForm.Validate() && ContactForm.Store()) { ContactForm.Merge(); BaseInfo data = ContactForm.Data as BaseInfo; data.Generalized.SetObject(); Filter = null; ShowChangesSaved(); } } catch (Exception exception) { HandleException(exception); } } }