private void WorkSpeed_Tick(object sender, EventArgs e) { try { dataAccess.Work(StationID, EmployeeID); WorkSpeed.Interval = dataAccess.GetInterval(Convert.ToInt32(StationID)); } catch (DALException ex) { WorkSpeed.Stop(); MessageBox.Show(ex.Message); } }
private void DeactivateBtn_Click(object sender, EventArgs e) { string stationID = ActivatedLines.Text; try { dataAccess.Deactivate(stationID); WorkSpeed.Stop(); Refresh(); MessageBox.Show(StationID + " is deactivated"); } catch (NullReferenceException ex) { MessageBox.Show("Please connect first"); } }