コード例 #1
0
        private void EditCost()
        {
            ClsCost lcCost = (ClsCost)LbTourCosts.SelectedItem;

            if (lcCost != null && lcCost.ViewEdit())
            {
                UpdateDisplay();
            }
        }
コード例 #2
0
        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();
            }
        }
コード例 #3
0
        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);
 }