paymentlog.ascx.cs

来自「如果不使用IIS,请先运行 XSP.exe,待提示已侦听 8080端口后」· CS 代码 · 共 78 行

CS
78
字号
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 + =
减小字号Ctrl + -
显示快捷键?