KIMATHI UNIVERSITY OF TECHNOLOGY PROJECT REPORT FOR THIRD YEAR OF STUDY IN BSC INFORMATION TECHNOLOGY
PRESENTED BY :BARAZA L. PETER.
REGISTRATION NO: CO25-0630/09
PRESENTED TO:MR. GEORGE MUSUMBA.
TITLE: UNIVERSITY MEDICAL CENTRE MANAGEMENT SYSTEM. This project is submitted in partial fulfillment of the requirements for bachelor of science in Information Technology. Date submitted..
YEAR 2011. - 2 -
BARAZA LYANDA PETER. CO25-O630/09.
Declaration. This research project which is my original work has not been presented for a bachelor of science in any other university.No part of ths project may be reproduced may be reproduced without the prior eprmission of the author and /or KUCT.
Name of candidate. Date.
.. .. School of Computer science and Information technology ,Kimathi University of Technology College.
Declaration by supervisor This project has been submitted for examination with my approval as University Supervisor. Name of Supervisor. Date.
. Sign
- 3 -
BARAZA LYANDA PETER. CO25-O630/09.
ACKNOWLEDGEMENT The satisfaction that accompanies that the successful completion of any taskwould be incomplete without the mention of people whose ceaselesscooperation made it possible, whose constant guidance and encouragement crown all efforts with success. Iam grateful to our project guide Mr. George Musumba for the guidance, inspiration and constructive suggestions that helpful us in the preparation of this project. I also thank my colleagues who have helped in successful completion of the project.
- 4 -
BARAZA LYANDA PETER. CO25-O630/09.
ABSTRACT This project is related to a hospital management system.it maintains records of all the operations that occur at any of the medical center in public institutions.it maintains two level of users,administrator level and the user level.the administrator lever encompasses the nurses and the doctors while the user level includes the receptionist. The administrators are able to perfom operations on more sensitive and confidential documents /modules that contains different information about students and staff to ensure confidentiality. The modules include laboratory,treatment,consultation and medicine stock modules.The user level is able to manage other modules such as registration and report generation for stock of medicine and staff reports. The system enables registration of new students,staff,nurses and doctors at the reception level . The current diagnosis details of a patient are recorded in the consultation which are retrieved as previous details upon the subsequent visit.the patient either proceeds to the treatment room o ther to the laboratory depending on the doctord decision in the consultation room .in the laboratory,results are recorded in the laboratory module which are retrieved in the treatment room through appropriate search methods and the patient treated accordingly. Wrong medications are detected at this point since,since the doctor enters his identification number. User requirements and other system specifications were collected through observation and interview methods where repondents were able to specify what was needed particularly.The current system is not in any way computerized as per the results from the collected data. The proposed system has the following capabalities:-maintaining patients records,registering new patients,enables recording of test results and easy future references.users can search records more easily.
- 5 -
BARAZA LYANDA PETER. CO25-O630/09.
TABLE OF CONTENTS Title page...1 Declaration ...2 Acknowledgement ....3 Abstract..4
Chapter one..8 1.1 Background ..8 1.2 Problem statement.8 1.3 Problem solution9 1.4 Project objectives9 1.5 Limitations of the current system10 1.6 Benefits of the proposed system10 1.7 Limitation of the proposed system.11 1.8 Scope of the system.11 Chapter two..13 Literature Review13 Chapter Three..14 System analysis..14 3.1 Data collection..14 3.1.1Tools and Techniques...14 Primary sources.14 Secondary sources .14 Interviews ..14 Observations..14 Questionaires15 Data analysis.15 3.2 Research findings..15 - 6 -
BARAZA LYANDA PETER. CO25-O630/09.
3.2.1 table 1.15 3.2.2Summary of findings16 3.3Requirements analysis16 3.3.1 user requirements16 3.3.2 system requirements..17 3.3.3 Functional requirements17 3.3.4 Non functional requirements.17
Chapter four.18 System design and methodology.18 4.1 Introduction..18 The waterfall model.18 Merits of waterfall model.19 Demerits of waterfall model19 System Data Flow Diagram.20 Chapter five 5.1Schedule..21 5.2Work breakdown structure..21 5.3 Ghantt chart22
CHAPTER. 1 INTRODUCTION 1.1 BACKGROUND KimathiUniversity of technology is located in Nyeri county sixkilometers from Nyeritown. It has a medical centre that supports medical cases of staff and students in the university alongside other services. The university has had a high increase in the number of students and staff in the recent past. Themaintenance of records of these students and staff is manual. The file for each patient is kept and is retrieved upon the subsequent visit. Normally the patients who are the students and the staff present identification cards at the reception which are checked to verify whether they have their records or files there. Ifnot ,a new file is created containing the staff identification details and in which future consultation details will be recorded. If the file is already there, the patient is asked to go to the consultation room where he or she is diagnosed and the details recorded in the patients file. The patient is either referred to the laboratory or treatment room for tests and medication respectively depending on the situation. 1.2 PROBLEM STATEMENT. The maintenance of records of these students and staff is manual. The file for each patient is kept and is retrieved upon the subsequent visit. Normally the patients who are the students and the staff present identification cards at the reception which are checked to verify whether they have their records or files there. If not ,a new file is created containing the staff identification details and in which future consultation details will be recorded. If the file is already there, the patient is asked to go to the consultation room where he or she is diagnosed and the details recorded in the patients file. The patient is either referred to the laboratory or treatment room for tests and medication respectively depending on the situation. - 9 -
BARAZA LYANDA PETER. CO25-O630/09.
Due to the increasing number of students and staff as the university expands to a fully-fledged university,several problems have arisen.they include- 1. Lack of immediate retrievals: -The information is very difficult to retrieve and to find particular information like- E.g. - To find out about the patients history, the user has to go through various registers. This result in inconvenience and wastage of time. 2. Lack of immediate information storage: - The information generated by Various transactions takes time and efforts to be stored at right place. 3. Lack of prompt updating: - Various changes to information like patient Details are difficult to make as paper work is involved. 4. Error prone manual stock taking: - Manual stock taking are error prone and take a lot of time this may result in incorrect information. For example, about the medicine in stock. 5. Preparation of accurate and prompt reports: - This becomes a difficultTask as information is difficult to collect from various registers. 1.3 PROBLEM SOLUTION. 1. Improved Manual System:- One of the alternative solutions is the improvement of the manual system.Anything, which can be done by using automated methods, can be done manually. But the question arises how to perform thing manually in a sound manner. Following are some suggestions, which can be useful in the manual system. A more sophisticate register maintenance for various Patient Information, Doctor diary, medicine stock availed for can be maintained at central place.Adequate staff may be maintained so that updations are made at the very momentat the same time. Proper person for proper work should be made responsible sothat a better efficiency could be achieved. This needs a lot of work force. 2. Batch System:- Another alternative solution can be used of computer based batch system formaintaining the information regarding purchase details, customers andemployees. A batch system - 10 -
BARAZA LYANDA PETER. CO25-O630/09.
refers to a system in which data is processed in aperiodical basis.The batch system is able to achieve most of the goals and sub goals. But a batchsystem data is processed in sequential basis. Therefore batch system is notsuggested. 3. Online System:- This system provides online storage/ updations and retrieval facility. Thissystem promises very less or no paper work and also provides help to Doctor andoperational staff.In this system everything is stored electronically so very less amount of paper work is required and information can be retrieved very easily without searchinghere and there into registers. This system is been discussed here.
1.4 PROJECT OBJECTIVES The following were the project objectives: a) To identify the current technology that is used to develop the registry system. b) To design and develop a database to contain details of the students,nurses,doctorsand staff within the university medical centre. c) Implement a system that will perform the above-mentioned tasks in the medical centre.
1.5 LIMITATION OF THE CURRENT SYSTEM. 1. Lack of immediate retrievals: -The information is very difficult to retrieveand to find particular information like- E.g. - To find out about the patientshistory, the user has to go through various registers. This result in inconvenienceand wastage of time. 2. Lack of immediate information storage: - The information generated byvarious transactions takes time and efforts to be stored at right place. 3. Lack of prompt updating: - Various changes to information like patientDetails are difficult to make as paper work is involved. 4. Error prone manual stock taking: - Manual stock taking are error prone andtake a lot of time this may result in incorrect information. For example, about the medicine in stock. - 11 -
BARAZA LYANDA PETER. CO25-O630/09.
5. Preparation of accurate and prompt reports: - This becomes a difficult task, as information is difficult to collect from various registers. The information collected in the reports is often inaccurate due to human error. 6.Deterioriation of records. The files and folders in which the information is stored deteriorate with time i.e. there is wear and tear of the files and folders.
1.6 BENEFITS OF THE PROPOSED SYSTEM 1. Planned approach towards working: - The working in the organization will be well planned and organized. The data will be stored properly in data stores, which will help in retrieval of Information as well as its storage. 2. Accuracy: - The level of accuracy in the proposed system will be higher. All operation would be done correctly and it ensures that whatever information is coming from the center is accurate. 3. Reliability: - The reliability of the proposed system will be high due to the above stated Reasons. The reason for the increased reliability of the system is that now there would be proper storage and access to information. 4. No Redundancy: - In the proposed system utmost care would be that no information is repeated anywhere, in storage or otherwise. This would assure economic use of storage space and consistency in the data stored. 5. Immediate retrieval of information: - The main objective of proposed system is to provide for a quick and efficient retrieval of information. Any type of information would be available whenever the user requires. 6. Immediate storage of information: - In manual system, there are many Problems to store the largest amount of information. 7. Easy to Operate: - The system should be easy to operate and should be such that it can be developed within a short period and fit in the limited budget of the user. 1.7 LIMITATION OF THE PROPOSED SYSTEM Computers have to be bought and installed which could be costly. - 12 -
BARAZA LYANDA PETER. CO25-O630/09.
A network will be needed to connect the computers within the facility. Implementation of the automated system will require buying of computers that will act as a platform upon which the system well run. Implementation of the system calls for employment a person has knowledge about computers. 1.8 SCOPE OF THE PROJECT The application can be used in any university or college that has medical/health centre within the institution for maintaining patients tests and treatment details by customizing some of the features.that suits that particular institution.
- 13 -
BARAZA LYANDA PETER. CO25-O630/09.
CHAPTER 2. LITERATURE REVIEW. There are many systems developed that have been developed related to this medical centre management system ,but however,these systems are too complex for a university.Most of them encompass many procedures irrelevant to a university.such case is the Nyeri Provincial Hospital management system.System provides the benefits of streamlining of operations, enhanced administration and control, improved response, cost control and improved profitability. The program can look after Inpatients, OPD patients, records, database treatments, status illness, and billings. A systematic approach to the way documents are managed, can transform your Hospital resources to its highest utility and advantage. System has Admin, Doctor, Nurse, Administration, Pharmacist, Laboratorist and Patient modules. Payroll and attendance record of employees can be maintained. Messages can be sending within this application. Patient can send online request for appointment. Medicines updated inventory record can be maintained. Blood donor's record can be maintained and they can be called as needed. The other system is the outspan hospital management system which
- 14 -
BARAZA LYANDA PETER. CO25-O630/09.
CHAPTER 3. SYSTEM ANALYSIS 3.1 DATA COLLECTION Data collection involved finding facts of the activities being carried in university medical centre aiming at gathering information on its operation and procedures like registration process,treatment details recording process,diagnosis processes and so on.
3.1.1TOOLS AND TECHNIQUES Sources of data used were: 1) PRIMARY SOURCES In order to get facts on university medical centre works, an official introductory letter from the department introduced me to the interviewees.this enabled them 2 give out information without hesistating.the interviewees included doctors,nurses,receptionists and students. 1) INTERVIEWS. The introductory letter from the department accorded me direct communication to the interviewees.this enabled them to respond without hesitation. 2) OBSERVATION. This is not a new field but rather a new approach to analyzing computer system.one of its main goals is not to superimpose the interviewers or analsysts viewpoints on the system but to use the viewpoint of the people within the system.An ethic view of the system is the outside view or what the analyst sees.this is basicxally information gathering by observation. - 15 -
BARAZA LYANDA PETER. CO25-O630/09.
This involved examining of activities going on from registration of patients,consultaiondetails,treatment section and the laboratory section.this gave a picture on what happens on the ground and who does the work. 3) QUESTIONNAIRES. Analysis of the data collected was basixcally to identify the following: a. Information to be included in the system. b. Scope of the system in terms of data and information.
3.1 .2DATA ANALYSIS. Analysis of the collected data was basicallyperformedto identify the following. Information that was to be included in the system. Scope of the system in terms of data and information. Information category. 3.2 Research findings The table below summarisesthe feedback from questionaires.this tool helped in the collection of data from the receptionists the nurses and doctors.a sample of the questionnaire is shown in the appendix. 3.2.1 Table 1 Question No of reponses Facts gained Are you computer literate? 4 Yes 1 No Is there a computer system that supports record keeping? 6 No Do you think a computer system is necessary in the management of records? 6 Yes What reports are produced by the manual system.? 4 2 N /A No response - 16 -
BARAZA LYANDA PETER. CO25-O630/09.
How many students seek medical services there in a a day? 3 2 1 100 Over 100 Less than 100. How many staff students seek medical services there in a day? 4 1 1 100 Over 100 Less than 100 Do you want to continue working with current system? 6 No Which departments have been computerized? 6 None
3.2.2 Summary of the findings From the feedback from the questionnaire ,it was evident that university medical center has not been computerized as a whole.this may be due to the fact that ict in the university is still growing.form the sample ,most people are computer literate though training may be necessary for jst a few.All areas /departments of the medical centre need to be computerized.All of the respndents seemed not to be sure if reports are generated.the response wasN/A or blank response. Observation and interview techniques helped in knowing the process followed form registration of new patients in the files,consultation details and also how doctor details are dealt with. 3.3 REQUIREMENTS ANALYSIS Requirement analysis is the activity during which the requirements gathered during elicitation is analysed for conflicts,ambiguity and inconsistency.during this activity,negotitiation between stakeholders occurs to arrive at specific requirements.the requirements may be in n aturallanguage,formallanguageor in agraphical form. 3.3.1 User requirements The users expect the system to have the following capabilities: - 17 -
BARAZA LYANDA PETER. CO25-O630/09.
A system to be able to:- Validating records i.e checking for an already registered staff,nurses,doctors and staff from the system. Allowing the user to add,remove or edit different records in each modules defined later in the chapter. Provide a suitable graphical user interface of only what is necessary for a particular operation without related confusions. 3.3.2System requirements The product works well in any operating system.cahnges in the system should involve experts in the area of programming language to deal with arising issues. 3.3.3Functional requirements These are inherent functionalities that the system is purposely expected to perform to achieve the goals fro the development .basically this is what the system will do. These include:- I. Data storage-the system provides data storage capabilities.thisis enhanced by database management system that is capable managing the storage requirements. II. Retrieval of data-it should be easier to retrieve data from the database through procedures designed to ensure efficiency. III. Registration processing:-registration should be done promptly and without delay or errors. IV. Searching-records should retrieve records on c click of a button without unnecessary delays as requested by the user. 3.3.4 Non functional requirements. These are functionalities that are generally implied and are factored in as characteristics of a good system.they are not part of the system requirements. Should be reliable and efficient. Easy to maintain Ensure security of the stored information.
- 18 -
BARAZA LYANDA PETER. CO25-O630/09.
CHAPTER 4. Development methodology The water fall model The Software Development Methodology (SDM) to be used in this project is the Software Development Life cycle (SDLC). Where there is a structured set of activities required to develop a software system required to develop a software system 1) Specification; 2) Design; 3) Validation; 4) Evolution. This is based on the waterfall model with rapid prototyping which is a sequential design process often used in software development process. The development is seen as a flowing downwards steadily. In the Model, one phase has to be finalized before the process can progress to the next phase.
- 19 -
BARAZA LYANDA PETER. CO25-O630/09.
Merits of water fall model 1. Dividing the development of a system into phases makes the development process more manageable and it gives the opportunity for control of the application development process. 2. The methodology helps to ensure that the specifications are complete and they are communicated to systems development staff. 3. The following phase cannot start until the previous has finished. This helps to identify problems with requirement during design and also problems in coding are also uncovered.
Demerits of waterfall model One problem with the waterfall model is that it does not provide feedback that is commitments must be made at early stage in the process and it is difficult to respond to changing customer requirements
System Data Flow Diagram. - 20 -
BARAZA LYANDA PETER. CO25-O630/09.
- 21 -
BARAZA LYANDA PETER. CO25-O630/09.
CHAPTER 5. SCHEDULE
5.2 WORK BREAKDOWN STRUCTURE. Activity Task name Immediate Predecessor. Duration In wks Start Finish A Problem identification
- 3 Week 1 Week 3 B Feasibility study A. 2 week 4 Week 6 C Proposal writing A,B. 1 Week 4 Week 7 D Design and analysis
C. 1 Week 7 Week 8 E Coding and testing
D. 3 Week 8 Week 10 F Documentation
D,E. 1 Week 11 Week 13 G Presentation and Implementation
F 1 Week 8 Week 13
Activities A. Problem identification. B. Feasibility study. C. Proposal writing D. Interface design. University medical centre management system
Present ation and implem etation d Proposal writing and reporting
Design and analysis Coding and testing documen tation Problem identification Feasibility study - 22 -
BARAZA LYANDA PETER. CO25-O630/09.
E. Coding and testing F. Documentation. G. Presentation. Activity. Immediate Predecessor. Duration (weeks). A. Problem identification.
- 3 B. Feasibility study.
A. 2 C. Proposal writing.
A,B. 1 D. Interface design.
C. 1 E. Coding and testing
D. 3 F. Documentation.
D,E. 1 G. Presentation.
F 1 5.3 The Gantt chart. Activity WEEKS 1 2 3 4 5 6 7 8 9 10 11 12 13 A
B
C
D
E
F
G
KEY: - 23 -
BARAZA LYANDA PETER. CO25-O630/09.
EXPECTED DURATION.
ACTUAL TIME/DURATION.
- 24 -
BARAZA LYANDA PETER. CO25-O630/09.
CHAPTER 6 SYSTEM TESTING 6.1 INTRODUCTION System testing involves testing the system to validate that it meets that it meets user specifications and objectives. System test objectives are 1. To analyze the test results. 2. Test the system against users requirements.
The components to be tested are To test the system to validate it only accepts valid data. Check whether the system is giving the required output. 6.2TESTING STRATEGY This involves testing the system using different types of system tests that were performed on the system.this is aimed at uncovering errors and measuring the system capability.the following system tests 6.2.1 Unit testing This is the test in the development process and ensures that each unique path of the project performs accurately to the documented specifications and contains clearlydefined inputs and expected results. Each module was tested to ascertain that it fully performs as expected. 6.2.2 Intergration testing. - 25 -
BARAZA LYANDA PETER. CO25-O630/09.
This involves testing integration of modules.this was done to ensure that modules interactions with each other were working and that integration of the modules making up the system was working. 6.2.3 Acceptance testing This involves testing the system with the intent of confirming readiness of the product and customer acceptance. 6.3TEST PLAN 6.3.1 Unit testing. Test Test area Expected results Module testing Adding new record System shld be able to add new records to the database Delete records
The system should be able to delete unwanted records Update records The system should update records and save changes made. Search records The system should be able to retrieve relevant records required by the user. 6.3.2 Integration testing Test Test area Expected Results Integration test user authentication valid users should log into the system Relationships among modules The established relationships should work as expected.
- 26 -
BARAZA LYANDA PETER. CO25-O630/09.
6.3.3 Acceptance testing Testing the system with the intent of confirming readiness of the product and custome acceptance. Test Test area Expected results Acceptance testing Interaction of users with the system The user should be able to use the system with ease
6.3.4 Usability testing This is making sure at the objects are usable even after they have been completely tested.this test determines whether the users will be compatible with system.
- 27 -
BARAZA LYANDA PETER. CO25-O630/09.
CHAPTER 7 RECOMMENDATION AND CONCLUSIONS I recommend that the development be continued together with like minded persons who live to see the dream I hadand build effective hospital systems that can be used to cut cists of manual labour and enable efficiency of service provision. I also recommend that an improvement be be made on this system to enable the generation of bills for the staff members instead those bills being generated in the finance office which consumes time and can result in drastic effects when the patient is totally sick. I therefore recommend the inclusion of a purely designated laboratory as a research lab where students can have the opportunity to implement their ideas and innovations of different forms of systems. CONCLUSION. The major achievement of this project is the ability to register new students,staff,doctors and nurses and store their data in the database.the most important thing that must be appreciated by all is that,the system is an eye opener to a lot mor e investigation and detailed research for implementation and improvement purposes inorder to add to the general knowledge base. The system is for computerizing the working in a hospital. The software takes care of all the requirements of an average hospital and is capable to provide easy and effective storage of information related to patients that come up to the hospital.
- 28 -
BARAZA LYANDA PETER. CO25-O630/09.
CHAPTER 8. APPENDIX A SYSTEMSSAMPLE SCREEN SHOTS Login window Different users have different login information stored in the database.they can login to the system through this interface,or change their passwords for security reasons.this form is loaded when user starts the program. Login form
MULTIPLE DOCUMENT INTERFACE FORM - 29 -
BARAZA LYANDA PETER. CO25-O630/09.
//Registration form
- 30 -
BARAZA LYANDA PETER. CO25-O630/09.
LABORATORY FORM
MEDICINE STOCK. - 31 -
BARAZA LYANDA PETER. CO25-O630/09.
Consultation form - 32 -
BARAZA LYANDA PETER. CO25-O630/09.
- 33 -
BARAZA LYANDA PETER. CO25-O630/09.
SAMPLE SOURCE CODE OF THE SYSTEM. Code for saving a record in the registration module. PrivateSubsavebutton_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlessavebutton.Click Try
DimmycommandAsSqlCommand DimraAsInteger If RadioButton1.Checked = TrueThen
Iftxtname.Text = ""Then MsgBox("Enter the Name ") txtname.Focus() ElseIftxtnumber.Text = ""Then MsgBox("Enter the ID") txtnumber.Focus() ElseIftxtgender.Text = ""Then MsgBox("please enter the gender") txtgender.Focus() ElseIftxtaddress.Text = ""Then MsgBox("please enter the address") txtaddress.Focus() ElseIftxtage.Text = ""Then MsgBox("please enter the age") txtage.Focus() ElseIf MaskedTextBox2.Text = ""Then MsgBox("enter the phone number") - 34 -
Iftxtname.Text = ""Then MsgBox("Enter the Name ") txtname.Focus() ElseIftxtnumber.Text = ""Then MsgBox("Enter the ID") txtnumber.Focus() ElseIftxtgender.Text = ""Then MsgBox("please enter the gender") txtgender.Focus() ElseIftxtaddress.Text = ""Then MsgBox("please enter the address") txtaddress.Focus() ElseIftxtage.Text = ""Then MsgBox("please enter the age") txtage.Focus() - 35 -
BARAZA LYANDA PETER. CO25-O630/09.
ElseIf MaskedTextBox2.Text = ""Then MsgBox("enter the phone number") MaskedTextBox2.Focus() Else
sqlcon.Open() mycommand = NewSqlCommand("insert into staff(name,staffid,gender,age,phonenumber,addres) values('" + _ txtname.Text + "','" + txtnumber.Text + "','" + txtgender.Text + "','" + txtage.Text + "','" + MaskedTextBox2.Text + "','" + txtaddress.Text + "')", sqlcon) ra = mycommand.ExecuteNonQuery() MessageBox.Show(ra&"Record added successfully") sqlcon.Close() EndIf ElseIf RadioButton3.Checked = TrueThen Iftxtname.Text = ""Then MsgBox("Enter the Name ") txtname.Focus() ElseIftxtnumber.Text = ""Then MsgBox("Enter the ID") txtnumber.Focus() ElseIftxtgender.Text = ""Then MsgBox("please enter the gender") txtgender.Focus() ElseIftxtaddress.Text = ""Then MsgBox("please enter the address") txtaddress.Focus() ElseIftxtage.Text = ""Then MsgBox("please enter the age") - 36 -
Catch ex AsException MessageBox.Show(ex.Message) EndTry EndSub
Code for the deleting a record in the registration module. PrivateSubdeletebutton_Click(ByVal sender AsSystem.Object, ByVal e AsSystem.EventArgs) Handlesdeletebutton.Click DimmycommandAsSqlCommand - 38 -
BARAZA LYANDA PETER. CO25-O630/09.
DimraAsInteger If RadioButton1.Checked = TrueThen Try da = NewSqlDataAdapter("select * from student", sqlcon)
Ifds.Tables("student").Rows.Count< 1 Then MsgBox("Records Empty", MsgBoxStyle.Exclamation)
Exit Sub ElseIfMsgBox("Are Sure Of This?", MsgBoxStyle.YesNo) = MsgBoxResult.NoThen MsgBox("Deletion aborted", MsgBoxStyle.Information) Else sqlcon.Open() mycommand = NewSqlCommand("Delete from student where regno='" + txtnumber.Text + "'", sqlcon) 'since no value is returned we use ExecuteNonQuery ra = mycommand.ExecuteNonQuery() MessageBox.Show("Records affected"&ra) da.Fill(ds) DataGridView1.DataSource = ds.Tables("student") sqlcon.Close()
Try da = NewSqlDataAdapter("select * from staff", sqlcon) Ifds.Tables("staff").Rows.Count< 1 Then MsgBox("Records Empty", MsgBoxStyle.Exclamation)
Exit Sub ElseIfMsgBox("Are Sure Of This?", MsgBoxStyle.YesNo) = MsgBoxResult.NoThen MsgBox("Deletion aborted", MsgBoxStyle.Information) Else
sqlcon.Open() mycommand = NewSqlCommand("Delete from staff where staffid='" + txtnumber.Text + "'", sqlcon) 'since no value is returned we use ExecuteNonQuery ra = mycommand.ExecuteNonQuery() MessageBox.Show("Records affected"&ra) da.Fill(ds) DataGridView1.DataSource = ds.Tables("staff") sqlcon.Close()
EndIf Catch ex AsException MessageBox.Show(ex.Message) EndTry ElseIf RadioButton3.Checked = TrueThen Try da = NewSqlDataAdapter("select * from doctor", sqlcon) Ifds.Tables("doctor").Rows.Count< 1 Then MsgBox("Records Empty", MsgBoxStyle.Exclamation) - 40 -
BARAZA LYANDA PETER. CO25-O630/09.
Exit Sub ElseIfMsgBox("Are Sure Of This?", MsgBoxStyle.YesNo) = MsgBoxResult.NoThen MsgBox("Deletion aborted", MsgBoxStyle.Information) Else
sqlcon.Open() mycommand = NewSqlCommand("Delete from doctor where doctorid='" + txtnumber.Text + "'", sqlcon) 'since no value is returned we use ExecuteNonQuery ra = mycommand.ExecuteNonQuery() MessageBox.Show("Records affected"&ra) da.Fill(ds) DataGridView1.DataSource = ds.Tables("doctor") sqlcon.Close() EndIf
Catch ex AsException MessageBox.Show(ex.Message) EndTry ElseIf RadioButton4.Checked = TrueThen Try da = NewSqlDataAdapter("select * from nurse", sqlcon) Ifds.Tables("nurse").Rows.Count< 1 Then MsgBox("Records Empty", MsgBoxStyle.Exclamation)
Exit Sub ElseIfMsgBox("Are Sure Of This?", MsgBoxStyle.YesNo) = MsgBoxResult.NoThen MsgBox("Deletion aborted", MsgBoxStyle.Information) - 41 -
BARAZA LYANDA PETER. CO25-O630/09.
Else
sqlcon.Open() mycommand = NewSqlCommand("Delete from nurse where nurseid='" + txtnumber.Text + "'", sqlcon) 'since no value is returned we use ExecuteNonQuery ra = mycommand.ExecuteNonQuery() MessageBox.Show("Records affected"&ra) da.Fill(ds) DataGridView1.DataSource = ds.Tables("nurse") sqlcon.Close()
EndIf Catch ex AsException MessageBox.Show(ex.Message) EndTry EndIf
EndSub
- 42 -
BARAZA LYANDA PETER. CO25-O630/09.
Project budget. ITEM COST Equipment Computer Flash disk CD
40000 1500 50 subtotal 41550 Software Windows 2000/xp/2007 MS VB 2010