Exemple #1
0
        private bool CheckIsAuthorization()
        {
            var dotcySetting = _dotcySettingRepository.GetAll().FirstOrDefault();

            if (dotcySetting != null && dotcySetting.dot_dmsUrl != null && dotcySetting.dot_dmsLogin != null && dotcySetting.dot_dmsPassword != null &&
                dotcySetting.dot_dmsUrl != string.Empty && dotcySetting.dot_dmsLogin != string.Empty && dotcySetting.dot_dmsPassword != string.Empty &&
                dotcySetting.dot_dmsApplicationId != null && dotcySetting.dot_dmsApplicationId != string.Empty)
            {
                dmsUrl        = dotcySetting.dot_dmsUrl;
                userName      = dotcySetting.dot_dmsLogin;
                password      = dotcySetting.dot_dmsPassword;
                applicationId = dotcySetting.dot_dmsApplicationId;
                return(true);
            }
            else
            {
                error = "Authorization Parameters Failed";
                return(false);
            }
        }