Exemplo n.º 1
0
        protected void lnkDownload_Click(object sender, EventArgs e)
        {
            ObjectParameter totalCount          = new ObjectParameter("RecordCount", typeof(int));
            List <Report_Users_All_Result> list = db.Report_Users_All(null, null, null, totalCount).ToList();

            rptUsers.DataSource = list;
            rptUsers.DataBind();
            Utilities.DownloadAsExcel("users", rptUsers);
        }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     db = new ClientDBEntities();
     if (!IsPostBack)
     {
         //Debug.WriteLine("user page load size=" + UsersPager.PageSize + " index=" + UsersPager.PageIndex);
         ObjectParameter totalCount          = new ObjectParameter("RecordCount", typeof(int));
         List <Report_Users_All_Result> list = db.Report_Users_All(UsersPager.PageIndex, UsersPager.PageSize, Request.QueryString[SORT_KEY], totalCount).ToList();
         UsersPager.RecordCount = Convert.ToInt32(totalCount.Value);
         rptUsers.DataSource    = list;
         rptUsers.DataBind();
     }
 }