Exemple #1
0
        private SqlCommand buildCmd(ShowDTO show)
        {
            SqlCommand cmd = new SqlCommand();

            cmd.Parameters.AddWithValue("ID", show.getID());
            cmd.Parameters.AddWithValue("NrTickets", show.getNumberOfTickets());
            cmd.Parameters.AddWithValue("Genre", show.getGenre());
            cmd.Parameters.AddWithValue("Date", show.getDate().ToString());
            cmd.Parameters.AddWithValue("Distribution", show.getDistribution());
            cmd.Parameters.AddWithValue("Title", show.getTitle());
            return(cmd);
        }
Exemple #2
0
        public ShowModel map(ShowDTO showdto)
        {
            ShowModel model = new ShowModel();

            model.setID(showdto.getID());
            model.setGenre(showdto.getGenre());
            model.setDistribution(showdto.getDistribution());
            model.setDate(showdto.getDate());
            model.setNumberOfTickets(showdto.getNumberOfTickets());
            model.setTitle(showdto.getTitle());

            return(model);
        }