private void SetupGrid() { if (ucTimes == null) { ucTimes = new UserControls.TimeEditGrid(); ucTimes.Dock = DockStyle.Fill; ucTimes.EditFormClosing += new FormClosingEventHandler(ucTimes_EditFormClosing); pnlGrid.Controls.Add(ucTimes); } ucTimes.SetupGrid(OperationsReadOnly.GetTimeEntryForDate(dtpFilterDate.Value, m_currUser), m_currUser); }
/// <summary> /// Populate the times grid /// </summary> private void SetupGrid() { if (dgHistory == null) { dgHistory = new UserControls.TimeEditGrid(); //dgHistory.Anchor = ( (AnchorStyles)AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top ); dgHistory.Dock = DockStyle.Fill; dgHistory.EditFormClosing += new FormClosingEventHandler(tmEdit_FormClosing); tabPage1.Controls.Add(dgHistory); } if (showAllForDay) { dgHistory.SetupGrid(OperationsReadOnly.GetTimeEntryForDate(OperationsReadOnly.RoundToMinute(DateTime.Now), m_currUser), m_currUser); } else { dgHistory.SetupGrid(OperationsReadOnly.GetRecentTimeEntry(5, m_currUser), m_currUser); } }