DataTable result= userdao.getdateanddayfortimetable1(comp); DataTable period = userdao.getperiodfortimetable(); int periodcount = period.Rows.Count; int daycount = result.Rows.Count; DataTable dt = new DataTable(); for (int i = 0; i < periodcount; i++) { dt.Columns.Add(); } for (int j = 0; j < daycount; j++) { dt.Rows.Add(); } for (int k = 0; k < periodcount; k++) { dt.Columns[k].ColumnName = period.Rows[k]["PeriodNo"].ToString() + "(" + period.Rows[k]["StartTime"].ToString() + "-" + period.Rows[k]["EndTime"].ToString() + ")"; } PLayer.TimeTable timetable = new PLayer.TimeTable(); timetable.timetablegrid.DataSource = dt; for (int i = 0; i < daycount; i++) { timetable.timetablegrid.Rows[i].HeaderCell.Value = result.Rows[i]["Working_day"].ToString(); } timetable.Show();
for (int i = 0; i < daycount; i++) { timetable.timetablegrid.Rows[i].HeaderCell.Value=(i+1).Tostring() }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)