protected void Page_Load(object sender, EventArgs e) { if (Session["ttid"] == null) { Response.Redirect("index.aspx"); } else { if (!Page.IsPostBack) { ////Redirect user to the game name.InnerText = new User().getName(Convert.ToInt32(Session["ttid"])); money.InnerText = money.InnerText + new User().GetCashWithUser(Convert.ToInt32(Session["ttid"])); var i = new Cars().GetCarsOwnedByUser(Convert.ToInt32(Session["ttid"])); gris_cars_with_user.DataSource = i; gris_cars_with_user.DataBind(); d.DataSource = i; d.DataBind(); a.DataSource = i; a.DataBind(); //GridView2.DataSource = new user_parking_view().GetUsersOnMyParking(Convert.ToInt32(Session["ttid"])); //GridView2.DataBind(); } 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(); grid_view_parked_cars.DataSource = new user_parking_view().MyCarsParked(Convert.ToInt32(Session["ttid"])); grid_view_parked_cars.DataBind(); } }
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 GridView_public_logs_PageIndexChanging(object sender, GridViewPageEventArgs e) { GridView_public_logs.PageIndex = e.NewPageIndex; GridView_public_logs.DataBind(); }