Ejemplo n.º 1
0
        public bool IsRedPlan(DIH.Plan plan)
        {
            foreach (var goal in this.Goals)
            {
                if (Outperforms(plan, goal) == false)
                {
                    return(true);
                }
            }

            return(false);
        }
Ejemplo n.º 2
0
        public frmServiceIssue(frmMain mf, DataIntegrationHub.Business.Entities.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);

            CurrentTabLabel = label46; // Summary tab label
            highlightSelectedTabLabel(CurrentTabLabel);
            FormClosed += Close;

            PreloadCbos();

            CurrentServiceIssue          = new ServiceIssue();
            CurrentServiceIssue.PlanId   = plan.PlanId;
            CurrentServiceIssue.AsOfDate = DateTime.Now;

            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)
            {
                cboPlan.Text = plan.Name + " - " + plan.Description;
            }

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

            ss.Close();
            this.Show();
        }
Ejemplo n.º 3
0
        public ActionResult Plan()
        {
            var id = Request.QueryString["id"];

            if (String.IsNullOrWhiteSpace(id))
            {
                throw new Exception("Cannot create plans from this application. Please do so in CRM.");
            }
            else
            {
                var planPPT = new PlanPerformance.Business.Entities.Plan(Guid.Parse(id));
                var plan    = new DataIntegrationHub.Business.Entities.Plan(Guid.Parse(id));
                ViewBag.Title = plan.Name;

                var tuple = new Tuple <DataIntegrationHub.Business.Entities.Plan, PlanPerformance.Business.Entities.Plan>(plan, planPPT);
                return(View(tuple));
            }
        }
Ejemplo n.º 4
0
        public bool Outperforms(DIH.Plan plan, Goal goal)
        {
            // If plan doesn't have any metrics, it passes
            var metrics = this.PlanMetrics.FindAll(x => x.PlanId == plan.PlanId);

            if (metrics.Count == 0)
            {
                return(true);
            }

            // If plan doesn't have any metrics for the team, it passes
            var metric = metrics.FindAll(x => x.GoalId == goal.Id).OrderByDescending(x => x.ValueAsOf).FirstOrDefault();

            if (metric == null)
            {
                return(true);
            }

            return(Outperforms(metric, goal));
        }
Ejemplo n.º 5
0
    private void LoadEntities()
    {
        LoadRecordKeeper();
        LoadSearch();

        if (search != null)
        {
            VspPlan  = new VSP.Business.Entities.PlanDetail(search.PlanId);
            DihPlan  = new DataIntegrationHub.Business.Entities.Plan(search.PlanId);
            Customer = new Customer(DihPlan.CustomerId);

            LoadPlanParticipantsEligible(search.PlanId);
            LoadPlanParticipantsActive(search.PlanId);
            LoadFunds(search.PlanId);
            LoadSearchFunds(search);
            LoadSearchServices(search);
            LoadPlanContributions(search.PlanId);
            LoadPlanDistributions(search.PlanId);
            LoadSearchQuestions(search);
        }
    }