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(); }
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(); }
protected BaseVertexCost(int cost) { cost = CostRange.ReturnInRange(cost); CurrentCost = cost; }
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()) { }
public static CostRangeModel ToModel(this CostRange costRange) { return(CostRangeModelSelectExpression.Invoke(costRange)); }