Drop a timer onto customer view to refresh the customer list.

Add RefreshCustomerView() to update the customer list on demand.
This commit is contained in:
kougyoku 2019-10-11 21:31:43 -07:00
parent 58006f2955
commit 8781c5219d
1 changed files with 21 additions and 0 deletions

View File

@ -16,5 +16,26 @@ namespace QueueSys
{
InitializeComponent();
}
private void frmCustomerView_Load(object sender, EventArgs e)
{
timer1.Start();
RefreshCustomerView();
}
private void RefreshCustomerView()
{
SqliteDataAccess sdaCxView = new SqliteDataAccess();
List<CustomerView> cvList = new List<CustomerView>();
cvList = sdaCxView.LoadCustomerView();
dgvCustomerView.DataSource = cvList;
}
private void timer1_Tick(object sender, EventArgs e)
{
RefreshCustomerView();
}
}
}