public static int AddHoaDon(HoaDon hd, List <ChiTietHoaDon> cthd) { int i = 0; Console.Out.Write(hd.ToSQLString()); if (ExecuteQuery.AddRows(hd.ToSQLString(), "HoaDon") > 0) { String id = ExecuteQuery.getMahd(); foreach (ChiTietHoaDon x in cthd) { x.Mahd = id; if (CTHDDAO.AddCTHD(x) > 0 && ExecuteQuery.RefeshSL(x.Matb.Matb, x.Soluong) > 0) { i++; } } } return(i); }
public static int AddCTHD(ChiTietHoaDon cthd) { return(ExecuteQuery.AddRows(cthd.ToString(), "CTHoaDon")); }
//Thêm thiết bị public static int AddThietBi(ThietBi tb) { return(ExecuteQuery.AddRows(tb.ToString(), "ThietBi")); }
public static int AddKhachHang(KhachHang kh) { return(ExecuteQuery.AddRows(kh.ToString(), "KhachHang")); }
public static int AddHoaDon(HoaDon hd) { return(ExecuteQuery.AddRows(hd.ToString(), "HoaDon")); }