DTcms.Web.UI/Page/payment.cs
(开头部分) 8KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Collections.Generic;
using System.Text;
using System.Web;
using DTcms.Common;
namespace DTcms.Web.UI.Page
{
public partial class payment : Web.UI.BasePage
{
protected string action;
protected string order_type = string.Empty;
protected string order_no = string.Empty;
protected decimal order_amount = 0;
protected Model.users userModel;
protected Model.orders orderModel;
protected Model.amount_log amountModel;
protected Model.payment payModel;
/// <summary>
/// 重写父类的虚方法,此方法将在Init事件前执行
/// </summary>
protected override void ShowPage()
{
this.Init += new EventHandler(payment_Init); //加入Init事件
}
/// <summary>
/// 将在Init事件执行
/// </summary>
protected void payment_Init(object sender, EventArgs e)
{
//取得处事类型
action = DTRequest.GetString("action");
order_type = DTRequest.GetString("order_type");
order_no = DTRequest.GetString("order_no");
switch (action)
{
case "confirm":
if (string.IsNullOrEmpty(action) || string.IsNullOrEmpty(order_type) || string.IsNullOrEmpty(order_no))
{
HttpContext.Current.Response.Redirect(config.webpath + "error.aspx?msg=" + Utils.UrlEncode("出错啦,URL传输参数有误!"));
return;
}
//检查用户是否登录
userModel = new Web.UI.BasePage().GetUserInfo();
if (userModel == null)
{
//用户未登录
HttpContext.Current.Response.Redirect(linkurl("payment", "login"));
return;
}
//检查订单的类型(充值或购物)
if (order_type == DTEnums.AmountTypeEnum.Recharge.ToString()) //充值
{
amountModel = new BLL.amount_log().GetModel(order_no);
if (amountModel == null)
{
后面还有 104 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
