protected void Page_Load(object sender, EventArgs e) { int bookId = Convert.ToInt32(Request.QueryString["BookId"]); face.NavigateUrl = Request.Url.AbsolutePath + "?type=2&ct=1&bookId=" + bookId; vs.NavigateUrl = Request.Url.AbsolutePath + "?type=2&ct=2&bookId=" + bookId; //书本状态 List <Model.BookStateInfo> state = new List <Model.BookStateInfo>(); Model.BookStateInfo item = new Model.BookStateInfo(); item.StateId = 1; item.StateName = "连载中"; Model.BookStateInfo item1 = new Model.BookStateInfo(); item1.StateId = 2; item1.StateName = "已完本"; state.Add(item); state.Add(item1); DropDownList1.DataSource = state; DropDownList1.DataTextField = "StateName"; DropDownList1.DataValueField = "StateId"; DropDownList1.DataBind(); //书本类型 IDAL.INovel novel = BllFactory.BllAccess.CreateINovelBLL(); dBookType.DataSource = novel.getBookType(); dBookType.DataTextField = "TypeName"; dBookType.DataValueField = "TypeId"; dBookType.DataBind(); //书本名称 Model.BooksInfo bookItem = novel.getBookIdBooksInfo(bookId); TextBox1.Text = bookItem.BookName; fckAddbooks.Value = bookItem.BookIntroduction; dBookType.SelectedIndex = bookItem.BookType - 1; DropDownList1.SelectedIndex = bookItem.BookState - 1; }
protected void Page_Load(object sender, EventArgs e) { BooksId = Convert.ToInt32(Request.QueryString["bookId"]); VolumeId = dal.getNovelClassInfo(BooksId)[0].VolumeId; List <Model.VolumeInfo> List = dal.getNovelClassInfo(BooksId); List <Model.VolumeInfo> changeList = new List <VolumeInfo>(); foreach (Model.VolumeInfo item in List) { item.ValumeName = Common.Myweeks.changeNumber(item.ValumeName); changeList.Add(item); } repeater.DataSource = changeList; repeater.DataBind(); Model.BooksInfo bookInfo = dal.getBookIdBooksInfo(BooksId); lbBookName.Text = bookInfo.BookName; lbUserName.Text = "作者:" + bookInfo.UserName + " " + "类型:" + bookInfo.TypeName; lbUpdateTime.Text = "更新时间:" + bookInfo.AddTime.ToShortDateString(); }