Esempio n. 1
0
 public ChangeNews()
 {
     InitializeComponent();
     srv = WcfProxy.GetProxy;
     srv.UpdateNewsCompleted += new System.EventHandler<UpdateNewsCompletedEventArgs>(srv_UpdateNewsCompleted);
     this.dataForm1.Loaded += new RoutedEventHandler(dataForm1_Loaded);
 }
Esempio n. 2
0
 public ChangeOdds()
 {
     InitializeComponent();
     srv = WcfProxy.GetProxy;
     srv.UpdateDefaultOddsCompleted += new EventHandler<UpdateDefaultOddsCompletedEventArgs>(srv_UpdateDefaultOddsCompleted);
     srv.UpdateCurrentOddsCompleted += new EventHandler<UpdateCurrentOddsCompletedEventArgs>(srv_UpdateCurrentOddsCompleted);
 }
Esempio n. 3
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     CarrierBankInfo model = (sender as Button).Tag as CarrierBankInfo;
     if (model.IsEnable == 0)
         model.IsEnable = 1;
     else
         model.IsEnable = 0;
     srv = WcfProxy.GetProxy;
     srv.ChangeBankEnableCompleted += (s, er) =>
     {
         loadingProgress.IsBusy = false;
         if (er.Result)
         {
             (sender as Button).Tag = model;
             if (model.IsEnable == 0)
             {
                 (sender as Button).Foreground = new SolidColorBrush(Colors.Green);
                 (sender as Button).Content = "启用";
             }
             else
             {
                 (sender as Button).Foreground = new SolidColorBrush(Colors.Red);
                 (sender as Button).Content = "关闭";
             }
         }
     };
     loadingProgress.IsBusy = true;
     srv.ChangeBankEnableAsync(model);
 }
Esempio n. 4
0
 public PlatformNews()
 {
     InitializeComponent();
     this.Loaded += new RoutedEventHandler(PlatformNews_Loaded);
     srv = WcfProxy.GetProxy;
     srv.GetNewsCompleted += new EventHandler<GetNewsCompletedEventArgs>(srv_GetNewsCompleted);
     this.KeyDown += new KeyEventHandler(Page_KeyDown);
 }
Esempio n. 5
0
 public LotteryAdd()
 {
     InitializeComponent();
     srv = WcfProxy.GetProxy;
     this.Loaded += new RoutedEventHandler(LotteryAdd_Loaded);
     this.dataForm1.Loaded += new RoutedEventHandler(dataForm1_Loaded);
     srv.AddLotteryCompleted += new EventHandler<AddLotteryCompletedEventArgs>(srv_AddLotteryCompleted);
 }
Esempio n. 6
0
 public AddMember()
 {
     InitializeComponent();
     srv = WcfProxy.GetProxy;
     srv.GetOverAllCfgCompleted += new EventHandler<GetOverAllCfgCompletedEventArgs>(srv_GetOverAllCfgCompleted);
     srv.AddMemberCompleted += new EventHandler<AddMemberCompletedEventArgs>(srv_AddMemberCompleted);
     this.Loaded += new RoutedEventHandler(AddMember_Loaded);
     this.dataForm1.Loaded += new RoutedEventHandler(dataForm1_Loaded);
 }
