コード例 #1
0
        private static string ProcessCreateTrainCommand(string[] parameters)
        {
            string   from          = parameters[0];
            string   to            = parameters[1];
            DateTime dateTime      = ParseDateTime(parameters[2]);
            decimal  price         = decimal.Parse(parameters[3]);
            decimal  studentPrice  = decimal.Parse(parameters[4]);
            string   commandResult = ticketRepository.AddTrainTicket(from, to, dateTime, price, studentPrice);

            return(commandResult);
        }
コード例 #2
0
        private static string ProccessCreateTrainCommand(string[] parameters)
        {
            string   departureTown        = parameters[0];
            string   arrivalTown          = parameters[1];
            DateTime departureDateAndTime = ParseDateTime(parameters[2]);
            decimal  regularPrice         = decimal.Parse(parameters[3]);
            decimal  studentPrice         = decimal.Parse(parameters[4]);
            string   commandResult        =
                ticketRepository.AddTrainTicket(departureTown, arrivalTown, departureDateAndTime, regularPrice, studentPrice);

            return(commandResult);
        }