// Sparar ner rapport protected void btnSendReport_Click(object sender, EventArgs e) { BeraknaTraktAv(); setEID(); countExpenses(); CheckCar(); //Skapar en ny rapport för sparning. CompositeReport rep = new CompositeReport(); rep.REPID = repID; rep.EID = eid; rep.Expenses = totalExpenses; rep.MID = missionID; rep.Car = car; rep.Miles = km; //Rapportör CompositeEmployee emp = new CompositeEmployee(); //ChefObjekt CompositeEmployee empChef = new CompositeEmployee(); //Mission för att hämta manager. CompositeMission mission = new CompositeMission(); //Chef int chefID = 0; using (var client = new Service1Client()) { client.SaveReport(rep); SaveExpenses(); SaveSubsistences(); SaveDeviations(); emp = client.GetEmployee(eid); mission = client.GetMission(missionID); chefID = mission.Manager; empChef = client.GetEmployee(chefID); } bool epostSkickat = Klasser.Epost.Skicka(empChef.Email, "Ny Rapport", "Du har en ny rapport att godkänna från: " + emp.FirstName + " " + emp.LastName); if (epostSkickat) { } }