public bool themPhieuDatDV(DTO_PhieuDatDichVu pddv) { //ket noi SQLiteConnection connect = db.getConnection(); connect.Open(); try { Console.WriteLine($"{pddv.MaDichVu}"); string SQL = string.Format("INSERT INTO phieudatdichvu(MaTiecCuoi, MaDichVu, SoLuong) VALUES('{0}', '{1}', '{2}');", pddv.MaTiecCuoi, pddv.MaDichVu, pddv.SoLuong); SQLiteCommand cmd = new SQLiteCommand(SQL, connect); if (cmd.ExecuteNonQuery() > 0) { return(true); } } catch (SQLiteException e) { Console.WriteLine($"{e}"); } finally { //dong ket noi connect.Close(); } return(false); }
public bool themPhieuDatDV(DTO_PhieuDatDichVu pddv) { return(dalTiecCuoi.themPhieuDatDV(pddv)); }