Ejemplo n.º 1
0
        //enter new cost
        private void btnEnterNewCosts_Click(object sender, EventArgs e)
        {
            ClsCosts lcCost = ClsCosts.NewCost(cbCostType.SelectedIndex);

            if (lcCost != null && lcCost.ViewEdit())
            {
                _Costs = lcCost;
                _Tour.CostList.Add(_Costs);
                updateDisplay();
            }
        }
Ejemplo n.º 2
0
        //edit an existing cost
        private void btnEditCosts_Click(object sender, EventArgs e)
        {
            ClsCosts lcCost = (ClsCosts)lbCosts.SelectedItem;

            if (lcCost == null)
            {
                MessageBox.Show("There are no Costs to modify. Create one first", "Confirm", MessageBoxButtons.OK);
            }
            if (lcCost != null && lcCost.ViewEdit())
            {
                updateDisplay();
            }
        }