コード例 #1
0
        /// <summary>
        /// 加载信息
        /// </summary>
        private void LoadInfo()
        {
            UserBussState item = UserBussStateService.GetModelByUserId(userId);

            if (item != null)
            {
                this.content1.Value = item.serverAddress;
                this.content2.Value = item.serverRName;
            }
        }
コード例 #2
0
        /// <summary>
        /// 保存事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Button1_Click(object sender, EventArgs e)
        {
            UserBussState item = UserBussStateService.GetModelByUserId(userId);

            if (item != null)
            {
                item.serverAddress = this.content1.Value.Trim().Replace("'", "\"");
                item.serverRName   = this.content2.Value.Trim().Replace("'", "\"");
                UserBussStateService.UpdateGovAndHonour(item);
            }
            ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "", "alert('保存成功!');", true);
        }