Пример #1
0
 public List<LandingPageImage> AddImage(int pageID, string url)
 {
     CurtDevDataContext db = new CurtDevDataContext();
     int sort = 1;
     try {
         sort = db.LandingPageImages.Where(x => x.landingPageID.Equals(pageID)).OrderByDescending(x => x.sort).Select(x => x.sort).First() + 1;
     } catch {}
     LandingPageImage image = new LandingPageImage {
         landingPageID = pageID,
         url = url,
         sort = sort
     };
     db.LandingPageImages.InsertOnSubmit(image);
     db.SubmitChanges();
     return GetImages(pageID);
 }
Пример #2
0
 partial void DeleteLandingPageImage(LandingPageImage instance);
Пример #3
0
 partial void UpdateLandingPageImage(LandingPageImage instance);
Пример #4
0
 partial void InsertLandingPageImage(LandingPageImage instance);
Пример #5
0
		private void detach_LandingPageImages(LandingPageImage entity)
		{
			this.SendPropertyChanging();
			entity.LandingPage = null;
		}