Exemplo n.º 1
0
        private void LoadDgvFees()
        {
            DataTable dataTable = new DataTable();

            /// Set the datatable based on the SelectedIndex of <see cref="cboInvestmentViews"/>.
            switch (cboFeeViews.SelectedIndex)
            {
            case 0:
                dataTable = PlanRecordKeeperFee.GetAssociatedActive(CurrentPlanRecordKeeper);
                break;

            case 1:
                dataTable = PlanRecordKeeperFee.GetAssociatedActive(CurrentPlanRecordKeeper);
                break;

            default:
                return;
            }

            dgvFees.DataSource = dataTable;

            // Display/order the columns.
            dgvFees.Columns["PlanRecordKeeperFeeId"].Visible = false;
            dgvFees.Columns["PlanId"].Visible         = false;
            dgvFees.Columns["RecordKeeperId"].Visible = false;
            dgvFees.Columns["CreatedBy"].Visible      = false;
            dgvFees.Columns["ModifiedBy"].Visible     = false;
            dgvFees.Columns["StateCode"].Visible      = false;

            dgvFees.Columns["Fee"].DisplayIndex          = 0;
            dgvFees.Columns["BenchmarkFee"].DisplayIndex = 1;
            dgvFees.Columns["AsOfDate"].DisplayIndex     = 2;
            dgvFees.Columns["ModifiedOn"].DisplayIndex   = 3;
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="accountId"></param>
        /// <param name="Close"></param>
        public frmPlanRecordKeeperFee(frmMain mf, PlanRecordKeeper planRecordKeeper, FormClosedEventHandler Close = null)
        {
            frmSplashScreen ss = new frmSplashScreen();

            ss.Show();
            Application.DoEvents();

            InitializeComponent();

            frmMain_Parent = mf;

            this.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size;

            Application.AddMessageFilter(this);
            controlsToMove.Add(this.pnlSummaryTabHeader);
            controlsToMove.Add(this.panel16);
            controlsToMove.Add(this.label1);
            controlsToMove.Add(this.label23);

            FormClosed += Close;

            Plan plan = new Plan(planRecordKeeper.PlanId);

            DataIntegrationHub.Business.Entities.RecordKeeper rk = new DataIntegrationHub.Business.Entities.RecordKeeper(planRecordKeeper.RecordKeeperId);

            CurrentPlanRecordKeeperFee                = new PlanRecordKeeperFee();
            CurrentPlanRecordKeeperFee.PlanId         = plan.PlanId;
            CurrentPlanRecordKeeperFee.RecordKeeperId = rk.RecordKeeperId;

            txtPlan.Text         = plan.Name;
            txtRecordKeeper.Text = rk.Name;

            ss.Close();
            this.Show();
        }
Exemplo n.º 3
0
        private void dgvFees_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int  index       = dgvFees.CurrentRow.Index;
            Guid planRkFeeId = new Guid(dgvFees.Rows[index].Cells["PlanRecordKeeperFeeId"].Value.ToString());
            PlanRecordKeeperFee    planRkFee = new PlanRecordKeeperFee(planRkFeeId);
            frmPlanRecordKeeperFee frmPlanRecordKeeperFee = new frmPlanRecordKeeperFee(frmMain_Parent, planRkFee);

            frmPlanRecordKeeperFee.FormClosed += frmPlanRecordKeeperFee_FormClosed;
        }
Exemplo n.º 4
0
        private void btnDeleteFee_Click(object sender, EventArgs e)
        {
            int  index       = dgvFees.CurrentRow.Index;
            Guid planRkFeeId = new Guid(dgvFees.Rows[index].Cells["PlanRecordKeeperFeeId"].Value.ToString());
            PlanRecordKeeperFee planRkFee = new PlanRecordKeeperFee(planRkFeeId);

            DialogResult result = MessageBox.Show("Are you sure you wish to delete the selected plan record keeper fee?", "Attention", MessageBoxButtons.YesNo);

            if (result == DialogResult.Yes)
            {
                planRkFee.DeleteRecordFromDatabase();
                LoadDgvFees();
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="accountId"></param>
        /// <param name="Close"></param>
        public frmPlanRecordKeeperFee(frmMain mf, PlanRecordKeeperFee planRecordKeeperFee, FormClosedEventHandler Close = null)
        {
            frmSplashScreen ss = new frmSplashScreen();

            ss.Show();
            Application.DoEvents();

            InitializeComponent();

            frmMain_Parent = mf;

            this.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size;

            Application.AddMessageFilter(this);
            controlsToMove.Add(this.pnlSummaryTabHeader);
            controlsToMove.Add(this.panel16);
            controlsToMove.Add(this.label1);
            controlsToMove.Add(this.label23);

            FormClosed += Close;

            Plan plan = new Plan(planRecordKeeperFee.PlanId);

            DataIntegrationHub.Business.Entities.RecordKeeper rk = new DataIntegrationHub.Business.Entities.RecordKeeper(planRecordKeeperFee.RecordKeeperId);

            CurrentPlanRecordKeeperFee = planRecordKeeperFee;
            txtPlan.Text         = plan.Name;
            txtRecordKeeper.Text = rk.Name;

            if (CurrentPlanRecordKeeperFee.Fee != null)
            {
                txtFee.Text = ((decimal)CurrentPlanRecordKeeperFee.Fee).ToString("#,##");
            }

            if (CurrentPlanRecordKeeperFee.BenchmarkFee != null)
            {
                txtBenchmarkFee.Text = ((decimal)CurrentPlanRecordKeeperFee.BenchmarkFee).ToString("#,##");
            }

            if (CurrentPlanRecordKeeperFee.AsOfDate != null)
            {
                txtAsOfDate.Text = ((DateTime)CurrentPlanRecordKeeperFee.AsOfDate).ToString("MM/dd/yyyy");
            }

            if (CurrentPlanRecordKeeperFee.PaymentRevenueSharing != null)
            {
                txtPaymentRevenueSharing.Text = ((decimal)CurrentPlanRecordKeeperFee.PaymentRevenueSharing).ToString("#,##");
            }

            if (CurrentPlanRecordKeeperFee.PaymentForfeitures != null)
            {
                txtPaymentForfeitures.Text = ((decimal)CurrentPlanRecordKeeperFee.PaymentForfeitures).ToString("#,##");
            }

            if (CurrentPlanRecordKeeperFee.PaymentParticipants != null)
            {
                txtPaymentParticipants.Text = ((decimal)CurrentPlanRecordKeeperFee.PaymentParticipants).ToString("#,##");
            }

            if (CurrentPlanRecordKeeperFee.PaymentPlanSponsor != null)
            {
                txtPaymentPlanSponsor.Text = ((decimal)CurrentPlanRecordKeeperFee.PaymentPlanSponsor).ToString("#,##");
            }

            ss.Close();
            this.Show();
        }