void populateHeader(TRAINQUERY trainQuery) { DateTime dtFrom = DateTime.ParseExact(trainQuery.searchTimeStart, "HH:mm:ss", CultureInfo.InvariantCulture); DateTime dtTo = DateTime.ParseExact(trainQuery.searchTimeEnd, "HH:mm:ss", CultureInfo.InvariantCulture); DateTime searchDate = DateTime.ParseExact(trainQuery.searchDate, "yyyy-MM-dd", CultureInfo.InvariantCulture); string fromStation = AppUtility.ToLowerCase(trainQuery.startStaionName); string toStation = AppUtility.ToLowerCase(trainQuery.endStaionName); string date = searchDate.DayOfWeek.ToString(); string fromTime = dtFrom.ToString("h:mm", CultureInfo.CurrentCulture); string toTime = dtTo.ToString("h:mm", CultureInfo.CurrentCulture); string fromZone = dtFrom.ToString("tt", CultureInfo.CurrentCulture); string toZone = dtTo.ToString("tt", CultureInfo.CurrentCulture); txtStations.Text = String.Format(APPCONTEXT.sheduleListHeader, fromStation, toStation); txtDate.Text = date; txtTimePeriod.Text = String.Format(APPCONTEXT.sheduleListTimePeriod, fromTime, fromZone, toTime, toZone); }