public frmAuditor(frmMain mf, VSP.Business.Entities.Auditor auditor, 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;

            DataIntegrationHub.Business.Entities.Auditor dihAuditor = new DataIntegrationHub.Business.Entities.Auditor(auditor.Id);

            CurrentAuditor             = auditor;
            txtName.Text               = dihAuditor.Name;
            txtGeneralInformation.Text = CurrentAuditor.GeneralInformation;
            txtRetirementBusiness.Text = CurrentAuditor.RetirementBusiness;
            txtSecurity.Text           = CurrentAuditor.Security;
            txtValueBalance.Text       = CurrentAuditor.ValueBalance;

            cboIssueViews.SelectedIndex = 0;

            ss.Close();
            this.Show();
        }
        private void LoadDgvAuditors()
        {
            DataTable dataTable     = PlanAuditor.GetAssociated(CurrentPlan.PlanId);
            var       dataTableEnum = dataTable.AsEnumerable();

            /// Set the datatable based on the SelectedIndex of <see cref="cboRkViews"/>.
            switch (cboAuditorViews.SelectedIndex)
            {
            case 0:
                dataTableEnum = dataTableEnum.Where(x => x.Field <int>("StateCode") == 0);
                break;

            case 1:
                dataTableEnum = dataTableEnum.Where(x => x.Field <int>("StateCode") == 1);
                break;

            default:
                return;
            }

            if (dataTableEnum.Any())
            {
                dataTable = dataTableEnum.CopyToDataTable();
            }
            else
            {
                dataTable.Rows.Clear();
            }

            dataTable.Columns.Add("Name");

            int i = 0;

            foreach (DataRow dr in dataTable.Rows)
            {
                Guid auditorId = new Guid(dr["AuditorId"].ToString());
                DataIntegrationHub.Business.Entities.Auditor auditor = new DataIntegrationHub.Business.Entities.Auditor(auditorId);
                dataTable.Rows[i]["Name"] = auditor.Name;
                i++;
            }

            dgvAuditors.DataSource = dataTable;

            // Display/order the columns.
            dgvAuditors.Columns["PlanAuditorId"].Visible = false;
            dgvAuditors.Columns["AuditorId"].Visible     = false;
            dgvAuditors.Columns["PlanId"].Visible        = false;
            dgvAuditors.Columns["CreatedBy"].Visible     = false;
            dgvAuditors.Columns["CreatedOn"].Visible     = false;
            dgvAuditors.Columns["ModifiedBy"].Visible    = false;
            dgvAuditors.Columns["ModifiedOn"].Visible    = false;
            dgvAuditors.Columns["StateCode"].Visible     = false;

            dgvAuditors.Columns["Name"].DisplayIndex        = 0;
            dgvAuditors.Columns["DateAdded"].DisplayIndex   = 1;
            dgvAuditors.Columns["DateRemoved"].DisplayIndex = 2;
        }
Esempio n. 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="accountId"></param>
        /// <param name="Close"></param>
        public frmPlanAuditor(frmMain mf, PlanAuditor planAuditor, 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;

            CurrentPlanAuditor = planAuditor;

            cboFeeViews.SelectedIndex = 0;
            PreloadCbos();

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

            if (CurrentPlanAuditor.AuditorId != null)
            {
                DataIntegrationHub.Business.Entities.Auditor auditor = new DataIntegrationHub.Business.Entities.Auditor(CurrentPlanAuditor.AuditorId);
                cboAuditor.Text = auditor.Name;
            }

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

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

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

            ss.Close();
            this.Show();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="planAuditor"></param>
        /// <param name="Close"></param>
        public frmPlanAuditorFee(frmMain mf, VSP.Business.Entities.PlanAuditor planAuditor, 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(planAuditor.PlanId);

            Business.Entities.Auditor auditor = new Business.Entities.Auditor(planAuditor.AuditorId);
            DataIntegrationHub.Business.Entities.Auditor plAd = new DataIntegrationHub.Business.Entities.Auditor(auditor.AuditorId);
            txtAuditor.Text = plAd.Name;

            CurrentPlanAuditorFee = new PlanAuditorFee();
            CurrentPlanAuditorFee.PlanAuditorId = planAuditor.Id;

            txtPlan.Text = plan.Name;

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

            ss.Close();
            this.Show();
        }
        public frmAuditor(frmMain mf, VSP.Business.Entities.Auditor auditor, 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;

            DataIntegrationHub.Business.Entities.Auditor dihAuditor = new DataIntegrationHub.Business.Entities.Auditor(auditor.Id);

            CurrentAuditor = auditor;
            txtName.Text   = dihAuditor.Name;
            txtNotes.Text  = CurrentAuditor.Notes;

            cboIssueViews.SelectedIndex = 0;
            txtNotes.Focus();

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

            ss.Close();
            this.Show();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="planAuditorFee"></param>
        /// <param name="Close"></param>
        public frmPlanAuditorFee(frmMain mf, PlanAuditorFee planAuditorFee, 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;

            Business.Entities.PlanAuditor planAuditor = new Business.Entities.PlanAuditor(planAuditorFee.PlanAuditorId);
            Plan plan = new Plan(planAuditor.PlanId);

            Business.Entities.Auditor auditor = new Business.Entities.Auditor(planAuditor.AuditorId);
            DataIntegrationHub.Business.Entities.Auditor dihAuditor = new DataIntegrationHub.Business.Entities.Auditor(auditor.AuditorId);

            CurrentPlanAuditorFee = planAuditorFee;
            txtPlan.Text          = plan.Name;
            txtAuditor.Text       = dihAuditor.Name;
            txtNotes.Text         = CurrentPlanAuditorFee.Notes;
            txtName.Text          = CurrentPlanAuditorFee.Name;

            txtNotes.Focus();

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

            if (CurrentPlanAuditorFee.Benchmark25Fee != null)
            {
                txtBenchmark25Fee.Text = ((decimal)CurrentPlanAuditorFee.Benchmark25Fee).ToString("#,##");
            }

            if (CurrentPlanAuditorFee.Benchmark50Fee != null)
            {
                txtBenchmark50Fee.Text = ((decimal)CurrentPlanAuditorFee.Benchmark50Fee).ToString("#,##");
            }

            if (CurrentPlanAuditorFee.Benchmark75Fee != null)
            {
                txtBenchmark75Fee.Text = ((decimal)CurrentPlanAuditorFee.Benchmark75Fee).ToString("#,##");
            }

            if (CurrentPlanAuditorFee.AsOfDate != null)
            {
                dateAsOfDate.Value   = (DateTime)CurrentPlanAuditorFee.AsOfDate;
                dateAsOfDate.Checked = true;
            }
            else
            {
                dateAsOfDate.Checked = false;
            }

            chbxRevenueSharingPaid.Checked = CurrentPlanAuditorFee.RevenueSharingPaid;
            chbxForfeituresPaid.Checked    = CurrentPlanAuditorFee.ForfeituresPaid;
            chbxParticipantsPaid.Checked   = CurrentPlanAuditorFee.ParticipantsPaid;
            chbxPlanSponsorPaid.Checked    = CurrentPlanAuditorFee.PlanSponsorPaid;

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

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