public async Task <IActionResult> Edit(long id, [Bind("GarantieId,Vervaldatum,FaktuurId")] Garantie garantie) { if (id != garantie.GarantieId) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(garantie); TempData["SuccessMessage"] = $"De garantie <b>{garantie.FaktuurId}</b> werd gewijzigd!"; await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!GarantieExists(garantie.GarantieId)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } ViewData["FaktuurId"] = new SelectList(_context.Fakturen.OrderByDescending(f => f.FaktuurNr), "FaktuurNr", "FaktuurNr", garantie.FaktuurId); return(View(garantie)); }
public void AjouterAvaliste(Garantie garantie, string nomComplet, string profession, string description, double montantParMois, Employe employe) { operationBLO = new OperationBLO(); avalisteBLO.Add(new Avaliste(new IdentifiantBLO().IdAvaliste, garantie, nomComplet, profession, description, montantParMois)); operationBLO.AjouterOperation(TypeOperation.Ajout, employe, garantie.Credit.Client, new CompteClient("Indefini"), montantParMois, "toto tata"); new IdentifiantBLO().AddIdAvaliste(); }
public void SupprimerGarantie(Garantie garantie, Employe employe) { operationBLO = new OperationBLO(); garantieBLO.Remove(garantie); operationBLO.AjouterOperation(TypeOperation.Suppression, employe, garantie.Credit.Client, new CompteClient("Indefini"), garantie.MontantEvaluation, "Plus important"); }
public void AjouterFichierStocke(string nom, string fileName, Client client, Garantie garantie, StatutStockage statutStockage, Employe employe) { operationBLO = new OperationBLO(); fichierStockeBLO.Add(new FichierStocke(new IdentifiantBLO().IdFichierStocke, DateTime.Now, nom, fileName, client, garantie, statutStockage)); operationBLO.AjouterOperation(TypeOperation.Ajout, employe, client, new CompteClient("Indefini"), garantie.MontantEvaluation, "toto tata"); new IdentifiantBLO().AddIdFichierStocke(); }
public void LibererGarantie(Garantie garantie, Employe employe) { operationBLO = new OperationBLO(); Garantie oldGarantie = garantie; garantie.StatutGarantie = StatutGarantie.Retourné; garantieBLO[garantieBLO.IndexOf(oldGarantie)] = garantie; operationBLO.AjouterOperation(TypeOperation.Retour_de_garantie, employe, garantie.Credit.Client, new CompteClient("Indefini"), garantie.MontantEvaluation, "Credit rembourse"); }
public async Task <IActionResult> Create([Bind("GarantieId,Vervaldatum,FaktuurId")] Garantie garantie) { if (ModelState.IsValid) { _context.Add(garantie); await _context.SaveChangesAsync(); TempData["SuccessMessage"] = $"De garantie <b>{garantie.FaktuurId}</b> werd toegevoegd!"; return(RedirectToAction(nameof(Index))); } ViewData["FaktuurId"] = new SelectList(_context.Fakturen.OrderByDescending(f => f.FaktuurNr), "FaktuurNr", "FaktuurNr", garantie.FaktuurId); return(View(garantie)); }
public Avaliste RechercherAvalistesGarantie(Garantie garantie) => avalisteBLO.Find(x => x.Garantie == garantie).FirstOrDefault();
public void DemanderCredit(TypeCredit typeCredit, int nombreMois, Client client, Garantie garantie, double montantEmprunte, Employe employe) { operationBLO = new OperationBLO(); creditBLO.Add(new Credit(CodeCredit, typeCredit, DateTime.Now, null, nombreMois, client, garantie, montantEmprunte, 0, StatutCredit.Ouverture_du_dossier)); operationBLO.AjouterOperation(TypeOperation.Credit, employe, garantie.Credit.Client, new CompteClient("Indefini"), montantEmprunte, "toto tata"); new IdentifiantBLO().AddIdCredit(); }
public IEnumerable <FichierStocke> RechercherFichierStockesGarantie(Garantie garantie) => fichierStockeBLO.Find(x => x.Garantie == garantie);