Пример #1
0
        private void Showbill(int id)
        {
            lsvBill.Items.Clear();
            txtTongTien.Text = "";
            float          tongtien = 0;
            List <MenuDTO> lst      = MenuDAO.GetListMenuByBillInfoID(id);

            //List<BillInfoDTO> lst = BillInfoDAO.GetListBillIfnfoByIDBill(BillDAO.GetUncheckedBillIDByTableID(id));
            foreach (MenuDTO item in lst)
            {
                ListViewItem lsvitem = new ListViewItem(item.Foodname.ToString());
                lsvitem.SubItems.Add(item.Count.ToString());
                lsvitem.SubItems.Add(item.Dongia.ToString());
                lsvitem.SubItems.Add(item.Thanhtien.ToString());
                tongtien += item.Thanhtien;
                CultureInfo culture = new CultureInfo("vi-VN");
                thanhtoan        = tongtien;
                txtTongTien.Text = tongtien.ToString("c", culture);
                lsvBill.Items.Add(lsvitem);
            }
        }