Example #1
0
 private void button7_Click(object sender, EventArgs e)
 {
     using (Form_FinishOrder uf = new Form_FinishOrder())
     {
         uf.ShowDialog();
     }
 }
Example #2
0
        /// <summary>
        /// Finishes the order if possible.
        /// </summary>
        /// <param name="sender">Contains a reference to the control that raised the event.</param>
        /// <param name="e">Contains the event data.</param>
        private void button_Finish_Click(object sender, EventArgs e)
        {
            if (listViewCart.Items.Count == 0)
            {
                MessageBox.Show("Add books to cart please!");
            }
            else
            {
                foreach (ListViewItem item in listViewCart.Items)
                {
                    books.Add(business.GetBookByBarcode(int.Parse(item.SubItems[3].Text)));
                    quantity.Add(int.Parse(item.SubItems[1].Text));
                }

                using (Form_FinishOrder uf = new Form_FinishOrder())
                {
                    uf.ShowDialog();
                }

                listViewCart.Items.Clear();
                books             = new List <book>();
                quantity          = new List <int>();
                label_Amount.Text = "0.00 $";
            }
        }
Example #3
0
 private void btnXacNhan_Click(object sender, EventArgs e)
 {
     if (lvGio.Items.Count == 0)
     {
         MessageBox.Show("Vui lòng thêm sách", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Warning);
         return;
     }
     tongTien = 0;
     foreach (ListViewItem item in lvGio.Items)
     {
         tongTien += int.Parse(item.SubItems[4].Text) * int.Parse(item.SubItems[3].Text);
     }
     using Form_FinishOrder uf = new Form_FinishOrder(tongTien, txtBoxHoten.Text, txtBoxSodienthoai.Text, dtpNgay.Value, lvGio, this.taotaikhoan, diachi, email);
     uf.ShowDialog();
     maHD = uf.maHD;
     if (maHD != -1)
     {
         VietCTHD();
         lvGio.Items.Clear();
         lbltongTien.Text = "0";
     }
 }