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; }
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)); }
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; }
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"); } } }
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"); } }
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); } }
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 --"; }
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 --"; }
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 --"; }
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)); }
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)); }
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(); } } } }
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(); } } } }
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(); } } } }
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); } } }
private AboutGUI() { InitializeComponent(); _Tool_Version = DealManagement.GetInstance().GetToolVersion(); lblVersion.Text = Convert.ToString(_Tool_Version.ValueAmount); }
private SLA GetSelectedSLA() { var _Deal_Manager = DealManagement.GetInstance(); return(_Deal_Manager.Selected_SLA); }
// GET: Deal public ActionResult Deal() { var listOfTechnologies = DealManagement.GetInstance().List_Technologies; return(View(listOfTechnologies)); }