Example #1
0
    protected void HeaderActions_ActionPerformed(object sender, CommandEventArgs e)
    {
        switch (e.CommandName.ToLowerInvariant())
        {
        case "save":
            AccountInfo account = EditedObject as AccountInfo;
            AuthorizeModifyRequest(account);
            try
            {
                if (CompanyForm.Validate() && CompanyForm.Store())
                {
                    CompanyForm.Merge();
                    BaseInfo data = CompanyForm.Data as BaseInfo;
                    data.Generalized.SetObject();
                    Filter = null;
                    ShowChangesSaved();
                }
            }
            catch (Exception exception)
            {
                HandleException(exception);
            }
            break;

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