示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1));
            Response.Cache.SetCacheability(HttpCacheability.NoCache);
            Response.Cache.SetNoStore();

            username = (string)Session["username"];
            userId   = int.Parse(Session["userid"].ToString());
            string userStream = service.DetermineUserStream(userId);

            dt2 = ToDataTable <DbJob>(service.RecentJobs(userStream).ToList());

            dt2.Columns.Remove("UserId");
            dt2.Columns.Remove("JobId");
            dt2.Columns.Remove("Description");

            gvRecentJobs.DataSource = dt2;
            gvRecentJobs.DataBind();
        }