private void btn_SendAffiche_Click(object sender, EventArgs e) { try { afficheInfo _afficheinfo = new afficheInfo(); _afficheinfo.afficheTitle = "Title"; _afficheinfo.afficheContent = "Content"; _afficheinfo.receiverType = "1"; List <string> listAccounts = new List <string>(); listAccounts.Add("uctest01"); listAccounts.Add("uctest02"); _afficheinfo.staffAccounts = listAccounts; List <string> listDepartmentIds = new List <string>(); listDepartmentIds.Add("ucpart01"); listDepartmentIds.Add("ucpart02"); _afficheinfo.departmentIds = listDepartmentIds; CommentResponse result = ecBusiness.affiche(_afficheinfo); if (result != null) { this.txt_ResultCode.Text = result.resultCode; this.txt_Content.Text = result.resultContext; if (result.resultCode == "0") { this.WriteLog("call affiche success."); } else { this.WriteLog("call affiche failed," + result.resultContext); } } else { this.WriteLog("call affiche failed,response is null."); } } catch (Exception ex) { this.WriteLog("call affiche failed," + ex.Message); } }
/// <summary> /// 发送公告 /// </summary> /// <param name="info"></param> /// <returns></returns> public CommentResponse affiche(afficheInfo info) { CommentResponse result = eSDKServiceHelper.affiche(info); return(result); }
public static CommentResponse affiche(afficheInfo info) { CommentResponse result = eSDKServiceHelper.CallService <CommentResponse>(ECConstUri.affiche_uri, HttpMethod.POST, info); return(result); }