Exemple #1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            string      username    = Common.LoginUser.Name;
            AllorderBLL allorderBLL = new AllorderBLL();
            string      str         = allorderBLL.GetAllorders(username);
            indexPage2  p2          = null;

            if (p2 == null)
            {
                p2 = new indexPage2();
            }
            p2.Content     = str;
            change.Content = new Frame()
            {
                Content = p2
            };
        }
        private void Button_Click1(object sender, RoutedEventArgs e)
        {
            string      booksname   = TextBookName.Text;
            string      ordername   = TextOrdername.Text;
            string      address     = TextAddress.Text;
            string      username    = TextSeller.Text;
            int         buycount    = int.Parse(TextCount.Text);
            int         count       = 0;
            AllorderBLL allorderbll = new AllorderBLL();

            count = allorderbll.OrderBook(booksname, buycount, ordername, address, username);
            if (count != 0)
            {
                MessageBox.Show("下单成功!");
            }
            else
            {
                MessageBox.Show("查无此书!");
            }
        }