Exemplo n.º 1
0
 /// <summary>
 /// 删除单个用户时的数据绑定
 /// </summary>
 protected void dlYearDelBind()
 {
     var yearDic = new BindXML().BindYearDic();
     dlYearDel.DataSource = yearDic;
     dlYearDel.DataTextField = "Value";
     dlYearDel.DataValueField = "Key";
     dlYearDel.SelectedIndex = 1;
     searchYear = yearDic.ElementAt(1).Key;
     dlYearDel.DataBind();
 }
Exemplo n.º 2
0
 public void dlWorkTimeBind()
 {
     var workTimeDic = new BindXML().BindWorkTime();
     dlWorkTime.DataSource = workTimeDic;
     dlWorkTime.DataTextField = "Key";
     dlWorkTime.DataValueField = "Value";
     dlWorkTime.SelectedIndex = 0;
     searchCondition.WorkTime = workTimeDic.ElementAt(0).Value;
     dlWorkTime.DataBind();
 }
Exemplo n.º 3
0
 public void dlMonthBind()
 {
     var monthDic = new BindXML().BindMonths();
     dlMonth.DataSource = monthDic;
     dlMonth.DataTextField = "Key";
     dlMonth.DataValueField = "Value";
     dlMonth.SelectedIndex = DateTime.Now.Month - 1;
     searchCondition.Month = monthDic.ElementAt(DateTime.Now.Month - 1).Value;
     dlMonth.DataBind();
 }
Exemplo n.º 4
0
 protected void dlUserNameBind(string year)
 {
     var userDic = new BindXML().BindUserName(year);
     dlUserName.DataSource = userDic;
     dlUserName.DataTextField = "Value";
     dlUserName.DataValueField = "Key";
     if (searchCondition != null && userDic.Count > 1)
     {
         searchCondition.UserName = userDic.ElementAt(0).Key;
     }
     dlUserName.DataBind();
 }