public static QueryDepartmentResponse queryDepartment(QyDepartmentInfo info) { string _uri = ECConstUri.department_uri + string.Format("?userId={0}&parentId={1}&pageCount={2}&pageNum={3}", info.userId, info.parentId, info.pageCount, info.pageNum); QueryDepartmentResponse result = eSDKServiceHelper.CallService <QueryDepartmentResponse>(_uri, HttpMethod.GET); return(result); }
//查询部门 private void btn_queryDepartment_Click(object sender, EventArgs e) { try { QyDepartmentInfo _info = new QyDepartmentInfo(); _info.userId = this.txt_Account.Text.Trim(); _info.parentId = this.txt_parentId.Text.Trim(); _info.pageCount = this.txt_dpPageCount.Text.Trim(); _info.pageNum = this.txt_dpPageNum.Text.Trim(); QueryDepartmentResponse result = ecBusiness.QueryDepartment(_info); if (result != null) { this.txt_ResultCode.Text = result.resultCode; this.txt_Content.Text = result.resultContext; this.txt_ResultInfo.Text = eSDKServiceHelper.GetJsonString(result); if (result.resultCode == "0") { this.WriteLog("call query department success."); } else { this.WriteLog("call query department failed," + result.resultContext); } } else { this.WriteLog("call query department fail,response is null."); } } catch (Exception ex) { this.WriteLog("call query department fail," + ex.Message); } }
/// <summary> /// 查询部门 /// </summary> /// <param name="info"></param> /// <returns></returns> public QueryDepartmentResponse QueryDepartment(QyDepartmentInfo info) { QueryDepartmentResponse result = eSDKServiceHelper.queryDepartment(info); return(result); }