Ejemplo n.º 1
0
        public ChangeSettingResponse ChangeAdminSetting(ChangeSettingRequest request)
        {
            var response = new ChangeSettingResponse {
                ResponseStatus = ResponseStatus.Success
            };

            var settingsProvider = new SettingsProvider();

            try
            {
                if (request.ActionType == ActionType.Update)
                {
                    response.isSuccessful = settingsProvider.ChangeSetting(request);
                }
                else
                {
                    response.ResponseStatus      = ResponseStatus.Failure;
                    response.ResponseDescription = "Not update action";
                }
            }
            catch (Exception ex)
            {
                response.ResponseStatus      = ResponseStatus.Failure;
                response.ResponseDescription = ex.Message;
            }
            return(response);
        }