Ejemplo n.º 1
0
        private void LoadGridFixedPrice()
        {
            GridFixedPrice.Rows.Clear();
            var    _Deal_Manager        = DealManagement.GetInstance();
            var    _CostSummary_Manager = CostSummaryManagement.GetInstance();
            double amountY1             = _Deal_Manager.GetTransitionDeploymentCost();

            double[] amounts4Year = _CostSummary_Manager.GetTransitionDeploymentPrice(amountY1);

            double nullAmount = 0;

            GridFixedPrice.Rows.Add("Transition / Deployment", amountY1.ToString("C", CultureInfo.CurrentCulture),
                                    nullAmount.ToString("C", CultureInfo.CurrentCulture),
                                    nullAmount.ToString("C", CultureInfo.CurrentCulture),
                                    nullAmount.ToString("C", CultureInfo.CurrentCulture));

            double[] amountsTooling4Year = _CostSummary_Manager.GetToolingPrice();
            GridFixedPrice.Rows.Add("Tooling Price", amountsTooling4Year[0].ToString("C", CultureInfo.CurrentCulture),
                                    amountsTooling4Year[1].ToString("C", CultureInfo.CurrentCulture),
                                    amountsTooling4Year[2].ToString("C", CultureInfo.CurrentCulture),
                                    amountsTooling4Year[3].ToString("C", CultureInfo.CurrentCulture));

            GridFixedPrice.Height = 52;
            int gridHeight = GridFixedPrice.Height;

            foreach (var row in GridFixedPrice.Rows)
            {
                gridHeight += 28;
            }
            GridFixedPrice.Height = gridHeight;
        }
Ejemplo n.º 2
0
        private void LoadTotalPricePerYear()
        {
            var    _Deal_Manager        = DealManagement.GetInstance();
            var    _CostSummary_Manager = CostSummaryManagement.GetInstance();
            double PlatFormCostAmount   = GetLicensesPlatformCost();

            double[] PlatFormPriceAmounts4Year = new double[4];
            PlatFormPriceAmounts4Year[0] = PlatFormCostAmount;
            PlatFormPriceAmounts4Year[1] = PlatFormCostAmount;
            PlatFormPriceAmounts4Year[2] = PlatFormCostAmount;
            PlatFormPriceAmounts4Year[3] = PlatFormCostAmount;

            double[] HCPrice4Year      = _CostSummary_Manager.GetHCPriceGridCost4Years();
            double[] PlatFormCost4Year = _CostSummary_Manager.GetLicensesPlatformPrice4Year(PlatFormPriceAmounts4Year);
            double[] PMToolSust4year   = _CostSummary_Manager.GetPMToolSustenanceGridPrice4Year();


            double TransDepCostY1 = _Deal_Manager.GetTransitionDeploymentCost();

            double[] TransDepPrice4Year = _CostSummary_Manager.GetTransitionDeploymentPrice(TransDepCostY1);



            double totalY1 = ((HCPrice4Year[0] + PlatFormPriceAmounts4Year[0] + PMToolSust4year[0] + TransDepPrice4Year[0]) *
                              GetSelectedSLA().Value_Amnt) + (HCPrice4Year[0] + PlatFormPriceAmounts4Year[0] + PMToolSust4year[0] + TransDepPrice4Year[0]);
            double totalY2 = (HCPrice4Year[1] + PlatFormPriceAmounts4Year[1] + PMToolSust4year[1] + TransDepPrice4Year[1]);
            double totalY3 = (HCPrice4Year[2] + PlatFormPriceAmounts4Year[2] + PMToolSust4year[2] + TransDepPrice4Year[2]);
            double totalY4 = (HCPrice4Year[3] + PlatFormPriceAmounts4Year[3] + PMToolSust4year[3] + TransDepPrice4Year[3]);

            GridNetPrice.Rows.Add("Total Net Price", totalY1.ToString("C", CultureInfo.CurrentCulture),
                                  totalY2.ToString("C", CultureInfo.CurrentCulture),
                                  totalY3.ToString("C", CultureInfo.CurrentCulture),
                                  totalY4.ToString("C", CultureInfo.CurrentCulture));
        }
