📄 paymentlog.ascx.cs
字号:
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DNNLite.Entites.Modules;
using Castle.ActiveRecord;
using DNNLite.DesktopModules.OnlinePay;
using NHibernate.Expression;
using System.Collections;
public partial class DesktopModules_OnlinePay_PaymentLog : PortalModuleBase
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnBack_Click(object sender, EventArgs e)
{
Response.Redirect(EditUrl());
}
protected void btnQuery_Click(object sender, EventArgs e)
{
BindData();
}
private void BindData()
{
ArrayList exps = new ArrayList();
if(!string.IsNullOrEmpty(txtOrderId.Text ))
{
exps.Add(new LikeExpression("OrderID", txtOrderId.Text, MatchMode.Start ));
}
if (!string.IsNullOrEmpty(txtUserName.Text))
{
exps.Add(new EqExpression("UserName", txtUserName.Text));
}
if (!string.IsNullOrEmpty(txtPayTimeSt.Text))
{
exps.Add(new GeExpression("PayTime", DateTime.Parse(txtPayTimeSt.Text ) ));
}
if (!string.IsNullOrEmpty(txtPayTimeEd.Text))
{
exps.Add(new LtExpression("PayTime", DateTime.Parse(txtPayTimeEd.Text).AddDays(1)));
}
if (!string.IsNullOrEmpty(txtSuccessTimeSt.Text))
{
exps.Add(new GeExpression("SuccessTime", DateTime.Parse(txtSuccessTimeSt.Text)));
}
if (!string.IsNullOrEmpty(txtSuccessTimeEd.Text))
{
exps.Add(new LtExpression("SuccessTime", DateTime.Parse(txtSuccessTimeEd.Text).AddDays(1)));
}
if (dplPlatform.SelectedValue != "")
{
exps.Add(new EqExpression("Platform", dplPlatform.SelectedValue));
}
PaymentLog[] ps = PaymentLog.FindAll(
PaymentLog.Desc("ID"),
(ICriterion[])exps.ToArray(typeof(ICriterion))
);
grdPaymentLog.DataSource = ps;
grdPaymentLog.DataBind();
}
protected void grdPaymentLog_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
grdPaymentLog.PageIndex = e.NewPageIndex;
BindData();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -