示例#1
0
        private void btnDeposit2_Click(object sender, RoutedEventArgs e)
        {
            var s = this.DataContext as Sponsor;

            if (s != null && s.Account != null)
            {
                if (Keyboard.IsKeyDown(Key.LeftShift) && Keyboard.IsKeyDown(Key.LeftCtrl) && Keyboard.IsKeyDown(Key.LeftAlt))
                {
                    Transition_SponsorWindow w = new Transition_SponsorWindow(s, FundType.GeneralHidden);
                    if (w.ShowDialog() == true)
                    {
                        ;                        //No Refresh
                    }
                }
                else
                {
                    Transition_SponsorWindow w = new Transition_SponsorWindow(s, FundType.General);
                    if (w.ShowDialog() == true)
                    {
                        s.Account        = Account.GetAccountByOwnerID(Account.AccountType.Sponsor, s.SponsorID.Value);
                        cAccount.Account = s.Account;
                    }
                }
            }
        }
示例#2
0
        private void btnDeposit1_Click(object sender, RoutedEventArgs e)
        {
            var s = this.DataContext as Sponsor;

            if (s != null && s.Account != null)
            {
                if (s.AvailableSponsorships == null || s.AvailableSponsorships.Count == 0)
                {
                    MyMessageBox.Show("الكفيل الحالي ليس لديه اي كفالات مدخلة\nيجب ادخال كفالات أولاً");
                    return;
                }
                Transition_SponsorWindow w = new Transition_SponsorWindow(s, FundType.Private);
                if (w.ShowDialog() == true)
                {
                    s.Account.Transitions = Transition.GetAllTransitionByAccount(s.Account);
                    s.Account.NotifyPropertyChanged("Transitions");
                    cAccount.dgTransitions.Items.Refresh();
                    cAccount.RefreshValues();
                }
            }
        }