Esempio n. 7
0
 public LogBgView()
 {
     InitializeComponent();
     srv = WcfProxy.GetProxy;
     srv.GetBgLogDataCompleted += new EventHandler<GetBgLogDataCompletedEventArgs>(srv_GetBgLogDataCompleted);
     dtFrom.Text = DateTime.Now.ToShortDateString();
     dtTo.Text = DateTime.Now.ToShortDateString();
     this.KeyDown += new KeyEventHandler(Page_KeyDown);
 }
 void LoadForm()
 {
     this.sp_Type.Visibility = Visibility.Collapsed;
     srv = WcfProxy.GetProxy;
     srv.GetAdminProfitReportAsync(startDate, endDate);
     loadingProgress.IsBusy = true;
     srv.GetAdminProfitReportCompleted += (s, e) =>
     {
         loadingProgress.IsBusy = false;
         this.dataForm1.CurrentItem = e.Result.FirstOrDefault();
         if (e.Result.Count == 0)
             this.dataForm1.CurrentItem = new ProfitReport();
     };
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     LotteryInfo lottery = (sender as Button).Tag as LotteryInfo;
     if (lottery.IsOpen == 0)
         lottery.IsOpen = 1;
     else
         lottery.IsOpen = 0;
     srv = WcfProxy.GetProxy;
     srv.UpdateLotteryIsOpenCompleted += (s, er) =>
     {
         loadingProgress.IsBusy = false;
         if (er.Result)
         {
             (sender as Button).Tag = lottery;
             if (lottery.IsOpen == 0)
                 (sender as Button).Foreground = new SolidColorBrush(Colors.Green);
             else
                 (sender as Button).Foreground = new SolidColorBrush(Colors.Red);
         }
     };
     srv.UpdateLotteryIsOpenAsync(lottery);
     loadingProgress.IsBusy = true;
 }
 void LoadGrid()
 {
     this.sp_Type.Visibility = Visibility.Visible;
     string type = (cbxType.SelectedItem as ComboBoxItem).Content.ToString() == "请选择" ? "":
         ((cbxType.SelectedItem as ComboBoxItem).Content.ToString()=="派奖"?"盈亏":
         (cbxType.SelectedItem as ComboBoxItem).Content.ToString());
     srv = WcfProxy.GetProxy;
     srv.GetAdminProfitDetailAsync(type,startDate, endDate);
     loadingProgress.IsBusy = true;
     srv.GetAdminProfitDetailCompleted += (s, e) =>
     {
         loadingProgress.IsBusy = false;
         if (e.Result.Count == 0)
         {
             MessageBox.Show("没有找到匹配的记录!");
         }
         PagedCollectionView pcv = new PagedCollectionView(e.Result);
         this.dataPager.Source = pcv;
         this.dgList.ItemsSource = pcv;
     };
 }
Esempio n. 11
0
 public ChangeBonus()
 {
     InitializeComponent();
     srv = WcfProxy.GetProxy;
     srv.UpdatePlayTypeRadioBonusCompleted += new EventHandler<UpdatePlayTypeRadioBonusCompletedEventArgs>(srv_UpdatePlayTypeRadioBonusCompleted);
 }
Esempio n. 12
0
 void LoadLottery()
 {
     currentPos = 0;
     this.tabItem0.IsSelected = true;
     this.sp_playradio.Visibility = Visibility.Collapsed;
     this.sp_playtype.Visibility = Visibility.Collapsed;
     this.sp_lottery.Visibility = Visibility.Visible;
     srv = WcfProxy.GetProxy;
     loadingProgress.IsBusy = true;
     srv.GetLotteryInfoAsync(txtLotteryType.Text.Trim(),
         (cbxIsEnable.SelectedItem as ComboBoxItem).Tag.ToString(),
         (cbxOrientation.SelectedItem as ComboBoxItem).Tag.ToString());
     srv.GetLotteryInfoCompleted += (s, er) =>
         {
             loadingProgress.IsBusy = false;
             this.dgLottery.ItemsSource = er.Result;
         };
 }
Esempio n. 13
0
 void LoadPositive()
 {
     tabItem0.IsSelected = true;
     srv = WcfProxy.GetProxy;
     srv.GetPlayTypeRadioForBonusCompleted += (s, er) =>
     {
         loadingProgress.IsBusy = false;
         if (er.Result.Count == 0)
         {
             MessageBox.Show("没有找到匹配的记录!");
         }
         this.dgPlayType_P.ItemsSource = er.Result;
     };
     string lotteryId=string.Empty;
     if ((cbxLottery.SelectedItem as LotteryInfo).LotteryTypeID == 0)
         lotteryId = "";
     else
         lotteryId = (cbxLottery.SelectedItem as LotteryInfo).LotteryTypeID.ToString();
     srv.GetPlayTypeRadioForBonusAsync(lotteryId, txtPlayType.Text.Trim(), 0, txtPlayRadio.Text.Trim());
     loadingProgress.IsBusy = true;
 }
