public static string GetReturnUrl(string page, PathInfo path, LocationPathInfo locationPath, int reservationId, DateTime date)
        {
            string result = $"~/{page}";

            string separator = "?";

            if (reservationId > 0)
            {
                result   += $"{separator}ReservationID={reservationId}";
                separator = "&";
            }

            if (!path.IsEmpty())
            {
                result   += $"{separator}Path={path.UrlEncode()}";
                separator = "&";
            }

            if (!locationPath.IsEmpty())
            {
                result   += $"{separator}LocationPath={locationPath.UrlEncode()}";
                separator = "&";
            }

            result   += $"{separator}Date={date:yyyy-MM-dd}";
            separator = "&";

            return(result);
        }
 public static string NavigateUrl(string url, PathInfo path, LocationPathInfo locationPath)
 {
     if (!path.IsEmpty())
     {
         url += $"&Path={path.UrlEncode()}";
     }
     if (!locationPath.IsEmpty())
     {
         url += $"&LocationPath={locationPath.UrlEncode()}";
     }
     return(url);
 }
示例#3
0
 public static string GetChangeHourRangeUrl(string range, PathInfo path, DateTime selectedDate, ViewType view)
 {
     return($"{GetReservationControllerUrl()}?Command=ChangeHourRange&Range={range}&Path={path.UrlEncode()}&Date={selectedDate:yyyy-MM-dd}&View={view}");
 }