/// <summary> /// 修改公告信息 /// </summary> /// <param name="import">数据集</param> /// <returns>返回操作结果</returns> public NormalResult EditBullein(EditBulleinImport import) { try { import.CheckAllowExecuteOrNot(db); new BulletinManager(db).Update(import); return new NormalResult(); } catch (Exception ex) { return new NormalResult(ex.Message); } }
private void Edit(object sender, RoutedEventArgs e) { EditBulleinImport import = new EditBulleinImport { Id = this.State.Id, Title = input_Title.Text, Context = input_Context.Text, BeginTime = GetTime(input_BeginTime.Text), EndTime = GetTime(input_EndTime.Text), Hide = input_Hide.SelectedIndex == 0, Token = DataManager.GetValue<AdministratorExport>(DataKey.IWorld_Backstage_AdministratorInfo).Token }; MessageServiceClient client = new MessageServiceClient(); client.EditBulleinCompleted += ShowEditResult; client.EditBulleinAsync(import); }