public static void deleteBarServiceUI(int id) { // make a new variable of type SomerenModel.BarService in order to store data to it SomerenModel.BarService newBarService = new SomerenModel.BarService(); // store data to the newBarSrvice variable newBarService.setDrinkId(id); // passing data to the DB layer SomerenDB.DB_deleteBarService(newBarService); }