예제 #1
0
 public static int addNullWarranty() {
   DBWrapper dbw = new DBWrapper();
   Db db = dbw.openConnection();
   Warranty w = new Warranty();
   w.Note = "неопределено";
   w.Warr = "нет";
   db.insert(w);
   w = db.from(w).orderByDesc(w.Kodwarr).selectFirst();
   return w.Kodwarr;
 }
예제 #2
0
 public static int addWarranty(String warr) {
   DBWrapper dbw = new DBWrapper();
   Db db = dbw.openConnection();
   Warranty w = new Warranty();
   if (warr.isEmpty()) {
     w.Warr = "нет";
   } else w.Warr = warr;
   db.insert(w);
   w = db.from(w).orderByDesc(w.Kodwarr).selectFirst();
   return w.Kodwarr;
 }
예제 #3
0
 public static void addClient(
     String phone, String name, String middleName, String passport, String prava, String Surname) {
   DBWrapper dbw = new DBWrapper();
   Db db = dbw.openConnection();
   Clients c = new Clients();
   c.Mphone = phone;
   c.Name = name;
   c.Ochestvo = middleName;
   c.Passport = passport;
   c.Prava = prava;
   c.Surname = Surname;
   db.insert(c);
 }
예제 #4
0
파일: Db.java 프로젝트: nbronson/pepe
 public <T> void insertAll(List<T> list) {
   for (T t : list) {
     insert(t);
   }
 }