📄 paymentlog.cs
字号:
namespace PowerEasy.Accessories
{
using PowerEasy.Common;
using PowerEasy.Components;
using PowerEasy.IDal.Accessories;
using PowerEasy.Model.Accessories;
using System;
using System.Collections.Generic;
public sealed class PaymentLog
{
private static readonly IPaymentLog dal = DataAccess.CreatePaymentLog();
private PaymentLog()
{
}
public static bool Add(PaymentLogInfo paymentLogInfo)
{
paymentLogInfo.UserName = DataSecurity.HtmlEncode(paymentLogInfo.UserName);
paymentLogInfo.PlatformInfo = DataSecurity.HtmlEncode(paymentLogInfo.PlatformInfo);
paymentLogInfo.Remark = DataSecurity.HtmlEncode(paymentLogInfo.Remark);
return dal.Add(paymentLogInfo);
}
public static bool Delete(DateTime tempDate)
{
return dal.Delete(tempDate);
}
public static bool Delete(string paymentLogId)
{
return dal.Delete(paymentLogId);
}
public static PaymentLogInfo GetInfoByPaymentNum(string paymentNum)
{
return dal.GetInfoByPaymentNum(paymentNum);
}
public static IList<PaymentLogInfo> GetList(int startRowIndexId, int maxNumberRows, string searchType, string field, string keyword)
{
string str = searchType;
if (str != null)
{
if (!(str == "6"))
{
if (str == "10")
{
if (field == "PayTime")
{
keyword = DataConverter.CDate(keyword).ToString();
}
else
{
keyword = DataSecurity.FilterBadChar(keyword);
}
}
}
else if (string.IsNullOrEmpty(field))
{
return new List<PaymentLogInfo>();
}
}
return dal.GetList(startRowIndexId, maxNumberRows, searchType, field, keyword);
}
public static IList<PaymentLogInfo> GetListByUserName(int startRowIndexId, int maxNumberRows, string userName)
{
return dal.GetListByUserName(startRowIndexId, maxNumberRows, DataSecurity.FilterBadChar(userName));
}
public static PaymentLogInfo GetPaymentLogById(int paymentLogId)
{
return dal.GetPaymentLogById(paymentLogId);
}
public static string GetPaymentNum()
{
return (SiteConfig.ShopConfig.PrefixPaymentNum + DateTime.Now.ToString("yyyyMMddHHmmss"));
}
public static string GetStatusDepict(int platformId, int status)
{
string str = string.Empty;
if (platformId != 8)
{
switch (status)
{
case 1:
return "未提交";
case 2:
return "已经提交,但未成功";
case 3:
return "支付成功";
}
return str;
}
switch (status)
{
case 1:
return "等待买家付款";
case 2:
return "买家已付款,等待卖家发货";
case 3:
return "交易成功";
case 4:
return "卖家已发货,等待买家确认收货";
}
return str;
}
public static int GetTotalOfPaymentLog(string searchType, string field, string keyword)
{
string.IsNullOrEmpty(searchType + keyword + field);
return dal.GetTotalOfPaymentLog();
}
public static int GetTotalOfPaymentLogByUserName(string userName)
{
return dal.GetTotalOfPaymentLog();
}
public static bool Update(PaymentLogInfo info)
{
info.Remark = DataSecurity.HtmlEncode(info.Remark);
info.UserName = DataSecurity.HtmlEncode(info.UserName);
return dal.Update(info);
}
public static int Update(int paymentLogId)
{
return dal.Update(paymentLogId);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -