public bool ChekPurchase(String licensePlate, String dateTime) { LicensePlateParser licensePlateParser = new LicensePlateParser(); string lp = licensePlateParser.FormatAndValidateLicensePlate(licensePlate); DateParser dateParse = new DateParser(); string hour = dateParse.GetTimeFromCheck(dateTime); string day = dateParse.GetDayFromCheck(dateTime); bool isActivepurchase = FindPurchase(lp, day, hour); return(isActivepurchase); }
public Purchase(string msg, Account myA) { DateParser dateParser = new DateParser(); string startTime = dateParser.GetTimeFromTxt(msg); MinuteParser minuteParser = new MinuteParser(); LicensePlateParser myParserLicense = new LicensePlateParser(); string licensePlate = myParserLicense.GetLicensePlate(msg); string finishTime = AddMinHour(minuteParser.GetCantMinutes(msg), startTime); myAccount = myA; MyLicensePlate = licensePlate; MyDay = MyDay; MyInitHour = startTime; MyFinHour = finishTime; }