📄 paypageredirect.cs
字号:
using System;
using System.Collections.Generic;
using System.Web;
using System.Configuration;
namespace DNNLite.DesktopModules.OnlinePay
{
/// <summary>
///帮助重定向到支付页
/// </summary>
public class PayPageRedirect
{
/// <summary>
/// 创建新实例
/// </summary>
/// <param name="payable">要支付的信息</param>
public PayPageRedirect( PayAble payable )
{
_payable = payable;
}
private PayAble _payable;
/// <summary>
/// 执行重定向
/// </summary>
public void Redirect()
{
string paymentnum = Comm.GuidComb.NewComb().ToString();
HttpContext.Current.Session.Add(paymentnum, _payable);
Configuration cfg =
ConfigurationManager.OpenExeConfiguration(HttpContext.Current.Server.MapPath("~/web.config"));
string tabid = cfg.AppSettings.Settings["onlinepayindex"].Value;
string navurl = DNNLite.Comm.Comm.NavigateURL(int.Parse(tabid), "paymentnum=" + paymentnum,"isgotoselect=true");
HttpContext.Current.Response.Redirect(navurl);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -