Beispiel #1
0
        private void ApplyCMA()
        {
            double dbcCost   = 0;
            double btpCost   = 0;
            double sellPrice = 0;
            double gst       = 1.1;

            double.TryParse(textBoxDBCCost.Text.ToString().Replace("$", ""), out dbcCost);
            if (checkBoxApplyCMA.Checked)
            {
                double cmaPercent = 0;
                double.TryParse(textBoxCMAPercent.Text.ToString(), out cmaPercent);

                btpCost = dbcCost + dbcCost * (cmaPercent / 100);
            }
            else
            {
                btpCost = dbcCost;
            }
            double.TryParse(txtSellPrice.Text.ToString().Replace("$", ""), out sellPrice);
            textBoxBTPCost.Text = btpCost.ToString();
            if (sellPrice > 0)
            {
                textBoxBTPTargetMargin.Text = Math.Round(100 * ((sellPrice / gst) - btpCost) / (sellPrice / gst), 2).ToString();
            }
            MetriconCommon.ToCurrency(ref textBoxBTPCost);
        }
Beispiel #2
0
 private void textBoxDBCCost_Leave(object sender, EventArgs e)
 {
     ApplyCMA();
     MetriconCommon.ToCurrency(ref textBoxDBCCost);
 }
Beispiel #3
0
 private void txtSellPrice_Leave(object sender, EventArgs e)
 {
     MetriconCommon.ToCurrency(ref txtSellPrice);
 }