private void VerifyTextFields() { if (string.IsNullOrWhiteSpace(txtDateField.Text)) { throw new InvalidOperationException("Job date is required."); } if (string.IsNullOrWhiteSpace(txtHoursWorked.Text)) { throw new InvalidOperationException("Hours worked is required."); } if (TimeWorked.FromColonFormat(txtHoursWorked.Text).AsFloat() < 0.2f) { throw new InvalidOperationException("Hours worked must be greater than zero."); } if (string.IsNullOrWhiteSpace(txtCostCode.Text)) { throw new InvalidOperationException("Cost code is required."); } if (string.IsNullOrWhiteSpace(txtJobDescription.Text)) { throw new InvalidOperationException("Job description is required."); } }
public void SetSelectedPickerObject(object o) { timeWorked = (TimeWorked)o; }
public HoursWorkedPickerModel(TimeWorked timeWorked) { this.timeWorked = timeWorked; }