コード例 #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;
            }
        }
コード例 #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);
			}
		}
コード例 #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);
            }
        }
コード例 #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;
			}
		}
コード例 #5
0
 partial void DeletetblGallery(tblGallery instance);
コード例 #6
0
 partial void UpdatetblGallery(tblGallery instance);
コード例 #7
0
 partial void InserttblGallery(tblGallery instance);
コード例 #8
0
 partial void DeletetblGallery(tblGallery instance);
コード例 #9
0
 partial void UpdatetblGallery(tblGallery instance);
コード例 #10
0
 partial void InserttblGallery(tblGallery instance);