Вы находитесь на странице: 1из 132

Project Report

ON

EMPLOYEE CLAIM REIMBURSEMENT (ECRS)


AT

Engineers India Limited (EIL).

By

VINOD ROHILLA

Department of Computer Applications, Cochin University of Science and Technology


Kochi-682022
April, 2009

Engineers India Limited

CERTIFICATE

This is to certify that the project titled EMPLOYEE CLAIM REIMBURSEMENT (ECRS) being submitted by Mr.VINOD ROHILLA, 6th Semester MCA students of Department of Computer Applications, GNIT in partial fulfillment of the requirements for the award of Master in Computer Applications has been completed under the supervision of Mr. R.K.SINGH at Engineers India Limited, 1-Bhikaiji Cama Place, New Delhi during the period from 19, January, 2009 to 30 April, 2009. His performance during the project work has been excellent. The work has not been submitted to any other institution or University for the award of any degree/diploma to the best of knowledge.

Place: New Delhi Date:

Mr. R.K.SINGH Senior Manager (ITS) Engineers India Limited 1, Bhikaiji Cama Place New Delhi-110066

ACKNOWLEDGEMENTS

The satisfaction and euphoria that accompany the successful completion of any task would be incomplete without mentioning the names of people who made it possible, whose constant guidance and encouragement crowns all efforts with success.

I extend my gratitude to Mr. D. K. Kakkar, General Manager - Information Technology Services (ITS), Engineers India Limited, New Delhi for providing me with excellent infrastructure and awesome environment that laid potentially strong foundation for my professional life. I would like to express my profound thanks to Mr. R.K.SINGH, Senior Manager, ITS for providing me the opportunity to work on the project, for assigning me a responsible role in the module and guidance throughout my project tenure. I extend my heartfelt thanks to my parents, friends and well wishers for their support and timely help. Above all I thank the Almighty for his blessings. VINOD ROHILLA

TABLE OF CONTENTS
COMPANY PROFILE..... 1. ENGINEERS INDIA LIMITED 1.1. EIL Profile........................................................................................................... 1.1.1. Vision Statement........................................................................................... 1.1.2. Mission Statement........................................................................................ 1.2. Historical Background........................................................................................ 1.2.1. Petroleum Refineries.................................................................................... 1.2.2. Fertilizers...................................................................................................... 1.2.3. Pipelines........................................................................................................ 1.2.4. Oil and Gas processing................................................................................ 1.2.5. Power............................................................................................................. 1.2.6. Ports and terminals...................................................................................... 1.2.7. Ocean Engineering....................................................................................... 1.2.8. Chemical........................................................................................................ 1.2.9. Metallurgy..................................................................................................... 1.3. Services Offered by EIL..................................................................................... 1.3.1. Feasibility Studies......................................................................................... 1.3.2. Prefeasibility Studies.................................................................................... 1.3.3. Detailed Feasibility Studies......................................................................... 1.3.4. Heat and Mass Transfer Equipment Design............................................. 1.3.5. Detailed Engineering.................................................................................... 1.3.6. Project Management Consultancy.............................................................. 1.3.7. Environmental Services............................................................................... 1.3.8. Planning and Scheduling............................................................................. 1.3.9. Construction Management.......................................................................... 1.3.10. Cost Engineering........................................................................................ 1.3.11. Procurement............................................................................................... 1.3.12. Commissioning and Plant Start up........................................................... 1.4. Information Technology Services Division....................................................... 1.4.1. Introduction.................................................................................................. 1.4.2. Range of IT Services 2. Chapter- 2. INTRODUCTION.. 2.1 Introduction .. 2.2Objective . 2.3 System Analysis..... 2.4 Analysis Model.. 2.5 Feasibility study.... 2.6 Literature Survey. 2.7 Project Planning... 2.7.1 Process Model.. 2.7.2 Work Breakdown Structure..

3. Chapter-3.DESIGN OF THE SYSTEM.............. 3.1 Hardware/Software Requirements.. 3.2 System Requirements 3.3 System Specification.. 3.4 Flow Chart 3.5 Level-0 Data Flow Diagram 3.6 Level-1 Data Flow Diagram 3.7 Entity Relationship Diagram.. 3.8 Design Structure. 4. Chapter-4. IMPLEMENTATION AND CODING... 4.1 Snapshots & Coding.......... 5. Chapter-5. TESTING AND TEST RESULTS.. 5.1 Validation... 5.2 Testing 5.3 Test Cases... 6. Chapter-6. SYSTEM SECURITY. 6.1 Features. 7. Chapter-7. RESULTS AND CONCLUSION...... 7.1 Conclusion. 7.2 Appendix 7.3 References..

COMPANY PROFILE

ENGINEERS INDIA LIMITED

EIL Profile
Engineers India Limited (EIL) was established on March 15, 1965, as a joint venture between the government of India and Bechtel Corporation of USA with the following prime objectives: To establish, provide, maintain and perform engineering and related technical and consultancy services for petroleum projects including but not limited to, petroleum refineries, oil field development, oil and gas pipelines, petrochemical facilities, chemical intermediaries and all other types of industrial projects In addition to petroleum refineries, EIL has diversified into other fields such as pipelines, chemicals and oil and gas processing, etc. EIL provides a complete range of project services in the fields and has emerged as South Asias leading design and engineering company. EIL has under gone through more than 4000 assignments, 250 projects worth more than US$ 35 billion in installed cost, successfully completed and operating smoothly creating an array of satisfied clients and rising the turnover and profits. The major projects under taken by the company includes 30 Petroleum Projects, 6 Petroleum Complexes, 200 Offshore Platforms, 31 Oil and Gas Processing Projects, 25 Mining and Metallurgical Projects, 8 Fertilizers Projects, 31 Pipelines Projects and 11 Ports and Terminals. EIL has also worked abroad creditability in several countries of West Asia, North Africa, Europe and South East Asia including Algeria, Abu Dhabi, Iran, Kuwait, Malaysia, Norway, Qatar, Saudi Arabia, Sri Lanka, UAE and Vietnam. Vision Statement To become a globally Competitive EPC & Consultancy Organization. Mission Statement To achieve international standards of excellence with a focus on customer satisfaction. To provide high quality, safe and energy-efficient services in Process Design, Engineering, Procurement, Construction with overall project Management in

Hydrocarbon, Metallurgy, Power and Ports & Terminals as well as Information Technology and other selected sectors of Industry. To achieve prominence in developing, adopting and assimilating state-of-the-art technology for competitive advantage. To maximize creation of wealth, value and satisfaction for stake holders. To foster a culture of participation and innovation for employees' growth and contribution through a climate of fairness and transparency in operation. To acquire and provide technology and services through sustained Research & Development and linkage among Engineering Organizations, Equipment Manufacturers, Operating Companies and R&D Organizations to upgrade technologies on a continuous basis. To cultivate high standards of ethics and quality for a strong corporate identity and brand equity. To help enrich the quality of life of the community and preserve ecological balance and heritage through the services provided with a strong environmental conscience.

Historical Background
The foundation of the consultancy profession in India was laid soon after independence. The sixties saw the advent of major consultancy and engineering organization in the country with the setting up of a number of design and engineering organizations, in both private sector as well as public sector. Of these, Engineers India Ltd. Was the most prominent which was created in 1965 as a joint venture of the government of India (holding 51% shares) and Bechtel, a U.S. based company (holding 49% shares) to provide engineering and related services for petroleum and other industrial projects. In 1967, EIL became a wholly owned Government of India Undertaking. Engineers India Limited has been serving the process industry providing a complete range of project services. Initially, it started with engineering work for petroleum refineries and diversified over the years, to add other fields of activity as well as other services. In response to the changing business environment, Engineers India went through several stages of development and has gradually evolved into an engineering company serving a wide range of industries including petroleum refineries, petrochemicals, oils and gas processing projects, pipelines,

offshore platforms, fertilizers, chemical fibers and metallurgical industries providing a complete range of project services . It provides consultancy in the following fields of operation: Petroleum Pipelines Oil and Gas Processing Fertilizers Ports & Terminals Petrochemicals Offshore Structure & Platforms Chemicals Metallurgy Petroleum Refineries Engineers India Limited has provided its services for over a dozen projects with a combined refining capacity of 23 million tones/annum (460,000 bbls/day) and is working on several other projects with a total refining capacity of over 25 million tones/annum (500,000 bbls/day). The projects include grassroots as well as expansion revamp projects of all refining companies in India apart from refinery projects abroad. EIL has developed skills to such an extent that barring the process design of a few licensed units; EIL can execute complete petroleum refinery projects on its own. In addition to technologies for the main refinery units, EIL also has technologies for lube refinery complexes. Fertilizers Engineers India Limited provides complete services starting with feasibility study up to commissioning for fertilizer plants based on gas, naphtha and fuel oil. EIL has worked with renowned licensors/contractors on various assignments for ammonia, urea and phosphates fertilizer plants, in India and abroad.

Pipelines Engineers India has the capability to plan and execute long distance cross country and submarine pipelines for transportation of crude oil, petroleum products, gases, two phase fluids and slurries. It provides services such as conceptual scheme, feasibility study, on site investigations and route survey, cathodic protection and telemetry, telecommunication and telesupervisory control for pipeline projects besides other project services such as design and engineering, procurement, construction supervision and project management. Oil and Gas processing Engineers India Limited has expertise for Crude Oil processing plants such as: Crude Gathering Stations Multistage Separation Crude Desalting Dehydration and Heavy Oil/Sour Oil Processing. It also has capabilities for implementing Gas Conditioning and Processing Plants including Gas Collection Systems, Compressor Stations, and Solid/Liquid Desiccant Dehydration, Dew point Depression, Impurities and Acid gases removal and Cryogenic Natural Gas Liquids recovery such as LPG and Ethane / Propane recovery. It has handled a number of such plants for the Oil and Natural Gas Corporation. Limited (ONGC) and Gas Authority of India Ltd (GAIL). It has also provided consultancy for LPG and LNG projects of Sonatrach in Algeria. Power In the field of power, EIL has undertaken assignments for captive power plants in large process plants such as petroleum refineries, petrochemical complexes, etc. and has undertaken feasibility studies for refinery residue based power projects. EIL has association with: -Foster Wheeler Italiana for Residue Based Power Plants Kema, Nederland for Renovation & Modernization and Life extension studies for Existing Power Plants.

Ports and Terminals The Ports & Terminals Division of EIL takes up projects such as jetties, SPMs, MBMs at waterfronts or near to shore and related submarine pipelines with onshore facilities like terminals, etc. The areas of operation include: Master Plans for Ports Technical assistance in Marine Surveys Port Facilities/Jetties Inland Terminals for receipt, storage and dispatch of liquid cargo in both pressurized and cryogenic conditions Offshore Handling Facilities including: Single Buoy Moorings Multi Buoy Moorings Submarine Pipelines Port based Terminals for receipt, storage and dispatch of: Hydrocarbon products Chemicals & Petrochemicals Dry cargo both in bulk and bagged condition Ocean Engineering Engineers India's Ocean Engineering Division was formed in 1971 and has been involved in the development of India's offshore oil and gas fields since then. Engineers India has wide capabilities for providing full range of services needed to plan, design, engineer, construct and commission ocean engineering projects such as oil and gas platforms, offshore oil terminals, oil and fertilizer loading berths, intake structures, SBMs, offshore lighthouses, floating pump houses and fabrication yards. Chemical EIL has expertise for chemical plants such as membrane cell technology based caustic soda plants, soda ash, vaccine, insecticides etc., for which complete range of services can be offered.

Metallurgy In the field of metallurgy, EIL can render a comprehensive range of consultancy and engineering services for zinc, lead, aluminum, copper, cadmium, silver, nickel, magnesium, titanium, etc. and also for sponge iron. In addition, EIL can provide services for mine development and beneficiation plants. The specialized services include Studies for Scaling up of Pilot Plant to Industrial Plant, Process & Licensor selection, Optimization of the process parameters, Energy Conservation etc. The areas of operation encompass: Exploration data review, Geostatistical Ore reserve estimation and Ore Body modeling. Planning and Design of Open Pit Mines, Pit Optimization Studies and Quality control. Environmental studies for Mines. Ore handling, storage and long distance conveying. Design of Mineral Processing Plant and simulation & Optimization of crushing, grinding and beneficiation circuits including conventional as well as column flotation cells. Hydrometallurgical plants such as alumina refineries and lead smelters. Pyro/electro metallurgical plants such as primary Aluminum and lead smelters. Design of environment friendly tailings disposal/ stacking systems.

Services Offered by EIL


Feasibility Studies EIL's experience in a variety of fields is available to clients for expansion or diversification of their activities. Services offered include preliminary studies to examine the viability of project, market potential of products, techno-economic evaluation, capital and operating cost estimates etc Prefeasibility Studies To examine the viability of the project, market potential of products, techno-economic evaluation, capital & operating cost estimates, etc.

Detailed Feasibility Studies EIL also undertakes detailed feasibility studies to form the final cost of the project. These detailed feasibility reports are also bankable to ensure that financial institutions can use them for lending purposes. EIL's project management services comprise direction and coordination of the activities leading to the completion of a job in accordance with terms of the contract, in compliance with the job schedule and to the satisfaction of the client. The efforts of various agencies such as licensors, sub-contractors & EIL's different departments are brought together in a logical pattern to result in fruitful culmination of the project. Heat and Mass Transfer Equipment Design Heat and Mass Transfer Division (HMTD) specializes in design and revamp of heat & mass transfer equipment & related process package systems as part of overall EIL project or as individual direct assignment to meet the requirement of new as well as existing plants. Experience of HMTD in design and revamp of heat and mass transfer equipment system is unparalleled. The experienced manpower resources in HMTD carry out a wide range of services for the following heat & mass transfer equipment, process and energy systems: Fired Heaters & Air Preheating System Heat Exchangers Trays Packing & Packed Tower Internals Gas Dehydration System and Oil - Water - Gas Separators Vacuum Ejector System, Process Waste Heat & CO Boiler and Incinerators Deaerators Desalters Detailed Engineering The process design package is converted into detailed engineering drawings and documents by specialist civil, structural, mechanical, and electrical & instrumentation engineers,

Computer aided design techniques are extensively used as design aides to help develop optimum layout & design to assure maximum construction, operational & maintenance convenience. Detailed engineering leads to identification & specification of equipment and materials for procurement & needs of construction activities at site. Specialized Services are provided in the fields of static & dynamic analysis of equipment, structures, geotechnical engineering, rotating equipment & troubleshooting. Project Management Consultancy . The experience gained in the implementation of complex integrated projects has enabled Engineers India to undertake the role of Project Management Consultant. As Project Management Consultant, EIL provides management services required for smooth implementation of a complex project. It takes full responsibility for the overall co-ordination and integration of functioning of all agencies engaged in the implementation of the entire project and ensures the completion on schedule and within the budgeted cost. EIL's scope as Project Management Consultant broadly covers the following: Conceptualization of the Project Technology Selection. Developing Design Basis. Selection of EPC Contractors. Project Management including supervision, co-ordination, planning and scheduling services, etc. Quality Assurance at all stages of the project implementation, viz. process design, detailed engineering, procurement and construction. Assistance in inspection, testing, pre-commissioning and commissioning of facilities. Environmental Services EIL offers extensive services in the field of environmental engineering such as Environment impact assessment, Waste water treatment, Water treatment, Solids and hazardous waste management, Environmental audits, Resource recovery and recycle, Pollution prevention and Waste minimization, etc. These services are provided for Petroleum Refineries, Petrochemical Plants, Pipeline Projects, Oil/Gas Installations and Chemical Ports, Terminals,

SBM's and Jetties and Non-ferrous Metallurgical projects. EIL's close familiarity with the technologies involved in the process industry gives it a unique advantage for undertaking environment-related assignments. Planning and Scheduling EIL ensures effective and timely execution of projects through detailed planning and micro scheduling along with continuous monitoring. For this purpose, the industry standard PRIMA VERA software is used for computerized network analysis (PERT/CPM). Other software packages such as HOST, CPS, MCS, and COSMAS etc. are used for home office scheduling, construction, and planning and material control. Detailed schedules for engineering, ordering, manufacturing, delivery, tendering and construction are developed. These schedules are reviewed and updated and project completion outlook analyzed and corrective actions taken regularly. In addition, physical progress of the project is measured and reported through a welldesigned reporting system, which enables complete evaluation of project performance. Construction Management EIL's Construction Division provides total construction management services at site including selection of construction contractors, warehouse management, quality control/quality assurance, process monitoring & scheduling, review of heavy erection schemes, safety etc. Depending on client's need, EIL takes total site responsibility from survey & soil investigation to mechanical completion & assistance in commissioning. Use of modern construction techniques, innovative construction procedures, emphasis on QA/QC are some of the hallmarks based on which it has been possible for EIL to reduce construction time of projects yet providing work of highest quality. Cost Engineering EILs cost engineering services help the project management team in exercising practically online control of the costs vis--vis project execution budgets through application of latest techniques of Project Cost Management. Large dynamic database & in-house developed programs operating on PC platform are used in estimating costs of work packages prior to their award. A periodic 'Cost-to-Completion' projection is made through in-house developed program

