這些是員工輪休的初版 提供給大家做變化
Partial Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
If DropDownList1.SelectedItem.Text = "新增" Then
ListBox1.Items.Add(New ListItem("編號" & TextBox1.Text & " " & "姓名" & TextBox2.Text))

End If
If DropDownList1.SelectedItem.Text = "修改" Then
ListBox1.SelectedItem.Text = ("編號" & TextBox1.Text & " " & "姓名" & TextBox2.Text)
End If
If DropDownList1.SelectedItem.Text = "刪除" Then
ListBox1.Items.Remove(ListBox1.SelectedItem)

End If
TextBox1.Text = ""
TextBox2.Text = ""
End Sub

Protected Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Calendar1.SelectionChanged
For i As Integer = 0 To Calendar1.SelectedDates.Count - 1
ListBox2.Items.Add(New ListItem(ListBox1.SelectedItem.Text & "於" & Calendar1.SelectedDates(i) & "休假 "))
Next
End Sub
End Class

創作者介紹
創作者 jethro0119 的頭像
jethro0119

滷蛋與貢丸

jethro0119 發表在 痞客邦 留言(0) 人氣()