protected override void updateDisplay() { base.updateDisplay(); ClsVehicleCost lcCost = (ClsVehicleCost)_Cost; txtKmCharge.Text = Convert.ToString(lcCost.KmCharge); lblAmountValue.Text = Convert.ToString(lcCost.KmCharge * lcCost.Distance); }
protected override void pushData() { base.pushData(); ClsVehicleCost lcCost = (ClsVehicleCost)_Cost; lcCost.KmCharge = Convert.ToDecimal(txtKmCharge.Text); }
private void ReUpdatingTourVehicleCostList() { if (listViewTourCost.Items.Count > 0) { decimal TotalCost = 0; List <ClsCost> tourCostOldDetails = _Tour.TourCostList.Values.ToList <ClsCost>(); foreach (ListViewItem item in listViewTourCost.Items) { if (VEHICLE == item.SubItems[1].Text) { var NewDistance = numericUpDownDistance.Value; ClsVehicleCost lcCost = (ClsVehicleCost)item.Tag; item.SubItems[2].Text = "$" + Convert.ToString(NewDistance * lcCost.KmCharge); lcCost.Distance = Convert.ToDecimal(NewDistance); } TotalCost += Convert.ToDecimal(item.SubItems[2].Text.Remove(0, 1)); } lblTotalCost.Text = Convert.ToString(TotalCost); } }
private void txtKmCharge_TextChanged(object sender, EventArgs e) { ClsVehicleCost lcCost = (ClsVehicleCost)_Cost; lblAmountValue.Text = (txtKmCharge.Text.Length > 0) ? Convert.ToString(Convert.ToDecimal(txtKmCharge.Text) * lcCost.Distance) : ""; }