public void LoadHoldData(HoldData holdData) { ResetControlData(); TimeSpan zero = new TimeSpan(0, 0, 0); if (GetElapsedTime() != zero) { // if there is a client loaded with the timer started already // We need to decide if we want to throw it away. Probably will // pop up verifying that user wants to throw current away with old one // let's just make sure both the hold area and the select Client area are disabled unless the client area is empty throw new Exception("Need to have a clear client actions before we load data"); } else { Client = holdData.Client; lbl_clientName.Text = Client.FullName; cmbBox_typeOfWorkDone.SelectedItem = holdData.WorkType; txtBox_notes.Text = holdData.Notes; StartTime = holdData.StartTime; digitalDisplay1.SetElapasedTime(holdData.ElapsedTime); this.Enabled = true; this.Invalidate(); } }
public WorkOnHold(ClientActions actions) { data = new HoldData(actions); InitializeComponent(); lbl_name.Text = data.Client.FullName; }