1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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;
            }
        }
    }
}