Exemple #1
0
        public bool DeleteHoaDon(string mahoadon)
        {
            ChiTietHoaDonBus ctb = new ChiTietHoaDonBus();

            foreach (string ct in ctb.GetMaCTHoaDonList(mahoadon))
            {
                if (ctb.DeleteChiTietHD(ct))
                {
                    Console.WriteLine("Delete: {0}", ct);
                }
            }
            return(objHoaDon.DeleteRow(mahoadon));
        }
Exemple #2
0
        public bool UpdateHoaDon(HoaDonDTO hd)
        {
            if (objHoaDon.IsRowExists(hd.MaHoaDon))
            {
                ChiTietHoaDonBus ctb = new ChiTietHoaDonBus();
                foreach (string ct in ctb.GetMaCTHoaDonList(hd.MaHoaDon))
                {
                    if (ctb.DeleteChiTietHD(ct))
                    {
                        Console.WriteLine("Delete: {0}", ct);
                    }
                }
                return(objHoaDon.UpdateRow(hd));
            }

            else
            {
                return(false);
            }
        }