예제 #1
0
 public boolean updateQuanTri(
     String idQuanTri,
     String chinhanh,
     String tenTaiKhoan,
     String matKhau,
     String hoTen,
     String diaChi,
     String dienThoai,
     String email) {
   // TODO Auto-generated method stub
   return db.updateData(
           "update TAIKHOAN set MatKhau=N'"
               + matKhau
               + "',HoTen=N'"
               + hoTen
               + "',DiaChi=N'"
               + diaChi
               + "',DienThoai=N'"
               + dienThoai
               + "',Email='"
               + email
               + "' where TenTaiKhoan=N'"
               + tenTaiKhoan
               + "'")
       && db.updateData(
           "update QUANTRI set IdChiNhanh=N'"
               + chinhanh
               + "' where IdQuanTri=N'"
               + idQuanTri
               + "'");
 }
예제 #2
0
 public boolean addQuanTRi(
     String idQuanTri,
     String chinhanh,
     String tenTaiKhoan,
     String matKhau,
     String hoTen,
     String diaChi,
     String dienThoai,
     String email) {
   String sql =
       "insert into TAIKHOAN values(N'"
           + tenTaiKhoan
           + "', N'"
           + matKhau
           + "', N'"
           + hoTen
           + "', N'"
           + diaChi
           + "', N'"
           + dienThoai
           + "', N'"
           + email
           + "')";
   String sql2 =
       "insert into QUANTRI values(N'"
           + idQuanTri
           + "', N'"
           + tenTaiKhoan
           + "', N'Quản lý', N'"
           + chinhanh
           + "')";
   System.out.println(sql);
   System.out.println(sql2);
   return db.updateData(
           "insert into TAIKHOAN values(N'"
               + tenTaiKhoan
               + "', N'"
               + matKhau
               + "', N'"
               + hoTen
               + "', N'"
               + diaChi
               + "', N'"
               + dienThoai
               + "', N'"
               + email
               + "')")
       && db.updateData(
           "insert into QUANTRI values(N'"
               + idQuanTri
               + "', N'"
               + tenTaiKhoan
               + "', N'Quản lý', N'"
               + chinhanh
               + "')")
       && db.updateData("insert into KHACHHANG values (N'" + tenTaiKhoan + "','0')");
 }