public DataTable GetJobsPulic() { DAL.Job_DAL job = new DAL.Job_DAL(); DataTable t = job.GetJobsPulbicToday(); for (int i = 0; i < t.Rows.Count; i++) { DateTime tam = Convert.ToDateTime(t.Rows[i][2]); if (!tam.DayOfWeek.Equals(DateTime.Today.DayOfWeek)) { t.Rows[i].Delete(); } } return(t); }
public DataTable GetJobsPulic() { DAL.Job_DAL job = new DAL.Job_DAL(); DataTable t = job.GetJobsPulbicToday(); for (int i = 0; i < t.Rows.Count; i++) { DateTime tam = Convert.ToDateTime(t.Rows[i][2]); if (tam < DateTime.Now) { t.Rows[i].Delete(); } } t.AcceptChanges(); return(t); }