public EntryTableControl(int num, long id) { InitializeComponent(); Table_id = id; Num = num; Console.WriteLine("Table ID from entry" + id); table = new Table(num, Table_id); if (num > 0) { lblNum.Text = " " + num; } else { lblNum.Text = "Về"; } connection = helper.DBConnection.Instance(); table.onPayedEvent += Table_onPayedEvent; BackColor = Color.LightGreen; getDate(); }
public TableListForm() { InitializeComponent(); tableListNum = new List <int>(); entries = new List <EntryTableControl>(); //timer to update the datagridview dBConnection = helper.DBConnection.Instance(); if (dBConnection.IsConnect()) { dataGridView1.DataSource = dBConnection.currentOrderTable(); dataGridView1.Invalidate(); } else { MessageBox.Show("Ko ket noi dc voi du lieu"); } dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.AllCells; dataGridView1.Columns["ID"].Visible = false; }