Ejemplo n.º 3
0
        private void LoadGridTechUnitPrice()
        {
            GridTechUnitPrice.Rows.Clear();
            GridTechUnitPrice.Height = 53;
            int gridHeight           = GridTechUnitPrice.Height;
            var _Deal_Manager        = DealManagement.GetInstance();
            var _CostSummary_Manager = CostSummaryManagement.GetInstance();

            foreach (var selectedTech in _Deal_Manager.ListOfSelectedTechnologies)
            {
                double[] amounts4Years = _CostSummary_Manager.GetTotalUnitCostPerYear(selectedTech);
                amounts4Years = _CostSummary_Manager.GetTotalUnitPricePerYear(amounts4Years);
                GridTechUnitPrice.Rows.Add(selectedTech.Description,
                                           amounts4Years[0].ToString("C", CultureInfo.CurrentCulture),
                                           amounts4Years[1].ToString("C", CultureInfo.CurrentCulture),
                                           amounts4Years[2].ToString("C", CultureInfo.CurrentCulture),
                                           amounts4Years[3].ToString("C", CultureInfo.CurrentCulture));
            }


            foreach (var row in GridTechUnitPrice.Rows)
            {
                gridHeight += 26;
            }
            GridTechUnitPrice.Height = gridHeight;
        }
Ejemplo n.º 4
0
        private void FillListOfSelectedTechnologies()
        {
            var _Deal_Manager = DealManagement.GetInstance();

            _Deal_Manager.ListOfSelectedTechnologies.Clear();
            foreach (DataGridViewRow row in GridTecnologies.Rows)
            {
                try
                {
                    if (Convert.ToInt32(row.Cells[1].Value) > 0)
                    {
                        var selectedTech = new SelectedTechnology();
                        selectedTech.Description     = row.Cells[0].Value.ToString();
                        selectedTech.Quantity        = Convert.ToInt32(row.Cells[1].Value.ToString());
                        selectedTech.HasMonitoring   = Convert.ToBoolean(row.Cells[2].Value);
                        selectedTech.HasOperAndAdmin = Convert.ToBoolean(row.Cells[3].Value);
                        _Deal_Manager.ListOfSelectedTechnologies.Add(selectedTech);
                    }
                }
                catch (FormatException ex)
                {
                    MessageBox.Show("Please select a valid amount for units");
                }
            }
        }
Ejemplo n.º 5
0
        private void ValidateUpdateTargetMargin()
        {
            var    _Deal_Manager = DealManagement.GetInstance();
            double targetMargin;

            try
            {
                targetMargin = Convert.ToDouble(txtTargetMargin.Text);
                targetMargin = targetMargin / 100;
                if (targetMargin != _Deal_Manager.TARGET_MARGIN.ValueAmount)
                {
                    DialogResult dialog = MessageBox.Show(
                        "The Target Margin value was changed, do you want to update the value?",
                        "Rate Card", MessageBoxButtons.YesNo);
                    if (dialog == DialogResult.Yes)
                    {
                        _Deal_Manager.TARGET_MARGIN.ValueAmount = targetMargin;
                    }
                }
            }
            catch (FormatException ex)
            {
                MessageBox.Show(
                    "The Target Margin value is not valid");
            }
        }
Ejemplo n.º 6
0
        private void FillGridTechnologies()
        {
            var _Deal_Manager = DealManagement.GetInstance();

            for (int i = 0; i < _Deal_Manager.List_Technologies.Count; i++)
            {
                GridTecnologies.Rows.Add(_Deal_Manager.List_Technologies[i].Description, 0, true, true);
            }
        }
Ejemplo n.º 7
0
        private void LoadCmbBoxLocation()
        {
            var _Deal_Manager = DealManagement.GetInstance();

            CmbBoxLocation.Items.Add("-- Select a country --");
            for (int i = 0; i < _Deal_Manager.List_Location_Costs.Count; i++)
            {
                this.CmbBoxLocation.Items.Add(_Deal_Manager.List_Location_Costs[i].Country);
            }
            CmbBoxLocation.Text = "-- Select a country --";
        }
Ejemplo n.º 8
0
        private void LoadCmbBoxSLA()
        {
            var _Deal_Manager = DealManagement.GetInstance();

            CmbBoxSLA.Items.Add("-- Select SLA --");
            for (int i = 0; i < _Deal_Manager.List_SLAs.Count; i++)
            {
                this.CmbBoxSLA.Items.Add(_Deal_Manager.List_SLAs[i].Description);
            }
            CmbBoxSLA.Text = "-- Select SLA --";
        }
Ejemplo n.º 9
0
        private void LoadCmbBoxAOH()
        {
            var _Deal_Manager = DealManagement.GetInstance();

            CmbBoxRegionAOH.Items.Add("-- Select an AOH --");
            for (int i = 0; i < _Deal_Manager.List_AOH.Count; i++)
            {
                string clean = Regex.Replace(_Deal_Manager.List_AOH[i].Detail, "AOH_", "");
                this.CmbBoxRegionAOH.Items.Add(clean);
            }
            CmbBoxRegionAOH.Text = "-- Select an AOH --";
        }
