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

            if (lcCost != null && lcCost.ViewEdit())
            {
                updateLabels();
            }
        }
コード例 #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();
            }
        }
コード例 #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();
            }
        }
コード例 #4
0
ファイル: frmCost.cs プロジェクト: destinnie-laila/NZToursApp
 public bool ShowDialog(clsCost prCost)
 {
     _Cost = prCost;
     updateDisplay();
     return(ShowDialog() == DialogResult.OK);
 }