Exemplo n.º 1
0
        public MUIAccountChoices GetPreferences()
        {
            MAccountProfile     mAccountProfile     = AccountUtility.CurrentProfile();
            MClientChoicesState mClientChoicesState = null;
            MUIAccountChoices   mRetVal             = null;

            if (mAccountProfile != null)
            {
                mClientChoicesState      = ClientChoicesUtility.GetClientChoicesState(mAccountProfile.Account.ToString(CultureInfo.InvariantCulture));
                mRetVal                  = new MUIAccountChoices(mClientChoicesState);
                mRetVal.Environment      = GWWebHelper.DisplayEnvironment;
                mRetVal.Version          = GWWebHelper.Version;
                mRetVal.FrameWorkVersion = GWWebHelper.FrameworkVersion;
            }
            return(mRetVal);
        }
Exemplo n.º 2
0
        public IHttpActionResult SaveClientChoices(MUIAccountChoices choices)
        {
            if (choices == null)
            {
                throw new ArgumentNullException("choices", "choices cannot be a null reference (Nothing in Visual Basic)!");
            }
            string mRetVal = "false";
            MClientChoicesState mClientChoicesState = ClientChoicesUtility.GetClientChoicesState(AccountUtility.CurrentProfile().Account);

            mClientChoicesState[MClientChoices.Action]                  = choices.Action;
            mClientChoicesState[MClientChoices.BackColor]               = choices.BackColor;
            mClientChoicesState[MClientChoices.ColorScheme]             = choices.ColorScheme;
            mClientChoicesState[MClientChoices.HeadColor]               = choices.HeadColor;
            mClientChoicesState[MClientChoices.HeaderForeColor]         = choices.HeaderForeColor;
            mClientChoicesState[MClientChoices.RowBackColor]            = choices.RowBackColor;
            mClientChoicesState[MClientChoices.AlternatingRowBackColor] = choices.AlternatingRowBackColor;
            mClientChoicesState[MClientChoices.LeftColor]               = choices.LeftColor;
            mClientChoicesState[MClientChoices.RecordsPerPage]          = choices.RecordsPerPage.ToString();
            mClientChoicesState[MClientChoices.SubheadColor]            = choices.SubheadColor;
            ClientChoicesUtility.Save(mClientChoicesState);
            AccountUtility.RemoveInMemoryInformation(true);
            return(Ok(mRetVal));
        }