Student basic information processing utility

xiaoxiao2021-03-06  41

table of Contents

First, preface .....................................................................................................

Second, SGET and SINPUT used in the main technology ...................................................................

Third, students basic information online query practical tool sget .................................................. 3

Fourth, students basic information online query practical tools SINPUT ............................................. 5

5. References ...............................................................................................

Sixth, thank you ............................................................................................... 10

Student basic information processing utility

He Xiang

School of Computer and Information Science, Southwest Normal University, Chongqing 400715, China

Summary: This utility uses the web services provided by the public resource management and shared subsystems under MyCollege.net, and implements the basic information network management through WebService technology.

Abstract: this Tool Used The Web Service Supported by The Sub System Named PUBLIC

Resource Management System, as well as the sub system named Identity Confirment System, both of which were identified in the MyCollege.Net system.Useing the WebService technology ,, the tool could administrate the basic information of students though the Internet.

Keywords: Webservice UIA CRESOURCE Student Basic Information Unified Landing Form

Foreword

In order to meet the requirements of the basic information processing of students under MyCollege.net, we have developed two on the basis of public resource management and shared subsystem CRESOURCE and unified identity certification subsystems. Practical tools SGET and SINPUT. SGET and SINPUT are used in a network environment. By the WebService technology, the former is used in the network environment to read students 'basic information from the server from the server through WebService, and enables users to implement query about students' basic information on the client; and the latter is also Through WebService technology, read students' basic information from the server to the client, users can modify or add new student basic information on the client, and then modify the information back to the server and modify the database information.

First, the main technique used by sget and sinput

Use web services

Web Services WebService Behavior is Microsoft's new technology that can be used in IE5.0, which can be used by page scripts. It uses Simple Object Access Protocol (SOAP) to communicate with Web service, which can dynamically update local, not to refresh The entire page, which is more effective than the usual use of the entire page, WebService is more efficient. It is a set of functions, which is packaged in a universal architecture over the network. Easy communication between a 10,000-different hardware platform is the most obvious and most direct benefits of the web service architecture. The Web Services is a component that does not need to be purchased and deployed. This component is deployed to the Internet, and then a new component that is available everywhere, all applications only need to be able to connect into the Internet, you can use and integrate web services. There are two times to use the WebService service to have a good effect:

1. When you want to integrate various programs that are written on different platforms in different languages. It is generally necessary to spend a lot of effort in different platforms written in different platforms in different languages, but through WebService, the application can expose function and data to other applications. 2. Communication across the firewall.

The specific implementation process of WebService is as follows:

1) Developers build an object.

2) The object is copied to a server that performs a WebService program.

3) Run a program on different, remote computers, requires a specific way for the web server to make this class.

4) The server creates an instance of the class and calls the method.

5) The result of the server return method gives a request to the computer.

6) The remote computer accepts the value and issued a computer.

The specific structure is shown in the figure:

Second, students basic information online query utility sget

(1) function

The function of the sget is mainly based on the network environment, according to the students or names. For the name of the name, if you enter "Zhang" queries all the students containing "Zhang" in all names, the students' information contain basic information such as students' students' skeeper, name, gender, disciplines.

Although SGET is a tool, but because it is incorporated into MyCollege's information, it is necessary to comply with MyCollege software development process and corresponding technologies.

Through the description of the CResource document, the data obtained from the CResource is strictly controlled. Sget is just queried by the basic information of the students, and cannot query the students' confidential information, such as other information such as ID card, account, etc., these must be in sget Bottomatic data access is limited. When the webservice function is called, the WebService server obtains the system unique identify (USID) of the call method and then queries the authority of the corresponding caller according to the USID query, decide which information from the student is returned to the client. And the reason for WEBSERVICE is because from the client browser calls WEVService to respond speeds faster, there can be more interactive pages, users feel more convenient, do not need to pass a form back to the server and accept a new one page.

(2) SGET principle

The principle of SGET is to extract data from the public resource sharing and management module using WebService technology, and returns data to the user. A group of web services in the Webservice in Crsource, which has a STUDENTSERVICE service that provides some functions that can be called over a network. There is a StudentService agent in our sget, which is used to process the underlying network communication. These functions are called equivalent to a networked data access layer (DateAccess) and then call these functions in the interface layer of the web.

