Esempio n. 1
0
        public void InsertHomeData(Home Obj)
        {
            string Query = "INSERT INTO home (dev_id, owner_id, home_feature_id, type) VALUES ('" + Obj.dev_id + "', '" + Obj.owner_id + "', '" + Obj.home_feature_id + "', '" + Obj.type + "')";
            string ConnectionString = ConfigurationManager.ConnectionStrings["TimeShareConnection"].ConnectionString;
            MySqlConnection Connection = new MySqlConnection(ConnectionString);
            MySqlCommand Command = new MySqlCommand(Query, Connection);
            Connection.Open();

            Command.ExecuteNonQuery();
        }
Esempio n. 2
0
        public MySqlDataReader ReturnHomeInfoByFeatureId(Home Obj)
        {
            string Query = "SELECT * FROM home WHERE home_feature_id = '" + Obj.home_feature_id + "' ";
            string ConnectionString = ConfigurationManager.ConnectionStrings["TimeShareConnection"].ConnectionString;
            MySqlConnection Connection = new MySqlConnection(ConnectionString);
            MySqlCommand Command = new MySqlCommand(Query, Connection);
            Connection.Open();

            MySqlDataReader Reader = Command.ExecuteReader();

            return Reader;
        }