Esempio n. 1
0
        // code is not working at the moment.
        public double CalculateTravelCost(string entryMode, DateTime entryDate, TravelEntry t, SHNFacility s)
        {
            t.EntryMode = entryMode;
            t.EntryDate = entryDate;
            double swabcost  = 200;
            double transport = 80;
            double basefare  = 50;

            double totalcost = swabcost + transport;

            if (entryMode == "Air")
            {
                double totaltransportcost = basefare * s.DistFromAirCheckpoint * 0.22;
                return(totaltransportcost);
            }
            else if (entryMode == "Land")
            {
                double totaltransportcost = basefare * s.DistFromLandCheckpoint * 0.22;
                return(totaltransportcost);
            }
            else if (entryMode == "Sea")
            {
                double totaltransportcost = basefare * s.DistFromSeaCheckpoint * 0.22;
                return(totaltransportcost);
            }
            return(totalcost);
        }
Esempio n. 2
0
 public void AddTravelEntry(TravelEntry TE)
 {
     TravelEntryList.Add(TE);
 }