/// <summary> /// Cache the OccurrenceTypeAttributes for the given attendanceTypeID /// </summary> /// <param name="attendanceTypeID"></param> private void CacheOTAs(int attendanceTypeID) { OccurrenceTypeAttributeCollection otas = new OccurrenceTypeAttributeCollection(attendanceTypeID); foreach (OccurrenceTypeAttribute ota in otas) { cachedOTAs.Add(ota.OccurrenceTypeId, ota); } }
private void ShowList() { // disable the add button if there are no more available occurrence types if (GetAvailableOccurrenceTypes().Count == 0) { dgList.AddEnabled = false; } else { dgList.AddEnabled = true; } pnlList.Visible = true; pnlEdit.Visible = false; dgList.EditEnabled = _editEnabled; OccurrenceTypeAttributeCollection table = new OccurrenceTypeAttributeCollection(); table.GetOccurrenceTypeAttributeByGroupId(_groupID); dgList.DataSource = table; dgList.DataBind(); }