⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 issuehistory.jsp

📁 国外的一套开源CRM
💻 JSP
字号:
<%@ page import="org.ofbiz.entity.*" %>
<%@ page import="org.ofbiz.entity.model.*" %>

<%@ include file="/includes/header.jsp" %>

<%
   String ENTITY = "ItIssueHistory";
   String action = "";
   String issueId = "";
   boolean update = false;
   String rowClass;
//   String userLoginId;
   int    rowNum;

   ModelEntity entity = delegator.getModelEntity(ENTITY);
//   userLoginId = userLogin.getString("userLoginId");

   if(request.getParameter("action") != null){
     //actions=search, update, create
     action = request.getParameter("action");
   }

   if(request.getParameter("issueId") != null){
     issueId = request.getParameter("issueId");
   }

	if(request.getParameter("ItIssue_issueId") != null){
		issueId = request.getParameter("ItIssue_issueId");
	}



   if(action.equals("update")){
    GenericValue genericValue = new GenericValue(entity);
    genericValue.setDelegator(delegator);
    Enumeration params = request.getParameterNames();
    while(params.hasMoreElements()){
       String pName = (String)params.nextElement();
       if(!pName.equals("action"))
         genericValue.set(pName, request.getParameter(pName));
     }
    delegator.store(genericValue);
  }
%>

  <table bgcolor="white" height="20"><tr><td></td></tr></table>
  <table  width='100%'  class="viewManyHeader"><tr><td width='100%' height='100%'>
    <table  width="100%" class="viewManyHeader"><tr>
      <td>
        Issue History
      </td>
      <td align="right">
      </td></tr>
    </table>

      <%
       HashMap pkMap = new HashMap();
       pkMap.put("issueId", issueId);

       List issueHistory = delegator.findByLike(ENTITY, pkMap, null);
       Iterator i = issueHistory.iterator();
      %>
      <table width="100%">
        <tr  class="viewManyHeaderLabel">
          <td width="10%">IssueId</td>
          <td width="20%">Short Name</td>
          <td width="5%">Status </td>
          <td width="5%">Priority </td>
          <td width="20%">Assigned To</td>
          <td width="20%">Modified By</td>
          <td width="20%">Modified Date</td>
        </tr>
        <% rowNum = 0;
		   while(i.hasNext()) {
		      GenericValue historyDetails = (GenericValue)i.next();

		      rowClass = (((rowNum++ % 2) != 0) ? "viewManyTR1" : "viewManyTR2");
        %>
        <tr class=<%=rowClass%>>
          <td width="10%"><%=historyDetails.getString("issueId")%></td>
          <td width="20%"><%=historyDetails.getString("shortName")%></a></td>
          <td width="5%"><%=historyDetails.getString("statusId")%></a></td>
          <td width="5%"><%=historyDetails.getString("priorityId")%></td>
          <td width="20%"><%=historyDetails.getString("assignedTo")%></td>
          <td width="20%"><%=historyDetails.getString("modifiedBy")%></td>
          <td width="20%"><%=historyDetails.getString("modifiedDate")%></td>
        </tr>
        <% } %>
       </table>
    </table>

<%@ include file="/includes/footer.jsp" %>

⌨️ 快捷键说明

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