Download - Documentation
A
Project report
On
For
B-2, Shri Gajanan CHS Lt.Dilip Gupte Marg,Mahim (w)-400 016.
SUBMITTED BYMr.HARDIK A. MALI
Mr.PARESH K. MENGADE
SEAT NO:-DATE:-
SUBMITTED IN PARTIAL FULFILLMENT OFBACHELOR OF SCIENCE (INFORMATION TECHNOLOGY)
UNDER THE GUIDANCE OF MANESH KHOT AND KAUSTUBH AREKAR
[UNIVERSITY OF MUMBAI]GOKHALE EDUCATION SOCIETY’S
N.B.Mehta (Valwada) Science College, Bordi,ACHARYA BHISE VIDYANAGAR, BORDI 401701,
TAL- DAHANU, DIST- THANE PH-02528-254357Academic year-2007-2008
GOKHALE EDUCATION SOCIETY’SN.B.Mehta (Valwada) Science College, Bordi,
ACHARYA BHISE VIDYANAGAR, BORDI 401701,
ACADEMIC YEAR 2007-2008
CERTIFICATE
This is to certify that the project entitled “HEALTH PATH
LAB”. Undertaken at the “HEALTH SEVA” by Mr.PARESH
K.MENGADE Seat no. in partial fulfillment of
BACHELOR OF SCIENCE (I.T) SEMESTER(VI) Examination had
not been submitted for any other examination and does not form part
of any other course undergone by the candidate.
It is further certified that he has completed all required phases of the project.
Signature of Internal Guide SignatureHod/In-charge/Coordinator
College seal
Index
Sr.no Content Page no.
1 Objective and scope of the project
2 Flowchart
3 Theoretical background
4 Gantt chart
5 Class diagram, sequence diagram, use case
6 Data entry form and screen design
7 Process involved
8 Methodology adopted, system implementation and details of hardware and s/w used
9 System maintenance and Evaluation
10 Crystal report
11 Coding
12 Organizational overview
13 Data dictionary
14 Bibliography
15 Acknowledgement
Introduction
Our project HEALTH PATH LAB is specially designed for the
automation of the entire process of pathology department. When ever the
word pathology comes to picture one thing that strikes the mind is that it will
be totally related in taking the blood samples and putting the results into the
entry form and store the value in a database. As we know today at least one
person in a family knows how to operate the personal computer and how to
use the internet, and also today internet has brought the world closer. That’s
why we have choosed the web based application in a .NET platform, now you
would be thinking that if we want to develop a web based application then
why there is need to develop a application in a .NETplatform, we can also do
it by using a simple HTML and ASP platform. The reason behind using .net
platform is simple if u want to survive in this competitive world then you have
to be with the technology otherwise you could be thrown out the market. Now
not wasting any time on any thing else,Let’s tell u something in short about
the project….
It will be taking in account all the information
of patient, which can not be accessed by any person accept the one who has
been given right’s whatsoever. As the system is WEB based, any patient can
log in or fill in his entry form even on the INTERNET.
Objective and Scope of the project
Main objective of the project is to overcome the human errors.
It will provide high level of security.
Details of all the data which is entered will not be removed or
deleted from the database we can only edit the details.
To provide quick service to the patient.
HealthSevaTurnkey Solutions MethodologyProposal &
Contract Signing
Project Initiation /Planning
DevelopmenttestingImplementation
Revise Software
Database Design / Architecture Design
User Acceptance Testing (UAT)
Change management
Feasibility
Request For Proposal
Database Design / Architecture Design
User Acceptance Testing (UAT)
HealthSeva
Product Development Methodology
Identification Phase
Brainstorm Phase
Market Survey Phase
Planning Phase
Development Phase
Beta Testing or Installation of Software
Feedback
Revise Software
Product
Enhancement Decisions
Product Support and Maintenance Methodology
ASP.NET
Visual Basic developers have long enjoyed the ease of programming with forms
and controls. Writing a VB form-based application is as simple as dragging some
controls onto a form and writing some event-handling functions. This is one of the
reasons VB has attracted lots of programmers interested in speed of development.
Microsoft wisely built this feature into ASP.NET.ASP.NET simplifies web page
development with form-based programming. In ASP.NET, these forms are called
Web Forms and are analogous to VB forms, replacing ASP pages. Similar to VB,
Web Forms programming is also event based. We don't have to write in-line ASP
scripts and rely on the top-down parsing interpretation as in ASP programming. To
match the rich set of ActiveX controls that VB programmers love in their toolset,
ASP.NET equips ASP programmers with server controls. To further enhance the
productivity of developers, ASP. Net’s Web Forms also allow for the separation of
the application logic and the presentation layer.
ASP.NET evolves from the ASP programming model with the following
additional benefits:
Clean separation between the application logic (server-side code) and
the presentation layer (HTML markup)—no more spaghetti code
A rich set of server controls that automatically render HTML suitable
for any clients and that additionally manage their states
Enhanced session-state management
An event-based programming model on the server side, which is
simpler and more intuitive than an older script-based model like ASP
Application logic that can be written in any Microsoft .NET language
(VB, C#, Managed C++, etc.); application server-side code is compiled
for better performance
Visual Studio .NET as a RAD tool, which simplifies the development
process of Web Forms
Before getting into developing your application in ASP.NET, it's important
that you become familiar with the underlying structure of ASP.NET. This
section describes some of the most important classes packaged in the
System.Web.UI namespace in the ASP.NET framework.
The System.Web.UI namespace defines classes and interfaces used in
constructing and rendering elements on a Web Form. The most important class
in the System.Web.UI is the Control class, which defines properties, methods,
and events that are common in all server controls in the Web Forms framework.
Another important class in this namespace is Page, which is a derivative of the
Control class. All ASP.NET web pages are instances of derivatives of the Page
class. To have an extensible framework, the System.Web.UI namespace also
includes the User Control class, which is similar to the Page class except that it
is used as the base class for user controls.
Control Class
The Control class is the root of all controls. For example, a text box is a
control; a button or a combo box is also a control. The Control class basically
encapsulates common functionalities and properties of all user-interface
widgets. As you get deeper into ASP.NET development, everything you see is
a Control derivative of some sort.
Control's properties
The Control class has the following important properties: Controls, ID,
ClientID, Parent, EnableViewState, Visible, Context, and View State. We will
go over each of these properties briefly to show you what the Control class is
made up of and how deriving from Control class would create a model
that is consistent and easy to work with.
The Controls property represents the children of the control instance;
the Parent property defines the parent of the control. These properties enable a
hierarchy of controls on a web page. The ID property allows the control to be
accessed programmatically by just using the ID and the dot notation to get to
the object's properties and methods (i.e., MyObjectId.propertyname). While
the ID property allows us to program the control on the server side, ClientID
allows us to setup client-side script to access the control on the client side.
The EnableViewState flag indicates whether the control will maintain
its view state, as well as all view states of its child controls. If this flag is set to
true, the control will remember its previous view state when the page posts
back to itself. For example, if EnableViewState is set to true, the user's
previous selection or form-field data are preserved automatically when the
user performs some operation that requires a post back. When the page is sent
back to the browser, the user can just continue filling in the form as if he
never left it. This is how all derivatives of the Control class maintain their
states between requests and free ASP developers from having to simulate
view-state behavior with hidden form fields.
Crystal report …
In simplest terms, Crystal Reports is a report design tool that
allows you to create reports capable of retrieving and formatting a result set
from a database or other data source. In addition to simply reading data from a
data source, Crystal Reports has its own formula language for creating
calculations and includes a number of features that can be used to turn raw
data into presentation-quality reports, with graphs, charts, running totals, and
so on. You can create reports that range from a simple list with only a few
columns to a complex management report that shows multiple graphs, tables,
and Key Performance Indicators (KPIs). The flexibility of the report designer
means that it can be used for many different types of output, depending on
your needs. In addition to a powerful toolset for creating reports, Crystal
Reports also features a number of Application Programming Interfaces (APIs)
and tools specifically created for developers to allow them to integrate these
reports into their own applications. To help understand these features and how
they are used, we are going to have a brief look at the history of the products
leading up to this release of Crystal Reports .NET
Adding Database Objects to Your Report
The term database objects is used to describe the various forms of data
that can be added to a report. Specifically, Crystal Reports can use the
following types of database objects as data sources for a report:
Tables or system tables
Views
Synonyms
Stored procedures
SQL commands
Database objects are listed underneath connections in the Database
Expert and are grouped by object type.
Tip
You can control the objects that are displayed in the Database Expert by
setting selection, description, and filtering options accessed from either the
Database tab of the Options dialog under the File menu or the Options menu
option of the database's right-click context menu. This can be particularly
useful when you are reporting off databases with hundreds of tables.
The following sections describe the most common database object types in
further detail.
1. Reporting on Tables
Tables are the most basic form of a data structure. Simply put, a table is
a set of fields bound together to represent something in the real world. A
Customer table might contain fields that describe all the customers of a given
business. An Employee table might store information about a corporation's
employees such as name, title, or salary.
To add a table to a report, select the table in the Database Expert and
click the arrow (>) button. The table is added to the Selected Tables list on the
right side of the dialog below its corresponding connection. Most database
administrators give the tables meaningful names; however, sometimes tables
can have quite archaic names, such as RM564_321. A name like this isn't very
descriptive, so it would be useful to rename this table to something more
meaningful. To rename a table, select it in the Selected Tables list and
press the F2 button (F2 is a standard convention for renaming things in
Windows). In Crystal Reports, renaming a table is referred to as aliasing a
table.
2. Reporting on Views
A view is a query stored by the database that returns a set of records
that resemble a table. Views often perform complex query logic, and good
database administrators create them to simplify the job of people (like report
developers) extracting data out of the database. For example, the Top
Customers view in the Xtreme Sample Database returns all customers who
have sales of more than $50,000. From a report developer's perspective, views
act just like tables and can be added to the report in the same way.
3. Reporting on Stored Procedures
Stored procedures, in the context of Crystal Reports, are similar
to views in that they are predefined queries in the database that
return a set of records. The major difference is that a stored
procedure can be parameterized. This means that rather than
having a preset query that returns the same data every time it is
run, stored procedures return different data based on the values of
parameters passed in.Adding a stored procedure to a report works
much the same way as tables and views. However, if the stored
procedure has a parameter, a dialog appears when you attempt to
add the stored procedure to the report. After you complete this
and click the OK button, focus returns to the Database Expert
and the stored procedure is shown in the list of selected tables. At
this time, a parameter is created in the report that corresponds to
the stored procedure parameter, and any values that parameter is
given are passed to the underlying stored procedure.
AJAX...
Today we have tool, to create truly rich browser-based applications. Today we
have Ajax. AJAX stands for Asynchronous JavaScript and XML.Using its
techniques you can make your web applications more responsive and interactive.
Ajax is more of a technique than it is a specific technology, though the
aforementioned JavaScript is a primary component. We know you’re saying,
JavaScript is not worth it,” but with the resurgent interest in the language because of
Ajax, application and testing frameworks, combined with better tool support, are
easing the burden on developers. With the introduction of Atlas, Microsoft is
throwing its weight firmly behind Ajax, while the infamous Rails Web framework
comes rebuilt with outstanding Ajax support. In the Java space, Sun has added
several Ajax components to its Blueprints Solutions Catalog. Honestly, Ajax isn’t
anything new. In fact, the “newest” technology related to the term—the
XMLHttpRequest object (XHR)—has been around since Internet Explorer 5
(released in the spring of 1999) as an Active X control. What is new, however, is the
level of browser support. Originally, the XHR object as supported in only Internet
Explorer (thus limiting its use), but starting with Mozilla 1.0 and Safari 1.2 support
is widespread. The little-used object and the basic concepts are even covered in a
W3C standard: the DOM Level 3 Load and Save specification. At this point,
especially as applications such as Goggle Maps, Goggle Suggest, Gmail, Flicker,
Netflix, and A9 proliferate, XHR is becoming a de facto standard. Unlike many of
the approaches mentioned in the previous pages, Ajax works in most modern
browsers and doesn’t require any proprietary software or hardware. In fact, one often
real strengths of this approach is that developers don’t need to learn some new
language or scrap their existing investment in server-side technology. Ajax is a
client-side approach and can interact with J2EE, .NET, PHP, Ruby, and CGI scripts
—it really is server agnostic.
Short of a few minor security restrictions, you can start using Ajax right now,
leveraging what you already know.
What actually AJAX is…..?
The core idea behind AJAX is to make the communication with the
server asynchronous, so that data is transferred and processed in the
background. As a result the user can continue working on the other parts of
the page without interruption. In an AJAX-enabled application only the
relevant page elements are updated, only when this is necessary.
In contrast, the traditional synchronous (post back-based) communication
would require a full page reload each time data has to be transferred to/from
the server. This leads to the following negative effects:
Poor Interactivity - the user interaction with the application is
interrupted every time a server call is needed, since a post back has to
be made.
Ineffectiveness - with the full page rendered and transferred to the
client after each post back, the process is time consuming and traffic
intensive.
Low Usability - the requirement for full page post back whenever the
user interface has to be changed imposes hefty limitations on the degree
of sophistication of web user interfaces. Before AJAX rich and smooth
interfaces with on-demand updates could only be implemented using
Flash technology.
AJAX-enabled applications, on the other hand, rely on a new
asynchronous method of client-server communication. It is implemented as a
JavaScript engine that is loaded on the client during the initial page load.
From there on, this engine serves as a mediator that sends only relevant XML-
formatted data to the server and subsequently processes the server response to
update the relevant page elements.
Below is a diagram of the complete lifecycle of an AJAX-enabled web form.
Structured Query Language (SQL)
The first questions to ask are what is SQL and how do you use it with
databases? SQL has three main roles:
❑ Creating a database and defining its structure
❑ Querying the database to obtain the data necessary to answer questions
❑ Controlling database security
Defining database structure includes creating new database tables and
fields, setting up rules for dataentry, and so on, which is expressed by a SQL
sublanguage called Data Control Language (DCL),covered later in this
chapter. The next section discusses querying the database.Finally, DCL deals
with database security. Generally, database security is something that
databaseadministrators handle.Creating SQL every time you want to change
the database structure or security sounds like hard work,and it is! Most
modern database systems allow you to execute changes via a user-friendly
interfacewithout a single line of SQL.
Introducing SQL Queries
SQL queries are the most common use of SQL. A SQL sublanguage
called Data Manipulation Language(DML) deals with queries and data
manipulation. SQL allows you to pose a query (basically a question)
to the database, and the database then provides the data that answers your
query. For example, with adatabase that stores details of salespersons, car
sales, type of cars sold, and so on, you might want toknow how many cars
each salesperson sold in each month and how much money they made the
company.You could write a SQL query that asks this question and the
database goes away and gets the datathat answers it. A SQL query consists of
various statements, clauses, and conditions. A statement is an
instruction or a command. For example, “Get me some data” is a statement. A
clause specifies limits to astatement, the limits being specified using
conditions. For example, instead of “Get some data,” youmight say, “Get data
only for the sales that were in the month of May,” where “only for” is the
clausethat specifies which data to retrieve. The condition is “were in the
month of May.”
If the data doesn’tmeet the condition’s criteria, in this case, “month of May,”
then you don’t want it. Written as actual SQLcode, this could be something
like the following:
SELECT CarModel
FROM CarSales
WHERE CarSoldDate BETWEEN ‘May 1 2005’ AND ‘May 31 2005’;
The SELECT statement tells the database system that you want to select some
data from the database.You then list the data you want, in this case CarModel
data, which is a field name. You then specify theplace the data needs to be
taken from, in this case a table called CarSales. Finally, you have a
condition.The statement above specifies that you want only the data where
certain conditions are true. In this case,the condition is that the CarSoldDate is
between the first and thirty-first of May 2005.
Comparing SQL to Other Programming Languages
Now that you know what SQL can be used for, you can compare it to
other programming languages. Tobe honest, SQL is quite different from the
procedural languages such as C++, Visual Basic, Pascal, andother third-
generation programming languages, which allow the programmer to write
step-by-stepinstructions telling the computer exactly what to do to achieve a
specified goal. Taking the car salesexample, your goal might be to select all
the information about sales made in July from the New York car
showroom. Very roughly, your procedural language might be along the lines
of the following:
1. Load the sales data into the computer’s memory.
2. Extract the individual items of data from the sales data.
3. Check to see if each item of data is from the month of July and from the
New York showroom.
4. If it is, then make a note of the data.
5. Go to the next item of data and keep going until all items have been
checked.
6. Loop through the data results and display each one.SQL, however, is a
declarative language, which means that instead of telling it what to do to get
theresults you want, you simply tell it what you want, and it figures out what
to do and comes back withthe results. In the car sales example, if you were
using SQL, you’d specify the results you want, something
like this:
SELECT all the data from the sales table WHERE the sales were in July and
made at the New York showroom.
The SQL language is actually fairly easy to read. The actual SQL could look
like this:
SELECT * FROM SalesMade WHERE SaleDate = “July 2005” AND
SalesOffice = “New York”
The asterisk simply means return the data from all the fields in the record.
Understanding SQL Standards
As with databases, IBM did a lot of the original SQL work. However, a lot of
other vendors took theIBM standard and developed their own versions of it.
Having so many differing dialects causes quite a headache for the developer,
and in 1986 it was adopted by the standards body the American National
Standards Institute (ANSI) and in 1987 by the International Standards
Organization (ISO), who created a standard for SQL. Although this has helped
minimize differences between the various SQL dialects,
there are still differences between them.
DECEMBER JANUARY FEBRUARY MARCH
PLANNING
ANALYSIS
DESIGN
TESTING AND IMPLEMENTATION
MAINTAINANCE
PLANNED
REQUIRED
Gantt chart
Process Involved
Methodology adopted, system implementation and details of hardware and software used
System implementation: - under developed
Details of Software used
Microsoft Visual Studio 2005
Microsoft Windows Server 2003
Microsoft SQL Server 2000 Enterprise
Manager
Microsoft.Net Framework sdk 2.0
Microsoft ASP.NET 2.0 Ajax extension
Details of Hardware used
Minimum 1GB RAM
80 GB HARDDISK
Barcode Scanner
Barcode Printer
System maintenance and evaluation
Under developed
Cost and Benefit Analysis
Test parameter
Imports System.DataImports System.Data.SqlClient
Partial Public Class Test_Parameters Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then vendor_id.ConnectionString = connection.global_connection vendor.DataBind() vendor.Items.Insert(0, New ListItem("SELECT PATHOLOGY NAME", ""))
test_group_id.ConnectionString = connection.global_connection test_group.DataBind() test_group.Items.Insert(0, New ListItem("SELECT TEST GROUP", ""))
End If
End Sub
Protected Sub test_group_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles test_group.SelectedIndexChanged
frm_list.Visible = True Button1.Visible = True Cancel.Visible = True
frmsrc.ConnectionString = connection.global_connection frmsrc.SelectCommand = " SELECT TOP 100 PERCENT test_name_id, test_name FROM TEST_NAME WHERE test_group_id = " & test_group.SelectedValue & " AND ((test_name_id NOT IN (SELECT test_name_id FROM TEST_PARAMETERS GROUP BY test_name_id))) GROUP BY test_name_id, test_name ORDER BY test_name_id "
frm_list.DataBind()
End Sub
Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand Dim I As Long
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try For I = 0 To frm_list.Items.Count - 1
Dim test_reference_value As TextBox test_reference_value = frm_list.Items(I).FindControl("test_reference_value")
Dim test_reference_parameter As TextBox test_reference_parameter = frm_list.Items(I).FindControl("test_reference_parameter")
Dim test_net_price As TextBox test_net_price = frm_list.Items(I).FindControl("test_net_price")
Dim test_name_id As HiddenField test_name_id = frm_list.Items(I).FindControl("test_name_id")
oCommand.CommandText = " INSERT INTO TEST_PARAMETERS( test_name_id, vendor_id, test_reference_value, test_reference_parameter, test_net_price ) Values (" & test_name_id.Value & ", " & vendor.SelectedValue & ", '" & Trim(test_reference_value.Text) & "' ,'" & Trim(test_reference_parameter.Text) & "','" & Trim(test_net_price.Text) &
"') " oCommand.ExecuteNonQuery()
Next
tran.Commit() tran.Dispose()
frm_list.Visible = False Button1.Visible = False Cancel.Visible = False
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
End SubEnd Class
Add materialImports System.DataImports System.Data.SqlClient
Partial Public Class Add_Material Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
material_make_id.ConnectionString = connection.global_connection material_make.DataBind() material_make.Items.Insert(0, New ListItem("SELECT MATERIAL MAKE", ""))
End If
End Sub
Protected Sub material_make_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles material_make.SelectedIndexChanged
tr_cat_no.Visible = True tr_moq.Visible = True tr_material.Visible = True tr_short.Visible = True tr_content.Visible = True tr_specs.Visible = True tr1.Visible = True tr_submit.Visible = True
End Sub
Private Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
Submit.Enabled = False Submit.Text = "Please wait..."
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data '***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " INSERT INTO MATERIAL( material_make_id, material_cat_no, material_moq, material_name, material_short_code,material_content, material_specification ) Values ('" & material_make.SelectedValue & "','" & Trim(material_cat_no.Text) & "','" & Trim(material_moq.Text) & "','" & Trim(material.Text) & "', '" & Trim(short_code.Text) & "','" & Trim(content.Text) & "','" & Trim(specs.Text) & "') " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Material.aspx", True)
End Sub
End Class
Add material make
Imports System.DataImports System.Data.SqlClient
Partial Public Class Add_Material_Make Inherits System.Web.UI.Page
Private Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
Submit.Enabled = False Submit.Text = "Please wait..."
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data '***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " INSERT INTO MATERIAL_MAKE( material_make ) Values ('" & Trim(material_make.Text) & "') " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Material_Make.aspx", True)
End SubEnd Class
Add manifest test groupImports System.DataImports System.Data.SqlClient
Partial Public Class Add_Manifest_Test_Group Inherits System.Web.UI.Page
Protected Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click
Submit.Enabled = False Submit.Text = "Please wait..."
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data '***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try oCommand.CommandText = " INSERT INTO MANIFEST_TEST_GROUP( manifest_test_group_name ) Values ('" & Trim(test_group.Text) & "') " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Manifest_Test_Group.aspx", True)
End Sub
End Class
Add manifest test group item
Imports System.DataImports System.Data.SqlClient
Partial Public Class Add_Manifest_Test_Group_Items Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
manifest_test_group_id.ConnectionString = connection.global_connection manifest_test_group_id.SelectCommand = "SELECT TOP 100 PERCENT manifest_test_group_id, manifest_test_group_name FROM MANIFEST_TEST_GROUP GROUP BY manifest_test_group_id, manifest_test_group_name" manifest_test_group_name.DataBind() manifest_test_group_name.Items.Insert(0, New ListItem("SELECT MANIFEST TEST PROFILE NAME", ""))
End If
End Sub
Protected Sub manifest_test_group_name_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles manifest_test_group_name.SelectedIndexChanged
tr_group.Visible = True
group_id.ConnectionString = connection.global_connection group_id.SelectCommand = "SELECT TOP 100 PERCENT test_group_id, test_group_name FROM TEST_GROUP GROUP BY test_group_id, test_group_name ORDER BY test_group_id" group_name.DataBind() group_name.Items.Insert(0, New ListItem("SELECT TEST GROUP NAME", ""))
End Sub
Protected Sub group_name_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles group_name.SelectedIndexChanged
item.Visible = True tr1.Visible = True tr_submit.Visible = True
item_name_id.ConnectionString = connection.global_connection item_name_id.SelectCommand = " SELECT TEST_NAME.test_name_id, TEST_NAME.test_name FROM TEST_GROUP INNER JOIN TEST_NAME ON TEST_GROUP.test_group_id = TEST_NAME.test_group_id WHERE (TEST_GROUP.test_group_id = " & group_name.SelectedValue & ") AND (TEST_NAME.test_name_id NOT IN (SELECT MANIFEST_TEST_GROUP_ITEMS.test_name_id FROM MANIFEST_TEST_GROUP_ITEMS INNER JOIN MANIFEST_TEST_GROUP ON MANIFEST_TEST_GROUP_ITEMS.manifest_test_group_id = MANIFEST_TEST_GROUP.manifest_test_group_id WHERE (MANIFEST_TEST_GROUP.manifest_test_group_name = '" & manifest_test_group_name.SelectedItem.Text & "') GROUP BY MANIFEST_TEST_GROUP_ITEMS.test_name_id)) GROUP BY TEST_NAME.test_name_id, TEST_NAME.test_name " item_name.DataBind()
End Sub
Protected Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click
Submit.Enabled = False Submit.Text = "Please Wait..."
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data '***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection)
Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
Dim i As Integer
For i = 0 To item_name.Items.Count - 1
If item_name.Items(i).Selected Then
oCommand.CommandText = " INSERT INTO MANIFEST_TEST_GROUP_ITEMS( manifest_test_group_id, test_name_id ) Values (" & manifest_test_group_name.SelectedValue & "," & Trim(item_name.Items(i).Value) & ") " oCommand.ExecuteNonQuery()
End If
Next
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description())
cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Manifest_Test_Group_Items.aspx")
End Sub
End Class
Manifest path lab
Imports System.DataImports System.Data.SqlClient
Partial Public Class Manifest_Pathlab Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim lbl_code As ArrayList = New ArrayList ViewState("lbl_code") = lbl_code
study_kit_type_id.ConnectionString = connection.global_connection study_kit_type_id.SelectCommand = "SELECT TOP 100 PERCENT study_kit_type_id, study_kit_type FROM STUDY_KIT_TYPE GROUP BY study_kit_type_id, study_kit_type" study_kit_type.DataBind() study_kit_type.Items.Insert(0, New ListItem("SELECT KIT TYPE", ""))
End If
End Sub
Protected Sub study_kit_type_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles study_kit_type.SelectedIndexChanged tr_designation.Visible = True
End Sub
Protected Sub category_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles category.SelectedIndexChanged
If category.SelectedValue = "Vendor" Then
tr_vendor.Visible = True
tr_department.Visible = False tr_label.Visible = False tr_test_grp.Visible = False item.Visible = False tr_submit.Visible = False del_code.Enabled = True
vendor_id.ConnectionString = connection.global_connection vendor.DataBind() vendor.Items.Insert(0, New ListItem("SELECT VENDOR", ""))
Else
del_code.Enabled = True tr_vendor.Visible = False tr_department.Visible = True tr_label.Visible = False tr_test_grp.Visible = False item.Visible = False tr_submit.Visible = False
dep_id.ConnectionString = connection.global_connection dep.DataBind() dep.Items.Insert(0, New ListItem("SELECT DEPARTMENT", ""))
End If
End Sub
Protected Sub vendor_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles vendor.SelectedIndexChanged
tr_label.Visible = True label_code.Focus()
End Sub
Protected Sub dep_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
dep.SelectedIndexChanged
tr_label.Visible = True label_code.Focus()
End Sub
Protected Sub label_code_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles label_code.TextChanged
Dim vald_chk As Boolean
vald_chk = VALD(label_code.Text)
If vald_chk = False Then
lbl_label.Visible = True lbl_label.Text = label_code.Text & " - Invalid Label Scanned!!!!!!" label_code.Text = "" label_code.Focus() Exit Sub
Else
Dim lbl_code As ArrayList = New ArrayList lbl_code = ViewState("lbl_code")
If lbl_code.IndexOf(Trim(label_code.Text)) = -1 Then
lbl_code.Add(Trim(label_code.Text)) lbl_label.Visible = True lbl_label.Text = "Last Label Scanned : " & Trim(label_code.Text) label_code.Focus() label_code.Text = ""
tr_scan_label.Visible = True del_code.DataSource = lbl_code del_code.DataBind() fin_link.Visible = True
Else
lbl_label.Visible = True
lbl_label.Text = "Invalid Scan!!!" label_code.Focus() label_code.Text = ""
End If
End If
End Sub
Protected Sub del_code_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles del_code.SelectedIndexChanged
Dim lbl_code As ArrayList = New ArrayList lbl_code = ViewState("lbl_code")
lbl_code.Remove(del_code.Text) del_code.DataSource = lbl_code del_code.DataBind()
label_code.Focus() label_code.Text = ""
If lbl_code.Count = 0 Then tr_scan_label.Visible = False End If
End Sub
Protected Sub fin_link_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fin_link.Click
tr_test_grp.Visible = True group_name_id.ConnectionString = connection.global_connection group_name_id.SelectCommand = "SELECT manifest_test_group_id, manifest_test_group_name FROM MANIFEST_TEST_GROUP WHERE(study_kit_type_id = " & study_kit_type.SelectedValue & ") GROUP
BY manifest_test_group_id, manifest_test_group_name"
group_name.DataBind() group_name.Items.Insert(0, New ListItem("SELECT MANIFEST GROUP ", ""))
del_code.Enabled = False
End Sub
Protected Sub group_name_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles group_name.SelectedIndexChanged
item.Visible = True tr_submit.Visible = True
item_name_id.ConnectionString = connection.global_connection item_name_id.SelectCommand = " SELECT MANIFEST_TEST_GROUP_ITEMS.manifest_test_item_group_id, MANIFEST_TEST_GROUP_ITEMS.manifest_test_group_id, MANIFEST_TEST_GROUP_ITEMS.test_item_id, TEST_ITEM.item FROM MANIFEST_TEST_GROUP_ITEMS INNER JOIN TEST_ITEM ON MANIFEST_TEST_GROUP_ITEMS.test_item_id = TEST_ITEM.item_id WHERE (MANIFEST_TEST_GROUP_ITEMS.manifest_test_group_id = " & group_name.SelectedValue & ") GROUP BY MANIFEST_TEST_GROUP_ITEMS.manifest_test_item_group_id, MANIFEST_TEST_GROUP_ITEMS.manifest_test_group_id, MANIFEST_TEST_GROUP_ITEMS.test_item_id, TEST_ITEM.item " item_name.DataBind()
item_name.Enabled = False
End Sub
Protected Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click
Dim lbl_code As ArrayList = New ArrayList
lbl_code = ViewState("lbl_code")
Dim cn As New SqlConnection(connection.global_connection)
Dim oCommand As New SqlCommand Dim Reader As SqlDataReader
Dim manifest_no As String
Try
cn.Open()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text
If category.SelectedValue = "Vendor" Then
oCommand.CommandText = " SELECT ISNULL(MAX(manifest_vendor_id), 0) AS manifest_vendor_id FROM MANIFEST_VENDOR " Reader = oCommand.ExecuteReader() Reader.Read()
manifest_no = Reader("manifest_vendor_id") + 1
Else
oCommand.CommandText = " SELECT ISNULL(MAX(manifest_department_id), 0) AS manifest_department_id FROM MANIFEST_DEPARTMENT " Reader = oCommand.ExecuteReader() Reader.Read()
manifest_no = Reader("manifest_department_id") + 1
End If
If Len(manifest_no) = 1 Then
manifest_no = "0000" & manifest_no ElseIf Len(manifest_no) = 2 Then manifest_no = "000" & manifest_no ElseIf Len(manifest_no) = 3 Then manifest_no = "00" & manifest_no ElseIf Len(manifest_no) = 4 Then manifest_no = "0" & manifest_no Else manifest_no = manifest_no End If
If category.SelectedValue = "Vendor" Then
If study_kit_type.SelectedItem.Text = "General Screening" Then manifest_no = "MVSRN" & Day(Now.Date) &
Month(Now.Date) & Right(Year(Now.Date), 2) & manifest_no Else manifest_no = "MVPRE" & Day(Now.Date) & Month(Now.Date) & Right(Year(Now.Date), 2) & manifest_no End If
Else
If study_kit_type.SelectedItem.Text = "General Screening" Then manifest_no = "MDSRN" & Day(Now.Date) & Month(Now.Date) & Right(Year(Now.Date), 2) & manifest_no Else manifest_no = "MDPRE" & Day(Now.Date) & Month(Now.Date) & Right(Year(Now.Date), 2) & manifest_no End If
End If
Reader.Close()
'********************************************************************************************
Dim tran As SqlTransaction = cn.BeginTransaction() Dim manifest_vendor_id As Integer Dim manifest_department_id As Integer Dim vald_chk As Boolean
Try
oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
If category.SelectedValue = "Vendor" Then
oCommand.CommandText = " INSERT INTO MANIFEST_VENDOR( study_kit_type_id,vendor_id, manifest_no, manifest_date_time ) Values (" & study_kit_type.SelectedValue & "," & vendor.SelectedValue & ",'" & manifest_no & "','" & Now & "');SELECT @@IDENTITY AS manifest_vendor_id " manifest_vendor_id = oCommand.ExecuteScalar
' oCommand.CommandText = " UPDATE VOLUNTEER_SCREENING_TRACKER SET manifest = " & 1 & " , manifest_no = '" & manifest_no & "' WHERE volunteer_id = '" & hidden_volunteer_id.Value & "' " 'oCommand.ExecuteNonQuery()
Else
oCommand.CommandText = " INSERT INTO MANIFEST_DEPARTMENT( study_kit_type_id,department_id, manifest_no, manifest_date_time ) Values (" & study_kit_type.SelectedValue & "," & dep.SelectedValue & ",'" & manifest_no & "','" & Now & "');SELECT @@IDENTITY AS manifest_department_id " manifest_department_id = oCommand.ExecuteScalar
End If
'******************************************************************************************
Dim lbl As String
For Each lbl In lbl_code
If category.SelectedValue = "Vendor" Then
oCommand.CommandText = " INSERT INTO MANIFEST_VENDOR_DETAILS (manifest_vendor_id, kit_material_issue_no) Values (" & manifest_vendor_id & " , '" & lbl & "') " oCommand.ExecuteNonQuery()
Else
oCommand.CommandText = " INSERT INTO MANIFEST_DEPARTMENT_DETAILS (manifest_department_id, kit_material_issue_no) Values (" & manifest_department_id & " , '" & lbl & "') " oCommand.ExecuteNonQuery()
End If
Next
'******************************************************************************************
If category.SelectedValue = "Vendor" Then
oCommand.CommandText = " INSERT INTO MANIFEST_VENDOR_TEST_GROUPS (manifest_vendor_id, manifest_test_group_id) Values (" & manifest_vendor_id & " , " & group_name.SelectedValue & ") " oCommand.ExecuteNonQuery()
Else
oCommand.CommandText = " INSERT INTO
MANIFEST_DEPARTMENT_TEST_GROUPS (manifest_department_id, manifest_test_group_id) Values (" & manifest_department_id & " , " & group_name.SelectedValue & ") " oCommand.ExecuteNonQuery()
End If
tran.Commit() tran.Dispose()
vald_chk = UPDATE_TRACKER(manifest_no)
'**************************** Showing Manifest View*************************************
Submit.Visible = False tr_designation.Visible = False tr_vendor.Visible = False tr_department.Visible = False tr_label.Visible = False tr_scan_label.Visible = False tr_test_grp.Visible = False item.Visible = False label1.Visible = True lbl_Manifest_no.Visible = True lbl_Manifest_no.Text = manifest_no
If category.SelectedValue = "Vendor" Then
If study_kit_type.SelectedItem.Text = "General Screening" Then
Manifest_Vendor.Visible = True Manifest_department.Visible = False Manifest_department_preEnroll.Visible = False Manifest_Vendor_preEnroll.Visible = False hidden_manifest_no.Value = manifest_vendor_id
Else
Manifest_Vendor.Visible = False Manifest_Vendor_preEnroll.Visible = True Manifest_department.Visible = False Manifest_department_preEnroll.Visible = False hidden_manifest_no.Value = manifest_vendor_id
End If
Else
If study_kit_type.SelectedItem.Text = "General Screening" Then
hidden_manifest_no.Value = manifest_department_id Manifest_department.Visible = True Manifest_department_preEnroll.Visible = False Manifest_Vendor.Visible = False Manifest_Vendor_preEnroll.Visible = False
Else
hidden_manifest_no.Value = manifest_department_id Manifest_department.Visible = False Manifest_department_preEnroll.Visible = True Manifest_Vendor.Visible = False Manifest_Vendor_preEnroll.Visible = False
End If
End If
'**************************** End Manifest View*************************************
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback()
tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
End Sub
Protected Sub Back_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back.Click
Response.Redirect("Screening_Manifest.aspx", True)
End Sub
Protected Sub Manifest_department_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Manifest_department.Click
Response.Redirect("~/Manifest/Screening_Manifest/Manifest_dept.aspx?manifest_no=" & Server.UrlEncode(hidden_manifest_no.Value))
End Sub
Protected Sub Manifest_Vendor_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Manifest_Vendor.Click
Response.Redirect("~/Manifest/Screening_Manifest/Manifest_Vendor.aspx?manifest_no=" & Server.UrlEncode(hidden_manifest_no.Value))
End Sub
Protected Sub Manifest_department_preEnroll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Manifest_department_preEnroll.Click
Response.Redirect("~/Manifest/Screening_Manifest/Manifest_Department_PreEnroll.aspx?manifest_no=" & Server.UrlEncode(hidden_manifest_no.Value))
End Sub
Protected Sub Manifest_Vendor_preEnroll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Manifest_Vendor_preEnroll.Click
Response.Redirect("~/Manifest/Screening_Manifest/Manifest_Vendor_PreEnroll.aspx?manifest_no=" & Server.UrlEncode(hidden_manifest_no.Value))
End Sub
Public Function VALD(ByVal label_code As String) As Boolean
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand Dim Reader As SqlDataReader
Try cn.Open()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text
oCommand.CommandText = " SELECT kit_material_issue_no FROM KIT_MATERIAL_ISSUED WHERE (kit_material_issue_no = '" &
label_code & "') GROUP BY kit_material_issue_no "
Reader = oCommand.ExecuteReader()
If Reader.HasRows = False Then
VALD = False Reader.Close() Exit Function
End If
Reader.Close()
VALD = True
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
End Function
Public Function UPDATE_TRACKER(ByVal manifest_no As String) As Boolean
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand Dim Reader As SqlDataReader
Try cn.Open()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text
oCommand.CommandText = " SELECT TOP 100 PERCENT VOLUNTEER_GENERAL_SCREENING.volunteer_id FROM
MANIFEST_VENDOR_DETAILS INNER JOIN MANIFEST_VENDOR ON MANIFEST_VENDOR_DETAILS.manifest_vendor_id = MANIFEST_VENDOR.manifest_vendor_id INNER JOIN KIT_MATERIAL_ISSUED ON MANIFEST_VENDOR_DETAILS.kit_material_issue_no = KIT_MATERIAL_ISSUED.kit_material_issue_no INNER JOIN KIT_ISSUED ON KIT_MATERIAL_ISSUED.kit_issue_id = KIT_ISSUED.kit_issue_id INNER JOIN VOLUNTEER_GENERAL_KIT ON KIT_ISSUED.kit_issue_no = VOLUNTEER_GENERAL_KIT.kit_issue_no INNER JOIN VOLUNTEER ON VOLUNTEER_GENERAL_KIT.volunteer_registration_no = VOLUNTEER.volunteer_registration_no INNER JOIN VOLUNTEER_GENERAL_SCREENING ON VOLUNTEER_GENERAL_KIT.volunteer_screening_id = Volunteer_General_Screening.volunteer_screening_id WHERE (MANIFEST_VENDOR.manifest_no = '" & manifest_no & "') GROUP BY VOLUNTEER_GENERAL_SCREENING.volunteer_id "
Reader = oCommand.ExecuteReader()
If Reader.HasRows Then
Reader.Read()
Dim volunteer_id As Integer = Reader("volunteer_id").ToString
Reader.Close()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " UPDATE VOLUNTEER_SCREENING_TRACKER SET manifest = " & 1 & " , manifest_no = '" & manifest_no & "' WHERE volunteer_id = '" & volunteer_id & "' " oCommand.ExecuteNonQuery()
tran.Commit()
tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
End If
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
End FunctionEnd Class
Manifest vendor
Imports System.DataImports System.Data.SqlClientImports Neodynamic.WebControls.BarcodeProfessionalImports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.Shared
Partial Public Class Manifest_Vendor Inherits System.Web.UI.Page
Private hierarchicalGroupingReport As MANIFEST_VENDOR_REPORT Private exportPath As String Private myDiskFileDestinationOptions As DiskFileDestinationOptions Private myExportOptions As ExportOptions Private myPrintoptions As PrintOptions Private printPath As String
#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() 'ConfigureCrystalReports() End Sub
#End Region
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
'Label1.Text = "10"
Label1.Text = Request.QueryString("manifest_no")
Dim cn As New SqlConnection(connection.global_connection) Dim oAdapter, oAdapter1 As SqlDataAdapter Dim proset1 As DataSet Dim kit_material_issue_no, gender, sex, first_name, middle_name, last_name, Volunteer_name, volunteer_age As String
Dim oCommand As New SqlCommand Dim Reader As SqlDataReader
Dim manifest As App_Report_XSD
Try
cn.Open()
oAdapter1 = New SqlDataAdapter(" SELECT TOP 100 PERCENT MANIFEST_VENDOR_DETAILS.kit_material_issue_no + ' - ' + MATERIAL.material_name AS kit_material_issue_no FROM MANIFEST_VENDOR_DETAILS INNER JOIN KIT_MATERIAL_ISSUED ON MANIFEST_VENDOR_DETAILS.kit_material_issue_no = KIT_MATERIAL_ISSUED.kit_material_issue_no INNER JOIN MATERIAL ON KIT_MATERIAL_ISSUED.material_id = MATERIAL.material_id WHERE(Manifest_Vendor_details.manifest_vendor_id = " & Label1.Text & ") GROUP BY MANIFEST_VENDOR_DETAILS.kit_material_issue_no, MATERIAL.material_name ORDER BY MANIFEST_VENDOR_DETAILS.kit_material_issue_no ", cn)
proset1 = New DataSet oAdapter1.Fill(proset1)
Dim dr1 As DataRow Dim m As Integer
kit_material_issue_no = ""
For Each dr1 In proset1.Tables(0).Rows m = m + 1
kit_material_issue_no = kit_material_issue_no &
dr1("kit_material_issue_no") & vbCrLf
Next
kit_material_issue_no = kit_material_issue_no
'*****************************************************************************
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.CommandText = " SELECT TOP 100 PERCENT TM_Patient_M.f_name, TM_Patient_M.m_name, TM_Patient_M.l_name, TM_Patient_M.dob,TM_Patient_M.sex FROM MANIFEST_VENDOR_TEST_GROUPS INNER JOIN TM_Patient_M ON MANIFEST_VENDOR_TEST_GROUPS.patient_id = TM_Patient_M.PID WHERE MANIFEST_VENDOR_TEST_GROUPS.manifest_vendor_test_id = " & Label1.Text & " GROUP BY TM_Patient_M.f_name, TM_Patient_M.m_name, TM_Patient_M.l_name, TM_Patient_M.dob, TM_Patient_M.sex"
Reader = oCommand.ExecuteReader()
Reader.Read()
first_name = Reader("f_name").ToString middle_name = Reader("m_name").ToString last_name = Reader("l_name").ToString volunteer_age = Reader("dob").ToString sex = Reader("sex").ToString
If sex = "1" Then gender = "Male" Else gender = "Female" End If
If Len(first_name) <> 0 Then
first_name = Left(first_name, 1) End If
If Len(middle_name) <> 0 Then middle_name = Left(middle_name, 1) End If If Len(last_name) <> 0 Then last_name = Left(last_name, 1) End If
Dim vMonths, vDays, vYears As Integer Dim volunteer_age_year, volunteer_age_month As String
vMonths = DateDiff("m", (volunteer_age), Now())
vDays = DateDiff("d", DateAdd("m", vMonths, (volunteer_age)), Now())
If vDays < 0 Then ' wierd way that DateDiff works, fix it here vMonths = vMonths - 1 vDays = DateDiff("d", DateAdd("m", vMonths, (volunteer_age)), Now()) End If vYears = vMonths \ 12 ' integer division vMonths = vMonths Mod 12 ' only want leftover less than one year
volunteer_age_year = vYears volunteer_age_month = vMonths
Volunteer_name = first_name & "." & middle_name & "." & last_name
Reader.Close()
'*****************************************************************************
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.CommandText = " SELECT TOP 100 PERCENT
manifest_no FROM MANIFEST_VENDOR WHERE manifest_vendor_id = " & Label1.Text & " GROUP BY manifest_no"
Reader = oCommand.ExecuteReader()
Reader.Read()
hidden_manifest_no.Value = Reader("manifest_no").ToString
Reader.Close()
'*****************************************************************************
oAdapter = New SqlDataAdapter(" SELECT VENDOR.vendor_id, VENDOR.vendor_name, MANIFEST_VENDOR.manifest_no, MANIFEST_VENDOR.manifest_date_time, TM_Patient_M.PatientNo, TM_Patient_M.sex, TM_Patient_M.dob, MANIFEST_VENDOR_TEST_GROUPS.test_name FROM MANIFEST_VENDOR_DETAILS INNER JOIN MANIFEST_VENDOR ON MANIFEST_VENDOR_DETAILS.manifest_vendor_id = MANIFEST_VENDOR.manifest_vendor_id INNER JOIN MANIFEST_VENDOR_TEST_GROUPS ON MANIFEST_VENDOR_DETAILS.manifest_vendor_id = MANIFEST_VENDOR_TEST_GROUPS.manifest_vendor_id INNER JOIN VENDOR ON MANIFEST_VENDOR.vendor_id = VENDOR.vendor_id INNER JOIN TM_Patient_M ON MANIFEST_VENDOR_TEST_GROUPS.patient_id = TM_Patient_M.PID WHERE Manifest_Vendor.manifest_vendor_id = " & Label1.Text & " GROUP BY VENDOR.vendor_id, VENDOR.vendor_name,
MANIFEST_VENDOR.manifest_no, MANIFEST_VENDOR.manifest_date_time, TM_Patient_M.PatientNo, TM_Patient_M.sex, TM_Patient_M.dob, MANIFEST_VENDOR_TEST_GROUPS.test_name", cn)
manifest = New App_Report_XSD oAdapter.Fill(manifest, "MANIFEST_VENDOR_VIEW")
'Create an instance of Barcode Professional Dim bcp As New
Neodynamic.WebControls.BarcodeProfessional.BarcodeProfessional() 'Barcode settings
Neodynamic.WebControls.BarcodeProfessional.BarcodeProfessional.LicenseOwner = "Pradeep Nakhate-Developer License" Neodynamic.WebControls.BarcodeProfessional.BarcodeProfessional.LicenseKey = "66ED116657E6A42C"
bcp.Symbology = Neodynamic.WebControls.BarcodeProfessional.Symbology.Pdf417 bcp.Extended = True bcp.AddChecksum = False bcp.BarHeight = 0.8F bcp.ForeColor = Drawing.Color.RoyalBlue bcp.Font.Bold = True
'Append fictitious Company internal prefix Dim prodPrefix As String
prodPrefix = Now.Year prodPrefix = prodPrefix & Now.Day prodPrefix = prodPrefix & Now.Month prodPrefix = prodPrefix & Now.Hour prodPrefix = prodPrefix & Now.Minute prodPrefix = prodPrefix & hidden_manifest_no.Value
hidden_barcode.Value = prodPrefix
Dim dr As DataRow
For Each dr In manifest.Tables("MANIFEST_VENDOR_VIEW").Rows
'dr("volunteer_image") = img 'Set the value to encode bcp.Code = prodPrefix 'Generate the barcode image and store it into the Barcode Column dr("Barcode") = bcp.GetBarcodeImage(System.Drawing.Imaging.ImageFormat.Png) 'row.Doc_Barcode = bcp.GetBarcodeImage(System.Drawing.Imaging.ImageFormat.Png)
dr("kit_material_issued") = kit_material_issue_no dr("patient_name") = Volunteer_name dr("patient_years") = volunteer_age_year dr("patient_months") = volunteer_age_month dr("gender") = gender
Next
Dim rpt1 As MANIFEST_VENDOR_REPORT
rpt1 = New MANIFEST_VENDOR_REPORT()
rpt1.SetDataSource(manifest)
ManiVendorReportViewer.ReportSource = rpt1 ManiVendorReportViewer.DataBind()
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
End Sub
Protected Sub Back_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back.Click
Response.Redirect("~/Manifest/Screening_Manifest/Pathology_Manifest.aspx", True)
End Sub
Private Sub exportByType_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles exportByType.Click
ExportSetup() ExportSelection() printCompletion() ExportCompletion()
End Sub
Public Sub ExportSetup() exportPath = "D:\PATHLAB_MANIFEST\" If Not System.IO.Directory.Exists(exportPath) Then System.IO.Directory.CreateDirectory(exportPath) End If myDiskFileDestinationOptions = New DiskFileDestinationOptions() myExportOptions = hierarchicalGroupingReport.ExportOptions myExportOptions.ExportDestinationType = ExportDestinationType.DiskFile End Sub
Public Sub ExportSelection() Select Case exportTypesList.SelectedIndex
Case CeExportType.PDF_PortableDocument
ConfigureExportToPdf()
End Select End Sub
Public Sub ExportCompletion() Try hierarchicalGroupingReport.Export() message.Text = MessageConstants.SUCCESS Catch ex As Exception message.Text = MessageConstants.FAILURE & ex.Message End Try
End Sub
Public Sub printCompletion()
'printPath = "\\Shreedhar\SamsungML"
printPath = printer_name.Text myPrintoptions = hierarchicalGroupingReport.PrintOptions 'myPrintoptions.PrinterName = "\\Shreedhar\SamsungML" myPrintoptions.PrinterName = printer_name.Text hierarchicalGroupingReport.PrintToPrinter(1, True, 1, 100)
End Sub
Public Sub ConfigureExportToPdf() myExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat
myDiskFileDestinationOptions.DiskFileName = exportPath & hidden_barcode.Value & ".pdf" myExportOptions.DestinationOptions = myDiskFileDestinationOptions End Sub
End Class
Pathology manifest
Imports System.DataImports System.Data.SqlClient
Partial Public Class Pathology_Manifest Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
Dim lbl_code As ArrayList = New ArrayList ViewState("lbl_code") = lbl_code
Dim lbl_test As ArrayList = New ArrayList ViewState("lbl_test") = lbl_test
patient_name_id.ConnectionString = connection.global_connection patient_name.DataBind() patient_name.Items.Insert(0, New ListItem("SELECT PATIENT NAME", ""))
End If
End Sub
Protected Sub patient_name_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles patient_name.SelectedIndexChanged tr_test.Visible = True End Sub
Protected Sub category_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles category.SelectedIndexChanged
If category.SelectedValue = "Profile" Then
tr_test_profile.Visible = True
tr_submit.Visible = False tr_test_name.Visible = False tr_group_name.Visible = False Tr_group_test_name.Visible = False tr2.Visible = False Tr_selected_test_names.Visible = False tr_remarks.Visible = False tr_label.Visible = False tr_scan_label.Visible = False tr_vendor.Visible = False
manifets_test_group_id.ConnectionString = connection.global_connection manifets_test_group_id.SelectCommand = "SELECT manifest_test_group_id, manifest_test_group_name FROM MANIFEST_TEST_GROUP GROUP BY manifest_test_group_id, manifest_test_group_name ORDER BY manifest_test_group_id" manifets_test_group.DataBind() manifets_test_group.Items.Insert(0, New ListItem("SELECT MANIFEST PROFILE ", ""))
vendor_id.ConnectionString = connection.global_connection vendor.DataBind() vendor.Items.Insert(0, New ListItem("SELECT VENDOR", ""))
Else
tr_group_name.Visible = True
tr_test_profile.Visible = False tr_submit.Visible = False tr_test_name.Visible = False Tr_group_test_name.Visible = False tr2.Visible = False Tr_selected_test_names.Visible = False tr_remarks.Visible = False tr_label.Visible = False tr_scan_label.Visible = False tr_vendor.Visible = False
group_name_id.ConnectionString = connection.global_connection group_name.DataBind() group_name.Items.Insert(0, New ListItem("SELECT TEST GROUP", ""))
'del_code.Enabled = True 'tr_vendor.Visible = False 'tr_department.Visible = True 'tr_label.Visible = False 'tr_test_grp.Visible = False 'item.Visible = False 'tr_submit.Visible = False
' dep_id.ConnectionString = connection.global_connection ' dep.DataBind() ' dep.Items.Insert(0, New ListItem("SELECT DEPARTMENT", ""))
End If
End Sub
Protected Sub manifets_test_group_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles manifets_test_group.SelectedIndexChanged
tr_test_name.Visible = True
test_name_id.ConnectionString = connection.global_connection test_name_id.SelectCommand = "SELECT TOP 100 PERCENT TEST_NAME.test_name_id, TEST_NAME.test_name FROM MANIFEST_TEST_GROUP INNER JOIN MANIFEST_TEST_GROUP_ITEMS ON MANIFEST_TEST_GROUP.manifest_test_group_id = MANIFEST_TEST_GROUP_ITEMS.manifest_test_group_id INNER JOIN TEST_NAME ON MANIFEST_TEST_GROUP_ITEMS.test_name_id = TEST_NAME.test_name_id WHERE MANIFEST_TEST_GROUP.manifest_test_group_id = " & manifets_test_group.SelectedValue & " GROUP BY TEST_NAME.test_name_id, TEST_NAME.test_name ORDER BY
TEST_NAME.test_name_id" test_name.DataBind()
Dim item As ListItem
For Each item In test_name.Items item.Selected = True Next End Sub
Protected Sub group_name_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles group_name.SelectedIndexChanged
'item.Visible = True Tr_group_test_name.Visible = True
group_test_name_id.ConnectionString = connection.global_connection group_test_name_id.SelectCommand = "SELECT TEST_NAME.test_name_id, TEST_NAME.test_name FROM TEST_GROUP INNER JOIN TEST_NAME ON TEST_GROUP.test_group_id = TEST_NAME.test_group_id WHERE TEST_GROUP.test_group_id = " & group_name.SelectedValue & " GROUP BY TEST_NAME.test_name_id, TEST_NAME.test_name" group_test_name.DataBind()
'item_name_id.ConnectionString = connection.global_connection 'item_name_id.SelectCommand = " SELECT MANIFEST_TEST_GROUP_ITEMS.manifest_test_item_group_id, MANIFEST_TEST_GROUP_ITEMS.manifest_test_group_id, MANIFEST_TEST_GROUP_ITEMS.test_item_id, TEST_ITEM.item FROM MANIFEST_TEST_GROUP_ITEMS INNER JOIN TEST_ITEM ON MANIFEST_TEST_GROUP_ITEMS.test_item_id = TEST_ITEM.item_id WHERE (MANIFEST_TEST_GROUP_ITEMS.manifest_test_group_id = " & group_name.SelectedValue & ") GROUP BY MANIFEST_TEST_GROUP_ITEMS.manifest_test_item_group_id, MANIFEST_TEST_GROUP_ITEMS.manifest_test_group_id, MANIFEST_TEST_GROUP_ITEMS.test_item_id, TEST_ITEM.item "
' item_name.DataBind()
'item_name.Enabled = False
End Sub
Protected Sub fin_Select_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fin_Select.Click
Tr_selected_test_names.Visible = True tr2.Visible = True
Dim i As Integer
For i = 0 To group_test_name.Items.Count - 1
If group_test_name.Items(i).Selected Then
selected_test_names.Items.Add(New ListItem(group_test_name.Items(i).Text, group_test_name.Items(i).Value))
Dim lbl_test As ArrayList = New ArrayList lbl_test = ViewState("lbl_test")
If lbl_test.IndexOf(Trim(group_test_name.Items(i).Text)) = -1 Then
lbl_test.Add(Trim(group_test_name.Items(i).Text))
selected_test_names.DataSource = lbl_test selected_test_names.DataBind()
End If
End If
Next
Tr_group_test_name.Visible = False
group_name_id.ConnectionString = connection.global_connection group_name.DataBind() group_name.Items.Insert(0, New ListItem("SELECT TEST GROUP", ""))
End Sub
Protected Sub fin_link1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fin_link1.Click
Dim item As ListItem
For Each item In selected_test_names.Items item.Selected = True Next
Tr_group_test_name.Visible = False tr_group_name.Visible = False tr_test.Visible = False selected_test_names.Enabled = False tr2.Visible = False
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
Dim i As Integer
For i = 0 To selected_test_names.Items.Count - 1
If selected_test_names.Items(i).Selected Then
oCommand.CommandText = " INSERT INTO MANIFEST_TEMP_TEST_GROUP_ITEMS( test_name ) Values ('" & Trim(selected_test_names.Items(i).Text) & "') " oCommand.ExecuteNonQuery()
End If
Next
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose() Exit Sub
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
remarks_2() tr_remarks.Visible = True tr_label.Visible = True label_code.Focus()
End Sub
Protected Sub fin_link2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fin_link2.Click
tr_test_profile.Visible = False tr_test.Visible = False remarks_1() tr_remarks.Visible = True tr_label.Visible = True label_code.Focus()
End Sub
Protected Sub selected_test_names_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
selected_test_names.SelectedIndexChanged
Dim lbl_test As ArrayList = New ArrayList lbl_test = ViewState("lbl_test")
lbl_test.Remove(selected_test_names.Text) selected_test_names.DataSource = lbl_test selected_test_names.DataBind()
If lbl_test.Count = 0 Then Tr_selected_test_names.Visible = False End If
End Sub
Protected Sub label_code_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles label_code.TextChanged
Dim vald_chk As Boolean
vald_chk = VALD(label_code.Text)
If vald_chk = False Then
lbl_label.Visible = True lbl_label.Text = label_code.Text & " - Invalid Label Scanned!!!!!!" label_code.Text = "" label_code.Focus() Exit Sub
Else
Dim lbl_code As ArrayList = New ArrayList lbl_code = ViewState("lbl_code")
If lbl_code.IndexOf(Trim(label_code.Text)) = -1 Then
lbl_code.Add(Trim(label_code.Text)) lbl_label.Visible = True lbl_label.Text = "Last Label Scanned : " & Trim(label_code.Text) label_code.Focus() label_code.Text = ""
tr_scan_label.Visible = True del_code.DataSource = lbl_code del_code.DataBind() fin_link.Visible = True
Else
lbl_label.Visible = True lbl_label.Text = "Invalid Scan!!!" label_code.Focus() label_code.Text = ""
End If
End If
End Sub
Protected Sub del_code_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles del_code.SelectedIndexChanged
Dim lbl_code As ArrayList = New ArrayList lbl_code = ViewState("lbl_code")
lbl_code.Remove(del_code.Text) del_code.DataSource = lbl_code del_code.DataBind()
label_code.Focus() label_code.Text = ""
If lbl_code.Count = 0 Then tr_scan_label.Visible = False End If
End Sub
Protected Sub fin_link_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles fin_link.Click
tr_vendor.Visible = True vendor_id.ConnectionString = connection.global_connection vendor_id.SelectCommand = "SELECT TOP 100 PERCENT vendor_id, vendor_name FROM VENDOR GROUP BY vendor_id, vendor_name ORDER BY vendor_id" vendor.DataBind() vendor.Items.Insert(0, New ListItem("SELECT PATHOLOGY LAB", ""))
del_code.Enabled = False tr_label.Visible = False
End Sub
Protected Sub vendor_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles vendor.SelectedIndexChanged
tr_submit.Visible = True
End Sub
Protected Sub Submit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Submit.Click
Dim lbl_code As ArrayList = New ArrayList lbl_code = ViewState("lbl_code")
Dim lbl_test As ArrayList = New ArrayList lbl_test = ViewState("lbl_test")
Dim cn As New SqlConnection(connection.global_connection)
Dim oCommand As New SqlCommand Dim Reader As SqlDataReader
Dim manifest_no As String
Try
cn.Open()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text
oCommand.CommandText = " SELECT ISNULL(MAX(manifest_vendor_id), 0) AS manifest_vendor_id FROM MANIFEST_VENDOR " Reader = oCommand.ExecuteReader() Reader.Read()
manifest_no = Reader("manifest_vendor_id") + 1
If Len(manifest_no) = 1 Then
manifest_no = "0000" & manifest_no ElseIf Len(manifest_no) = 2 Then manifest_no = "000" & manifest_no ElseIf Len(manifest_no) = 3 Then manifest_no = "00" & manifest_no ElseIf Len(manifest_no) = 4 Then manifest_no = "0" & manifest_no Else manifest_no = manifest_no End If
manifest_no = "MVPATH" & Day(Now.Date) & Month(Now.Date) & Right(Year(Now.Date), 2) & manifest_no Reader.Close()
'********************************************************************************************
Dim tran As SqlTransaction = cn.BeginTransaction() Dim manifest_vendor_id As Integer
Try
oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
oCommand.CommandText = " INSERT INTO MANIFEST_VENDOR( vendor_id, manifest_no, manifest_date_time ) Values (" & vendor.SelectedValue & ",'" & manifest_no & "','" & Now & "');SELECT @@IDENTITY AS manifest_vendor_id " manifest_vendor_id = oCommand.ExecuteScalar
'******************************************************************************************
Dim lbl As String
For Each lbl In lbl_code
oCommand.CommandText = " INSERT INTO MANIFEST_VENDOR_DETAILS (manifest_vendor_id, kit_material_issue_no) Values (" & manifest_vendor_id & " , '" & lbl & "') "
oCommand.ExecuteNonQuery()
Next
'****************************************************************************************** If category.SelectedItem.Text = "individual Test" Then
Dim test As String
For Each test In lbl_test
oCommand.CommandText = " INSERT INTO MANIFEST_VENDOR_TEST_GROUPS (patient_id, manifest_vendor_id, test_name) Values (" & patient_name.SelectedValue & " ," & manifest_vendor_id & ", '" & test & "') " oCommand.ExecuteNonQuery()
Next
Else
Dim i As Integer
For i = 0 To test_name.Items.Count - 1
If test_name.Items(i).Selected Then
oCommand.CommandText = " INSERT INTO MANIFEST_VENDOR_TEST_GROUPS (patient_id, manifest_vendor_id, test_name) Values (" & patient_name.SelectedValue & " ," &
manifest_vendor_id & ",'" & Trim(test_name.Items(i).Text) & "') " oCommand.ExecuteNonQuery()
End If
Next
End If
tran.Commit() tran.Dispose()
'**************************** Showing Manifest View*************************************
Submit.Visible = False tr_patient_name.Visible = False tr_test.Visible = False tr_test_profile.Visible = False tr_test_name.Visible = False tr_group_name.Visible = False Tr_group_test_name.Visible = False tr2.Visible = False Tr_selected_test_names.Visible = False tr_remarks.Visible = False tr_label.Visible = False tr_scan_label.Visible = False tr_vendor.Visible = False
label1.Visible = True lbl_Manifest_no.Visible = True lbl_Manifest_no.Text = manifest_no
Manifest_Vendor.Visible = True Back.Visible = True hidden_manifest_no.Value = manifest_vendor_id
'**************************** End Manifest View*************************************
Catch Ex As Exception
Response.Write(Err.Description())
tran.Rollback() tran.Dispose()
cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
End Sub
Protected Sub Back_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back.Click
Response.Redirect("Pathology_Manifest.aspx", True)
End Sub
Protected Sub Manifest_Vendor_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Manifest_Vendor.Click
Response.Redirect("~/Manifest/Screening_Manifest/Manifest_Vendor.aspx?manifest_no=" & Server.UrlEncode(hidden_manifest_no.Value))
End Sub
Public Function VALD(ByVal label_code As String) As Boolean
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand Dim Reader As SqlDataReader
Try cn.Open()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text
oCommand.CommandText = " SELECT kit_material_issue_no FROM KIT_MATERIAL_ISSUED WHERE (kit_material_issue_no = '" & label_code & "') GROUP BY kit_material_issue_no "
Reader = oCommand.ExecuteReader()
If Reader.HasRows = False Then
VALD = False Reader.Close() Exit Function
End If
Reader.Close()
VALD = True
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
End Function
Public Function remarks_1() As Boolean
Dim cn As New SqlConnection(connection.global_connection)
Dim oAdapter As SqlDataAdapter Dim proset As DataSet
Dim test_material As String
oAdapter = New SqlDataAdapter(" SELECT TOP 100 PERCENT
MATERIAL.material_name FROM MANIFEST_TEST_GROUP INNER JOIN MANIFEST_TEST_GROUP_ITEMS ON MANIFEST_TEST_GROUP.manifest_test_group_id = MANIFEST_TEST_GROUP_ITEMS.manifest_test_group_id INNER JOIN TEST_NAME ON MANIFEST_TEST_GROUP_ITEMS.test_name_id = TEST_NAME.test_name_id INNER JOIN MATERIAL ON TEST_NAME.test_material_id = MATERIAL.material_id WHERE MANIFEST_TEST_GROUP.manifest_test_group_id = " & manifets_test_group.SelectedValue & " GROUP BY MATERIAL.material_name ", cn)
proset = New DataSet oAdapter.Fill(proset)
Dim dr As DataRow Dim m As Integer
test_material = ""
For Each dr In proset.Tables(0).Rows m = m + 1
test_material = test_material & dr("material_name") & vbCrLf
Next test_material = test_material
remark.Text = "Please Use following Colour Coded Tubes : " & vbCrLf & test_material 'Label2.Text = "Please Use following Colour Coded Tubes : " & vbCrLf & test_material
End Function
Public Function remarks_2() As Boolean
Dim cn As New SqlConnection(connection.global_connection) Dim oAdapter As SqlDataAdapter
Dim proset As DataSet Dim test_material As String Dim oCommand As New SqlCommand
oAdapter = New SqlDataAdapter(" SELECT TOP 100 PERCENT MATERIAL.material_name FROM TEST_NAME INNER JOIN MATERIAL ON TEST_NAME.test_material_id = MATERIAL.material_id INNER JOIN MANIFEST_TEMP_TEST_GROUP_ITEMS ON TEST_NAME.test_name = MANIFEST_TEMP_TEST_GROUP_ITEMS.test_name GROUP BY MATERIAL.material_name ", cn)
proset = New DataSet oAdapter.Fill(proset)
Dim dr As DataRow Dim m As Integer
test_material = ""
For Each dr In proset.Tables(0).Rows m = m + 1
test_material = test_material & dr("material_name") & vbCrLf
Next test_material = test_material
remark.Text = "Please Use following Colour Coded Tubes : " & vbCrLf & test_material 'Label2.Text = "Please Use following Colour Coded Tubes : " & vbCrLf & test_material
'******************************************************
cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " DELETE FROM
MANIFEST_TEMP_TEST_GROUP_ITEMS " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
Finally
cn.Dispose()
End Try
End Function
End Class
Manifest received
Imports System.DataImports System.Data.SqlClient
Partial Public Class Manifest_received Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Label1.Text = "0" Bind_Records()
End If
End Sub
Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Enabled = False Button1.Text = "Please wait..."
Dim cn As New SqlConnection(connection.global_connection) Dim I As Long Dim oCommand As New SqlCommand
Dim received_dt As DateTime
received_dt = Now()
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
For I = 0 To manifest_list.Items.Count - 1
Dim manifest_check As CheckBox manifest_check = manifest_list.Items(I).FindControl("manifest_check")
Dim manifest_vendor_id As HiddenField manifest_vendor_id = manifest_list.Items(I).FindControl("manifest_vendor_id")
If manifest_check.Checked = True Then
oCommand.CommandText = " UPDATE MANIFEST_VENDOR SET status = " & 1 & ", received_date_time = '" & Now() & "' WHERE manifest_vendor_id = " & manifest_vendor_id.Value & " " oCommand.ExecuteNonQuery()
End If
Next
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Manifest_received.aspx")
End Sub
Private Function Bind_Records()
Dim cn As New SqlConnection(connection.global_connection) Dim oAdapter As SqlDataAdapter
Dim oCommand As New SqlCommand
Dim ds As DataSet Try
cn.Open()
oAdapter = New SqlDataAdapter(" SELECT TOP 100 PERCENT manifest_vendor_id, vendor_id, manifest_no, manifest_date_time FROM MANIFEST_VENDOR WHERE (status = 0) AND (vendor_id = 1) GROUP BY manifest_vendor_id, vendor_id, manifest_no, manifest_date_time ORDER BY manifest_date_time ", cn)
ds = New DataSet()
Dim x As Integer = Convert.ToInt32(Label1.Text)
oAdapter.Fill(ds, x, 25, "MANIFEST")
manifest_list.DataSource = ds.Tables("MANIFEST").DefaultView manifest_list.DataBind()
Catch Ex As Exception
Response.Write(Ex.Message.ToString()) cn.Dispose()
Finally
cn.Dispose()
End Try
End Function
Protected Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Dim x As Integer = Convert.ToInt32(Label1.Text)
If x = "0" Then
LinkButton1.Visible = False Else
LinkButton1.Visible = True
x = x - 25 Label1.Text = x.ToString() Bind_Records()
End If
End Sub
Protected Sub LinkButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton2.Click
LinkButton1.Visible = True
Dim x As Integer = Convert.ToInt32(Label1.Text)
x = x + 25 Label1.Text = x.ToString() Bind_Records()
End Sub
End Class
Assinging test tubes
Imports System.DataImports System.Data.SqlClient
Partial Public Class Assigning_Test_Tubes Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then
Label1.Text = "0" Bind_Records()
End If
End Sub
Protected Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Button1.Enabled = False Button1.Text = "Please wait..."
Dim cn As New SqlConnection(connection.global_connection) Dim I As Long Dim oCommand As New SqlCommand
Dim received_dt As DateTime
received_dt = Now()
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
For I = 0 To vol_list.Items.Count - 1
Dim manifest_check As CheckBox manifest_check = vol_list.Items(I).FindControl("manifest_check")
Dim manifest_vendor_details_id As HiddenField manifest_vendor_details_id = vol_list.Items(I).FindControl("manifest_vendor_details_id") '
Dim vendor_department As DropDownList vendor_department = vol_list.Items(I).FindControl("vendor_department")
If manifest_check.Checked = True Then
oCommand.CommandText = " UPDATE MANIFEST_VENDOR_DETAILS SET accepted = " & 1 & " WHERE manifest_vendor_details_id = " & manifest_vendor_details_id.Value & " " oCommand.ExecuteNonQuery()
oCommand.CommandText = " INSERT INTO TEST_ACCEPTED_MASTER (manifest_vendor_details_id, vendor_department_id, test_accepted_date_time) Values (" & manifest_vendor_details_id.Value & "," & vendor_department.SelectedValue & ",'" & Now() & "') " oCommand.ExecuteNonQuery()
End If
Next
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback()
tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Assigning_Test_Tubes.aspx")
End Sub
Private Function Bind_Records()
Dim cn As New SqlConnection(connection.global_connection) Dim oAdapter As SqlDataAdapter
Dim oCommand As New SqlCommand
Dim ds As DataSet Try
cn.Open()
vendor_department_id.ConnectionString = connection.global_connection
oAdapter = New SqlDataAdapter(" SELECT TOP 100 PERCENT MANIFEST_VENDOR_DETAILS.manifest_vendor_details_id, MANIFEST_VENDOR_DETAILS.manifest_vendor_id, MANIFEST_VENDOR_DETAILS.kit_material_issue_no, MANIFEST_VENDOR_DETAILS.accepted, MANIFEST_VENDOR_DETAILS.analysed, MANIFEST_VENDOR.manifest_no,
MANIFEST_VENDOR.manifest_date_time, MANIFEST_VENDOR.status, Manifest_Vendor.received_date_time FROM MANIFEST_VENDOR_DETAILS INNER JOIN MANIFEST_VENDOR
ON MANIFEST_VENDOR_DETAILS.manifest_vendor_id = MANIFEST_VENDOR.manifest_vendor_id WHERE (MANIFEST_VENDOR.vendor_id = 1) AND (MANIFEST_VENDOR_DETAILS.accepted = 0) AND (MANIFEST_VENDOR.status = 1) GROUP BY MANIFEST_VENDOR_DETAILS.manifest_vendor_details_id, MANIFEST_VENDOR_DETAILS.manifest_vendor_id, MANIFEST_VENDOR_DETAILS.kit_material_issue_no, MANIFEST_VENDOR_DETAILS.accepted, MANIFEST_VENDOR_DETAILS.analysed, MANIFEST_VENDOR.manifest_no, MANIFEST_VENDOR.manifest_date_time, MANIFEST_VENDOR.status, Manifest_Vendor.received_date_time ORDER BY MANIFEST_VENDOR.manifest_date_time ", cn)
ds = New DataSet()
Dim x As Integer = Convert.ToInt32(Label1.Text)
oAdapter.Fill(ds, x, 15, "MANIFEST")
vol_list.DataSource = ds.Tables("MANIFEST").DefaultView vol_list.DataBind()
Catch Ex As Exception
Response.Write(Ex.Message.ToString()) cn.Dispose()
Finally
cn.Dispose()
End Try
End Function
Protected Sub LinkButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton1.Click
Dim x As Integer = Convert.ToInt32(Label1.Text)
If x = "0" Then
LinkButton1.Visible = False Else
LinkButton1.Visible = True
x = x - 15 Label1.Text = x.ToString() Bind_Records()
End If
End Sub
Protected Sub LinkButton2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LinkButton2.Click
LinkButton1.Visible = True
Dim x As Integer = Convert.ToInt32(Label1.Text)
x = x + 15 Label1.Text = x.ToString() Bind_Records()
End Sub
End Class
Vendor Category
Imports System.DataImports System.Data.SqlClient
Partial Public Class Add_Vendor_Category Inherits System.Web.UI.Page
Private Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data '***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection)
Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " INSERT INTO VENDOR_CATEGORY( vendor_category ) Values ('" & Trim(vendor_category.Text) & "') " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Vendor_Category.aspx", True)
End SubEnd Class
Vendor
Imports System.Data
Imports System.Data.SqlClient
Partial Public Class Add_Vendor Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Load
Dim i As Integer
For i = 1 To 25
vendor_priority.Items.Add(i)
Next
vendor_priority.Items.Insert(0, New ListItem("SELECT", ""))
If Not IsPostBack Then
vendor_category_id.ConnectionString = connection.global_connection vendor_category.DataBind() vendor_category.Items.Insert(0, New ListItem("SELECT VENDOR CATEGORY", ""))
End If
End Sub
Private Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data
'***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " INSERT INTO VENDOR( vendor_category_id, vendor_name, vendor_address, vendor_priority ) Values ('" & vendor_category.SelectedValue & "', '" & Trim(vendor_name.Text) & "', '" & Trim(vendor_address.Text) & " " & Trim(city_1.Text) & " " & Trim(zip_code_1.Text) & " " & Trim(state_1.Text) & " " & Trim(country_1.Text) & "', '" & vendor_priority.SelectedValue & "') " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Vendor.aspx", True)
End Sub
End Class
Vendor department
Imports System.DataImports System.Data.SqlClient
Partial Public Class Add_Vendor_Department Inherits System.Web.UI.Page
Private Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data '***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " INSERT INTO VENDOR_EMPLOYEE_DEPARTMENT( vendor_department ) Values ('" & Trim(department.Text) & "') " oCommand.ExecuteNonQuery()
tran.Commit()
tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Vendor_Department.aspx", True)
End SubEnd Class
Vendor designation
Imports System.Data
Imports System.Data.SqlClient
Partial Public Class Add_Vendor_Designation Inherits System.Web.UI.Page
Private Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data '***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " INSERT INTO VENDOR_EMPLOYEE_DESIGNATION( vendor_designation ) Values ('" & Trim(designation.Text) & "') " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Vendor_Designation.aspx", True)
End SubEnd Class
VENDOR EMPLOYEE MASTER
Imports System.DataImports System.Data.SqlClient
Partial Public Class Add_Vendor_Employee Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
vendor_id.ConnectionString = connection.global_connection vendor.DataBind() vendor.Items.Insert(0, New ListItem("SELECT VENDOR NAME", ""))
title_id.ConnectionString = connection.global_connection title.DataBind() title.Items.Insert(0, New ListItem("SELECT", ""))
End If
End Sub
Protected Sub vendor_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles vendor.SelectedIndexChanged
tr_name.Visible = True tr_reg_code.Visible = True tr_degree.Visible = True tr_special.Visible = True tr_asso_lab.Visible = True Tr_designation.Visible = True dept.Visible = True Tr_dob.Visible = True d_join.Visible = True d_confirm.Visible = True tr_address1.Visible = True tr_city1.Visible = True
tr_zipcode1.Visible = True tr_state1.Visible = True tr_country1.Visible = True
tr_address2.Visible = True tr_city2.Visible = True tr_zipcode2.Visible = True tr_state2.Visible = True tr_country2.Visible = True Tr_cell_no.Visible = True tr_contact.Visible = True tr_alt_contact.Visible = True tr_fax.Visible = True tr_alt_fax.Visible = True tr_email.Visible = True Tr1.Visible = True Tr_submit.Visible = True
designation_id.ConnectionString = connection.global_connection designation.DataBind() designation.Items.Insert(0, New ListItem("SELECT EMPLOYEE DESIGNATION", ""))
department_id.ConnectionString = connection.global_connection department.DataBind() department.Items.Insert(0, New ListItem("SELECT EMPLOYEE DEPARTMENT", ""))
End Sub
Private Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
Submit.Enabled = False Submit.Text = "Please wait..."
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data
'***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " INSERT INTO VENDOR_EMPLOYEE( vendor_id, vendor_employee_name, vendor_employee_reg_code, vendor_employee_degree, vendor_employee_specialization_details, vendor_employee_assciated_labs, vendor_employee_dob, vendor_employee_address1, vendor_employee_city1, vendor_employee_zipcode1, vendor_employee_state1, vendor_employee_country1, vendor_employee_address2, vendor_employee_city2, vendor_employee_zipcode2, vendor_employee_country2, vendor_employee_mobile_no, vendor_employee_contact1, vendor_employee_contact2, vendor_employee_fax1, vendor_employee_fax2, vendor_employee_email_id, vendor_designation_id, vendor_department_id, vendor_employee_date_of_joining, vendor_employee_date_of_confirm ) Values ( " & vendor.SelectedValue & ", '" & title.SelectedItem.Text & "." & Trim(first_name.Text) & " " & Trim(middle_name.Text) & " " & Trim(last_name.Text) & "','" & Trim(reg_code.Text) & "','" & Trim(employee_degree.Text) & "','" & Trim(employee_details.Text) & "','" & Trim(asso_labs.Text) & "','" & date_of_birth.Date.Date & "','" & Trim(address1.Text) & "','" & Trim(city_1.Text) & "','" & Trim(zip_code_1.Text) & "','" & Trim(state_1.Text) & "','" &
Trim(country_1.Text) & "','" & Trim(address2.Text) & "','" & Trim(city_2.Text) & "','" & Trim(zip_code_2.Text) & "','" & Trim(country_2.Text) & "','" & Trim(con_code_5.Text) & Trim(cell_no.Text)
& "','" & Trim(con_code.Text) & Trim(city_code.Text) & Trim(cont_no.Text) & Trim(ext.Text) & "','" & Trim(con_code_2.Text) & Trim(city_code_2.Text) & Trim(cont_no_2.Text) & Trim(ext1.Text) & "','" & Trim(con_code_3.Text) & Trim(city_code_3.Text) & Trim(fax_no.Text) & "','" &
Trim(con_code_4.Text) & Trim(city_code_4.Text) & Trim(fax_no_2.Text) & "','" & Trim(email_id_1.Text) & "'," & designation.SelectedValue & ",'" & department.SelectedValue & "','" & date_of_joining.Date.Date & "','" & date_of_confirm.Date.Date & "') " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally cn.Dispose() End Try Response.Redirect("Add_Vendor_Employee.aspx", True)
End Sub
End Class
ADD TEST GROUPS
Imports System.DataImports System.Data.SqlClient
Partial Public Class Add_Test_Group Inherits System.Web.UI.Page
Private Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data '***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " INSERT INTO TEST_GROUP ( test_group_name ) Values ('" & group_name.Text & "') " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Test_Group.aspx", True)
End SubEnd Class
ADD TEST GROUPS
Imports System.DataImports System.Data.SqlClient
Partial Public Class Add_Test_Group Inherits System.Web.UI.Page
Private Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data '***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " INSERT INTO TEST_GROUP ( test_group_name ) Values ('" & group_name.Text & "') " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Test_Group.aspx", True)
End SubEnd Class
Add test item
Imports System.DataImports System.Data.SqlClient
Partial Public Class Add_Test_Item Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
group_name_id.ConnectionString = connection.global_connection group_name.DataBind() group_name.Items.Insert(0, New ListItem("SELECT TEST GROUP NAME", ""))
material_name_id.ConnectionString = connection.global_connection material_name_id.SelectCommand = "SELECT TOP 100 PERCENT material_id, material_name FROM MATERIAL GROUP BY material_id, material_name ORDER BY material_id" material_name.DataBind() material_name.Items.Insert(0, New ListItem("SELECT TEST GROUP NAME", ""))
End If
End Sub
Private Sub Submit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Submit.Click
'*************************************************************************************************** ' Opening Datbase Connection & Inserting the data
'***************************************************************************************************
Dim cn As New SqlConnection(connection.global_connection) Dim oCommand As New SqlCommand
Try cn.Open()
Dim tran As SqlTransaction = cn.BeginTransaction()
oCommand.Connection = cn oCommand.CommandType = CommandType.Text oCommand.Transaction = tran
Try
oCommand.CommandText = " INSERT INTO TEST_NAME( test_group_id, test_name, test_short_name, test_price, test_specimen, test_material_id, test_sample_qty, test_report_in_days, test_pre_instruction,test_disclaimer ) Values ('" & group_name.SelectedValue & "','" & item_name.Text & "','" & test_short_name.Text & "','" & price.Text & "','" & test_specimen.SelectedItem.Text & "','" & material_name.SelectedValue & "', '" & sample_qty.SelectedItem.Text & "', '" & reporting_days.SelectedItem.Text & "', '" & Trim(instructions.Text) & "','" & Trim(disclaimer.Text) & "') " oCommand.ExecuteNonQuery()
tran.Commit() tran.Dispose()
Catch Ex As Exception
Response.Write(Err.Description()) tran.Rollback() tran.Dispose() cn.Dispose()
End Try
Catch Ex As Exception
Response.Write(Err.Description()) cn.Dispose()
Finally
cn.Dispose()
End Try
Response.Redirect("Add_Test_Item.aspx", True)
End Sub
End Class
Organization overview
We at Healthseva will develop & provide IT solutions aimed at re-engineering existing business practices, particularly in the healthcare industry, and help give cutting edge competitive advantages to our clients in their dealings with their constituents through the use of stable, simple, easy to use and implement technologies.
Healthseva Services• Application Development & Maintenance• Business Reengineering using IT• Process Automation solutions• System Integration with legacy systems• Data Conversion & Migration• Assistance in Recruitment & Selection
HealthSeva
Bridging Imagination & Technology
HealthSeva
Utility
(Receptionist, Peons, Security)
Director
HR Executive
Accounts Manager
Marketing Manager
Business
Development Manager
Q A Manager
Q A Team
Internal Auditors
Purchase Executive
Office Assistant
MR
The shaded rectangles have Grade Levels I, II, III with I as the lowest levels & III as the highest level.
Systems Engineer
Assistant Project Manager (PM)
Project Leader / Module Leader /
Team Leader
DGMProjects
Senior Software Engineer
Software Engineer
Vendor
Employee
Name Data type Size Key
Employee_id Bigint 8 Primary keyEmployee name Varchar 50Employee first name Varchar 50Employee middle name Varchar 50Employee last name Varchar 50Employee qualification details Varchar 500Employee specified details Varchar 500Employee super selection details Varchar 500Designation_id Bigint 8Grade_id Bigint 8Department_id Bigint 8Division_id Bigint 8Center_id Bigint 8Employee date of joining DatetimeEmployee date of confirmation DatetimeUser_id Bigint 8
Employee department
Name Data type Size Key
Department_id Bigint 8 Primary keyDepartment Varchar 50User_id Bigint 8
Employee designation
Name Data type Size key
Vendor_id Bigint 8 Primary keyVendor_category_id Bigint 8Vendor name Varchar 500Vendor address Varchar 500Vendor priority bigint 8User_id bigint 8
Name Data type Size Key
Designation_id Bigint 8 Primary keyDesignation Varchar 50User_id Bigint 8
Employee division
Name Data type Size Key
Division_id Bigint 8 Primary keyDivision Varchar 50User_id Bigint 8
Employee grade
Name Data type Size Key
Grade_id Bigint 8 Primary keyGrade Varchar 50User_id Bigint 8
Employee_title
Name Data type Size Key
Title_id Bigint 8 Primary keyTitle Varchar 50
Kit_Material_Issued
Name Data type Size Key
Kit_material_issued_id Bigint 8 Primary keyKit material issued Varchar 50Material_id Bigint 8Used Int 8User_id Bigint 8
Manifest temp test group items
Name Data type Size Key
Test name Varchar 50
Manifest test group
Name Data type Size Key
Manifest test group id Bigint 8 Primary keyManifest test group name Varchar 50User_id Bigint 8
Manifest test group item
Name Data type Size Key
Manifest_test_item_group_id
Bigint 8 Primary key
Manifest_test_group_id Bigint 8 Foreign keyTest_name_id Bigint 8 Foreign keyUser_id Bigint 8
Manifest vendor
Name Data type Size Key
Manifest vendor id Bigint 8 Primary keyVendor id Bigint 8Manifest_no Varchar 500Manifest datetime Date time 8Status Bigint 8Received datetime Date time 8User_id Bigint 8
Manifest vendor details
Name Data type Size Key
manifest_vendor_details_id
Bigint 8 Primary key
Manifest vendor id Bigint 8 Foreign keyKit material issue no Varchar 500 Foreign keyAccepted Bigint 8Analyzed Bigint 8User_id Bigint 8
BIBLIOGRAPHY
An introduction to AJAX and Atlas
By Eric peterson
Complete reference to SQL
By James groff and Paul weinberg
SQL SERVER 2005 BIBLE
By Paul neilson
www.amazon.com
www.goolge.com
www.pccode.com
ACKNOWLEDGEMENT
I am thankful to the authorities of Health Seva who were kind enough
to give me an opportunity to do my project work.
I would particularly like to thank Mr.Avadhut Borhade (C.T.O),
without whose help this project would not have taken off. He was positive,
open minded, considerate, immensely helpful and supported me all the way
during the course of this project.
I would also like to thank prof. Manesh khot and Kaustubh Arekar who
were my guide for project work. Without their valuable guidance and kind
attention, this project report would not have seen the light of day.
Also I would like to thank all my professors for being very much
resourceful, kind, helpful and unwavering faith in me assured that I come out
of woods whenever I encountered difficulties.
It is my earnest endeavour to express my sincere thanks to the faculty
for their kind co-operation, help and unending support.
Finally I wish to thank all my friends and the entire computer
department who directly or indirectly helped me in the compilation of this
project and to my family without whose support, motivation and
encouragement this would not have been possible.