"CEMOS" software to assist the Project Manager & Owner in taking timely decisions & actions. The cost engineering systems employed are kept updated through the latest developments in cost management techniques as also through experience gained while working on international projects. Procurement EIL offers comprehensive procurement services through a highly professional purchase team, effective monitoring and expediting group, a well experienced and qualified multidisciplinary inspection force and a specialist group for route survey and planning for multi model movement of over dimensional consignments. Following comprehensive procurement services are provided Vendor identification, evaluation & enlistment. Entire purchase activity, floating of enquiry to placement of order. Order placement Progress monitoring & Expediting Inspection Transportation planning & control Safety certification under Static & Mobile Pressure Vessels (SMPV) rules of the Chief Controller of Explosives Statutory inspection in Europe & Japan under Indian Bouler Regulations. A databank, providing significant information on capable vendors all over the world, is maintained and constantly updated. EIL's twelve inspection offices in the country provide competitive and prompt services in India. Overseas offices in Tokyo & London offer procurement/inspection services outside India in the Far East & Europe. Commissioning and Plant Start up EIL's Commissioning team associates itself with the project right from the process design stage. It reviews process & engineering design documents especially with respect to operability & safety. The team also prepares operation manuals providing instructions for plant start-up, shutdown & handling various emergencies. It provides guidelines and supervises pre commissioning & commissioning activities at site. EIL's responsibility continues till production

of specification products has been established to the full satisfaction of the customers. The team assists process department in conducting performance guarantee tests in order to establish plant operation at design throughputs with product of specified quality. EIL also provides technical guidance to customers in the area of troubleshooting.

Information Technology Services (ITS) Division


Introduction Information Technology Services (ITS), a division of EIL has a well-knit team of over 100 multidisciplinary professionals who are well qualified and experienced in providing software related and networking design services. Over the last 25 years, ITS has developed a large number of integrated software packages for use within EIL in the areas of process design, engineering, procurement, project management and construction. This experience along with the domain knowledge in various functional disciplines has given an edge to ITS for providing value added services to its clients in Oil Industry in particular and others in general. ITS has spearheaded the task of making EIL a leader both in terms of software usage and having state-ofthe-art computing facilities and communication infrastructure leading to enterprise connectivity. ITS over the years has executed a number of offshore and onshore software development assignments for clients in India and abroad. The application areas covered are engineering solutions, business applications (viz. materials management, maintenance management, financial accounting, and personnel management), integrated plant information systems, intranet development, operations research etc. An overview of range of services along with assignments handled and clientele highlighting EIL's IT experience is enumerated hereafter. Range of IT Services Preparation of a Master Plan and Its Implementation EIL has executed a number of assignments in the areas of configuration assessment, evaluation, selection and acceptance testing of computer and communication systems and implementation for clients like: Gas Authority of India Ltd. Bongaigaon Refinery & Petrochemicals Ltd.

Electricity Boards etc. EIL has also executed studies involving preparation of Refinery wide Master Plans taking into consideration the integration of DCS, process functions & management information systems for clients like: Indian Oil Corporation, Cochin Refineries Bharat Petroleum Corporation Limited. Customized Software Development for Engineering and Business Application EIL has undertaken a number of customized software development and implementation assignments in the following application areas: Implementation of Plant Design Systems on PDS & PDMS platforms for Aker Corporation, Norway & PIDEC in Iran. On-line Integrated Materials Information System covering activities like indents, purchase, stores issues/receipts, material accounting for operating plants namely Indian Petrochemicals Corporation Ltd., Oil & Natural Gas Corporation, Bongaigaon Refinery & Petrochemicals Ltd. Computer Aided Maintenance Information System covering preventive & predictive maintenance, work order, maintenance cost & breakdown history for BIPC, Iran. Financial Management Systems including books, ledgers (main & subsidiary), balance sheet, & asset account for major electrical utilities. Plant Database Creation & Document Management EIL has developed software, which provides for value added transfer of integrated plant information system from EPC contractor to the client on electronic media. This software has been implemented for Panipat Refinery Project and many other jobs are in advanced stage of finalization.

Internet Application Development and Implementation EIL has developed expertise in development of JAVA & HTML based applications for implementation on Intranet. In addition to having Intranet for in-house needs, an assignment has recently been completed for Gas Authority of India Ltd. Enterprise Recourse Planning (ERP) Implementation EIL has trained its software specialists and domain experts on the implementation of ERP solutions. Currently a number of jobs are planned to be taken for Oil Industry in India in association with our business partners M/s RAMCO for their ERP product, namely MARSHAL. Operations Research (Linear Programming, Transport Models and Queuing)EIL has executed a number of assignments involving OR techniques for the Ministry of Petroleum, Govt. of India and also a study based on queuing model for a port in Malaysia. Major investment decisions have been taken by the clients based on these optimization studies.

INTRODUCTION

About Project:
Employee Claim Reimbursement System

This is a web based application (client server application) where employees of the company can submit and make entry for the different claims like monthly telephone bill, conveyance, indoor or outdoor trips made by employees, request for car for company work, and others. They are privileged by this system as the employees can easily avail all the claims by logging on the Company intranet i.e. EIL portal. Also it will be easy for the HR to process the claims, and will be less tedious. It will reduce the maintenance of files. Every employee depending on his/her post/level has a limit to which he can get reimbursed about his claim and can apply only once in a month these all checks will be maintained by the system to see whether the claim is in limit and if not then what portion of it can be reimbursed .Thus it will reduce the work of administrative people. Also the system generates crystal reports monthly after processing the claims and notifications are sent to employees to make them aware about status of there claims they had applied. Each employee has his/her user id and password to log on the companys intranet, can submit the application for reimbursement and he/she can check the status of whether his/her claims are processed are not. Present Scenario At present this work is all manual, that is there existing hard copy forms in which they submit there claims and a file is maintained both by HR and administration. This results in bulky and tedious work while reviewing and approving there claims also if any checks are to be considered at a later stage it is difficult to maintain the file and go through all. Also employees have to keep visiting the HR department to know the status of there application.

Proposed Solution
The ITS department at EIL is developing the web application called Employee Claim Reimbursement Management System for EIL portal. The application has centralized database in oracle at head-office at Delhi. The application sever will be customized to provide access to users at head-office, regional offices, through local intranet at EIL. The users will have access to different claim forms which they can fill and submit directly from there system and can also view /check the status of there forms when they have been processed and how much claimed amount has been reimbursed. The administration and HR will be able to view data, process claims and print reports . This system takes care of both the user interface and the back-end efficiently. Interface of the system take care of the following issues: Keeping the usage profile of the users in mind, interface is developed such that it takes minimum amount of time with least possibility of error which can be made. Consistency of data entry transactions. Minimal input actions by user. Compatibility of data entry with data display. Flexibility for user control of data entry. Improved clarity and comprehensibility. Well designed web forms to target the exact needs. Back-end of the system is takes care of: Well designed table to maintain consistency of data with minimum redundancy. Data integrity. Scope of Project Following are the scope to assist the employees for the following purposes: Create and maintain employee claim reimburse forms and database. Online checklist status, monitoring and updating. Report generation. Building of knowledge base. Online data communication between administration, HR and employee. System wise report in specific format (crystal reports)

OBJECTIVES Employee Claim Reimbursement System is the most important and essential function of an organization. The Product Employee Claim Reimbursement System handles all the claim/Approval activities for Employee of an organization. The Employee database is maintained. Claim Reimbursement systems Automation is an important feature of the project.

SYSTEM ANALYSIS
Analysis is the study of problem prior to making some action. In the specific domain of computer system development analysis refers to the study of some business area application, usually leading to the specification of the new system. The action that is to be taken later on is implementation of the system. While analyzing, analyzer has to involve himself deeply in the analysis task. If analysis of the system is wrongly understood then it will lead to wrong design and subsequently to unwanted system. Most organizations appoint a project team to do system development. The team is likely to be composed of system analysts, programmers and users. A project leader is appointed to guide the project. An organization first senses that there is a problem. The problem must be defined which is the most difficult task that an organization faces. Several questions must be posed like: What is the problem? How complex is it? What are its causes? What are the possible solutions to the problem? What types of benefits are expected once the problem is solved? After analyzing the requirements of the task to be performed, the next step is to analyze the problem and understand its context. The first activity in the phase is studying the existing system thoroughly its working, flow of information and then analyzing its limitations. The second activity is to understand the requirements and domain of the new system, which eradicates the limitations of the existing system. Both the activities are equally important, but the first activity serves as a basis of giving the functional specifications and then successful design of the system is more difficult and requires creative thinking. It can be made effective only when we have thorough understanding of the existing system. The process becomes even more difficult when the existing system is almost entirely different from the one to be developed.

ANALYSIS MODEL

The model that is basically being followed is the WATERFALL MODEL, which states that the phases are organized in a linear order. First of all the feasibility study is done. Once the part is over the Requirement Analysis and Project Planning begins. The design starts after the requirements analysis is complete and the coding begins after the design is complete. Once the coding is completed, the testing is done. In this model the sequence of activities performed in software development project are: Requirement Analysis Project Planning System Design Coding Unit Testing System Integration and Testing

Here the linear ordering of these activities is critical .Output of one phase is the input of another phase. The output of each phase is to be consistent with overall requirement of the system. Some of the qualities of spiral model are also incorporated like after the people concerned with. Some of the qualities of spiral model are also incorporated like after Interface designing the user was asked to validate the design as per the requirements. Interaction with the user was also done from time to time for identifying further requirements. WATERFALL Model was being chosen because all the requirements were known beforehand and the objective of our software development is the computerization/automation of an already existing manual working system.

Requirement Analysis & Specification

Design

Implementation & Unit testing

Integration & System Testing

Operation & Maintenance.

Fig. Various Stages of WATERFALL MODEL

Requirement Analysis & Specification Phase The goal of this phase is to understand the exact requirements of the customer

and to document them properly. The requirements describe the what of the system, not the how. This phase produces a large document, written in a natural language, contains a description of what the system will do without describing how it will be done. The resultant document is known as Software Requirement Specification (SRS). The SRS document may act as a contract between the developer & customer.

Design Phase The goal of this phase is to transform the requirements specification into a structure that is suitable for implementation in some programming language. Here, overall software architecture is defined, and the high level and detailed design work is performed. This work is documented and known as software design description (SDD) document.

Implementation & Unit testing Phase

During this phase, design is implemented. If SDD is complete, the implementation or coding phase proceeds smoothly. During Testing, the major activities are centered around the examination and modification of the code. Initially small modules are tested in isolation from the rest of the software product.

Integration & system testing Phase This is a very important phase. Effective testing will contribute to the delivery of

higher quality software products, more satisfied users, lower maintenance costs, a and more accurate and reliable results. It is a very expensive activity and consumes one third to one-half of the cost of a typical developments project.

As we know, the purpose of unit testing is to determine that each independent module is correctly implemented. This gives a little chance to determine that the interface between modules is also correct, and for this reason integration testing of the entire system is done whereas software is part of the system. This is essential to build confidence in the developers before software is delivered to the customer or released in the market.

Operation & Maintenance phase

Software maintenance is a task that every development group has to face, when the software is delivered to the customers site, installed and is operational. Therefore, release of software inaugurates the operation and maintenance phase of the life cycle. The time spent and effort required to keep the software operational after is very significant. Despite the fact that it is very important and challenging task; it is routinely the poorly managed headache that nobody wants to face. Software maintenance is a very broad activity that includes error correction, enhancement of capabilities and optimization. The purpose of this phase is to preserve the value of the software overtime. This phase of this phase for 5-50 years whereas development may be 1-3 years.

FEASIBILITY STUDY A feasibility study determines whether the proposed solution is feasible based on the priorities of the requirements of the organization. A feasibility study culminates in a feasibility report that recommends a solution. It helps you to evaluate the cost-effectiveness of a proposed system. The feasibility study is carried out to test if the proposed system is worth being implemented. Given unlimited resources and infinite time, all projects are feasible. After performing a Preliminary Investigation, gathering and interpreting data and details concerning the project, a Feasibility Check is done which involves a series of steps to check the Technical, Financial and Operational feasibilities. During this phase, various solutions to the existing problems were examined. For each of these solutions the Cost and Benefits were the major criteria to be examined before deciding on any of the proposed systems. These Solutions would provide coverage of the following: a) b) Specification of information to be made available by the system. A clear cut description of what tasks will be done manually and what needs to be

handled by the automated system. c) Specifications of new computing equipment needed.

A system that passes the feasibility tests is considered a feasible system. Let us see some feasible tests in my project.

TECHNICAL FEASIBILITY It is related to the software and equipment specified in the design for implementing a new system. Technical feasibility is a study of function, performance and constraints that may affect the ability to achieve an acceptable system. During technical analysis, the analyst evaluates the technical merits of the system, at the same time collecting additional information about performance, reliability, maintainability and productivity. Technical feasibility is frequently the most difficult areas to assess. The main technical issue raised during feasibility is the existence of necessary technology and whether the proposed equipment has the capacity to hold required data. The technical guarantee of accuracy, reliability, ease and data were also investigated.

Assessing System Performance: It involves ensuring that the system responds to user queries and is efficient, reliable, accurate and easy to use. Since we have the excellent network setup which is supported and excellent configuration of servers with 80 GB hard disk and 512 MB RAM, it satisfies the performance requirement. After the conducting the technical analysis we found that our project fulfills all the technical pre-requisites, the network environments if necessary are also adaptable according to the project.

ECONOMIC FEASIBILITY This feasibility has great importance as it can outweigh other feasibilities because costs affect organization decisions. The concept of Economic Feasibility deals with the fact that a system

that can be developed and will be used on installation must be profitable for the Organization. The cost to conduct a full system investigation, the cost of hardware and software, the benefits in the form of reduced expenditure are all discussed during the economic feasibility. Return on Investment i. There will be cost reduction in terms of maintaining huge amounts of paper records, stationary, humans. ii. There will be tracking of the Subscribers from a centralized database. iii. Subscriber satisfaction will lead to more upgrades and reduce the downgrades. Cost of No Change The cost will be in terms of utilization of resources leading to the cost to the company. Since our cost of project is our efforts, which is obviously less than the long-term gain for the company, the project should be made.

Literature Survey
A lot of literature survey was done before getting started with the project. Some of the main outcomes of it were as follows: GUI guidelines for Web Based Project References have been taken from Quality Document No.8-2000-0005 at EIL. This document defines the GUI Guidelines to be followed while developing the Web Based Application. Login Web Page: It is mandatory that login page does not scroll in horizontal. Users shall also avoid scrolling of page vertically. Application Page (After Login): Application page may be designed either with top menu only or tree menu at left or both tree and top menu depending upon the requirement of application. However if tree menu is used it shall be on the left side of the page. All the pages to appear after the login page shall have a provision for signing out of the application. Sign Out link shall appear in the top-right corner of the page. Application name shall appear in the top-left corner of the page. Header section consisting of the bands showing application full name and top menu shall appear in all pages. Components in Content Page: Content pages shall be enclosed in a panel and form name shall be displayed on the top of page. Relevant classes for the common controls used on the pages. Messages o Tool tips: Tool tips shall be provided wherever necessary to help the user. o Status and Error Messages: Pages shall flash the appropriate messages at the top of the page below the form name. Developers shall provide messages whenever state of the application changes to keep the user informed. o Confirmation Messages: Developers shall reconfirm by displaying prompt messages while performing critical operation like data deletion etc. Confirmation messages shall be displayed in a popup window.

Project Planning

Process Model
The process model used at EIL is Software Development Life Cycle (SDLC) Process Model. At EIL, the SDLC procedure is define in their quality document. The software development process consists of the following sub processes: Scope Definition System Analysis and Design Program Development and Testing Implementation Configuration Management: This sub process is applicable to all the above sub processes Scope Definition This sub-process consists of activities such as receipt of customer request, nomination of coordinator, identification of scope of work, preparation of project plan, delivery of the scope document and controls. For implementation type of job this activity is carried out under the name of requirement specification. System Analysis and Design Program This sub-process consists of activities such as formation of SDT, detail study of the existing system, design specifications of the proposed system, program specifications of the proposed system and the controls. Development and Testing Based on the system analysis and design document, the software programs shall be developed by the SDT. A modular approach with structured concepts is to be employed to facilitate easy understanding and maintenance. During the development of the programs following are to be ensured Naming conventions of variables, fields, records, files, labels, program modules screens, help messages etc. and consistency in the coding to be maintained.