Esempio n. 14
0
 void LoadGrid()
 {
     if (!Validate.IsZNumber(txtRecordId.Text.ToString()))
     {
         MessageBox.Show("请输入正确的订单号!");
         return;
     }
     this.UpdateLayout();
     string userid = txtUserId.Text.ToString().Trim();
     Int64 lotteryid = (cbxLottery.SelectedItem as LotteryInfo).LotteryTypeID;
     Int64 recordid = (txtRecordId.Text.ToString()==string.Empty)?0:Int64.Parse(txtRecordId.Text.ToString());
     Int64 playtypeid = (cbxPlayType.SelectedItem as PlayTypeInfo).PlayTypeID;
     string isPj = (cbxIsPj.SelectedItem as ComboBoxItem).Tag.ToString() == "-1" ? "" :
         (cbxIsPj.SelectedItem as ComboBoxItem).Tag.ToString();
     string winorlose = (cbxWin.SelectedItem as ComboBoxItem).Tag.ToString() == "-1" ? "" :
         (cbxWin.SelectedItem as ComboBoxItem).Tag.ToString();
     srv = WcfProxy.GetProxy;
     loadingProgress.IsBusy = true;
     srv.GetBetRecordAsync(playtypeid,recordid,lotteryid, isPj, userid, winorlose, startDate.ToString("yyyy-MM-dd HH:mm:ss"), endDate.ToString("yyyy-MM-dd HH:mm:ss"));
     srv.GetBetRecordCompleted += (s, e) =>
     {
         loadingProgress.IsBusy = false;
         if (e.Result.Count == 0)
         {
             MessageBox.Show("没有找到匹配的记录!");
         }
         PagedCollectionView pageView = new PagedCollectionView(e.Result);
         this.dataPager.Source = pageView;
         this.dgList.ItemsSource = pageView;
     };
 }
Esempio n. 15
0
        void InitComboBox()
        {
            srv = WcfProxy.GetProxy;
            srv.GetAllLotteryInfoAsync();
            loadingProgress.IsBusy = true;
            srv.GetAllLotteryInfoCompleted += (s, e) =>
            {
                loadingProgress.IsBusy = false;
                List<LotteryInfo> lottery = e.Result.ToList();
                lottery.Insert(0, new LotteryInfo()
                {
                     LotteryName="请选择",
                     LotteryTypeID=0
                });
                this.cbxLottery.ItemsSource = lottery;
                this.cbxLottery.DisplayMemberPath = "LotteryName";
                this.cbxLottery.SelectedValuePath = "LotteryTypeID";
                this.cbxLottery.SelectedIndex = 0;
                //srv.GetAllPlayTypeInfoAsync();
                List<PlayTypeInfo> playtype = new List<PlayTypeInfo>();
                playtype.Insert(0, new PlayTypeInfo()
                {
                    PlayTypeName = "请选择",
                    PlayTypeID = 0
                });
                this.cbxPlayType.ItemsSource = playtype;
                this.cbxPlayType.DisplayMemberPath = "PlayTypeName";
                this.cbxPlayType.SelectedValuePath = "PlayTypeID";
                this.cbxPlayType.SelectedIndex = 0;
            };
            //srv.GetAllPlayTypeInfoCompleted += (s, e) =>
            //{

            //};
        }
Esempio n. 16
0
 private void PlayRadioButton_Click(object sender, RoutedEventArgs e)
 {
     PlayTypeRadioInfo lottery = (sender as Button).Tag as PlayTypeRadioInfo;
     if (lottery.IsEnable == 0)
         lottery.IsEnable = 1;
     else
         lottery.IsEnable = 0;
     srv = WcfProxy.GetProxy;
     srv.UpdatePlayRadioIsEnableCompleted += (s, er) =>
     {
         loadingProgress.IsBusy = false;
         if (er.Result)
         {
             (sender as Button).Tag = lottery;
             if (lottery.IsEnable == 0)
                 (sender as Button).Foreground = new SolidColorBrush(Colors.Green);
             else
                 (sender as Button).Foreground = new SolidColorBrush(Colors.Red);
         }
     };
     srv.UpdatePlayRadioIsEnableAsync(lottery);
     loadingProgress.IsBusy = true;
 }
