Ejemplo n.º 1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int bookId = Convert.ToInt32(Request.QueryString["BookId"]);
        int userId = Convert.ToInt32(HttpContext.Current.User.Identity.Name);

        face.NavigateUrl = Request.Url.AbsolutePath + "?type=2&ct=1&bookId=" + bookId;
        vs.NavigateUrl   = Request.Url.AbsolutePath + "?type=2&ct=2&bookId=" + bookId;
        List <Model.VolumeInfo> list = IA.getBookVolumes(userId, bookId);

        if (list.Count > 0)
        {
            lbname.Text = list[0].BookName;
        }
        gr1.DataSource = IA.getBookVolumes(userId, bookId);
        gr1.DataBind();
    }
Ejemplo n.º 2
0
    protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
    {
        int userId = Convert.ToInt32(HttpContext.Current.User.Identity.Name);

        DropDownList1.DataSource     = Ia.getBookVolumes(userId, Convert.ToInt32(DropDownList2.SelectedValue));
        DropDownList1.DataTextField  = "ValumeName";
        DropDownList1.DataValueField = "VolumeId";
        DropDownList1.DataBind();
    }
Ejemplo n.º 3
0
 //根据书本ID获取书本卷
 public List <Model.VolumeInfo> getBookVolumes(int AuthorId, int bookId)
 {
     return(IA.getBookVolumes(AuthorId, bookId));
 }