resprofile.jsp.svn-base

来自「一个timesheet程序,用来统计开发人员的度量衡web在线程序.用于软件行业」· SVN-BASE 代码 · 共 338 行

SVN-BASE
338
字号
<%@ page import="java.util.List" %>
<%@ page import="com.nsi.components.util.LoginuserUtil" %>
<%@ page import="com.nsi.components.web.util.RsWebUtil" %>
<%@ page import="com.nsi.components.util.EmployeeTypeUtil" %>
<%@ page import="com.nsi.components.util.ResourceUtil" %>
<%@ page import="com.nsi.components.employeetype.EmployeeTypeInfo" %>
<%@ page import="com.nsi.components.resource.ResourceProfileInfo" %>
<% 
String searchtype = RsWebUtil.getInstance().getSearchtype(request);
String empltypeid = RsWebUtil.getInstance().getEmpltypeid(request);
String orderby = RsWebUtil.getInstance().getOrderby(request);
String sequence = RsWebUtil.getInstance().getSequence(request);
boolean disableupdbtn = RsWebUtil.getInstance().isDisableUpdBtn(request);
%>
<html>
<head>
	<meta http-equiv="content-style-type" content="text/css">
	<meta http-equiv="pragma" content="no-cache">
	<title>Achievo-RMS Resources Profile</title>
	<link href="../theme/master.css" rel="stylesheet" type="text/css">
	<% 
	if ( LoginuserUtil.getInstance().isNotLogined(request) ) 
	{
		%><meta http-equiv="refresh" content="0; url=/entrance.jsp"><%
	}
	%>
	<script language="javascript">
	<!--
		function checkresource(theform) 
		{   
			var radiochecked = false; 
			for ( var i = 0; i < theform.resourceid.length; i++ )
			{  
				if( theform.resourceid[i].checked == true )
				{
					radiochecked = true;
				}
			}
			if(theform.resourceid.checked)
			{
				radiochecked = true;
			}
			return radiochecked;
		}
		function submitform( theform, action ) 
		{
			theform.action.value = action;
			if(checkresource(theform))
			{
				theform.submit();
				return true;
			}
			alert("Please select a resource for update!");
			return false; 
		}
	// --> 
	</script>
</head>
<body>
<h1>Resources Profile</h1>
<form name="rp_create_form" method="post" action="/rms/mainservlet">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="450">&nbsp;<td>
		<td>
			<input type="hidden" class="cell" name="urlmapping" value="/resources/resprofcreatepage">
			<input type="submit" class="cell" name="rpadd" value="Add New Resources">
			<input type="hidden" name="isresprofilepage" value="true">
		</td>
	</tr>
</table>
</form>
<form name="resprofsearch_form" method="post" action="/rms/mainservlet">
<table width="837" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="100%">
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="200" class="txtLabel">Employee Status</td>
					<%
					if ( searchtype.equals( "A" ) )
					{
					%>
						<td width="400" class="cell">
							<input type="radio" class="cell" name="searchtype" value="A" checked>&nbsp;&nbsp;Active 
							<input type="radio" class="cell" name="searchtype" value="I" >&nbsp;&nbsp;Inactive 
							<input type="radio" class="cell" name="searchtype" value="S">&nbsp;&nbsp;All 
						</td>
					<%
					}
					else if ( searchtype.equals( "I" ) )
					{
					%>
						<td width="400" class="cell">
							<input type="radio" class="cell" name="searchtype" value="A" >&nbsp;&nbsp;Active 
							<input type="radio" class="cell" name="searchtype" value="I" checked>&nbsp;&nbsp;Inactive 
							<input type="radio" class="cell" name="searchtype" value="S">&nbsp;&nbsp;All 
						</td>
					<%
					}
					else
					{
					%>
						<td width="400" class="cell">
							<input type="radio" class="cell" name="searchtype" value="A" >&nbsp;&nbsp;Active 
							<input type="radio" class="cell" name="searchtype" value="I" >&nbsp;&nbsp;Inactive 
							<input type="radio" class="cell" name="searchtype" value="S" checked>&nbsp;&nbsp;All
						</td>
					<%
					}
					%>
					<td width="100">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td class="txtLabel">Employee Type</td>
					<td class="cell">
					<%
						List<EmployeeTypeInfo> empltypeinfolist = EmployeeTypeUtil.getInstance().getEmployeeTypeList();
						%><select class="cell" name="empltypeid" size="1"><%
						int empltypesize = empltypeinfolist.size();
						for ( int i=0;i<empltypesize;i++ ) 
						{
							EmployeeTypeInfo empltypeinfo = empltypeinfolist.get(i);
							if( empltypeinfo.getEmpltypeid().equals( empltypeid ) )
							{
								%><option class="cell" selected value="<%=empltypeinfo.getEmpltypeid()%>"><%=empltypeinfo.getEmpltypedescription()%></option><%
							} 
							else 
							{
								%><option class="cell" value="<%=empltypeinfo.getEmpltypeid()%>"><%=empltypeinfo.getEmpltypedescription()%></option><%
							}
						}
					%>
						</select>
					</td>
				</tr>
				<tr>
					<td colspan="2">&nbsp;</td>
				</tr>
				<tr>
					<td class="txtLabel">Sort By</td>
					<td class="cell">
						<select class="cell" name="orderby" size="1">
						<%
						if ( orderby.equals( "0" ) )
						{
						%>
							<option class="cell" value="0" selected>Resource Name</option>
						   <option class="cell" value="1">Hiring Date</option>
						   <option class="cell" value="2">Terminate Date</option>
						   <option class="cell" value="3">Employee type</option>
						   <option class="cell" value="4">Agent</option>
						<%
						}
						else if ( orderby.equals( "1" ) )
						{
						%>
							<option class="cell" value="0">Resource Name</option>
						   <option class="cell" value="1" selected>Hiring Date</option>
						   <option class="cell" value="2">Terminate Date</option>
						   <option class="cell" value="3">Employee type</option>
						   <option class="cell" value="4">Agent</option>
						<%
						}
						else if ( orderby.equals( "2" ) )
						{
						%>
							<option class="cell" value="0">Resource Name</option>
						   <option class="cell" value="1">Hiring Date</option>
						   <option class="cell" value="2" selected>Terminate Date</option>
						   <option class="cell" value="3">Employee type</option>
						   <option class="cell" value="4">Agent</option>
						<%
						}
						else if ( orderby.equals( "3" ) )
						{
						%>
							<option class="cell" value="0">Resource Name</option>
						   <option class="cell" value="1">Hiring Date</option>
						   <option class="cell" value="2">Terminate Date</option>
						   <option class="cell" value="3" selected>Employee type</option>
						   <option class="cell" value="4">Agent</option>
						<%
						}
						else if ( orderby.equals( "4" ) )
						{
						%>
							<option class="cell" value="0">Resource Name</option>
						   <option class="cell" value="1">Hiring Date</option>
						   <option class="cell" value="2">Terminate Date</option>
						   <option class="cell" value="3">Employee type</option>
						   <option class="cell" value="4" selected>Agent</option>
						<%
						}
						%>
						</select>
					</td>
				</tr>
				<tr>
					<td width="200" class="txtLabel">Sequence</td>
					<%
					if ( sequence.equals( "A" ) )
					{
					%>
						<td width="400" class="cell">
							<input type="radio" class="cell" name="sequence" value="A" checked>&nbsp;&nbsp;Ascending 
							<input type="radio" class="cell" name="sequence" value="D" >&nbsp;&nbsp;Descending
						</td>
					<%
					}
					else if ( sequence.equals( "D" ) )
					{
					%>
						<td width="400" class="cell">
							<input type="radio" class="cell" name="sequence" value="A" >&nbsp;&nbsp;Ascending
							<input type="radio" class="cell" name="sequence" value="D" checked>&nbsp;&nbsp;Descending
						</td>
					<%
					}
					%>
					<td width="100">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="3">&nbsp;</td>
				</tr>
				<tr>
					<td colspan="2">&nbsp;</td>
				</tr>									
				<tr>	
					<td width="200" class="cell">
						<input size="20" type="hidden" name="urlmapping" value="/resources/resprofmenu">
						<input type="button" class="cell" name="rpsearch" value="Search" onclick="javascript:document.resprofsearch_form.submit();">
						<% 
						if(!disableupdbtn)
						{
							%><input type="button" class="cell" name="rpdisplay" value="Update" onclick="submitform(document.rp_form, 'displayResource');"><%
						}
						%>	
					</td>
					<td width="200" class="txtLabel"></td>	
				</tr>
			</table>
		</td>
	</tr>
