コード例 #1
0
ファイル: t.aspx.cs プロジェクト: radtek/CustomerManage
        private void pageGo()
        {
            string ShortUrl = HttpContext.Current.Request.Url.ToString();

            Response.Write(ShortUrl);
            int i = ShortUrl.IndexOf("&sukey=");

            if (i > 0)
            {
                ShortUrl = ShortUrl.Substring(0, ShortUrl.IndexOf("&sukey="));
            }
            Response.Write("<br/>");
            Response.Write(ShortUrl);
            //string pare = HttpContext.Current.Request.Url.Query.ToString();
            LoggingSessionInfo loggingSessionInfo = Default.GetAPLoggingSession("");
            string             strError           = string.Empty;
            string             OldUrl             = string.Empty;
            ShortUrlChangeBLL  server             = new ShortUrlChangeBLL(loggingSessionInfo);
            bool bReturn = server.GetShortUrlChange(ShortUrl, out OldUrl, out strError);

            if (bReturn)
            {
                Response.Redirect(OldUrl);
            }
            else
            {
                this.lb1.Text = strError;
            }
        }
コード例 #2
0
        public bool SetShortUrlChange(string OldUrl, out string ShortUrl, out string strError)
        {
            LoggingSessionInfo loggingSessionInfo = Default.GetAPLoggingSession("");
            ShortUrlChangeBLL  server             = new ShortUrlChangeBLL(loggingSessionInfo);
            bool bReturn = server.SetShortUrlChange(OldUrl, out ShortUrl, out strError);

            return(bReturn);
        }