|
/**
|
* OA_DriverRecordBLL.cs
|
*
|
* 功 能: 合作客户业务逻辑类
|
* 类 名: OA_DriverRecordBLL
|
*
|
* Ver 变更日期 负责人 变更内容
|
* ───────────────────────────────────
|
* V0.01 2013-4-2 15:11 吴辉 初版
|
* V0.02 2013-5-29 17:43 吴崎均 增加转换在线会员为厂商客户方法
|
*
|
*
|
*
|
*
|
*
|
*
|
*/
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using CY.IDAL;
|
using CY.Model;
|
using AbstractFactory;
|
using CY.IBaseDAL;
|
using CY.Infrastructure.DESEncrypt;
|
using CY.Infrastructure.Query;
|
|
namespace CY.BLL
|
{
|
public class OA_DriverRecordBLL
|
{
|
IOA_DriverRecordDAL _IOA_DriverRecordDAL = null;
|
|
/// <summary>
|
/// 初始化构造
|
/// </summary>
|
public OA_DriverRecordBLL()
|
{
|
//获取OA_DriverRecord DAL实现
|
_IOA_DriverRecordDAL = Factory.GetDALByInterfaceName(DALInterface.IOA_DriverRecordDAL) as IOA_DriverRecordDAL;
|
|
|
}
|
|
|
/// <summary>
|
/// 获取全部合作客户
|
/// </summary>
|
/// <param name="Keyid">主键id</param>
|
/// <returns></returns>
|
public IEnumerable<OA_DriverRecord> GetModelList()
|
{
|
Query query = new Query();
|
return _IOA_DriverRecordDAL.SelectAllModel(query);
|
}
|
|
|
|
|
/// <summary>
|
/// 获取全部合作客户
|
/// </summary>
|
/// <param name="Keyid">主键id</param>
|
/// <returns></returns>
|
public OA_DriverRecord GetModelByKeyid(Guid keyid)
|
{
|
|
return _IOA_DriverRecordDAL.GetModelByKeyid(keyid);
|
}
|
|
|
/// <summary>
|
/// 查询合作客户分页列表
|
/// </summary>
|
/// <param name="pa"></param>
|
/// <returns></returns>
|
public IEnumerable<OA_DriverRecord> SelectModelPage(Pagination pa, string CreatTimeStart, string CreatTimeEnd,
|
string CarID, string CreaterName,string ClockType)
|
{
|
string Condition = " ";
|
string sort = " CreatTime desc ";
|
|
|
if (!string.IsNullOrEmpty(CreatTimeStart))
|
{
|
Condition += " and DATEDIFF(day,'" + CreatTimeStart + "',od.[CreatTime]) >= 0 ";
|
|
}
|
|
if (!string.IsNullOrEmpty(CreatTimeEnd))
|
{
|
Condition += " and DATEDIFF(day,'" + CreatTimeEnd + "',od.[CreatTime]) <= 0 ";
|
|
}
|
|
|
if (!string.IsNullOrEmpty(CarID))
|
Condition += " and od.CarID = " + CarID + "";
|
if (!string.IsNullOrEmpty(ClockType))
|
Condition += " and od.ClockType = " + ClockType + "";
|
|
|
if (!string.IsNullOrEmpty(CreaterName))
|
Condition += " and od.Creater like '%" + CreaterName + "%'";
|
|
|
Query query = new Query();
|
IList<Criterion> criterias = new List<Criterion>()
|
{
|
new Criterion("", Condition),
|
|
new Criterion("orderBy",sort)
|
};
|
query.Criteria = criterias;
|
return _IOA_DriverRecordDAL.SelectModelPage(query, pa);
|
}
|
|
|
|
}
|
}
|