Beispiel #1
0
        private void btnEditCost_Click(object sender, EventArgs e)
        {
            clsCost lcCost = (clsCost)lstCost.SelectedItem;

            if (lcCost != null && lcCost.ViewEdit())
            {
                updateLabels();
            }
        }
Beispiel #2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            clsCost lcCost = (clsCost)lstCost.SelectedItem;  //cost currently selected

            if (lcCost != null && MessageBox.Show("This cost will be permanantly deleted, would you like to continue?", "Delete Costs", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
            {
                _TempTour.CostList.Remove(lcCost);
                updateLabels();
            }
        }
Beispiel #3
0
        //=====================Add, Edit, Delete Cost Usecases=============//

        private void btnAddCost_Click(object sender, EventArgs e)
        {
            clsCost lcCost = clsCost.newCost(cboCostType.SelectedIndex);

            if (lcCost != null && lcCost.ViewEdit())

            {
                _TempTour.CostList.Add(lcCost);

                updateLabels();
            }
        }
Beispiel #4
0
 public bool ShowDialog(clsCost prCost)
 {
     _Cost = prCost;
     updateDisplay();
     return(ShowDialog() == DialogResult.OK);
 }