Пример #1
0
        public string LayMaHD(DataTable dt)
        {
            string MAHD = "";

            DAL_HD xuLyHD = new DAL_HD();
            int    total  = 1;

            do
            {
                MAHD = "HD";
                if (total < 10)
                {
                    MAHD += "00" + total.ToString();
                }
                else if (total < 100)
                {
                    MAHD += "0" + total.ToString();
                }
                else
                {
                    MAHD += total.ToString();
                }
                total++;
            } while (!xuLyHD.TaoMaHD(MAHD, total - 1, dt));
            return(MAHD);
        }
Пример #2
0
 public bool Phuchoitheoten(string ten)
 {
     try
     {
         DAL_HD objdal = new DAL_HD();
         return(objdal.phuchoitheoten(ten));
     }
     catch
     {
         throw;
     }
 }
Пример #3
0
 public DataTable LayDSHDXoa()
 {
     try
     {
         DAL_HD objdal = new DAL_HD();
         return(objdal.DocSQLXOAHD("tbHoaDon"));
     }
     catch (Exception err)
     {
         throw;
     }
 }
Пример #4
0
 //public DataTable LayTongTienBan()
 //{
 //    try
 //    {
 //        DAL_HD objdal = new DAL_HD();
 //        return objdal.LayTongTienBan("tbHoaDon");
 //    }
 //    catch (Exception err)
 //    {
 //        throw;
 //    }
 //}
 public bool Phuchoitheoma(string ma)
 {
     try
     {
         DAL_HD objdal = new DAL_HD();
         return(objdal.phuchoitheoma(ma));
     }
     catch
     {
         throw;
     }
 }
Пример #5
0
        public bool XoaHD(string mahd)
        {
            DAL_HD objdal = new DAL_HD();

            return(objdal.Xoa(mahd));
        }
Пример #6
0
        public DataTable TimTheoTenNV(string tennv)
        {
            DAL_HD objdal = new DAL_HD();

            return(objdal.TimTenNV(tennv));
        }
Пример #7
0
        public DataTable TimTheoMaHD(string mahd)
        {
            DAL_HD objdal = new DAL_HD();

            return(objdal.TimMaHD(mahd));
        }
Пример #8
0
        public bool ThemHDNhap(BEL_HDNHAP HD)
        {
            DAL_HD xuLyHD = new DAL_HD();

            return(xuLyHD.ThemHDNhap(HD));
        }
Пример #9
0
        public bool ThemCTHDNHAP(BEL_CTHD chiTietHDNhap)
        {
            DAL_HD xuLyHD = new DAL_HD();

            return(xuLyHD.ThemCTHDNHAP(chiTietHDNhap));
        }
Пример #10
0
        public bool CapNhatTrung()
        {
            var xuly = new DAL_HD();

            return(xuly.CapNhaphdTrung());
        }
Пример #11
0
        public bool CapNhapKM_MaKH(double giam, int ma)
        {
            var xuly = new DAL_HD();

            return(xuly.CapNhapKM_MAKH(giam, ma));
        }
Пример #12
0
        public DataTable LayDSHD_TheoNgay(int ngay1, int ngay2, int thang1, int thang2)
        {
            DAL_HD objdal = new DAL_HD();

            return(objdal.DocSQLHD_TheoNgay(ngay1, ngay2, thang1, thang2));
        }
Пример #13
0
        public bool XoaSachHD(string ma)
        {
            var xuly = new DAL_HD();

            return(xuly.XoaHD(ma));
        }
Пример #14
0
        public bool CapNhaphd(BEL_HD hd)
        {
            var xuly = new DAL_HD();

            return(xuly.CapNhaphd(hd));
        }
Пример #15
0
        public bool ThemHD(BEL_HD hd)
        {
            var xuly = new DAL_HD();

            return(xuly.ThemHD(hd));
        }
Пример #16
0
        public DataTable LayDanhSachCTHDNhap()
        {
            DAL_HD xuLyHD = new DAL_HD();

            return(xuLyHD.LayDanhSachCTHDNhap());
        }
Пример #17
0
        public bool CapNhaDaTru()
        {
            var xuly = new DAL_HD();

            return(xuly.CapNhapDaTru());
        }
Пример #18
0
        public DataTable LayDanhSachHDBan()
        {
            DAL_HD xuLyHD = new DAL_HD();

            return(xuLyHD.LayDanhSachHDBan());
        }
Пример #19
0
        /*       public bool CapNhapTThai()
         *     {
         *         var xuly = new DAL_HD();
         *         return xuly.CapNhapTThaiHD();
         *     }
         *     public bool LayHD()
         *     {
         *         var xuly = new DAL_HD();
         *         return xuly.LayHD();
         *     }*/

        public DataTable LayDSHD(string ten)
        {
            DAL_HD objdal = new DAL_HD();

            return(objdal.DocSQLHD("tbHoaDon", ten));
        }
Пример #20
0
        public bool ThemCTHDBan(BEL_CTHD chiTietHDBan)
        {
            DAL_HD xuLyHD = new DAL_HD();

            return(xuLyHD.ThemCTHDBan(chiTietHDBan));
        }
Пример #21
0
        public DataTable LayDSHD_HD()
        {
            DAL_HD objdal = new DAL_HD();

            return(objdal.DocSQLHD_HD("tbHoaDon"));
        }
Пример #22
0
        public bool ThemHDBan(BEL_HDBAN HD)
        {
            DAL_HD xuLyHD = new DAL_HD();

            return(xuLyHD.ThemHDBan(HD));
        }
Пример #23
0
        public DataTable LayDSMaHD()
        {
            DAL_HD objdal = new DAL_HD();

            return(objdal.DocSQLMaHD());
        }