public DataTable GetShiftDetails(string username) { try { ScheduleDAL objShift = new ScheduleDAL(); DataTable dt = new DataTable(); dt = objShift.ReadNextShiftByUsername(username); foreach (DataRow dr in dt.Rows) { date = dr["Date"].ToString(); dateTime = DateTime.Parse(date); startShift = dr["StartShift"].ToString(); endShift = dr["EndShift"].ToString(); nextShift = startShift + " - " + endShift; } return(dt); } catch { throw; } }