-
Notifications
You must be signed in to change notification settings - Fork 0
/
Wait.aspx.cs
45 lines (41 loc) · 1.72 KB
/
Wait.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
public partial class Wait : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
CCWeb objCCWeb = new CCWeb();
if (Request.QueryString["StrQuery"] != null)
{
string strResult = "";
string strQuery = "";
if (Request.QueryString["StrQuery"] == "User")
{
//strQuery = "SELECT '' AS SNo,AM.LIBAuthorID,AuthorName" + Session["Type"].ToString() + " FROM LIBAuthorMaster AM INNER JOIN LIBCollectionAuthorDetails CD ON AM.LIBAUTHORID=CD.LIBAUTHORID WHERE LIBCollectionDetailID=" + Request.QueryString["Value"] + " and LIBLIBRARYID=" + Session["LibraryID"] + "";
strQuery = "EXEC spUserOnline " + Session["UID"] + ",'" + Session.SessionID.Replace("'","''") + "',''";
}
SqlDataReader sqlRdr = objCCWeb.BindReader(strQuery);
while (sqlRdr.Read())
{
for (int intForLoop = 0; intForLoop < sqlRdr.FieldCount; intForLoop++)
{
strResult = strResult + sqlRdr.GetValue(intForLoop).ToString() + "^";
}
if (strResult != "") strResult = strResult.Remove(strResult.Length - 1);
strResult = strResult + "~";
}
if (strResult != "") strResult = strResult.Remove(strResult.Length - 1);
sqlRdr.Close();
sqlRdr.Dispose();
Response.Clear();
Response.ContentType = "text/xml";
Response.Write(strResult);
Response.End();
}
}
}