public frmMergeFunds(Presentation.Forms.frmMain mf, Fund fundRecord1, Fund fundRecord2)
        {
            InitializeComponent();

            Application.AddMessageFilter(this);
            controlsToMove.Add(this.pnlHeader);
            controlsToMove.Add(this.lblHeader);
            controlsToMove.Add(this.pnlFormHeader);
            controlsToMove.Add(this.lblFormHeader);

            frmMain_Parent = mf;
            fund1          = fundRecord1;
            fund2          = fundRecord2;

            cboMasterRecord.Items.Add(new ListItem(fund1.Ticker + " - " + fund1.FundName, fund1));
            cboMasterRecord.Items.Add(new ListItem(fund2.Ticker + " - " + fund2.FundName, fund2));

            txtFund1Name.Text     = fund1.FundName;
            txtFund1Ticker.Text   = fund1.Ticker;
            txtFund1Category.Text = fund1.Category;
            txtFund1Family.Text   = fund1.Family;
            txtFund1Advisor.Text  = fund1.Advisor;
            txtFund1Cusip.Text    = fund1.Cusip;

            if (!String.IsNullOrWhiteSpace(fund1.InceptionDate.ToString()))
            {
                txtFund1InceptDate.Text = ((DateTime)fund1.InceptionDate).ToString("MMMM dd, yyyy");
            }

            txtFund2Name.Text     = fund2.FundName;
            txtFund2Ticker.Text   = fund2.Ticker;
            txtFund2Category.Text = fund2.Category;
            txtFund2Family.Text   = fund2.Family;
            txtFund2Advisor.Text  = fund2.Advisor;
            txtFund2Cusip.Text    = fund2.Cusip;

            if (!String.IsNullOrWhiteSpace(fund2.InceptionDate.ToString()))
            {
                txtFund2InceptDate.Text = ((DateTime)fund2.InceptionDate).ToString("MMMM dd, yyyy");
            }

            Business.Entities.Fund.DataMaintenance fund1DataMantenance = new Business.Entities.Fund.DataMaintenance(fund1.FundId);
            txtFund1DataStartDate.Text = fund1DataMantenance.DataStartDate;
            txtFund1DataEndDate.Text   = fund1DataMantenance.DataEndDate;
            txtFund1MonthCount.Text    = fund1DataMantenance.MonthCount.ToString("N0");

            Business.Entities.Fund.DataMaintenance fund2DataMantenance = new Business.Entities.Fund.DataMaintenance(fund2.FundId);
            txtFund2DataStartDate.Text = fund2DataMantenance.DataStartDate;
            txtFund2DataEndDate.Text   = fund2DataMantenance.DataEndDate;
            txtFund2MonthCount.Text    = fund2DataMantenance.MonthCount.ToString("N0");

            this.Show();
        }
        public frmProbationAnalysis(Presentation.Forms.frmMain mainForm, Guid fundId, Guid planId)
        {
            Presentation.Forms.frmSplashScreen ss = new Presentation.Forms.frmSplashScreen();
            ss.Show();
            Application.DoEvents();

            InitializeComponent();

            frmMain_Parent = mainForm;

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

            Application.AddMessageFilter(this);
            controlsToMove.Add(this.pnlFormHeader);
            controlsToMove.Add(this.lblFormHeader);
            controlsToMove.Add(this.lblHeader);
            controlsToMove.Add(this.pnlBackground);

            AddItemsToSelectedQuarterCbo();
            AddItemsToRecommendedWordCbo();
            AddItemsToOwnerCbo();

            pnlFields.Focus();

            SelectedFund = new Fund(fundId, null);
            SelectedPlan = new ISP.Business.Entities.Plan(planId);

            txtFund.Text       = SelectedFund.FundName;
            Text               = "Probation Analysis - " + SelectedFund.Ticker;
            txtPlan.Text       = SelectedPlan.PlanName;
            lblFormHeader.Text = "Investment Services Program - Probation Analysis - " + SelectedPlan.PlanName;

            GetAssociatedReviewsFromFundAndPlan(SelectedFund.FundId, SelectedPlan.PlanId);

            this.Show();
            ss.Close();
        }
        public frmAddExistingItem(frmMain mf, string _FormType, Guid RegardingId1, string RegardingId2, FormClosedEventHandler Close)
        {
            Presentation.Forms.frmSplashScreen ss = new Presentation.Forms.frmSplashScreen();
            ss.Show();
            Application.DoEvents();

            InitializeComponent();
            frmMain_Parent = mf;

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

            this.FormClosed += Close;

            FormType = _FormType;

            if (FormType == "Custodian")
            {
                FormType = "Custodian";

                label23.Text         = "Add a custodian";
                labelRegarding1.Text = "Plan";
                label31.Text         = "Select a custodian";

                try
                {
                    Business.Entities.Plan plan = new Business.Entities.Plan(RegardingId1);
                    PlanId        = plan.PlanId;
                    textBox7.Text = plan.PlanName;
                }
                catch (Exception ex)
                {
                    frmError _frmError = new Presentation.Forms.frmError(frmMain_Parent, ex);
                }
            }
            else if (FormType == "Plan")
            {
                FormType = "Plan";

                label23.Text         = "Add a plan";
                labelRegarding1.Text = "Fund";
                label31.Text         = "Select a plan";

                try
                {
                    Fund details = new Fund(RegardingId1, null);
                    FundId        = details.FundId;
                    textBox7.Text = details.FundName;
                }
                catch (Exception ex)
                {
                    frmError _frmError = new Presentation.Forms.frmError(frmMain_Parent, ex);
                }
            }
            else if (FormType == "Fund")
            {
                FormType = "Fund";

                label23.Text         = "Add a fund";
                labelRegarding1.Text = "Plan";
                label31.Text         = "Select a fund";

                try
                {
                    Business.Entities.Plan plan = new Business.Entities.Plan(RegardingId1);
                    PlanId        = plan.PlanId;
                    textBox7.Text = plan.PlanName;
                }
                catch (Exception ex)
                {
                    frmError _frmError = new Presentation.Forms.frmError(frmMain_Parent, ex);
                }
            }

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