Esempio n. 1
0
 protected void ddlChapterList_Populate(Guid storyID)
 {
     //make a new chapterlist called cl
     ChapterList cl = new ChapterList();
     // get the right chapter list by the storyID passed in
     cl = cl.GetByStoryID(storyID);
     //bind the list to ddlChapterList
     ddlChapterList.DataSource = cl.List;
     ddlChapterList.DataTextField = "Title";
     ddlChapterList.DataValueField = "ID";
     ddlChapterList.DataBind();
 }
Esempio n. 2
0
        protected void ddlChapters_Populate(Guid storyID)
        {
            //make a new chapter list
            ChapterList cl = new ChapterList();
            //get all chapters by storyID
            cl = cl.GetByStoryID(storyID);
            //bind the list to the ddlChapter
            ddlChapterList.DataSource = cl.List;
            ddlChapterList.DataTextField = "Title";
            ddlChapterList.DataValueField = "ID";
            ddlChapterList.DataBind();

            ddlChapterList.SelectedIndex = ddlChapterList.Items.IndexOf(ddlChapterList.Items.FindByValue(chapter.Id.ToString()));
        }
Esempio n. 3
0
        protected void addNewChapter()
        {
            //make a new chapterlist (use this to get the count)
            ChapterList chapListForCount = new ChapterList();
            //make a new chapter
            chap = new Chapter();
            //get the right chapList by the storyID taken from ddlStory's selected value
            chapListForCount = chapListForCount.GetByStoryID(new Guid(this.ddlStory.SelectedValue));

            //set chap's storyID property to selected value of ddlStory
            chap.StoryID = new Guid(ddlStory.SelectedValue);
            //set chap's title property to text from txtChapTitle
            chap.Title = txtChapTitle.Text;
            //set chap's chaptercontent property to value from hidnEdit
            chap.ChapterContent = hidnEdit.Value;
            //set the chap's chapter order to the chapterlist's count + 1
            chap.ChapterOrder = chapListForCount.List.Count + 1;
        }
        protected void loadStories(Guid storyID)
        {
            ChapterList chapList = new ChapterList();

            chapList = chapList.GetByStoryID(storyID);
        }
Esempio n. 5
0
 void ddlChapters_Populate()
 {
     //make a new ChapterList called chapList
     ChapterList chapList = new ChapterList();
     //enable ddlChapters
     ddlChapters.Enabled = true;
     //set ddlChapters visible property to true
     ddlChapters.Visible = true;
     //get the chapters by the story ID (taken from ddlStory's selected value)
     chapList = chapList.GetByStoryID(new Guid(this.ddlStory.SelectedValue));
     //bind chapList to ddlChapters
     ddlChapters.DataSource = chapList.List;
     ddlChapters.DataTextField = "Title";
     ddlChapters.DataValueField = "ID";
     ddlChapters.DataBind();
     //set ddlChapter's selected index to the index of chapter
     ddlChapters.SelectedIndex = ddlChapters.Items.IndexOf(ddlChapters.Items.FindByValue(chap.Id.ToString()));
 }
Esempio n. 6
0
        protected void DeleteChapters(Guid storyID)
        {
            Guid stryID = new Guid(this.ddlStory.SelectedValue);

            ChapterList chapL = new ChapterList();
            chapL = chapL.GetByStoryID(stryID);
            for (int i = 0; i <= chapL.List.Count; i++)
            {
            }

            ReviewList rvwList = new ReviewList();
        }