Ejemplo n.º 1
0
        public static string WriteDataPage(IDataPage info, string order, int?index, IUrlParams geturl)
        {
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            string       paramurl;
            HttpRequest  request    = HttpContext.Current.Request;
            HttpResponse response   = HttpContext.Current.Response;
            string       orderfield = "";

            sb.Append(request.FilePath);
            if (index != null)
            {
                sb.Append("?PageIndex=" + index);
            }
            else
            {
                sb.Append("?PageIndex=" + info.PageIndex);
            }
            sb.Append("&PageSize=" + info.PageSize);
            if (order == null || order == "")
            {
                orderfield = info.OrderField;
            }
            else
            {
                if (info.OrderField == null || info.OrderField == "")
                {
                    orderfield = order + " asc";
                }
                else
                {
                    if (info.OrderField.IndexOf(order + " asc") >= 0)
                    {
                        orderfield = order + " desc";
                    }
                    else
                    {
                        orderfield = order + " asc";
                    }
                }
            }
            if (orderfield != "")
            {
                sb.Append("&OrderField=" + HttpUtility.UrlEncode(orderfield));
            }
            if (geturl != null)
            {
                paramurl = geturl.GetParams();
                if (paramurl != null && paramurl != "")
                {
                    sb.Append("&" + geturl.GetParams());
                }
            }
            return(sb.ToString());
        }
Ejemplo n.º 2
0
 public static string WriteDataPage(IDataPageProperty info, string order, int index, IUrlParams geturl)
 {
     return(WriteDataPage(info.DataPage, order, index, geturl));
 }
Ejemplo n.º 3
0
 public async Task <IResponseResult <T> > GetAsync <T>(IUrlParams urlParams = null, RequestBody body = null, IQueryString queryString = null, IHeaderCollection headers = null)
 {
     return(await this.ExecuteRequestAsync <T>(HttpMethod.Get, urlParams, body, queryString, headers));
 }
 public Task <ApiResult <string> > Get(string action, IUrlParams parameters)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 5
0
 public IResponseResult Get(IUrlParams urlParams = null, RequestBody body = null, IQueryString queryString = null, IHeaderCollection headers = null)
 {
     return(this.ExecuteRequest(HttpMethod.Get, urlParams, body, queryString, headers));
 }