//Word aangeroepen wanneer er op Create x event word gedrukt en roept de juiste view aan.
        public ActionResult Create(string Eventsoort)
        {
            if (Eventsoort == "Dance")
            {
                Evenement d = new Dance();

                return(View(("~/Views/CMS/Dance/Create.cshtml"), d));
            }
            else if (Eventsoort == "Jazz")
            {
                Evenement j = new Jazz();
                return(View(("~/Views/CMS/Jazz/Create.cshtml"), j));
            }
            else if (Eventsoort == "History")
            {
                Evenement h = new History();
                return(View(("~/Views/CMS/Historic/Create.cshtml"), h));
            }
            else if (Eventsoort == "Food")
            {
                Evenement f = new Food();
                return(View(("~/Views/CMS/Food/Create.cshtml"), f));
            }


            return(View("~/Views/CMS/Index.cshtml"));
        }
Example #2
0
        public ActionResult Book(string dateString)
        {
            DateTime date;
            bool parseSuccesful = DateTime.TryParse(dateString, out date);

            if(!parseSuccesful)
            {
                return RedirectToAction("Index");
            }

            //gets all jazz tickets for an event
            List<Jazz> JazzActs = repo.GetJazzActsByDay(date);
            Jazz passePartoutWeekend = repo.GetPassePartoutWeekend();
            Jazz passePartoutDay = repo.GetPassePartoutDay(date);

            //converts jazz's into displayrecords
            OrderItem weekend = new OrderItem(passePartoutWeekend);
            OrderItem day = new OrderItem(passePartoutDay);
            List<OrderItem> events = new List<OrderItem>();

            foreach (Jazz jazz in JazzActs)
            {
                OrderItem oi = new OrderItem(jazz);
                events.Add(oi);
            }

            JazzBook jazzBook = new JazzBook(day, weekend, events);

            //string hall = ((Jazz)dr.Event).Hall;
            return View(jazzBook);
        }
        public void T21_Jazz()
        {
            JazzConnectionParams jcp = new JazzConnectionParams();
            Jazz jazz = new Jazz(jcp.Repository, RuS.Jazz.Jazz.repositoryType.ccm, jcp.User, jcp.PW);

            Assert.That(jazz.ProjectAreasURL.Equals(jcp.Repository + "/ccm/process/project-areas"));
        }
Example #4
0
        /// <summary>
        /// deze jokes moeten in een busineeslayer genaamd EventBusinesslayer maybe die hierboven ook
        /// Deze jokes doorzetten gaat veel tijd kosten om te fixen dus w8 op input van iemand anders hierover
        /// </summary>
        /// <returns></returns>
        ///
        public Jazz NewJazz(Jazz e, int id)
        {
            var eventToUpdate = EventDB.Events.Find(id);

            TryUpdateModel(eventToUpdate, "", new string[] { "EventStart,EventEnd,Location,Seats,Artist,Hall,TicketsSold" });
            return(e);
        }
Example #5
0
File: Hero.cs Project: flpqsv/Test
            public Transformer ChooseHero()
            {
                Console.WriteLine("Please choose transformer: Optimus Prime (1), Jazz (2), Bumblebee (3).");
                var         useruserInput = Console.ReadLine();
                Transformer transformer;

                switch (useruserInput)
                {
                case "1": transformer = new OptimusPrime(ChooseWeapon(), ChooseScanner()); break;

                case "2": transformer = new Jazz(ChooseWeapon(), ChooseScanner()); break;

                case "3": transformer = new Bumblebee(ChooseWeapon(), ChooseScanner()); break;

                default: throw new ArgumentException();
                }

                if (transformer.CheckIfAlive())
                {
                    return(transformer);
                }
                else
                {
                    throw new ArgumentException("This transformer cannot fight, he's already dead!");
                }
            }
