public void Add(PsCategoryProduct Obj) { MySqlConnection Connection = new MySqlConnection(Properties.Settings.Default.PRESTASHOPConnectionString); Connection.Open(); MySqlCommand Command = Connection.CreateCommand(); Command.CommandText = "insert into ps_category_product (id_category, id_product, position) values (" + Obj.IDCategory + ", " + Obj.IDProduct + ", " + Obj.Position + ")"; Command.ExecuteNonQuery(); Connection.Close(); }
public void Delete(PsCategoryProduct Obj) { this.DBPrestashop.PsCategoryProduct.DeleteOnSubmit(Obj); this.Save(); }