Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,12 @@
</a></h2> -->
<table>
<tr>
<td><a href="AssignTPCF.html">Assign TPC</a></td>
<td><a href="AssignTPCF.html">Assign Student TPC</a></td>
</tr>
<tr>
<td><a href="RemoveTPCF.html">Remove Student TPC</a></td>
</tr>

<tr>
<td><a href="ViewUsersF.html">View Users</a></td>
</tr>
Expand Down
15 changes: 15 additions & 0 deletions PMS_v2-master(edited)/WebContent/WEB-INF/views/alTPC.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Already A TPC</title>
</head>
<body>
The individual you are trying to assign as TPC is already a TPC..!
<br/>
<br/>
Kindly go back and change your preferences..!
</body>
</html>
15 changes: 15 additions & 0 deletions PMS_v2-master(edited)/WebContent/WEB-INF/views/alTPO.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Already A TPO</title>
</head>
<body>
The individual you are trying to assign as TPO is already a TPO..!
<br/>
<br/>
Kindly go back and change your preferences..!
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</style>
</head>
<body>
<h2>Assign TPC</h2>
<h2>Assign Student TPC</h2>
<form:form method="POST" action="SubmitAssignTPCF">
<table>
<tr>
Expand Down
18 changes: 18 additions & 0 deletions PMS_v2-master(edited)/WebContent/WEB-INF/views/noUser.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>No User</title>
</head>
<body>
No such user exists..!
<br/>
<br/>
Kindly check the username entered by you...!
<br/>
<br/>
Please go back and change your preferences..!
</body>
</html>
14 changes: 14 additions & 0 deletions PMS_v2-master(edited)/WebContent/WEB-INF/views/notFac.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Not Faculty</title>
</head>
<body>
This individual cannot be assigned the desired post because he/she is not a Faculty Member
<br/>
Kindly go back and change your preferences..!
</body>
</html>
15 changes: 15 additions & 0 deletions PMS_v2-master(edited)/WebContent/WEB-INF/views/notStud.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Not Student</title>
</head>
<body>
This individual cannot be assigned as Student TPC because he/she is not a Student
<br/>
<br/>
Kindly go back and change your preferences..!
</body>
</html>
15 changes: 15 additions & 0 deletions PMS_v2-master(edited)/WebContent/WEB-INF/views/notTPC.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Not TPC</title>
</head>
<body>
This individual cannot be removed ...!
<br/>
<br/>
Kindly go back and change your preferences..!
</body>
</html>
15 changes: 15 additions & 0 deletions PMS_v2-master(edited)/WebContent/WEB-INF/views/notTPO.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Not TPO</title>
</head>
<body>
This individual cannot be removed as TPO because he/she is not a TPO
<br/>
<br/>
Kindly go back and change your preferences..!
</body>
</html>
37 changes: 37 additions & 0 deletions PMS_v2-master(edited)/WebContent/WEB-INF/views/removeTPCF.jsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Remove Student TPC</title>
<style>
.error {
color: #ff0000;
font-style: italic;
font-weight: bold;
}
</style>
</head>
<body>
<h2>Remove Student TPC</h2>
<form:form method="POST" action="SubmitRemoveTPCF">
<table>
<tr>
<td><form:label path="userName">User name:</form:label></td>
<td><form:input path="userName" /></td>
<td><form:errors path="userName" cssClass="error" /></td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Submit" /></td>
</tr>
</table>
</form:form>
<tr>
<td><a href="FTPCHome">Home</a></td>
</tr>

</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,6 @@ public ModelAndView assignTPC(@ModelAttribute("command") UserDetailsBean userBea
return new ModelAndView("assignTPC");
}










@RequestMapping(value = "/RemoveTPC", method = RequestMethod.GET)
public ModelAndView removeTPC(@ModelAttribute("command") UserDetailsBean userBean, BindingResult result) {
System.out.println("In Remove TPC\n");
Expand All @@ -96,8 +87,23 @@ public ModelAndView submitAssignTPC(@ModelAttribute("command") UserDetailsBean u
//System.out.println("Task Assigned is "+fuserBean.getUserWork());
int a;
a=userService.assignTPC(userBean);
FacultyUserBean fuserBean= new FacultyUserBean();

// FacultyUserBean fuserBean= new FacultyUserBean();
System.out.println("Value Returned from Service: "+a);
if(a==0)
{
return new ModelAndView("noUser");
}
if(a==3)
{
return new ModelAndView("notStud");
}
if(a==4)
{
return new ModelAndView("notFac");
}
if(a==34){
return new ModelAndView("alTPC");
}
return new ModelAndView("redirect:/ViewUsersT");
//return new ModelAndView("redirect:/TPOHome");
}
Expand All @@ -114,8 +120,15 @@ public ModelAndView createWork(@ModelAttribute("command") FacultyUserBean fuserB
return new ModelAndView("insertWork");
}
System.out.println("Username in Controller :"+fuserBean.getUserName());
userService.insertWork(fuserBean);

int a;
a=userService.insertWork(fuserBean);

System.out.println("Value Returned from Service: "+a);
if(a==0)
{
return new ModelAndView("noUser");
}

return new ModelAndView("redirect:/ViewFacultyTasks");
}

