Exemplo n.º 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;
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 修改所有信息时更新机构运营状态信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static int UpdateModAll(UserBussState model)
        {
            string sql = "update UserBussState set businessArea = '" + model.businessArea + "',isHaveSeperate = '" + model.isHaveSeperate + "',serverPid = '" + model.serverPid + "',serverCid = " + model.serverCid + ",serverRegionId = " + model.serverRegionId + ",serverAddress = '" + model.serverAddress + "',remark = '" + model.remark + "',addTime = '" + model.addTime + "',infoType = " + model.infoType + ",serverPName = '" + model.serverPName + "',serverCName = '" + model.serverCName + "',serverRName = '" + model.serverRName + "' where addUser = " + model.addUser;

            return(DBHelperSQL.ExecuteSql(sql));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 更新所获荣誉和政府支持
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static int UpdateGovAndHonour(UserBussState model)
        {
            string sql = "update UserBussState set serverAddress = '" + model.serverAddress + "',serverRName = '" + model.serverRName + "' where id = " + model.id;

            return(DBHelperSQL.ExecuteSql(sql));
        }