Đánh giá dự án đầu tư và lập lịch cho quản lý dự án tự động - 13


</h1>

<p class="section-subcontent">Giải quyết bài toán lập mạng AOA và cân đối nguồn lực sử dụng mạng AOA</p>


</div>


<c:forEach items="${projectList}" var="project" varStatus="rowCounter">

<c:if test="${rowCounter.count % 3 == 1}">

<div class="row">

</c:if>

Có thể bạn quan tâm!

Xem toàn bộ 136 trang tài liệu này.


project.phbanHienTai }

Đánh giá dự án đầu tư và lập lịch cho quản lý dự án tự động - 13


<div class="col-sm-4" style="text-align: center;">

<strong style="text-align: center;">

${ project.tenDA } ${


</strong>

<a href="viewJobs?projectId=${ project.maDA

}&phban=${ project.phbanHienTai }">

<c:choose>

<c:when test="${ project.lichDA != ""

}">

<img

src="${pageContext.request.contextPath}/${ project.lichDA }" style="width: 100%;" />

</c:when>

<c:otherwise>

<img src="${pageContext.request.contextPath}/images/default.png" style="width: 100%;" />


</div>

</c:otherwise>

</c:choose>

</a>

<br/>

<c:if test="${rowCounter.count % 3 == 0||rowCounter.count == fn:length(values)}">


</c:forEach>


</c:if>

</div>

</div><!-- Container Ends -->

</section><!-- Service Main Section Ends -->


<jsp:include page="_footer.jsp"></jsp:include>

<!-- Go To Top Link -->


<a href="#" class="back-to-top">

<i class="fa fa-angle-up">

</i>

</a>


<div class="bottom"><a href="#" class="settings"></a></div>


<!-- JavaScript & jQuery Plugins -->

<!-- jQuery Load -->

<script src="assets/js/jquery-min.js"></script>

<!-- Bootstrap JS -->

<script src="assets/js/bootstrap.min.js"></script>

<!--Text Rotator-->

<script src="assets/js/jquery.mixitup.js"></script>

<!--WOW Scroll Spy-->

<script src="assets/js/wow.js"></script>

<!-- OWL Carousel -->

<script src="assets/js/owl.carousel.js"></script>


<!-- WayPoint -->

<script src="assets/js/waypoints.min.js"></script>

<!-- CounterUp -->

<script src="assets/js/jquery.counterup.min.js"></script>

<!-- ScrollTop -->

<script src="assets/js/scroll-top.js"></script>

<!-- Appear -->

<script src="assets/js/jquery.appear.js"></script>

<script src="assets/js/jquery.vide.js"></script>

<!-- All JS plugin Triggers -->

<script src="assets/js/main.js"></script>

<script src="assets/js/color-switcher.js"></script>


</body>

</html>


2. Phần 2. Cập nhật dự án


2a. Danh sách dự án

public class ProjectListServlet extends HttpServlet { private static final long serialVersionUID = 1L;


public ProjectListServlet() {


super();

}


@Override

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

Connection conn = MyUtils.getStoredConnection(request);


String errorString = null; List<Project> list = null; try {

list = DBUtils.queryProject(conn);

} catch (SQLException e) { e.printStackTrace(); errorString = e.getMessage();

}


// Store info in request attribute, before forward to views request.setAttribute("errorString", errorString); request.setAttribute("projectList", list);


// Forward to /WEB-INF/views/productListView.jsp RequestDispatcher dispatcher = request.getServletContext()

.getRequestDispatcher("/WEB-INF/views/projectListView.jsp"); dispatcher.forward(request, response);

}


@Override

protected void doPost(HttpServletRequest request, HttpServletResponse response)

throws ServletException, IOException { doGet(request, response);

}

}



2b. Lập một dự án mới


public class DoCreateProjectServlet extends HttpServlet { private static final long serialVersionUID = 1L;


public DoCreateProjectServlet() {


super();

}



response)

@Override

protected void doGet(HttpServletRequest request, HttpServletResponse


throws ServletException, IOException {

Connection conn = MyUtils.getStoredConnection(request);


String maDA = (String) request.getParameter("maDA"); String tenDA = (String) request.getParameter("tenDA"); String nguoiQL = (String) request.getParameter("nguoiQL");

long tongVon = Long.parseLong(request.getParameter("tongVon")); String ngayBDText = (String) request.getParameter("ngayBD"); String ngayKTText = (String) request.getParameter("ngayKT");


Date ngayBD = null; Date ngayKT = null;

DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");


try {


ngayKT = formatter.parse(ngayKTText); ngayBD = formatter.parse(ngayBDText);

} catch (ParseException pe) {

// TODO Auto-generated catch block pe.printStackTrace();

}


Project project = new Project(); project.setMaDA(maDA); project.setTenDA(tenDA); project.setNguoiQL(nguoiQL); project.setTongVon(tongVon); project.setNgayBD(ngayBD); project.setNgayKT(ngayKT); String errorString = null;


if (errorString == null) { try {

DBUtils.insertProject(conn, project);

} catch (SQLException e) { e.printStackTrace();


errorString = e.getMessage();

}

}


// Store infomation to request attribute, before forward to views. request.setAttribute("errorString", errorString); request.setAttribute("project", project);


// If error, forward to Edit page. if (errorString != null) {

RequestDispatcher dispatcher = request.getServletContext()

.getRequestDispatcher("/WEB- INF/views/createProjectView.jsp");

dispatcher.forward(request, response);

}


// If everything nice.

// Redirect to the product listing page. else {

response.sendRedirect(request.getContextPath() + "/projectList");

}


}



