// Sparar alla traktamenten protected void SaveSubsistences() { if (Session["TRAKT_RAPPORT"] != null) { lstTraktTillRapport = (List<Klasser.Traktamente>)Session["TRAKT_RAPPORT"]; } using (var client = new Service1Client()) { for (int i = 0; i < lstTraktTillRapport.Count; i++) { CompositeSubsistence sub = new CompositeSubsistence(); sub.REPID = repID; sub.CID = client.GetCountryIdByName(lstTraktTillRapport[i].Land); sub.SUM = lstTraktTillRapport[i].Kronor; sub.DATE = Convert.ToDateTime(lstTraktTillRapport[i].Datum); client.SaveSubsistence(sub); } } }