Example #6
0
        public ActionResult DeleteConfirmed(int id)
        {
            Jazz jazz = db.Jazz.Find(id);

            db.Events.Remove(jazz);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        public void T23_Jazz()
        {
            JazzConnectionParams jcp = new JazzConnectionParams();
            Jazz            jazz     = new Jazz(jcp.Repository, RuS.Jazz.Jazz.repositoryType.ccm, jcp.User, jcp.PW);
            JazzProjectArea pa       = jazz.GetJazzProjectAreaByName("xxx");

            Assert.IsNull(pa);
        }
Example #8
0
 public void Remove(Jazz e)
 {
     using (HFContext context = new HFContext())
     {
         context.Events.Remove(e);
         context.SaveChanges();
     }
 }
Example #9
0
 public void UpdateJazz(Jazz e)
 {
     using (HFContext context = new HFContext())
     {
         context.Entry(e).State = EntityState.Modified;
         context.SaveChanges();
     }
 }
Example #10
0
 public void CreateJazz(Jazz e)
 {
     using (HFContext context = new HFContext())
     {
         context.Events.Add(e);
         context.SaveChanges();
     }
 }
        public ActionResult CreateActivity(int i = 0)
        {
            DateTime startTime = new DateTime();
            DateTime endTime   = new DateTime();

            string  name        = Request.Form[1];
            string  description = Request.Form[2];
            int     capacity    = int.Parse(Request.Form[3]);
            decimal price       = decimal.Parse(Request.Form[4]);

            if (DateTime.TryParse(Request.Form[5].ToString(), out DateTime resultStartTime))
            {
                startTime = resultStartTime;
            }
            if (DateTime.TryParse(Request.Form[6].ToString(), out DateTime resultEndTime))
            {
                endTime = resultEndTime;
            }
            int subjectId = int.Parse(Request.Form[7]);

            switch (subjectId)
            {
            //Jazz
            case 5:
                Jazz jazz = new Jazz {
                    Name = name, Description = description, Capacity = capacity, Price = price, StartTime = startTime, EndTime = endTime, LocationId = 21, SubjectId = subjectId
                };
                activityRepo.Insert(jazz);
                break;

            //Talking
            case 6:
                Talking talking = new Talking {
                    Name = name, Description = description, Capacity = capacity, Price = price, StartTime = startTime, EndTime = endTime, LocationId = 22, SubjectId = subjectId
                };
                activityRepo.Insert(talking);
                break;

            //Historic
            case 7:

                Walking walking = new Walking {
                    Name = name, Description = description, Capacity = capacity, Price = price, StartTime = startTime, EndTime = endTime, LocationId = 23, SubjectId = subjectId
                };
                activityRepo.Insert(walking);
                break;

            //Dining
            case 8:
                Dining dining = new Dining {
                    Name = name, Description = description, Capacity = capacity, Price = price, StartTime = startTime, EndTime = endTime, LocationId = 23, SubjectId = subjectId
                };
                activityRepo.Insert(dining);
                break;
            }

            return(RedirectToAction("ActivityDetails"));
        }
        //[ExpectedException(typeof(RuS.Jazz.AuthenticationException))]
        public void T22_Jazz()
        {
            JazzConnectionParams jcp = new JazzConnectionParams();
            Jazz jazz = new Jazz(jcp.Repository, RuS.Jazz.Jazz.repositoryType.ccm, jcp.User, jcp.PW + "x");

            //JazzProjectArea pa = jazz.GetJazzProjectAreaByName("xxx");
            Assert.That(() => jazz.GetJazzProjectAreaByName("xxx"),
                        Throws.TypeOf <RuS.Jazz.AuthenticationException>());
        }
Example #13
0
        public ActionResult AddPhotoJazz(int id)
        {
            Jazz retrieved = jazzRepo.GetJazzByID(id);

            if (retrieved == null)
            {
                return(RedirectToAction("NotFound"));
            }
            return(View(retrieved));
        }
Example #14
0
 public ActionResult Edit([Bind(Include = "EventId,EventDateTime,Location,Price,Seats,TicketsSold,Artist,Hall")] Jazz jazz)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jazz).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(jazz));
 }
 public ActionResult Edit([Bind(Include = "EvenementID,Locatie,BeginTijd,EindTijd,TicketsTotaal,TicketsVerkocht,Stage,Artiest")] Jazz jazz)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jazz).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(jazz));
 }
