コード例 #1
0
    /// <summary>
    /// 加载数据
    /// </summary>
    void LoadDataForm()
    {
        Int32  Result = ErrorDefinition.CIP_IError_Result_UnknowError_Code;
        String ErrMsg = ErrorDefinition.CIP_IError_Result_UnknowError_Msg;

        this.LiteralBusiness.Text = "无记录";
        this.LiteralRecharge.Text = "无记录";
        this.LiteralRefund.Text   = "无记录";

        try
        {
            DateTime        startDate = Convert.ToDateTime(this.hdStartDate.Value);
            DateTime        endDate = Convert.ToDateTime(this.hdEndDate.Value);
            IList <TxnItem> txnList_business, txnList_recharge, txnList_refund;

            //调用接口查询
            Result = BesttoneAccountHelper.QueryBusinessTxnHistory(startDate, endDate, "18918790558", 10, 0, out txnList_business, out ErrMsg);

            Result = BesttoneAccountHelper.QueryRechargeTxnHistory(startDate, endDate, "18918790558", 10, 0, out txnList_recharge, out ErrMsg);

            Result = BesttoneAccountHelper.QueryRefundTxnHistory(startDate, endDate, "18918790558", 10, 0, out txnList_refund, out ErrMsg);

            //生成表单

            this.LiteralBusiness.Text = TxnFormUtility.CreateForm_Business(txnList_business);
            this.LiteralRecharge.Text = TxnFormUtility.CreateForm_Recharge(txnList_recharge);
            this.LiteralRefund.Text   = TxnFormUtility.CreateForm_Refund(txnList_refund);
        }
        catch { }
    }
コード例 #2
0
    /// <summary>
    /// 暂时不用
    /// </summary>
    protected List <TxnItem> QueryHistoryDetails(DateTime startDate, DateTime endDate)
    {
        StringBuilder returnMsg = new StringBuilder();

        Int32  Result = ErrorDefinition.CIP_IError_Result_UnknowError_Code;
        String ErrMsg = ErrorDefinition.CIP_IError_Result_UnknowError_Msg;

        //历史交易记录只查询近2年的数据,所以从去年的1月1日到距离现在三个月前的那一天
        String bestPayAccount = Request["BestPayAccount"];

        List <TxnItem>  list = new List <TxnItem>();
        IList <TxnItem> txnList_business, txnList_recharge, txnList_refund;

        //历史消费记录
        Result = BesttoneAccountHelper.QueryBusinessTxnHistory(startDate, endDate, bestPayAccount, 0, 0, out txnList_business, out ErrMsg);
        //历史充值记录
        Result = BesttoneAccountHelper.QueryRechargeTxnHistory(startDate, endDate, bestPayAccount, 0, 0, out txnList_recharge, out ErrMsg);
        //历史退款记录
        Result = BesttoneAccountHelper.QueryRefundTxnHistory(startDate, endDate, bestPayAccount, 0, 0, out txnList_refund, out ErrMsg);

        //历史交易记录
        if (txnList_business != null && txnList_business.Count > 0)
        {
            foreach (TxnItem item in txnList_business)
            {
                list.Add(item);
            }
        }

        if (txnList_recharge != null && txnList_recharge.Count > 0)
        {
            foreach (TxnItem item in txnList_recharge)
            {
                list.Add(item);
            }
        }

        if (txnList_refund != null && txnList_refund.Count > 0)
        {
            foreach (TxnItem item in txnList_refund)
            {
                list.Add(item);
            }
        }

        return(list);
    }