Suitable annotations are to be included in the program code. Debugging aids and messages to be deployed. Consistency of individual module version is to be ensured. Implementation Finally developed software is implemented in the user premises. The following needs to be performed: Preparation for Installation Installation Testing and Parallel Run Bugs removal Training Acceptance Warranty Period and Maintenance Job Closure Backup submission Release of resources

Work Break down Structure


The team members will not be dedicated to specific projects and can be assigned to different sub projects based on need. To begin with, the different streams are formed with the team members as shown in the organization structure diagram.
D.K.Kakkar (Group Leader)

R.K.SINGH (Team Leader)

VINOD ROHILLA

Figure 2: Work Break down Structure

Project Specific Skill Requirements


Role Developer Skill Requirement Visual Studio (Development Environment). ASP.NET VB Programming. Oracle Database design & PL/SQL Programming.

Table 1: Skill Requirements

Risks
The details of the risks perceived in the project are given here, the severity of the same, the probability of the same and the mitigation actions. Severity can be Critical, Major, Minor and the Probability can be High, Medium or Low.

Risk

Severity

Probability Medium

Performance Critical of the system being low Requirement Changes Critical

Medium

Mitigation plan Get an architect to focus on performance issues To accept changes that can be accommodat ed within the current release and to postpone the others to the next release.

Owner

PM

Table 2: Risks

Assumptions/ Constraints
Assumptions ECRS will target ONLY Windows OS on Intel Architecture.

The super user can only create the project. The construction coordinator, project coordinator and lead engineer has edit rights. The job engineer doesnt have edit rights. Once the project is created, it can be deleted by an ITS coordinator. Even Super user can not delete the project created.
Table 3: Assumption/Constraints

Constraints

Actual Status
As of writing of this document the Development Code for administrator module is still undergoing modifications. The Unit Testing for the module is done as the project is progressing. The current version is successfully creating project and its details, assigning job wise responsibility, importing data, enquiries based on project no and report generation. The reasons for modifications are due to the change in the user requirement.

DESIGN OF THE SYSTEM

SOFTWARE/HARDWARE SPECIFICATION

Hardware Specification SERVER A Server with Pentium 500 MHz or higher processor, 512MB RAM. Minimum 5 GB Hard Disk Space Recommended. 800X600 Pixels Screen Resolution for proper viewing of Screens.

CLIENT A PC with Pentium/Celeron Processor, 256MB RAM 800X600 Pixels Screen Resolution for proper viewing of Screens.

Software Specification Operating system to be used RDBMS to be used Scripting language to be used Editing and debugging tools : : : : Microsoft Windows 2000 Professional or XP. Oracle 10i. VB.NET Microsoft visual studio.net 2005

Web technology used Web server to be used Web Browser

: : :

ASP.net Microsoft visual web developer. Microsoft Internet explorer 5.0 or Higher.

Detailed Analysis
In this section I have used various modeling techniques to show the details of the project. The various models available in this section include the following: Flow Chart E-R Diagram Data Flow Diagram o Level 0 o Level 1 Database Design

Flow Chart

Verify Authorit y

Main menu

Claim for Travel Expenses

Meeting Claim

Medical Claim

Telephone Reimbursem ent

Requisition form

Database

Reports

E-R Diagram (ECRS)


Place_visi t To_date From_date Purpos e Addres s Car Requisition Type Extn o

Designation Empnam e Empno_ Passwor d

Directory Amoun t

Emai l

EMPLOYEE

Claim/Approval
Landline no.

Medical Claim no

Dat e

Level Has
WORKS ON

Mobile no. Joining date

Dependents

Travel Abroad Expense Claim

Dep id

Name Status

Relationshi p

Dep_goin g Country

Sponsore d

No. Of Person s

Officia l Purpos e

Total Expense on meals

Advance Drawn

Physical Design (DFD)


DFD means data flow diagram. Before developing software, programmer should have a clear picture of DFD. A DFD shows the movement of data through the different transformations or processes in the system. Named circles show the processes and data named arrows represent flows and a rectangle represents a source or sink. A DFD can be considered as an abstract of the logic of an information-oriented or a process-oriented system flow-chart. For these reasons DFDs are often referred to as logical flow diagrams. The four basic symbols used to construct data flow diagrams are shown below:

A rectangle represents a data source or destination.

A directed line represents the flows of data, which is data stream.

An enclosed figure, usually a circle or an oval bubble, represents a process that transforms data streams.

An open-ended rectangle represents data storage.

The Data Flow Diagram basically serves two purposes. 1. 2. Provide a graphical tool, which can be used effectively by the analyst to explain They can be effectively converted into structured charts, Which effectively help the understanding of the system to the user. in the designing of the system

Context Level DFD

EMPLOYEE

Login

Verification

ECR SYSTEM

Authentication

Database

Level 0 DFD

DFD Level 1

Invalid user
Home Page

User

Login

Valid user

Authorized user

Database

Claim/ Approval

Data Entry

Validation

Invalid

lid Va
Updation

Report generation

Database

Report

TABLES USED IN THE WEBSITES


1. VINEMP Name Null? Type ------------------------------- -------- ---ID NUMBER(2) NAME VARCHAR2(10) ORGN VARCHAR2(10) SALARY NUMBER(5) JOIN_DATE DATE

2. VINEMP1 Name Null? Type ------------------------------- -------- ---EMPNO NOT NULL NUMBER(4) NAME VARCHAR2(20) LVL NUMBER(2) LVL_DESC VARCHAR2(20)

3. ABROAD Name Null? Type ------------------------------- -------- ---SNO NUMBER(2) EMPNO NUMBER(4) NAME VARCHAR2(20) LVL VARCHAR2(10) FROM_DATE VARCHAR2(20) TO_DATE VARCHAR2(20) PURPOSE VARCHAR2(30) PLACE_VISIT VARCHAR2(20) 4. ABROAD1 Name Null? Type ------------------------------- -------- ----

SNO EMPNO NAME LVL FROM_DATE TO_DATE PLACE_VISIT PURPOSE 5. PASSWORD1

NOT NULL NUMBER(38) NOT NULL NUMBER(38) VARCHAR2(15) VARCHAR2(20) DATE DATE VARCHAR2(15) VARCHAR2(20)

Name Null? Type ------------------------------- -------- ---EMPNO NUMBER(4) PASSWORD VARCHAR2(10) ENAME VARCHAR2(10) DESG VARCHAR2(15) DEPT NUMBER(2) ICOM_NO VARCHAR2(4) 6. CLAIM Name Null? Type ------------------------------- -------- ---NAME VARCHAR2(10) EMPNO NUMBER(4) DESG VARCHAR2(10) DEPT VARCHAR2(10) PURPOSE VARCHAR2(10) NOP NUMBER(4) CDATE DATE TOTAL NUMBER(6,2) ADVANCE NUMBER(6,2) UNBAL NUMBER(6,2) UBDATE DATE BUDGET NUMBER(6,2) YEAR NUMBER(4) CAMNT NUMBER(6,2) MEALS VARCHAR2(50) MEAL_EXP NUMBER(5) OTHER_EXP NUMBER(5) TIPS NUMBER(5) 7. Travel

Name Null? Type ------------------------------- -------- ---SNO NUMBER(4) EMPNO VARCHAR2(4) COUNTRY VARCHAR2(25) ADDRESS VARCHAR2(100) FROM_DATE DATE TO_DATE DATE PLANVISIT VARCHAR2(20) COUNTRY2 VARCHAR2(20) TRV_OPTION VARCHAR2(30) SRC_NAME VARCHAR2(20) PURPOSE VARCHAR2(20) DEPT NUMBER(2) DESG VARCHAR2(10) ENAME VARCHAR2(10) ICOM_NO NUMBER(5) RELATION VARCHAR2(20) REC_DATE DATE 8. DEP_MEMBER Name Null? Type ------------------------------- -------- ---SNO NUMBER(3) EMPNO NUMBER(4) NAME VARCHAR2(20) RELATION VARCHAR2(20) DEPID NOT NULL NUMBER(3)

9. PASS Name Null? Type ------------------------------- -------- ---ID NUMBER(4) NAME VARCHAR2(15) PASSWORD VARCHAR2(20) 10. DEPENDENT Name Null? Type ------------------------------- -------- ----

SNO EMPNO DEP_ID 11. MEM_GOING

NUMBER(4) NUMBER(4) NUMBER(4)

Name Null? Type ------------------------------- -------- ---EMPNO NUMBER(4) NAME VARCHAR2(20) DEPID NUMBER(2) RELATION VARCHAR2(20) 12. PDEV_MEMB_BODY Name Null? Type ------------------------------- -------- ---PROF_BODY_CODE NOT NULL VARCHAR2(5) BODY_NAME NOT NULL VARCHAR2(50) ADD_BODY VARCHAR2(150) ADD_CITY VARCHAR2(50) ADD_STATE VARCHAR2(50) STD_CODE VARCHAR2(6) PHONE_NO VARCHAR2(50) FAX_NO VARCHAR2(30) E_MAIL VARCHAR2(30) WEB_URL VARCHAR2(30) UPDATE_DATE NOT NULL DATE UPDATE_BY NOT NULL VARCHAR2(5) 13. PDEV_MEMB_CAT_DET Name Null? Type ------------------------------- -------- ---PROF_BODY_CODE NOT NULL VARCHAR2(5) MEMB_CAT_CODE NOT NULL VARCHAR2(5) MEMB_CAT_NAME NOT NULL VARCHAR2(50) ENROLL_FEE NUMBER(10,2) ANNUAL_FEE NOT NULL NUMBER(10,2) UPDATE_DATE NOT NULL DATE UPDATE_BY NOT NULL VARCHAR2(5) WEF DATE 14. PDEV_CLAIM_INFO

Name Null? Type ------------------------------- -------- ---CLAIM_NO NOT NULL NUMBER(12) CLAIM_DATE NOT NULL DATE EMP_NO NOT NULL VARCHAR2(4) MEMB_NO NOT NULL VARCHAR2(15) MEMB_DATE NOT NULL DATE PROF_BODY_CODE NOT NULL VARCHAR2(5) MEMB_CAT_CODE NOT NULL VARCHAR2(5) MEMB_VALIDITY_CODE NOT NULL VARCHAR2(1) ENROLL_FEE NUMBER(10,2) ANNUAL_FEE NOT NULL NUMBER(10,2) RCPT_NO NOT NULL VARCHAR2(15) RCPT_DATE NOT NULL DATE CLAIMED_AMT NOT NULL NUMBER(10,2) APPROVED_AMT NUMBER(12,2) RELEASED_AMT NUMBER(10,2) BAL_AMT NUMBER(10,2) DOC_RECV_ON DATE APPROVED_ON DATE PMT_RELEASED_ON DATE MEMB_DUE_DATE DATE PROC_STATUS NOT NULL VARCHAR2(2) PROC_MONTH NOT NULL NUMBER(2) PROC_YEAR NOT NULL NUMBER(4) PROC_DATE NOT NULL DATE PROC_BY NOT NULL VARCHAR2(5) REMARKS VARCHAR2(200) SR_NO NUMBER(2) NXT_PMT_REL_DT DATE MEMB_FEE NUMBER(10,2) BANK_FEE NUMBER(10,2)

15. med_claim_details Name Null? Type ------------------------------- -------- ---EMP_NO NOT NULL CHAR(4) CLAIM_NO NOT NULL NUMBER(5) TYPE CHAR(1) DATE1 DATE RATE VARCHAR2(40) MISC VARCHAR2(40) DATE2 DATE

CLAIMED_AMT DIS_AMT SL_NO REASON TYPE_SERIAL_NO EX_DATE EX_DATE1

NUMBER(12) NUMBER(12) FLOAT(*) NUMBER(22) NOT NULL VARCHAR2(3) VARCHAR2(20) VARCHAR2(20)

16. Directory Name Null? Type ------------------------------- -------- ---EMPNO NUMBER(4) DT_JOIN DATE LANDLINE NUMBER(15) MOBILE NUMBER(11) TYPE VARCHAR2(20) SEPT_LINE NUMBER(10) EXTNO NUMBER(4) ADDRESS VARCHAR2(40)

Screen Shots

LOGIN FORM

CODING
Imports System.Data.oledb

Namespace ProfDev Partial Class Login Inherits System.Web.UI.Page #Region " Web Form Designer Generated Code " 'This call is required by the Web Form Designer. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() End Sub Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init 'CODEGEN: This method call is required by the Web Form Designer 'Do not modify it using the code editor. InitializeComponent() End Sub #End Region Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Put user code to initialize the page here Dim logout As Integer = Request.Params("logout") If IsPostBack() = False Then If logout = 1 Then Session.Abandon() End If End If End Sub Protected Sub btnLogin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnLogin.Click Dim User_id As String = txtUserId.Text Dim pword As String = txtPassword.Text Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("Connec tionString")) Dim cmd As OleDbCommand = New OleDbCommand cmd.CommandText = "select * from PASSWORD1 where trim(EMPNO)='" + User_id + "' and trim(PASSWORD)='" + pword.ToUpper + "' " cmd.Connection = myConn myConn.Open() Try Dim dr As OleDbDataReader = cmd.ExecuteReader If dr.HasRows Then dr.Read() If dr.HasRows Then Session("userID") = User_id Session("password") = pword Else Response.Redirect("./home.aspx") Session("userID") = ""

lblError.Text = "Invalid password." End If Session("userID") = "" lblError.Text = "The user is not a valid user." End If Finally End Try myConn.Close() End Sub Protected Sub txtUserId_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtUserId.TextChanged End Sub End Class End Namespace Else

MAIN WINDOW

CODING

Imports System.Data.oledb

Partial Class Home Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load TextBox1.Text = Session("userID") TextBox2.Text = Session("password") End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim User_id As Integer = Session("userID") Dim U_name As String = TextBox1.Text Dim N_pass As String = TextBox3.Text Dim R_pass As String = TextBox4.Text If (N_pass = R_pass) Then Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("Connec tionString")) Dim cmd As OleDbCommand = New OleDbCommand Dim strsql As String cmd.Connection = myConn myConn.Open() Try strsql = "update password set password='" + N_pass + "' where EMPNO=" + User_id.ToString + " " cmd = New OleDbCommand(strsql, myConn) cmd.CommandText = strsql cmd.Connection = myConn Dim res As Integer = cmd.ExecuteNonQuery() If res <= 0 Then Label7.Text = "Password not changed." Else MsgBox("Password updated") End If Catch ex As Exception Label7.Text = "Error in updation" End Try

Else

Label7.Text = " Error " End If End Sub End Class

PROFESSIONAL MEMBERSHIP CLAIM FORM

PROFESSIONAL BODY FORM

CODING

Imports System.Data.oledb Imports System.DateTime Partial Class AddProfBody Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If IsPostBack = False Then If Session("userID") = "" Then Response.Redirect("./Default.aspx") End If oleDBAck.SelectCommand = "SELECT ROWNUM,PROF_BODY_CODE, BODY_NAME, ADD_BODY, ADD_CITY, ADD_STATE, STD_CODE, PHONE_NO, FAX_NO, E_MAIL, WEB_URL FROM (select * from PDEV_MEMB_BODY order by BODY_NAME asc) " lblErr.Text = "" End If End Sub Protected Sub InsertRecord(ByVal sender As Object, ByVal e As EventArgs) Dim bodyCode As String = CType(txtProfBodyCode.Text, String).ToUpper Dim bodyName As String = CType(txtProfBodyName.Text, String).ToUpper Dim addr As String = CType(txtAddress.Text, String) Dim city As String = CType(txtCity.Text, String) Dim state As String = CType(txtState.Text, String) Dim std As String = CType(txtSTD.Text, String) Dim phNo As String = CType(txtPhNo.Text, String) Dim faxNo As String = CType(txtFaxNo.Text, String) Dim email As String = CType(txtEmail.Text, String) Dim url As String = CType(txtURL.Text, String) Dim updtBy As String = Session("UserId") Dim res As Integer Dim flag As Boolean = False Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd1 As OleDbCommand = New OleDbCommand Dim cmd2 As OleDbCommand = New OleDbCommand Dim strDate = Now.ToString("dd-MMM-yyyy").ToUpper If txtValidation() Then cmd1.CommandText = "select PROF_BODY_CODE from PDEV_MEMB_BODY where PROF_BODY_CODE='" + bodyCode + "' " cmd1.Connection = myConn myConn.Open() Dim dr As OleDbDataReader = cmd1.ExecuteReader() If dr.HasRows Then lblErr.Text = "This Code is exist in Database." txtProfBodyCode.Focus() dr.Close() Exit Sub End If dr.Close() Try cmd2.CommandText = "INSERT INTO PDEV_MEMB_BODY VALUES('" + bodyCode + "','" + bodyName + "','" + addr + "','" + city + "','" + state + "', '" + std + "', '" + phNo + "','" + faxNo + "','" + email + "','" + url + "','" + strDate + "','" + updtBy + "')"

