//修改账户 private void btn_editAccount_Click(object sender, EventArgs e) { try { EditAccountInfo _info = new EditAccountInfo(); _info.userId = this.txt_AccountId.Text.Trim(); EditAccount editAccount = new EditAccount(); editAccount.accountType = this.cbx_accountType.Text.Trim(); editAccount.accountId = this.txt_accountIdEx.Text.Trim(); editAccount.name = this.txt_accountName.Text.Trim(); editAccount.roleId = this.txt_roleId.Text.Trim(); editAccount.userLevel = this.txt_levelId.Text.Trim(); editAccount.departmentId = this.txt_dpId.Text.Trim(); editAccount.addr = "asdfaf"; editAccount.cellPhone = "13911111111"; editAccount.email = "*****@*****.**"; editAccount.fax = "33333333"; editAccount.homePhone = "051211111111"; editAccount.officePhone = "051266666666"; editAccount.otherPhone = "123123123"; editAccount.sex = "1"; editAccount.shortPhone = "051295552"; editAccount.title = "software engineer"; _info.account = editAccount; CommentResponse result = ecBusiness.EditAccount(_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 edit account success."); } else { this.WriteLog("call edit account failed," + result.resultContext); } } else { this.WriteLog("call edit account fail,response is null."); } } catch (Exception ex) { this.WriteLog("call edit account fail," + ex.Message); } }
public static CommentResponse editAccount(EditAccountInfo info) { CommentResponse result = eSDKServiceHelper.CallService <CommentResponse>(ECConstUri.account_uri, HttpMethod.PUT, info); return(result); }
/// <summary> /// 修改账户 /// </summary> /// <param name="info"></param> /// <returns></returns> public CommentResponse EditAccount(EditAccountInfo info) { CommentResponse result = eSDKServiceHelper.editAccount(info); return(result); }