public UserAuthenStyleUploadResult UserAuthenStyleUpload(string ProvinceID, string ID, string AreaID, AuthenRecord[] AuthenRecords, string ExtendField) { UserAuthenStyleUploadResult Result = new UserAuthenStyleUploadResult(); Result.Result = ErrorDefinition.IError_Result_UnknowError_Code; Result.ErrorDescription = ""; Result.ID = ID; Result.ExtendField = ""; Result.CustID = ""; //string strXML = ""; string SPID = ""; try { #region 数据校验 if (CommonUtility.IsEmpty(ProvinceID)) { Result.Result = ErrorDefinition.BT_IError_Result_InValidProvinceID_Code; Result.ErrorDescription = "ProvinceID不能为空"; return(Result); } if (CommonUtility.IsEmpty(AreaID)) { Result.Result = ErrorDefinition.BT_IError_Result_InValidAreaCode_Code; Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidAreaCode_Msg + ",AreaID不能为空"; return(Result); } if (CommonUtility.IsEmpty(ID)) { Result.Result = ErrorDefinition.BT_IError_Result_InValidCustID_Code; Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidCustID_Msg + ",不能为空"; return(Result); } if (!CommonUtility.IsEmpty(ExtendField)) { SPID = CommonBizRules.GetValueFromXmlStr(ExtendField, "SPID"); } #endregion Result.Result = BTForCrmBizRules.UserAuthenStyleUpload(ProvinceID, ID, AreaID, ExtendField, AuthenRecords, SPID, out Result.CustID, out Result.ErrorDescription); } catch (Exception ex) { Result.Result = ErrorDefinition.IError_Result_System_UnknowError_Code; Result.ErrorDescription = ErrorDefinition.IError_Result_System_UnknowError_Msg + "," + ex.Message; } finally { #region WriteLog StringBuilder msg = new StringBuilder(); msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n\r\n"); msg.Append("Crm客户认证信息同步接口 " + DateTime.Now.ToString("u") + "\r\n"); msg.Append(";ProvinceID - " + ProvinceID); msg.Append(";ID - " + ID); msg.Append(";AreaID - " + AreaID); if (AuthenRecords != null) { if (AuthenRecords.Length > 0) { for (int i = 0; i < AuthenRecords.Length; i++) { msg.Append(";AuthenType - " + AuthenRecords[i].AuthenType); msg.Append(";AuthenName - " + AuthenRecords[i].AuthenName); } } } msg.Append(";ExtendField - " + ExtendField); msg.Append("\r\n"); msg.Append("处理结果 - " + Result.Result); msg.Append("; 错误描述 - " + Result.ErrorDescription); msg.Append("; CustID - " + Result.CustID); msg.Append("; ID - " + Result.ID); msg.Append("; ErrorDescription - " + Result.ErrorDescription); msg.Append("; ExtendField - " + Result.ExtendField + "\r\n"); msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n"); BTUCenterInterfaceLog.CenterForCRM("UserAuthenStyleUpload", msg); #endregion } return(Result); }
public UserAuthenStyleUploadResult UserAuthenStyleUpload(string ProvinceID, string ID, string AreaID, AuthenRecord[] AuthenRecords, string ExtendField) { UserAuthenStyleUploadResult Result = new UserAuthenStyleUploadResult(); Result.Result = ErrorDefinition.IError_Result_UnknowError_Code; Result.ErrorDescription = ""; Result.ID = ID; Result.ExtendField = ""; Result.CustID = ""; //string strXML = ""; string SPID = ""; try { #region 数据校验 if (CommonUtility.IsEmpty(ProvinceID)) { Result.Result = ErrorDefinition.BT_IError_Result_InValidProvinceID_Code; Result.ErrorDescription = "ProvinceID不能为空"; return Result; } if (CommonUtility.IsEmpty(AreaID)) { Result.Result = ErrorDefinition.BT_IError_Result_InValidAreaCode_Code; Result.ErrorDescription =ErrorDefinition.BT_IError_Result_InValidAreaCode_Msg+",AreaID不能为空"; return Result; } if (CommonUtility.IsEmpty(ID)) { Result.Result = ErrorDefinition.BT_IError_Result_InValidCustID_Code; Result.ErrorDescription = ErrorDefinition.BT_IError_Result_InValidCustID_Msg + ",不能为空"; return Result; } if (!CommonUtility.IsEmpty(ExtendField)) { SPID = CommonBizRules.GetValueFromXmlStr(ExtendField, "SPID"); } #endregion Result.Result = BTForCrmBizRules.UserAuthenStyleUpload(ProvinceID, ID, AreaID,ExtendField, AuthenRecords,SPID, out Result.CustID, out Result.ErrorDescription); } catch (Exception ex) { Result.Result = ErrorDefinition.IError_Result_System_UnknowError_Code; Result.ErrorDescription = ErrorDefinition.IError_Result_System_UnknowError_Msg + "," + ex.Message; } finally { #region WriteLog StringBuilder msg = new StringBuilder(); msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n\r\n"); msg.Append("Crm客户认证信息同步接口 " + DateTime.Now.ToString("u") + "\r\n"); msg.Append(";ProvinceID - " + ProvinceID); msg.Append(";ID - " + ID); msg.Append(";AreaID - " + AreaID); if(AuthenRecords != null ) { if (AuthenRecords.Length > 0) { for (int i = 0; i < AuthenRecords.Length; i++) { msg.Append(";AuthenType - " + AuthenRecords[i].AuthenType); msg.Append(";AuthenName - " + AuthenRecords[i].AuthenName); } } } msg.Append(";ExtendField - " + ExtendField); msg.Append("\r\n"); msg.Append("处理结果 - " + Result.Result); msg.Append("; 错误描述 - " + Result.ErrorDescription); msg.Append("; CustID - " + Result.CustID); msg.Append("; ID - " + Result.ID); msg.Append("; ErrorDescription - " + Result.ErrorDescription); msg.Append("; ExtendField - " + Result.ExtendField + "\r\n"); msg.Append("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n"); BTUCenterInterfaceLog.CenterForCRM("UserAuthenStyleUpload", msg); #endregion } return Result; }