private void displayDetails() { try { dgvDailyTimeRecord.DataSource = null; ldtDailyTimeRecord = loDailyTimeRecord.getDailyTimeRecordDates(dgvEmployeeList.CurrentRow.Cells[0].Value.ToString(), dtpFrom.Value, dtpTo.Value); dgvDailyTimeRecord.DataSource = ldtDailyTimeRecord; dgvDailyTimeRecord.Columns[0].Frozen = true; dgvDailyTimeRecord.Columns[1].Frozen = true; dgvDailyTimeRecord.Columns[2].Frozen = true; dgvDailyTimeRecord.Columns[3].Frozen = true; dgvDailyTimeRecord.Columns[0].ReadOnly = true; dgvDailyTimeRecord.Columns[1].ReadOnly = true; dgvDailyTimeRecord.Columns[2].ReadOnly = true; dgvDailyTimeRecord.Columns[3].ReadOnly = true; dgvDailyTimeRecord.Columns[4].ReadOnly = true; dgvDailyTimeRecord.Columns[0].DefaultCellStyle.BackColor = SystemColors.Control; dgvDailyTimeRecord.Columns[1].DefaultCellStyle.BackColor = SystemColors.Control; dgvDailyTimeRecord.Columns[2].DefaultCellStyle.BackColor = SystemColors.Control; dgvDailyTimeRecord.Columns[3].DefaultCellStyle.BackColor = SystemColors.Control; dgvDailyTimeRecord.Columns[4].DefaultCellStyle.BackColor = SystemColors.Control; dgvDailyTimeRecord.Columns[11].DefaultCellStyle.BackColor = SystemColors.Info; dgvDailyTimeRecord.Columns[12].DefaultCellStyle.BackColor = SystemColors.Info; dgvDailyTimeRecord.Columns[13].DefaultCellStyle.BackColor = SystemColors.Info; dgvDailyTimeRecord.Columns[14].DefaultCellStyle.BackColor = SystemColors.Info; } catch { } }
public DataTable getDailyTimeRecordDates(string pEmployeeNo, DateTime pFromDate, DateTime pToDate) { return(loDailyTimeRecord.getDailyTimeRecordDates(pEmployeeNo, pFromDate, pToDate)); }