private int OpretBlanketIDB(FormCollection collection) { BlanketOprettelse blanket = new BlanketOprettelse(collection); int medarbejderId = blanket.Opret(); return(medarbejderId); }
public ActionResult GodkendMedarbejder() { FormCollection collection = (FormCollection)TempData["collection"]; Godkendelse godkendelse = new Godkendelse(); BlanketOprettelse b = new BlanketOprettelse(collection); b.Update(); godkendelse.GodkendMedarbejder(Convert.ToInt32(collection.Get("medarbejderId"))); return(View()); }
public ActionResult OpretPersonoplysninger(FormCollection collection) { BlanketOprettelse blanket = new BlanketOprettelse(collection); int medarbejderId = blanket.OpretPersonoplysninger(); Mail mail = new Mail(); mail.modtager = "*****@*****.**"; mail.body = mail.FindLederEmail(collection.Get("afdelinger")) + "Tryk venligst på nedenstående link, for at oprette den nye medarbejder \n" + "http://localhost:59312/Oprettelse/VisPersonoplysninger?medarbejderId=" + medarbejderId; mail.emne = "Ny medarbejder"; ViewBag.Besked = mail.SendMail(); return(View("VisBesked")); }