using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using CY.IDAL.Inquiry;
|
using CY.Model;
|
|
namespace CY.SQLDAL
|
{
|
public class MultipleTypeInfoDAL : IMultipleTypeInfoDAL
|
{
|
Database _dataBase = null;
|
|
public MultipleTypeInfoDAL()
|
{
|
_dataBase = new Database();
|
}
|
|
public IList<SysInquiry_MultipleTypeInfo> GetModelList(int parentId)
|
{
|
string condition = string.Empty;
|
condition = " ParentId=" + parentId + " and Status='true'";
|
IList<SysInquiry_MultipleTypeInfo> result = _dataBase.SelectModel<SysInquiry_MultipleTypeInfo>(" KeyId,TypeNmae ", "SysInquiry_MultipleTypeInfo", condition);
|
return result;
|
}
|
|
|
public SysInquiry_MultipleTypeInfo GetModel(int keyId)
|
{
|
string condition = string.Empty;
|
condition = " keyId=" + keyId + " ";
|
IList<SysInquiry_MultipleTypeInfo> result = _dataBase.SelectModel<SysInquiry_MultipleTypeInfo>(" KeyId,TypeNmae ", "SysInquiry_MultipleTypeInfo", condition);
|
if (result != null && result.Count > 0)
|
{
|
return result[0];
|
}
|
else
|
{
|
return null;
|
}
|
}
|
}
|
}
|