コード例 #1
0
        /// <summary>
        /// 创建连接
        /// </summary>
        /// <param name="_PageIndex"></param>
        /// <returns></returns>
        private String CreateUrl(Int32 _PageIndex)
        {
            if (PageType == EnumPageType.Other)
            {
                return(Globals.NavigateURL("", String.Format("PageIndex{0}={1}", ModuleId, _PageIndex)));
            }
            else if (PageType == EnumPageType.NormalURL)
            {
                String indexString = String.Format("pageindex{0}", ModuleId);
                String QueryString = String.Empty;

                if (IsParameter)
                {
                    List <String> Querys = new List <String>();

                    NameValueCollection QueryStrings = HttpContext.Current.Request.QueryString;

                    foreach (String Qkey in QueryStrings.AllKeys)
                    {
                        if (!String.IsNullOrEmpty(Qkey) && indexString != Qkey.ToLower())
                        {
                            QueryString += String.Format("{0}{1}={2}", QueryString == String.Empty ? "?" : "&", Qkey, QueryStrings[Qkey]);
                        }
                    }
                }

                QueryString += String.Format("{0}{1}={2}", QueryString == String.Empty ? "?" : "&", indexString, _PageIndex);
                return(String.Format("{0}{1}", HttpContext.Current.Request.Path, QueryString));
            }
            else
            {
                String indexString = String.Format("pageindex{0}", ModuleId);
                String QueryString = String.Empty;
                NameValueCollection QueryStrings = HttpContext.Current.Request.QueryString;
                List <String>       Querys       = new List <String>();

                foreach (String Qkey in QueryStrings.AllKeys)
                {
                    if (!String.IsNullOrEmpty(Qkey))
                    {
                        if (IsParameter || (String.Format("status,search,token,articleid,groupid{0},attribute1_{0},attribute2_{0}", ModuleId).IndexOf(Qkey, StringComparison.CurrentCultureIgnoreCase) >= 0))
                        {
                            if (indexString != Qkey.ToLower())
                            {
                                // QueryString += String.Format("{0}{1}={2}", QueryString == String.Empty ? "?" : "&", Qkey, QueryStrings[Qkey]);
                                Querys.Add(String.Format("{0}={1}", Qkey, QueryStrings[Qkey]));
                            }
                        }
                    }
                }
                Querys.Add(String.Format("{0}={1}", indexString, _PageIndex));
                // QueryString += String.Format("{0}{1}={2}", QueryString == String.Empty ? "?" : "&", indexString, _PageIndex);
                return(Globals.NavigateURL("", Querys.ToArray()));
            }
        }
コード例 #2
0
        /// <summary>
        /// 创建连接
        /// </summary>
        /// <param name="_PageIndex"></param>
        /// <returns></returns>
        private String CreateUrl(Int32 _PageIndex)
        {
            if (PageType == EnumPageType.Other)
            {
                return(Globals.NavigateURL("", String.Format("PageIndex{0}={1}", ModuleId, _PageIndex)));
            }
            else if (PageType == EnumPageType.NormalURL)
            {
                String indexString = String.Format("pageindex{0}", ModuleId);
                String QueryString = String.Empty;

                if (IsParameter)
                {
                    List <String> Querys = new List <String>();

                    NameValueCollection QueryStrings = HttpContext.Current.Request.QueryString;

                    foreach (String Qkey in QueryStrings.AllKeys)
                    {
                        if (!String.IsNullOrEmpty(Qkey) && indexString != Qkey.ToLower())
                        {
                            QueryString += String.Format("{0}{1}={2}", QueryString == String.Empty ? "?" : "&", Qkey, QueryStrings[Qkey]);
                        }
                    }
                }

                QueryString += String.Format("{0}{1}={2}", QueryString == String.Empty ? "?" : "&", indexString, _PageIndex);
                return(String.Format("{0}{1}", HttpContext.Current.Request.Path, QueryString));
            }
            else
            {
                String indexString = String.Format("pageindex{0}", ModuleId);
                String QueryString = String.Empty;
                NameValueCollection QueryStrings = HttpContext.Current.Request.QueryString;
                List <String>       Querys       = new List <String>();

                foreach (String Qkey in QueryStrings.AllKeys)
                {
                    if (!String.IsNullOrEmpty(Qkey))
                    {
                        if (IsParameter || (("calendar,archive,categoryid,search,searchtag,token,EventID,author").IndexOf(Qkey.ToLower()) >= 0))
                        {
                            if (indexString != Qkey.ToLower())
                            {
                                // QueryString += String.Format("{0}{1}={2}", QueryString == String.Empty ? "?" : "&", Qkey, QueryStrings[Qkey]);
                                Querys.Add(String.Format("{0}={1}", Qkey, QueryStrings[Qkey]));
                            }
                        }
                    }
                }
                Querys.Add(String.Format("{0}={1}", indexString, _PageIndex));
                // QueryString += String.Format("{0}{1}={2}", QueryString == String.Empty ? "?" : "&", indexString, _PageIndex);
                return(Globals.NavigateURL("", Querys.ToArray()));
            }
        }
コード例 #3
0
        private void ExecuteCapsCommand()
        {
            if (caps == false)
            {
                caps         = true;
                CapsEnabled  = true;
                CapsDisabled = false;

                Akey = Akey.ToUpper();
                Bkey = Bkey.ToUpper();
                Ckey = Ckey.ToUpper();
                Dkey = Dkey.ToUpper();
                Ekey = Ekey.ToUpper();
                Fkey = Fkey.ToUpper();
                Gkey = Gkey.ToUpper();
                Hkey = Hkey.ToUpper();
                Ikey = Ikey.ToUpper();
                Jkey = Jkey.ToUpper();
                Kkey = Kkey.ToUpper();
                Lkey = Lkey.ToUpper();
                Mkey = Mkey.ToUpper();
                Nkey = Nkey.ToUpper();
                Okey = Okey.ToUpper();
                Pkey = Pkey.ToUpper();
                Qkey = Qkey.ToUpper();
                Rkey = Rkey.ToUpper();
                Skey = Skey.ToUpper();
                Tkey = Tkey.ToUpper();
                Vkey = Vkey.ToUpper();
                Ukey = Ukey.ToUpper();
                Wkey = Wkey.ToUpper();
                Xkey = Xkey.ToUpper();
                Ykey = Ykey.ToUpper();
                Zkey = Zkey.ToUpper();
            }
            else
            {
                caps         = false;
                CapsEnabled  = false;
                CapsDisabled = true;
                Akey         = Akey.ToLower();
                Bkey         = Bkey.ToLower();
                Ckey         = Ckey.ToLower();
                Dkey         = Dkey.ToLower();
                Ekey         = Ekey.ToLower();
                Fkey         = Fkey.ToLower();
                Gkey         = Gkey.ToLower();
                Hkey         = Hkey.ToLower();
                Ikey         = Ikey.ToLower();
                Jkey         = Jkey.ToLower();
                Kkey         = Kkey.ToLower();
                Lkey         = Lkey.ToLower();
                Mkey         = Mkey.ToLower();
                Nkey         = Nkey.ToLower();
                Okey         = Okey.ToLower();
                Pkey         = Pkey.ToLower();
                Qkey         = Qkey.ToLower();
                Rkey         = Rkey.ToLower();
                Skey         = Skey.ToLower();
                Tkey         = Tkey.ToLower();
                Vkey         = Vkey.ToLower();
                Ukey         = Ukey.ToLower();
                Wkey         = Wkey.ToLower();
                Xkey         = Xkey.ToLower();
                Ykey         = Ykey.ToLower();
                Zkey         = Zkey.ToLower();
            }
        }