protected void Page_Load(object sender, EventArgs e) { GetPublicParmValues(); GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(GalleryID); if (gal != null) { litGalleryName.Text = gal.GalleryTitle; pnlGalleryHead.Visible = ShowHeading; rpGallery.DataSource = (from g in gal.GalleryImages where g.GalleryID == GalleryID orderby g.ImageOrder ascending select g).ToList(); rpGallery.DataBind(); } if (rpGallery.Items.Count > 0) { pnlGallery.Visible = true; } else { pnlGallery.Visible = false; } if (!this.IsBeingEdited) { pnlScript.Visible = true; } else { pnlScript.Visible = false; } }
//======================== public static string GetGalleryExportXML(Guid siteID, List <Guid> GalleryIDs) { GalleryExportList lstGE = new GalleryExportList(); lstGE.ExportDate = SiteData.CurrentSite.Now; lstGE.CarrotCakeVersion = SiteData.CarrotCakeCMSVersion; lstGE.OriginalSite = SiteData.GetSiteFromCache(siteID); GalleryHelper gh = new GalleryHelper(siteID); foreach (Guid galleryID in GalleryIDs) { GalleryExport ge = new GalleryExport(); GalleryGroup gal = gh.GalleryGroupGetByID(galleryID); ge.TheGallery = gal; ge.OriginalGalleryID = gal.GalleryID; ge.ExportDate = SiteData.CurrentSite.Now; ge.CarrotCakeVersion = SiteData.CarrotCakeCMSVersion; lstGE.TheGalleries.Add(ge); } return(ContentImportExportUtils.GetExportXML <GalleryExportList>(lstGE)); }
protected void Page_Load(object sender, EventArgs e) { this.ScaleImage = true; this.ShowHeading = false; this.ThumbSize = 100; this.PrettyPhotoSkin = "light_rounded"; GetPublicParmValues(); if (this.PublicParmValues.Any()) { try { string sFoundVal = GetParmValue("PrettyPhotoSkin", "light_rounded"); if (!String.IsNullOrEmpty(sFoundVal)) { this.PrettyPhotoSkin = sFoundVal; } } catch (Exception ex) { } } if (String.IsNullOrEmpty(PrettyPhotoSkin)) { PrettyPhotoSkin = "light_rounded"; } GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(GalleryID); if (gal != null) { litGalleryName.Text = gal.GalleryTitle; pnlGalleryHead.Visible = ShowHeading; rpGallery.DataSource = (from g in gal.GalleryImages where g.GalleryID == GalleryID orderby g.ImageOrder ascending select g).ToList(); rpGallery.DataBind(); } if (rpGallery.Items.Count > 0) { pnlGallery.Visible = true; } else { pnlGallery.Visible = false; } if (!this.IsBeingEdited) { pnlScript.Visible = true; } else { pnlScript.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { gTheID = ParmParser.GetGuidIDFromQuery(); if (!IsPostBack) { GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(gTheID); if (gal != null) { txtGallery.Text = gal.GalleryTitle; } } }
protected void Page_Load(object sender, EventArgs e) { gTheID = ParmParser.GetGuidIDFromQuery(); if (!IsPostBack) { GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(gTheID); if (gal != null) { txtGallery.Text = gal.GalleryTitle; } } }
protected void LoadLists() { GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(gTheID); if (gal != null) { litGalleryName.Text = gal.GalleryTitle; rpGallery.DataSource = (from g in gal.GalleryImages orderby g.ImageOrder ascending select fileHelper.GetFileInfo(g.GalleryImage, g.GalleryImage)).ToList(); rpGallery.DataBind(); } SetSourceFiles(null, "/"); }
protected void LoadLists() { GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(gTheID); if (gal != null) { litGalleryName.Text = gal.GalleryTitle; rpGallery.DataSource = (from g in gal.GalleryImages orderby g.ImageOrder ascending select fileHelper.GetFileInfo(g.GalleryImage, g.GalleryImage)).ToList(); rpGallery.DataBind(); } SetSourceFiles(null, "/"); }
protected void btnSave_Click(object sender, EventArgs e) { GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(gTheID); if (gal == null || gTheID == Guid.Empty) { gTheID = Guid.NewGuid(); gal = new GalleryGroup(); gal.SiteID = SiteID; gal.GalleryID = gTheID; } gal.GalleryTitle = txtGallery.Text; gal.Save(); string stringFile = CreateLink("GalleryList"); Response.Redirect(stringFile); }
protected void Page_Load(object sender, EventArgs e) { GetPublicParmValues(); GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(GalleryID); if (gal != null) { litGalleryName.Text = gal.GalleryTitle; pnlGalleryHead.Visible = ShowHeading; rpGallery.DataSource = (from g in gal.GalleryImages where g.GalleryID == GalleryID orderby g.ImageOrder ascending select g).ToList(); rpGallery.DataBind(); } if (rpGallery.Items.Count > 0) { pnlGallery.Visible = true; } else { pnlGallery.Visible = false; } if (!this.IsBeingEdited) { pnlScript.Visible = true; } else { pnlScript.Visible = false; } }
protected void btnSave_Click(object sender, EventArgs e) { GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(gTheID); if (gal == null || gTheID == Guid.Empty) { gTheID = Guid.NewGuid(); gal = new GalleryGroup(); gal.SiteID = SiteID; gal.GalleryID = gTheID; } gal.GalleryTitle = txtGallery.Text; gal.Save(); string stringFile = CreateLink("GalleryList"); Response.Redirect(stringFile); }
//======================== public static string GetGalleryExportXML(Guid siteID, List<Guid> GalleryIDs) { GalleryExportList lstGE = new GalleryExportList(); lstGE.ExportDate = SiteData.CurrentSite.Now; lstGE.CarrotCakeVersion = SiteData.CarrotCakeCMSVersion; lstGE.OriginalSite = SiteData.GetSiteFromCache(siteID); GalleryHelper gh = new GalleryHelper(siteID); foreach (Guid galleryID in GalleryIDs) { GalleryExport ge = new GalleryExport(); GalleryGroup gal = gh.GalleryGroupGetByID(galleryID); ge.TheGallery = gal; ge.OriginalGalleryID = gal.GalleryID; ge.ExportDate = SiteData.CurrentSite.Now; ge.CarrotCakeVersion = SiteData.CarrotCakeCMSVersion; lstGE.TheGalleries.Add(ge); } return ContentImportExportUtils.GetExportXML<GalleryExportList>(lstGE); }
protected void Page_Load(object sender, EventArgs e) { if (PublicParmValues.Count > 0) { try { string sFoundVal = GetParmValue("GalleryID", Guid.Empty.ToString()); if (!string.IsNullOrEmpty(sFoundVal)) { GalleryID = new Guid(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValue("ShowHeading", "false"); if (!string.IsNullOrEmpty(sFoundVal)) { ShowHeading = Convert.ToBoolean(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValue("ScaleImage", "false"); if (!string.IsNullOrEmpty(sFoundVal)) { ScaleImage = Convert.ToBoolean(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValueDefaultEmpty("WindowWidth", "500"); if (!string.IsNullOrEmpty(sFoundVal)) { WindowWidth = Convert.ToInt32(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValueDefaultEmpty("ThumbSize1", "150"); if (!string.IsNullOrEmpty(sFoundVal)) { ThumbSize1 = Convert.ToInt32(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValueDefaultEmpty("ThumbSize2", "200"); if (!string.IsNullOrEmpty(sFoundVal)) { ThumbSize2 = Convert.ToInt32(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValue("PrettyPhotoSkin", "light_rounded"); if (!string.IsNullOrEmpty(sFoundVal)) { PrettyPhotoSkin = sFoundVal; } } catch (Exception ex) { } } if (string.IsNullOrEmpty(PrettyPhotoSkin)) { PrettyPhotoSkin = "light_rounded"; } imageData = new List<GalleryMetaData>(); List<GalleryImageEntry> gallery = null; GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(GalleryID); if (gal != null) { litGalleryName.Text = gal.GalleryTitle; pnlGalleryHead.Visible = ShowHeading; gallery = (from g in gal.GalleryImages orderby g.ImageOrder ascending select g).ToList(); imageData = gh.GetGalleryMetaDataListByGalleryID(GalleryID); rpGallery.DataSource = gallery; rpGallery.DataBind(); rpGalleryDetail.DataSource = gallery; rpGalleryDetail.DataBind(); } if (rpGallery.Items.Count > 0) { pnlGallery.Visible = true; } else { pnlGallery.Visible = false; } if (!IsBeingEdited) { pnlScript.Visible = true; } else { pnlScript.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { if (PublicParmValues.Any()) { try { string sFoundVal = GetParmValue("GalleryID", Guid.Empty.ToString()); if (!string.IsNullOrEmpty(sFoundVal)) { GalleryID = new Guid(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValue("ShowHeading", "false"); if (!string.IsNullOrEmpty(sFoundVal)) { ShowHeading = Convert.ToBoolean(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValue("ScaleImage", "false"); if (!string.IsNullOrEmpty(sFoundVal)) { ScaleImage = Convert.ToBoolean(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValue("ThumbSize", "150"); if (!string.IsNullOrEmpty(sFoundVal)) { ThumbSize = Convert.ToInt32(sFoundVal); } } catch (Exception ex) { } } GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(GalleryID); if (gal != null) { litGalleryName.Text = gal.GalleryTitle; pnlGalleryHead.Visible = ShowHeading; rpGallery.DataSource = (from g in gal.GalleryImages where g.GalleryID == GalleryID orderby g.ImageOrder ascending select g).ToList(); rpGallery.DataBind(); } if (rpGallery.Items.Count > 0) { pnlGallery.Visible = true; } else { pnlGallery.Visible = false; } if (!IsBeingEdited) { pnlScript.Visible = true; } else { pnlScript.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { GetPublicParmValues(); if (this.PublicParmValues.Any()) { try { string sFoundVal = GetParmValue("GalleryID", Guid.Empty.ToString()); if (!String.IsNullOrEmpty(sFoundVal)) { this.GalleryID = new Guid(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValueDefaultEmpty("WindowWidth", "500"); if (!String.IsNullOrEmpty(sFoundVal)) { this.WindowWidth = Convert.ToInt32(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValueDefaultEmpty("ThumbSize1", "150"); if (!String.IsNullOrEmpty(sFoundVal)) { this.ThumbSize1 = Convert.ToInt32(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValueDefaultEmpty("ThumbSize2", "200"); if (!String.IsNullOrEmpty(sFoundVal)) { this.ThumbSize2 = Convert.ToInt32(sFoundVal); } } catch (Exception ex) { } try { string sFoundVal = GetParmValue("PrettyPhotoSkin", "light_rounded"); if (!String.IsNullOrEmpty(sFoundVal)) { this.PrettyPhotoSkin = sFoundVal; } } catch (Exception ex) { } } if (String.IsNullOrEmpty(PrettyPhotoSkin)) { this.PrettyPhotoSkin = "light_rounded"; } imageData = new List <GalleryMetaData>(); List <GalleryImageEntry> gallery = null; GalleryHelper gh = new GalleryHelper(this.SiteID); var gal = gh.GalleryGroupGetByID(this.GalleryID); if (gal != null) { litGalleryName.Text = gal.GalleryTitle; pnlGalleryHead.Visible = ShowHeading; gallery = (from g in gal.GalleryImages orderby g.ImageOrder ascending select g).ToList(); imageData = gh.GetGalleryMetaDataListByGalleryID(GalleryID); rpGallery.DataSource = gallery; rpGallery.DataBind(); rpGalleryDetail.DataSource = gallery; rpGalleryDetail.DataBind(); } if (rpGallery.Items.Count > 0) { pnlGallery.Visible = true; } else { pnlGallery.Visible = false; } if (!this.IsBeingEdited) { pnlScript.Visible = true; } else { pnlScript.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { this.ScaleImage = true; this.ShowHeading = false; this.ThumbSize = 100; this.PrettyPhotoSkin = "light_rounded"; GetPublicParmValues(); if (this.PublicParmValues.Any()) { try { string sFoundVal = GetParmValue("PrettyPhotoSkin", "light_rounded"); if (!String.IsNullOrEmpty(sFoundVal)) { this.PrettyPhotoSkin = sFoundVal; } } catch (Exception ex) { } } if (String.IsNullOrEmpty(PrettyPhotoSkin)) { PrettyPhotoSkin = "light_rounded"; } GalleryHelper gh = new GalleryHelper(SiteID); var gal = gh.GalleryGroupGetByID(GalleryID); if (gal != null) { litGalleryName.Text = gal.GalleryTitle; pnlGalleryHead.Visible = ShowHeading; rpGallery.DataSource = (from g in gal.GalleryImages where g.GalleryID == GalleryID orderby g.ImageOrder ascending select g).ToList(); rpGallery.DataBind(); } if (rpGallery.Items.Count > 0) { pnlGallery.Visible = true; } else { pnlGallery.Visible = false; } if (!this.IsBeingEdited) { pnlScript.Visible = true; } else { pnlScript.Visible = false; } }