cmd2.Connection = myConn If myConn.State = Data.ConnectionState.Closed Then myConn.Open() res = cmd2.ExecuteNonQuery() Catch ee As OleDbException lblErr.Text = "Can Not be Inserted, DB Problem." Finally myConn.Close() End Try If res > 0 Then oleDBAck.SelectCommand = "SELECT ROWNUM,PROF_BODY_CODE, BODY_NAME, ADD_BODY, ADD_CITY, ADD_STATE, STD_CODE, PHONE_NO, FAX_NO, E_MAIL, WEB_URL FROM (select * from PDEV_MEMB_BODY order by BODY_NAME asc) " lblErr.Text = "Data Saved!" End If End If End Sub Function txtValidation() As Boolean If txtProfBodyCode.Text.Length <= 0 Then lblErr.Text = "Body code is empty." txtProfBodyCode.Focus() Return False End If If txtProfBodyName.Text.Length <= 0 Then lblErr.Text = "Body Name is empty." txtProfBodyName.Focus() Return False End If If txtSTD.Text.Length > 0 And Not IsNumeric(txtSTD.Text) Then lblErr.Text = "STD No is not Numeric." txtSTD.Focus() Return False End If If txtPhNo.Text.Length > 0 And Not IsNumeric(txtPhNo.Text) Then lblErr.Text = "Phone No is not Numeric." txtPhNo.Focus() Return False End If If txtFaxNo.Text.Length > 0 And Not IsNumeric(txtFaxNo.Text) Then lblErr.Text = "Fax No is not Numeric." txtFaxNo.Focus() Return False End If If txtEmail.Text.Length > 0 And InStr(txtEmail.Text, "@") Then lblErr.Text = "Email id is not valid." txtEmail.Focus() Return False End If lblErr.Text = "" Return True End Function Function resetAll() txtProfBodyCode.Text = "" txtProfBodyName.Text = "" txtAddress.Text = ""

txtState.Text = "" txtSTD.Text = "" txtPhNo.Text = "" txtFaxNo.Text = "" txtEmail.Text = "" txtURL.Text = "" End Function End Class

EDIT/DELETE PROFESSIONAL BODY FORM

CODING

Imports System.Data.oledb Imports System.DateTime Partial Class EditProfBody Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If IsPostBack = False Then If Session("userID") = "" Then Response.Redirect("./Default.aspx") End If setGridView() End If lblErr.Text = "" txtBodyCode.Enabled = False End Sub Private Sub setGridView() oleDBAck.SelectCommand = "SELECT PROF_BODY_CODE, BODY_NAME, ADD_BODY, ADD_CITY, ADD_STATE, STD_CODE, PHONE_NO, FAX_NO, E_MAIL, WEB_URL FROM (select * from PDEV_MEMB_BODY order by PROF_BODY_CODE asc) " End Sub Protected Sub EditRecord(ByVal sender As Object, ByVal e As EventArgs) Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd As OleDbCommand = New OleDbCommand Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim bodyCode As String = CType(txtBodyCode.Text, String).ToUpper bodyName As String = CType(txtProfBodyName.Text, String).ToUpper addr As String = CType(txtAddress.Text, String).ToUpper city As String = CType(txtCity.Text, String).ToUpper state As String = CType(txtState.Text, String).ToUpper std As String = CType(txtSTD.Text, String) phNo As String = CType(txtPhNo.Text, String) faxNo As String = CType(txtFaxNo.Text, String) email As String = CType(txtEmail.Text, String).ToUpper url As String = CType(txtURL.Text, String).ToUpper

Dim updtBy As String = Session("UserId") Dim strDate = Now.ToString("dd-MMM-yyyy").ToUpper If txtValidation() Then Try cmd.CommandText = "update PDEV_MEMB_BODY set BODY_NAME='" + bodyName + "', ADD_BODY='" + addr + "', ADD_CITY='" + city + "', ADD_STATE='" + state + "', STD_CODE='" + std + "', PHONE_NO='" + phNo + "', FAX_NO='" + faxNo + "', E_MAIL='" + email + "', WEB_URL='" + url + "', UPDATE_DATE='" + strDate + "', UPDATE_BY='" + updtBy + "' where PROF_BODY_CODE='" + bodyCode + "' " cmd.Connection = myConn If myConn.State = Data.ConnectionState.Closed Then myConn.Open() cmd.ExecuteNonQuery() setGridView() Catch ee As Exception lblErr.Text = "Error in Updation." Finally myConn.Close()

myConn.Dispose() End Try End If End Sub Function txtValidation() As Boolean If txtProfBodyName.Text.Length <= 0 Then lblErr.Text = "Professional Body Name is empty." txtProfBodyName.Focus() Return False End If If txtSTD.Text.Length > 0 And Not IsNumeric(txtSTD.Text) Then lblErr.Text = "STD No is not Numeric." txtSTD.Focus() Return False End If If txtPhNo.Text.Length > 0 And Not IsNumeric(txtPhNo.Text) Then lblErr.Text = "Phone No is not Numeric." txtPhNo.Focus() Return False End If If txtFaxNo.Text.Length > 0 And Not IsNumeric(txtFaxNo.Text) Then lblErr.Text = "Fax No is not Numeric." txtFaxNo.Focus() Return False End If lblErr.Text = "" Return True End Function Protected Sub DeleteRecord(ByVal sender As Object, ByVal e As EventArgs) Dim bodyCode As String = CType(txtBodyCode.Text, String).ToUpper Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd As OleDbCommand = New OleDbCommand Try cmd.CommandText = "delete from PDEV_MEMB_BODY where PROF_BODY_CODE='" + bodyCode + "' and PROF_BODY_CODE NOT IN(SELECT PROF_BODY_CODE FROM PDEV_CLAIM_INFO) " cmd.Connection = myConn If myConn.State = Data.ConnectionState.Closed Then myConn.Open() Dim res As Integer = cmd.ExecuteNonQuery() If res > 0 Then setGridView() clearAll() Else lblErr.Text = "Record is in use, Can not be deleted." End If Catch ee As Exception lblErr.Text = "Error in Deletion." Finally myConn.Close() End Try End Sub Protected Sub DisplayRecord(ByVal bodyCode As String)

Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd As OleDbCommand = New OleDbCommand Dim dr As OleDbDataReader cmd.CommandText = "select PROF_BODY_CODE, BODY_NAME, nvl(ADD_BODY,0), nvl(ADD_CITY,0), nvl(ADD_STATE,0), nvl(STD_CODE,'0'), nvl(PHONE_NO,'0'), nvl(FAX_NO,'0'), nvl(E_MAIL,'0'), nvl(WEB_URL,'0'), UPDATE_DATE, UPDATE_BY from PDEV_MEMB_BODY where PROF_BODY_CODE = '" + bodyCode + "' " cmd.Connection = myConn If myConn.State = Data.ConnectionState.Closed Then myConn.Open() dr = cmd.ExecuteReader() If dr.HasRows Then dr.Read() txtBodyCode.Text = bodyCode txtProfBodyName.Text = dr.GetValue(1) If dr.GetValue(2) = "0" Then txtAddress.Text = "" Else txtAddress.Text = dr.GetValue(2) End If If dr.GetValue(3) = "0" Then txtCity.Text = "" Else txtCity.Text = dr.GetValue(3) End If If dr.GetValue(4) = "0" Then txtState.Text = "" Else txtState.Text = dr.GetValue(4) End If If dr.GetValue(5) = "0" Then txtSTD.Text = "" Else txtSTD.Text = dr.GetValue(5) End If If dr.GetValue(6) = "0" Then txtPhNo.Text = "" Else txtPhNo.Text = dr.GetValue(6) End If If dr.GetValue(7) = "0" Then txtFaxNo.Text = "" Else txtFaxNo.Text = dr.GetValue(7) End If If dr.GetValue(8) = "0" Then txtEmail.Text = "" Else txtEmail.Text = dr.GetValue(8) End If If dr.GetValue(9) = "0" Then txtURL.Text = "" Else txtURL.Text = dr.GetValue(9) End If

txtProfBodyName.Text = "" txtAddress.Text = "" txtCity.Text = "" txtState.Text = "" txtSTD.Text = "" txtPhNo.Text = "" txtFaxNo.Text = "" txtEmail.Text = "" txtURL.Text = "" End If txtProfBodyName.Focus() dr.Close() myConn.Close() End Sub Protected Sub rdbSelect(ByVal sender As Object, ByVal e As EventArgs) 'Clear the existing selected row Dim rdb As RadioButton = CType(sender, RadioButton) For Each gvr As GridViewRow In GridView1.Rows() CType(gvr.FindControl("rdbStatus"), RadioButton).Checked = False Next 'Set the new selected row Dim row As GridViewRow = rdb.NamingContainer CType(row.FindControl("rdbStatus"), RadioButton).Checked = True Dim lbl As Label = CType(row.FindControl("lblBodyCode"), Label) DisplayRecord(lbl.Text) End Sub Private Sub clearAll() txtBodyCode.Text = "" txtProfBodyName.Text = "" txtAddress.Text = "" txtCity.Text = "" txtState.Text = "" txtSTD.Text = "" txtPhNo.Text = "" txtFaxNo.Text = "" txtEmail.Text = "" txtURL.Text = "" End Sub End Class

Else

PROFESSIONAL CATEGORY DETAILS FORM

CODING
Imports System.Data.oledb

Imports System.DateTime Partial Class AddProfBodyCat Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If IsPostBack = False Then If Session("userID") = "" Then Response.Redirect("./Default.aspx") End If setBodyNames() setGridView() txtwef.Enabled = False End If End Sub Private Sub setGridView() oleDBAck.SelectCommand = "SELECT PROF_BODY_CODE, MEMB_CAT_CODE, MEMB_CAT_NAME, ENROLL_FEE, ANNUAL_FEE, UPDATE_DATE, UPDATE_BY, to_char(WEF,'DD/MM/YYYY') WEF FROM PDEV_MEMB_CAT_DET where PROF_BODY_CODE='" + txtProfBodyCode.Text + "'" End Sub Protected Sub fillGrid(ByVal sender As Object, ByVal e As System.EventArgs) setGridView() txtMembCatCode.Focus() txtwef.Text = Now.Date.ToString("dd-MMM-yyyy").ToUpper clearAll() End Sub Private Sub setBodyNames() Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd As OleDbCommand Dim dr As OleDbDataReader Dim strsql As String Try strsql = "SELECT PROF_BODY_CODE,BODY_NAME FROM PDEV_MEMB_BODY order by BODY_NAME" If myConn.State = Data.ConnectionState.Closed Then myConn.Open() cmd = New OleDbCommand(strsql, myConn) dr = cmd.ExecuteReader If dr.HasRows Then txtProfBodyCode.DataSource = dr txtProfBodyCode.DataTextField = "BODY_NAME" txtProfBodyCode.DataValueField = "PROF_BODY_CODE" txtProfBodyCode.DataBind() Else txtProfBodyCode.Items.Insert(0, "Select") txtProfBodyCode.Items(0).Value = "Select" End If Catch ee As Exception lblErr.Text = "Error in Selection." Finally myConn.Close() myConn.Dispose()

End Try End Sub Protected Sub InsertData(ByVal sender As Object, ByVal e As EventArgs) Dim bodyCode As String = CType(txtProfBodyCode.Text, String).ToUpper Dim catCode As String = CType(txtMembCatCode.Text, String).ToUpper Dim catName As String = CType(txtMembCatName.Text, String).ToUpper Dim enrollFee As Double = CType(txtEnrollFee.Text, Double) Dim AnnualFee As Double = CType(txtAnnualFee.Text, Double) Dim updtBy As String = Session("UserId") Dim strDate = CType(txtwef.Text, String).ToUpper Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd1 As OleDbCommand = New OleDbCommand Dim cmd2 As OleDbCommand = New OleDbCommand Dim dr As OleDbDataReader Try cmd1.CommandText = "select MEMB_CAT_CODE from PDEV_MEMB_CAT_DET where PROF_BODY_CODE='" + bodyCode + "' and MEMB_CAT_CODE='" + catCode + "' " cmd1.Connection = myConn If myConn.State = Data.ConnectionState.Closed Then myConn.Open() dr = cmd1.ExecuteReader() If dr.HasRows Then lblErr.Text = "This Category Already Exists with this Professional Body." txtMembCatCode.Focus() Exit Sub End If Catch ee As Exception lblErr.Text = "Error in Insertion." Finally dr.Close() End Try cmd2.CommandText = "INSERT INTO PDEV_MEMB_CAT_DET(PROF_BODY_CODE, MEMB_CAT_CODE, MEMB_CAT_NAME,ENROLL_FEE, ANNUAL_FEE, UPDATE_DATE,UPDATE_BY, WEF) VALUES('" + bodyCode + "','" + catCode + "','" + catName + "'," & enrollFee & "," & AnnualFee & ", '" + Format(Now, "dd-mmm-yyyy") + "', '" + updtBy + "','" + strDate + "')" cmd2.Connection = myConn If myConn.State = Data.ConnectionState.Closed Then myConn.Open() Dim res As Integer = cmd2.ExecuteNonQuery() If res <= 0 Then lblErr.Text = "Record can not be added." Exit Sub Else setGridView() clearAll() End If Catch ee As Exception lblErr.Text = "Error in Insertion." Finally myConn.Close() End Try Try

End Sub Private Sub clearAll() txtMembCatCode.Text txtMembCatName.Text txtEnrollFee.Text = txtAnnualFee.Text = lblErr.Text = "" End Sub End Class

= "" = "" "" ""

EDIT/DELETE

PROFESSIONAL DETAILS FORM

CODING
Imports System.Data.oledb Imports System.DateTime Partial Class EditProfBodyCat

Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load If IsPostBack = False Then If Session("userID") = "" Then Response.Redirect("./Default.aspx") End If SetBodyNames() End If lblErr.Text = "" txtwef.Enabled = False End Sub Private Sub SetBodyNames() Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd As OleDbCommand Dim strsql As String Dim dr As OleDbDataReader Try strsql = "SELECT PROF_BODY_CODE,BODY_NAME FROM PDEV_MEMB_BODY ORDER BY BODY_NAME" If myConn.State = Data.ConnectionState.Closed Then myConn.Open() cmd = New OleDbCommand(strsql, myConn) dr = cmd.ExecuteReader If dr.HasRows Then txtProfBodyCode.DataSource = dr txtProfBodyCode.DataTextField = "BODY_NAME" txtProfBodyCode.DataValueField = "PROF_BODY_CODE" txtProfBodyCode.DataBind() setCatNames() Else txtProfBodyCode.Items.Insert(0, "Select") txtProfBodyCode.Items(0).Value = "Select" End If Catch ee As Exception lblErr.Text = "Error in Selection." Finally myConn.Close() myConn.Dispose() End Try End Sub Private Sub SetCatNames() Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd As OleDbCommand Dim strsql As String Dim dr As OleDbDataReader Try strsql = "select MEMB_CAT_CODE,MEMB_CAT_NAME from PDEV_MEMB_CAT_DET where PROF_BODY_CODE = '" + txtProfBodyCode.Text + "' " If myConn.State = Data.ConnectionState.Closed Then myConn.Open() cmd = New OleDbCommand(strsql, myConn) dr = cmd.ExecuteReader If dr.HasRows Then

Else

txtMembCatCode.DataSource = dr txtMembCatCode.DataTextField = "MEMB_CAT_NAME" txtMembCatCode.DataValueField = "MEMB_CAT_CODE" txtMembCatCode.DataBind() SetCatDetail()

txtMembCatCode.Items.Clear() txtMembCatCode.Items.Insert(0, "Select") txtMembCatCode.Items(0).Value = "Select" clearAll() End If Catch ee As Exception lblErr.Text = "Error in Selection." Finally myConn.Close() myConn.Dispose() End Try End Sub Protected Sub EditRecord(ByVal sender As Object, ByVal e As EventArgs) Dim bodyCode As String = CType(txtProfBodyCode.Text, String).ToUpper Dim catCode As String = CType(txtMembCatCode.Text, String).ToUpper Dim enrollFee As Double = CType(txtEnrollFee.Text, Double) Dim AnnualFee As Double = CType(txtAnnualFee.Text, Double) Dim updtBy As String = Session("UserId") Dim strDate = Now.ToString("dd-MMM-yyyy").ToUpper Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd1 As OleDbCommand = New OleDbCommand Try cmd1.CommandText = "update PDEV_MEMB_CAT_DET set ENROLL_FEE=" & enrollFee & ", ANNUAL_FEE=" & AnnualFee & ", UPDATE_DATE='" + strDate + "', UPDATE_BY='" + updtBy + "' where PROF_BODY_CODE='" + bodyCode + "' and MEMB_CAT_CODE='" + catCode + "'" cmd1.Connection = myConn If myConn.State = Data.ConnectionState.Closed Then myConn.Open() Dim res As Integer = cmd1.ExecuteNonQuery() If res >= 1 Then lblErr.Text = "Record Saved." End If Catch ee As Exception lblErr.Text = "Error in Editing." Finally myConn.Close() End Try End Sub Protected Sub DeleteRecord(ByVal sender As Object, ByVal e As EventArgs) Dim catCode As String = CType(txtMembCatCode.Text, String).ToUpper Dim bodyCode As String = CType(txtProfBodyCode.Text, String).ToUpper Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd1 As OleDbCommand = New OleDbCommand Try cmd1.CommandText = "delete from PDEV_MEMB_CAT_DET where MEMB_CAT_CODE='" + catCode + "' and PROF_BODY_CODE='" + bodyCode + "' and MEMB_CAT_CODE NOT IN(SELECT MEMB_CAT_CODE FROM PDEV_CLAIM_INFO)"

