Пример #1
0
        public void TestSelectTimeByMovieIdDatetimeTrue()
        {
            DateTime timeStart        = new DateTime(2018, 7, 20, 0, 0, 0);
            string   comparedatetime1 = timeStart.ToString($"{timeStart:yyyy-MM-dd}");

            Assert.NotNull(sch.SelectTime(1, comparedatetime1));
        }
Пример #2
0
        public List <Schedules> SelectTime(int movie_id, string date)
        {
            string regexDate = @"(?<year>\d{2,4})-(?<month>\d{1,2})-(?<day>\d{1,2})";

            if (Regex.IsMatch(date, regexDate) != true)
            {
                return(null);
            }
            return(sche.SelectTime(movie_id, date));
        }
Пример #3
0
        public List <Schedules> SelectTime(int movie_id, string date)
        {
            Regex           regexDate           = new Regex(@"(?<year>\d{2,4})-(?<month>\d{1,2})-(?<day>\d{1,2})");
            MatchCollection matchCollectionDate = regexDate.Matches(date);

            if (matchCollectionDate.Count <= 0)
            {
                return(null);
            }
            return(sche.SelectTime(movie_id, date));
        }