Ejemplo n.º 1
0
        private void DisplayHireCost()
        {
            if (_Vehicle.ActivityList != null)
            {
                int count = 0;
                foreach (ClsActivity lcActivity in _Vehicle.ActivityList)
                {
                    switch (lcActivity.TypeOfActivity())
                    {
                    case "Hire":
                        ClsHire hire = (ClsHire)_Vehicle.ActivityList[count];
                        hire.Value = hire.CalculateValue(_Vehicle.DailyHireCharge);

                        break;

                    case "Relocate":
                        ClsRelocate relocate = (ClsRelocate )_Vehicle.ActivityList[count];
                        relocate.Value = relocate.CalculateValue(lcActivity.Value);
                        break;

                    default:
                        ClsService service = (ClsService)_Vehicle.ActivityList[count];
                        service.Value = service.CalculateValue(lcActivity.Value);
                        break;
                    }

                    count++;
                }
            }
        }
Ejemplo n.º 2
0
        protected override void PushData()
        {
            base.PushData();
            ClsRelocate lcActivity = (ClsRelocate)_Activity;

            lcActivity.NumberOfKM = Convert.ToInt16(nudKM.Value);
        }
Ejemplo n.º 3
0
        protected override void UpdateDisplay()
        {
            base.UpdateDisplay();
            ClsRelocate lcActivity = (ClsRelocate)_Activity;

            nudKM.Value = lcActivity.NumberOfKM;
        }
Ejemplo n.º 4
0
        protected override void btnOK_Click(object sender, EventArgs e)
        {
            ClsRelocate lcActivity = (ClsRelocate)_Activity;

            PushData();
            if (txtName.Text != "")
            {
                base.btnOK_Click(sender, e);
            }
            else
            {
                MessageBox.Show("A Least one Field is empty. Please insert missing Data", "Field Empty");
            }
        }