/// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="Close"></param>
        public frmPlanAdvisor(frmMain mf, Plan plan, 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;

            PreloadCbos();

            CurrentPlanAdvisor        = new VSP.Business.Entities.PlanAdvisor();
            CurrentPlanAdvisor.PlanId = plan.PlanId;

            cboPlan.Text = plan.Name + " - " + plan.Description;

            ss.Close();
            this.Show();
        }
Example #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="accountId"></param>
        /// <param name="Close"></param>
        public frmPlanAdvisor(frmMain mf, VSP.Business.Entities.PlanAdvisor planAdvisor, 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;

            CurrentPlanAdvisor = planAdvisor;

            cboFeeViews.SelectedIndex = 0;
            PreloadCbos();

            if (CurrentPlanAdvisor.PlanId != null)
            {
                Plan plan = new Plan(CurrentPlanAdvisor.PlanId);
                cboPlan.Text = plan.Name + " - " + plan.Description;
            }

            if (CurrentPlanAdvisor.AdvisorId != null)
            {
                DataIntegrationHub.Business.Entities.PlanAdvisor advisor = new DataIntegrationHub.Business.Entities.PlanAdvisor(CurrentPlanAdvisor.AdvisorId);
                cboAdvisor.Text = advisor.Name;
            }

            if (CurrentPlanAdvisor.DateAdded != null)
            {
                txtDateAdded.Text = ((DateTime)CurrentPlanAdvisor.DateAdded).ToString("MM/dd/yyyy");
            }

            if (CurrentPlanAdvisor.DateRemoved != null)
            {
                txtDateRemoved.Text = ((DateTime)CurrentPlanAdvisor.DateRemoved).ToString("MM/dd/yyyy");
            }

            cboFeeViews.SelectedIndex = 0;

            CurrentTabLabel = label46; // Summary tab label
            highlightSelectedTabLabel(CurrentTabLabel);

            ss.Close();
            this.Show();
        }
        private void btnDeleteAdvisor_Click(object sender, EventArgs e)
        {
            if (dgvAdvisors.CurrentRow == null)
            {
                return;
            }

            int  index         = dgvAdvisors.CurrentRow.Index;
            Guid planAdvisorId = new Guid(dgvAdvisors.Rows[index].Cells[0].Value.ToString());

            VSP.Business.Entities.PlanAdvisor planAdvisor = new VSP.Business.Entities.PlanAdvisor(planAdvisorId);

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

            if (result == DialogResult.Yes)
            {
                planAdvisor.DeleteRecordFromDatabase();
                LoadDgvAdvisors();
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="planAdvisor"></param>
        /// <param name="Close"></param>
        public frmPlanAdvisorFee(frmMain mf, VSP.Business.Entities.PlanAdvisor planAdvisor, 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(planAdvisor.PlanId);
            Advisor advisor = new Advisor(planAdvisor.AdvisorId);

            DataIntegrationHub.Business.Entities.PlanAdvisor plAd = new DataIntegrationHub.Business.Entities.PlanAdvisor(planAdvisor.AdvisorId);
            txtAdvisor.Text = plAd.Name;

            CurrentPlanAdvisorFee = new PlanAdvisorFee();
            CurrentPlanAdvisorFee.PlanAdvisorId = planAdvisor.Id;

            txtPlan.Text = plan.Name;

            CurrentTabLabel = label46; // Summary tab label
            highlightSelectedTabLabel(CurrentTabLabel);

            ss.Close();
            this.Show();
        }
Example #5
0
        public static DataTable GetAssociatedActive(PlanAdvisor planAdvisor)
        {
            string sql = @"SELECT * FROM " + _tableName + " WHERE StateCode = 0 AND PlanAdvisorId = \'" + planAdvisor.Id.ToString() + "\'";

            return(Access.VspDbAccess.ExecuteSqlQuery(sql));
        }