示例#1
0
        protected override void updateDisplay()
        {
            base.updateDisplay();
            ClsVehicleCost lcCost = (ClsVehicleCost)_Cost;

            txtKmCharge.Text    = Convert.ToString(lcCost.KmCharge);
            lblAmountValue.Text = Convert.ToString(lcCost.KmCharge * lcCost.Distance);
        }
示例#2
0
        protected override void pushData()
        {
            base.pushData();

            ClsVehicleCost lcCost = (ClsVehicleCost)_Cost;


            lcCost.KmCharge = Convert.ToDecimal(txtKmCharge.Text);
        }
示例#3
0
 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);
     }
 }
示例#4
0
        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) : "";
        }