public static string[] getRouteAndBusId(string from, string to, string busType)
        {
            busType = BusTypeRepo.GetBusTypeForBus(busType);
            string sql = $"select route_id,route.bus_no from route join bus on route.bus_no = bus.bus_no where dept_location = '{from}' and destination = '{to}' and type_id = '{busType}'";
            var    row = DataAccess.GetDataTable(sql);

            string[] id = new string[2];
            id[0] = row.Rows[0][0].ToString(); //route id
            id[1] = row.Rows[0][1].ToString(); // bus number
            return(id);
        }
        public static DataTable getSchedule(string from, string to, string busType, string date)
        {
            busType = BusTypeRepo.GetBusTypeForBus(busType);
            // string[] id = getRouteAndBusId(from,to,busType);//id[0]=routeid, id[1]=busNO
            string sql = $"select schedule.schedule_id, dept_time,arrival_time,available_seat_count from schedule join route on route.route_id = schedule.route_id join booking on schedule.schedule_id = booking.schedule_id join bus on route.bus_no = bus.bus_no where dept_location = '{from}' and destination = '{to}' and journey_date = '{date}' and type_id = '{busType}'";
            var    row = DataAccess.GetDataTable(sql);

            if (row.Rows.Count <= 0)
            {
                //Console.WriteLine("12");
                sql = $"select schedule.schedule_id, dept_time,arrival_time, '37' as available_seat_count from schedule join route on route.route_id=schedule.route_id join bus on route.bus_no=bus.bus_no where dept_location='{from}' and destination='{to}' and type_id='{busType}'";
                row = DataAccess.GetDataTable(sql);
            }
            return(row);
        }