Private Sub initDDLByYear(ByVal dt As DataTable)

        ddlByYear.Items.Clear()
        ddlByYear.Items.Add(New ListItem(GetGlobalResourceObject("Resource1", "All"), "0"))


        If Not dt Is Nothing Then
            Dim years = (From r In dt.AsEnumerable
                    Select DateTime.Parse(r("create_date").ToString()).ToString("yyyy")).Distinct

            For Each y In years
                ddlByYear.Items.Add(New ListItem(y.ToString, y.ToString))
            Next

        End If
        
    End Sub

 

相关文章:

  • 2021-12-05
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-06-17
猜你喜欢
  • 2021-12-07
  • 2022-12-23
  • 2021-07-13
  • 2021-10-10
  • 2021-09-22
  • 2022-12-23
  • 2022-01-05
相关资源
相似解决方案