(3) Specific implementation

SGET does not use the identity authentication service in MyCollege, which is just through the basic information of the students remotely, so there is no UIAURL configuration item in its configuration file. It is just to query the basic information of the student at the client, so only public data resource services, only need to redirect Cresorce's WebService in the configuration file.

Source code for SGET below

By the query interface passes the criminal through the URL string to Result.aspx, then call the corresponding function in the initialization function of the page, the keyword is not analyzed when the query is queried, but the keyword is preferred as a keyword. Is a student number, inquiring by means of the number, if you can't get a student, then follow the name query. If an error occurs, redirect to the Error.aspx page pop-out error message. (As shown above) // Get the query key from the query string.

String Key = Request.QueryString ["key"]. Tostring ();

/ / Generate a StudENTService service agent.

StudENTREF.StudentService Student = new studentref.studentService ();

/ / Relocate the service according to the configuration in the configuration file

Student.URL = configurationSettings.appsettings ["CRESOURSERVICEURL"]. TOSTRING (). Trim () "/ studentservice.asmx";

// Take KEY as a student number query

DataSet s = student.getstudentBysNumber (key);

// If the query result is 0, the KEY is blurred as the name.

IF (S.Tables [0] .Rows.count == 0) {

S = student.getstudentBysname (key);

}

/ / Display the number of records to record

Label2.text = "Query keyword:" key;

Label1.text = "Found" S.Tables [0] .rows.count "result!";

DataGrid1.datasource = S.TABLES [0] .defaultView;

/ / Display Packages

Label3.text = "Total" (1 DataGrid1.pageCount) .tostring () "page, currently displayed" "1";

// Bind data to DataGrid

DataBind ();

}

Catch (Exception K) {

// If the server is abnormal, locate the page to Error.aspx to prevent users from seeing detailed debugging information.

Response.Redirect ("Error.aspx");

}

Third, students basic information online query practical tools SINPUT

(1) SINPUT function:

With the WEVService service, allow the client to better respond to the speed of the server without having to pass a form back to the server and accept a new page. SINPUT is very convenient to query and modify the basic information of the students, is a very convenient information management utility.

1. Add new student information to the database via WebService.

2. Change and delete an existing student information via WebService. But SINPUT cannot make a vague lookup for student information.

(2) The principle of SINPUT:

The principle of SINPUT is to extract data from the public resource management and shared module (Crsource) of WebService technology and return the data to the user, and return the client's modification information to the server via the WebService technology. A group of web services in the Webservice in Crsource, which has a STUDENTSERVICE service that provides some functions that can be called over a network. The unified landing form in the UIA is used in the SINPUT, which has a UIAURL configuration item in the configuration file. It is used for permission management, and only one permission management is used in SINPUT. There is a StudentService agent in our SINPUT, which is used to handle the underlying network communication. These functions are called equivalent to a networked data access layer (DateAccess) and then call these functions in the interface layer of the web. (3) Specific implementation:

SINPUT.EXE.CONFIG file:

The unified landing form in the SDK package of the certificate system needs to read this configuration item from the configuration file ->

When you call the WebService service in the program, you should redirect WebService based on the information in the configuration file after creating the WebService agent, which is very troublesome, so consider setting a configuration class config in the program. Set the appropriate properties in the configuration class to handle information in the configuration file. When the program requires a WebService, automatically created and redirected by the CONFIG class.

This aspect can simplify the use of WebService in the program, and on the other hand, the WebService object can be cached, and the running speed of the program can be improved.

Namespace SINPUT