cmd1.Connection = myConn If myConn.State = Data.ConnectionState.Open Then myConn.Close() myConn.Open() Dim res As Integer = cmd1.ExecuteNonQuery() If res <= 0 Then lblErr.Text = "Membership Category is in use, Can not be deleted." Else SetBodyNames() End If Catch ee As Exception lblErr.Text = "Error in Deletion." Finally myConn.Close() End Try End Sub Protected Sub SetCatDetail() Dim bodyCode As String = CType(txtProfBodyCode.Text, String).ToUpper Dim catCode As String = CType(txtMembCatCode.Text, String).ToUpper Dim flag As Boolean = False Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("OraCon nString")) Dim cmd1 As OleDbCommand = New OleDbCommand cmd1.CommandText = "select MEMB_CAT_NAME,ENROLL_FEE, ANNUAL_FEE,to_char(WEF,'dd-mm-YYYY') WEF from PDEV_MEMB_CAT_DET where PROF_BODY_CODE = '" + bodyCode + "' and MEMB_CAT_CODE='" + catCode + "' " cmd1.Connection = myConn If myConn.State = Data.ConnectionState.Open Then myConn.Close() myConn.Open() Dim dr As OleDbDataReader = cmd1.ExecuteReader() If dr.HasRows Then While dr.Read txtEnrollFee.Text = dr.GetValue(1) txtAnnualFee.Text = dr.GetValue(2) txtwef.Text = dr.GetValue(3) End While Else txtEnrollFee.Text = "" txtAnnualFee.Text = "" End If dr.Close() myConn.Close() End Sub Protected Sub FillCatDetail(ByVal sender As Object, ByVal e As EventArgs) SetCatDetail() End Sub Protected Sub FillRecord(ByVal sender As Object, ByVal e As EventArgs) SetCatNames() End Sub Private Sub clearAll() txtEnrollFee.Text = ""

txtAnnualFee.Text = "" txtwef.Text = "" lblErr.Text = "" End Sub End Class

CLAIM FORM

CODING
Imports System.data.OleDb Partial Class claim Inherits System.Web.UI.Page Dim Flag1 = 0

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load TextBox2.Text = Session("userID") Dim EMPNO As Integer = TextBox2.Text Dim strsql As String Dim strsql1 As String Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings(" ConnectionString2").ToString) Try Dim dr As OleDbDataReader Dim cmd1 As OleDbCommand = New OleDbCommand Dim cmd2 As OleDbCommand = New OleDbCommand strsql = "Select * from PASSWORD1 WHERE EMPNO= " & EMPNO & "" myConn.Open() cmd1.CommandText = strsql cmd1.Connection = myConn dr = cmd1.ExecuteReader() If dr.HasRows Then dr.Read() TextBox1.Text = dr.GetValue(2) TextBox3.Text = dr.GetValue(3) TextBox4.Text = dr.GetValue(4) End If dr.Close() Catch ex As Exception TextBox7.Text = "Error in loading" Finally myConn.Close() End Try End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim NAME As String = CType(TextBox1.Text, String) Dim EMPNO As Integer = CType(TextBox2.Text, Integer) Dim DESC As String = CType(TextBox3.Text, String) Dim DPTNO As String = CType(TextBox4.Text, String) Dim PURPOSE As String = CType(RadioButtonList1.SelectedValue, String) Dim PERSON As Integer = CType(TextBox5.Text, Integer) Dim da_te As String = CType(TextBox6.Text, String) Dim Meals As Integer = CType(MS.Text, Integer) Dim otr_exp As Integer = CType(OT_EXP.Text, Integer) Dim TIP As Integer = CType(Tips.Text, Integer) TextBox10.Text = Meals + otr_exp + TIP Dim total As Integer = TextBox10.Text Dim Adv_drawn As Integer = CType(TextBox11.Text, Integer) Dim Bal_due As Integer = CType(TextBox12.Text, Integer) Dim UN_bal As Integer = CType(TextBox13.Text, Integer) Dim dat_e As String = CType(TextBox14.Text, String) Dim BUDGET As Integer = CType(TextBox15.Text, Integer) Dim F_year As Integer = CType(TextBox16.Text, Integer)

Dim Cum_Amnt As Integer = CType(TextBox17.Text, Integer)

Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings(" ConnectionString2").ToString) Dim strsql As String Dim cmd1 As OleDbCommand 'Dim tmstr As String myConn.Open() Try strsql = "INSERT INTO claim(NAME,EMPNO,DESG,DEPT,NOP,CDATE,MEAL_EXP, OTHER_EXP,TIPS,TOTAL,ADVANCE,UNBAL,UBDATE,BUDGET,YEAR,CAMNT,PURPOSE,MEALS) VALUES ('" + NAME + "' , " + EMPNO.ToString + ",'" + DESC + "', '" + DPTNO + "'," + PERSON.ToString + ",'" + da_te + "'," + Meals.ToString + "," + otr_exp.ToString + "," + TIP.ToString + ", " + total.ToString + "," + Adv_drawn.ToString + ", " + UN_bal.ToString + ",'" + dat_e + "'," + BUDGET.ToString + "," + F_year.ToString + "," + Cum_Amnt.ToString + "," If (RadioButtonList1.SelectedValue = "B") Then strsql = strsql + "'BusiMeet'" ElseIf (RadioButtonList1.SelectedValue = "O") Then strsql = strsql + "'OfficeMeet'" End If strsql += "," If (breakfast.Checked = True And tea.Checked = True And lunch.Checked = True And dinner.Checked = True) Then strsql = strsql + "'breakfast,tea,lunch,dinner'" ElseIf (breakfast.Checked = True And tea.Checked = True And lunch.Checked = True) Then strsql = strsql + "'breakfast,tea,lunch'" ElseIf (breakfast.Checked = True And tea.Checked = True And dinner.Checked = True) Then strsql = strsql + "'breakfast,tea,dinner'" ElseIf (tea.Checked = True And lunch.Checked = True And dinner.Checked = True) Then strsql = strsql + "'tea,lunch,dinner'" ElseIf (breakfast.Checked = True And lunch.Checked = True And dinner.Checked = True) Then strsql = strsql + "'breakfast,lunch,dinner'" ElseIf (breakfast.Checked = True And tea.Checked = True) Then strsql = strsql + "'breakfast,tea'" ElseIf (lunch.Checked = True And tea.Checked = True) Then strsql = strsql + "'lunch,tea'" ElseIf (breakfast.Checked = True And dinner.Checked = True) Then strsql = strsql + "'breakfast,dinner'" ElseIf (breakfast.Checked = True And lunch.Checked = True) Then strsql = strsql + "'breakfast,lunch'" ElseIf (tea.Checked = True And dinner.Checked = True) Then strsql = strsql + "'tea,dinner'" ElseIf (lunch.Checked = True And dinner.Checked = True) Then strsql = strsql + "'lunch,dinner'" ElseIf (breakfast.Checked = True) Then

strsql = strsql + "'breakfast'" ElseIf (tea.Checked = True) Then strsql = strsql + "'tea'" ElseIf (lunch.Checked = True) Then strsql = strsql + "'lunch'" ElseIf (dinner.Checked = True) Then strsql = strsql + "'dinner'" End If strsql = strsql + ")" cmd1 = New OleDbCommand(strsql, myConn) cmd1.CommandText = strsql cmd1.Connection = myConn Dim res As Integer = cmd1.ExecuteNonQuery() If res <= 0 Then TextBox7.Text = "Record can't be added." Else Flag1 = 1 TextBox7.Text = "Record Inserted" ClearAll() End If Catch ex As Exception TextBox7.Text = "Error in insertion" Finally myConn.Close() End Try If Flag1 = 1 Then Session("flg") = 1 Response.Redirect("CLAIM.aspx") End If End Sub Private Sub ClearAll() TextBox1.Text = " " TextBox2.Text = " " TextBox3.Text = " " TextBox4.Text = " " TextBox5.Text = " " TextBox6.Text = " " MS.Text = " " OT_EXP.Text = " " Tips.Text = "" TextBox11.Text = " " TextBox12.Text = " " TextBox13.Text = " " TextBox14.Text = " " TextBox15.Text = " " TextBox16.Text = " " End Sub

Protected Sub Tips_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Tips.TextChanged

Dim X As Integer = CType(MS.Text, Integer) Dim Y As Integer = CType(OT_EXP.Text, Integer) Dim Z As Integer = CType(Tips.Text, Integer) TextBox10.Text = X + Y + Z End Sub Protected Sub TextBox11_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles TextBox11.TextChanged Dim Tot As Integer = CType(TextBox10.Text, Integer) Dim Adv As Integer = CType(TextBox11.Text, Integer) If (Tot > Adv) Then TextBox12.Text = Adv - Tot Else TextBox12.Text = 0 End If If (Adv > Tot) Then TextBox13.Text = Adv - Tot Else TextBox13.Text = 0 End If End Sub End Class

MEDICAL CLAIM FROM

PART-II

PART-III

CODING

Imports Imports Imports Imports

Microsoft.VisualBasic System.Data System.Data.OleDb System.Configuration.AppSettingsReader

Partial Class MEDICAL_CLAIM Inherits System.Web.UI.Page 'Dim x As Integer = CType(txtc4.Text, Integer) Dim con As New OleDbConnection Dim cmd1 As New OleDbCommand Dim tmpstr1, tmpstr3 As String Dim c1_date As Date Dim Flag1 = 0 Dim reader, dtr, dtr1, reader1, readerT, readerH, readerP, readerO As OleDbDataReader Dim da, da1 As OleDbDataAdapter Dim ds, ds1 As DataSet Public Public Public Public Public Public Public Public Public Public Shared Shared Shared Shared Shared Shared Shared Shared Shared Shared oldrate, olddt, oldmisc, oldamt As String olddt1, oldrate1, oldmisc1, oldamt1 As String revrate, revdt, revmisc, revamt As String revdt1, revrate1, revmisc1, revamt1 As String dateT, numT, test_nameT, amtT, tot As String dateT1, numT1, test_nameT1, amtT1 As String rateH, rateH1, amtH, amtH1 As String frmdtH, frmdtH1, todtH, todtH1 As String dtP, dtP1, cmnoP, cmnoP1, amtP, amtP1 As String O_dt, O_dt1, cmo, cmo1, amt, amt1 As String

Protected Sub btnnew_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnnew.Click txtc2.Text = " " txtc3.Text = " " txtc4.Text = " " End Sub Protected Sub button_save_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button_save.Click Dim command As New OleDbCommand Dim sqltmp As String sqltmp = "insert into med_claim_details (emp_no, claim_no,ex_date,rate, misc, claimed_amt,type_serial_no) values('" + txtempno.Text + "'," + txtclaim_no.Text + ",'" + txtdate.Text + "','" + txtno.Text + "','" + txtrate.Text + "'," + txtamt.Text + ",'I')" con.Open() command = New OleDbCommand(sqltmp, con) command.ExecuteNonQuery() con.Close() bindgrid_summary() pn_injection.Visible = True Dim totcmd3 As New OleDbCommand con.Open()

totcmd3 = New OleDbCommand("select nvl(sum(claimed_amt),0),nvl(sum(dis_amt),0) from med_claim_details where claim_no=" + txtclaim_no.Text + " and emp_no='" + txtempno.Text + "' and type_serial_no='I'", con) dtr1 = totcmd3.ExecuteReader dtr1.Read() txttot_inj.Text = dtr1.GetValue(0) con.Close() End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load con = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("appcon nstring")) cb_typeofill_fill() pn_test.Visible = False cb_patientfill() pn_consultation.Visible = False pnothers.Visible = False pn_medicine.Visible = False pn_injection.Visible = False End Sub Public Sub bindgrid_summary() Dim sql As String Dim cmd1 As New OleDbCommand sql = "select ex_date,rate,misc,claimed_amt from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='I' " con.Open() cmd1 = New OleDbCommand(sql, con) reader = cmd1.ExecuteReader ds = New DataSet("med_claim_details") da = New OleDbDataAdapter(sql, con) da.Fill(ds, "med_claim_details") GridView.DataSource = ds GridView.DataBind() con.Close() End Sub Protected Sub GridView_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GridView1.RowCancelingEdit GridView.EditIndex = -1 bindgrid_summary() End Sub Protected Sub GridView_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView.RowDeleting Dim index As Integer Dim command1 As New OleDbCommand Dim sql1 As String index = e.RowIndex revdt = CType(GridView.Rows(e.RowIndex).FindControl("item_dtI"), TextBox).Text

revrate = CType(GridView.Rows(e.RowIndex).FindControl("item_txtno"), TextBox).Text revmisc = CType(GridView.Rows(e.RowIndex).FindControl("item_txtrate"), TextBox).Text revamt = CType(GridView.Rows(e.RowIndex).FindControl("item_txtamt"), TextBox).Text con.Open() sql1 = "DELETE from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " " command1 = New OleDbCommand(sql1, con) command1.ExecuteNonQuery() GridView.EditIndex = -1 con.Close() bindgrid_summary() End Sub Protected Sub GridView_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView.RowEditing GridView.EditIndex = e.NewEditIndex olddt = CType(GridView.Rows(e.NewEditIndex).FindControl("item_dtI"), TextBox).Text oldrate = CType(GridView.Rows(e.NewEditIndex).FindControl("item_txtno"), TextBox).Text oldmisc = CType(GridView.Rows(e.NewEditIndex).FindControl("item_txtrate"), TextBox).Text oldamt = CType(GridView.Rows(e.NewEditIndex).FindControl("item_txtamt"), TextBox).Text bindgrid_summary() End Sub Protected Sub GridView_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView.RowUpdating Dim tmp As String Dim com As New OleDbCommand revdt = CType(GridView.Rows(e.RowIndex).FindControl("edit_dtI"), TextBox).Text.Trim() revrate = CType(GridView.Rows(e.RowIndex).FindControl("edit_txtno"), TextBox).Text.Trim() revmisc = CType(GridView.Rows(e.RowIndex).FindControl("edit_txtrate"), TextBox).Text.Trim() revamt = CType(GridView.Rows(e.RowIndex).FindControl("edit_txtamt"), TextBox).Text.Trim() tmp = "update med_claim_details set ex_date='" + revdt + "',rate='" + revrate + "',misc='" + revmisc + "',claimed_amt=" + revamt + " where TRIM(claim_no)=" + txtclaim_no.Text + " and TRIM(emp_no)='" + txtempno.Text + "'" con.Open() com = New OleDbCommand(tmp, con) com.ExecuteNonQuery() GridView1.EditIndex = -1 con.Close() bindgrid_summary()

End Sub Protected Sub btnsave1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsave1.Click Dim sqltmp1 As String Dim command1 As New OleDbCommand sqltmp1 = "insert into med_claim_details (emp_no, claim_no,ex_date,rate, misc, claimed_amt,type_serial_no) values('" + txtempno.Text + "'," + txtclaim_no.Text + ",'" + txtc1_date.Text + "','" + txtc2.Text + "','" + txtc3.Text + "'," + txtc4.Text + ",'c1')" con.Open() command1 = New OleDbCommand(sqltmp1, con) command1.ExecuteNonQuery() con.Close() gridview1_summary() pn_consultation.Visible = True Dim totcmd4 As New OleDbCommand con.Open() totcmd4 = New OleDbCommand("select nvl(sum(claimed_amt),0) from med_claim_details where claim_no=" + txtclaim_no.Text + " and emp_no='" + txtempno.Text + "' and type_serial_no='c1'", con) dtr1 = totcmd4.ExecuteReader dtr1.Read() txttot_cons.Text = dtr1.GetValue(0) con.Close() End Sub Public Sub gridview1_summary() Dim sql1 As String Dim cmd2 As New OleDbCommand sql1 = "select ex_date,rate,misc,claimed_amt from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='c1'" con.Open() cmd2 = New OleDbCommand(sql1, con) reader1 = cmd2.ExecuteReader ds1 = New DataSet("med_claim_details") da1 = New OleDbDataAdapter(sql1, con) da1.Fill(ds1, "med_claim_details") GridView1.DataSource = ds1 GridView1.DataBind() con.Close() End Sub Protected Sub GridView1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting Dim index1 As Integer Dim command2 As New OleDbCommand Dim sql2 As String index1 = e.RowIndex revdt1 = CType(GridView1.Rows(e.RowIndex).FindControl("item_dtC"), TextBox).Text

revrate1 = CType(GridView1.Rows(e.RowIndex).FindControl("item_txtnum"), TextBox).Text revmisc1 = CType(GridView1.Rows(e.RowIndex).FindControl("item_txtpl"), TextBox).Text revamt1 = CType(GridView1.Rows(e.RowIndex).FindControl("item_txtamount"), TextBox).Text con.Open() sql2 = "DELETE from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='c1' " command2 = New OleDbCommand(sql2, con) command2.ExecuteNonQuery() GridView.EditIndex = -1 con.Close() gridview1_summary() End Sub Protected Sub GridView1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing GridView1.EditIndex = e.NewEditIndex olddt1 = CType(GridView1.Rows(e.NewEditIndex).FindControl("item_dtC"), TextBox).Text oldrate1 = CType(GridView1.Rows(e.NewEditIndex).FindControl("item_txtnum"), TextBox).Text oldmisc1 = CType(GridView1.Rows(e.NewEditIndex).FindControl("item_txtpl"), TextBox).Text oldamt1 = CType(GridView1.Rows(e.NewEditIndex).FindControl("item_txtamount"), TextBox).Text gridview1_summary() End Sub Protected Sub GridView1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating Dim tmp1 As String Dim com1 As New OleDbCommand revdt1 = CType(GridView1.Rows(e.RowIndex).FindControl("edit_dtC"), TextBox).Text.Trim() revrate1 = CType(GridView1.Rows(e.RowIndex).FindControl("edit_txtnum"), TextBox).Text.Trim() revmisc1 = CType(GridView1.Rows(e.RowIndex).FindControl("edit_txtpl"), TextBox).Text.Trim() revamt1 = CType(GridView1.Rows(e.RowIndex).FindControl("edit_txtamount"), TextBox).Text.Trim() tmp1 = "update med_claim_details set ex_date='" + revdt1 + "',rate='" + revrate1 + "',misc='" + revmisc1 + "',claimed_amt=" + revamt1 + " where TRIM(claim_no)=" + txtclaim_no.Text + " and TRIM(emp_no)='" + txtempno.Text + "'" con.Open() com1 = New OleDbCommand(tmp1, con) com1.ExecuteNonQuery() GridView1.EditIndex = -1

con.Close() gridview1_summary() End Sub Protected Sub GridView1_RowCancelingEdit1(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GridView.RowCancelingEdit GridView1.EditIndex = -1 gridview1_summary() End Sub Protected Sub btn_saveH_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_saveH.Click Dim strqueryH As String Dim commandH As New OleDbCommand strqueryH = "Insert into med_claim_details(emp_no,claim_no,ex_date,ex_date1,rate,claimed_amt,type_seri al_no) values('" + txtempno.Text + "'," + txtclaim_no.Text + ",'" + txt_frmdate.Text + "','" + txt_todate.Text + "','" + txt_rateH.Text + "'," + txt_amtH.Text + " ,'H')" con.Open() commandH = New OleDbCommand(strqueryH, con) commandH.ExecuteNonQuery() con.Close() gridbindH() End Sub Protected Sub btnsave_T_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsave_T.Click Dim strqueryT As String Dim commandT As New OleDbCommand strqueryT = "Insert into med_claim_details(emp_no,claim_no,ex_date,rate,misc,claimed_amt,type_serial_n o) values('" + txtempno.Text + "'," + txtclaim_no.Text + ",'" + txtdt_T1.Text + "','" + txtno_T.Text + "','" + txttest_T.Text + "'," + txtamt_T.Text + ",'T')" con.Open() commandT = New OleDbCommand(strqueryT, con) commandT.ExecuteNonQuery() con.Close() test_gridbind() test_tot() End Sub Public Sub test_tot() Dim totcmd As New OleDbCommand con.Open() totcmd = New OleDbCommand("select sum(claimed_amt) from med_claim_details where claim_no=" + txtclaim_no.Text + " and emp_no='" + txtempno.Text + "' and type_serial_no='T'", con) dtr = totcmd.ExecuteReader dtr.Read() txttot_T.Text = dtr.GetValue(0) con.Close() End Sub

Protected Sub btnsave_P_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnsave_P.Click Dim strqueryP As String Dim commandP As New OleDbCommand strqueryP = "Insert into med_claim_details(emp_no,claim_no,ex_date,rate,claimed_amt,type_serial_no) values('" + txtempno.Text + "'," + txtclaim_no.Text + ",'" + txt_dtP.Text + "','" + txt_cmP.Text + "'," + txt_amtP.Text + ",'P')" con.Open() commandP = New OleDbCommand(strqueryP, con) commandP.ExecuteNonQuery() con.Close() bindgridP() pn_medicine.Visible = True Dim totcmd2 As New OleDbCommand con.Open() totcmd2 = New OleDbCommand("select nvl(sum(claimed_amt),0) from med_claim_details where claim_no=" + txtclaim_no.Text + " and emp_no='" + txtempno.Text + "' and type_serial_no='P' or type_serial_no='H'", con) dtr1 = totcmd2.ExecuteReader dtr1.Read() txttot_med.Text = dtr1.GetValue(0) con.Close() End Sub Protected Sub button_Save_O_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button_Save_O.Click Dim strqueryO As String Dim commandO As New OleDbCommand strqueryO = "Insert into med_claim_details(emp_no,claim_no,ex_date,rate,claimed_amt,type_serial_no) values('" + txtempno.Text + "'," + txtclaim_no.Text + ",'" + txtdt_O.Text + "','" + txtcm_O.Text + "'," + txtamt_O.Text + ",'O')" con.Open() commandO = New OleDbCommand(strqueryO, con) commandO.ExecuteNonQuery() con.Close() bindgrid_Others() pnothers.Visible = True Dim totcmd1 As New OleDbCommand con.Open() totcmd1 = New OleDbCommand("select nvl(sum(claimed_amt),0) from med_claim_details where claim_no=" + txtclaim_no.Text + " and emp_no='" + txtempno.Text + "' and type_serial_no='O'", con) dtr = totcmd1.ExecuteReader dtr.Read() txttot_other.Text = dtr.GetValue(0) con.Close() End Sub Public Sub test_gridbind()

Dim sqlT As String Dim cmdT As New OleDbCommand sqlT = "select ex_date,rate,misc,claimed_amt from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='T'" con.Open() cmdT = New OleDbCommand(sqlT, con) readerT = cmdT.ExecuteReader ds1 = New DataSet("med_claim_details") da1 = New OleDbDataAdapter(sqlT, con) da1.Fill(ds1, "med_claim_details") GridView_test.DataSource = ds1 GridView_test.DataBind() con.Close() End Sub Protected Sub GridView_test_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GridView_test.RowCancelingEdit GridView_test.EditIndex = -1 test_gridbind() End Sub Protected Sub GridView_test_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView_test.RowDeleting Dim indexT As Integer Dim commandT As New OleDbCommand Dim sqlT As String indexT = e.RowIndex dateT1 = CType(GridView_test.Rows(e.RowIndex).FindControl("item_dttest"), TextBox).Text numT1 = CType(GridView_test.Rows(e.RowIndex).FindControl("item_testno"), TextBox).Text test_nameT1 = CType(GridView_test.Rows(e.RowIndex).FindControl("item_testtype"), TextBox).Text amtT1 = CType(GridView_test.Rows(e.RowIndex).FindControl("item_amttest"), TextBox).Text con.Open() sqlT = "DELETE from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='T'" commandT = New OleDbCommand(sqlT, con) commandT.ExecuteNonQuery() GridView_test.EditIndex = -1 con.Close() test_gridbind() test_tot() End Sub Protected Sub GridView_test_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView_test.RowEditing GridView_test.EditIndex = e.NewEditIndex

dateT = CType(GridView_test.Rows(e.NewEditIndex).FindControl("item_dttest"), TextBox).Text numT = CType(GridView_test.Rows(e.NewEditIndex).FindControl("item_testno"), TextBox).Text test_nameT = CType(GridView_test.Rows(e.NewEditIndex).FindControl("item_testtype"), TextBox).Text amtT = CType(GridView_test.Rows(e.NewEditIndex).FindControl("item_amttest"), TextBox).Text test_gridbind() End Sub Protected Sub GridView_test_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView_test.RowUpdating Dim tmpT As String Dim comT As New OleDbCommand dateT1 = CType(GridView_test.Rows(e.RowIndex).FindControl("edit_dttest"), TextBox).Text.Trim() numT1 = CType(GridView_test.Rows(e.RowIndex).FindControl("edit_testno"), TextBox).Text.Trim() test_nameT1 = CType(GridView_test.Rows(e.RowIndex).FindControl("edit_testtype"), TextBox).Text.Trim() amtT1 = CType(GridView_test.Rows(e.RowIndex).FindControl("edit_amttest"), TextBox).Text.Trim() tmpT = "update med_claim_details set ex_date='" + dateT1 + "', rate='" + numT1 + "',misc='" + test_nameT1 + "',claimed_amt=" + amtT1 + " where TRIM(claim_no)=" + txtclaim_no.Text + " and TRIM(emp_no)='" + txtempno.Text + "' and type_serial_no='T'" con.Open() comT = New OleDbCommand(tmpT, con) comT.ExecuteNonQuery() GridView1.EditIndex = -1 con.Close() test_gridbind() test_tot() End Sub Public Sub gridbindH() Dim sqlH As String Dim cmdH As New OleDbCommand sqlH = "select ex_date,ex_date1,rate,claimed_amt from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='H'" con.Open() cmdH = New OleDbCommand(sqlH, con)

readerH = cmdH.ExecuteReader ds1 = New DataSet("med_claim_details") da1 = New OleDbDataAdapter(sqlH, con) da1.Fill(ds1, "med_claim_details") GridView_medH.DataSource = ds1 GridView_medH.DataBind() con.Close() End Sub Protected Sub GridView_medH_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GridView_medH.RowCancelingEdit GridView_medH.EditIndex = -1 gridbindH() End Sub Protected Sub GridView_medH_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView_medH.RowDeleting Dim indexH As Integer Dim commandH As New OleDbCommand Dim sqlH As String indexH = e.RowIndex frmdtH1 = CType(GridView_medH.Rows(e.RowIndex).FindControl("item_frmdtH"), TextBox).Text todtH1 = CType(GridView_medH.Rows(e.RowIndex).FindControl("item_todtH"), TextBox).Text rateH1 = CType(GridView_medH.Rows(e.RowIndex).FindControl("item_rateH"), TextBox).Text amtH1 = CType(GridView_medH.Rows(e.RowIndex).FindControl("item_amtH"), TextBox).Text con.Open() sqlH = "DELETE from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='H'" commandH = New OleDbCommand(sqlH, con) commandH.ExecuteNonQuery() GridView_medH.EditIndex = -1 con.Close() gridbindH() End Sub Protected Sub GridView_medH_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView_medH.RowEditing GridView_medH.EditIndex = e.NewEditIndex frmdtH = CType(GridView_medH.Rows(e.NewEditIndex).FindControl("item_frmdtH"), TextBox).Text todtH = CType(GridView_medH.Rows(e.NewEditIndex).FindControl("item_todtH"), TextBox).Text rateH = CType(GridView_medH.Rows(e.NewEditIndex).FindControl("item_rateH"), TextBox).Text

amtH = CType(GridView_medH.Rows(e.NewEditIndex).FindControl("item_amtH"), TextBox).Text gridbindH() End Sub Protected Sub GridView_medH_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView_medH.RowUpdating Dim tmpH As String Dim comH As New OleDbCommand frmdtH1 = CType(GridView_medH.Rows(e.RowIndex).FindControl("edit_frmdtH"), TextBox).Text.Trim() todtH1 = CType(GridView_medH.Rows(e.RowIndex).FindControl("edit_todtH"), TextBox).Text.Trim() rateH1 = CType(GridView_medH.Rows(e.RowIndex).FindControl("edit_rateH"), TextBox).Text.Trim() amtH1 = CType(GridView_medH.Rows(e.RowIndex).FindControl("edit_amtH"), TextBox).Text.Trim() tmpH = "update med_claim_details set ex_date='" + frmdtH1 + "',ex_date1='" + todtH1 + "',rate='" + rateH1 + "',claimed_amt=" + amtH1 + " where TRIM(claim_no)=" + txtclaim_no.Text + " and TRIM(emp_no)='" + txtempno.Text + "' and type_serial_no='H'" con.Open() comH = New OleDbCommand(tmpH, con) comH.ExecuteNonQuery() GridView_medH.EditIndex = -1 con.Close() gridbindH() End Sub Public Sub bindgridP() Dim sqlP As String Dim cmdP As New OleDbCommand sqlP = "select ex_date,rate,claimed_amt from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='P'" con.Open() cmdP = New OleDbCommand(sqlP, con) readerP = cmdP.ExecuteReader ds1 = New DataSet("med_claim_details") da1 = New OleDbDataAdapter(sqlP, con) da1.Fill(ds1, "med_claim_details") GridViewP.DataSource = ds1 GridViewP.DataBind() con.Close() End Sub Protected Sub GridViewP_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GridViewP.RowCancelingEdit

GridViewP.EditIndex = -1 bindgridP() End Sub Protected Sub GridViewP_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridViewP.RowDeleting Dim indexP As Integer Dim commandP As New OleDbCommand Dim sqlP As String indexP = e.RowIndex dtP1 = CType(GridViewP.Rows(e.RowIndex).FindControl("item_dtP"), TextBox).Text cmnoP1 = CType(GridViewP.Rows(e.RowIndex).FindControl("item_cmnoP"), TextBox).Text amtP1 = CType(GridViewP.Rows(e.RowIndex).FindControl("item_amtP"), TextBox).Text con.Open() sqlP = "DELETE from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='P'" commandP = New OleDbCommand(sqlP, con) commandP.ExecuteNonQuery() GridViewP.EditIndex = -1 con.Close() bindgridP() End Sub Protected Sub GridViewP_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridViewP.RowEditing GridViewP.EditIndex = e.NewEditIndex dtP = CType(GridViewP.Rows(e.NewEditIndex).FindControl("item_dtP"), TextBox).Text cmnoP = CType(GridViewP.Rows(e.NewEditIndex).FindControl("item_cmnoP"), TextBox).Text amtP = CType(GridViewP.Rows(e.NewEditIndex).FindControl("item_amtP"), TextBox).Text bindgridP() End Sub Protected Sub GridViewP_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridViewP.RowUpdating Dim tmpP As String Dim comP As New OleDbCommand dtP1 = CType(GridViewP.Rows(e.RowIndex).FindControl("edit_dtP"), TextBox).Text.Trim() cmnoP1 = CType(GridViewP.Rows(e.RowIndex).FindControl("edit_cmnoP"), TextBox).Text.Trim() amtP1 = CType(GridViewP.Rows(e.RowIndex).FindControl("edit_amtP"), TextBox).Text.Trim() tmpP = "update med_claim_details set ex_date='" + dtP1 + "',rate='" + cmnoP1 + "',claimed_amt=" + amtP1 + " where TRIM(claim_no)=" + txtclaim_no.Text + " and TRIM(emp_no)='" + txtempno.Text + "' and type_serial_no='P'" con.Open() comP = New OleDbCommand(tmpP, con) comP.ExecuteNonQuery()

GridViewP.EditIndex = -1 con.Close() bindgridP() End Sub Public Sub bindgrid_Others() Dim sqlO As String Dim cmdO As New OleDbCommand sqlO = "select ex_date,rate,claimed_amt from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='O'" con.Open() cmdO = New OleDbCommand(sqlO, con) readerO = cmdO.ExecuteReader ds1 = New DataSet("med_claim_details") da1 = New OleDbDataAdapter(sqlO, con) da1.Fill(ds1, "med_claim_details") GridView_Others.DataSource = ds1 GridView_Others.DataBind() con.Close() End Sub Protected Sub GridView_Others_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GridView_Others.RowCancelingEdit GridView_Others.EditIndex = -1 bindgrid_Others() End Sub Protected Sub GridView_Others_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView_Others.RowDeleting Dim indexO As Integer Dim commandO As New OleDbCommand Dim sqlO As String indexO = e.RowIndex O_dt1 = CType(GridView_Others.Rows(e.RowIndex).FindControl("item_dtO"), TextBox).Text cmo1 = CType(GridView_Others.Rows(e.RowIndex).FindControl("item_cmO"), TextBox).Text amt1 = CType(GridView_Others.Rows(e.RowIndex).FindControl("item_amtO"), TextBox).Text con.Open() sqlO = "DELETE from med_claim_details where emp_no='" + txtempno.Text + "' and claim_no=" + txtclaim_no.Text + " and type_serial_no='O'" commandO = New OleDbCommand(sqlO, con) commandO.ExecuteNonQuery() GridView_Others.EditIndex = -1 con.Close() bindgrid_Others() End Sub Protected Sub GridView_Others_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView_Others.RowUpdating Dim tmpO As String Dim comO As New OleDbCommand

O_dt1 = CType(GridView_Others.Rows(e.RowIndex).FindControl("edit_dtO"), TextBox).Text.Trim() cmo1 = CType(GridView_Others.Rows(e.RowIndex).FindControl("edit_cmO"), TextBox).Text amt1 = CType(GridView_Others.Rows(e.RowIndex).FindControl("edit_amtO"), TextBox).Text.Trim() tmpO = "update med_claim_details set ex_date='" + O_dt1 + "', rate='" + cmo1 + "',claimed_amt=" + amt1 + " where TRIM(claim_no)=" + txtclaim_no.Text + " and TRIM(emp_no)='" + txtempno.Text + "' and type_serial_no='O'" con.Open() comO = New OleDbCommand(tmpO, con) comO.ExecuteNonQuery() GridView_Others.EditIndex = -1 con.Close() bindgrid_Others() End Sub Protected Sub btnOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnOK.Click Dim sqlstr As String Dim cmd As New OleDbCommand sqlstr = "select sum(claimed_amt),sum(dis_amt)from med_claim_details where claim_no=" + txtclaim_no.Text + "" con.Open() cmd = New OleDbCommand(sqlstr, con) dtr = cmd.ExecuteReader() dtr.Read() 'txt_sumtotal.Text = dtr.Read txt_sumtotal.Text = dtr.GetValue(0) txt_disallowed.Text = dtr.GetValue(1) con.Close() End Sub Protected Sub btn_submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_submit.Click Dim query As String Dim master_command As OleDbCommand query = "insert into med_claim_master(emp_no,claim_no,ex_claimdate,res1,res2,res3,place_sick,reaso n,claimed_amt) values('" + txtempno.Text + "'," + txtclaim_no.Text + ",'" + txtclaim_dt.Text + "','" + res1.Text + "','" + res2.Text + "','" + res3.Text + "','" + txtplace.Text + "','" + txtother_place.Text + "'," + txt_sumtotal.Text + ") " con.Open() master_command = New OleDbCommand(query, con) master_command.ExecuteNonQuery() con.Close() End Sub Public Sub cb_typeofill_fill()

Dim cbcmd1 As New OleDbCommand con.Open() cbcmd1 = New OleDbCommand("select descrip,sno from med_dir", con) typeof_ill.DataSource = cbcmd1.ExecuteReader typeof_ill.DataTextField = Trim("descrip") typeof_ill.DataValueField = Trim("sno") typeof_ill.DataBind() typeof_ill.Items.Insert(0, "--Select--") con.Close() End Sub Public Sub cb_patientfill() Dim cbcmd2 As New OleDbCommand con.Open() cbcmd2 = New OleDbCommand("select dependent from employee_dependents where empno='" + txtempno.Text + "' ", con) cbpatientname.DataSource = cbcmd2.ExecuteReader cbpatientname.DataTextField = Trim("dependent") cbpatientname.DataValueField = Trim("dependent") cbpatientname.DataBind() con.Close() End Sub Protected Sub btn_newT_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_newT.Click txtdt_T1.Text = "" txtno_T.Text = "" txttest_T.Text = "" txtamt_T.Text = "" txttot_T.Text = "" End Sub End Class

CAR REQUISITIONS FORM

CODING
Imports System.data.OleDb

Partial Class ABROAD2 Inherits System.Web.UI.Page Dim Flag1 = 0 Private Sub setbody_name() Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("Connec tionString")) Dim cmd As OleDbCommand Dim strsql As String strsql = "SELECT SNO,EMPNO,NAME,PLACE_VISIT,FROM_DATE,TO_DATE,PURPOSE FROM ABROAD order by EMPNO" cmd = New OleDbCommand(strsql, myConn) myConn.Close() myConn.Dispose() End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Session("flg") = 0 Dim SNO As Integer Dim EMPNO As Integer = CType(TextBox2.Text, Integer) Dim NAME As String = CType(TextBox3.Text, String) Dim LVL As String = CType(TextBox4.Text, String) Dim PLACE_VISIT As String = CType(TextBox5.Text, String) Dim FROM_DATE As String = CType(TextBox6.Text, String) Dim TO_DATE As String = CType(TextBox7.Text, String) Dim PURPOSE As String = CType(TextBox8.Text, String) Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings(" ConnectionString").ToString) Dim strsql As String Try Dim cmd1 As OleDbCommand = New OleDbCommand Dim dr As OleDbDataReader strsql = "SELECT MAX(SNO) FROM ABROAD WHERE EMPNO=" + EMPNO.ToString myConn.Open() cmd1.CommandText = strsql cmd1.Connection = myConn dr = cmd1.ExecuteReader() If dr.HasRows Then dr.Read() SNO = dr.GetValue(0) + 1 Else SNO = 1 End If dr.Close() strsql = "INSERT INTO ABROAD(SNO,EMPNO,NAME,LVL,PLACE_VISIT,FROM_DATE,TO_DATE,PURPOSE ) VALUES (" + SNO.ToString + "," + EMPNO.ToString + " ,'" + NAME + "','" + LVL + "','" + PLACE_VISIT + "','" + FROM_DATE + "', '" + TO_DATE + "','" + PURPOSE + "')" cmd1.CommandText = strsql cmd1.Connection = myConn Dim res As Integer = cmd1.ExecuteNonQuery() If res <= 0 Then TextBox9.Text = "Record can't be added." Else

Flag1 = 1 TextBox9.Text = "Record Inserted" ClearAll() End If Catch ex As Exception TextBox9.Text = "Error in insertion" Finally myConn.Close() End Try If Flag1 = 1 Then Session("flg") = 1 Response.Redirect("ABROAD2.aspx") End If End Sub Private Sub ClearAll() TextBox1.Text = " " TextBox2.Text = " " TextBox3.Text = " " TextBox4.Text = " " TextBox5.Text = " " TextBox6.Text = " " TextBox7.Text = " " TextBox8.Text = " " End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load TextBox2.Text = Session("userID") Dim SNO As Integer Dim EMPNO As Integer = TextBox2.Text Dim strsql As String Dim strsql1 As String Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings(" ConnectionString2").ToString) Try Dim dr As OleDbDataReader Dim cmd1 As OleDbCommand = New OleDbCommand Dim cmd2 As OleDbCommand = New OleDbCommand strsql = "Select * from PASSWORD1 WHERE EMPNO= " & EMPNO & "" myConn.Open() cmd1.CommandText = strsql cmd1.Connection = myConn dr = cmd1.ExecuteReader() If dr.HasRows Then dr.Read() TextBox3.Text = dr.GetValue(2) End If dr.Close() strsql = "SELECT NVL(MAX(SNO),0) FROM TRAVEL WHERE EMPNO=" + EMPNO.ToString cmd2.CommandText = strsql

cmd2.Connection = myConn dr = cmd2.ExecuteReader() If dr.HasRows Then dr.Read() SNO = SNO + 1 TextBox1.Text = SNO End If Catch ex As Exception TextBox9.Text = "Error in loading" Finally myConn.Close() End Try End Sub End Class

TRAVEL ABROAD FORM

CODING

Imports System.Data Imports System.Data.OleDb Imports System.Configuration.AppSettingsReader Partial Class TRAVEL4 Inherits System.Web.UI.Page Dim MembDt, RctDt As Date Dim Flag1 = 0 Dim Conn As OleDbConnection Dim Command, command1, Command2 As New OleDbCommand Dim Reader, Reader1 As OleDbDataReader Dim DataAdp As OleDbDataAdapter Dim Ds As DataSet Dim strsql, strsql1, strsql2 As String Dim dt As Date Dim transaction As OleDbTransaction Dim strfmt As String = "dd/mm/yyyy" Public Shared EMPNO, DEPID As Integer Public Shared NAME, RELATION As String Public Shared oldRelation, oldNAME, oldDEPID As String Protected Sub GridView1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView1.SelectedIndexChanged Dim DEPID As Integer Dim EMPNO As Integer Dim NAME As String Dim RELATION As String DEPID = GridView1.SelectedRow.Cells(2).Text Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("Connec tionString2")) Dim strsql As String Dim strsql1 As String Dim dr As OleDbDataReader Try strsql = "select * from DEP_MEMBER WHERE DEPID = " & DEPID & "" Dim cmd1 As OleDbCommand = New OleDbCommand myConn.Open() cmd1.CommandText = strsql cmd1.Connection = myConn dr = cmd1.ExecuteReader() If dr.HasRows Then dr.Read() strsql1 = "INSERT INTO MEM_GOING (EMPNO,NAME,DEPID,RELATION) VALUES ( " + dr.GetValue(1).ToString + ", '" + dr.GetValue(2) + "'," + dr.GetValue(4).ToString + ",'" + dr.GetValue(3) + "') " cmd1.CommandText = strsql1 cmd1.Connection = myConn dr.Close() Dim res As Integer = cmd1.ExecuteNonQuery() If res <= 0 Then Else lblError.Text = "Record can't be added." lblError.Text = "Record Inserted"

End If End If Catch ex As Exception lblError.Text = "Error in UPDATING" Finally myConn.Close() End Try lblError.Text = "Record can't be added." End Sub Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Label2.Text = Session("userID") Dim SNO As Integer Dim EMPNO As Integer = Label2.Text Dim strsql As String Dim strsql2 As String Dim Rec_date As String Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings(" ConnectionString2").ToString) Try

Dim dr As OleDbDataReader Dim cmd1 As OleDbCommand = New OleDbCommand Dim cmd3 As OleDbCommand = New OleDbCommand strsql = "Select * from PASSWORD1 WHERE EMPNO= " & EMPNO & "" myConn.Open()

cmd1.CommandText = strsql cmd1.Connection = myConn dr = cmd1.ExecuteReader() If dr.HasRows Then dr.Read() Label2.Text = dr.GetValue(0) Label3.Text = dr.GetValue(2) Label4.Text = dr.GetValue(3) End If strsql2 = " SELECT REC_DATE FROM TRAVEL WHERE EMPNO=" & EMPNO & " " cmd3.CommandText = strsql2 cmd3.Connection = myConn dr = cmd3.ExecuteReader() If dr.HasRows Then dr.Read() Rec_date = dr.Item("REC_DATE") End If If Rec_date = "" Then save.Enabled = True Else save.Enabled = False End If Catch ex As Exception TextBox1.Text = "Error in loading"

Finally myConn.Close() End Try Conn = New OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings(" ConnectionString5").ToString) If Not IsPostBack Then GridView1.ShowHeader = True BindGrid() End If lblError.Text = "" Literal1.Text = "" End Sub Protected Sub btnadd_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnadd.Click GridView1.ShowFooter = True GridView1.ShowHeader = True BindGrid() End Sub Protected Sub Gridview1_RowCancelingEdit(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GridView1.RowCancelingEdit GridView1.EditIndex = -1 BindGrid() End Sub Protected Sub Gridview1_RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles GridView1.RowCommand Dim flag, intPidno As Integer Dim strPidno As String If e.CommandName = "Insert" Then Checkdata(flag) If flag = 1 Then NAME = CType(GridView1.FooterRow.FindControl("txtname"), TextBox).Text DEPID = CType(GridView1.FooterRow.FindControl("txtdepid"), TextBox).Text RELATION = CType(GridView1.FooterRow.FindControl("txtrel"), TextBox).Text ElseIf flag = 0 Then NAME = CType(GridView1.Controls(0).Controls(0).FindControl("txtname"), TextBox).Text DEPID = CType(GridView1.Controls(0).Controls(0).FindControl("txtdepid"), TextBox).Text RELATION = CType(GridView1.Controls(0).Controls(0).FindControl("txtrel"), TextBox).Text End If dt = Date.Today Try Conn.Open() transaction = Conn.BeginTransaction(IsolationLevel.ReadCommitted) Command = New OleDbCommand Command.Connection = Conn

Command.Transaction = transaction Command.CommandText = "insert into MEM_GOING values('" + Session("userID") + "','" + NAME + "'," + DEPID.ToString + ",'" + RELATION + "')" Command.ExecuteNonQuery() transaction.Commit() Catch ex As Exception Try Literal1.Text = ex.Message.ToString transaction.Rollback() Catch End Try End Try Conn.Close() GridView1.ShowFooter = False BindGrid() ElseIf e.CommandName = "Cancel" Then GridView1.ShowFooter = False BindGrid() End If End Sub Protected Sub Gridview1_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GridView1.RowDeleting Dim index As Integer index = e.RowIndex DEPID = CType(GridView1.Rows(e.RowIndex).FindControl("lbldepid"), Label).Text Try Conn.Open() transaction = Conn.BeginTransaction(IsolationLevel.ReadCommitted) Command = New OleDbCommand Command.Connection = Conn Command.Transaction = transaction Command.CommandText = "delete from MEM_GOING where DEPID=" &

DEPID & ""

Command.ExecuteNonQuery() transaction.Commit() Catch ex As Exception Try lblError.Text = ex.Message.ToString transaction.Rollback() Catch End Try End Try GridView1.EditIndex = -1 Conn.Close() BindGrid() End Sub Protected Sub Gridview1_RowEditing(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GridView1.RowEditing GridView1.EditIndex = e.NewEditIndex oldNAME = CType(GridView1.Rows(e.NewEditIndex).FindControl("lblname"), Label).Text

oldDEPID = CType(GridView1.Rows(e.NewEditIndex).FindControl("lbldepid"), Label).Text oldRelation = CType(GridView1.Rows(e.NewEditIndex).FindControl("lblrel"), Label).Text BindGrid() End Sub Protected Sub BindGrid() strsql = "select EMPNO,NAME,DEPID,RELATION from DEP_MEMBER where empno='" + Session("userID") + "'" Command = New OleDbCommand(strsql, Conn) Conn.Open() Reader = Command.ExecuteReader If Reader.HasRows = True Then btnadd.Enabled = True Else btnadd.Enabled = True End If Ds = New DataSet("DEP_MEMBER") DataAdp = New OleDbDataAdapter(strsql, Conn) DataAdp.Fill(Ds, "DEP_MEMBER") GridView1.DataSource = Ds GridView1.DataBind() Conn.Close() End Sub Protected Sub Gridview1_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GridView1.RowUpdating Try NAME = CType(GridView1.Rows(e.RowIndex).FindControl("txtname"), TextBox).Text.Trim DEPID = CType(GridView1.Rows(e.RowIndex).FindControl("txtdepid"), TextBox).Text.Trim RELATION = CType(GridView1.Rows(e.RowIndex).FindControl("txtrel"), TextBox).Text.Trim Conn.Open() transaction = Conn.BeginTransaction(IsolationLevel.ReadCommitted) Command = New OleDbCommand Command.Connection = Conn Command.Transaction = transaction Command.CommandText = "update MEM_GOING set NAME='" + NAME + "',DEPID=" + DEPID.ToString + ",RELATION='" + RELATION + "' where DEPID=" & oldDEPID & "" Command.ExecuteNonQuery() transaction.Commit() Catch ex As Exception Try lblError.Text = ex.Message.ToString transaction.Rollback() Catch End Try End Try GridView1.EditIndex = -1 Conn.Close() BindGrid()

End Sub Protected Sub Checkdata(ByRef flag As Integer) strsql = "select * from MEM_GOING where EMPNO='" + Session("userID") + "' " Command = New OleDbCommand(strsql, Conn) Conn.Open() Reader = Command.ExecuteReader If Reader.HasRows = False Then flag = 0 Else flag = 1 End If Reader.Close() Conn.Close() End Sub Protected Sub btnHome_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnhome.Click Response.Redirect("Home.aspx") End Sub Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles save.Click Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim Dim SNO As Integer EMPNO As Integer = Label2.Text CONTACT As String = CType(TextBox3.Text, String) COUNTRY As String = CType(TextBox2.Text, String) FROM_DATE As String = CType(TextBox4.Text, String) TO_DATE As String = CType(TextBox5.Text, String) PURPOSE As String = CType(TextBox6.Text, String) REL As String = CType(TextBox6.Text, String) rctDate As String = RctDt.ToString("dd-MMM-yyyy") mnth As Integer = MembDt.ToString("MM") year As Integer = MembDt.ToString("yyyy")

Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.ConnectionStrings(" ConnectionString").ToString) Dim strsql As String Dim strsql1 As String Dim strsql2 As String Dim dr As OleDbDataReader Dim cmd1 As OleDbCommand = New OleDbCommand Dim cmd2 As OleDbCommand = New OleDbCommand Dim cmd3 As OleDbCommand = New OleDbCommand myConn.Open() Try strsql = "INSERT INTO TRAVEL(EMPNO,COUNTRY,ADDRESS,FROM_DATE,TO_DATE,PURPOSE,SNO,PLANVISIT,COUNTRY2 ,TRV_OPTION,SRC_NAME)VALUES(" + EMPNO.ToString + ",'" + COUNTRY + "','" + CONTACT + "','" + FROM_DATE + "','" + TO_DATE + "','" + PURPOSE + "',"

strsql1 = "SELECT NVL(MAX(SNO),0) FROM TRAVEL WHERE EMPNO=" + EMPNO.ToString cmd2.CommandText = strsql1 cmd2.Connection = myConn dr = cmd2.ExecuteReader() If dr.HasRows Then dr.Read() SNO = dr.GetValue(0) + 1 Label1.Text = SNO End If strsql += "'" + Label1.Text.ToString + "'" strsql += "," If RadioButton2.Checked Then strsql += "'yes'" strsql += "," strsql += "'" + TextBox7.Text + "'" strsql += "," End If If RadioButton1.Checked Then strsql += "'no'" strsql += "," strsql += "'Null'" strsql += "," End If If RadioButton3.Checked Then strsql += "'self'" Else strsql += " " End If If RadioButton4.Checked Then strsql += "'through ltc'" Else strsql += " " End If If RadioButton5.Checked Then strsql += "'sponsered'" strsql += "," strsql += "'" + TextBox8.Text + "'" Else strsql += "," strsql += "'null'" End If strsql = strsql + ")" cmd1 = New OleDbCommand(strsql, myConn) cmd1.CommandText = strsql cmd1.Connection = myConn Dim res As Integer = cmd1.ExecuteNonQuery()

If res <= 0 Then lblError.Text = "Record can't be added." Else Flag1 = 1 lblError.Text = "Record Inserted" ClearAll() End If Catch ex As Exception lblError.Text = "Error in insertion" Finally myConn.Close() End Try End Sub Private Sub ClearAll() TextBox1.Text = " " TextBox2.Text = " " TextBox3.Text = " " TextBox4.Text = " " TextBox5.Text = " " TextBox6.Text = " " TextBox7.Text = " " TextBox8.Text = " " End Sub Protected Sub RadioButton2_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged TextBox7.Visible = True End Sub Protected Sub RadioButton1_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged TextBox7.Visible = False End Sub Protected Sub RadioButton3_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged TextBox8.Visible = False End Sub Protected Sub RadioButton4_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton4.CheckedChanged TextBox8.Visible = False End Sub Protected Sub RadioButton5_CheckedChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton5.CheckedChanged TextBox8.Visible = True End Sub End Class

TRAVEL STATUS FORM

CODING
Imports System.Data.OleDb

Partial Class STATUS Inherits System.Web.UI.Page Protected Sub GridView2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles GridView2.SelectedIndexChanged Dim EMPNO As Integer EMPNO = GridView2.SelectedRow.Cells(1).Text Dim myConn As OleDbConnection = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("Connec tionString")) Dim strsql As String Dim strsql1 As String Dim dr As OleDbDataReader Try strsql = "select * from TRAVEL WHERE EMPNO = " & EMPNO & "" Dim cmd1 As OleDbCommand = New OleDbCommand myConn.Open() cmd1.CommandText = strsql cmd1.Connection = myConn dr = cmd1.ExecuteReader() If dr.HasRows Then dr.Read() strsql1 = " UPDATE TRAVEL SET REC_DATE=SYSDATE WHERE EMPNO = " & EMPNO & " " cmd1.CommandText = strsql1 cmd1.Connection = myConn dr.Close() Dim res As Integer = cmd1.ExecuteNonQuery() If res <= 0 Then Label1.Text = "Record can't be added." Else Label1.Text = "Record Inserted" End If End If Catch ex As Exception Label1.Text = "Error in UPDATING" Finally myConn.Close() End Try End Sub End Class

REPORT: PDF Generated through Report:

CODING
Imports System.Data.OleDb Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared Imports System.IO Partial Class REPORT Inherits System.Web.UI.Page Dim myConn As OleDbConnection Dim cmd As New OleDbCommand Dim strsql, flag, dbusername, dbpass, dbserver As String Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load myConn = New OleDbConnection(System.Configuration.ConfigurationManager.AppSettings("Connec tionString")) dbusername = System.Configuration.ConfigurationManager.AppSettings("userID").ToString dbpass = System.Configuration.ConfigurationManager.AppSettings("password").ToString dbserver = System.Configuration.ConfigurationManager.AppSettings("server").ToString If IsPostBack = False Then If Session("UserID") = "" Then Response.Redirect("./Default.aspx") End If End If End Sub

Function PrintReport(ByVal tFileName As String) As Boolean Dim Dim Dim Dim Dim Dim pemp_no As String = Session("EMPNO") MyTable As Table MyLogin As New TableLogOnInfo crReportDocument As ReportDocument Fname As String CrFormatTypeOptions As New PdfRtfWordFormatOptions()

crReportDocument = New ReportDocument Fname = " " crReportDocument.Load(MapPath("") + "\" + tFileName + ".rpt") crReportDocument.SetParameterValue("EMPNO", pemp_no) For Each MyTable In crReportDocument.Database.Tables MyLogin = MyTable.LogOnInfo MyLogin.ConnectionInfo.UserID = dbusername MyLogin.ConnectionInfo.Password = dbpass MyLogin.ConnectionInfo.ServerName = dbserver MyTable.ApplyLogOnInfo(MyLogin) Next Dim s As System.IO.MemoryStream = crReportDocument.ExportToStream(ExportFormatType.PortableDocFormat) With HttpContext.Current.Response .ClearContent() .ClearHeaders() .ContentType = "application/pdf" .AddHeader("Content-Disposition", "inline; filename=Print.pdf")

.BinaryWrite(s.ToArray) .End() End With Return True End Function

Protected Sub GenerateReport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles GenerateReport.Click Session("EMPNO") = Session("UserID") PrintReport("TRAVEL41") End Sub End Class

Report: Requisition for car

Part-2

VALIDATION AND TESTING


VALIDATION Data given as an input to the system has to be validated so that correct information is stored in the database. The users may commit errors while filling the fields with data. Thus data value entered has to be checked for the correctness as soon as it is entered into the system.

CHECKS AND CONTROLS System Security refers to various validations on data in form of checks and controls to avoid the system from failing. It is always important to ensure that only valid data is entered and only valid operations are performed on the system. The various checks and controls allow system to work in extreme conditions. The system employs two types of checks and controls:

CLIENT SIDE VALIDATION Various client side validations are used to ensure on the client side that only valid data is entered. Client side validation saves server time and load to handle invalid data. Some checks imposed are: A program, in which it is required to fill up date in the date fields, validates any date entered so that meaningless dates are not entered. Checks ensure that numeric fields are filled with numeric data only. Maximum lengths of the fields of the forms are appropriately defined. Forms cannot be submitted without filling up the mandatory data so that manual mistakes of submitting empty fields that are mandatory can be sorted out at the client side to save the server time and load. Appropriate messages are displayed to the user if any mandatory field is left empty.

SERVER SIDE VALIDATIONS Some checks cant be applied at the client side. Server side checks are necessary to save the system from failing and intimating the user that same invalid operations have been performed or the performed operation is restricted. Some of the server side checks imposed are: Server side constraints have been imposed to check the validity of Primary key and Foreign Key. A primary key value cannot be duplicated. Any attempt to duplicate the primary key results into a message intimating the user about that. Values through the forms using Foreign Key can be updated only for the existing foreign key values. User is intimated through appropriate messages about the successful operations or exceptions occurring at server side. Access permissions to various types of users are controlled according to the organizational structure. Only permitted users can log on to the system and can have access according to their category. User name, Passwords and Permissions are controlled on the server side. This way unauthorized users cannot intrude into the system. Using server side validation, constraints on several restricted operations are imposed.

TESTING
Executing a program with the intent of finding errors is called testing. Testing is vital to the success of any system. Testing is done at different stages within the development phase. System testing makes a logical assumption that if all parts of the system arte correct, the goals will be achieved successfully. Inadequate testing or no testing at all leads to errors that may come up after a long time when correction would be extremely implementation. The testing of the system was done on both artificial and live data. In order to test data test cases are developed. Following are the various methods that are employed for testing:

UNIT TESTING
In unit testing the module is tested independently. It is done to test that the module does satisfy the functional specification. This is done to check syntax and logical errors in programs. At the time of preparation of technical specifications, unit test data was also prepared. The coding for that program was considered after verifying its output against this test data. Following are the unit testing methods: In Conditional Testing, the logical conditions that are given in the module were checked to see whether they satisfy the functionality of the module. This is done by using the test data was prepared. In Loop Testing, different loops in the module like nested loops were tested using the data. Attempts to execute the loops to their maximum range are done.

INTEGRATION TESTING In Integration testing whole system was checked when all the individual modules were integrated together in order to test whether the system is performing as according to the requirements specified. Interface errors if any were corrected. Test data was prepared was fed into the system to check whether the system fails to detects an error.

FUNCTIONAL TESTING This is done for each module/sub module of the system. Functional testing serve as a means of validating whether the functionality of the system confers the original user requirement i.e. does the module do what it was supposed to do? Separate schedules were made for functional testing. It involves preparation of test data, writing of test cases, testing for conformance to test cases and preparation of bugs listing for non-conformities.

SYSTEM TESTING System testing is done when the entire system has been fully integrated. The purpose of the system testing is to test how the different modules interact with each other and whether the entire system provides the functionality that was expected. System testing consists of the following steps: Program Testing System Testing System Documentation User Acceptance Testing

Testing

Test Cases
Expected Output Yes Actual Output Yes

No.

Description To check authentication of user name and password. To check on every page whether grid is getting values or not. To check whether Home button is working on every page. To check whether menu is enabled/disabled according the job wise role. To check edit/insert/cancel/ update button on every grid. To check the connectivity with the database.

1.

2.

Yes

Yes

3.

Yes

Yes

4.

Yes

Yes

5. 6.

Yes Yes

Yes Yes

7.

To check whether validations are working on the web controls. To check whether the application is running properly at remote side. To check whether report can be successfully generated at remote side To check whether the session variables are correctly assigned. To check whether menu is enabled/disabled according to level of user.

Yes

Yes

8.

Yes

Yes

9.

No

No

10.

Yes

Yes

11.

Yes

Yes

SYSTEM SECURITY

SYSTEM SECURITY

USER ACCESS CONTROL


Security comprises user authentication, implying user identification (against defined users) and user authorization indicating actions and permissions within the application. The application will incorporate security for all the modules in a hierarchal form. These levels are required to be identified by the application owners. The users will be classified in groups and each group will be provided access to identify screens and reports. This access will be across different modules. The group authorization right will also define whether they are permitted to view the information only or can modify it as well.

USER AUTHENTICATION
Every registered user will have a login ID and password. The system administrator, using the functionality provided by login control module, will create new login Ids and maintain existing Ids using the user registration screen. Whenever a new user is registered, a new login ID and password will be created. Users can change their own passwords. The passwords will not be displayed on the screen while they are being entered into the application.

USER AUTHORIZATION
For data entry and modification, permissions will be defined for the entry screens. Administrator and Users both will be having different screens and different access rights. Administrator would be able to manage different operations and functions whereas a registered user would be able to access all the features available on the website.

USER SESSION MANAGEMENT


The USERNAME of the user will be displayed on the next page, and any item needed on the different page will also be maintained using Session management. Browser Session will expire and terminate user session after a certain period of inactivity. The following data will be maintained throughout an active session.

EXCEPTION HANDLING
Validations will be enforced at him UI as well as the business layer of application. If errors occur, appropriate messages will be displayed to the user for taking necessary action. These errors will be handled by the application using Visual Studio Exception Handling.

RESULTS AND CONCLUSION

Conclusions Summary
The designed projects menu driven interface is well designed by keeping the usage profile of the users in mind and therefore takes minimum amount of time to do the work with least possible errors. The project is still in the phase of designing. Currently functionality has been completed as per the requirements and is still in the phase of updating. New requirements keep coming in and get added to the functionality of the application. It has the added feature of validations which restrains the users from inserting invalid data. The database has been designed to maintain the consistency and integrity of the data. It prevents unauthorized access of the system. Thus, it overcomes the limitations of the previous system Employee Claim Reimbursement System is user friendly. Various validations checks are provided whenever invalid data entry is made. Error messages are displayed on the screen for incorrect entries. Proper codification has been done. Password facility is provided for security at various levels. It provides efficient and quicker service to all users. It provides easy access to the database. It provides flexibility to accommodate future needs. It eliminates duplication of works and provides a convenient and an effective information system.

APPENDIX

INRODUCTION TO ASP.NET with VB


ASP.NET: ASP.NET is a core piece of the .NET Framework, Microsofts new platform for application development, and is the successor to the highly popular Active server pages technology. ASP.NET is a complete and extensible Web application development framework that introduces a new programming model for creating rich, dynamic Web sites, Web applications, and XML Web services. This new programming model distinguishes itself from its predecessors by its component-based architecture and development paradigm. ASP.NET inherits its programming model from the .NET Framework. This new application development platform brings together the best object-oriented features from languages such as C++ and Java, along with the ease and simplicity of development associated with languages such as Microsoft Visual Basic.

Features of ASP.NET o The ASP.NET object model has changed significantly from ASP, making it more structured and object-oriented. But ASP.NET is not fully backward compatible; almost all existing ASP pages will have to be modified to some extent in order to run under ASP.NET o Accessing databases from ASP.Net applications is an often-used technique for displaying data to web site visitors. ASP.NET makes it easier than ever to access databases for this purpose. It also allow you to manage the database from your code.ASP.NET provide a simple model that enables web developers to write logic that runs at the application level. o ASP.NET provides easy-to-use application and session-state facilities that are familiar to ASP developers and are readily compatible with all other .NET framework APIs. o The .NET framework and ASP.NET provide default authorization and authentication schemes for web applications.

o ASP.NET configuration setting are stored in XML-based files, which are human readable and writable. Each of the applications can have a distinct configuration file and the configuration scheme can be extended to suit the developers requirements.

VB.net (USER INTERFACE)


Visual Basic.NET is the most recent generation of Visual Basic. This is an object-oriented computer language that can be viewed as an evolution of Microsoft's Visual Basic (VB) implemented on the Microsoft .NET framework. This has new features include inheritance, method overloading, structured exception handling, and more. These capabilities make it easier than ever to create .NET applications, including Windows applications, web services, and web applications. Visual Basic 2003 helps you create solutions that run on the Microsoft Windows operating system. The Microsoft .NET Framework is a software component that can be added to or is included with Microsoft Windows operating system. It provides a large body of pre-coded solutions to common program requirements, and manages the execution of programs written specifically for the framework. The .NET Framework is a key Microsoft offering, and is intended to be used by most new applications created for the Windows platform. The pre-coded solutions that form the framework's Base Class Library (BCL) cover a large range of programming needs in areas including: user interface, data access, database connectivity, cryptography, web application development, numeric algorithms, and network communications. The functions of the class library are used by programmers who combine them with their own code to produce applications. With version 3.5 of the .NET Framework, the libraries will be released under shared-source Microsoft Reference License license.[1] Programs written for the .NET Framework execute in a software environment that manages the program's runtime requirements. This runtime environment, which is also a part of the .NET Framework, is known as the Common Language Runtime (CLR). The CLR provides the appearance of an application virtual machine, so that programmers need not consider the capabilities of the specific CPU that will execute the program. The CLR also provides other important services such as security mechanisms, memory management, and exception handling. The class library and the CLR together compose the .NET Framework. The framework is

intended to make it easier to develop computer applications and to reduce the vulnerability of applications and computers to security threats. It is included with Windows Server 2003 and Windows Vista, and can be installed on older versions of Windows

ORACLE 10g RDBMS is an acronym for Relation Database Management System. The most famous RDBMS packages are Oracle, Sybase and Informix. Every business enterprise object maintains large volume of data for its operations. With more and more people accessing data for their work, the need to maintain its integrity and relevance increases. Oracle 10g is an object relational database management system (ORDBMS). It offers capabilities to been relational object oriented database systems. In general objects can be defined as reusable software codes which are location independent and perform a specific task on any application environments with little or no change to the code. Oracle products are based on a concept known as the Client/Server Technology. This concepts involves segregating processing of an application between two systems one perform all activities related to the database (Server) and the other perform activities that help the user to interact with the application (Client). A client or front-end database application also interacts with the database by requesting and receiving information from the database server. It acts as the interface between the user and database. Further it also checks for validation against the data entered by the user. The database server or the backend is used to manage the database optimally among multiple clients who concurrently request the server for the same data. It also enforces data integrity across all client applications and controls database access and security.

References
Books o ASP.NET by SAMS o ASP.NET : The Complete Reference by Matthew MacDonald Published by Tata McGraw-Hill, Edition 2002, 12th reprint2005 Documents o Quality Document on Web- Based Project Guidelines. o Quality Document on GUI guidelines. Websites o www.Dotnetheaven.com o www.Devcity.com o www.Startvbdotnet.com o www.codeproject.com o www.wikipedia.com MSDN Library for Visual Studio 2005

Вам также может понравиться