private void Create(object sender, RoutedEventArgs e)
 {
     CreateRedeemPlanImport import = new CreateRedeemPlanImport
     {
         Title = input_Title.Text,
         Description = input_Description.Text,
         Integral = Convert.ToInt32(this.input_Money.Text),
         Money = Math.Round(Convert.ToDouble(this.input_Money.Text), 2),
         BeginTime = (DateTime)input_BeginTime.SelectedDate,
         EndTime = (DateTime)input_EndTime.SelectedDate,
         Hide = input_Hide.SelectedIndex == 0 ? false : true,
         Token = DataManager.GetValue<AdministratorExport>(DataKey.IWorld_Backstage_AdministratorInfo).Token
     };
     ActicityServiceClient client = new ActicityServiceClient();
     client.CreateRedeemPlanCompleted += ShowCreateRewardForRegisterPlansResult;
     client.CreateRedeemPlanAsync(import);
 }
コード例 #2
0
 /// <summary>
 /// 创建积分兑换的计划
 /// </summary>
 /// <param name="import">数据集</param>
 /// <returns>返回操作结果</returns>
 public NormalResult CreateRedeemPlan(CreateRedeemPlanImport import)
 {
     try
     {
         import.CheckAllowExecuteOrNot(db);
         new RedeemPlanManager(db).Create(import);
         return new NormalResult();
     }
     catch (Exception ex)
     {
         return new NormalResult(ex.Message);
     }
 }