Beispiel #1
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userid"] == null || Session["username"] == null)
        {
            Response.Redirect("/index.aspx", true);
        }
        b_id = int.Parse(Request.QueryString.Get("bookid"));

        if (!(b_name.Text.Equals("") && b_no.Text.Equals("") && b_total.Text.Equals("") && b_newnumber.Text.Equals("")))
        {
            name      = b_name.Text;
            no        = int.Parse(b_no.Text);
            total     = int.Parse(b_total.Text);
            newnumber = int.Parse(b_newnumber.Text);
        }

        Book book = new DataBook().GetOneBookInfo(int.Parse(Request.QueryString.Get("bookid")));

        b_name.Text      = book.B_name;
        b_no.Text        = "" + book.B_no;
        b_total.Text     = "" + book.B_total;
        b_newnumber.Text = "" + book.B_total;

        List <Booktype> booktypes = new DataBooktype().GetBooktypes();

        booklist.DataTextField  = "t_name";
        booklist.DataValueField = "t_id";
        booklist.DataSource     = booktypes;
        if (!booklist.SelectedValue.Equals(""))
        {
            t_id = int.Parse(booklist.SelectedValue);
        }
        booklist.DataBind();
    }
Beispiel #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userid"] == null || Session["username"] == null)
        {
            Response.Redirect("/index.aspx", true);
        }
        booktypeid = int.Parse(Request.QueryString.Get("booktypeid"));
        if (!(t_name.Text.Equals("")))
        {
            name = t_name.Text;
        }

        t_name.Text = Request.QueryString.Get("type_name");

        List <Booktype> booktypes = new DataBooktype().GetBooktypes();

        booktypelist.DataTextField  = "t_name";
        booktypelist.DataValueField = "t_id";
        booktypelist.DataSource     = booktypes;
        if (!booktypelist.SelectedValue.Equals(""))
        {
            t_subid = int.Parse(booktypelist.SelectedValue);
        }
        booktypelist.DataBind();
    }
Beispiel #3
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userid"] == null || Session["username"] == null)
        {
            Response.Redirect("/index.aspx", true);
        }
        List <Booktype> booktypes = new DataBooktype().GetBooktypes();

        booktypesons = BooktypeTree(booktypes, 1, 1);
    }
Beispiel #4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["userid"] == null || Session["username"] == null)
        {
            Response.Redirect("/index.aspx", true);
        }
        List <Booktype> booktypes = new DataBooktype().GetBooktypes();

        booklist.DataTextField  = "t_name";
        booklist.DataValueField = "t_id";
        booklist.DataSource     = booktypes;
        t_id = booklist.SelectedValue;
        booklist.DataBind();
    }