Beispiel #1
0
        public bool deletePhieuNhap(int maPhieu)
        {
            CTPhieuNhapDao ctDao = new CTPhieuNhapDao();
            bool           ck    = false;

            ck = ctDao.deleteCTPhieuNhap(maPhieu);
            ck = ck && phDao.deletePhieuNhap(maPhieu);

            return(ck);
        }
Beispiel #2
0
        public int AddPhieuNhap(PHIEUNHAP pn, List <CTPHIEUNHAP> listCt)
        {
            int c = 0;

            c = phDao.AddPhieuNhap(pn);
            CTPhieuNhapDao ctDao = new CTPhieuNhapDao();
            DoChoiDao      dcDao = new DoChoiDao();

            foreach (CTPHIEUNHAP it in listCt)
            {
                it.MAPHIEU = pn.MAPHIEU;
                c         += ctDao.AddCTPhieuNhap(it);
                c         += dcDao.addSLDC(it.MADC, it.SL) ? 1 : 0;
            }
            return(c);
        }