Exemple #1
0
        public void Xoa()
        {
            Console.Clear();
            Console.WriteLine("XOA THONG TIN KHACH HANG");
            List <Khachhang> list = khBLL.GetAllKhachHang();
            string           makhachhang;

            Console.Write("Nhap ma khach hang can xoa:");
            makhachhang = Console.ReadLine();
            int i = 0;

            for (i = 0; i < list.Count; ++i)
            {
                if (list[i].MaKhach == makhachhang)
                {
                    break;
                }
            }

            if (i < list.Count)
            {
                list.RemoveAt(i);
                khBLL.XoaKhachHang(makhachhang);
            }
            else
            {
                Console.WriteLine("Khong ton tai ma khach hang nay");
            }
        }
Exemple #2
0
        public void Xoa()
        {
            Console.Clear();
            Console.WriteLine("------------------------------XÓA THÔNG TIN KHÁCH HÀNG------------------------------");
            List <KhachHang> list = khBLL.GetAllKhachHang();
            string           makhachhang;

            Console.Write("Nhập mã khách hàng cần xóa:");
            makhachhang = Console.ReadLine();
            int i = 0;

            for (i = 0; i < list.Count; ++i)
            {
                if (list[i].MaKhachHang == makhachhang)
                {
                    break;
                }
            }

            if (i < list.Count)
            {
                list.RemoveAt(i);
                khBLL.XoaKhachHang(makhachhang);
            }
            else
            {
                Console.WriteLine("                         Không tồn tại mã khách hàng này!!!");
            }
        }
Exemple #3
0
        public void Xoa()
        {
            Console.Clear();
            Console.SetCursorPosition(25, 5); Console.WriteLine("╔═══════════════════════════════════════════════════════════════════════════╗");
            Console.SetCursorPosition(25, 6); Console.WriteLine("║                            Xóa Thông Tin Khách Hàng                       ║");
            Console.SetCursorPosition(25, 7); Console.WriteLine("╠═══════════════════════════════════════════════════════════════════════════╣");
            Console.SetCursorPosition(25, 15); Console.WriteLine("╚═══════════════════════════════════════════════════════════════════════════╝");
            List <Khachhang> list = KH.GetAllKhachHang();
            string           Maxoa;

            Console.SetCursorPosition(27, 9); Console.Write("Nhập Mã Khách Hàng Cần Xóa:");
            Maxoa = Console.ReadLine();
            int i;

            for (i = 0; i < list.Count; ++i)
            {
                if (list[i].Makh == Maxoa)
                {
                    break;
                }
            }
            if (i < list.Count)
            {
                Console.SetCursorPosition(27, 11); Console.Write("Xóa Thành Công.....");
                KH.XoaKhachHang(Maxoa);
                Console.ReadKey();
            }
            else
            {
                Console.SetCursorPosition(27, 11); Console.Write("Không Tồn Tại Mã Khách Hàng Nay.....");
                Console.ReadKey();
            }
        }