Vb.net 关键字1作为标识符2';无效;类别';语句必须以匹配的';最终类'。我今天应该介绍给你,请帮助我

Vb.net 关键字1作为标识符2';无效;类别';语句必须以匹配的';最终类'。我今天应该介绍给你,请帮助我,vb.net,visual-studio,visual-studio-2010,visual-studio-code,ms-access-2010,Vb.net,Visual Studio,Visual Studio 2010,Visual Studio Code,Ms Access 2010,这是一个与MS access合并的visual basic项目。该系统是一个工资单系统,这是用于在新硬件商店中添加新员工的表单之一 公共类注册器 Private Sub BasicLabel_Click(ByVal sender As Object, ByVal e As EventArgs) Throw New NotImplementedException End Sub Private Sub DepartmentLabel_C

这是一个与MS access合并的visual basic项目。该系统是一个工资单系统,这是用于在新硬件商店中添加新员工的表单之一

公共类注册器

       Private Sub BasicLabel_Click(ByVal sender As Object, ByVal e As EventArgs)
            Throw New NotImplementedException
        End Sub
    Private Sub DepartmentLabel_Click(ByVal sender As Object, ByVal e As EventArgs)
        Throw New NotImplementedException
    End Sub

    Private Sub GenderLabel_Click(ByVal sender As Object, ByVal e As EventArgs)
        Throw New NotImplementedException
    End Sub

    Private Sub PlantIDLabel_Click(ByVal sender As Object, ByVal e As EventArgs)
        Throw New NotImplementedException
    End Sub

    Private Sub PositionLabel_Click(ByVal sender As Object, ByVal e As EventArgs)
        Throw New NotImplementedException
    End Sub

End Class

Namespace Mynamespace

End Namespace
   Class namespace<>
  

 

了解这些属性是什么。最后一节课应该在哪里。

很抱歉,我没说你的意思,但我已经告诉你问题出在哪里了。每个类定义都必须用一个结束类关闭。在我看来,你把所有的东西都弄得到处都是。类之外的方法,到处都是名称空间。所有这些都行不通。理想情况下,每个cod文件只有一个名称空间和一个类
 Private Sub GenPayFinalBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GenPayFinalBindingNavigatorSaveItem.
        Me.GenPayFinalBindingSource.EndEdit_
        Me.TableAdapterManager.UpdateAll(Me.GenerallPayrollDataSet)
        End Sub

sub
    End Sub
End Namespace







