|
san
Date:: Jan 12, 2009
Time:: 17:42
|
---View Problem List---
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<!--#include virtual="/helpdesk/Test/connection.asp" -->
<body>
<%
Dim strSQL, result
' Set SQL statement
strSQL = "GetAllOpenProblems"
'Execute teh SQL and obtain resultset
Set result = objconn.Execute(strsql)
'Check for Errors
If objconn.Errors.Count > 0 then
Response.Write("Error Occurred: <br />")
Else
%>
<h3 align="center">
<%Response.Write("The following Tickets are opened today")%></h3>
<table width="98%" height="140" border="1" align="center" cellpadding="3" cellspacing="3">
<tr bgcolor="#CCCCCC" bordercolor="#999999"><th width="9%">Problem ID</th>
<th width="24%">Team Member Name</th>
<th width="14%">Subject</th>
<th width="29%">Component</th>
<th width="13%">Status </th>
<th width="11%">Edit</th>
</tr>
<%Do Until result.EOF%>
<tr><td><%=result("ProblemStatusID")%></td>
<td><%=result("TeamMemberName")%></td>
<td><%=result("ProblemTitle")%></td>
<td><%=result("DepartmentName")%></td>
<td><%=result("ProblemStatus")%></td>
<%
Dim ProblemStatusID
ProblemStatusID=Request.QueryString("ProblemStatusId") %>
<td><a href="problemdetails.asp?ProblemStatusID=<% = result("ProblemStatusId") %> ">Edit</a></td></tr>
<%
result.MoveNext
loop
End If
'Close Database
'
objconn.Close
%>
</table>
</body>
</html>
---Problem Details.asp----
<%@ LANGUAGE="VBScript" %>
<%
Option Explicit
'Buffer the response, so Response.Expires can be used
Response.Buffer = TRUE
%>
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t...
<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include virtual="helpdesk/Test/connection.asp" -->
<head>
<title>ProblemDetails</title>
<%
Dim ProblemStatusID
ProblemStatusID=Request.QueryString("ProblemStatusID") %>
<%
Dim strSQL, result
ProblemStatusID = CLNG("0" & Request.QueryString("ProblemStatusId") )
If ProblemStatusID <= 0 Then
Response.Write "BOGUS!"
Response.End
End If
' Set SQL statement
strSQL = "GetInformationForProblemStatusId " & ProblemStatusID
' For Debug
'Response.Write "DEBUG: " & strSQL & "<HR>"
'Execute the SQL and obtain resultset
Set result = objConn.Execute(strsql)
'Check for Errors
If objconn.Errors.Count > 0 then
Response.Write("Error Occurred: <br />")
Else
%>
<h3 align="center">
Edit Problem <%=result("ProblemStatusId")%>
</h3>
</head>
<body>
<form id="CloseProblem" action="closeproblem.asp" method="post" name="ProblemDetails">
<table>
<tr>
<td colspan="2" align="right"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><table border="0" cellspacing="0">
<tr>
<td><b>ProblemStatusId</b> </td>
<td><%=result("ProblemStatusId")%> </td>
</tr>
<tr>
<td><b>UserName</b> </td>
<td><%=result("UserName")%> </td>
</tr>
<tr>
<td><b>EMail:</b> </td>
<td><%=result("UserEmail")%> </td>
</tr>
<tr>
<td><b>Location:</b> </td>
<td><%=result("UserLocation")%> </td>
</tr>
<tr>
<td><b>Phone:</b> </td>
<td><%=result("UserPhone")%> </td>
</tr>
<tr>
<!--Department-->
<td><b>Component:</b> </td>
<td><%=result("DepartmentName")%> </td>
</tr>
<tr>
<td><b>NH:</b> </td>
<td><%=result("UserNH")%> </td>
</tr>
<tr>
<td><b>SSN:</b> </td>
<td><%=result("UserSSN")%> </td>
</tr>
<tr>
<td><b>IsRepresentativeInvolved:</b> </td>
<td><%=result("IsRepresentativeInvolved")%> </td>
</tr>
<tr>
<td><b>RepresentativeSSN:</b> </td>
<td><%=result("RepresentativeSSN")%> </td>
</tr>
<tr>
<td><b>RepresentativeZipCode:</b> </td>
<td><%=result("RepresentativeZipCode")%> </td>
</tr>
<tr>
<td><b>OrganizationName:</b> </td>
<td><%=result("OrganizationName")%> </td>
</tr>
<tr>
<td><b>IsProblem/Question:</b> </td>
<td><%=result("IsProblemQuestion")%> </td>
</tr>
<tr>
<td><b>IsComment:</b> </td>
<td><%=result("IsComment")%> </td>
</tr>
<tr>
<td><b>ProblemTitle:</b> </td>
<td><%=result("ProblemTitle")%> </td>
</tr>
<tr>
<td><b>ProblemDescription:</b> </td>
<td><%=result("ProblemDescription")%> </td>
</tr>
<tr>
<td><b>Attachment :</b> </td>
<td><%=result("Attachment")%> </td>
</tr>
<tr>
<td><b>Solution :</b> </td>
<td><textarea cols="80" rows="12" id="txtBox6" name="Solution"></textarea></td>
</tr>
</table>
<tr>
<td><div align="center"><a href="closeproblem.asp?ProblemStatusID=<% = result("ProblemStatusId") %> ">Close the Problem</a></div></td>
<!--<input type="submit" id="btnSubmit" name="Close the Problem" value="Close Problem">-->
</td>
</tr>
<%Do Until result.EOF%>
<%
result.MoveNext
loop
End If
'Close Database
'
objconn.Close
%>
</table>
</form>
</body>
</html>
--Close the Problem--
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-t...
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Problem is Closed</title>
<!--#include virtual="/helpdesk/Test/connection.asp" -->
<%
Dim ProblemStatusID
ProblemStatusID=Request.QueryString("ProblemStatusID") %>
<%
Dim strSQL, result
ProblemStatusID = CLNG("0" & Request.QueryString("ProblemStatusId") )
If ProblemStatusID <= 0 Then
Response.Write "BOGUS!"
Response.End
End If
' Set SQL statement
strSQL = "UpdateProblemStatusIdToClose " & ProblemStatusID
' For Debug
'Response.Write "DEBUG: " & strSQL & "<HR>"
'Execute the SQL and obtain resultset
Set result = objConn.Execute(strsql)
'Check for Errors
If objconn.Errors.Count > 0 then
Response.Write("Error Occurred: <br />")
Else
%>
<h3 align="center">
Problem is Closed
</h3>
<%
End If
'Close Database
'
objconn.Close
%>
</h3>
</head>
</head>
<body>
<table>
<tr>
<td colspan="2" align="right"></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="2"><table border="0" cellspacing="0">
<tr>
<td><b>ProblemStatusId</b> </td>
<td><%=result("ProblemStatusId")%> </td>
</tr>
<tr>
<td><b>UserName</b> </td>
<td><%=result("UserName")%> </td>
</tr>
<tr>
<td><b>EMail:</b> </td>
<td><%=result("UserEmail")%> </td>
</tr>
<tr>
<td><b>Location:</b> </td>
<td><%=result("UserLocation")%> </td>
</tr>
<tr>
<td><b>Phone:</b> </td>
<td><%=result("UserPhone")%> </td>
</tr>
<tr>
<!--Department-->
<td><b>Component:</b> </td>
<td><%=result("DepartmentName")%> </td>
</tr>
<tr>
<td><b>NH:</b> </td>
<td><%=result("UserNH")%> </td>
</tr>
<tr>
<td><b>SSN:</b> </td>
<td><%=result("UserSSN")%> </td>
</tr>
<tr>
<td><b>IsRepresentativeInvolved:</b> </td>
<td><%=result("IsRepresentativeInvolved")%> </td>
</tr>
<tr>
<td><b>RepresentativeSSN:</b> </td>
<td><%=result("RepresentativeSSN")%> </td>
</tr>
<tr>
<td><b>RepresentativeZipCode:</b> </td>
<td><%=result("RepresentativeZipCode")%> </td>
</tr>
<tr>
<td><b>OrganizationName:</b> </td>
<td><%=result("OrganizationName")%> </td>
</tr>
<tr>
<td><b>IsProblem/Question:</b> </td>
<td><%=result("IsProblemQuestion")%> </td>
</tr>
<tr>
<td><b>IsComment:</b> </td>
<td><%=result("IsComment")%> </td>
</tr>
<tr>
<td><b>ProblemTitle:</b> </td>
<td><%=result("ProblemTitle")%> </td>
</tr>
<tr>
<td><b>ProblemDescription:</b> </td>
<td><%=result("ProblemDescription")%> </td>
</tr>
<tr>
<td><b>Attachment :</b> </td>
<td><%=result("Attachment")%> </td>
</tr>
<tr>
<td><b>Solution :</b> </td>
<!-- <td><%result("Solution")%></td>-->
</tr>
</table>
</table>
</body>
</html>
/****** Object: Table [dbo].[ProblemSolution] Script Date: 01/12/2009 17:47:10 ******/
CREATE TABLE [dbo].[ProblemSolution](
[ProblemSolutionId] [int] IDENTITY(1,1) NOT NULL,
[ProblemStatusId] [int] NOT NULL,
[Solution] [nvarchar] (1000) NOT NULL,
CONSTRAINT [PK_ProblemSolution] PRIMARY KEY CLUSTERED
(
[ProblemSolutionId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ProblemSolution_ProblemStatusId] ON [dbo].[ProblemSolution]
(
[ProblemStatusId] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
/****** Object: ForeignKey [FK_ProblemStatus_ProblemSolution] Script Date: 1/08/2009 17:47:10 ******/
ALTER TABLE [dbo].[ProblemSolution] WITH CHECK ADD CONSTRAINT [FK_ProblemStatus_ProblemSolution] FOREIGN KEY([ProblemStatusID])
REFERENCES [dbo].[ProblemStatus] ([ProblemStatusId])
GO
ALTER TABLE [dbo].[ProblemSolution] CHECK CONSTRAINT [FK_ProblemStatus_ProblemSolution]
GO
----------------
USE [HelpDesk]
GO
/****** Object: StoredProcedure [dbo].[UpdateProblemStatusIdToClose] Script Date: 01/12/2009 13:18:21 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
--This stored Procedure updates the status from Open to Closed
--Use this to update the status once team member is ready to close the ticket
ALTER Proc [dbo].[UpdateProblemStatusIdToClose]
(
@ProblemStatusId int,
@Solution nvarchar
)
As
Declare
@errorMsg nvarchar(128)
-- Insert Solution into the ProblemSolutions Table
INSERT INTO ProblemSolution
(@ProblemStatusID,@Solution)
-- Next, Update existing records
Update ProblemStatus
Set ProblemStatus = 'CLOSED'
Where ProblemStatusId = @problemStatusId
If @@error <> 0
Begin
select @errorMsg = 'Update Problem Status to Close failed for ProblemStatusId: ' + cast(@problemStatusId as varchar)
End
--------------------------
Problem is Closed
ProblemStatusId ADODB.Recordset error '800a0cc1'
Item cannot be found in the collection corresponding to the requested name or ordinal.
/helpdesk/test/closeproblem.asp, line 57
|