예제 #1
0
        public ConfirmPage(WizardData wizardData)
        {
            InitializeComponent();

            AccountResource account = wizardData.Account;

            try
            {
                IJKEService         channel           = ServiceManager.GetChannel();
                string              today             = DateTime.Now.ToShortDateString();
                TransactionResource previewTansaction = channel.GetTransactionPreview(account.AccountNumber,
                                                                                      wizardData.Organization.Name, today, wizardData.Percentage);
                wizardData.PreviewTransaction = previewTansaction;

                AccountResource previewAccount = new AccountResource();
                previewAccount.Balance          = previewTansaction.PostBalance;
                previewAccount.Dividends        = account.Dividends;
                previewAccount.DividendsETD     = account.DividendsETD;
                previewAccount.Contributions    = account.Contributions + previewTansaction.Amount;
                previewAccount.ContributionsETD = account.ContributionsETD + previewTansaction.Amount;
                wizardData.PreviewAccount       = previewAccount;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            // Bind wizard state to UI
            this.DataContext = wizardData;
        }
예제 #2
0
        public AccountPage(WizardData wizardData)
        {
            InitializeComponent();

            // Bind wizard state to UI
            this.DataContext = wizardData;
            try
            {
                IJKEService            channel = ServiceManager.GetChannel();
                OrganizationResource[] orgs    = channel.GetOrganizations();
                this.OrganizationsComboBox.ItemsSource = orgs;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #3
0
        public ReturnPage(WizardData wizardData)
        {
            InitializeComponent();

            try
            {
                IJKEService         channel     = ServiceManager.GetChannel();
                string              today       = DateTime.Now.ToShortDateString();
                TransactionResource transaction = channel.PostTransaction(wizardData.Account.AccountNumber,
                                                                          wizardData.Organization.Name, today, wizardData.Percentage);
                wizardData.Transaction = transaction;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            // Bind wizard state to UI
            this.DataContext = wizardData;
        }
예제 #4
0
 public AccountLauncher(AccountResource account)
 {
     wizardData = new WizardData(account);
 }
예제 #5
0
 public DividendLauncher(UserResource user)
 {
     wizardData = new WizardData(user);
 }
예제 #6
0
 public AccountLauncher(AccountResource account)
 {
     wizardData = new WizardData(account);
 }
예제 #7
0
 public DividendLauncher(UserResource user)
 {
     wizardData = new WizardData(user);
 }