-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPreviousLogs.aspx.cs
38 lines (34 loc) · 1.11 KB
/
PreviousLogs.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class PreviousLogs : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
// Response.Redirect("leaders.html");
if(Session["ttid"] == null)
{
Response.Redirect("index.aspx");
}
else
{
GridView_public_logs.DataSource = new ParkingLog().GetLogsPublic(Convert.ToInt32(Session["ttid"]));
GridView_public_logs.DataBind();
grid_previous.DataSource = new ParkingLog().GetLogs(Convert.ToInt32(Session["ttid"]));
grid_previous.DataBind();
}
}
protected void grid_previous_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
grid_previous.PageIndex = e.NewPageIndex;
grid_previous.DataBind();
}
protected void GridView_public_logs_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
GridView_public_logs.PageIndex = e.NewPageIndex;
GridView_public_logs.DataBind();
}
}