public void DeletePage(int id) { ModelContainer1 mc = new ModelContainer1(); var page = (from x in mc.PageSet where x.Id == id select x).First(); mc.PageSet.DeleteObject(page); mc.SaveChanges(); }
public void CreatePage(string name) { ModelContainer1 mc = new ModelContainer1(); var newPage = new Page(); newPage.Name = name; newPage.Content = "<li class='editable'>Witaj na nowej stronie!</li>"; mc.AddToPageSet(newPage); mc.SaveChanges(); }
public void CreatePage(string name) { ModelContainer1 mc = new ModelContainer1(); var newPage = new Page(); newPage.Name = name; newPage.Content = "<li class='editable'>Welcome to the new site!</li><li> </li>"; mc.AddToPageSet(newPage); mc.SaveChanges(); }
public void AddMarker(int siteId, string markerX, string markerY, string comment) { ModelContainer1 mc = new ModelContainer1(); var page = (from x in mc.PageSet where x.Id == siteId select x).First(); page.Marker_x = markerX; page.Marker_y = markerY; page.Marker_comment = comment; mc.SaveChanges(); }
public void UpdatePage(int id, string name) { ModelContainer1 mc = new ModelContainer1(); var page = (from x in mc.PageSet where x.Id == id select x).First(); page.Name = name; mc.SaveChanges(); }
public void UpdateLogo(string html) { ModelContainer1 mc = new ModelContainer1(); var page = (from x in mc.AllPagesSet select x).First(); page.Logo = html; mc.SaveChanges(); }
public void UpdateColor(int red, int green ,int blue) { ModelContainer1 mc = new ModelContainer1(); var page = (from x in mc.AllPagesSet select x).First(); page.ColorR = red; page.ColorG = green; page.ColorB = blue; mc.SaveChanges(); }
public void SaveContent(string html, int id) { ModelContainer1 mc = new ModelContainer1(); var page = (from x in mc.PageSet where x.Id == id select x).First(); page.Content = html; mc.SaveChanges(); }
public void DeleteMarker(int siteId) { ModelContainer1 mc = new ModelContainer1(); var page = (from x in mc.PageSet where x.Id == siteId select x).First(); page.Marker_x = null; page.Marker_y = null; page.Marker_comment = null; mc.SaveChanges(); }