Xây dựng Website quản lý đào tạo theo hình thức tín chỉ

LỜI MỞ ĐẦU Quản lý đào tạo theo hình thức tín chỉ đang là vấn đề khá mới mẻ ở Việt Nam nhưng hiện tại mô hình quản lý đào tạo này cũng đang được áp dụng ở khá nhiều các trường đại học, cao đẳng. Đây là một mô hình đào tạo phổ biến trên thế giới, nó cho phép sinh viên được phép đăng kí môn học mình muốn học, thời gian học trong tuần Như vậy sinh viên có thể hoàn toàn chủ động về thời gian học cũng như thời khóa biểu của chính mình. Do đó nó được đánh giá là một mô hình hay và linh hoạt. Khoa Quản lý đào tạo quốc tế là một khoa trực thuộc Trường Đại học Kinh tế Quốc dân, hiện đang áp dụng mô hình đào tạo này để quản lý và đào tạo sinh viên. Tuy nhiên, hiện tại vấn đề quản lý tại đây vẫn còn nhiều vấn đề cần giải quyết. Đứng trước nhu cầu thực tế của khoa Quản lý Đào tạo Quốc tế trong việc tin học hóa công tác quản lý, tác giả đã nhận thấy sự cần thiết của một hệ thống thông tin quản lý đào tạo dựa trên công nghệ Web, do đó đề tài tác giả lựa chọn cho chuyên đề thực tập là “Xây dựng Website quản lý đào tạo theo hình thức tín chỉ”. Ngoài phần lời nói đầu và kết luận, chuyên đề gồm 3 chương: - Chương 1: Tổng quan về khoa Quản lý Đào tạo Quốc tế và bài toán quản lý đào tạo theo hình thức tín chỉ. - Chương 2: Cơ sở phương pháp luận phát triển Website. - Chương 3: Xây dựng Website quản lý đào tạo theo hình thức tín chỉ tại khoa Quản lý Đào tạo Quốc tế. Chương 3 là chương cuối cùng của chuyên đề và đồng thời cũng là chương trình bày những công việc mà tác giả đã thực hiện được trong thời gian thực tập tại khoa Quản lý đào tạo quốc tế - trường Đại học Kinh tế Quốc dân. Tác giả xin gửi lời cảm ơn đến TS. Trần Thị Song Minh, người trực tiếp hướng dẫn tận tình, giúp tác giả có thể hoàn thành đề tài một cách tốt nhất, xin cảm ơn TS. Phan Thủy Chi và các anh chị tại khoa Quản lý đào tạo quốc tế - trường Đại học Kinh tế Quốc dân đã giúp đỡ tác giả rất nhiều trong quá trình thực hiện chuyên đề. MỤC LỤC LỜI MỞ ĐẦU 1 CHƯƠNG 1. TỔNG QUAN VỀ KHOA QUẢN LÝ ĐÀO TẠO QUỐC TẾ - TRƯỜNG ĐẠI HỌC KINH TẾ QUỐC DÂN VÀ BÀI TOÁN QUẢN LÝ ĐÀO TẠO 3 1.1 Giới thiệu về khoa quản lý đào tạo quốc tế. 3 1.2 Giới thiệu về chương trình cử nhân quốc tế ngành quản trị kinh doanh IBD. 10 1.3 Thực trạng tin học hóa tại khoa quản lý đào tạo quốc tế và bài toán quản lý đào tạo theo hình thức tín chỉ 23 CHƯƠNG 2: CƠ SỞ PHƯƠNG PHÁP LUẬN PHÁT TRIỂN WEBSITE 26 2.1 Tổng quan về phương pháp phát triển hệ thống thông tin 26 2.1.1 Thông tin và vai trò của thông tin trong các tổ chức. 26 2.1.2 Hệ thống thông tin (HTTT). 27 2.1.3 Phương pháp phát triển hệ thống thông tin 37 2.2 Tổng quan về phương pháp thiết kế Website 49 2.2.1 Mạng Internet và dịch vụ mạng toàn cầu World Wide Web 49 2.2.2 Mô hình client – server 54 2.2.3 Ngôn ngữ HTML,CSS và ASP.NET 58 2.2.3 Công cụ sử dụng 69 3.1 Phân tích hệ thống thông tin quản lý đào tạo theo hình thức tín chỉ 74 3.1.1 Khảo sát hệ thống 74 3.2 Thiết kế hệ thống thông tin quản lý đào tạo theo hình thức tín chỉ. 82 3.2.1 Thiết kế quan hệ thực thể 82 3.2.2 Thiết kế cơ sở dữ liệu 84 3.2.3 Thiết kế thuật giải 89 3.2.4 Thiết kế website quản lý đào tạo theo hình thức tín chỉ 93 3.3 Triển khai hệ thống Website quản lý đào tạo theo hình thức tín chỉ. 111 DANH MỤC TÀI LIỆU THAM KHẢO 115 PHỤ LỤC S116

