예제 #1
0
        public Discovery_result discovery_data(string asset)
        {
            var result = new Discovery_result();



            String cmdText = "SELECT * from discovery where ictag = '" + asset + "'";

            using (MySqlCommand cmd = new MySqlCommand(cmdText, conn))
            {
                conn.Open();
                MySqlDataReader reader = cmd.ExecuteReader(); //execure the reader
                while (reader.Read())
                {
                    result.search_cpu           = (reader["cpu"].ToString());
                    result.search_hdd           = (long.Parse(reader["hdd"].ToString()));
                    result.search_manu          = (reader["brand"].ToString());
                    result.search_ram           = (long.Parse(reader["ram"].ToString()));
                    result.search_model         = (reader["model"].ToString());
                    result.search_serial        = (reader["serial"].ToString());
                    result.search_optical_drive = (reader["optical_drive"].ToString());
                }
                conn.Close();
            }
            return(result);
        }
예제 #2
0
        public discovery_result(string asset)
        {
            // Discovery_result = new Discovery_result();

            Discovery_result = mysql_data.discovery_data(asset);
        }
예제 #3
0
        public Discovery_result discovery_data(string asset)
        {
            Discovery_result result = new Discovery_result();

            return(result);
        }