</table>	
</form>
<% 
if(RsWebUtil.getInstance().isSearchTypeExit(request))
{
%>	 	
<form name="rp_form" method="post" action="/rms/mainservlet">
<input type="hidden" name="urlmapping" value="/resources/resprofdisplay">
<input type="hidden" name="action" value="displayResource">
<input type="hidden" name="searchtype" value="<%=searchtype%>">
<input type="hidden" name="empltypeid" value="<%=empltypeid%>">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0">
			<%
			List<ResourceProfileInfo> list = ResourceUtil.getInstance().getResourceListByEmptype(searchtype, empltypeid, orderby, sequence);
			if( !list.isEmpty() )
			{
				int size = list.size();
				for( int i=0;i<size;i++ ) 
				{					
				%>
				<tr>
					<td width="60" class="cellHeader">Selected</td>
					<td width="100" class="cellHeader">Resources Name</td>
					<td width="60" class="cellHeader">Status</td>
					<td width="70" class="cellHeader">Hiring Date</td>
					<td width="90" class="cellHeader">Terminate Date</td>
					<td width="130" class="cellHeader">Employee Type</td>
					<td width="130" class="cellHeader">Agency</td>
				</tr>
				<%		
					ResourceProfileInfo info  = list.get(i);
					%>		
					<tr>
						<td width="60" class="cellCenter"><input type="radio" class="cellCenter" name="resourceid" value="<%=info.getResourceid()%>" ></td>
						<td width="100" class="cell"><%=info.getName()%></td>
						<%			
						if(info.getActive())
						{
							%><td width="60" class="cellCenter">Active</td><%			
						} 
						else 
						{
		 					%><td width="60" class="cellCenter">Inactive</td><%			
		 				} 	
		 				%>
						<td width="70" class="cell"><%=info.getStartdate()%></td>
						<td width="90" class="cell"><%=info.getEnddate()%></td>
						<td width="130" class="cell"><%=info.getEmpltype()%></td>
						<td width="130" class="cell"><%=info.getAgency()%></td>
					</tr>	
					<% 
				}
				%>
				<tr>
					<td colspan="7" class="cellCenter"><hr size="1" noshade></td>
				</tr>
			<%
	 		}
			else
			{
			%>
				<tr>
					<td class="txtHighlight"><hr size="1" noshade>No resource found for the search criteria.</td>
				</tr>
			<%		     
			}	  	
			%>
			</table>
		</td>
	</tr>	
	<tr>
		<td>
		<%
			if(!disableupdbtn)
			{
				%><input type="button" class="cell" name="rpdisplay" value="Update" onclick="submitform(this.form, 'displayResource');"><%
			}
		%>	
		</td>
	</tr>
</table>
</form>
<% 
}
%>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?