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); } }
/// <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); } }