response)

@Override

protected void doPost(HttpServletRequest request, HttpServletResponse


throws ServletException, IOException { doGet(request, response);

}

}



2c. Tạo một dự án mới

</h1>

<p class="section-subcontent">Tạo một dự án mới để tiến hành thử nghiệm lập mạng AOA</p>

<div class="col-lg-12">


action="doCreateProject">

<form method="POST"


<div class="form-group">

<label for="maDA">Mã dự án:</label>



control" id="maDA">


control" id="tenDA">


name="nguoiQL"/>


name="tongVon"/>

<input name="maDA" type="text" class="form-


</div>

<div class="form-group">

<label for="tenDA">Tên dự án:</label>

<input name="tenDA" type="text" class="form-


</div>

<div class="form-group">

<label for="nguoiQL">Người quản lý:</label>

<input class="form-control" id="nguoiQL"


</div>

<div class="form-group">

<label for="tongVon">Tổng vốn:</label>

<input class="form-control" id="tongVon"


</div>

<div class="form-group">

<label for="ngayBD">Ngày bắt đầu:</label>

<div id="ngaybdpicker" class="input-append">

<input data-format="dd/MM/yyyy"

class="form-control" id="ngayBD" name="ngayBD" />

<span class="add-on">

<i data-time-icon="icon-time" data-

date-icon="icon-calendar">


</div>

</div>


</i>

</span>

<div class="form-group">

<label for="ngayKT">Ngày kết thúc:</label>

<div id="ngayktpicker" class="input-append">

<input data-format="dd/MM/yyyy" class="form-control" id="ngayKT" name="ngayKT" />

<span class="add-on">

<i data-time-icon="icon-time" data-

date-icon="icon-calendar">


</div>

</div>


</i>

</span>


<button type="submit" class="btn btn- success"><i class="fa fa-plus-square"></i> Tạo dự án</button>

</form>

</div>


</div>

</div><!-- Container Ends -->

</section>

<!-- Services Section End -->


<!-- Footer Section -->

<footer>

<!-- Container Starts -->

<div class="container">

<!-- Row Starts -->

<div class="row section">

<!-- Footer Widget Starts -->

<div class="footer-widget col-md-3 col-xs-12 wow fadeIn">

<h3 class="small-title">

Về tôi Trần Nhật Giáp

</h3>

<div class="social-footer">

<a href="#"><i class="fa fa-facebook icon-round"></i></a>

<a href="#"><i class="fa fa-twitter icon-round"></i></a>

<a href="#"><i class="fa fa-linkedin icon-round"></i></a>

<a href="#"><i class="fa fa-google-plus icon-round"></i></a>

</div>

</div><!-- Footer Widget Ends -->

</div><!-- Row Ends -->

</div><!-- Container Ends -->


<!-- Copyright -->

<div id="copyright">

<div class="container">

<div class="row">

<div class="col-md-6 col-sm-6">

<p class="copyright-text">

© 2016 tất cả các quyền đã được bảo hộ. Được thiết kế bởi <a href="#">Trần Nhật Giáp</a>

</p>

</div>

<div class="col-md-6 col-sm-6">


<ul class="nav nav-inline pull-xs-right">

<li class="nav-item">

<a class="nav-link active" href="home">Trang chủ</a>

</li>

<li class="nav-item">

<a class="nav-link" href="#">Sitemap</a>

</li>

<li class="nav-item">

<a class="nav-link" href="#">Chính sách</a>

</li>

<li class="nav-item">

<a class="nav-link" href="#">Dịch vụ</a>

</li>

</ul>

</div>

</div>

</div>

</div>

<!-- Copyright End-->


</footer>

<!-- Footer Section End-->

<!-- Go To Top Link -->

<a href="#" class="back-to-top">

<i class="fa fa-angle-up">

</i>

</a>


<div class="bottom"><a href="#" class="settings"></a></div>


<!-- JavaScript & jQuery Plugins -->

<!-- jQuery Load -->

<script src="assets/js/jquery-min.js"></script>

<!-- Bootstrap JS -->

<script src="assets/js/bootstrap.min.js"></script>

<!--Text Rotator-->

<script src="assets/js/jquery.mixitup.js"></script>

<!--WOW Scroll Spy-->

<script src="assets/js/wow.js"></script>

<!-- OWL Carousel -->

<script src="assets/js/owl.carousel.js"></script>


<!-- WayPoint -->

Xem tất cả 136 trang.

Ngày đăng: 07/04/2023
Trang chủ Tài liệu miễn phí