private async void btnUpdate_Click(object sender, EventArgs e) { if (TableControl.SelectedTab == tabEmpl) { FormUpdateEmployee f = new FormUpdateEmployee(connectDB.sqlConnection) { Owner = this }; f.ShowDialog(); Employee refresh = new Employee(); await refresh.RefreshEmp(listViewEmp); } else if (TableControl.SelectedTab == tabCust) { FormUpdateCustomer f = new FormUpdateCustomer(connectDB.sqlConnection) { Owner = this }; f.ShowDialog(); Customer refresh = new Customer(); await refresh.RefreshCust(listViewCust); } else if (TableControl.SelectedTab == tabProv) { FormUpdateProvider f = new FormUpdateProvider(connectDB.sqlConnection) { Owner = this }; f.ShowDialog(); Provider refresh = new Provider(); await refresh.RefreshProv(listViewProv); } else if (TableControl.SelectedTab == tabSuppl) { FormUpdateSupply f = new FormUpdateSupply(connectDB.sqlConnection) { Owner = this }; f.ShowDialog(); Supply refresh = new Supply(); await refresh.RefreshSupp(listViewSuppl); } else if (TableControl.SelectedTab == tabProd) { FormUpdateProduct f = new FormUpdateProduct(connectDB.sqlConnection) { Owner = this }; f.ShowDialog(); Product refresh = new Product(); await refresh.RefreshProd(listViewProd); } else if (TableControl.SelectedTab == tabOrd) { FormUpdateOrder f = new FormUpdateOrder(connectDB.sqlConnection) { Owner = this }; f.ShowDialog(); Order refresh = new Order(); await refresh.RefreshOrd(listViewOrd); Product refresh2 = new Product(); await refresh2.RefreshProd(listViewProd); } }