Exemple #1
0
        private void buttonInsertCostRange_Click(object sender, EventArgs e)
        {
            CostRange costRangeToInsert = new CostRange(txtInsertCostRange.Text);

            if (costRangeToInsert.Insert())
            {
                MessageBox.Show("Cost level inserted successfully");
            }
            else
            {
                MessageBox.Show("Error inserting cost level");
            }
            LoadComboBoxCostRange();
        }
Exemple #2
0
        private void buttonDeleteCost_Click(object sender, EventArgs e)
        {
            CostRange costRangeToDelete = new CostRange();

            costRangeToDelete.IDcost = (int)cbbCostRange.SelectedValue;
            costRangeToDelete.Cost   = txtCostRangeToUpdateDelete.Text;
            if (costRangeToDelete.Delete())
            {
                MessageBox.Show("Cost level deleted successfully");
            }
            else
            {
                MessageBox.Show("Error deleted cost level");
            }
            LoadComboBoxCostRange();
        }
Exemple #3
0
 protected BaseVertexCost(int cost)
 {
     cost        = CostRange.ReturnInRange(cost);
     CurrentCost = cost;
 }
Exemple #4
0
 protected BaseVertexCost() : this(CostRange.GetRandomValueFromRange())
 {
 }
 /// <summary>
 /// Creates a new instance of
 /// <see cref="WeightableVertexCost"/>
 /// with random cost.
 /// Weighted cost is set to the same value
 /// </summary>
 public WeightableVertexCost()
     : this(CostRange.GetRandomValue())
 {
 }
Exemple #6
0
 public static CostRangeModel ToModel(this CostRange costRange)
 {
     return(CostRangeModelSelectExpression.Invoke(costRange));
 }