Example #1
0
    protected void btn_buystone_Click(object sender, EventArgs e)
    {
        BookInfo b = new BookInfo();

        b = Bll_BookInfo.GetBook("Harry Potter and the Philosopher's Stone");
        Session["BookName"] = b.BookName;
        Session["BookID"]   = b.BookID;
        Response.Redirect("Order/Order.aspx?BookID=" + b.BookID + "");
    }
Example #2
0
    protected void btn_fire_Click(object sender, EventArgs e)
    {
        BookInfo b = new BookInfo();

        b = Bll_BookInfo.GetBook("Harry Potter and the Goblet of Fire");
        Session["BookName"] = b.BookName;
        Session["BookID"]   = b.BookID;
        Response.Redirect("Order/Order.aspx?xx=" + b.BookID + "");
    }
Example #3
0
    protected void btn_azkaban_Click(object sender, EventArgs e)
    {
        BookInfo b = new BookInfo();

        b = Bll_BookInfo.GetBook("Harry Potter and the Prisoner of Azkaban");
        Session["BookName"] = b.BookName;
        Session["BookID"]   = b.BookID;
        Response.Redirect("Order/Order.aspx?xx=" + b.BookID + "");
    }
Example #4
0
    protected void btn_buysecrets_Click(object sender, EventArgs e)
    {
        BookInfo b = new BookInfo();

        b = Bll_BookInfo.GetBook("Harry Potter and the Chamber of Secrets");
        Session["BookName"] = b.BookName;
        Session["BookID"]   = b.BookID;
        Response.Redirect("Order/Order.aspx?xx=" + b.BookID + "");
    }
Example #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     book             = Bll_BookInfo.GetBook(Session["BookName"].ToString());
     lb_price.Text    = book.BookPrice;
     lb_num.Text      = "1";
     lb_allprice.Text = lb_price.Text;
     lb_ppprice.Text  = lb_price.Text;
     lb_truepay.Text  = lb_ppprice.Text;
     linkbtn.Text     = book.BookName;
 }
Example #6
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         id = Convert.ToInt32(txt_id.Text.Trim());
         int i = Bll_BookInfo.Delete_Book(id);
         if (i > 0)
         {
             MessageBox.Show("Deleted Successfully");
         }
         else
         {
             MessageBox.Show("Deleted Failed");
         }
     }
     catch
     {
         MessageBox.Show("Deleted Error!");
     }
 }
Example #7
0
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         book.BookName    = txt_name.Text.Trim();
         book.BookPeople  = txt_author.Text.Trim();
         book.BookAddress = txt_publish.Text.Trim();
         book.BookPrice   = comboBox1.Text + txt_price.Text.Trim();
         book.BookDate    = dtp.Text.ToString();
         int i = Bll_BookInfo.Add_Book(book);
         if (i > 0)
         {
             MessageBox.Show("Added Successfully");
         }
         else
         {
             MessageBox.Show("Added Failed");
         }
     }
     catch
     {
         MessageBox.Show("Add Error!");
     }
 }