示例#1
0
        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
示例#2
0
        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++;
                }
            }
        }
示例#3
0
        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());
            }
        }
示例#4
0
        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());
            }
        }