doc162 trang | Chia sẻ: lvcdongnoi | Lượt xem: 2515 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Xây dựng Website quản lý đào tạo theo hình thức tín chỉ, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
ấn Xem điểm. Để xem chi tiết bảng điểm cá nhân của mỗi môn học chọn Select. Để xuất dữ liệu sang file excel có thể nhấn vào nút xuất ra file excel. Hệ thống sẽ lưu dữ liệu trên bảng dưới dạng một file excel. h, Giao diện trang xem danh sách sinh viên đăng kí của từng lớp môn học Hình 3.25 Giao diện trang báo cáo danh sách sinh viên đăng kí môn học Đối tượng sử dụng: Cán bộ quản lý Mục đích: Xem danh sách sinh viên đăng kí của từng lớp môn học Cách dùng: để xem danh sách sinh viên của từng lớp môn học cụ thể chọn Select. i, Giao diện trang quản lý tin tức Hình 3.26 Trang quản lý tin tức Đối tượng sử dụng: Cán bộ quản lý Mục đích: Quản lý tin tức hiển thị ở trang chủ của Website. Cách sử dụng: để xem tin tức lựa chọn Select, tin tức sẽ được hiển thị ở textbox ngay bên dưới. Để thêm tin tức mới nhấn nút Add, sau đó soạn nội dung và nhấn bút Save. 3.3 Triển khai hệ thống Website quản lý đào tạo theo hình thức tín chỉ. Hệ thống chỉ là áp dụng dành riêng cho chương trình đào tạo cử nhân quốc tế IBD (do chương trình có những điểm khác với các chương trình khác của khoa) vì vậy nó không thể thay thế hoàn toàn được Website hiện thời của khoa. Cả hai hệ thống hiện thời và hệ thống này sẽ được tồn tại và sử dụng song song. Hệ thống tồn tại dưới dạng một Website do đó cần có một host để có thể đưa toàn bộ hệ thống lên đó và một domain để người dùng có thể gọi hệ thống từ trình duyệt Web. Do chi phí thuê một host và một domain là không rẻ và cũng sẽ không hợp lý nếu một khoa có đến hai Website. Do đó, có thể đưa ra phương án để cả hai hệ thống trên cùng một host và có thể link trực tiếp từ hệ thống hiện thời sang hệ thống mới bằng một đường dẫn đặt trên hệ thống hiện thời. Phương án sẽ giảm được tối đa chi phí cho khoa quản lý đào tạo quốc tế, ngoài ra nó sẽ giúp đưa cả hai hệ thống về thành một hệ thống tổng thể. KẾT LUẬN Website quản lý đào tạo theo hình thức tín chỉ đưa vào hoạt động sẽ giúp công tác quản lý đăng kí tín chỉ đơn giản hơn rất nhiều. Khoa Quản lý đào tạo Quốc tế không cần phải tiếp sinh viên đến đăng kí tín chỉ và công tác quản lý, hạn chế số lượng đăng kí dễ dàng hơn. Đồng thời sinh viên cũng nắm được nhiều thông tin hơn về tình hình học tập của mình. Quá trình thực hiện chuyên đề này, tác giả đã đạt được những kết quả sau: Phân tích, nghiên cứu thực tại Khoa Quản lý đào tạo quốc tế - trường Đại học Kinh tế Quốc dân đề xuất phương án xây dựng hệ thống thông tin hỗ trợ quản lý đào tạo. Xây dựng hệ thống thông tin theo phương án đã đề xuất bao gồm: Thiết kế và thực hiện chuẩn hóa cơ sở dữ liệu của hệ thống. Thiết kế các giao diện của hệ thống. Lập trình để thực hiện các chức năng của hệ thống. Việc xây dựng một hệ thống thông tin hoàn chỉnh, đáp ứng tốt nhất những yêu cầu thực tế của tổ chức là một công việc vô cùng phức tạp, đòi hỏi nhiều thời gian và công sức. Trong thời gian ngắn thực hiện chuyên đề, tác giả đã cố gắng xây dựng một hệ thống thông tin tương đối hoàn chình, tuy nhiên, do những hạn chế về thời gian, kiến thức chuyên môn cũng như kinh nghiệm thực tiễn xây dựng hệ thống thông tin của bản thân em, chuyên đề không tránh khỏi những thiếu sót nhất định, rất mong được sự nhận xét, góp ý của các thầy cô để chuyên đề trở nên tốt hơn. Tác giả xin gửi lời cảm ơn đến TS. Trần Thị Song Minh, người trực tiếp hướng dẫn tận tình, giúp tác giả có thể hoàn thành đề tài một cách tốt nhất, xin cảm ơn TS. Phan Thủy Chi và các anh chị tại khoa Quản lý đào tạo quốc tế - trường Đại học Kinh tế Quốc dân đã giúp đỡ tác giả rất nhiều trong quá trình thực hiện chuyên đề. DANH MỤC TÀI LIỆU THAM KHẢO Giáo trình Hệ thống thông tin quản lý: TS. Trương Văn Tú, TS. Trần Thị Song Minh, khoa Tin học Kinh tế, đại học Kinh tế quốc dân, 2000 Giáo trình Cấu trúc dữ liệu và giải thuât: PGS. TS. Hàn Viết Thuận, khoa Tin học Kinh tế, đại học Kinh tế Quốc dân, NXB Thống Kê, 2005 Các bài giảng: Môn công nghệ phần mềm của PGS. TS. Hàn Viết Thuận Môn Hệ thống thông tin quản lý của TS. Trương Văn Tú Và một số môn học khác của khoa Tin học Kinh tế, đại học Kinh tế Quốc dân Các Ebook: MSDN Library for Visual Studio 2005 Express Editions SQL Server 2005 Books Online 5. Các trang Web www.asp.net www.w3schools.com PHỤ LỤC Một số Store Procedure và Function Function kiểm tra sinh viên có qua một môn học hay không CREATE function [dbo].[checkPass](@StudentID VARCHAR(10),@SubjectID varchar(10)) returns varchar(2) AS BEGIN declare @kq varchar(2) declare @k1 int declare @k2 int set @k1=(Select Count(*) from SubjectScore, Exercise, OutCome where SubjectScore.SubjectScoreID=Exercise.SubjectScoreID and Exercise.ExerciseID=OutCome.ExerciseID and SubjectID=@SubjectID and StudentID=@StudentID and Pass='1') set @k2=(Select Count(*) from SubjectScore, Exercise, OutCome where SubjectScore.SubjectScoreID=Exercise.SubjectScoreID and Exercise.ExerciseID=OutCome.ExerciseID and SubjectID=@SubjectID and StudentID=@StudentID) if (@k1=@k2) set @kq='P' else set @kq='F' return @kq end Function tính điểm một môn học của sinh viên create function [dbo].[checkScore](@StudentID VARCHAR(10),@SubjectID varchar(10)) returns varchar(2) AS BEGIN declare @c int declare @k1 int declare @k2 int declare @m int declare @d int set @c=(select count(*) from SubjectScore where SubjectID=@SubjectID and StudentID=@StudentID) if (@c=0) return 'F' set @k1=(Select Count(*) from SubjectScore, Exercise, OutCome where SubjectScore.SubjectScoreID=Exercise.SubjectScoreID and Exercise.ExerciseID=OutCome.ExerciseID and SubjectID=@SubjectID and StudentID=@StudentID and Pass='1') set @k2=(Select Count(*) from SubjectScore, Exercise, OutCome where SubjectScore.SubjectScoreID=Exercise.SubjectScoreID and Exercise.ExerciseID=OutCome.ExerciseID and SubjectID=@SubjectID and StudentID=@StudentID) if (@k1=@k2) begin set @m=(select count(*) from SubjectScore where SubjectID=@SubjectID and StudentID=@StudentID and M1='1' and M2='1' and M3='1') if (@m=1) begin set @d=(select count(*) from SubjectScore where SubjectID=@SubjectID and StudentID=@StudentID and D1='1' and D2='1' and D3='1') if (@d=1) return 'D' return 'M' end return 'P' end else return 'F' return 'F' end Procedure xem bảng điểm cá nhân CREATE PROCEDURE [dbo].[ViewSubjectScore] -- Add the parameters for the stored procedure here @StudentID VARCHAR(10) AS Begin select SubjectID,dbo.checkPass(@StudentID,SubjectID)AS Pass ,M1,M2,M3,D1,D2,D3 from SubjectScore where StudentID=@StudentID end Procedure Xem bảng điểm chi tiết của sinh viên theo môn học create procedure [dbo].[ListScoreStudent] @ClassName nvarchar(50), @SubjectID varchar(10) as begin Select Student.StudentID,FirstName,LastName,Birthday,dbo.checkScore(Student.StudentID,@SubjectID) as Pass from Class,Student where Class.ClassID=Student.ClassID and Class.ClassName=@ClassName end Procedure xem lịch học cá nhân CREATE PROCEDURE [dbo].[getTimetable] -- Add the parameters for the stored procedure here @StudentID VARCHAR(50) AS BEGIN select SubClass.SubClassID,SubjectName, Date,ShiftID,RoomName from Register, SubClass, TimeTable, Room, Subject where Subject.SubjectID= SubClass.SubjectID and Register.SubClassID= SubClass.SubClassID and SubClass.SubClassID= TimeTable.SubClassID and TimeTable.RoomID=Room.RoomID and StudentID=@StudentID and datediff(day,StartDate,getdate())>=0 and datediff(day,EndDate,getdate())<=0 order by Date END Code giao diện * Giao diện trang chủ và trang sinh viên - Code trang định dạng trang web: style.css /*------------------------------------------------------------------------ # JA Mageia 1.0 - August, 2007 # ------------------------------------------------------------------------ # Copyright (C) 2004-2006 J.O.O.M Solutions Co., Ltd. All Rights Reserved. # @license - Copyrighted Commercial Software # Author: J.O.O.M Solutions Co., Ltd # Websites: - -------------------------------------------------------------------------*/ /* COMMON STYLE --------------------------------------------------------- */ html, body, form, fieldset { margin: 0; padding: 0; } body { color: #000000; background: #FFFFFF; font-family: Tahoma, Arial, Helvetica, sans-serif; line-height: 150%; } body#bd { color: #2A343A; background: url(body-bg.jpg) repeat-x top #75838B; } body.contentpane { width: auto; /* Printable Page */ margin: 1em 2em; background: #FFFFFF; color: #000000; font-size: 12pt; font-family: serif; line-height: 140%; } body.fs1 { font-size: 9px; } body.fs2{ font-size: 10px; } body.fs3{ font-size: 11px; } body.fs4{ font-size: 12px; } body.fs5{ font-size: 13px; } body.fs6{ font-size: 14px; } /* Normal link */ a { color: #0064A1; text-decoration: underline; } a:hover, a:active, a:focus { color: #0064A1; text-decoration: underline; } /* Title text */ .contentheading, .componentheading, .blog_more strong, h1, h2 { font-family: "Trebuchet MS", Tahoma, Arial, Helvetica, sans-serif; font-weight: normal; } /* Small text */ small, .small, .smalldark, .mosimage_caption { font-size: 90%; color: #92A3AE; } /* Heading */ h1 { font-size: 180%; } h2 { font-size: 155%; } h3 { font-size: 125%; } h4 { font-size: 100%; text-transform: uppercase; } p, pre, blockquote, ul, ol, h1, h2, h3, h4, h5, h6 { margin: 1em 0; padding: 0; } ul { list-style: none; } ul li { padding-left: 30px; line-height: 180%; background: url(bullet-list.gif) no-repeat 18px 8px; } ol li { margin-left: 35px; line-height: 180%; } th { padding: 5px; font-weight: bold; text-align: left; } fieldset { border: none; } fieldset a { font-weight: bold; } hr { border-top: 1px solid #D0D9DF; border-right: 0; border-left: 0; border-bottom: 0; height: 1px; } a img { border: none; } td, div { font-size: 100%; } /* FORM --------------------------------------------------------- */ form { margin: 0; padding: 0; } form label { cursor: pointer; } input, select, textarea, .inputbox { padding: 1px; font-family: Tahoma, Arial, sans-serif; font-size: 100%; } select, textarea, .inputbox { background: #FFFFFF; color: #3C4A53; } .button { font-weight: bold; color: #3C4A53; padding: 2px; background: url(but-bg.gif) repeat-x top; border: 1px solid #92A3AE; } .inputbox { margin-bottom: 1px; padding: 3px 0 3px 5px; background: #FFFFFF; border: 1px solid #92A3AE; } .inputbox:hover, .inputbox:focus { } /* BONUS TYPOGRAPHY STYLES --------------------------------------------------------- */ pre, .code { padding: 10px 15px; margin: 5px 0 15px; border-left: 5px solid #92A3AE; background: #FAFAF0; } blockquote { padding: 1em 40px 1em 15px; } blockquote span.open { padding: 0 0 0 20px; background: url(so-q.gif) no-repeat left top; } blockquote span.close { padding: 0 20px 0 0; background: url(sc-q.gif) no-repeat bottom right; } /* Quote hilight */ .quote-hilite { padding : 10px 15px; margin: 0; background: #FFFFFF; border: 1px solid #D0D9DF; } /* Small quote */ .small-quote { background: none; margin: 0; padding: 0; } .small-quote span.open-quote { background: url(so-q.gif) no-repeat center left; margin: 0; padding-left: 20px; } .small-quote span.close-quote { background: url(sc-q.gif) no-repeat center right; margin: 0; padding-right: 20px; } .small-quote span.author { display: block; padding: 2px 5px 2px 20px; background: url(author.gif) no-repeat 5px 4px #D0D9DF; border-top: 1px solid #D0D9DF; margin: 0.5em 0 0; text-transform: uppercase; font-size: 90%; } /* Rropcap */ .dropcap { float: left; padding: 4px 8px 0 0; display: block; color: #92A3AE; font: 50px/40px Georgia, Times, serif; } /* Tips, Error, Message, Hightlight*/ .error { padding-left: 25px; color: #CC0000; background: url(bullet-error.gif) no-repeat top left; } .message { padding-left: 25px; color: #DF8600; background: url(bullet-info.gif) no-repeat top left; } .tips { padding-left: 25px; color: #0064A1; background: url(bullet-tips.gif) no-repeat top left; } .highlight { padding: 1px 5px; background: #FFFFCC; font-weight: bold; } /* Note Style */ p.stickynote { background: url(sticky-bg.gif) no-repeat 5px center #FFFFFF; padding: 10px 0px 10px 40px; border: 1px solid #D0D9DF; } p.download { background: url(download-bg.gif) no-repeat 5px center #FFFFFF; padding: 10px 0px 10px 40px; border: 1px solid #D0D9DF; } .blocknumber { clear: both; padding: 5px 15px 10px; position: relative; } /* Check list */ ul.checklist { list-style: none; } ul.checklist li { margin-left: 15px; padding: 0 0 5px 20px; background: url(checklist-bg.gif) no-repeat 0 3px; } /* Check list */ ul.stars { list-style: none; } ul.stars li { margin-left: 15px; padding: 0px 0 5px 20px; background: url(star-bg.gif) no-repeat 0 3px; } /* Bignumber */ .bignumber { float: left; margin-right: 8px; padding: 6px 7px; display: block; color: #FFFFFF; background: url(ol-bg.gif) no-repeat top left; font: 20px/normal Arial, sans-serif; font-weight: bold; } /* Talking box. Thinking box. */ div.bubble1, div.bubble2, div.bubble3, div.bubble4 { margin: 15px 0; } div.bubble1 span.author, div.bubble2 span.author, div.bubble3 span.author, div.bubble4 span.author { padding-left: 15px; margin-left: 15px; font-weight: bold; background: url(author.gif) no-repeat center left; } div.bubble1 div { margin: 0; width: 100%; background: url(bub1-br.gif) no-repeat bottom right; } div.bubble1 div div { background: url(bub1-bl.gif) no-repeat bottom left; } div.bubble1 div div div { background: url(bub1-tr.gif) no-repeat top right; } div.bubble1 div div div div { background: url(bub1-tl.gif) no-repeat top left; } div.bubble1 div div div div div { margin: 0; padding: 15px 15px 30px 15px; width: auto; } div.bubble2 div { margin: 0; width: 100%; background: url(bub2-br.gif) no-repeat bottom right; } div.bubble2 div div { background: url(bub2-bl.gif) no-repeat bottom left; } div.bubble2 div div div { background: url(bub2-tr.gif) no-repeat top right; } div.bubble2 div div div div { background: url(bub2-tl.gif) no-repeat top left; } div.bubble2 div div div div div { margin: 0; padding: 15px 15px 35px 15px; width: auto; } div.bubble3 div { margin: 0; width: 100%; background: url(bub3-br.gif) no-repeat bottom right; } div.bubble3 div div { background: url(bub3-bl.gif) no-repeat bottom left; } div.bubble3 div div div { background: url(bub3-tr.gif) no-repeat top right; } div.bubble3 div div div div { background: url(bub3-tl.gif) no-repeat top left; } div.bubble3 div div div div div { margin: 0; padding: 15px 15px 50px 15px; width: auto; } div.bubble4 div { margin: 0; width: 100%; background: url(bub4-br.gif) no-repeat bottom right; } div.bubble4 div div { background: url(bub4-bl.gif) no-repeat bottom left; } div.bubble4 div div div { background: url(bub4-tr.gif) no-repeat top right; } div.bubble4 div div div div { background: url(bub4-tl.gif) no-repeat top left; } div.bubble4 div div div div div { margin: 0; padding: 15px 15px 55px 15px; width: auto; } /* JOOMLA STYLE --------------------------------------------------------- */ table.blog { } .article_seperator { display: block; height: 20px; } #ja-col1 .article_seperator, #ja-col2 .article_seperator { display: none; } table.contentpane { border: none; width: 100%; } table.contentpaneopen { border: none; border-collapse: collapse; border-spacing: 0; } table.contenttoc { margin: 0 0 10px 10px; padding: 0; width: 35%; } table.contenttoc a { text-decoration: none; } table.contenttoc td { padding: 1px 5px 1px 25px; background: url(bullet-list.gif) no-repeat 5% 50%; } table.contenttoc th { padding: 0 0 3PX; border-bottom: 1px solid #D0D9DF; text-indent: 5px; } table.poll { padding: 0; width: 100%; border-collapse: collapse; } table.pollstableborder { padding: 0; width: 100%; border: none; text-align: left; } table.pollstableborder img { vertical-align: baseline; } table.pollstableborder td { padding: 2px!important; border-collapse: collapse; border-spacing: 0; } table.pollstableborder tr.sectiontableentry1 td { border: none; background: #D0D9DF; } table.pollstableborder tr.sectiontableentry2 td { border: none; } table.searchintro { padding: 10px 0; width: 100%; } table.searchintro td { padding: 5px!important; } table.adminform { width: 400px!important; /*Control the Frontend Editor area width*/ } .adminform .inputbox { } .blog_more { margin: 10px 0; } .blog_more strong { margin: 0 0 5px; display: block; color: #3C4A53; font-size: 155%; } .blog_more ul { margin: 0; padding: 0; } .blog_more ul li { margin: 0; padding: 0 0 0 17px; background: url(bullet-list.gif) no-repeat 6px 8px; } td.buttonheading { padding: 0 0 0 8px!important; text-align: center; background: url(dot.gif) repeat-x bottom; } .category { font-weight: bold; } .clr { clear: both; } .componentheading { padding: 0 0 10px 0; margin-bottom: 20px; font-size: 170%; border-bottom: 1px solid #D0D9DF; } .contentdescription { padding-bottom: 30px; } .contentheading { font-size: 170%; padding-bottom: 10px; border-bottom: 1px solid #D0D9DF; text-transform: capitalize; } a.contentpagetitle, a.contentpagetitle:hover, a.contentpagetitle:active, a.contentpagetitle:focus { text-decoration: none !important; } a.readon { float: left; display: block; text-decoration: none; text-transform: uppercase; } a.readon:hover, a.readon:active, a.readon:focus { } table.contentpaneopen td, table.contentpane td { } table.contentpaneopen, table.contentpane, table.blog { width: 100%; } .createdate { padding: 3px; text-transform: uppercase; font-size: 90%; color: #92A3AE; } .modifydate { color: #92A3AE; height: 15px; padding-top: 15px; } .moduletable { padding: 0; } .mosimage { margin: 15px 5px 10px 0; padding: 0 5px 5px; } * html .mosimage { /*IE 6*/ padding: 5px 0 !important; margin: 15px 10px 10px 0; } *+html .mosimage { /*IE 7*/ padding: 5px 0 !important; } .mosimage img { padding: 0 !important; margin: 0 !important; } .mosimage_caption { margin-top: 5px; padding: 1px 2px; color: #92A3AE; } .pagenav, .pagenav_prev, .pagenav_next, .pagenavbar { padding: 0 2px; } a.pagenav, .pagenav_prev a, .pagenav_next a, .pagenavbar a { text-decoration: none; } a.pagenav:hover, a.pagenav:active, a.pagenav:focus, .pagenav_prev a:hover, .pagenav_prev a:active, .pagenav_prev a:focus, .pagenav_next a:hover, .pagenav_next a:active, .pagenav_next a:focus, .pagenavbar a:hover, .pagenavbar a:active, .pagenavbar a:focus { text-decoration: none; } .pagenavbar { padding-left: 14px; background: url(pages.gif) no-repeat center left; } .pagenavcounter { padding: 8px 14px 0 14px; background: url(pages.gif) no-repeat 0 11px; } .sectiontableheader { padding: 30px 5px 8px; border-bottom: 3px solid #D0D9DF; font-size: 170%; } tr.sectiontableentry1 td { padding: 8px 5px; background: url(dot.gif) repeat-x bottom; } tr.sectiontableentry2 td { padding: 8px 5px; background: url(dot.gif) repeat-x bottom; } tr.sectiontableentry1:hover td, tr.sectiontableentry2:hover td { background: url(dot.gif) repeat-x bottom; } .smalldark { text-align: left; } div.syndicate div { text-align: center; } .pollstableborder tr.sectiontableentry1 td, .pollstableborder tr.sectiontableentry2 td { background: none; } /* MAIN LAYOUT DIVS --------------------------------------------------------- */ #ja-wrapper { width: 950px; margin: 0 auto; background: #FFFFFF; } .narrow #ja-wrapper { width: 750px; } #ja-containerwrap, #ja-containerwrap-fr, #ja-containerwrap-fl, #ja-containerwrap-f { clear: both; } #ja-containerwrap, #ja-containerwrap-fr { background: url(mainwrap-bg.gif) repeat-y 23%; } #ja-containerwrap #ja-container { background: url(dot.gif) repeat-y 77% 0; } #ja-containerwrap-fl { background: url(dot.gif) repeat-y 75% 0; } #ja-containerwrap-fl #ja-container { background: none; } #ja-containerwrap-fr #ja-container { background: none; } #ja-mainbody, #ja-mainbody-fr { float: right; width: 77%; } #ja-mainbody #ja-contentwrap { float: left; width: 70%; } #ja-mainbody-fl { float: left; width: 100%; } #ja-mainbody-fl #ja-contentwrap { float: left; width: 74.8%; background: none; } #ja-mainbody-fl #ja-col2 { float: right; width: 25%; } #ja-mainbody-f { float: none; width: 100%; } #ja-container { padding: 20px 0 0; } #ja-content { padding: 0 20px; margin: 0; clear: both; display: block; } /* HEADER --------------------------------------------------------- */ #ja-headerwrap { background: #5D6B74; position: relative; height: 200px; line-height: normal; } #ja-header { height: 200px; } h1.logo { font-size: 300%; display: block; float: left; margin: 0; padding: 0; width: 218px; height: 48px; } .narrow h1.logo { width: 172px; } h1.logo a { width: 217px; height: 48px; display: block; float: left; text-decoration: none; text-transform: uppercase; outline: none; } .narrow h1.logo a { width: 172px; background: url(logo-narrow.gif) no-repeat; } #ja-newsflash { line-height: normal; height: 170px; position: relative; width: 22.9%; float: left; background: #5D6B74; } #ja-scroll_1, #ja-scroll_2 { background: #5D6B74; } #ja-pathwaywrap { background: url(opaque-default.png); clear: both; height: 30px; } #ja-pathway { display: block; padding: 10px 0 5px; color: #D0D9DF; width: 77%; float: right; text-indent: 20px; position: relative; } #ja-pathway strong { margin-right: 10px; } #ja-pathway img { margin: 0 5px 0; } #ja-pathway a { font-weight: bold; color: #D0D9DF; text-decoration: none; } /* MAIN NAVIGATION --------------------------------------------------------- */ #ja-mainnavwrap { clear: both; background: url(dot.gif) repeat-y 218px 0; } .narrow #ja-mainnavwrap { background: url(dot.gif) repeat-y 173px 0; } #ja-mainnav { float: right; width: 77%; } #ja-mainnavwrap a, #ja-mainnavwrap a:hover, #ja-mainnavwrap a:active, #ja-mainnavwrap a:focus { outline: none; } #ja-subnavwrap { } #ja-subnav { } /* Default Joomla! Menu */ a.mainlevel { padding: 5px 0 5px 20px; width: 90%; display: block; color: #2A343A; text-decoration: none; background: url(a-mainlevel.gif) no-repeat bottom left; } a.mainlevel:hover, a.mainlevel:active, a.mainlevel:focus { color: #2A343A; text-decoration: none; background: url(a-mainlevel-hover.gif) no-repeat bottom left; } a.mainlevel#active_menu { color: #0064A1; background: url(a-mainlevel-hover.gif) no-repeat bottom left; font-weight: bold; text-decoration: none; } a.sublevel { padding: 2px 4px 2px 20px; display: block; color: #2A343A; text-decoration: none; background: url(bullet-list.gif) no-repeat 10px 9px; } a.sublevel:hover, a.sublevel:active, a.sublevel:focus { color: #0064A1; text-decoration: none; } #active_menu { color: #0064A1; font-weight: bold; } /* MODULE --------------------------------------------------------- */ div.moduletable h3 { font-size: 170%; padding: 0 2px 10px; margin: 0 -2px 10px; border-bottom: 1px solid #D0D9DF; color: #0064A1; font-weight: normal; } div.moduletable { padding: 0 10px 10px; margin-bottom: 30px; } #ja-col1 div.moduletable { padding-left: 0; margin-bottom: 15px; } #ja-col1 div.moduletable H3 { color: #0064A1; } #ja-col2 div.moduletable { padding-right: 0; margin-bottom: 15px; } div.moduletable-blank { background: none; padding: 0; margin-bottom: 15px; } /* SPOTLIGHT --------------------------------------------------------- */ /* Spotlight Box Style */ .ja-box-full, .ja-box-left, .ja-box-right, .ja-box-rightcol { float: left; overflow: hidden; padding: 0; } .ja-box-full div.moduletable, .ja-box-left div.moduletable, .ja-box-right div.moduletable, .ja-box-rightcol div.moduletable { padding: 0 20px 20px 20px; } .ja-box-left div.moduletable h3, .ja-box-full div.moduletable h3 { background: #92A3AE; } .ja-box-left, .ja-box-full { background: #FFFFFF; } .ja-box-right div.moduletable h3 { background: #5D6B74; } .ja-box-right { background: #F4F6F7; } .ja-box-rightcol div.moduletable h3 { background: #3C4A53; } .ja-box-rightcol { background: #E3E8EB; } /* Bottom Spotlight */ #ja-botslwrap { float: left; clear: both; width: 100%; } #ja-botsl { } #ja-botsl h3 { color: #FFFFFF; margin: 0 -20px 10px; padding: 6px 20px; font-size: 100%; text-transform: uppercase; letter-spacing: 1px; } #ja-botsl div.moduletable { margin: 0; } #ja-botsl ul { padding: 0; margin: 0 !important; } #ja-botsl li { padding: 0 0 0 13px; margin: 0; background: url(bullet-list.gif) no-repeat 2px 10px; } #ja-botsl td { padding: 0; } #ja-botsl .article_seperator { display: none; } #ja-botsl table { border-spacing: 0; border-collapse: collapse; } /* LEFT COLUMN + RIGHT COLUMN --------------------------------------------------------- */ #ja-col1 { float: left; width: 22.9%; overflow: hidden; } #ja-col1 div.ja-innerpad { padding: 1px 15px 10px 20px; } #ja-col2 { float: right; width: 30%; overflow: hidden; } #ja-col2 div.ja-innerpad { padding: 1px 20px 10px 10px; } #ja-col1 table, #ja-col2 table { border-collapse: collapse; border-spacing: 0; } #ja-col1 ul li, #ja-col2 ul li { padding-left: 15px; margin: 0; background: url(bullet-list.gif) no-repeat 3px 9px; } #ja-col1 ul, #ja-col2 ul { margin: 0; } /* USER TOOLS --------------------------------------------------------- */ #ja-usercolorswrap, #ja-usertoolswrap { position: absolute; top: 0; right: 15px; font-size: 11px; } *+html #ja-usertoolswrap { right: 0; } #ja-usertools { margin: 0; padding: 10px 0 4px 0; } * html #ja-usertools { /*IE 6*/ float: left; } *+html #ja-usertools { /*IE 7*/ padding: 8px 0 4px 0; } #ja-usercolors ul, #ja-usertools ul { margin: 0; padding: 0; float: left; } #ja-usercolors ul li, #ja-usertools ul li { margin: 0; padding: 0; list-style: none; background: none; display: inline; } #ja-usercolors img, #ja-usertools img { padding: 0; margin: 0 0 0 2px; } #ja-usercolors { float: left; padding: 10px 5px 4px; } /* FOOTER --------------------------------------------------------- */ #ja-footerwrap { border-top: 5px solid #D0D9DF; padding: 20px 0; clear: both; position: relative; } #ja-footer { padding: 0 0 20px 0; width: 77%; float: right; position: relative; color: #3C4A53; background: url(dot.gif) repeat-y 0 0; } #ja-footer small, #ja-footer address { padding: 0 0 0 20px; font-style: normal; display: block; float: left; font-size: 100%; color: #3C4A53;} #ja-footer ul { margin: 0 0 5px 20px; padding: 0; } #ja-footer li { margin: 0; padding: 0; display: inline; background: none; } #ja-footer li a { display: inline; padding: 0 20px 0 0; line-height: normal; text-decoration: none; text-transform: uppercase; font-weight: bold; color: #5D6B74; } #ja-footer li a:hover, #ja-footer li a:active, #ja-footer li a:focus { text-decoration: none; color: #5D6B74; } /* Search */ #ja-searchwrap { width: 22.99%; float: left; background: #3C4A53; height: 30px; } #ja-search { background: url(icon-search.gif) no-repeat center left; padding-left: 17px; margin: 6px 0 0 20px; } #ja-search .inputbox { width: 150px; padding: 2px 5px 3px; color: #D0D9DF; background: #3C4A53; border: 1px solid #3C4A53; } .narrow #ja-search .inputbox { width: 100px; } /* MISCELLANOUS ----------------------------------------------------------- */ ul.accessibility { position: absolute; top: -100%; } #ja-banner { text-align: center; } div.back_button a, div.back_button a:hover, div.back_button a:active { margin: 10px 0; display: block; background: none!important; text-decoration: none!important; } #mod_login_password, #mod_login_username { width: 80%; } #mod_login_remember { border: none; background: none; } /* JA Newsflash */ div.nftitle, div.nfimages, div.nfcontent { padding: 0 20px 0 20px; } div.nftitle { font-size: 170%; color: #FFFFFF; font-family: "Trebuchet MS", Tahoma, Arial, Helvetica, sans-serif; margin-top: 0; } div.nftitle a { text-decoration: none; border: none; color: #FFFFFF; } div.nfimages { text-align: center; } div.nfcontent { color: #D0D9DF; margin: 0; } /* Clearfix */ .clearfix:after { clear: both; display: block; content: "."; height: 0; visibility: hidden; } * html > body .clearfix { width: 100%; display: block; } * html .clearfix { height: 1%; } /* Firefox Scrollbar Hack - Do not remove */ html { margin-bottom: 1px; height: 100%!important; height: auto; } .fieldset { margin-bottom: 6px; } .fieldset, .fieldset td, .fieldset p, .fieldset li { font-size: 11px; } .panel { color: #000000; padding: 10px; border: 2px outset; } Code xử lý - Code tầng data access using System; using System.Collections.Generic; using System.Text; using System.Data.SqlClient; using System.Data; using System.Configuration; using System.Web; using System.Web.Configuration; using System.Web.Security; public class DBHelper : IDisposable { private static SqlConnection conn = null; public DBHelper() { try { if (conn == null || conn.State == ConnectionState.Closed) initConnection(); } catch (SqlException e) { // e.StackTrace(); Console.WriteLine("Can not open Connection" + e.Message); } } private void initConnection() { string strConn = WebConfigurationManager.ConnectionStrings["ibd"].ConnectionString; conn = new SqlConnection(strConn); conn.Open(); } protected void prepareCommand(SqlCommand cmd, string SPName, List paramlist) { // Init SqlCommand if (conn == null || conn.State == ConnectionState.Closed) initConnection(); cmd.CommandTimeout = 1000; cmd.Connection = conn; cmd.CommandType = CommandType.StoredProcedure; cmd.CommandText = SPName; // Process paramlist if (paramlist != null) { foreach (SqlParameter param in paramlist) { cmd.Parameters.Add(param); } } } public SqlDataReader ExecuteQuery(string SPName, List paramlist) { //SqlDataReader read = null; try { SqlCommand cmd = new SqlCommand(); prepareCommand(cmd, SPName, paramlist); return cmd.ExecuteReader(); } catch (SqlException e) { Console.WriteLine("Can not create Command" + e.Message); } return null; } public int ExecuteNonQuery(String SPName, List paramlist) { SqlCommand cmd = new SqlCommand(); prepareCommand(cmd, SPName, paramlist); return cmd.ExecuteNonQuery(); } public int ExecuteScalar(string SPName, List paramlist) { int num = 0; try { SqlCommand cmd = new SqlCommand(); prepareCommand(cmd, SPName, paramlist); num = Convert.ToInt32(cmd.ExecuteScalar()); } catch (SqlException e) { Console.WriteLine("Can not create Command" + e.Message); num = 0; } catch (InvalidCastException e) { Console.WriteLine("Can not get Data" + e.Message); num = 0; } return num; } public DataSet ExecuteDSQuery(string SPName, List paramlist) { SqlCommand cmd = new SqlCommand(); prepareCommand(cmd, SPName, paramlist); SqlDataAdapter adapter = new SqlDataAdapter(); adapter.SelectCommand = cmd; DataSet dataset = new DataSet(); adapter.Fill(dataset); return dataset; } public int FillDataTable(DataSet ds, string SPName, List paramList) { SqlCommand cmd = new SqlCommand(); prepareCommand(cmd, SPName, paramList); SqlDataAdapter adapter = new SqlDataAdapter(cmd); return adapter.Fill(ds); } public void Dispose() { if (conn != null || conn.State != ConnectionState.Closed) { conn.Close(); } } } - Code tầng bussiness object Lớp Student.cs using System; using System.Collections.Generic; using System.Text; using System.Data.SqlClient; using System.Data; using System.Data.SqlTypes; namespace DataEntity { public class Student { private string studentID; public string StudentID { get { return studentID; } set { studentID = value; } } private string firstName; public string FirstName { get { return firstName; } set { firstName = value; } } private string lastName; public string LastName { get { return lastName; } set { lastName = value; } } private string password; public string Password { get { return password; } set { password = value; } } private string email; public string Email { get { return email; } set { email = value; } } private Boolean sex; public Boolean Sex { get { return sex; } set { sex = value; } } private DateTime birthday; public DateTime Birthday { get { return birthday; } set { birthday = value; } } private string address; public string Address { get { return address; } set { address = value; } } private string homePhone; public string HomePhone { get { return homePhone; } set { homePhone = value; } } private string mobilePhone; public string MobilePhone { get { return mobilePhone; } set { mobilePhone = value; } } private string status; public string Status { get { return status; } set { status = value; } } private string classID; public string ClassID { get { return classID; } set { classID = value; } } private string notes; public string Notes { get { return notes; } set { notes = value; } } public Student() { } public Student Get(string SPName, List paramList) { Student Student = null; DBHelper helper = new DBHelper(); // Build parameter list SqlDataReader reader = helper.ExecuteQuery(SPName, paramList); if (reader.Read()) { Student = new Student(); Student.StudentID = reader.GetString(0); Student.FirstName = reader.GetString(1); Student.LastName = reader.GetString(2); Student.Password = reader.GetString(3); try { Student.Email = reader.GetString(4); Student.Sex = reader.GetBoolean(5); Student.Birthday = reader.GetDateTime(6); Student.Address = reader.GetString(7); Student.HomePhone = reader.GetString(8); Student.MobilePhone = reader.GetString(9); Student.Status = reader.GetString(10); Student.ClassID = reader.GetString(11); Student.Notes = reader.GetString(12); } catch (SqlNullValueException e) { Console.WriteLine(e.ToString()); }; } reader.Close(); return Student; } public List GetList(string SPName, List paramList) { List StudentList = new List(); DBHelper helper = new DBHelper(); // Build parameter list SqlDataReader reader = helper.ExecuteQuery(SPName, paramList); while (reader.Read()) { Student Student = new Student(); Student.StudentID = reader.GetString(0); Student.FirstName = reader.GetString(1); Student.LastName = reader.GetString(2); Student.Password = reader.GetString(3); Student.Email = reader.GetString(4); Student.Sex = reader.GetBoolean(5); Student.Birthday = reader.GetDateTime(6); Student.Address = reader.GetString(7); Student.HomePhone = reader.GetString(8); Student.MobilePhone = reader.GetString(9); Student.Status = reader.GetString(10); Student.ClassID = reader.GetString(11); Student.Notes = reader.GetString(12); StudentList.Add(Student); } reader.Close(); return StudentList; } public static int FillDSStudent(DataSet ds, string SPName, List paramList) { DBHelper helper = new DBHelper(); int result = helper.FillDataTable(ds, SPName, paramList); return result; } public static int getStudentbyName(DataSet ds, String name) { DBHelper helper = new DBHelper(); List paramList = new List(); SqlParameter param = new SqlParameter("@name", SqlDbType.NVarChar, 30); param.Value = name; paramList.Add(param); return helper.FillDataTable(ds, "spGetStudentbyName", paramList); } public int Insert() { DBHelper helper = new DBHelper(); List paramList = new List(); SqlParameter param = new SqlParameter("@FirstName", SqlDbType.NVarChar, 50); param.Value = this.FirstName; paramList.Add(param); param = new SqlParameter("@LastName", SqlDbType.NVarChar, 50); param.Value = this.FirstName; paramList.Add(param); param = new SqlParameter("@Password", SqlDbType.VarChar, 50); param.Value = this.Password; paramList.Add(param); param = new SqlParameter("@Email", SqlDbType.NVarChar, 100); param.Value = this.Email; paramList.Add(param); param = new SqlParameter("@Sex", SqlDbType.Bit); param.Value = this.Sex; paramList.Add(param); param = new SqlParameter("@Birthday", SqlDbType.DateTime); param.Value = this.Birthday; paramList.Add(param); param = new SqlParameter("@Address", SqlDbType.NVarChar, 200); param.Value = this.Address; paramList.Add(param); param = new SqlParameter("@HomePhone", SqlDbType.VarChar, 20); param.Value = this.HomePhone; paramList.Add(param); param = new SqlParameter("@Mobile", SqlDbType.VarChar, 20); param.Value = this.MobilePhone; paramList.Add(param); param = new SqlParameter("@Notes", SqlDbType.NVarChar, 200); param.Value = this.ClassID; paramList.Add(param); return helper.ExecuteNonQuery("spInsertStudent", paramList); } public static int Delete(String id) { DBHelper helper = new DBHelper(); List paramList = new List(); SqlParameter param = new SqlParameter("@StudentID", SqlDbType.VarChar, 50); param.Value = id; paramList.Add(param); return helper.ExecuteNonQuery("spDeleteStudent", paramList); } public int Update() { DBHelper helper = new DBHelper(); List paramList = new List(); SqlParameter param = new SqlParameter("@StudentID", SqlDbType.VarChar, 50); param.Value = this.StudentID; paramList.Add(param); param = new SqlParameter("@FirstName", SqlDbType.NVarChar, 50); param.Value = this.FirstName; paramList.Add(param); param = new SqlParameter("@LastName", SqlDbType.NVarChar, 50); param.Value = this.LastName; paramList.Add(param); param = new SqlParameter("@Password", SqlDbType.VarChar, 50); param.Value = this.Password; paramList.Add(param); param = new SqlParameter("@Email", SqlDbType.NVarChar, 100); param.Value = this.Email; paramList.Add(param); param = new SqlParameter("@Sex", SqlDbType.Bit); param.Value = this.Sex; paramList.Add(param); param = new SqlParameter("@Birthday", SqlDbType.DateTime); param.Value = this.Birthday; paramList.Add(param); param = new SqlParameter("@Address", SqlDbType.NVarChar, 200); param.Value = this.Address; paramList.Add(param); param = new SqlParameter("@HomePhone", SqlDbType.VarChar, 20); param.Value = this.HomePhone; paramList.Add(param); param = new SqlParameter("@Mobile", SqlDbType.VarChar, 20); param.Value = this.MobilePhone; paramList.Add(param); param = new SqlParameter("@Notes", SqlDbType.NVarChar, 200); param.Value = this.Notes; paramList.Add(param); return helper.ExecuteNonQuery("spUpdateStudent", paramList); } public int Login() { DBHelper helper = new DBHelper(); List paramList = new List(); SqlParameter param = new SqlParameter("@StudentID", SqlDbType.VarChar, 50); param.Value = this.StudentID; paramList.Add(param); param = new SqlParameter("@Password", SqlDbType.VarChar, 50); param.Value = this.Password; paramList.Add(param); SqlDataReader reader = helper.ExecuteQuery("spLoginStudent", paramList); if (reader.HasRows) { reader.Close(); return 1; } reader.Close(); return 0; } public void getStudent() { List paramList = new List(); SqlParameter param = new SqlParameter("@StudentID", SqlDbType.VarChar, 50); param.Value = this.StudentID; paramList.Add(param); Student stu= Get("spGetStudent", paramList); this.StudentID = stu.StudentID; this.FirstName = stu.FirstName; this.LastName = stu.LastName; this.Password = stu.Password; this.Email = stu.Email; this.Sex = stu.Sex; this.Birthday = stu.Birthday; this.Address = stu.Address; this.HomePhone = stu.HomePhone; this.MobilePhone = stu.MobilePhone; this.Status = stu.Status; this.ClassID = stu.ClassID; this.Notes = stu.Notes; } } } -Code tầng presentation Trang default.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using DataEntity; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void btnLogin_Click(object sender, EventArgs e) { if (rdAdmin.Checked) { Admin ad = new Admin(); ad.UserName = txtUser.Text; ad.Password = txtPassword.Text; if (ad.Login() == 1) { Session["admin"] = txtUser.Text; Session["SubjectId"] = null; Session["SubClassID"] = null; Session["ClassID"] = null; Session["StudentID"] = null; Session["SubjectScoreID"] = null; Session["ExerciseID"] = null; Response.Redirect("Admin/ManageAdmin.aspx"); } else { lblStatus.Visible = false; lblStatus.Text = "Ten dang nhap hoac mat khau sai. Moi ban dang nhap lai"; txtPassword.Text = ""; txtUser.Text = ""; } } if (rdStudent.Checked) { Student st = new Student(); st.StudentID = txtUser.Text; st.Password = txtPassword.Text; if (st.Login() == 1) { Session["Student"] = st.StudentID; Response.Redirect("StudentProfile.aspx"); } else { lblStatus.Visible = false; lblStatus.Text = "Ten dang nhap hoac mat khau sai. Moi ban dang nhap lai"; txtPassword.Text = ""; txtUser.Text = ""; } } } } Trang RegisterSubject.aspx.cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Collections.Generic; using DataEntity; public partial class RegisterSubject : System.Web.UI.Page { public static String subjectID; protected void Page_Load(object sender, EventArgs e) { if (Session["Student"] == null) Response.Redirect("Default.aspx"); String id = Session["Student"].ToString(); Student stu = new Student(); stu.StudentID = id; stu.getStudent(); lblNameStu.Text = stu.FirstName + " " + stu.LastName; if (ddlSubject.Items.Count == 0) { DataSet dset = new DataSet(); Subject.FillDSSubject(dset); ddlSubject.Items.Add("------------"); for (int i = 0; i < dset.Tables[0].Rows.Count; i++) { ddlSubject.Items.Add(dset.Tables[0].Rows[i][1].ToString()); } DataSet ds = new DataSet(); Register.FillDSRegister(ds, id); GridView1.DataSource = ds; GridView1.DataBind(); } } protected void LinkButton4_Click(object sender, EventArgs e) { String id = Session["Student"].ToString(); Response.Redirect("ViewTimetable.aspx?id=" + id); } protected void LinkButton3_Click(object sender, EventArgs e) { String id = Session["Student"].ToString(); Response.Redirect("ViewScore.aspx?id=" + id); } protected void LinkButton1_Click(object sender, EventArgs e) { String id = Session["Student"].ToString(); Response.Redirect("ChangeInformation.aspx?id=" + id); } protected void LinkButton2_Click(object sender, EventArgs e) { String id = Session["Student"].ToString(); Response.Redirect("RegisterSubject.aspx?id=" + id); } protected void ddlSubject_SelectedIndexChanged(object sender, EventArgs e) { String subjectName = ddlSubject.SelectedItem.Text; subjectID=Subject.getSubjectID(subjectName); } protected void btnSelect_Click(object sender, EventArgs e) { DataSet dset = new DataSet(); SubClass.FillDSSubClass(dset, subjectID); HtmlTableRow r = new HtmlTableRow(); HtmlTableCell c = new HtmlTableCell(); c.Controls.Add(new LiteralControl("Class Name")); r.Cells.Add(c); c = new HtmlTableCell(); c.Controls.Add(new LiteralControl("Number of Student")); r.Cells.Add(c); c = new HtmlTableCell(); c.Controls.Add(new LiteralControl("Start Date")); r.Cells.Add(c); c = new HtmlTableCell(); c.Controls.Add(new LiteralControl("End Date")); r.Cells.Add(c); c = new HtmlTableCell(); c.Controls.Add(new LiteralControl("Time Table")); r.Cells.Add(c); Table1.Rows.Add(r); DataSet ds = new DataSet(); for (int i = 0; i < dset.Tables[0].Rows.Count; i++) { r = new HtmlTableRow(); c = new HtmlTableCell(); c.Controls.Add(new LiteralControl(dset.Tables[0].Rows[i][0].ToString())); r.Cells.Add(c); c = new HtmlTableCell(); c.Controls.Add(new LiteralControl(dset.Tables[0].Rows[i][2].ToString())); r.Cells.Add(c); c = new HtmlTableCell(); c.Controls.Add(new LiteralControl(dset.Tables[0].Rows[i][3].ToString())); r.Cells.Add(c); c = new HtmlTableCell(); c.Controls.Add(new LiteralControl(dset.Tables[0].Rows[i][4].ToString())); r.Cells.Add(c); c = new HtmlTableCell(); HtmlTable t = new HtmlTable(); t.Border = 1; TimeTable.FillDSTimeTableBySubClass(ds, dset.Tables[0].Rows[i][0].ToString()); HtmlTableRow rr = new HtmlTableRow(); HtmlTableCell cc = new HtmlTableCell(); cc.Controls.Add(new LiteralControl("Date")); rr.Cells.Add(cc); cc = new HtmlTableCell(); cc.Controls.Add(new LiteralControl("Room")); rr.Cells.Add(cc); cc = new HtmlTableCell(); cc.Controls.Add(new LiteralControl("Shift")); rr.Cells.Add(cc); t.Rows.Add(rr); for (int j = 0; j < ds.Tables[0].Rows.Count; j++) { rr = new HtmlTableRow(); cc = new HtmlTableCell(); cc.Controls.Add(new LiteralControl(ds.Tables[0].Rows[j][0].ToString())); rr.Cells.Add(cc); cc = new HtmlTableCell(); cc.Controls.Add(new LiteralControl(ds.Tables[0].Rows[j][1].ToString())); rr.Cells.Add(cc); cc = new HtmlTableCell(); cc.Controls.Add(new LiteralControl(ds.Tables[0].Rows[j][2].ToString())); rr.Cells.Add(cc); t.Rows.Add(rr); } ds.Tables[0].Clear(); c.Controls.Add(t); r.Cells.Add(c); Table1.Rows.Add(r); TextBox1.Visible = true; btnRegister.Visible = true; Label2.Visible = true; } } protected void btnRegister_Click(object sender, EventArgs e) { String id = Session["Student"].ToString(); if (Register.checkRegister(id, subjectID) == 0) { Register regis = new Register(); regis.StudentID = id; regis.SubClassID = TextBox1.Text; regis.Insert(); TextBox1.Visible = false; btnRegister.Visible = false; Label2.Visible = false; Label4.Visible = true; Label4.Text = "DANG KI THANH CONG"; DataSet ds = new DataSet(); Register.FillDSRegister(ds, id); GridView1.DataSource = ds; GridView1.DataBind(); } else { Label4.Visible = true; Label4.Text = "Ban da dang ki mon nay roi"; } } protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { int id = Convert.ToInt32(e.RowIndex); String subClass = GridView1.Rows[id].Cells[1].Text; int regisID=Register.getRegisterID(Session["Student"].ToString(), subClass); Register.Delete(regisID); DataSet ds = new DataSet(); Register.FillDSRegister(ds, Session["Student"].ToString()); GridView1.DataSource = ds; GridView1.DataBind(); } protected void LinkButton5_Click(object sender, EventArgs e) { Session["Student"] = null; Response.Redirect("Default.aspx"); } } DANH MỤC HÌNH VẼ Hình 2.1: Các bộ phận cấu thành hệ thống thông tin……………………….. 28 Hình 2.2: Chức năng của một máy tính điện tử…………………………….. 33 Hình 3.1 Sơ đồ chức năng nghiệp vụ (BFD)………………………………. 77 Hình 3.2 Sơ đồ luồng dữ liệu mức ngữ cảnh……………………………… 78 Hình 3.3 Sơ đồ luồng dữ liệu mức 0……………………………………….. 78 Hình 3.4 Sơ đồ mức 1 của tiến trình 1.0 – Quản lý sinh viên……………… 79 Hình 3.5 Sơ đồ mức 1 của tiến trình 2.0 - Quản lý đăng kí tín chỉ…………. 80 Hình 3.6 Sơ đồ mức 1 của tiến trình 3.0 – Quản lý điểm…………………... 81 Hình 3.7 Sơ đồ mức 1 của tiến trình 4.0 – Báo cáo………………………… 81 Hình 3.8 Sơ đồ quan hệ thực thể - ERD……………………………………. 83 Hình 3.9 Cơ sở dữ liệu……………………………………………………… 84 Hình 3.10 Giao diện trang chủ……………………………………………… 95 Hình 3.11 Giao diện trang sinh viên………………………………………... 96 Hình 3.12 Giao diện trang thay đổi thông tin cá nhân……………………… 97 Hình 3.13 Giao diện trang đăng kí lớp môn học……………………………. 98 Hình 3.14 Giao diện trang xem bảng điểm cá nhân………………………… 99 Hình 3.15 Giao diện trang xem lịch học cá nhân…………………………… 100 Hình 3.16 Giao diện trang quản lý danh mục người quản lý……………….. 101 Hình 3.17 Giao diện trang quản lý danh mục lớp học……………………… 102 Hình 3.18 Giao diện trang quản lý danh mục môn học…………………….. 103 Hình 3.19 Giao diện trang quản lý danh mục lớp học phần………….…….. 104 Hình 3.20 Giao diện trang quản lý danh sách sinh viên……………………. 105 Hình 3.21 Giao diện trang quản lý bảng điểm theo sinh viên………………. 106 Hình 3.22 Giao diện trang quản lý Assignment của bảng điểm…………….. 107 Hình 3.23 Giao diện trang quản lý Outcome của từng assignment………… 108 Hình 3.24 Giao diện trang báo cáo bảng điểm lớp…………………………. 109 Hình 3.25 Giao diện trang báo cáo danh sách sinh viên đăng kí môn học…. 110 Hình 3.26 Trang quản lý tin tức…………………………………………….. 111 MỤC LỤC

Các file đính kèm theo tài liệu này:

  • docXây dựng Website quản lý đào tạo theo hình thức tín chỉ.DOC
Luận văn liên quan