private void btnSave_Click(object sender, EventArgs e) { Evenement evenement = new Evenement { BeginDate = dtBegin.Value, Campingmap = txtCampingmap.Text, Description = txtDescription.Text, EndDate = dtEind.Value, Location = txtLocatie.Text, Name = txtNaam.Text, Logo = txtLogo.Text }; if (btnSave.Text == "Aanmaken") { DatabaseManager.InsertItem(evenement); } else { if (listEvents.SelectedItems.Count == 0) { MessageBox.Show("Selecteer het event die ge-update moet worden"); return; } evenement.ID = ((Evenement) listEvents.SelectedItems[0].Tag).ID; DatabaseManager.UpdateItem(evenement); } LoadEvents(); }
public frmSelectMaterial(Evenement e) { InitializeComponent(); DialogResult = DialogResult.Abort; evenement = e; loadMaterials(); }
private void LoadMaterials(Evenement e) { foreach (Material m in DatabaseManager.GetItems<Material>(e)) { e.AddMaterial(m); LoadItems(m); } }
public frmSelectMaterial(Evenement selectedEvenement, DateTime from, DateTime till) { InitializeComponent(); Evenement = selectedEvenement; this.from = from; this.till = till; DialogResult = DialogResult.Abort; LoadMaterials(); }
public frmToegangsControle(Evenement e) { InitializeComponent(); lblInfo.Text = INFO; timer = new System.Timers.Timer(2000); timer.Elapsed += OnTimer; timer.AutoReset = false; timer.Enabled = true; evenement = e; Start(); }
private void listEvent_SelectedIndexChanged(object sender, EventArgs e) { Clear(); if (listEvent.SelectedIndex == -1) return; selectedEvenement = evenementen[listEvent.SelectedIndex]; foreach (Material m in selectedEvenement.material) { int index = listMaterial.Items.Add(m.Product); materials.Add(index, m); } }
public static Boolean CheckIn(Evenement evenement) { if (!started) Start(); if (!tag.Equals(string.Empty)) { string t = tag; string sql = string.Format(SQL_GET_AMOUNT, string.Format(SQL_GET_INT, "Place", evenement.ID, t)); string qry = string.Format(SQL_GET_PAYMENT, string.Format(SQL_GET_INT, "ID", evenement.ID, t)); Hashtable price; Hashtable paid; try { price = DatabaseManager.QueryFirst(sql); paid = DatabaseManager.QueryFirst(qry); } catch (Exception e) { Console.WriteLine("Database Error:" + e.Message); MessageBox.Show("Tag bestaat niet bij dit event", "Onbekende tag", MessageBoxButtons.OK, MessageBoxIcon.Error); return true; } int nogTeBetalen; if (price == null) { MessageBox.Show("Er is iets fout gegaan probeer opnieuw", "Fout", MessageBoxButtons.OK, MessageBoxIcon.Error); return true; } if (paid == null) { if (price["Bedrag"].ToString().Equals("")) return true; nogTeBetalen = int.Parse(price["Bedrag"].ToString()); } else { if (price["Bedrag"].ToString().Equals("")) { return true; } if (paid["Betaald"].ToString().Equals("")) nogTeBetalen = int.Parse(price["Bedrag"].ToString()); else nogTeBetalen = int.Parse(price["Bedrag"].ToString()) - int.Parse(paid["Betaald"].ToString()); } frmPayscreen pay = new frmPayscreen(nogTeBetalen, t); DialogResult result =pay.ShowDialog(); if(result == DialogResult.OK || result == DialogResult.Cancel) return true; } return false; }
private void btnOk_Click(object sender, EventArgs e) { if (listEvent.SelectedIndex >= 0) { DialogResult = DialogResult.OK; evenement = evenementen[listEvent.SelectedIndex]; Close(); } else { MessageBox.Show("Selecteer een event", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public frmMain() { DatabaseManager.Initialize("sa", "Wachtwoord1", "127.0.0.1", "proftaak"); DatabaseManager.Open(); InitializeComponent(); while (evenement.ID == -1) { frmSelectEvent frmSelectEvent = new frmSelectEvent() { Location = Location, StartPosition = FormStartPosition.CenterParent }; if (frmSelectEvent.ShowDialog(this) == DialogResult.OK) { evenement = frmSelectEvent.evenement; } else { MessageBox.Show("Geen geldig evenement, begin opnieuw."); } } }
void GenerateAllEventForTheDay() { if (spawnsPointForEvent.Count != 0) { for (int i = 0; i < numberOfEvent; i++) { //Random event Evenement.EventType tmpEventType; //Random free Position GameObject tmpSpawn = null; while (tmpSpawn == null) { tmpSpawn = spawnsPointForEvent[Random.Range(0, spawnsPointForEvent.Count)]; } GameObject tmpMainObject = null; if (tmpSpawn.tag == "SpawnPointWater") { tmpEventType = Evenement.EventType.BOAT; tmpMainObject = Instantiate(prefabBoatEvent, tmpSpawn.transform.position, tmpSpawn.transform.rotation); } else if (tmpSpawn.tag == "SpawnPointHouse") { tmpEventType = Evenement.EventType.LOST_OBJECT; tmpMainObject = Instantiate(prefabThiefEvent, tmpSpawn.transform.position, tmpSpawn.transform.rotation); } else { tmpEventType = (Evenement.EventType)Random.Range(0, (float)Evenement.EventType.LOST_OBJECT); //Create new evenement switch (tmpEventType) { case Evenement.EventType.CAR_FIRE: tmpMainObject = Instantiate(prefabCarFireEvent, tmpSpawn.transform.position, tmpSpawn.transform.rotation); break; case Evenement.EventType.LOST: tmpMainObject = Instantiate(prefabLostEvent, tmpSpawn.transform.position, tmpSpawn.transform.rotation); break; case Evenement.EventType.WOUNDED: tmpMainObject = Instantiate(prefabWoundedEvent, tmpSpawn.transform.position, tmpSpawn.transform.rotation); break; } } Evenement tmpEvenement = tmpMainObject.GetComponent <Evenement>(); tmpEvenement.Set(tmpEventType, tmpSpawn, tmpMainObject); evenements.Add(tmpEvenement); spawnsPointForEvent.Remove(tmpSpawn); } foreach (GameObject spawn in spawnsPointForEvent) { Destroy(spawn); } spawnsPointForEvent.RemoveRange(0, spawnsPointForEvent.Count); } if (spawnsPointForLostObject.Count != 0) { for (int i = 0; i < numberOfStolenObject; i++) { //Random free Position GameObject tmpSpawn = null; while (tmpSpawn == null) { tmpSpawn = spawnsPointForLostObject[Random.Range(0, spawnsPointForLostObject.Count)]; } GameObject tmpMainObject = null; Evenement.EventType tmpEventType = Evenement.EventType.LOST_OBJECT; tmpMainObject = Instantiate(prefabThiefEvent, tmpSpawn.transform.position, tmpSpawn.transform.rotation); Evenement tmpEvenement = tmpMainObject.GetComponent <Evenement>(); tmpEvenement.Set(tmpEventType, tmpSpawn, tmpMainObject); evenements.Add(tmpEvenement); spawnsPointForLostObject.Remove(tmpSpawn); } foreach (GameObject spawn in spawnsPointForLostObject) { Destroy(spawn); } spawnsPointForLostObject.RemoveRange(0, spawnsPointForLostObject.Count); } }
/// <summary> /// /// </summary> /// <param name="evenement"></param> /// <returns></returns> internal static List <Parking> GetListEventCarpark(Evenement evenement) { var ListParkings = GetListeParking(); return(ListParkings); }
private void AddEvenement(Evenement e) { ViewModel.addEvent(e); }
public frmBetalingen(Evenement e) { evenement = e; InitializeComponent(); LoadList(); }
//Do at the end of a turn public String UpdateStats() { Evenement evenement = new Evenement(); evenement.GetEventForThisRound(NbTurns); AmountOfWood = AmountOfWood + NbZombieAssigneWood * NbOfWoodByZombie * evenement.MultiWood/10; AmountOfRock = AmountOfRock + NbZombieAssigneRock * NbOfRockByZombie * evenement.MutliRock/10; setMaxHungerHumans(); setMaxHungerZombies(); ResetZombieAssigne(); NbTurns++; return evenement.descriptionEvent; }
public async Task InitializeData() { _dbContext.Database.EnsureDeleted(); if (_dbContext.Database.EnsureCreated()) { ICollection <Locatie> locaties = new List <Locatie>(); Locatie locatie1 = new Locatie() { LocatieNaam = "Schotte", Straat = "Kapellekensbaan", Nr = "1", PlaatsNaam = "Aalst", Postcode = "9300", Latitude = 50.9263405, Longitude = 4.0423651 }; Locatie locatie2 = new Locatie() { LocatieNaam = "EDUGO Arena", Straat = "Sint-Jozefstraat", Nr = "16", PlaatsNaam = "Gent", Postcode = "9041", Latitude = 51.0458078, Longitude = 3.6393603 }; Locatie locatie3 = new Locatie() { LocatieNaam = "Expo", Straat = "Belgiëplein 1 ", Nr = "15", PlaatsNaam = "Brussel", Postcode = "1020", Latitude = 50.8997337, Longitude = 4.3366863 }; locaties.Add(locatie1); locaties.Add(locatie2); locaties.Add(locatie3); _dbContext.Locaties.AddRange(locaties); ICollection <Attractie> attracties1 = new List <Attractie>(); ICollection <Attractie> attracties2 = new List <Attractie>(); ICollection <Attractie> attracties3 = new List <Attractie>(); Attractie attractie1 = new Attractie() { Naam = "Wilde rat", Omschrijving = "Een heel grote attraxtrigorvzoc", TypeAttractie = TypeAttractie.Eenpersoons }; Attractie attractie2 = new Attractie() { Naam = "Wilde muis", Omschrijving = "Een heel leuke attraxtrigorvzoc", TypeAttractie = TypeAttractie.MeerderePersonen }; attracties1.Add(attractie1); attracties1.Add(attractie2); Attractie attractie3 = new Attractie() { Naam = "Wilde tijger", Omschrijving = "Een heel kleine attraxtrigorvzoc", TypeAttractie = TypeAttractie.MeerderePersonen }; Attractie attractie4 = new Attractie() { Naam = "KLeine leeuw", Omschrijving = "Een kleien leeuw attraxtrigorvzoc", TypeAttractie = TypeAttractie.Eenpersoons }; attracties2.Add(attractie3); attracties2.Add(attractie4); Attractie attractie5 = new Attractie() { Naam = "Stoute Giraf", Omschrijving = "Een heel kleine attraxtrigorvzoc", TypeAttractie = TypeAttractie.MeerderePersonen }; Attractie attractie6 = new Attractie() { Naam = "Ranger Shooter", Omschrijving = "Het beste action game die je tot nu toe gaat hebben.", TypeAttractie = TypeAttractie.Eenpersoons }; Attractie attractie7 = new Attractie() { Naam = "Long Arrow", Omschrijving = "Tis tijd om een boog in je handen te hebben", TypeAttractie = TypeAttractie.MeerderePersonen }; Attractie attractie8 = new Attractie() { Naam = "Little bad stuf", Omschrijving = "Soms stoute zaken doen is wel leukk", TypeAttractie = TypeAttractie.Eenpersoons }; Attractie attractie9 = new Attractie() { Naam = "Crazy horses", Omschrijving = "Paarden met rare gedragen. Soms doen ze wel is gek", TypeAttractie = TypeAttractie.MeerderePersonen }; Attractie attractie10 = new Attractie() { Naam = "Music4u", Omschrijving = "Tijd voor muziek met je vr", TypeAttractie = TypeAttractie.Eenpersoons }; attracties3.Add(attractie5); attracties3.Add(attractie6); attracties3.Add(attractie7); attracties3.Add(attractie8); attracties3.Add(attractie9); attracties3.Add(attractie10); _dbContext.Attracties.AddRange(attracties1); _dbContext.Attracties.AddRange(attracties2); _dbContext.Attracties.AddRange(attracties3); DateTime startmoment = new DateTime(2020, 04, 17, 11, 0, 0); DateTime eindmoment = new DateTime(2020, 04, 22, 22, 0, 0); Evenement evenement = new Evenement() { NaamEvent = "SpeelHok", Attracties = attracties1, Locatie = locatie1, StartMoment = startmoment, EindMoment = eindmoment, MaxAantalDeelnemers = 150 }; _dbContext.Evenementen.Add(evenement); startmoment = new DateTime(2020, 04, 11, 10, 0, 0); eindmoment = new DateTime(2020, 04, 19, 22, 0, 0); evenement = new Evenement() { NaamEvent = "Expeditie", Attracties = attracties2, Locatie = locatie2, StartMoment = startmoment, EindMoment = eindmoment, MaxAantalDeelnemers = 25 }; _dbContext.Evenementen.Add(evenement); startmoment = new DateTime(2020, 06, 02, 10, 0, 0); eindmoment = new DateTime(2020, 06, 19, 22, 0, 0); evenement = new Evenement() { NaamEvent = "OlePlay", Locatie = locatie3, StartMoment = startmoment, EindMoment = eindmoment, MaxAantalDeelnemers = 25 }; _dbContext.Evenementen.Add(evenement); startmoment = new DateTime(2020, 08, 11, 12, 0, 0); eindmoment = new DateTime(2020, 09, 02, 18, 0, 0); evenement = new Evenement() { NaamEvent = "EveryDayAllDay", Locatie = locatie3, StartMoment = startmoment, EindMoment = eindmoment, MaxAantalDeelnemers = 25 }; _dbContext.Evenementen.Add(evenement); _dbContext.SaveChanges(); Gebruiker gebruiker1 = new Gebruiker { Email = "*****@*****.**", Voornaam = "Pieter", Achternaam = "De Koning" }; gebruiker1.IsAdmin = true; _dbContext.Gebruikers.Add(gebruiker1); await CreateUser(gebruiker1.Email, "P@ssword1111", "Admin"); Gebruiker gebruiker2 = new Gebruiker { Email = "*****@*****.**", Voornaam = "John", Achternaam = "Ward" }; _dbContext.Gebruikers.Add(gebruiker2); evenement = _dbContext.Evenementen.First(); evenement.SchrijfIn(gebruiker2); //gebruiker2.VoegIngeschrevenEvenementToe(_dbContext.Evenementen.First()); await CreateUser(gebruiker2.Email, "P@ssword1111", "Lid"); gebruiker2 = new Gebruiker { Email = "*****@*****.**", Voornaam = "Kaan", Achternaam = "Calli" }; _dbContext.Gebruikers.Add(gebruiker2); await CreateUser(gebruiker2.Email, "P@ssword1111", "Lid"); gebruiker2 = new Gebruiker { Email = "*****@*****.**", Voornaam = "Bart", Achternaam = "pit" }; _dbContext.Gebruikers.Add(gebruiker2); await CreateUser(gebruiker2.Email, "P@ssword1111", "Lid"); _dbContext.SaveChanges(); } }
public EvenementParkingViewModel(Evenement evenement, string adresseConvive) { Evenement = evenement; AdresseConvive = adresseConvive; }
public void Create(Evenement evt) { this.userRepository.Create(evt); }
public void Remove(Evenement evenement) { evenements.Remove(evenement);//base sur Evenement.Equals redefini Save(); }
public ActionResult Bewerk(int?id) { var evenement = new Evenement(id.GetValueOrDefault()); return(View(evenement)); }
public async Task InitializeData() { _context.Database.EnsureDeleted(); if (_context.Database.EnsureCreated()) { //gebruikers Gebruiker gebruiker = new Gebruiker("Rob", "De Putter", "*****@*****.**"); gebruiker.IsAdmin = true; //gebieden voor evenementen Gebied sölden = new Gebied("Sölden", "Oostenrijk", Continent.EUROPA, 11.0076232, 46.9654937, 144, 3244); Gebied whistler = new Gebied("Whistler", "Canada", Continent.NOORD_AMERIKA, -122.957359, 50.116322, 200, 670); Gebied haugastøl = new Gebied("Haugastøl", "Noorwegen", Continent.EUROPA, 7.867799, 60.511639, 50, 592); Gebied beijing = new Gebied("Beijing", "China", Continent.AZIË, 116.363625, 39.913818, 50, 820); //top 10 europa Gebied brixenTal = new Gebied("Brixental", "Oostenrijk", Continent.EUROPA, 12.190926, 47.503113, 284, 1860); Gebied valDisère = new Gebied("Val d'Isère", "Frankrijk", Continent.EUROPA, 6.979605, 45.446912, 300, 3456); Gebied laax = new Gebied("Laax", "Zwitserland", Continent.EUROPA, 9.265110, 46.823930, 188, 1016); Gebied lesTroisVallées = new Gebied("Les Trois Vallées", "Frankrijk", Continent.EUROPA, 6.525255, 45.484036, 600, 3230); Gebied silvrettArenaIschgl = new Gebied("Silvretta Arena Ischgl - Samnaun", "Oostenrijk", Continent.EUROPA, 10.288000, 47.010023, 239, 2872); Gebied serfausFissLadis = new Gebied("Serfaus - Fiss - Ladis", "Oostenrijk", Continent.EUROPA, 10.607579, 47.038905, 198, 2820); Gebied hochZillertalHochfügen = new Gebied("Hochzillertal - Hochfügen", "Oostenrijk", Continent.EUROPA, 11.873215, 47.289957, 85, 2378); Gebied breuilCervinia = new Gebied("Breuil-Cervinia", "Italië", Continent.EUROPA, 7.629142, 45.933559, 322, 3899); Gebied lesQuatreVallées = new Gebied("Les Quatre Vallées", "Frankrijk", Continent.EUROPA, 6.131787, 45.914507, 412, 3330); Gebied valGardena = new Gebied("Val Gardena", "Italië", Continent.EUROPA, 11.724774, 46.570590, 175, 2518); //ranking Europa Ranking rankingEuropa = new Ranking("Top 10 Europa"); //evenementen Evenement ninesAudi = new Evenement("9nines AUDI", "Jaarlijks evenement voor snowboarders en skiërs", new DateTime(2020, 04, 22), new DateTime(2020, 04, 27), sölden); Evenement theBrits2019 = new Evenement("The Brits 2019", "The BRITS – Muziek & Winter Sportfestival met de Britse Snowboard en Freeski Championships", new DateTime(2020, 03, 31), new DateTime(2020, 04, 07), laax); Evenement worldSkiSnowboardFestival = new Evenement("World ski and snowboard festival 2019", "Het grootste wintersport en muziekfestival van Noord-Amerika!", new DateTime(2020, 04, 10), new DateTime(2020, 04, 14), whistler); Evenement redBullRagnarok = new Evenement("Red Bull Ragnarok", "The world’s biggest Snow-Kite Race" , new DateTime(2020, 03, 04), new DateTime(2020, 04, 07), haugastøl); Evenement winterOlympics = new Evenement("2022 Winter Olympics", "The 2022 Winter Olympics, also known as XXIV Olympic Winter Games will be the 24th winter multi-sports event by IOC.", new DateTime(2022, 02, 04), new DateTime(2022, 02, 20), beijing); //rankings beste gebieden! //gebieden _context.Gebieden.Add(sölden); _context.Gebieden.Add(whistler); _context.Gebieden.Add(haugastøl); _context.Gebieden.Add(beijing); //top 10 europa _context.Gebieden.Add(brixenTal); _context.Gebieden.Add(valDisère); _context.Gebieden.Add(laax); _context.Gebieden.Add(lesTroisVallées); _context.Gebieden.Add(silvrettArenaIschgl); _context.Gebieden.Add(serfausFissLadis); _context.Gebieden.Add(hochZillertalHochfügen); _context.Gebieden.Add(breuilCervinia); _context.Gebieden.Add(lesQuatreVallées); _context.Gebieden.Add(valGardena); rankingEuropa.AddGebied(brixenTal, 1); rankingEuropa.AddGebied(valDisère, 2); rankingEuropa.AddGebied(laax, 3); rankingEuropa.AddGebied(lesTroisVallées, 4); rankingEuropa.AddGebied(silvrettArenaIschgl, 5); rankingEuropa.AddGebied(serfausFissLadis, 6); rankingEuropa.AddGebied(hochZillertalHochfügen, 7); rankingEuropa.AddGebied(breuilCervinia, 8); rankingEuropa.AddGebied(lesQuatreVallées, 9); rankingEuropa.AddGebied(valGardena, 10); //ranking europa _context.Rankings.Add(rankingEuropa); //evenementen _context.Evenements.Add(ninesAudi); _context.Evenements.Add(theBrits2019); _context.Evenements.Add(worldSkiSnowboardFestival); _context.Evenements.Add(redBullRagnarok); _context.Evenements.Add(winterOlympics); //USERS Gebruiker administrator = new Gebruiker("Rob", "De Putter", "*****@*****.**"); administrator.IsAdmin = true; _context.Gebruikers.Add(administrator); await CreateUser(administrator.Email, "P@ssword1111"); Gebruiker tim = new Gebruiker("Tim", "Geldof", "*****@*****.**"); _context.Gebruikers.Add(tim); await CreateUser(tim.Email, "P@ssword1111"); Gebruiker web4 = new Gebruiker("Web4", "WebApplicaties", "*****@*****.**"); _context.Gebruikers.Add(web4); await CreateUser(web4.Email, "P@ssword1111"); _context.SaveChanges(); } }
// Updaten public void UpdatenEvenement(Evenement evenement) { //Not implemented }
public frmReserveringen(Evenement e) { InitializeComponent(); evenement = e; LoadList(); }
/// <summary> /// Action effectuée lorsque l'on clique sur le bouton enregistrer les modifications /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnModifierParticipant_Click(object sender, EventArgs e) { List <Participant> listeParticipantsAModifier = new List <Participant>(); List <Participant> listeParticipants = new List <Participant>(); ParticipantBLL partService = new ParticipantBLL(); Participant partTemp = new Participant(); foreach (GridViewRow row in gridViewParticipants.Rows) { String id = gridViewParticipants.DataKeys[row.RowIndex]["id_participant"].ToString(); Participant part = new Participant(); part.id_participant = int.Parse(id); part.id_evenement = int.Parse(ViewState["evenementId"].ToString()); part.hasListe = ((CheckBox)row.FindControl("cbHasListe")).Checked; //On récupère l'id de la personne partTemp = partService.getAllInfosByParticipant(part); if (partTemp != null) { part.id_personne = partTemp.id_personne; } listeParticipants.Add(part); } //Ne garder que les participants modifiés int cle = int.Parse(ViewState["evenementId"].ToString()); EvenementBLL evtBLL = new EvenementBLL(); ParticipantBLL ptcpBLL = new ParticipantBLL(); Evenement evt = evtBLL.getEvenementById(cle); List <Participant> listeParticipantsBefore = ptcpBLL.getAllParticipantByEvenement(evt); if (listeParticipants.Count == listeParticipantsBefore.Count) { for (int i = 0; i < listeParticipants.Count; i++) { if (listeParticipants[i].id_participant == listeParticipantsBefore[i].id_participant && listeParticipants[i].hasListe != listeParticipantsBefore[i].hasListe) { listeParticipantsAModifier.Add(listeParticipants[i]); } } } //Modifier les participants if (listeParticipantsAModifier.Count > 0) { ParticipantBLL partBLL = new ParticipantBLL(); ListeIdeesCadeauxBLL listeService = new ListeIdeesCadeauxBLL(); Boolean retour = partBLL.modifierHasListesListeParticipants(listeParticipantsAModifier) && listeService.updateActiveListe(listeParticipantsAModifier, evt); if (retour) { SuccessText.Text = "Les modifications ont bien été prises en compte"; } else { FailureText.Text = "Les modifications n'ont pas pu être prises en compte"; } RechargerGridViewParticipants(); } }
public frmPresentieLijst(Evenement e) { InitializeComponent(); evenement = e; LoadList(); }
private static List <Programmer> ProgrammesByEvent(this Evenement Id) { return(DatabaseHelper.sqliteconnection.Table <Programmer>().Where(t => t.IdEvenement == Id.id).ToList()); }
public List <Participant> getAllParticipantAyantListeByEvenement(Evenement evt) { DAL_Participant participantService = new DAL_Participant(); return(participantService.getAllParticipantAyantListeByEvenement(evt.id_evenement)); }
public Participant getParticipantAyantListeByEvenementAndPersonne(Evenement evt, Personne personne) { DAL_Participant participantService = new DAL_Participant(); return(participantService.getParticipantByIdPersonneAndEvenementId(personne.id_personne, evt.id_evenement)); }
public Dictionary <LesCaracteristiques, Caracteristique> caracteristiques; // Key = carac name //public ArrayList knPlc; // Known place //public List<Item> invtry; //public bool evalAbilitReq = false; #endregion --> Attributs #region --> Méthodes d'instance public void Recevoir(Evenement evt) { this.Chaine.handleOrLetTheNextDoIt(evt, this); }
public void Update(Evenement evt) { this.userRepository.Update(evt); }
public void Envoyer(Evenement evt) { Kernel.managerEvenements.Poster(evt); }
public void Remove(Evenement evt) { this.userRepository.Remove(evt); }
public List <Participation> getAllParticipations(Participation parti, Evenement evt) { return(participationDAL.getAllParticipations(parti.id_personne, evt.id_evenement)); }
private string applyStatModifications() { Evenement evenement = new Evenement(); evenement.GetEventForThisRound(NbTurns); AmountOfCorpse += (NbZombieAssigneCorpse * NbOfCorpseByZombie)* evenement.MultiCorps / 10; //AmountOfMeat += (NbZombieAssigneMeat * NbOfMeatByZombie); AmountOfRock += (NbZombieAssigneRock * NbOfRockByZombie)* evenement.MutliRock / 10; AmountOfWood += (NbZombieAssigneWood * NbOfWoodByZombie)* evenement.MultiWood / 10; AmountOfCorpse = AmountOfCorpse + nbZombieAssigneKillHuman * 4 * evenement.MultiCorps/10; Debug.Log (AmountHumanHouse); float r = UnityEngine.Random.value; AmountOfHumans += Mathf.RoundToInt(r *(HUMANS_PER_HOUSE * AmountHumanHouse)); if (isHumanMaxCapacity()) AmountOfHumans = nbHumanHouses * HOUSE_SUPPLY_CAP; AmountOfZHunger += NbOfHungerByCoprseEat * nbZombieAssigneEat; AmountOfZombies += NbZombieAssigneCorpse; ResetZombieAssigne(); return evenement.descriptionEvent; }
public Evenement verifEvenement(Evenement e) { return(_evenement.Find(evenement => evenement.Id_Evenement == e.Id_Evenement || evenement.Nom_Evenement == e.Nom_Evenement && evenement.Nom_université == e.Nom_université && evenement.Nom_Ecole == e.Nom_Ecole).FirstOrDefault <Evenement>()); }
private void DeleteItem(Evenement e) { ViewModel.deleteEvent(e); }
public List <Evenement> verifEvenementDate(Evenement e) { return(_evenement.Find(evenement => evenement.Id_Club == e.Id_Club && evenement.Nom_Club == e.Nom_Club && evenement.Date_réalisation == e.Date_réalisation).ToList <Evenement>()); }
public static void SetEVENT(Evenement evenement) { EVENT = evenement; }
/// <summary> /// Charge l'ensemble des participations dans la datagrid /// </summary> /// <param name="p"></param> public void chargerTableauParticipations(string evenementId) { List <ListeIdeesCadeaux> listeIdeesCadeaux = null; List <Participation> listeParticipation = null; try { //Récupérer l'ensemble des listes actives pour cet évènement Evenement evt = new Evenement(); evt.id_evenement = int.Parse(evenementId); ListeIdeesCadeauxBLL listeBLL = new ListeIdeesCadeauxBLL(); listeIdeesCadeaux = listeBLL.getAllListeIdeesCadeaux(evt); //Récupérer l'ensemble des participations de la personne connectée pour cet évènement Participation parti = new Participation(); parti.id_personne = int.Parse(Session["personneID"].ToString()); ParticipationsBLL partService = new ParticipationsBLL(); listeParticipation = partService.getAllParticipations(parti, evt); //Merger les deux infos dans une DataTable pour s'en servir de DataSource DataTable dtMerge = new DataTable(); dtMerge = preparerTable(dtMerge); //Représente la liste des responsables avec l'argent que la personne connectée doit Dictionary <int, long> mapDette = new Dictionary <int, long>(); //Représente la liste des sous que doivent les personnes pour les listes où l'utilisateur connecté est responsable Dictionary <int, long> mapCredit = new Dictionary <int, long>(); //Représente la liste des noms par id, pour éviter de refaire une requête Dictionary <int, string> mapNoms = new Dictionary <int, string>(); HashSet <int> setCle = new HashSet <int>(); //On parcourt les listes actives foreach (ListeIdeesCadeaux liste in listeIdeesCadeaux) { ResponsablesBLL respoService = new ResponsablesBLL(); //On cherche le responsable de la liste Personne responsable = respoService.getInfosResponsableDe(liste.listeIdeesCadeauxPour, liste.listePourEvenement); if (responsable != null) { //Si on est responsable de cette liste, on va ajouter les participations des autres if (responsable.id_personne == int.Parse(Session["personneID"].ToString())) { List <Participation> listeParticipationAListe = new List <Participation>(); listeParticipationAListe = partService.getListeParticipation(liste); foreach (Participation particAListe in listeParticipationAListe) { //S'il ne s'agit pas de notre propre participation if (particAListe.id_personne != responsable.id_personne) { //Si la personne devant de l'argent n'existait pas encore, on la créé avec la participation if (!mapCredit.ContainsKey(particAListe.id_personne)) { mapCredit.Add(particAListe.id_personne, particAListe.participation); setCle.Add(particAListe.id_personne); if (!mapNoms.ContainsKey(particAListe.id_personne)) { mapNoms.Add(particAListe.id_personne, particAListe.personne.prenom + " " + particAListe.personne.nom.ToUpper()); } } //si on devait de l'argent au responsable, on ajoute la nouvelle participation else { mapCredit[particAListe.id_personne] = mapCredit[particAListe.id_personne] + particAListe.participation; } } } } //Si on n'est pas responsable, on ajoute ce qu'on doit au responsable else { foreach (Participation part in listeParticipation) { if (part.id_liste == liste.id_listeIdeesCadeaux) { //Si le responsable n'existait pas encore, on le créé avec la participation if (!mapDette.ContainsKey(responsable.id_personne)) { mapDette.Add(responsable.id_personne, part.participation); setCle.Add(responsable.id_personne); if (!mapNoms.ContainsKey(responsable.id_personne)) { mapNoms.Add(responsable.id_personne, responsable.prenom + " " + responsable.nom.ToUpper()); } } //si on devait de l'argent au responsable, on ajoute la nouvelle participation else { mapDette[responsable.id_personne] = mapDette[responsable.id_personne] + part.participation; } } } } } } foreach (int key in setCle) { DataRow row = dtMerge.NewRow(); row["id"] = key; row["personne"] = mapNoms[key]; row["jedois"] = mapDette.ContainsKey(key) ? mapDette[key] : 0; row["onmedoit"] = mapCredit.ContainsKey(key) ? mapCredit[key] : 0; dtMerge.Rows.Add(row); } //ATTENTION : Penser qu'on doit l'argent au responsable de la liste, et pas à celui pour qui est la liste ! gridView_listeDettes.DataSource = dtMerge; gridView_listeDettes.DataBind(); } catch (Exception e) { FailureText.Text = "Erreur dans la récupération du tableau"; SuccessText.Text = ""; } }
//Wat ik wil doen: //Op het moment dat er op een link in de index word geklikt, word er een public ActionResult Index() { Evenement e = new Evenement(); return(View("~/Views/CMS/Index.cshtml", e)); }
private void Clear() { selectedEvenement = null; txtProduct.Clear(); listMaterial.Items.Clear(); txtDescription.Clear(); txtPricePD.Clear(); txtPricePW.Clear(); }
/// <summary> /// Permet de lier un evenement à son type. /// </summary> /// <example> /// <code> /// Evenement evenement = new Evenement(); /// evenement.AffecterTypeEvenement(typeEvenement) /// /// </code> /// </example> /// <param name="evenement">Notre événement Concerné.</param> /// <param name="typeEvenement">Le type de type l'évenement de notre événement .</param> public static void AffecterTypeEvenement(this Evenement evenement, TypeEvenement typeEvenement) { evenement.ProchainEvenemt = evenement.DateDeb.ProchaineDate(typeEvenement.IDPeriodicite); evenement.dateDerModif = DateTime.Now; evenement.idTypeEv = typeEvenement.IdTypeEvenement; }
private static void OnEvenementChanged(Evenement e) { EvenementChanged?.Invoke(null, e); }
private void guna2GradientCreer_Click(object sender, EventArgs e) { try { checkForm(); Evenement newEvenement = new Evenement ( guna2TxtTitre.Text, guna2TxtDescription.Text, DateTime.Parse(guna2DateTimePickerDateEvenement.Text), guna2TxtLieux.Text, int.Parse(guna2TxtMontant.Text) ); EvenementBLO evenementBLO = new EvenementBLO(ConfigurationManager.AppSettings["DbFolder"]); if (this.oldEvenement == null) { evenementBLO.CreateEvenement(newEvenement); } else { evenementBLO.EditEvenement(oldEvenement, newEvenement); } MessageBox.Show ( "Echeance creer !", "Confirmation", MessageBoxButtons.OK, MessageBoxIcon.Information ); if (callBack != null) { callBack(); } if (oldEvenement != null) { Close(); } guna2TxtTitre.Clear(); guna2TxtDescription.Clear(); guna2TxtMontant.Clear(); guna2TxtLieux.Clear(); guna2TxtTitre.Focus(); } catch (TypingException ex) { MessageBox.Show ( ex.Message, "Typing error", MessageBoxButtons.OK, MessageBoxIcon.Warning ); } catch (DuplicateNameException ex) { MessageBox.Show ( ex.Message, "Duplicate error", MessageBoxButtons.OK, MessageBoxIcon.Warning ); } catch (KeyNotFoundException ex) { MessageBox.Show ( ex.Message, "Not found error", MessageBoxButtons.OK, MessageBoxIcon.Warning ); } catch (Exception ex) { ex.WriteToFile(); MessageBox.Show ( "An error occurred! Please try again later.", "Erreur", MessageBoxButtons.OK, MessageBoxIcon.Error ); } }
/// <summary> /// /// </summary> /// <param name="personneConnectee"></param> /// <param name="evt"></param> /// <returns></returns> public List <Personne> getListeInfosResponsabilite(Personne personneConnectee, Evenement evt) { return(respoDAL.getListeInfosResponsabilite(personneConnectee.id_personne, evt.id_evenement)); }
private void listEvents_SelectedIndexChanged(object sender, EventArgs e) { btnNext.Enabled = listEvents.SelectedIndex != -1; btnDatum.Enabled = listEvents.SelectedIndex != -1; if (listEvents.SelectedIndex == -1) return; SelectedEvenement = evenements[listEvents.SelectedIndex]; lblEventInfo.Text = evenements[listEvents.SelectedIndex].Description; picLogo.Image = evenementBitmaps.ContainsKey(listEvents.SelectedIndex) ? evenementBitmaps[listEvents.SelectedIndex] : null; }
public void AddEvent(Evenement evenement) { _context.evenement.Add(evenement); _context.SaveChanges(); }
public void UpdateEvent(Evenement evenement) { //Evenement existingEvent = GetEventById(evenement.id); _context.evenement.Update(evenement); _context.SaveChanges(); }
public static List<Evenement> SelectEvents() { List<Evenement> lijst = new List<Evenement>(); try { using (SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["db"].ConnectionString)) { using (SqlCommand com = new SqlCommand("grp1_SelectEvents", con)) { com.CommandType = System.Data.CommandType.StoredProcedure; con.Open(); using (SqlDataReader query = com.ExecuteReader()) { while (query.Read()) { Evenement e = new Evenement(); e.Id = Convert.ToInt32(query["Id"]); e.Naam = query["Naam"].ToString(); e.Datum = Convert.ToDateTime(query["Datum"]); e.Locatie = query["Locatie"].ToString(); if (query["StartUur"] != DBNull.Value && query["EindUur"] != DBNull.Value) { e.StartUur = Convert.ToDateTime(query["StartUur"]); e.EindUur = Convert.ToDateTime(query["EindUur"]); } lijst.Add(e); } } } } } catch (Exception e) { System.Diagnostics.Debug.Write(e.Message); System.Diagnostics.Debug.Write("hierboven"); } return lijst; }