Example #16
0
        public ActionResult Create([Bind(Include = "EventId,EventDateTime,Location,Price,Seats,TicketsSold,Artist,Hall")] Jazz jazz)
        {
            if (ModelState.IsValid)
            {
                db.Events.Add(jazz);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(jazz));
        }
        public ActionResult Create([Bind(Include = "EvenementID,Locatie,BeginTijd,EindTijd,TicketsTotaal,TicketsVerkocht,EvenementPrijs,Stage,Artiest")] Jazz jazz)
        {
            if (ModelState.IsValid)
            {
                db.Evenements.Add(jazz);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(jazz));
        }
Example #18
0
 public ActionResult Edit([Bind(Include = "EventId,EventStart,EventEnd,Location,Seats,TicketsSold,Hall,PerformerId")] Jazz jazz)
 {
     if (ModelState.IsValid)
     {
         db.Entry(jazz).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.PerformerId = new SelectList(db.Performer, "PerformerId", "PerformerName", jazz.PerformerId);
     return(View(jazz));
 }
Example #19
0
        static void Main(string[] args)
        {
            Console.WriteLine("Nama\t: Naima Zulfa");
            Console.WriteLine("NIM\t: 19.11.2735");
            Console.WriteLine("Kelas\t: 19 IF 03");

            Console.WriteLine();
            Console.WriteLine("++++ Negara ++++");
            Console.WriteLine();

            Negara negara;

            negara = new Indonesia();
            negara.nmanegara();
            negara.nmaik();
            negara.populasi();

            Console.WriteLine();
            negara = new Rusia();
            negara.nmanegara();
            negara.nmaik();
            negara.populasi();

            Console.WriteLine();
            negara = new Jepang();
            negara.nmanegara();
            negara.nmaik();
            negara.populasi();



            Console.WriteLine();
            Console.WriteLine("++++ Music Genre ++++");
            Console.WriteLine();

            IGenre genre;

            genre = new Pop();
            genre.jenis();
            genre.info();

            Console.WriteLine();
            genre = new Jazz();
            genre.jenis();
            genre.info();

            Console.WriteLine();
            genre = new Hiphop();
            genre.jenis();
            genre.info();

            Console.ReadKey();
        }
Example #20
0
        //Returns the passe-partout for a single day
        public Jazz GetPassePartoutDay(DateTime date)
        {
            IEnumerable <Jazz> Jazzs;

            using (HFContext context = new HFContext())
            {
                Jazzs = context.Jazzs.Where(j => j.Name.Contains("passe-partout"));

                Jazz jazz = Jazzs.SingleOrDefault(j => j.Date == date && !j.Name.Contains("Passe-Partout for all Jazz Events"));

                return(jazz);
            }
        }
Example #21
0
 public ActionResult CreateEvent(Jazz e, string BtnSubmit)
 {
     switch (BtnSubmit)
     {
     case "Save Event":
         EventDB.Jazz.Add(e);
         EventDB.SaveChanges();
         return(View("Index"));
     }
     return(View("CreateEvent"));
     ///SaveEvent(e);
     ////return RedirectToAction("Index"); ;
 }
Example #22
0
        private Ticket CreateTicketFromJazzActivity(Jazz jazz, int Amount)
        {
            Ticket ticket = new Ticket();

            ticket.Id         = shoppingCart.GetNewId();
            ticket.ActivityId = jazz.Id;
            ticket.Activity   = activityRepository.GetById(jazz.Id);
            ticket.Price      = jazz.Price;
            ticket.Amount     = Amount;
            ticket.SoldAt     = DateTime.Now;

            return(ticket);
        }
Example #23
0
 public ActionResult DeleteJazz(int id, FormCollection fcNotUsed)
 {
     try
     {
         Jazz e = jazzRepo.GetJazzByID(id);
         jazzRepo.Remove(e);
     }
     catch (DataException /* dex */)
     {
         //Log the error (uncomment dex variable name and add a line here to write a log.
         return(RedirectToAction("Delete", new { id = id, saveChangesError = true }));
     }
     return(RedirectToAction("JazzList"));
 }
Example #24
0
        // GET: Jazz/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Jazz jazz = db.Jazz.Find(id);

            if (jazz == null)
            {
                return(HttpNotFound());
            }
            return(View(jazz));
        }
