Exemple #1
0
        public SortedDictionary <string, string> GetReportParamNames()
        {
            SortedDictionary <string, string> paramNames = new SortedDictionary <string, string>();

            if (!IsStatusReport)
            {
                return(paramNames);
            }

            paramNames.Add(ParamsLinkidName, ParamsLinkidValue.Replace("{$", ParamsPrefix).Replace("}", ParamsSubfix));

            if (RequestType == 1)
            {
                paramNames.Add(ParamsStatusName, ParamsRequestTypeReportValue.Replace("{$", ParamsPrefix).Replace("}", ParamsSubfix));
            }
            else if (RequestType == 2)
            {
                paramNames.Add(ParamsStatusName, ParamsRequestTypeReportValue.Replace("{$", ParamsPrefix).Replace("}", ParamsSubfix));
                paramNames.Add(ParamsRequestTypeName, ParamsRequestTypeReportValue.Replace("{$", ParamsPrefix).Replace("}", ParamsSubfix));
            }

            return(paramNames);
        }
Exemple #2
0
        private string BuildReportUrl()
        {
            if (!IsStatusReport)
            {
                return("");
            }


            NameValueCollection queryString = HttpUtility.ParseQueryString(string.Empty);

            queryString.Add(ParamsLinkidName, ParamsLinkidValue.Replace("{$", ParamsPrefix).Replace("}", ParamsSubfix));

            if (RequestType == 1)
            {
                queryString.Add(ParamsStatusName, ParamsRequestTypeReportValue.Replace("{$", ParamsPrefix).Replace("}", ParamsSubfix));
            }
            else if (RequestType == 2)
            {
                queryString.Add(ParamsStatusName, ParamsRequestTypeReportValue.Replace("{$", ParamsPrefix).Replace("}", ParamsSubfix));
                queryString.Add(ParamsRequestTypeName, ParamsRequestTypeReportValue.Replace("{$", ParamsPrefix).Replace("}", ParamsSubfix));
            }


            Uri uri = new Uri(this.SubmitSendUrl);

            if (string.IsNullOrEmpty(queryString.ToString()))
            {
                return(this.SubmitSendUrl);
            }

            if (!string.IsNullOrEmpty(uri.Query.Trim()))
            {
                return(string.Format("{0}&{1}", this.SubmitSendUrl, queryString.ToString()));
            }

            return(string.Format("{0}?{1}", this.SubmitSendUrl, queryString.ToString()));
        }