-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaddsalary.jsp
110 lines (84 loc) · 3.56 KB
/
addsalary.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<%@page import="ems.erp.model.ReportsModel"%>
<%@page import="ems.erp.beans.Salary"%>
<%@ 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">
<link rel="stylesheet" type="text/css" href="css/home.css">
<link rel="stylesheet" type="text/css" href="../css/home.css">
<title>Insert title here</title>
<%@include file="../jsp/header.jsp"%>
</head>
<body>
<h3>Add Salary</h3>
<%
String msg = (String) request.getAttribute("msg");
String editMsg = (String)request.getAttribute("editMsg");
System.out.println("Add salary jsp "+editMsg);
Salary sal = ReportsModel.editSalaryGet(editMsg);
if (msg == null) {
} else {
%>
<h2 style="color: green;"><%=msg%></h2>
<%
}
if(editMsg == null){
%>
<div class="login_form" style="margin: 80px; margin-left: 430px;">
<form action="<%=CBEView.ADD_SALARY%>" method="post">
<input type="text" placeholder="Enter Employee's Email" name="email">
<input type="hidden" name="temp" value="add">
<select name="month">
<option value="#">Select Month</option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
<select name="year">
<option value="<%= new java.text.SimpleDateFormat("yyyy").format(new java.util.Date()) %>"> <%= new java.text.SimpleDateFormat("yyyy").format(new java.util.Date()) %></option>
</select>
<input type="text" placeholder="Enter Amount" name="amount">
<button type="submit">Submit</button>
</form>
</div>
<%}else{ %>
<div class="login_form" style="margin: 80px; margin-left: 430px;">
<form action="<%=CBEView.ADD_SALARY%>" method="post">
<input type="text" placeholder="Enter Employee's Email" name="email" value="<%=sal.getEmail()%>">
<input type="hidden" name="editMsggggg" value="<%=editMsg%>">
<select name="month">
<option value="<%=sal.getMonth() %>"><%=sal.getMonth() %></option>
<option value="January">January</option>
<option value="February">February</option>
<option value="March">March</option>
<option value="April">April</option>
<option value="May">May</option>
<option value="June">June</option>
<option value="July">July</option>
<option value="August">August</option>
<option value="September">September</option>
<option value="October">October</option>
<option value="November">November</option>
<option value="December">December</option>
</select>
<select name="year">
<option value="<%=sal.getYear()%>"> <%= new java.text.SimpleDateFormat("yyyy").format(new java.util.Date()) %></option>
</select>
<input type="text" placeholder="Enter Amount" name="amount" value="<%=sal.getAmount()%>">
<button type="submit">Submit</button>
</form>
</div>
<%} %>
</body>
</html>