Files
T-DAS/Epost.BLL/StoreBLL.cs

76 lines
1.8 KiB
C#
Raw Normal View History

2023-01-13 15:30:20 +08:00
using Epost.DAL;
using Epost.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Epost.BLL
{
public class StoreBLL
{
StoreDAL dal = new StoreDAL();
#region
/// <summary>
/// 分页获取数据列表
/// </summary>
public List<Model.StoreModel> GetStoreListByPageByMySql(string strWhere, string orderby, int pageSize, int pageIndex, out int recordCount)
{
int startIndex = 0;
int endIndex = 0;
if (pageIndex <= 0)
pageIndex = 1;
//计算查询的开始行数与结束行数
startIndex = (pageIndex - 1) * pageSize;
endIndex = pageSize;
return dal.GetStoreListByPageByMySql(strWhere, orderby, startIndex, endIndex, out recordCount);
}
#endregion
#region
public bool ImportStore(List<StoreModel> list)
{
if (list.Any())
{
foreach (StoreModel model in list)
{
bool dt = dal.AddStore(model);
}
}
return true;
}
#endregion
#region
public bool ImportStore(DataTable ds,Dictionary<string,string> diclist)
{
if (ds!= null && ds.Rows.Count > 0)
{
dal.AddStore(ds, diclist);
}
return true;
}
#endregion
#region
public bool deleteStore()
{
return dal.deleteStore();
}
#endregion
}
}