Esempio n. 17
0
 void LoadPlayType(LotteryInfo l)
 {
     currentPos = 0;
     this.tabItem1.IsSelected = true;
     this.sp_playradio.Visibility = Visibility.Collapsed;
     this.sp_playtype.Visibility = Visibility.Visible;
     this.sp_lottery.Visibility = Visibility.Visible;
     srv = WcfProxy.GetProxy;
     srv.GetPlayTypeInfoByLotteryIdAsync(l.LotteryTypeID);
     loadingProgress.IsBusy = true;
     srv.GetPlayTypeInfoByLotteryIdCompleted += (s, er) =>
     {
         loadingProgress.IsBusy = false;
         if (er.Result.Count == 0)
         {
             MessageBox.Show("没有找到匹配的记录!");
         }
         this.dgPlayType.ItemsSource = er.Result;
     };
 }
Esempio n. 18
0
 void LoadPlayType()
 {
     currentPos = 0;
     this.tabItem1.IsSelected = true;
     this.sp_playradio.Visibility = Visibility.Collapsed;
     this.sp_playtype.Visibility = Visibility.Visible;
     this.sp_lottery.Visibility = Visibility.Visible;
     srv = WcfProxy.GetProxy;
     loadingProgress.IsBusy = true;
     srv.GetPlayTypeInfoAsync(txtLotteryType.Text.Trim(),
         (cbxIsEnable.SelectedItem as ComboBoxItem).Tag.ToString(),
         (cbxOrientation.SelectedItem as ComboBoxItem).Tag.ToString(),
         txtPlayType.Text.Trim());
     srv.GetPlayTypeInfoCompleted += (s, er) =>
     {
         loadingProgress.IsBusy = false;
         if (er.Result.Count == 0)
         {
             MessageBox.Show("没有找到匹配的记录!");
         }
         this.dgPlayType.ItemsSource = er.Result;
     };
 }
Esempio n. 19
0
 void InitComboBox()
 {
     srv = WcfProxy.GetProxy;
     srv.GetAllLotteryInfoCompleted += (s, er) =>
     {
         loadingProgress.IsBusy = false;
         if (er.Result.Count == 0)
         {
             MessageBox.Show("无彩种数据,该页面无法使用!");
             btnSearch.IsEnabled = false;
             tabItem0.IsEnabled = false;
             tabItem1.IsEnabled = false;
             return;
         }
         List<LotteryInfo> list = er.Result.ToList();
         list.Insert(0, new LotteryInfo() {
              LotteryTypeID=0, LotteryName="*[正向]",
              Orientation=0
         });
         var c = list.Where(p => p.Orientation == 1).FirstOrDefault();
         list.Insert(list.IndexOf(c), new LotteryInfo()
         {
             LotteryTypeID = 0,
             LotteryName = "*[逆向]",
             Orientation = 1
         });
         this.cbxLottery.ItemsSource = list;
         this.cbxLottery.DisplayMemberPath = "LotteryName";
         this.cbxLottery.SelectedValuePath = "LotteryTypeID";
         this.cbxLottery.Tag = list;
         this.cbxLottery.SelectedIndex = 0;
         cbxReverseIndex = list.IndexOf(c) - 1;
         cbxLottery.DropDownOpened += (se, erg) =>
         {
             this.cbxLottery.UpdateLayout();
             this.cbxLottery.ItemContainerGenerator.ContainerFromIndex(0).SetValue(
                 ComboBoxItem.ForegroundProperty, new SolidColorBrush(Colors.Blue));
             this.cbxLottery.ItemContainerGenerator.ContainerFromIndex(list.IndexOf(c)-1)
                 .SetValue(ComboBoxItem.ForegroundProperty, new SolidColorBrush(Colors.Red));
         };
         LoadPositive();
     };
     loadingProgress.IsBusy = true;
     srv.GetAllLotteryInfoAsync();
 }
Esempio n. 20
0
 private void dgPlayType_RowEditEnded(object sender, DataGridRowEditEndedEventArgs e)
 {
     PlayTypeInfo lottery = e.Row.DataContext as PlayTypeInfo;
     if (lottery.PlayTypeName == currentEditionName)
     {
         (this.dgPlayType.Columns[3].GetCellContent(e.Row) as TextBlock).Text = currentEditionName;
         (this.dgPlayType.Columns[1].GetCellContent(e.Row) as TextBlock).Tag = lottery;
         (this.dgPlayType.Columns[3].GetCellContent(e.Row) as TextBlock).Tag = lottery;
         (this.dgPlayType.Columns[4].GetCellContent(e.Row) as Button).Tag = lottery;
         return;
     }
     srv = WcfProxy.GetProxy;
     srv.UpdatePlayTypeNameCompleted += (s, er) =>
     {
         loadingProgress.IsBusy = false;
         if (er.Result)
         {
             (this.dgPlayType.Columns[3].GetCellContent(e.Row) as TextBlock).Text = lottery.PlayTypeName;
             (this.dgPlayType.Columns[1].GetCellContent(e.Row) as TextBlock).Tag = lottery;
             (this.dgPlayType.Columns[3].GetCellContent(e.Row) as TextBlock).Tag = lottery;
             (this.dgPlayType.Columns[4].GetCellContent(e.Row) as Button).Tag = lottery;
         }
     };
     srv.UpdatePlayTypeNameAsync(lottery);
     loadingProgress.IsBusy = true;
 }
Esempio n. 21
0
 void LoadReverse()
 {
     if (rb_dftOdds.IsChecked == false && rb_cutOdds.IsChecked == false)
         rb_dftOdds.IsChecked = true;
     tabItem1.IsSelected = true;
     srv = WcfProxy.GetProxy;
     srv.GetDefaultOddsCompleted += (s, er) =>
     {
         loadingProgress.IsBusy = false;
         if (er.Result.Count == 0)
         {
             MessageBox.Show("没有找到匹配的记录!");
         }
         this.dgPlayType_R.ItemsSource = er.Result;
     };
     srv.GetCurrentOddsCompleted += (s, er) =>
     {
         loadingProgress.IsBusy = false;
         if (er.Result.Count == 0)
         {
             MessageBox.Show("没有找到匹配的记录!");
         }
         this.dgPlayType_R.ItemsSource = er.Result;
     };
     string lotteryId = string.Empty;
     if ((cbxLottery.SelectedItem as LotteryInfo).LotteryTypeID == 0)
         lotteryId = "";
     else
         lotteryId = (cbxLottery.SelectedItem as LotteryInfo).LotteryTypeID.ToString();
     if(rb_dftOdds.IsChecked==true)
         srv.GetDefaultOddsAsync(lotteryId, txtPlayType.Text.Trim(), txtPlayRadio.Text.Trim());
     else
         srv.GetCurrentOddsAsync(lotteryId, txtPlayType.Text.Trim(), txtPlayRadio.Text.Trim());
     loadingProgress.IsBusy = true;
 }
Esempio n. 22
0
 void LoadStatis()
 {
     this.sp_Type.Visibility = Visibility.Collapsed;
     srv = WcfProxy.GetProxy;
     loadingProgress.IsBusy = true;
     srv.GetProfitReportAsync(txtUserID.Text.ToString().Trim(), startDate, endDate);
     srv.GetProfitReportCompleted += (s, e) =>
     {
         loadingProgress.IsBusy = false;
         if (e.Result.Count == 0)
         {
             MessageBox.Show("没有找到匹配的记录!");
         }
         PagedCollectionView pcv = new PagedCollectionView(e.Result);
         this.dp_Statis.Source = pcv;
         this.dgStatis.ItemsSource = pcv;
     };
 }
Esempio n. 23
0
 public AdminChangePwd()
 {
     InitializeComponent();
     srv = WcfProxy.GetProxy;
     srv.ChangeAdminPwdCompleted += new EventHandler<ChangeAdminPwdCompletedEventArgs>(srv_ChangeAdminPwdCompleted);
 }
Esempio n. 24
0
 public PlatformBank()
 {
     InitializeComponent();
     srv = WcfProxy.GetProxy;
     this.Loaded += new RoutedEventHandler(PlatformBank_Loaded);
 }