/// <summary> /// 上传按钮点击响应 /// </summary> protected void uploadButton_Click(object sender, EventArgs e) { if (this.noticeFileUpload.HasFile) { NoticeEditData.NoticeList = TableManager.Unserialize <mw.SysNtfConfig>(this.noticeFileUpload.FileBytes); NoticeEditData.DoLoad(); this.noticeListBox.Items.Clear(); foreach (var config in NoticeEditData.NoticeList) { if (config.id < NoticeEditData.CommonIdStart) { this.noticeListBox.Items.Add(new ListItem(this.GetNoticeText(config), config.title_id.ToString())); } } this.errorLabel.Text = TableManager.GMTDescTable[655].desc; TableManager.Save(NoticeEditData.NoticeList); } else { this.errorLabel.Text = TableManager.GMTDescTable[656].desc; } }
/// <summary> /// 载入 /// </summary> public static void Load() { NoticeEditData.NoticeList = TableManager.Load <mw.SysNtfConfig>(); NoticeEditData.DoLoad(); }