public static int updateWard(Ward oldWard, Ward newWard)
     throws ClassNotFoundException, SQLException {
   String query =
       "update Ward set WardName='"
           + newWard.getWardName()
           + "' where WardName='"
           + oldWard.getWardName()
           + "'";
   Connection connection = DBConnection.getConnectionToDB();
   int res = DBHandler.setData(connection, query);
   return res;
 }
  public static int deleteWard(Ward ward) throws ClassNotFoundException, SQLException {

    String query = "Delete from Ward where WardName='" + ward.getWardName() + "'";
    Connection connection = DBConnection.getConnectionToDB();
    int res = DBHandler.setData(connection, query);
    return res;
  }
 public static int addWard(Ward ward) throws ClassNotFoundException, SQLException {
   String query = "Insert into Ward(WardName) values ('" + ward.getWardName() + "')";
   Connection connection = DBConnection.getConnectionToDB();
   int res = DBHandler.setData(connection, query);
   return res;
 }