コード例 #1
0
ファイル: DAL.cs プロジェクト: ChrisRunn/ERP-Integration-WS
        public List<SysObject> GetAllKeys()
        {
            string sqlStr = "select top 100 [id], [xtype], [name] from sysobjects where xtype = 'F' or xtype = 'PK'";
            DataTable dt = ExecuteQuery(sqlStr);
            List<SysObject> sysObjectList = new List<SysObject>();

            foreach (DataRow dataRow in dt.Rows)
            {
                SysObject pb = new SysObject();
                pb.Id = dataRow["id"].ToString();
                pb.Xtype = dataRow["xtype"].ToString();
                pb.Name = dataRow["name"].ToString();
                sysObjectList.Add(pb);
            }
            return sysObjectList;
        }
コード例 #2
0
ファイル: DAL.cs プロジェクト: ChrisRunn/ERP-Integration-WS
        public List<SysObject> GetAllTables()
        {
            string sqlStr = "select top 100 [name] from sysobjects where xtype = 'U'";
            DataTable dt = ExecuteQuery(sqlStr);
            List<SysObject> sysTableList = new List<SysObject>();

            foreach (DataRow dataRow in dt.Rows)
            {
                SysObject pb = new SysObject();
                pb.Name = dataRow["name"].ToString();
                sysTableList.Add(pb);
            }
            return sysTableList;
        }
コード例 #3
0
ファイル: DAL.cs プロジェクト: ChrisRunn/ERP-Integration-WS
        public List<SysObject> GetEmployeeAndMetaData()
        {
            string sqlStr = "select s.name, s.id, s.xtype from dbo.sysobjects s where name like 'CRONUS Sverige AB$Employee%' and xtype = 'U'";
            DataTable dt = ExecuteQuery(sqlStr);
            List<SysObject> employeeAbsenceList = new List<SysObject>();

            foreach (DataRow dataRow in dt.Rows)
            {
                SysObject pb = new SysObject();
                pb.Name = dataRow["name"].ToString();
                pb.Id = dataRow["id"].ToString();
                pb.Xtype = dataRow["xtype"].ToString();
                employeeAbsenceList.Add(pb);
            }
            return employeeAbsenceList;
        }