Expand All @@ -128,7 +141,17 @@ public ModelAndView submitRemoveTPC(@ModelAttribute("command") UserDetailsBean u
System.out.println("Binding Errors are present...");
return new ModelAndView("removeTPC");
}
userService.removeTPC(userBean);
int a;
a=userService.removeTPC(userBean);
System.out.println("Value Returned from Service: "+a);
if(a==0)
{
return new ModelAndView("noUser");
}
if(a==33)
{
return new ModelAndView("notTPC");
}
return new ModelAndView("redirect:/ViewUsersT");
// return new ModelAndView("redirect:/TPOHome");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,12 @@ public ModelAndView assignTPO(@ModelAttribute("command") UserDetailsBean userBea
System.out.println("In Assign TPO\n");
return new ModelAndView("assignTPO"); }


@RequestMapping(value = "/RemoveTPCF", method = RequestMethod.GET)
public ModelAndView removeTPCF(@ModelAttribute("command") UserDetailsBean userBean, BindingResult result) {
System.out.println("In Remove TPCF\n");
return new ModelAndView("removeTPCF");
}

@RequestMapping(value = "/RemoveTPO", method = RequestMethod.GET)
public ModelAndView removeTPO(@ModelAttribute("command") UserDetailsBean userBean, BindingResult result) {
System.out.println("In Remove TP0\n");
Expand All @@ -81,8 +86,20 @@ public ModelAndView createUser(@ModelAttribute("command") UserDetailsBean userBe
System.out.println("Binding Errors are present...");
return new ModelAndView("assignTPO");
}
userService.assignTPO(userBean);

int a;
a=userService.assignTPO(userBean);
System.out.println("Value Returned from Service: "+a);
if(a==0)
{
return new ModelAndView("noUser");
}
if(a==5)
{
return new ModelAndView("notFac");
}
if(a==55){
return new ModelAndView("alTPO");
}
return new ModelAndView("redirect:/ViewUsersA");
//return new ModelAndView("redirect:/AdminHome");
}
Expand All @@ -92,23 +109,73 @@ public ModelAndView createTPCF(@ModelAttribute("command") UserDetailsBean userBe
validator.validate(userBean, bindingResult);
if (bindingResult.hasErrors()) {
System.out.println("Binding Errors are present...");
return new ModelAndView("assignTPO");
return new ModelAndView("assignTPCF");
}
userService.assignTPCF(userBean);
int a;
a=userService.assignTPCF(userBean);
//return new ModelAndView("redirect:/FTPCHome");
if(a==0)
{
return new ModelAndView("noUser");
}
if(a==3)
{
return new ModelAndView("notStud");
}
if(a==34){
return new ModelAndView("alTPC");
}
return new ModelAndView("redirect:/ViewUsersF");
//return new ModelAndView("redirect:/AdminHome");
}

@RequestMapping(value = "/SubmitRemoveTPO", method = RequestMethod.POST)
public ModelAndView deleteUser(@ModelAttribute("command") UserDetailsBean userBean, BindingResult bindingResult) {

System.out.println("In Submit RemoveTPo");
validator.validate(userBean, bindingResult);
System.out.println("In Submit RemoveTPo");
if (bindingResult.hasErrors()) {
System.out.println("Binding Errors are present...");
return new ModelAndView("removeTPO");
}
userService.removeTPO(userBean);
int a;
a=userService.removeTPO(userBean);
System.out.println("Value Returned from Service: "+a);
if(a==0)
{
return new ModelAndView("noUser");
}
if(a==55)
{
return new ModelAndView("notTPO");
}
return new ModelAndView("redirect:/ViewUsersA");
//return new ModelAndView("redirect:/AdminHome");
}

@RequestMapping(value = "/SubmitRemoveTPCF", method = RequestMethod.POST)
public ModelAndView deleteTPCF(@ModelAttribute("command") UserDetailsBean userBean, BindingResult bindingResult) {

System.out.println("In Submit RemoveTPCF");
validator.validate(userBean, bindingResult);

if (bindingResult.hasErrors()) {
System.out.println("Binding Errors are present...");
return new ModelAndView("removeTPCF");
}
int a;
a=userService.removeTPCF(userBean);
System.out.println("in Remove TPCF:Value Returned from Service: "+a);
if(a==0)
{
return new ModelAndView("noUser");
}
if(a==55)
{
return new ModelAndView("notTPC");
}
return new ModelAndView("redirect:/ViewUsersF");
//return new ModelAndView("redirect:/AdminHome");
}
}
Loading