public void LoadScheduleOnListView(ListView lv) { Schedule s = new Schedule(); DataTable dt = new DataTable(); dt = s.SELECT_ALL(); if (dt != null) { int ctr = 1; foreach (DataRow r in dt.Rows) { ListViewItem li = new ListViewItem(); li.Text = ctr.ToString(); li.SubItems.Add(r["template_name"].ToString()); li.SubItems.Add(r["first_half_in"].ToString()); li.SubItems.Add(r["first_half_out"].ToString()); li.SubItems.Add(r["second_half_in"].ToString()); li.SubItems.Add(r["second_half_out"].ToString()); li.SubItems.Add(r["hours_allocated"].ToString() + " Hours"); lv.Items.Add(li); ctr++; } } }//end load ins listview
public void LoadScheduleOnListView(ListView lv) { Schedule s = new Schedule(); DataTable dt = new DataTable(); dt = s.SELECT_ALL(); if (dt != null) { int ctr = 1; foreach (DataRow r in dt.Rows) { ListViewItem li = new ListViewItem(); li.Text = ctr.ToString(); li.SubItems.Add(r["template_name"].ToString()); li.SubItems.Add(r["first_half_in"].ToString()); li.SubItems.Add(r["first_half_out"].ToString()); li.SubItems.Add(r["second_half_in"].ToString()); li.SubItems.Add(r["second_half_out"].ToString()); li.SubItems.Add(r["hours_allocated"].ToString() + " Hours"); lv.Items.Add(li); ctr++; } } }
public void LoadSchedules(ComboBox cbo) { Schedule s= new Schedule(); DataTable dt = new DataTable(); dt = s.SELECT_ALL(); foreach (DataRow r in dt.Rows) { cbo.Items.Add(r["template_name"].ToString()); } }
public void LoadSchedules(ComboBox cbo) { Schedule s = new Schedule(); DataTable dt = new DataTable(); dt = s.SELECT_ALL(); foreach (DataRow r in dt.Rows) { cbo.Items.Add(r["template_name"].ToString()); } }