table of Contents
Introduction ................................................................... 2
First, the problem is proposed ............................................................................ 2
Second, feasibility analysis .........................................................................
(1) Technology feasibility ................................................................... 3
(2) Economic feasibility ................................................................... 3
(3) Operational feasibility ...................................................................
Third, demand analysis ...........................................................................
(1) Function Description ...................................................................
(2) Top-level data flow map .................................................................. 4
Fourth, database design ....................................................................
(1) Physical database ................................................................... 5
(2) Database relationship diagram .......................................................................... 8
(3) The view required for the system .............................................................. 9
V. User layer design ...........................................................................
(1) User layer design realization tool ...............................................................
(2) ASPX page relationship and page introduction ...................................................... 11
(3) The mating of user layers and other layers .........................................................
(4) Controls used by interface design Controls .....................................................................
(5) Objects used in the interface design programming part (non-control) Objects ......................... 20
(6) Namespace used by the interface design programming section Namespace ............................ 21
Six, summary .................................................................................... 21
Seven, thank you .................................................................................... 22
Eight, reference ...............................................................................................
Nine, appendix .................................................................................. 23
Computer public class score management subsystem
Thank you
School of Computer and Information Science, Southwest Normal University, Chongqing 400715, China
Summary: Computer public class score management subsystem is based on network-based, using .NET platform, SQL Server 2000 database, supports ASP.NET IIS server to construct a management system for multiple users, with other children in MyCollege.net The system is combined, from these subsystems, students' basic information, combined with local database, build a digital space on the basis of traditional campus teaching plan management and student performance management, implement teaching plan, course, teacher information, student The convenience of results is to improve the purpose of improving education management level and efficiency.
Abstract: On the basis of network, Computer Public Course Management System (CPCMS) combines with the other child systems of MyCollege.Net using the .net platform, SQL Server 2000 data base and IIS server which surppot ASPsp.net, .CPCMS gets departments information and basic students information from these child systems to connect with local data base. Foundation as traditional teaching plan management and score management, CPCMS build a digital space to achieve convenient search and manage for the teaching plans, courses, teachers, scores .Having it Keywords: computer public class score management subsystem ASP.NET SQL Server 2000
introduction
In the development of MyCollege.net system, I mainly participate in the design and implementation of the application subsystem - computer public class score management subsystem. For demand analysis and overall design, I designed the database of the subsystem in detail, and it is implemented on SQL Server 2000 to lay the foundation for the follow-up of this sub-system. According to the overall design, I also use the ASP.NET technology on the .NET technology to design the user layer of this sub-system, and write code to implement. At this layer, the authentication and import subsystems of the public resource and the shared subsystem are implemented by calling the unified identity authentication subsystem and the public resource management and the shared subsystem.
One, question
All along, the public computer department of our school is manually operation, and the teacher registers the results of the students, and pays to the teaching secretary, and then integrates these achievements, and finally send it. Each class. This is wasting manpower, material, and it is easy to make mistakes and is not easy to save, and the highly developed automation is severely detached. As a result, we consider writing a public class grade management system to manage it.
Second, feasibility analysis
(1) Technology feasibility
The public class score management system is mainly used in the Ministry of Education, the Ministry of Education of the Ministry of Education on Teaching Plan, Curriculum, Teacher Information, Results. By using the Visualstudio.NET tools provided by Microsoft, you can implement online query and management of teaching programs, courses, etc. related to public lessons.
(2) Economic feasibility
Since this system is just as our graduation design, it is not too much economic feasibility.
consider. But it is very suitable for public class management in colleges, because the system implements the management and query network.
Chemist, teachers, students.
(3) operation feasibility
The interface design of this system is simple and intuitive, easy to understand. It is used by the controls that are common or common, and it is easy to get started. In addition, the system is published on the network, and the user can access this anytime, anywhere. You can use this system without special training and explanations.
Three, demand analysis
(1) Function Description
1. Teaching Management Function (Use of public computer education) includes:
1 Entry and query of the courses open in the new semester: For example, the course will be opened at the 2004: C language and VFOR. Explanation: All course scores consist of three parts: usual grades, machine scores, written test results. The specific gravitys accounted for: 10%, 10%, 80%, in which the three parts and specific gravity therefor are fixed.
2 Entry and inquiries for the course arrangements of each laminate, the course arrangement is the semester for each department
Electoral course, members of teachers, and class time and class locations.
Note: All the courses selected in each of each department are the same. But the students in the same department do not have to have the same teacher to teach.
2. The function of the performance management (the teacher is used) is as follows:
1 Enter a score: You can also enter a single entry can also be incorporated in batches, where batch entry is in units of transcripts, and each time you call a transcript from the system, and submit it once after editing.
Transcripts: transcripts include semester, department, professional, course, teacher, student achievement.
2 Query results: single query (students can be used), query about all the students' results of all courses of the student according to the student's school number or name.
Batch query is in units of transcripts, each querying a transcript.
3 Print scores: You can print a transcript once, or print it as required.
4 Statistics Adjustment: Statistics on the scores in the transcript, pointing out the distribution of the number of people in each score. Because sometimes the students' grades are overall, they need to be adjusted, and the system can adjust the scores in the transcript according to the rules set by the user.
Results Adjustment Rules: Adjusts the total score of the total score in a certain segment to another score. For example, 50 to 60 points are all adjusted to 60 to 65. In order to make the adjustment process as reasonable as possible, it is also possible to restrict the student scores of the adjustment score segment, such as setting its written test scores must be more than 50 points, and usual grades can be properly relaxed.
5 The examination of each semester is not as follows.
3. Permission description:
1 Administrator can use the function: teacher information management, department display, course management, teaching plan management, student results query;
2 Teachers can use the performance management of the performance: add, delete, modify, query, analyze, and adjust, and adjust the students.
3 Students can use the function: Query all the results of individual students.
4. System data update features:
Get basic information about students, department, professional, and update the local database, and the data saved by the local database is updated under MyCollege .NET.
(2) top-level data flow map
1. Administrator Operational Management Top Data Flow Diagram:
2. Grade management top data flow map:
The system uses the B-S structure by function dividing module, using .NET and SQL Server as the development tool. The development of the system only uses four-layer structure: database, database access layer, business logic layer, user layer. I am mainly responsible for the implementation of database and user layers. The following introduces:
Four, database design
The database of this system is implemented in SQL Server 2000. It is a relational database product that has high reliability, scalability, availability, manageability, data warehouse, etc., providing a complete database solution for a variety of users. SQL Server 2000 focuses on the application and development of network databases in the Internet, in addition to the various powerful features of the modern database management system, providing HTTP support and provides web users. Perfect network data management and data analysis solutions. It is a background database of network programming, which can be used for ASP.NET technology or JSP technology to connect between web pages and databases. This is also what this system is required. (1) Physical database
The following detailed introduction is the basic table designed for this system:
1. Course TCOURSES
The curriculum is the basic information used to store the courses in this semester. For courses, it has only two basic properties, courses, and unique logo. Setting the course number can also simplify the representation. For the course number, the specification can only be represented by an integer number, which is not more than 4 digits, which is conducive to the dynamic increase in the course number; for the course name, because its length is not determined, use the variable long string, but not exceeding 50 characters.
2. Department of TDEPTS
The lack of lack is used to store all the department of the school. For lack, it only needs two properties, lack name and unique logo. For lacline numbers, the rules can only be expressed in the integer number, but cannot exceed 4 digits, which is conducive to the realization of the dynamic increase in the line number; for the system name, due to the length of the string, it is expressed, but cannot be More than 20 characters.
Here, the reason why it is necessary to separately ask the lack as a table, not to check from the student watch or teaching schedule when needed, because this is conducive to ensuring the consistency of the data, avoiding a Table Medicine The same data in other tables is not updated after the update.
3. Professional TMAJORS
The professional table is stored in each department. For professional, it is refined in the department, so the profession has three properties: it corresponds to the department, and the professional name and unique protocol. For the professional number, the provisions can only be expressed in the shaping number, which cannot exceed 4 digits, which is conducive to the automatic increase in the professional number; for professional name, due to the length of the length, it is represented by the variable long string, but not more than 50 characters .
4. Student TSTUDENTS
The student watch is used to store basic information about all students of the school. For students, he corresponds to name, gender, national, department, professional, grade, because multiple students' names may be the same, and gender, nation, department, grade these will have the same, so the school number Uniquely marked a student. For the students, the rules can only be represented by 10-bit plastic numbers; for the student name, use the variable length string, but can not exceed 20 characters; for gender, only two characters are required, that is, a Chinese word; for the nation, Expressed with a variable string, but cannot exceed 10 characters; for the grade, the plastic number is specified, but cannot exceed 4 digits.
Because of the professional number, the department name and professional name can be launched, so the two properties of the lack name and professional name are removed to avoid redundant information.
5. Teaching plan TTECHINGPLANS
The teaching plan is a teaching plan used to store public class this semester. It points out what class is on every grade per semester and which teachers come. Because of the department, professional, courses, teachers can be derived from other basic tables through their respective codes, so they only need their code. Since all of these together can introduce a teaching plan, therefore set a teaching plan number to uniquely log this information. For the teaching plan number, the stipulations of the stipulations of the stipulations of the stipulations of the stipulations of the stipulations of the stipulations.
6. Grade Tscores
The grade table is the achievement of all computer courses used to store all students studying in computer public lessons. Only students in the teaching plan will have results, so a message is uniquely determined by the student number and teaching plan number. Usually, the results of a course may consist of total scores, all or part of the transformation, written test scores, so each part of the performance is allowed to be empty.
For each part of the score, the specified floating point number is indicated that the length is 8 bits.
7. Teacher TTEACHERS
The teacher table is the teacher information used to store the Ministry of Education of the Public Computer Education. For teachers, it is generally corresponding to teachers, gender, title, etc., because the teacher name may have repetition, so there will be a teacher number to order a teacher. However, for the system, only teachers and teachers are required, and other information is required.
For the teachers, the provisions can only be expressed in the integer number, not more than 4 digits; for the teacher name, since the length cannot be determined, the variable string is represented, but it cannot exceed 20 characters.
(2) Database relationship diagram:
This relationship diagram determines the correspondence between the various sheets, explicit the primary key and foreign key to ensure the consistency of the data.
(3) View required by the system
1. VStudents
This view is used to query students' basic information: student number, name, gender, nation, department, professional, grade. Through this view, you can check the complete information of the students.
2. Vscores
The view is used to query the students' achievements, which can be single science achievements, all subject scores, parties, total scores. With this view, you can know the full information about students and their curves, including course names, teacher, etc. 3. VteachingPlans
This view is used for inquiring, teaching programs, including: teaching plan, semester, department, professional, grade, course, teacher name. Because of the user, he generally only needs to know the intuitive information, not the code, course, teacher, professional code, and the code is generally only used for internal operations.
5, user layer design
(1) Implementation tool for user layer design
The interface design of this system mainly uses the ASP.NET provided in Microsoft's VisualStudio.net2003, which is the advanced web development platform, running on the server. Use it to build a powerful web application. It provides some features below:
1. It can choose any of any one. NET programming language.
2. Provides some data controls access to databases, such as DataGrid, DataList controls, making data display more flexible.
3. Two server controls for HTML and Web are provided, adding methods, event-driven capabilities, implementing HTML code and procedures separation, easy to modify and read.
4. With strong cache and status management technology, ASP.NET provides two caches, a speed to page caching, a data cache, thereby increasing data accesses. 5. With Code Behind technology, the interface design is separated from programming, easy to use, facilitated program debugging and maintenance, improves the security of the program.
6. Application range is increased, not limited to web applications. Regardless of whether the operating system and programming language are the same, you can share data over Internet.
On the web design part, I mainly use the rich controls provided in ASP.NET and downloaded online downloads.
The subsection is reasonably layout according to system planning and system analysis; in the programming section, I use programming language C # to implement control and response to the control and the binding of data in the database.
(2) ASPX page relationship and page introduction
1. Total interface design
The interface of the public class grade management system is designed according to the function, mainly including four parts: teaching management, performance management, student query, public resource import.
As shown in Figure 1, we will first enter the default page. This is an important information publishing interface, and it is also an administrator login interface. We can select any module in the leading rules above the page, click the appropriate link to enter, but the score management module and the public resource import module You need to have permission to enter. All pages are placed in the primary navigation, so they can be switched to any one of the modules in all pages, which is conducive to user operation while saving time. Since each page will be used to the primary navigation, it is designed to make the main navigation strip into user-defined controls, which reduces duplicate work.
If there is no authority after logging in or logged in, click grade management and public resource import module will not enter the page you want to access, but jump out of a message prompt page. From this page, you can return to the login page directly to let the viewer log in. In order to facilitate the user to operate, use the parameter transmission, after the user is logged in, the page directly returns to the interrupted access before landing.
Figure 1 Default page
2. The following is directed to each module:
1 Teaching Management Module
The module includes a teaching plan, curriculum management, and teachers manage three submodules. In all the pages inside the module, a teaching management sub-navigation strip access to the tri-sub-module is set, and the selection link can be switched in each sub-module, and the setting of the sub-navigation bar will make it easy to operate. Since multiple pages need to be used to use the sub-navigation bar, the sub-navigation strip has made the subscriber custom control when designing, reducing duplicate work.
When accessing the module through the primary navigation, you will first enter the teaching plan submodule, rather than entering a total page, then selecting the entry into a sub-module. This will simplify the user's choice, and it also reduces unnecessary page design, so that the interface does not look redundancy. You can then enter the child module you think by selecting the choice of teaching management son navigation strips.
These three sub-modules use unified interface design:
Each submodule will first enter the query page, all viewers can access, rather than enter the navigation page of the submodule, and select. Similarly, this not only simplifies the user's choice, but also reduces unnecessary page design.
After the administrator logs in, you can directly jump to the delete page and add the page from the link in the query page, and you can return to the query page in the delete page and add the page, so that the user can see the deletion and add information. The situation can directly see whether deleting information and the addition of information are successful. If not an administrator or not logged in, the viewer will not enter the delete page and add a page, but enter a message prompt page, from which you can enter the login interface to log in, then return to the interrupted page before logging. 1) Teaching Plan Module - Provides the browser with the inquiry function of this semester teaching plan, providing administrators with query, deletion, and addition of this semester teaching plan.
Figure 2 Teaching Plan Query Page
As shown in Figure 2, all teaching plan information is displayed in the Query Teaching Plan page. The control can be binded to the data set and can clearly display the information as a table.
In the addition of the teaching plan page, since the drop-down list DROPDOWNLIST is used, all items for the teaching plan can only be selected. If the teachers and courses need to be selected does not exist, they can be added by adding teachers and adding courses links. Go to the add page, first add the teacher information or course information, then return directly to the interrupted addshore plan page. This design will simplify the administrator's entry and reduce the mistakes that occur during the entry.
2) Course Management Submunition - Provides the browser to provide query features for this semester course information,
Provide administrators with query, deletion, and add functions for this semester course information.
Data table data is displayed in the Query Course page to display all course information.
3) Teacher Management Submunition - Provides the query function of teacher information to the visitor, providing the administrator for query, deletion, and add functions of this semester teacher information.
In the Query Teacher page, you use data table DataGrid to display all teacher information.
2 grade management module
The module provides the teacher's inquiry, update, entry, deletion, statistics, adjustment, and printing of the various parts of the student courses. Query, update, entry, deletion, and printing function of the administrator. In all the pages inside the module, a teaching management sub-navigation bar accessing all function pages is set, and the selection link can be switched in each function page, and the setting of the sub-navigation bar will make it easy for the user. Since multiple pages need to be used to use the sub-navigation bar, the sub-navigation strip has made the subscriber custom control when designing, reducing duplicate work.
The grades management module can only be entered by teachers and administrators. After logging in, when entering the module through the primary navigation bar, first enter the grade management main page, according to the tree navigation structure selected by the left, professional, grade, and courses entered the performance of the door course of the selected student. . From this page, you can select a link to the grade management sub-navigation bar to enter the appropriate entry, statistics, adjust, and print. In these pages, you can return directly to the grade display page, so that the user can see if the information is changed, it can directly see if the information modification is successful. If there is no permission access or no login, the viewer will not enter the grade management module or the corresponding page, but enter a message prompt page, from which you can enter the login interface to log in and then return to the login before the interrupt page.
In all pages inside the module, the teaching plan tree navigation structure is set. Through its choice of different teaching programs, it can be switched in different sites and different subjects cultivated in different ages. Since multiple pages use the teaching planned tree navigation structure, the sub-navigation strip has made the subscriber custom control when designing, reducing duplicate work. This navigation structure is implemented with a TreeView control, and does not use drop-down list DROPDOWNLIST because it involves multi-layer selection. If the drop-down list is implemented, the interface will make the interface more messy, affect the operation and the appearance. Figure 3 Score Management Query page
1) Display the grade information in the query grade page.
2) To edit a record in the message display, select the editing chain, enter the information editing
State, enter change information, which is provided by DataGrid.
3) To enter a score, enter the selected course grade entry interface, enter the student grade information.
4) To count grades, enter the performance statistical interface of this course of the selected major and grade, will
Directly display the number of people in each score, can return to the student grade display interface from this page.
5) The results adjustment page adjustments through the selection of each part of the score segment,
Considering the adjustment of the results due to the malfunction of the administrator, so it provides a grade
Recovery links to restore the results before adjustment.
6) Print the results to print the results of this course in the selected major and grade
Interface, printing. The print function is implemented by a crystal report.
3 student query module
Figure 4 Student Query Page
This module provides students with basic information inquiry and inquiries of all the total scores of the students. Students only need to enter a school number and name. Since the total score of the student is open, it is not allowed to set the permission. Display of student basic information and grade information is implemented with DataGrid.
4 public resource import module
This module is to update and maintain the data of the system through a local area network into a database in a public class score management system through a local area network.
Three, conclusions
After a few months of hard work, we have completed the development of XML-based loose coupling open systems under the strong cooperation of all members of the group. This is the crystallization of our sweat. It is a realization of our self-power. It is a ladder that we enter society is our valuable experience.
Four years, theoretical study time is much, the practice is less, like this completely, is the first time. Through graduation design, I summarized the knowledge system, and learned about all development processes about the database system: from the problem to demand analysis, analyze the feasibility study, from feasibility study to overall design , Go to the detailed design, encoding test. It also makes us understand that system development is an engineering job. In addition, graduation design has also cultivated my self-study ability. In the specific implementation, I passed the knowledge of the library to find information, self-study related books, and advocate the C # programming language and the operation and use of ASP.NET and SQL Server 2000.
Through graduation design, I not only learned technical knowledge, but more importantly, I learned how to cooperate and coordinate with people, how to integrate themselves into the group. During the graduation design, the team members gave me a lot of help. Working with people is not only required for graduation design, and it needs it in many of our work. The practice of graduation design has laid the foundation for us.
Four, thank you
This graduation design can be successfully completed inseparable from our guidance.
Zou Xiangchun
Teacher guidance and help,
Lu Xinhong
teacher,
Chen Wu
teacher,
Smell
teacher,
Li Yun Gang
Teacher also gave great help in this process, expressing their sincere gratitude to their help. There is also a team of all members to support me, thank you for their heartfelt thanks! references:
[1] Zhang Li, Wang Qiang, Zhao Wenzhao, Dong Li. SQL Server Database Principle and Application Tutorial. Tsinghua University Press
[2] Wei Weihong and other translations. Advanced programming of ASP.NET distributed data application. Tsinghua University Press
[3] Guo Sheng, Qin Co, Ma Li. C # .NET program design tutorial. Tsinghua University Press
appendix:
Some implementation of the interface design
(1) Customize the code of login control Login
Figure 1 login control
/ * Code of authentication when logging in * /
Private void Button1_Click (Object Sender, System.Eventargs E)
{
/ * Standardize the parameters, remove extra spaces * /
String nickname = textBox1.text.trim ();
String password = textbox2.text.trim ();
String role = "";
/ * Call UIA's WebService to complete user authentication * /
Userref.uservice userref = new userref.userService ();
/ * Discover if user information is true * /
IF (Userref.checkuser (Nickname, Password))
/ * Discrimire if the user is available * /
Userref.isuserenabled (nickname))
{
IF (userref.isinrole (Nickname, Teaching Administrator ", Config.usid)
IF (userref.isroleenabled (Nickname, "Teaching Administrator", Config.usid))
Role = "Teaching Administrator";
IF (Userref.Isinrole (Nickname, "Wonderful Teacher", Config.usid)
IF (Userref.isRoleEnabled (Nickname, "Wonderful Teacher", Config.usid)
Role = "Waiting Teacher";
}
IF (role == "")
{
TextBox1.text = ""
TextBox2.text = ""
Return;
}
/ * Encrypt user information * /
FormsauthenticationalticTicket Ticket = New FormsauthenticationTicket (1, Nickname, DateTime.Now, DateTime.Now.addminutes (30), False, Role, "/");
String hashticket = formsauthentication.encrypt (ticket);
Httpcookie usercookie = new httpcookie (formsauthentication.formie (formsauthentication.formie);
Response.cookies.add (usercookie);
/ * Return to the last call of the last call * /
Try
{
Response.Redirect (Request.QueryString ["ReturnURL"]. TOSTRING (), TRUE);
}
Catch (Exception K)
{
Response.Redirect ("Default.aspx", True;
}
}
(2) Customize the code of TEACHINGPLANTREE
Public Class TeachingPlantree: System.Web.ui.userControl {
Protected Microsoft.Web.ui.WebControls.treeView TreeView1;
Private Void Page_Load (Object Sender, System.EventArgs E)
{
/ / Place the user code here to initialize the page
DataTable Table = New
TEACHINGPLANSYSTEM (). ListteachingPlans (). TABLES [0];
//table.select
Foreach (DataRow Row In Table.Rows)
{
Bool flag = false;
Foreach (Treenode Node in TreeView1.nodes)
IF (Node.Text == Row ["Term"]. TOSTRING ())
Flag = true;
IF (Flag == False)
{
Treenode Lay1 = New Treenode ();
Lay1.text = row ["term"]. TOSTRING ();
this.treeView1.nodes.add (lay1);
Foreach (DataRow Row)
2
in
Table.select ("term = '" lay1.text "'"))
{
Treenode Lay2 = New Treenode ();
Lay2.text = row2 ["courseename"]. TOSTRING ();
BOOL FLAG2 = FALSE;
Foreach (Treenode node in lay1.nodes)
IF (Node.Text == Row2 ["CourseName"]. TOSTRING ())
Flag2 = True;
/ * If this course has not been added to the tree, add it * /
IF (Flag2 == FALSE)
Lay1.nodes.add (lay2);
Else Continue;
Foreach (DataRow Row)
3
in
Table.select ("Term = '" lay1.text "' and
CourseName = '" lay2.text " "))
{
Treenode Lay3 = New Treenode ();
Lay3.text = row3 ["deptname"]. TOSTRING ();
Lay2.nodes.add (lay3);
DATAROW [] idrow = Table.select ("Term = '" lay1.text "' and courseename = '" lay2.text "' and deptname = '" lay3.text "");
Lay3.nodeData = idrow [0] ["teachingplanid"]. TOSTRING ();
Lay3.naVigateURL = "scoreview.aspx? teachingplanid =" iDrow [0] ["teachingplanid"]. TOSTRING ();
}
}
}
}
}
(3) Student Query Page Code Figure 2 Student Information and Result Query Page
/ * Query button Click Events * /
Private void Button1_Click (Object Sender, System.Eventargs E)
{
DataGrid1.datasource = NULL;
String snumber = textbox1.text.trim ();
String sname = textBox2.text.trim ();
DataSet Data = New ScoreSystem (). Getscores (snumber);
/ * Check if students enter information correctly * /
IF (Sname! = Data.Tables [0] .ROWS [0] ["sname"]. Tostring ())
{
Label3.visible = true;
Return;
}
Label3.visible = false;
/ * Display the required information in the student basic information form and student transcript * / dataGrid1.datasource = dataGrid2.datasource = data.tables [0] .defaultview;
DataBind ();
}
(4) Display data in the database in the drop-down list
Figure 3 Teaching Plan Options Display
Private Void Page_Load (Object Sender, System.EventArgs E)
{
/ * Verify that the visitor has permission to view this page * /
IF (this.page.user.isinrole ("Teaching Administrator") == false)
Response.Redirect ("RoleError.aspx? ReturnURL =" Request.URL, TRUE);
IF (! page.ispostback)
{
/ / Place the user code here to initialize the page
DropdownList1.datasource = new deptmajorsystem (). ListallDepts (). Tables [0] .defaultView;
DROPDOWNLIST1.DATATEXTFIELD = "deptname";
DROPDOWNLIST1.DATAVALUEFIELD = "DeptID";
DropdownList4.datasource = new courseSystem (). Listallcourses (). TABLES [0] .defaultView;
DROPDOWNLIST4.DATEXTFIELD = "CourseName";
DROPDOWNLIST4.DATAVALUEFIELD = "courseid";
DropdownList5.DataSource = new teachersystem (). Listallteachers (). Tables [0] .defaultview;
DROPDOWNLIST5.DATEXTFIELD = "teachername";
DROPDOWNLIST5.DATAVALUEFIELD = "teacherid";
DataBind ();
}
}
(5) Record code
Private void Button1_Click (Object Sender, System.Eventargs E)
{
INT ID = (int) this.cache ["teachingplanid"];
IF (new businessfacade.scoreSystem (). addscore (TextBox1.text, id, float.parse (textbox3.text), float.parse (TextBox4.text), float.parse (textbox5.text)) {
Panel1.visible = false;
TextBox1.text = textbox1.text.substring (0, TextBox1.text.length-3);
TextBox3.text = ""
TextBox4.text = ""
TextBox5.text = ""
}
Else
{
Panel1.visible = true;
}
}
(6) Each score display code
Private Void Page_Load (Object Sender, System.EventArgs E)
{
/ / Place the user code here to initialize the page
IF (this.page.user.isinrole ("Teaching Administrator") == True || this.page.user.isinrole ("Teacher") == True)
{
}
Else
Response.Redirect ("RoleError.aspx? ReturnURL =" Request.URL, TRUE);
INT ID = int.parse (this.cache ["teachingplanid"]. TOSTRING ());
ScoreSystem s = new scoreSystem ();
For (int i = 0; i <10; i )
{
INT C = S.Analyzescores (ID, I, (i 1) * 10);
IF (i == 0)
TextBox1.text = c.toString ();
IF (i == 1)
TextBox2.text = c.toString ();
IF (i == 2)
TextBox3.text = c.toString ();
IF (i == 3)
TextBox4.text = c.toString ();
IF (i == 4)
TextBox5.text = c.toString ();
IF (i == 5)
Textbox6.text = c.toString ();
IF (i == 6)
TextBox7.text = c.toString ();
IF (i == 7)
TextBox8.text = c.toString ();
IF (i == 8)
TextBox9.text = c.toString ();
IF (i == 9)
TextBox10.text = c.toString ();
}
}