Exemplo n.º 1
0
        public void Save()
        {
            using (PhotoGalleryDataContext db = PhotoGalleryDataContext.GetDataContext()) {
                tblGallery gal = (from c in db.tblGalleries
                                  where c.GalleryID == this.GalleryID
                                  select c).FirstOrDefault();

                if (gal == null || this.GalleryID == Guid.Empty)
                {
                    gal           = new tblGallery();
                    gal.SiteID    = this.SiteID;
                    gal.GalleryID = Guid.NewGuid();
                }

                gal.GalleryTitle = this.GalleryTitle;

                if (gal.GalleryID != this.GalleryID)
                {
                    db.tblGalleries.InsertOnSubmit(gal);
                }

                db.SubmitChanges();

                this.GalleryID = gal.GalleryID;
            }
        }
Exemplo n.º 2
0
		internal GalleryGroup(tblGallery gal) {
			if (gal != null) {
				this.GalleryID = gal.GalleryID;
				this.SiteID = gal.SiteID.Value;

				this.GalleryTitle = gal.GalleryTitle;

				GalleryHelper gh = new GalleryHelper(SiteID);

				this.GalleryImages = gh.GalleryImageEntryListGetByGalleryID(this.GalleryID);

			}
		}
Exemplo n.º 3
0
        internal GalleryGroup(tblGallery gal)
        {
            if (gal != null)
            {
                this.GalleryID = gal.GalleryID;
                this.SiteID    = gal.SiteID.Value;

                this.GalleryTitle = gal.GalleryTitle;

                GalleryHelper gh = new GalleryHelper(SiteID);

                this.GalleryImages = gh.GalleryImageEntryListGetByGalleryID(this.GalleryID);
            }
        }
Exemplo n.º 4
0
		public void Save() {
			using (PhotoGalleryDataContext db = PhotoGalleryDataContext.GetDataContext()) {
				tblGallery gal = (from c in db.tblGalleries
								  where c.GalleryID == this.GalleryID
								  select c).FirstOrDefault();

				if (gal == null || this.GalleryID == Guid.Empty) {
					gal = new tblGallery();
					gal.SiteID = this.SiteID;
					gal.GalleryID = Guid.NewGuid();
				}

				gal.GalleryTitle = this.GalleryTitle;

				if (gal.GalleryID != this.GalleryID) {
					db.tblGalleries.InsertOnSubmit(gal);
				}

				db.SubmitChanges();

				this.GalleryID = gal.GalleryID;
			}
		}
 partial void DeletetblGallery(tblGallery instance);
 partial void UpdatetblGallery(tblGallery instance);
 partial void InserttblGallery(tblGallery instance);
 partial void DeletetblGallery(tblGallery instance);
 partial void UpdatetblGallery(tblGallery instance);
 partial void InserttblGallery(tblGallery instance);