示例#1
0
        private void writeExceptionLog(AggregateExcelMessage result)
        {
            var exceptionMessage = result.ExcelMessages.Where(p => p.MessageType == ExcelMessageType.Exception).ToList();

            foreach (var message in exceptionMessage)
            {
                log.Error(message.Message + "\r\n" + message.Detail);
            }
        }
示例#2
0
        /// <summary>
        /// 测试账号连接登陆
        /// </summary>
        /// <param name="apiServerInfo"></param>
        /// <returns></returns>
        public bool CheckConnect(ApiServerInfo apiServerInfo)
        {
            var result      = new K3CloudApiClient(apiServerInfo);
            var loginResult = result.ValidateUser(apiServerInfo.Dbid, apiServerInfo.UserName, apiServerInfo.Password, apiServerInfo.Lcid);
            var resultType  = JObject.Parse(loginResult)["LoginResultType"].Value <int>();

            if (resultType != 1)
            {
                log.Error(loginResult);
                return(false);
            }
            else
            {
                return(true);
            }
        }