public static CommentResponse delDepartment(DelDepartmentInfo info) { string _uri = ECConstUri.department_uri + string.Format("?userId={0}&departmentId={1}", info.userId, info.departmentId); CommentResponse result = eSDKServiceHelper.CallService <CommentResponse>(_uri, HttpMethod.DELETE); return(result); }
//删除部门 private void btn_delDepartment_Click(object sender, EventArgs e) { try { DelDepartmentInfo _info = new DelDepartmentInfo(); _info.userId = this.txt_Account.Text.Trim(); _info.departmentId = this.txt_departmentId.Text.Trim(); CommentResponse result = ecBusiness.DelDepartment(_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 del department success."); } else { this.WriteLog("call del department failed," + result.resultContext); } } else { this.WriteLog("call del department fail,response is null."); } } catch (Exception ex) { this.WriteLog("call del department fail," + ex.Message); } }
/// <summary> /// 删除部门 /// </summary> /// <param name="info"></param> /// <returns></returns> public CommentResponse DelDepartment(DelDepartmentInfo info) { CommentResponse result = eSDKServiceHelper.delDepartment(info); return(result); }