Esempio n. 1
0
        public void PreloadCbos()
        {
            cboRecordKeeperProduct.Items.Clear();
            cboAuditor.Items.Clear();
            cboPlan.Items.Clear();

            cboRecordKeeperProduct.Items.Add(new ListItem("", ""));
            cboAuditor.Items.Add(new ListItem("", ""));
            cboPlan.Items.Add(new ListItem("", ""));

            foreach (DataRow dr in PlanRecordKeeperProduct.GetAll().Rows)
            {
                Guid planRecordKeeperProductId = new Guid(dr["PlanRecordKeeperProductId"].ToString());
                PlanRecordKeeperProduct rkp    = new PlanRecordKeeperProduct(planRecordKeeperProductId);
                Product product = new Product(rkp.ProductId);
                cboRecordKeeperProduct.Items.Add(new ListItem(product.Name, planRecordKeeperProductId));
            }

            foreach (DataRow dr in DataIntegrationHub.Business.Entities.Auditor.GetAll().Rows)
            {
                Guid   auditorId = new Guid(dr["AuditorId"].ToString());
                string name      = dr["Name"].ToString();
                cboAuditor.Items.Add(new ListItem(name, auditorId));
            }

            foreach (Plan plan in Plan.Get().OrderBy(x => x.Name))
            {
                cboPlan.Items.Add(new ListItem(plan.Name + " - " + plan.Description, plan));
            }
        }
Esempio n. 2
0
        public frmServiceIssue(frmMain mf, VSP.Business.Entities.PlanRecordKeeperProduct recordKeeperProduct, 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();

            CurrentServiceIssue = new ServiceIssue();
            CurrentServiceIssue.PlanRecordKeeperProductId = recordKeeperProduct.Id;
            CurrentServiceIssue.AsOfDate = DateTime.Now;

            txtDescription.Focus();

            if (CurrentServiceIssue.PlanRecordKeeperProductId != null)
            {
                PlanRecordKeeperProduct planRecordKeeperProduct = new PlanRecordKeeperProduct((Guid)CurrentServiceIssue.PlanRecordKeeperProductId);
                Product product = new Product((Guid)planRecordKeeperProduct.ProductId);
                cboRecordKeeperProduct.Text = product.Name;
            }

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

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

            txtAsOfDate.Text = CurrentServiceIssue.AsOfDate.ToString("MM/dd/yyyy");

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

            ss.Close();
            this.Show();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="planRecordKeeperProduct"></param>
        /// <param name="Close"></param>
        public frmPlanRecordKeeperProductFee(frmMain mf, PlanRecordKeeperProduct planRecordKeeperProduct, 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(planRecordKeeperProduct.PlanId);
            PlanRecordKeeperProduct rkpd = new PlanRecordKeeperProduct(planRecordKeeperProduct.RecordKeeperProductId);
            Product pd = new Product(rkpd.ProductId);

            txtProduct.Text = pd.Name;

            CurrentPlanRecordKeeperProductFee        = new PlanRecordKeeperProductFee();
            CurrentPlanRecordKeeperProductFee.PlanId = plan.PlanId;
            CurrentPlanRecordKeeperProductFee.RecordKeeperProductId = rkpd.RecordKeeperProductId;

            txtPlan.Text = plan.Name;

            DataIntegrationHub.Business.Entities.RecordKeeper rk = new DataIntegrationHub.Business.Entities.RecordKeeper(pd.RecordKeeperId);
            txtRecordKeeper.Text = rk.Name;

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

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

            CurrentPlanRecordKeeperProduct        = new PlanRecordKeeperProduct();
            CurrentPlanRecordKeeperProduct.PlanId = plan.PlanId;

            cboFeeViews.SelectedIndex = 0;

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

            lblMenuFees.Visible     = false;
            lblMenuServices.Visible = false;

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

            ss.Close();
            this.Show();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="accountId"></param>
        /// <param name="Close"></param>
        public frmPlanRecordKeeperProduct(frmMain mf, PlanRecordKeeperProduct planRecordKeeperProduct, 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();

            CurrentPlanRecordKeeperProduct = planRecordKeeperProduct;

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

            if (CurrentPlanRecordKeeperProduct.ProductId != null)
            {
                Product pd = new Product(CurrentPlanRecordKeeperProduct.ProductId);
                DataIntegrationHub.Business.Entities.RecordKeeper recordKeeper = new DataIntegrationHub.Business.Entities.RecordKeeper(pd.RecordKeeperId);
                cboRecordKeeper.Text = recordKeeper.Name;

                LoadCboProduct();
                cboProduct.Text = pd.Name;
            }
            else
            {
                LoadCboProduct();
            }

            if (CurrentPlanRecordKeeperProduct.DateAdded != null)
            {
                dateAdded.Value   = (DateTime)CurrentPlanRecordKeeperProduct.DateAdded;
                dateAdded.Checked = true;
            }
            else
            {
                dateAdded.Checked = false;
            }

            if (CurrentPlanRecordKeeperProduct.DateRemoved != null)
            {
                dateRemoved.Value   = (DateTime)CurrentPlanRecordKeeperProduct.DateRemoved;
                dateRemoved.Checked = true;
            }
            else
            {
                dateRemoved.Checked = false;
            }

            cboFeeViews.SelectedIndex     = 0;
            cboServicesView.SelectedIndex = 0;
            LoadDgvServices(true);

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

            ss.Close();
            this.Show();
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="mf"></param>
        /// <param name="planRecordKeeperProductFee"></param>
        /// <param name="Close"></param>
        public frmPlanRecordKeeperProductFee(frmMain mf, PlanRecordKeeperProductFee planRecordKeeperProductFee, 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(planRecordKeeperProductFee.PlanId);
            PlanRecordKeeperProduct rkpd = new PlanRecordKeeperProduct(planRecordKeeperProductFee.RecordKeeperProductId);
            Product pd = new Product(rkpd.ProductId);

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

            CurrentPlanRecordKeeperProductFee = planRecordKeeperProductFee;
            txtPlan.Text         = plan.Name;
            txtRecordKeeper.Text = rk.Name;
            txtProduct.Text      = pd.Name;
            txtNotes.Text        = CurrentPlanRecordKeeperProductFee.Notes;

            txtNotes.Focus();

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

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

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

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

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

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

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

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