{

///

/// config mainly reads information from the configuration file to configure WebService, simplifying the redirection of WebService and use

///

Public Class Config

{

Private static studentref.studentService s = null; // Cache StudentService object

Private static deptmajorref.deptmajorservice d = null; // Cache DePtmajorService object private static string usid = null; // Cache's USID

///

/// Attribute: USID encoding of this system

///

Public Static String USID

{

Get {

IF (USID == NULL)

USID = ConfigurationSettings.AppSettings ["USID"]. TOSTRING (). Trim ();

Return USID;

}

}

///

/// Property: StudentService Service

///

Public Static StudentRef.studentService Student STUDENT

{

Get {

IF (s == NULL) {

S = new studentref.studentservice ();

/ / Read the URL of the StudentService service from the configuration file to reposition the service

S.URL = configurationSettings.appsettings ["CRESOURVICEURL"]. TOSTRING () "/ studentservice.asmx";

} return s;

}

}

///

/// Property: DEPTMAJORSERVICE Service

///

Public static deptmajorref.deptmajorvice dePTMAJOR

{

Get {

IF (d == NULL) {

D = new deptmajorref.deptmajorservice ();

// Read the URL of the DePtmaJorService service from the configuration file to reposition the service

D.url = configurationSettings.appsettings ["CRESOURSERVICEURL"]. TOSTRING () "/ deptmajorvice.asmx";

Return D;

}}}}

(4) Features of SINPUT:

1. Using a unified landing form

The unified form structure defined by the SDK in the UIA. This form requires a parameter usID in initialization, initializing the parameter USID through the function config.usID, and through the function configrationSettings.appsettings ["et"]. ToString (). Trim (); implementation of the initialization process.

UIASDK.WIN.LOGOFORM logo = new uiasdk.win.logoform (config.usid);

2. Start the use of the form

When the entire program is started, due to the initialization of something (mainly calling the first time for WebService), the startup is slow, and the following code is added in SINPUT.

Bitmap SplashImage;

SplashImage = New Bitmap ("splash.bmp");

Splashscreen splashscreen

Splashscreen = New Splashscreen (SplashImage);

With multi-threaded technology, start the main thread when the main thread creates a sub-thread, at which time the screen displays a pair of pictures (as shown below)

This part of the work is to give the user a prompt information, prompting the user that this program is already running normally. After the main program is already ready, the following code is activiVate ();

Splashscreen.Close ();

At this time, a message is sent by the main thread to the sub-thread, and the process of the display screen is ended, and the operation of the main program is transferred.

3. Flexible interface design

When entering a student name in TextBox1, whenever the data in the TextBox1 changes, if there is no student name information, only the add button is activated below the window, and the rest of the buttons cannot click, that is, only to the database Add this student information. (As shown below)

If the student is stored, only the modification and deletion button are activated. (As shown below)

This feature is implemented by adding an event response function private void textbox1_textchanged (Object Sender, System.EventAnd (Object Sender, System.EventArgs E) by adding TextBox1.

In this way, the development of the program is simplified while facilitating the user's use.

Fourth, small knot

Through this time effort, in the guidance of the old

Zou Xiangchun

Teacher and

Lu Xinhong

Under the careful guidance of the teacher, we finally completed this graduation design. This graduation design makes me a more fully understanding of the knowledge you have learned. I learned some knowledge that has not yet been understood (such as WebService technology), and can combine their knowledge you have learned. The written knowledge will be used in practice, and experience the linkage and difference of theory and practice, this is a great harvest this graduation design.

During this time, I deeply felt the importance of teamwork. During the entire design process, I have a lot of problems that I don't understand, and the help of the same group members have solved a lot of difficulties. At the same time, I also felt the importance of the team's spirit in the development of a project. In the development of a project, we must have a good planning to work, so that it can work efficiently, thus achieving the expected results, otherwise It may be a half-time, and you can't move everyone.

In short, this graduation design is designed, I not only learned a lot of technical knowledge, but also learned a good communication, exchange, cooperation, and got full exercise. I believe that this will bring great help to my future learning and work, and lay a foundation for future development projects.

5, 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. Thanks to the help of the group.

Sixth, reference

Sun Yulin, Ding Jianyang, etc. Visual Basic.Net and Visual C # .NET object-oriented programming Tsinghua University Press

Wei Weihong translation. Advanced programming of distributed data applications. Tsinghua University Press

Zhang Gong translated. VB.NET Advanced Programming. Tsinghua University Press.

转载请注明原文地址:https://www.9cbs.com/read-74020.html

New Post(0)