public IList<ExamTestInfo> Get(int year)
        {
            IList<ExamTestInfo> list = new List<ExamTestInfo>();
            Dictionary<string, int> t = SelectCodeYear();
            foreach (KeyValuePair<string, int> pair in t)
            {
                if (pair.Value == year)
                {
                    ExamTestInfo info = Select(pair.Key); 

                    list.Add(info);
                }
            }
            return list;
        }

 

 private void InitPlanDropDownList()
        {
            this.ddl_PlanCode.Items.Clear();
            Dictionary<string, int> codes = IExamPlanService.GetCodeYear();
            foreach (KeyValuePair<string, int> pair in codes)
            {
                ListItem item = new ListItem();
                if (pair.Value == DateTime.Now.Year)
                {
                    item.Text = "[本年度]" + pair.Key;
                    if (ddl_PlanCode.SelectedIndex==-1)
                        item.Selected = true;
                }
                else
                {
                    item.Text =pair.Key;
                }
                item.Value = pair.Key;
                this.ddl_PlanCode.Items.Add(item);
            }

        }

 

相关文章:

  • 2021-09-13
  • 2021-12-01
  • 2021-10-18
  • 2022-12-23
猜你喜欢
  • 2021-10-09
  • 2021-11-27
  • 2021-07-21
  • 2022-02-09
  • 2022-12-23
  • 2021-07-28
  • 2021-11-23
相关资源
相似解决方案