Пример #1
0
        void SetupExptList()
        {
            DropDownList_Expt.Items.Clear();
            PhysicsExperimentList PhExList1 = new PhysicsExperimentList(); PhExList1.Load_All();

            foreach (PhysicsExperiment p in PhExList1.m_list)
            {
                ListItem l = new ListItem(p.ExperimentCode + " - " + p.ExperimentDescription + "(" + p.topic + ")", p.Id.ToString());
                DropDownList_Expt.Items.Add(l);
            }
            Update_ExptDetails();
        }
Пример #2
0
        protected void UpdateExptList()
        {
            DropDownList_Expt.Items.Clear();
            string s = RadioButtonList1.SelectedValue;
            int    i = System.Convert.ToInt32(s);
            PhysicsExperimentList PhExList1 = new PhysicsExperimentList(); PhExList1.Load_All();

            foreach (PhysicsExperiment p in PhExList1.m_list)
            {
                if ((p.KeyStage == i) || (i == 0))
                {
                    ListItem l = new ListItem(p.ExperimentCode + " - " + p.ExperimentDescription + "(" + p.topic + ")", p.Id.ToString());
                    DropDownList_Expt.Items.Add(l);
                }
            }
            Update_ExptDetails();
        }