/// <summary> /// 加载平台信息 /// </summary> private void LoadPlatform() { NxPlatformEO NxPlatformEO = new NxPlatformEO(); NxPlatformEO = PfManage.GetPlatformByPK(Request.QueryString["Pfid"]); if (!string.IsNullOrEmpty(NxPlatformEO.PfName)) { this.txtPfname.Text = NxPlatformEO.PfName; txtPfname_en.Text = NxPlatformEO.PfText1;//显示英文名称 this.hfPfName.Value = NxPlatformEO.PfName; this.hfPfImg.Value = NxPlatformEO.PfImgUrl; this.imgUrl.ImageUrl = NxPlatformEO.PfImgUrl; if (!string.IsNullOrEmpty(NxPlatformEO.PfImgUrl)) { this.imgUrl.ImageUrl = NxPlatformEO.PfImgUrl; this.imgUrl.Visible = true; this.FileUpload1.Visible = false; this.btnUpload.Visible = true; this.btnCancelUpload.Visible = false; } else { this.imgUrl.Visible = false; this.FileUpload1.Visible = true; this.btnUpload.Visible = false; this.btnCancelUpload.Visible = true; } this.rblState.SelectedValue = NxPlatformEO.PfState; this.txtPfsort.Text = NxPlatformEO.PfSort.ToString(); } }
protected void btnOK_Click(object sender, EventArgs e) { NxPlatformEO NxPlatformEO = new NxPlatformEO(); NxPlatformEO = PfManage.GetPlatformByPK(this.ddlPf.SelectedValue); if (this.rblStatus.SelectedValue == "0") { NxPlatformEO.PfIsRepair = "1"; //开启维护 NxPlatformEO.PfIsNewShow = "0"; //不显示新功能说明 } else { NxPlatformEO.PfIsNewShow = "1"; //显示新功能 NxPlatformEO.PfIsRepair = "0"; //关闭维护 if (string.IsNullOrEmpty(this.txtPfnewFunction.Text.Trim())) { this.divAlert.Visible = true; this.lblAlert.Text = "请输入新功能说明"; this.txtPfnewFunction.Focus(); CloseDivImplementation(); return; } else { NxPlatformEO.PfNewFunction = this.txtPfnewFunction.Text.Trim(); } if (string.IsNullOrEmpty(this.txtEndTime.Text.Trim())) { this.divAlert.Visible = true; this.lblAlert.Text = "请选择维护结束时间"; CloseDivImplementation(); return; } else { NxPlatformEO.PfNewEndTime = Convert.ToDateTime(txtEndTime.Text.Trim()); } } if (PfManage.EditPlatform(NxPlatformEO) > 0) { //插入操作日志 InsertLog("修改平台维护信息", string.Format("Platformname:{0},id:{1}", this.ddlPf.SelectedItem.Text, this.ddlPf.SelectedValue), 14, GetPlatformIdByValue(1)); CloseDivImplementation(); Jswork.Alert("平台维护信息修改成功", "PlatformMaintain.aspx"); } else { this.divAlert.Visible = true; this.lblAlert.Text = "平台维护信息修改失败"; } CloseDivImplementation(); }