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;
			}
		}
Exemplo n.º 5
0
 partial void DeletetblGallery(tblGallery instance);
Exemplo n.º 6
0
 partial void UpdatetblGallery(tblGallery instance);
Exemplo n.º 7
0
 partial void InserttblGallery(tblGallery instance);
 partial void DeletetblGallery(tblGallery instance);
 partial void UpdatetblGallery(tblGallery instance);
 partial void InserttblGallery(tblGallery instance);