มีเรื่องรบกวนพี่ๆน้องๆผู้รู้หน่อยจ้า (ด่วนนะ) มือใหม่จ้า
เวลารันแล้วมันขึ้น error :: Syntax error in INSERT INTO statement นะจ๊ะ เขียนโค้ตดังนี้นะ ผิดตรงไหนหรือ Imports System.Data Imports System.Data.OleDb Public Class FrmStartwork Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
Public Sub New() MyBase.New()
'This call is required by the Windows Form Designer. InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub
'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox Friend WithEvents BtnExit As System.Windows.Forms.Button Friend WithEvents BtnSave As System.Windows.Forms.Button Friend WithEvents BtnEdit As System.Windows.Forms.Button Friend WithEvents BtnDelete As System.Windows.Forms.Button Friend WithEvents BtnAddNew As System.Windows.Forms.Button Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox Friend WithEvents BtnSearch As System.Windows.Forms.Button Friend WithEvents TxtSearch As System.Windows.Forms.TextBox Friend WithEvents BtnLast As System.Windows.Forms.Button Friend WithEvents BtnNext As System.Windows.Forms.Button Friend WithEvents BtnPrev As System.Windows.Forms.Button Friend WithEvents BtnFirst As System.Windows.Forms.Button Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents LbDate As System.Windows.Forms.Label Friend WithEvents LbEmpId As System.Windows.Forms.Label Friend WithEvents DTDate As System.Windows.Forms.DateTimePicker Friend WithEvents DTWorkOut As System.Windows.Forms.DateTimePicker Friend WithEvents DTWorkIn As System.Windows.Forms.DateTimePicker Friend WithEvents LbWorkIn As System.Windows.Forms.Label Friend WithEvents LbWorkOut As System.Windows.Forms.Label Friend WithEvents TxtEmpID As System.Windows.Forms.TextBox <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent() Me.GroupBox2 = New System.Windows.Forms.GroupBox Me.BtnExit = New System.Windows.Forms.Button Me.BtnSave = New System.Windows.Forms.Button Me.BtnEdit = New System.Windows.Forms.Button Me.BtnDelete = New System.Windows.Forms.Button Me.BtnAddNew = New System.Windows.Forms.Button Me.GroupBox4 = New System.Windows.Forms.GroupBox Me.BtnSearch = New System.Windows.Forms.Button Me.TxtSearch = New System.Windows.Forms.TextBox Me.BtnLast = New System.Windows.Forms.Button Me.BtnNext = New System.Windows.Forms.Button Me.BtnPrev = New System.Windows.Forms.Button Me.BtnFirst = New System.Windows.Forms.Button Me.GroupBox1 = New System.Windows.Forms.GroupBox Me.LbWorkOut = New System.Windows.Forms.Label Me.LbWorkIn = New System.Windows.Forms.Label Me.DTDate = New System.Windows.Forms.DateTimePicker Me.DTWorkOut = New System.Windows.Forms.DateTimePicker Me.DTWorkIn = New System.Windows.Forms.DateTimePicker Me.LbDate = New System.Windows.Forms.Label Me.TxtEmpID = New System.Windows.Forms.TextBox Me.LbEmpId = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.GroupBox2.SuspendLayout() Me.GroupBox4.SuspendLayout() Me.GroupBox1.SuspendLayout() Me.SuspendLayout() ' 'GroupBox2 ' Me.GroupBox2.BackColor = System.Drawing.Color.LightSteelBlue Me.GroupBox2.Controls.Add(Me.BtnExit) Me.GroupBox2.Controls.Add(Me.BtnSave) Me.GroupBox2.Controls.Add(Me.BtnEdit) Me.GroupBox2.Controls.Add(Me.BtnDelete) Me.GroupBox2.Controls.Add(Me.BtnAddNew) Me.GroupBox2.Location = New System.Drawing.Point(32, 88) Me.GroupBox2.Name = "GroupBox2" Me.GroupBox2.Size = New System.Drawing.Size(384, 48) Me.GroupBox2.TabIndex = 17 Me.GroupBox2.TabStop = False ' 'BtnExit ' Me.BtnExit.BackColor = System.Drawing.Color.Gray Me.BtnExit.FlatStyle = System.Windows.Forms.FlatStyle.System Me.BtnExit.Location = New System.Drawing.Point(288, 16) Me.BtnExit.Name = "BtnExit" Me.BtnExit.Size = New System.Drawing.Size(64, 24) Me.BtnExit.TabIndex = 12 Me.BtnExit.Tag = "" Me.BtnExit.Text = "ปิด" ' 'BtnSave ' Me.BtnSave.BackColor = System.Drawing.Color.Gray Me.BtnSave.FlatStyle = System.Windows.Forms.FlatStyle.System Me.BtnSave.Location = New System.Drawing.Point(224, 16) Me.BtnSave.Name = "BtnSave" Me.BtnSave.Size = New System.Drawing.Size(64, 24) Me.BtnSave.TabIndex = 11 Me.BtnSave.Text = "บันทึกข้อมูล" ' 'BtnEdit ' Me.BtnEdit.BackColor = System.Drawing.Color.Gray Me.BtnEdit.FlatStyle = System.Windows.Forms.FlatStyle.System Me.BtnEdit.Location = New System.Drawing.Point(160, 16) Me.BtnEdit.Name = "BtnEdit" Me.BtnEdit.Size = New System.Drawing.Size(64, 24) Me.BtnEdit.TabIndex = 10 Me.BtnEdit.Text = "แก้ไขข้อมูล" ' 'BtnDelete ' Me.BtnDelete.BackColor = System.Drawing.Color.Gray Me.BtnDelete.FlatStyle = System.Windows.Forms.FlatStyle.System Me.BtnDelete.Location = New System.Drawing.Point(96, 16) Me.BtnDelete.Name = "BtnDelete" Me.BtnDelete.Size = New System.Drawing.Size(64, 24) Me.BtnDelete.TabIndex = 9 Me.BtnDelete.Text = "ลบข้อมูล" ' 'BtnAddNew ' Me.BtnAddNew.BackColor = System.Drawing.Color.Gray Me.BtnAddNew.FlatStyle = System.Windows.Forms.FlatStyle.System Me.BtnAddNew.Location = New System.Drawing.Point(32, 16) Me.BtnAddNew.Name = "BtnAddNew" Me.BtnAddNew.Size = New System.Drawing.Size(64, 24) Me.BtnAddNew.TabIndex = 8 Me.BtnAddNew.Text = "เพิ่มข้อมูล" ' 'GroupBox4 ' Me.GroupBox4.BackColor = System.Drawing.Color.LightSteelBlue Me.GroupBox4.Controls.Add(Me.BtnSearch) Me.GroupBox4.Controls.Add(Me.TxtSearch) Me.GroupBox4.Controls.Add(Me.BtnLast) Me.GroupBox4.Controls.Add(Me.BtnNext) Me.GroupBox4.Controls.Add(Me.BtnPrev) Me.GroupBox4.Controls.Add(Me.BtnFirst) Me.GroupBox4.Location = New System.Drawing.Point(32, 352) Me.GroupBox4.Name = "GroupBox4" Me.GroupBox4.Size = New System.Drawing.Size(384, 56) Me.GroupBox4.TabIndex = 15 Me.GroupBox4.TabStop = False ' 'BtnSearch ' Me.BtnSearch.BackColor = System.Drawing.Color.Brown Me.BtnSearch.FlatStyle = System.Windows.Forms.FlatStyle.System Me.BtnSearch.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Me.BtnSearch.Location = New System.Drawing.Point(320, 16) Me.BtnSearch.Name = "BtnSearch" Me.BtnSearch.Size = New System.Drawing.Size(56, 32) Me.BtnSearch.TabIndex = 10 Me.BtnSearch.Text = "Search" ' 'TxtSearch ' Me.TxtSearch.Location = New System.Drawing.Point(176, 24) Me.TxtSearch.Name = "TxtSearch" Me.TxtSearch.Size = New System.Drawing.Size(136, 20) Me.TxtSearch.TabIndex = 9 Me.TxtSearch.Text = "" ' 'BtnLast ' Me.BtnLast.BackColor = System.Drawing.Color.Brown Me.BtnLast.FlatStyle = System.Windows.Forms.FlatStyle.System Me.BtnLast.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Me.BtnLast.Location = New System.Drawing.Point(128, 16) Me.BtnLast.Name = "BtnLast" Me.BtnLast.Size = New System.Drawing.Size(40, 32) Me.BtnLast.TabIndex = 8 Me.BtnLast.Text = ">>" ' 'BtnNext ' Me.BtnNext.BackColor = System.Drawing.Color.Brown Me.BtnNext.FlatStyle = System.Windows.Forms.FlatStyle.System Me.BtnNext.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Me.BtnNext.Location = New System.Drawing.Point(88, 16) Me.BtnNext.Name = "BtnNext" Me.BtnNext.Size = New System.Drawing.Size(40, 32) Me.BtnNext.TabIndex = 7 Me.BtnNext.Text = ">" ' 'BtnPrev ' Me.BtnPrev.BackColor = System.Drawing.Color.Brown Me.BtnPrev.FlatStyle = System.Windows.Forms.FlatStyle.System Me.BtnPrev.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Me.BtnPrev.Location = New System.Drawing.Point(48, 16) Me.BtnPrev.Name = "BtnPrev" Me.BtnPrev.Size = New System.Drawing.Size(40, 32) Me.BtnPrev.TabIndex = 6 Me.BtnPrev.Text = "<" ' 'BtnFirst ' Me.BtnFirst.BackColor = System.Drawing.Color.Brown Me.BtnFirst.FlatStyle = System.Windows.Forms.FlatStyle.System Me.BtnFirst.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Me.BtnFirst.Location = New System.Drawing.Point(8, 16) Me.BtnFirst.Name = "BtnFirst" Me.BtnFirst.Size = New System.Drawing.Size(40, 32) Me.BtnFirst.TabIndex = 5 Me.BtnFirst.Text = "<<" ' 'GroupBox1 ' Me.GroupBox1.BackColor = System.Drawing.Color.LightSteelBlue Me.GroupBox1.Controls.Add(Me.LbWorkOut) Me.GroupBox1.Controls.Add(Me.LbWorkIn) Me.GroupBox1.Controls.Add(Me.DTDate) Me.GroupBox1.Controls.Add(Me.DTWorkOut) Me.GroupBox1.Controls.Add(Me.DTWorkIn) Me.GroupBox1.Controls.Add(Me.LbDate) Me.GroupBox1.Controls.Add(Me.TxtEmpID) Me.GroupBox1.Controls.Add(Me.LbEmpId) Me.GroupBox1.Location = New System.Drawing.Point(32, 136) Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.Size = New System.Drawing.Size(384, 216) Me.GroupBox1.TabIndex = 14 Me.GroupBox1.TabStop = False Me.GroupBox1.Text = "ข้อมูลการทำงาน" ' 'LbWorkOut ' Me.LbWorkOut.BackColor = System.Drawing.Color.Transparent Me.LbWorkOut.Font = New System.Drawing.Font("Miriam Transparent", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Me.LbWorkOut.Location = New System.Drawing.Point(64, 144) Me.LbWorkOut.Name = "LbWorkOut" Me.LbWorkOut.Size = New System.Drawing.Size(72, 32) Me.LbWorkOut.TabIndex = 32 Me.LbWorkOut.Text = "เวลาออก" Me.LbWorkOut.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'LbWorkIn ' Me.LbWorkIn.BackColor = System.Drawing.Color.Transparent Me.LbWorkIn.Font = New System.Drawing.Font("Miriam Transparent", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Me.LbWorkIn.Location = New System.Drawing.Point(64, 104) Me.LbWorkIn.Name = "LbWorkIn" Me.LbWorkIn.Size = New System.Drawing.Size(72, 32) Me.LbWorkIn.TabIndex = 31 Me.LbWorkIn.Text = "เวลาเข้า" Me.LbWorkIn.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'DTDate ' Me.DTDate.Location = New System.Drawing.Point(176, 64) Me.DTDate.Name = "DTDate" Me.DTDate.Size = New System.Drawing.Size(136, 20) Me.DTDate.TabIndex = 30 ' 'DTWorkOut ' Me.DTWorkOut.Format = System.Windows.Forms.DateTimePickerFormat.Time Me.DTWorkOut.Location = New System.Drawing.Point(176, 144) Me.DTWorkOut.Name = "DTWorkOut" Me.DTWorkOut.ShowUpDown = True Me.DTWorkOut.Size = New System.Drawing.Size(136, 20) Me.DTWorkOut.TabIndex = 29 ' 'DTWorkIn ' Me.DTWorkIn.Format = System.Windows.Forms.DateTimePickerFormat.Time Me.DTWorkIn.ImeMode = System.Windows.Forms.ImeMode.NoControl Me.DTWorkIn.Location = New System.Drawing.Point(176, 104) Me.DTWorkIn.Name = "DTWorkIn" Me.DTWorkIn.ShowUpDown = True Me.DTWorkIn.Size = New System.Drawing.Size(136, 20) Me.DTWorkIn.TabIndex = 28 ' 'LbDate ' Me.LbDate.BackColor = System.Drawing.Color.Transparent Me.LbDate.Font = New System.Drawing.Font("Miriam Transparent", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Me.LbDate.Location = New System.Drawing.Point(64, 64) Me.LbDate.Name = "LbDate" Me.LbDate.Size = New System.Drawing.Size(72, 32) Me.LbDate.TabIndex = 4 Me.LbDate.Text = "วันที่" Me.LbDate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'TxtEmpID ' Me.TxtEmpID.Location = New System.Drawing.Point(176, 24) Me.TxtEmpID.Name = "TxtEmpID" Me.TxtEmpID.Size = New System.Drawing.Size(136, 20) Me.TxtEmpID.TabIndex = 3 Me.TxtEmpID.Text = "" ' 'LbEmpId ' Me.LbEmpId.BackColor = System.Drawing.Color.Transparent Me.LbEmpId.Font = New System.Drawing.Font("Miriam Transparent", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Me.LbEmpId.Location = New System.Drawing.Point(64, 24) Me.LbEmpId.Name = "LbEmpId" Me.LbEmpId.Size = New System.Drawing.Size(72, 32) Me.LbEmpId.TabIndex = 2 Me.LbEmpId.Text = "รหัสพนักงาน" Me.LbEmpId.TextAlign = System.Drawing.ContentAlignment.MiddleCenter ' 'Label2 ' Me.Label2.BackColor = System.Drawing.Color.SteelBlue Me.Label2.Font = New System.Drawing.Font("Miriam Fixed", 21.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(177, Byte)) Me.Label2.ForeColor = System.Drawing.SystemColors.ControlText Me.Label2.ImageAlign = System.Drawing.ContentAlignment.TopCenter Me.Label2.Location = New System.Drawing.Point(32, 40) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(384, 48) Me.Label2.TabIndex = 16 Me.Label2.Text = "ข้อมูลการทำงาน" Me.Label2.TextAlign = System.Drawing.ContentAlignment.BottomCenter ' 'FrmStartwork ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.BackColor = System.Drawing.Color.Silver Me.ClientSize = New System.Drawing.Size(448, 462) Me.Controls.Add(Me.GroupBox2) Me.Controls.Add(Me.GroupBox4) Me.Controls.Add(Me.GroupBox1) Me.Controls.Add(Me.Label2) Me.Name = "FrmStartwork" Me.Text = "HR_Payroll 2007 โปรแกรมจัดการบุคคลและการจ่ายเงินเดือน" Me.GroupBox2.ResumeLayout(False) Me.GroupBox4.ResumeLayout(False) Me.GroupBox1.ResumeLayout(False) Me.ResumeLayout(False)
End Sub
#End Region Dim CN As OleDbConnection Dim DA As OleDbDataAdapter Dim DS As New DataSet Dim i As Int16 = 0 Dim status As String Public Sub openDB() Try CN = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\HR_Payroll2007\HR_Payroll2007.MDB") Dim SQL As String CN.Open() SQL = "Select * From TblStartWork " DA = New OleDbDataAdapter(SQL, CN) DA.Fill(DS, "TblStartWork") Catch ex As Exception MsgBox(ex.Message) End Try End Sub Public Sub showData()
Try TxtEmpID.Text = DS.Tables("TblStartWork").Rows(i)("EmpID") DTDate.Value = DS.Tables("TblStartWork").Rows(i)("Date") DTWorkIn.Value = DS.Tables("TblStartWork").Rows(i)("WorkIn") DTWorkOut.Value = DS.Tables("TblStartWork").Rows(i)("WorkOut") Catch ex As Exception MsgBox(ex.Message) End Try
End Sub Public Sub LockControls(ByVal flag As Boolean) If flag Then TxtEmpID.Enabled = False DTDate.Enabled = False DTWorkIn.Enabled = False DTWorkOut.Enabled = False BtnFirst.Enabled = True BtnPrev.Enabled = True BtnNext.Enabled = True BtnLast.Enabled = True Else TxtEmpID.Enabled = True DTDate.Enabled = True DTWorkIn.Enabled = True DTWorkOut.Enabled = True BtnFirst.Enabled = False BtnPrev.Enabled = False BtnNext.Enabled = False BtnLast.Enabled = False End If End Sub Public Sub AddNewData() Dim dr1 As DataRow Try Dim cmb As New OleDbCommandBuilder(DA) dr1 = DS.Tables("TblStartWork").NewRow dr1("EmpID") = TxtEmpID.Text dr1("Date") = DTDate.Value dr1("WorkIn") = DTWorkIn.Value dr1("WorkOut") = DTWorkOut.Value DS.Tables("TblStartWork").Rows.Add(dr1) DA.Update(DS, "TblStartWork") MsgBox("บันทึกข้อมูลเรียบร้อยแล้ว") Catch ex As Exception MsgBox("error :: " & ex.Message) Finally
End Try End Sub Public Sub EditData() Try Dim cmb As New OleDbCommandBuilder(DA) DS.Tables("TblStartWork").Rows(i)("EmpID") = TxtEmpID.Text DS.Tables("TblStartWork").Rows(i)("Date") = DTDate.Value DS.Tables("TblStartWork").Rows(i)("WorkIn") = DTWorkIn.Value DS.Tables("TblStartWork").Rows(i)("WorkOut") = DTWorkOut.Value DA.Update(DS, "TblStartWork") MsgBox("Update Comlete") Catch ex As Exception MsgBox(ex.Message) End Try End Sub
Private Sub FrmStartwork_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load openDB() showData() BtnSave.Enabled = False LockControls(True) End Sub
Private Sub BtnFirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnFirst.Click i = 0 showData() End Sub
Private Sub BtnPrev_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnPrev.Click If i > 0 Then i -= 1 Else MsgBox("ไม่สามารถไปเรคคอร์ดก่อนหน้าได้ " & vbCrLf & "เนื่องจากเป็นแถวแรกสุด !") End If showData() End Sub
Private Sub BtnNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnNext.Click If i < DS.Tables("TblStartWork").Rows.Count - 1 Then i += 1 Else MsgBox("ไม่สามารถไปเรคคอร์ดถัดไปได้" & vbCrLf & " เนื่องจากเป็นเรคคอร์ดสุดท้ายแล้ว ! ") End If showData() End Sub
Private Sub BtnLast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnLast.Click i = DS.Tables(0).Rows.Count - 1 showData() End Sub
Private Sub BtnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSearch.Click Dim keysearch As String keysearch = TxtSearch.Text For k As Int16 = 0 To DS.Tables(0).Rows.Count - 1 If keysearch = DS.Tables(0).Rows(k)("empid") Then i = k showData()
Exit For Else End If Next k End Sub
Private Sub BtnAddNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnAddNew.Click status = "addnew" LockControls(False) TxtEmpID.Clear() DTDate.Value = Today DTWorkIn.Value = Today DTWorkOut.Value = Today TxtEmpID.Focus() BtnAddNew.Enabled = False BtnSave.Enabled = True End Sub
Private Sub BtnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDelete.Click Dim msgresult As MsgBoxResult msgresult = MsgBox("คุณต้องการลบข้อมูลนี้ใช่หรือไม่", MsgBoxStyle.YesNoCancel, "HR_Payroll2007") If msgresult = MsgBoxResult.Yes Then Dim cmb As New OleDbCommandBuilder(DA) DS.Tables("TblStartWork").Rows(i).Delete() DA.Update(DS, "TblStartWork") Else
End If End Sub
Private Sub BtnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnEdit.Click LockControls(False) BtnEdit.Enabled = False BtnSave.Enabled = True status = "edit" End Sub
Private Sub BtnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSave.Click If status = "addnew" Then AddNewData() BtnAddNew.Enabled = True BtnSave.Enabled = False LockControls(True) ElseIf status = "edit" Then EditData() BtnEdit.Enabled = True BtnSave.Enabled = False LockControls(True) End If End Sub
Private Sub BtnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnExit.Click Dim msgresult As MsgBoxResult msgresult = MsgBox("คุณต้องการออกจากโปรแกรมหรือไม่", MsgBoxStyle.YesNoCancel + MsgBoxStyle.Question, "HR_Payroll2007") If msgresult = MsgBoxResult.Yes Then Me.Close() Else
End If End Sub
Private Sub GroupBox2_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox2.Enter
End Sub End Class
|