Пример #1
0
        public void SHNStay(SHNFacility s)
        {
            int counter = 1;
            int minus   = s.FacilityCapacity - 1;

            minus += s.FacilityVacancy;

            Console.WriteLine("[{0,1}] {1,-20} {2,16} {3,21} {4,21} {5,19}", counter, s.FacilityName, minus, s.DistFromAirCheckpoint,
                              s.DistFromLandCheckpoint, s.DistFromSeaCheckpoint);
        }
Пример #2
0
 public void AssignSHNFacility(SHNFacility s)
 {
     SHNStay(s);
 }
Пример #3
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);
        }