You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
CaiQie/RfidWeb/Frm/FromUploadLog.cs

60 lines
1.5 KiB
C#

using HZH_Controls.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using DB.Service;
namespace RfidWeb.Frm
{
public partial class FromUploadLog : UserControl
{
public FromUploadLog()
{
InitializeComponent();
Init();
}
UpdateLogService updateLogService=new UpdateLogService();
private void Init()
{
this.dataGridView1.AutoGenerateColumns = false;
ucPagerControl21.PageModel = PageModel.PageCount;
ucPagerControl21.PageIndex = 1;
ucPagerControl21.PageSize = 20;
}
private void Replace()
{
ucPagerControl21.PageIndex = 1;
ucPagerControl21_ShowSourceChanged(new object());
}
private void ucPagerControl21_ShowSourceChanged(object currentSource)
{
string key = textBoxSel.Text;
int index = ucPagerControl21.PageIndex;
var page = updateLogService.GetPagedList(ucPagerControl21.PageSize,
ucPagerControl21.PageSize,key);
ucPagerControl21.PageCount = page.TotalPages;
this.dataGridView1.DataSource = page.Items;
}
private void ucBtnSelect_BtnClick_1(object sender, EventArgs e)
{
Replace();
}
}
}