void InitAbsenceControl() { if (_currentControl == null || !(_currentControl is AbsenceListControl)) { ReleaseControl(); ucAbsenceList = new AbsenceListControl(); ucAbsenceList.Parent = pcClient; ucAbsenceList.Dock = DockStyle.Fill; ucAbsenceList.Show(); ucAbsenceList.Entity = Entity; ucAbsenceList.InitControl(); _currentControl = ucAbsenceList; CreateBarControl(); } }
void InitAbsenceControl() { if (_currentControl == null || !(_currentControl is AbsenceListControl)) { ReleaseControl(); ucAbsenceList = new AbsenceListControl(); ucAbsenceList.Parent = pcClient; ucAbsenceList.Dock = DockStyle.Fill; ucAbsenceList.Show(); ucAbsenceList.Entity = Entity; ucAbsenceList.InitControl(); _currentControl = ucAbsenceList; CreateBarControl(); } }