PageRenderTime 39ms CodeModel.GetById 38ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 0ms

/Las/Las.Dal/DaAssessStandard.cs

http://sgsoft-las.googlecode.com/
C# | 38 lines | 32 code | 6 blank | 0 comment | 1 complexity | cc09b17955c204d91a6e541e95a8da42 MD5 | raw file
Possible License(s): LGPL-2.1
 1using System;
 2using System.Collections;
 3using System.Collections.Generic;
 4using System.Collections.ObjectModel;
 5using System.Data;
 6using System.Globalization;
 7using System.Text;
 8using System.Data.Common;
 9using Microsoft.Practices.EnterpriseLibrary.Data;
10using Microsoft.Practices.EnterpriseLibrary.Data.Sql;
11
12using Las.Model; 
13
14namespace Las.Dal
15{
16    public partial class DaAssessStandard
17    {
18        const string SQL_GET_ASS_STD_SUB_GROUPS = "SELECT A,MIN(ASS_STD_ID) AS MINID,COUNT(A) AS ACNT FROM LA_ASSESS_STANDARD WHERE ASS_STD_GROUP_ID=@ASS_STD_GROUP_ID GROUP BY A ORDER BY MINID";
19
20        public List<string> GetAssStdSubGroups(string assStdGrpID_)
21        {
22            List<string> rc = new List<string>();
23            DbCommand cmd = db.GetSqlStringCommand(SQL_GET_ASS_STD_SUB_GROUPS);
24            db.AddInParameter(cmd, "ASS_STD_GROUP_ID", DbType.String, assStdGrpID_);
25            using (IDataReader reader = db.ExecuteReader(cmd))
26            {
27                while (reader.Read())
28                {
29                    rc.Add(reader.GetString(0));
30                }
31            }
32            return rc;
33
34        }
35
36        
37    }
38}