Ejemplo n.º 1
0
        public List<string> GetColumns(string tableName)
        {
            SNC_GetTableInfo.ServiceNowSoapClient snc = new SNC_GetTableInfo.ServiceNowSoapClient();
            var result = snc.execute(new SNC_GetTableInfo.execute { TableName = tableName });
            var serializer = new JavaScriptSerializer();
            var columns = serializer.Deserialize<List<string>>(result.Result);

            List<string> columnList = new List<string>();
            foreach (var column in columns)
                columnList.Add(column);
            return columnList;
        }
Ejemplo n.º 2
0
        public List<Table> GetTables()
        {
            SNC_GetTableInfo.ServiceNowSoapClient snc = new SNC_GetTableInfo.ServiceNowSoapClient();
            var result = snc.execute(new SNC_GetTableInfo.execute());
            var serializer = new JavaScriptSerializer();
            var tables = serializer.Deserialize<List<string>>(result.Result);

            List<Table> tableList = new List<Table>();
            foreach (var table in tables)
                tableList.Add(new Table { name = table });
            return tableList;
        }