Example #25
0
        public ActionResult AddPhotoJazz(int id, HttpPostedFileBase file)
        {
            //Sla de image op in de folder locatie
            var path = Path.Combine(Server.MapPath("~/IMG/Jazz"), file.FileName);

            file.SaveAs(path);
            //Sla de image string op in de database
            Jazz retrieved = jazzRepo.GetJazzByID(id);

            retrieved.IMGString = path;
            jazzRepo.UpdateJazz(retrieved);

            return(RedirectToAction("JazzList"));
        }
        public void T26_Jazz()
        {
            JazzConnectionParams jcp = new JazzConnectionParams();
            Jazz            jazz     = new Jazz(jcp.Repository, RuS.Jazz.Jazz.repositoryType.ccm, jcp.User, jcp.PW);
            JazzProjectArea pa       = jazz.GetJazzProjectAreaByName("PLM-helmerichs_play");

            Assert.IsNotNull(pa);
            JazzTeamArea s_ta = pa.GetJazzTeamAreaByName("Helmerichs Team 1");

            Assert.IsNotNull(s_ta);
            JazzTeamArea t_ta = pa.GetJazzTeamAreaByName("RolTeam 2 Subteam 1");

            Assert.IsNotNull(t_ta);
        }
        public void T25_Jazz()
        {
            JazzConnectionParams jcp = new JazzConnectionParams();
            Jazz            jazz     = new Jazz(jcp.Repository, RuS.Jazz.Jazz.repositoryType.ccm, jcp.User, jcp.PW);
            JazzProjectArea pa       = jazz.GetJazzProjectAreaByName("PLM-helmerichs_play");

            Assert.IsNotNull(pa);
            foreach (JazzTeamArea ta in pa.JazzTeamAreas())
            {
                JazzTeamArea ta2 = pa.GetJazzTeamAreaByName(ta.Name);
                Assert.IsNotNull(ta2);
                Assert.That(ta.Name == ta2.Name);
            }
        }
Example #28
0
        // GET: Jazz/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            Jazz jazz = db.Jazz.Find(id);

            if (jazz == null)
            {
                return(HttpNotFound());
            }
            ViewBag.PerformerId = new SelectList(db.Performer, "PerformerId", "PerformerName", jazz.PerformerId);
            return(View(jazz));
        }
Example #29
0
        public ActionResult SaveJazz([Bind(Include = "Location,Seats,Hall")] Jazz e, [Bind(Include = "PerformerName")] Performer p, DateTime Date, DateTime EventStart, DateTime EventEnd)
        {
            //ok aangezien de datetime niet aangepast kan worden met e.Eventstart.Date moet er eerst een hele datetime gemaakt worden
            DateTime jazzTimeStart = new DateTime(Date.Year, Date.Month, Date.Day, EventStart.Hour, EventStart.Minute, EventStart.Second);
            DateTime jazzTimeEnd   = new DateTime(Date.Year, Date.Month, Date.Day, EventEnd.Hour, EventEnd.Minute, EventEnd.Second);

            e.EventStart = jazzTimeStart;
            e.EventEnd   = jazzTimeEnd;
            EventDB.Jazz.Add(e);
            EventDB.Performer.Add(p);
            EventDB.SaveChanges();
            ManagementViewModel viewModel = PopulateViewModel();

            return(View("index", viewModel));
        }
        public void T24_Jazz()
        {
            JazzConnectionParams jcp = new JazzConnectionParams();
            Jazz jazz = new Jazz(jcp.Repository, RuS.Jazz.Jazz.repositoryType.ccm, jcp.User, jcp.PW);
            int  i    = 0;

            foreach (JazzProjectArea p_a in jazz.JazzProjectAreas())
            {
                i++;
            }
            Assert.That(i > 1);
            JazzProjectArea pa = jazz.GetJazzProjectAreaByName("PLM-helmerichs_play");

            Assert.IsNotNull(pa);
        }
 public void onJazz(Jazz song)
 {
     this.jazzSongs.Add(song);
 }