Ejemplo n.º 10
0
        private void LoadTransitionDeploymentGridCostPerYear()
        {
            var    _Deal_Manager        = DealManagement.GetInstance();
            var    _CostSummary_Manager = CostSummaryManagement.GetInstance();
            double amountY1             = _Deal_Manager.GetTransitionDeploymentCost();

            this.TransitionDeployCost = amountY1;
            double nullAmount = 0;

            GridCostPerYear.Rows.Add("Transition / Deployment", amountY1.ToString("C", CultureInfo.CurrentCulture),
                                     nullAmount.ToString("C", CultureInfo.CurrentCulture),
                                     nullAmount.ToString("C", CultureInfo.CurrentCulture),
                                     nullAmount.ToString("C", CultureInfo.CurrentCulture));
        }
Ejemplo n.º 11
0
        private void LoadTransitionDeploymentGridPricePerYear()
        {
            var    _Deal_Manager        = DealManagement.GetInstance();
            var    _CostSummary_Manager = CostSummaryManagement.GetInstance();
            double amountY1             = _Deal_Manager.GetTransitionDeploymentCost();

            double[] amounts4Year = _CostSummary_Manager.GetTransitionDeploymentPrice(amountY1);

            double nullAmount = 0;

            GridNetPrice.Rows.Add("Transition / Deployment", amountY1.ToString("C", CultureInfo.CurrentCulture),
                                  nullAmount.ToString("C", CultureInfo.CurrentCulture),
                                  nullAmount.ToString("C", CultureInfo.CurrentCulture),
                                  nullAmount.ToString("C", CultureInfo.CurrentCulture));
        }
Ejemplo n.º 12
0
        private void SetLocationCostOnDealManager()
        {
            var _Deal_Manager = DealManagement.GetInstance();

            foreach (var location in _Deal_Manager.List_Location_Costs)
            {
                if (!(CmbBoxLocation.SelectedItem.ToString().Equals("-- Select a country --")))
                {
                    if (location.Country.Equals(CmbBoxLocation.SelectedItem.ToString()))
                    {
                        _Deal_Manager.Selected_Country = location;
                        RecalculateOutputs();
                    }
                }
            }
        }
Ejemplo n.º 13
0
        private void SetSLAOnDealManager()
        {
            var _Deal_Manager = DealManagement.GetInstance();

            foreach (var Sla in _Deal_Manager.List_SLAs)
            {
                if (!(CmbBoxSLA.SelectedItem.ToString().Equals("-- Select SLA --")))
                {
                    if (Sla.Description.Equals(CmbBoxSLA.SelectedItem.ToString()))
                    {
                        _Deal_Manager.Selected_SLA = Sla;
                        RecalculateOutputs();
                    }
                }
            }
        }
Ejemplo n.º 14
0
        private void CmbBoxRegionAOH_SelectedValueChanged(object sender, EventArgs e)
        {
            var _Deal_Manager = DealManagement.GetInstance();

            foreach (var Aoh in _Deal_Manager.List_AOH)
            {
                if (!(CmbBoxRegionAOH.SelectedItem.ToString().Equals("-- Select an AOH --")))
                {
                    string aohConcat = "AOH_" + CmbBoxRegionAOH.SelectedItem.ToString();
                    if (Aoh.Detail.Equals(aohConcat))
                    {
                        RegionAOH = CmbBoxRegionAOH.SelectedItem.ToString();
                        _Deal_Manager.REGION_AOH = Aoh;
                        RecalculateOutputs();
                    }
                }
            }
        }
Ejemplo n.º 15
0
        private void btnContinue_Click(object sender, EventArgs e)
        {
            if (AreCmbBoxesValid())
            {
                ValidateUpdateTargetMargin();
                var _Deal_Manager = DealManagement.GetInstance();

                if (AreEnteredUnitsValid())
                {
                    lblErrorMssg.Visible      = false;
                    lblErrorMssgUnits.Visible = false;
                    CalculateOutputs();
                    TabControl.EnableTab(costTab);
                    TabControl.EnableTab(pricingTab);
                    TabControl.EnableTab(TabCasperCostInput);
                    TabControl.SelectTab(costTab);
                }
                else
                {
                    GridTecnologies.CurrentCell = GridTecnologies.Rows[0].Cells[1];
                    GridTecnologies.BeginEdit(true);
                }
            }
        }
Ejemplo n.º 16
0
 private AboutGUI()
 {
     InitializeComponent();
     _Tool_Version   = DealManagement.GetInstance().GetToolVersion();
     lblVersion.Text = Convert.ToString(_Tool_Version.ValueAmount);
 }
Ejemplo n.º 17
0
        private SLA GetSelectedSLA()
        {
            var _Deal_Manager = DealManagement.GetInstance();

            return(_Deal_Manager.Selected_SLA);
        }
Ejemplo n.º 18
0
        // GET: Deal
        public ActionResult Deal()
        {
            var listOfTechnologies = DealManagement.GetInstance().List_Technologies;

            return(View(listOfTechnologies));
        }