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;
using System.Data;
namespace CY.BLL
{
///
/// 资讯分类的业务逻辑类
///
public class Info_SortBLL
{
IInfo_SortDAL _IInfo_SortDal = null;
///
/// 初始化构造
///
public Info_SortBLL()
{
//获取Info_Sort DAL实现
_IInfo_SortDal = Factory.GetDALByInterfaceName(DALInterface.IInfo_SortDAL) as IInfo_SortDAL;
}
///
/// 新增分类
///
///
///
///
///
public bool InsertModel(CY.Model.Info_Sort m_Info_Sort)
{
try
{
return _IInfo_SortDal.InserModel(m_Info_Sort);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 修改分类
///
///
///
public bool UpdateModel(CY.Model.Info_Sort m_Info_Sort)
{
try
{
return _IInfo_SortDal.UpdateModel(m_Info_Sort);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 删除分类
///
///
///
public bool DeleteModel(CY.Model.Info_Sort rType)
{
try
{
_IInfo_SortDal.DeleteModel(rType);
}
catch (Exception ex)
{
throw ex;
}
return true;
}
///
/// 删除分类及分类下信息
///
///
///
public bool DeleteModelAll(int? Keyid)
{
try
{
return _IInfo_SortDal.DeleteModelAll(Keyid);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 根据上级编号查询全部分类
///
/// 编号
///
public IEnumerable SelectListByParentId(int? ParentId)
{
try
{
return _IInfo_SortDal.SelectListByParentId(ParentId);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 根据编号查询单个信息
///
/// 编号
///
public Info_Sort SelectModelByKeyId(int? KeyId)
{
try
{
return _IInfo_SortDal.SelectModelByKeyId(KeyId);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 查询全部分类
///
///
public DataTable SelectList(Guid FirmId)
{
try
{
return _IInfo_SortDal.SelectList(FirmId);
}
catch (Exception ex)
{
throw ex;
}
}
}
}