Namespace My

        Private Sub frmregister_Load(ByVal sender As System.Object, ByVal System As EventArgs, ByVal (Handles), ByVal MyBase, ByVal (Load)
            'TODO: This line of code loads data into the 'GenerallPayrollDataSet.GenPayFinal' table. You can move, or remove it, as needed.
            Me.GenPayFinalTableAdapter.Fill(Me.GenerallPayrollDataSet.GenPayFinal)
            'TODO: This line of code loads data into the 'GenerallPayrollDataSet.GenPayFinal' table. You can move, or remove it, as needed.
            Me.GenPayFinalTableAdapter.Fill(Me.GenerallPayrollDataSet.GenPayFinal)
        End Sub

        Private Function GenPayFinalTableAdapter() As Object
            Throw New NotImplementedException
        End Function

        Private Function GenerallPayrollDataSet() As Object
            Throw New NotImplementedException
        End Function


    Sub ()
    End Sub
End Namespace
Private Sub GenPayFinalBindingNavigatorSaveItem_Click_1(ByVal sender As System.Object,(ByVal e As System.EventArgs)())
    Me.Validate()
    Me.GenPayFinalBindingSource.EndEdit()
    Me.TableAdapterManager.UpdateAll(Me.GenerallPayrollDataSet)

End Sub

Private Sub Button5_Click(ByVal sender As System.Object, (ByVal e As System.EventArgs)()) Handles Button5.Click
    If Len(Trim(PlantIDTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee Plant ID", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        PlantIDTextBox.Focus()
        Exit Sub
    End If

    If Len(Trim(EmployeeNameTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee name", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        EmployeeNameTextBox.Focus()
        Exit Sub
    End If

    If Len(Trim(AddressTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee Address", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        AddressTextBox.Focus()
        Exit Sub
    End If

    If Len(Trim(ContactNumberTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee Contact Number", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        ContactNumberTextBox.Focus()
        Exit Sub
    End If

    If Len(Trim(GenderTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee Email", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        GenderTextBox.Focus()
        Exit Sub
    End If




    If Len(Trim(DateofOriginDateTimePicker.Text)) = 0 Then
        MessageBox.Show("Please enter employee Date of Origin", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        DateofOriginDateTimePicker.Focus()
        Exit Sub
    End If

    If Len(Trim(BasicTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee Basic Salary", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        BasicTextBox.Focus()
        Exit Sub
    End If

    Try
        Me.Validate()
        Me.GenPayFinalBindingSource.EndEdit()
        Me.TableAdapterManager.UpdateAll(Me.GenerallPayrollDataSet)
        MessageBox.Show("Successfully Added")
        EmployeeNameTextBox.Focus()
    Catch ex As Exception
        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End Try
End Sub

Private Sub btnLogin_Click(""ByVal sender As System.Object, ByVal e As System.EventArgs"") Handles btnLogin.Click))"

    If Len(Trim(PlantIDTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee ID", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        PlantIDTextBox.Focus()
        Exit Sub
    End If

    If Len(Trim(EmployeeNameTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee name", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        EmployeeNameTextBox.Focus()
        Exit Sub
    End If

    If Len(Trim(AddressTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee Address", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        AddressTextBox.Focus()
        Exit Sub
    End If

    If Len(Trim(ContactNumberTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee Contact Number", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        ContactNumberTextBox.Focus()
        Exit Sub
    End If

    If Len(Trim(GenderTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter Gender", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        GenderTextBox.Focus()
        Exit Sub
    End If



    If Len(Trim(DateofOriginDateTimePicker.Text)) = 0 Then
        MessageBox.Show("Please enter employee Date of Employement", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        DateofOriginDateTimePicker.Focus()
        Exit Sub
    End If

    If Len(Trim(BasicTextBox.Text)) = 0 Then
        MessageBox.Show("Please enter employee Basic Salary", "Input Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    

BasicTextBox.Focus()
        Exit Sub
    End If

    Try
        If MsgBox("Do you want to add new employee?", vbYesNo + vbQuestion) = vbYes Then
            GenPayFinalBindingSource.AddNew()
            Me.TableAdapterManager.UpdateAll(Me.GenerallPayrollDataSet)
            MessageBox.Show("You can now input...")
        End If
    Catch ex As Exception
        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End Try
End Sub

Private Sub btnDeleteJHS_Click(ByVal sender As System.Object,(ByVal e As System.EventArgs) Handles btnDeleteJHS.Click"")
    Try
        If PlantIDTextBox.Text = "" Then
            MessageBox.Show("Please select employee id", "Entry", MessageBoxButtons.OK, MessageBoxIcon.Warning)
            Exit Sub
        End If
        If PlantIDTextBox.Text.Count > 0 Then
            If MessageBox.Show("Do you really want to delete the record?" & vbCrLf & "You can not restore the record" & vbCrLf & "It will delete record permanently" & vbCrLf & "related to selected employee", "Warning!!!", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) = Windows.Forms.DialogResult.Yes Then
                GenPayFinalBindingSource.RemoveCurrent()
                Me.TableAdapterManager.UpdateAll(Me.GenerallPayrollDataSet)
            End If
        End If

    Catch ex As Exception
        MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
    End Try

End Sub
Namespace 

        Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click_
            BasicTextBox.Text = FormatCurrency(BasicTextBox.Text)
            txtReceipt1.Text = ""
            txtReceipt1.AppendText("" + vbNewLine)
            txtReceipt1.AppendText("" + vbNewLine)
            txtReceipt1.AppendText("" + vbNewLine)
            txtReceipt1.AppendText("" + vbNewLine)
            txtReceipt1.AppendText("" + vbNewLine)
            txtReceipt1.AppendText("" + vbNewLine)
            txtReceipt1.AppendText("" + vbNewLine)
            txtReceipt1.AppendText("Employee Name: " + vbTab & EmployeeNameTextBox.Text + vbNewLine)
            txtReceipt1.AppendText("Address: " + vbTab + vbTab & AddressTextBox.Text + vbNewLine)
            txtReceipt1.AppendText("Contact: " + vbTab + vbTab & ContactNumberTextBox.Text + vbNewLine)
            txtReceipt1.AppendText("Email: " + vbTab + vbTab + vbTab & GenderTextBox.Text + vbNewLine)
            txtReceipt1.AppendText("Date of Employement: " + vbTab + vbTab & DateofOriginDateTimePicker.Text + vbNewLine)

            txtReceipt1.AppendText("" + vbNewLine)
            txtReceipt1.AppendText("= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = " + vbNewLine)
            txtReceipt1.AppendText("                                                                   " + vbNewLine)
            txtReceipt1.AppendText("= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = " + vbNewLine)

            PrintPreviewDialog1.ShowDialog()

        End Sub

End Namespace
sub

End Sub