コード例 #1
0
ファイル: DI_DAO.cs プロジェクト: vutiendung/RS
        public List <DIMapping> getMappings(string QueryID)
        {
            string strSelect = "SELECT [MappingID],[DesColumnID],[SrcColumnName],[QueryID] FROM [DI].[RESULT_MAPPING] WHERE [QueryID] = @QueryID ";
            Dictionary <string, object> parameters = new Dictionary <string, object>();

            parameters.Add("@QueryID", QueryID);
            SqlDataReader dr = executeReader(strSelect, parameters);

            List <DIMapping> list = new List <DIMapping>();

            while (dr.Read())
            {
                DIMapping obj = new DIMapping();
                obj.MappingID     = dr.GetInt32(dr.GetOrdinal("MappingID"));
                obj.DesColumnID   = dr.GetString(dr.GetOrdinal("DesColumnID"));
                obj.SrcColumnName = dr.GetString(dr.GetOrdinal("SrcColumnName"));
                obj.QueryID       = dr.GetString(dr.GetOrdinal("QueryID"));
                list.Add(obj);
            }
            dr.Close();
            return(list);
        }
コード例 #2
0
ファイル: DI_DAO.cs プロジェクト: vutiendung/RS
        public List<DIMapping> getMappings(string QueryID)
        {
            string strSelect = "SELECT [MappingID],[DesColumnID],[SrcColumnName],[QueryID] FROM [DI].[RESULT_MAPPING] WHERE [QueryID] = @QueryID ";
            Dictionary<string, object> parameters = new Dictionary<string, object>();
            parameters.Add("@QueryID", QueryID);
            SqlDataReader dr = executeReader(strSelect, parameters);

            List<DIMapping> list = new List<DIMapping>();
            while (dr.Read())
            {
                DIMapping obj = new DIMapping();
                obj.MappingID = dr.GetInt32(dr.GetOrdinal("MappingID"));
                obj.DesColumnID = dr.GetString(dr.GetOrdinal("DesColumnID"));
                obj.SrcColumnName = dr.GetString(dr.GetOrdinal("SrcColumnName"));
                obj.QueryID = dr.GetString(dr.GetOrdinal("QueryID"));
                list.Add(obj);
            }
            dr.Close();
            return list;
        }