protected override void RenderContent(HtmlTextWriter output) { if (yariMediaRecordID == 0) { output.WriteFullBeginTag("tr"); output.WriteBeginTag("td"); output.WriteAttribute("class", "row1"); output.WriteAttribute("colspan", "2"); output.Write(HtmlTextWriter.TagRightChar); output.Write("The YariMediaRecord selected does not exist."); output.WriteEndTag("td"); output.WriteEndTag("tr"); return; } output.WriteFullBeginTag("tr"); output.WriteBeginTag("td"); output.WriteAttribute("class", "row1"); output.WriteAttribute("colspan", "2"); output.Write(HtmlTextWriter.TagRightChar); output.Write("<strong>Warning:</strong> This action deletes the selected ." + "<em>Use with caution, this option cannot be undone.</em>"); output.WriteEndTag("td"); output.WriteEndTag("tr"); output.WriteFullBeginTag("tr"); output.WriteBeginTag("td"); output.WriteAttribute("class", "row1"); output.WriteAttribute("nowrap", "true"); output.WriteAttribute("valign", "top"); output.Write(HtmlTextWriter.TagRightChar); output.Write(" to delete: "); output.WriteEndTag("td"); output.WriteBeginTag("td"); output.WriteAttribute("class", "row1"); output.WriteAttribute("width", "100%"); output.Write(HtmlTextWriter.TagRightChar); output.Write(yariMediaRecord.ToString()); output.WriteEndTag("td"); output.WriteEndTag("tr"); output.WriteFullBeginTag("tr"); output.WriteBeginTag("td"); output.WriteAttribute("colspan", "2"); output.WriteAttribute("align", "right"); output.WriteAttribute("class", "row1"); output.Write(HtmlTextWriter.TagRightChar); btOk.RenderControl(output); output.Write(" "); btCancel.RenderControl(output); output.WriteEndTag("td"); output.WriteEndTag("tr"); }
protected override void OnPreRender(EventArgs e) { if (yariMediaRecordID != 0) { yariMediaRecord = new YariMediaRecord(yariMediaRecordID); text = "Delete - " + yariMediaRecord.ToString(); } else { text = "Delete "; } EnsureWindowScripts(); }
protected override void OnPreRender(EventArgs e) { if (yariMediaRecordID != 0) { yariMediaRecord = new YariMediaRecord(yariMediaRecordID); #region Bind Default Folder // // Set Field Entries // ltEndNoteReferenceID.Text = yariMediaRecord.EndNoteReferenceID.ToString(); ltPublishYear.Text = yariMediaRecord.PublishYear.ToString(); ltTitle.Text = yariMediaRecord.Title.ToString(); ltPages.Text = yariMediaRecord.Pages.ToString(); ltEdition.Text = yariMediaRecord.Edition.ToString(); ltIsbn.Text = yariMediaRecord.Isbn.ToString(); ltLabel.Text = yariMediaRecord.Label.ToString(); ltAbstractText.Text = yariMediaRecord.AbstractText.ToString(); ltContentsText.Text = yariMediaRecord.ContentsText.ToString(); ltNotesText.Text = yariMediaRecord.NotesText.ToString(); ltAmazonFillDate.Text = yariMediaRecord.AmazonFillDate.ToString(); ltAmazonRefreshDate.Text = yariMediaRecord.AmazonRefreshDate.ToString(); ltImageUrlSmall.Text = yariMediaRecord.ImageUrlSmall.ToString(); ltImageUrlMedium.Text = yariMediaRecord.ImageUrlMedium.ToString(); ltImageUrlLarge.Text = yariMediaRecord.ImageUrlLarge.ToString(); ltAmazonListPrice.Text = yariMediaRecord.AmazonListPrice.ToString(); ltAmazonOurPrice.Text = yariMediaRecord.AmazonOurPrice.ToString(); ltAmazonAvailability.Text = yariMediaRecord.AmazonAvailability.ToString(); ltAmazonMedia.Text = yariMediaRecord.AmazonMedia.ToString(); ltAmazonReleaseDate.Text = yariMediaRecord.AmazonReleaseDate.ToString(); ltAmazonAsin.Text = yariMediaRecord.AmazonAsin.ToString(); ltAbstractEnabled.Text = yariMediaRecord.AbstractEnabled.ToString(); ltContentsEnabled.Text = yariMediaRecord.ContentsEnabled.ToString(); ltNotesEnabled.Text = yariMediaRecord.NotesEnabled.ToString(); ltAuthors.Text = yariMediaRecord.Authors.ToString(); ltSecondaryAuthors.Text = yariMediaRecord.SecondaryAuthors.ToString(); ltPublisher.Text = yariMediaRecord.Publisher.ToString(); // // Set Children Selections // // MediaType if (yariMediaRecord.MediaType != null) { ltMediaType.Text = yariMediaRecord.MediaType.ToString(); } else { ltMediaType.Text = string.Empty; } // Keywords if (yariMediaRecord.Keywords != null) { ltKeywords.Text = yariMediaRecord.Keywords.ToString(); } else { ltKeywords.Text = string.Empty; } #endregion #region Bind _system Folder // // Set Field Entries // // // Set Children Selections // #endregion text = "View - " + yariMediaRecord.ToString(); } }
protected override void OnPreRender(EventArgs e) { if (yariMediaRecordID != 0 & loadFlag) { editYariMediaRecord = new YariMediaRecord(yariMediaRecordID); // // Set Field Entries // tbEndNoteReferenceID.Text = editYariMediaRecord.EndNoteReferenceID.ToString(); tbPublishYear.Text = editYariMediaRecord.PublishYear.ToString(); tbTitle.Text = editYariMediaRecord.Title; tbPages.Text = editYariMediaRecord.Pages.ToString(); tbEdition.Text = editYariMediaRecord.Edition; tbIsbn.Text = editYariMediaRecord.Isbn; tbLabel.Text = editYariMediaRecord.Label; ftbAbstractText.ContentHTML = editYariMediaRecord.AbstractText; ftbContentsText.ContentHTML = editYariMediaRecord.ContentsText; tbNotesText.Text = editYariMediaRecord.NotesText; deAmazonFillDate.Date = editYariMediaRecord.AmazonFillDate; deAmazonRefreshDate.Date = editYariMediaRecord.AmazonRefreshDate; tbImageUrlSmall.Text = editYariMediaRecord.ImageUrlSmall; tbImageUrlMedium.Text = editYariMediaRecord.ImageUrlMedium; tbImageUrlLarge.Text = editYariMediaRecord.ImageUrlLarge; ltAmazonListPrice.Text = editYariMediaRecord.AmazonListPrice.ToString(); ltAmazonOurPrice.Text = editYariMediaRecord.AmazonOurPrice.ToString(); ltAmazonAvailability.Text = editYariMediaRecord.AmazonAvailability.ToString(); ltAmazonMedia.Text = editYariMediaRecord.AmazonMedia.ToString(); ltAmazonReleaseDate.Text = editYariMediaRecord.AmazonReleaseDate.ToString(); ltAmazonAsin.Text = editYariMediaRecord.AmazonAsin.ToString(); cbAbstractEnabled.Checked = editYariMediaRecord.AbstractEnabled; cbContentsEnabled.Checked = editYariMediaRecord.ContentsEnabled; cbNotesEnabled.Checked = editYariMediaRecord.NotesEnabled; tbAuthors.Text = editYariMediaRecord.Authors; tbSecondaryAuthors.Text = editYariMediaRecord.SecondaryAuthors; tbPublisher.Text = editYariMediaRecord.Publisher; // // Set Children Selections // if (editYariMediaRecord.MediaType != null) { foreach (ListItem item in msMediaType.Items) { item.Selected = editYariMediaRecord.MediaType.ID.ToString() == item.Value; } } foreach (ListItem i in msKeywords.Items) { foreach (YariMediaKeyword yariMediaKeyword in editYariMediaRecord.Keywords) { if (i.Value == yariMediaKeyword.ID.ToString()) { i.Selected = true; break; } } } Text = "Edit - " + editYariMediaRecord.ToString(); } else { Text = "Add "; } }