/// <summary> /// 创建公告信息 /// </summary> /// <param name="import">数据集</param> /// <returns>返回操作结果</returns> public NormalResult CreateBullein(CreateBulleinImport import) { try { import.CheckAllowExecuteOrNot(db); new BulletinManager(db).Create(import); return new NormalResult(); } catch (Exception ex) { return new NormalResult(ex.Message); } }
private void Create(object sender, RoutedEventArgs e) { CreateBulleinImport import = new CreateBulleinImport { 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.CreateBulleinCompleted += ShowCreateResult; client.CreateBulleinAsync(import); }