示例#1
0
        //添加账户
        private void btn_AddAccount_Click(object sender, EventArgs e)
        {
            try
            {
                AddAccountInfo _info = new AddAccountInfo();
                _info.userId = this.txt_AccountId.Text.Trim();
                AddAccount addAccount = new AddAccount();
                addAccount.accountType  = this.cbx_accountType.Text.Trim();
                addAccount.loginName    = this.txt_loginName.Text.Trim();
                addAccount.password     = this.txt_loginPw5.Text.Trim();
                addAccount.name         = this.txt_accountName.Text.Trim();
                addAccount.roleId       = this.txt_roleId.Text.Trim();
                addAccount.userLevel    = this.txt_levelId.Text.Trim();
                addAccount.userState    = this.cbx_accountState.Text.Trim();
                addAccount.departmentId = this.txt_dpId.Text.Trim();
                _info.account           = addAccount;

                AddAcountResponse result = ecBusiness.AddAccount(_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 add account success.");
                    }
                    else
                    {
                        this.WriteLog("call add account failed," + result.resultContext);
                    }
                }
                else
                {
                    this.WriteLog("call add account fail,response is null.");
                }
            }
            catch (Exception ex)
            {
                this.WriteLog("call add account fail," + ex.Message);
            }
        }
示例#2
0
        public static AddAcountResponse addAccount(AddAccountInfo info)
        {
            AddAcountResponse result = eSDKServiceHelper.CallService <AddAcountResponse>(ECConstUri.account_uri, HttpMethod.POST, info);

            return(result);
        }
示例#3
0
        /// <summary>
        /// 添加账户
        /// </summary>
        /// <param name="info"></param>
        /// <returns></returns>
        public AddAcountResponse AddAccount(AddAccountInfo info)
        {
            AddAcountResponse result = eSDKServiceHelper.addAccount(info);

            return(result);
        }