private void EditCost()
        {
            ClsCost lcCost = (ClsCost)LbTourCosts.SelectedItem;

            if (lcCost != null && lcCost.ViewEdit())
            {
                UpdateDisplay();
            }
        }
        private void BtnAddCost_Click(object sender, EventArgs e)
        {
            ClsCost lcCost = ClsCost.NewCost(CbCostType.SelectedIndex);

            pushData();
            if (lcCost != null && lcCost.ViewEdit())
            {
                _Tour.CostList.Add(lcCost);
                UpdateDisplay();
            }
        }
        private void BtnRemCost_Click(object sender, EventArgs e)
        {
            DialogResult lcresult = MessageBox.Show("Are you sure you want to delete this tour cost?",
                                                    "Tour Cost Deletion Requested",
                                                    MessageBoxButtons.YesNo);

            if (lcresult == DialogResult.Yes)
            {
                ClsCost tempCost = LbTourCosts.SelectedItem as ClsCost;
                _Tour.CostList.Remove(tempCost);

                UpdateDisplay();
            }
        }
示例#4
0
 public bool ShowDialog(ClsCost prCost)
 {
     _Cost = prCost;
     UpdateDisplay();
     return(ShowDialog() == DialogResult.OK);
 }