-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accept Tickets -- tickets still need to be viewable
- Loading branch information
Brianna
authored and
Brianna
committed
Apr 6, 2017
1 parent
4ac508d
commit 8449075
Showing
6 changed files
with
144 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<%@ page import = "database.*" %> | ||
<%@ page language="java" contentType="text/html; charset=ISO-8859-1" | ||
pageEncoding="ISO-8859-1"%> | ||
<%@ page import = "java.sql.*" %> | ||
<% | ||
MySQLAccess myaccess = new MySQLAccess(); | ||
Statement statement = myaccess.getStatement(); | ||
ResultSet result = statement.executeQuery("select * FROM ticket where Status='Requested'"); | ||
if (result.next()){ | ||
statement.executeQuery("UPDATE ticket SET Status='Approved'"); //is this the right status we wanted?? | ||
myaccess.closeConnection(); | ||
response.sendRedirect("html/webpages/adminApprove.jsp"); | ||
} else { | ||
myaccess.closeConnection(); | ||
response.sendRedirect("adminApprove.jsp"); | ||
} | ||
%> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package entities; | ||
|
||
import java.math.BigInteger; | ||
|
||
//class for tickets | ||
public class Ticket { | ||
private int _id; | ||
private int _requestor; | ||
//private BigInteger _requestDate; | ||
private int _location; | ||
private int _deviceId; | ||
private String _status; | ||
private String _returnDate; | ||
|
||
public Ticket(int id, int requestor, int location, int deviceId, String status, String returnDate){ | ||
this._id = id; | ||
this._requestor = requestor; | ||
//this._requestDate = requestDate; | ||
this._location = location; | ||
this._deviceId = deviceId; | ||
this._status = status; | ||
this._returnDate = returnDate; | ||
} | ||
|
||
public int getId(){ | ||
return _id; | ||
} | ||
public void setId(int id){ | ||
this._id = id; | ||
} | ||
|
||
public int getRequestor(){ | ||
return _requestor; | ||
} | ||
public void setRequestor(int requestor){ | ||
this._requestor = requestor; | ||
} | ||
|
||
/*public BigInteger getRequestDate(){ | ||
return _requestDate; | ||
} | ||
public void setRequestDate(BigInteger requestDate){ | ||
this._requestDate = requestDate; | ||
}*/ | ||
|
||
public int getLocation(){ | ||
return _location; | ||
} | ||
public void setLocation(int location){ | ||
this._location = location; | ||
} | ||
|
||
public int getDeviceId(){ | ||
return _deviceId; | ||
} | ||
public void setDeviceId(int deviceId){ | ||
this._deviceId = deviceId; | ||
} | ||
|
||
public String getStatus(){ | ||
return _status; | ||
} | ||
public void setStatus(String status){ | ||
this._status = status; | ||
} | ||
|
||
public String getReturnDate(){ | ||
return _returnDate; | ||
} | ||
public void setReturnDate(String returnDate){ | ||
this._returnDate = returnDate; | ||
} | ||
} |