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); }
public bool Phuchoitheoten(string ten) { try { DAL_HD objdal = new DAL_HD(); return(objdal.phuchoitheoten(ten)); } catch { throw; } }
public DataTable LayDSHDXoa() { try { DAL_HD objdal = new DAL_HD(); return(objdal.DocSQLXOAHD("tbHoaDon")); } catch (Exception err) { throw; } }
//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; } }
public bool XoaHD(string mahd) { DAL_HD objdal = new DAL_HD(); return(objdal.Xoa(mahd)); }
public DataTable TimTheoTenNV(string tennv) { DAL_HD objdal = new DAL_HD(); return(objdal.TimTenNV(tennv)); }
public DataTable TimTheoMaHD(string mahd) { DAL_HD objdal = new DAL_HD(); return(objdal.TimMaHD(mahd)); }
public bool ThemHDNhap(BEL_HDNHAP HD) { DAL_HD xuLyHD = new DAL_HD(); return(xuLyHD.ThemHDNhap(HD)); }
public bool ThemCTHDNHAP(BEL_CTHD chiTietHDNhap) { DAL_HD xuLyHD = new DAL_HD(); return(xuLyHD.ThemCTHDNHAP(chiTietHDNhap)); }
public bool CapNhatTrung() { var xuly = new DAL_HD(); return(xuly.CapNhaphdTrung()); }
public bool CapNhapKM_MaKH(double giam, int ma) { var xuly = new DAL_HD(); return(xuly.CapNhapKM_MAKH(giam, ma)); }
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)); }
public bool XoaSachHD(string ma) { var xuly = new DAL_HD(); return(xuly.XoaHD(ma)); }
public bool CapNhaphd(BEL_HD hd) { var xuly = new DAL_HD(); return(xuly.CapNhaphd(hd)); }
public bool ThemHD(BEL_HD hd) { var xuly = new DAL_HD(); return(xuly.ThemHD(hd)); }
public DataTable LayDanhSachCTHDNhap() { DAL_HD xuLyHD = new DAL_HD(); return(xuLyHD.LayDanhSachCTHDNhap()); }
public bool CapNhaDaTru() { var xuly = new DAL_HD(); return(xuly.CapNhapDaTru()); }
public DataTable LayDanhSachHDBan() { DAL_HD xuLyHD = new DAL_HD(); return(xuLyHD.LayDanhSachHDBan()); }
/* 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)); }
public bool ThemCTHDBan(BEL_CTHD chiTietHDBan) { DAL_HD xuLyHD = new DAL_HD(); return(xuLyHD.ThemCTHDBan(chiTietHDBan)); }
public DataTable LayDSHD_HD() { DAL_HD objdal = new DAL_HD(); return(objdal.DocSQLHD_HD("tbHoaDon")); }
public bool ThemHDBan(BEL_HDBAN HD) { DAL_HD xuLyHD = new DAL_HD(); return(xuLyHD.ThemHDBan(HD)); }
public DataTable LayDSMaHD() { DAL_HD objdal = new DAL_HD(); return(objdal.DocSQLMaHD()); }