⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmcsearch.vb

📁 humar resourse management
💻 VB
📖 第 1 页 / 共 5 页
字号:
        '
        'DateOfBirth
        '
        Me.DateOfBirth.Format = "dd-MMM-yyyy"
        Me.DateOfBirth.FormatInfo = Nothing
        Me.DateOfBirth.HeaderText = "DateOfBirth"
        Me.DateOfBirth.MappingName = "DateOfBirth"
        Me.DateOfBirth.Width = 75
        '
        'City
        '
        Me.City.Format = ""
        Me.City.FormatInfo = Nothing
        Me.City.HeaderText = "City"
        Me.City.MappingName = "City"
        Me.City.Width = 115
        '
        'Phone
        '
        Me.Phone.Format = ""
        Me.Phone.FormatInfo = Nothing
        Me.Phone.HeaderText = "Phone"
        Me.Phone.MappingName = "Phone"
        Me.Phone.Width = 80
        '
        'Mobile
        '
        Me.Mobile.Format = ""
        Me.Mobile.FormatInfo = Nothing
        Me.Mobile.HeaderText = "Mobile"
        Me.Mobile.MappingName = "Mobile"
        Me.Mobile.Width = 80
        '
        'Email
        '
        Me.Email.Format = ""
        Me.Email.FormatInfo = Nothing
        Me.Email.HeaderText = "Email"
        Me.Email.MappingName = "Email"
        Me.Email.Width = 130
        '
        'frmCSearch
        '
        Me.AcceptButton = Me.btnGo
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.BackColor = System.Drawing.SystemColors.Control
        Me.ClientSize = New System.Drawing.Size(804, 536)
        Me.Controls.Add(Me.dgCnd)
        Me.Controls.Add(Me.btnGo)
        Me.Controls.Add(Me.Label6)
        Me.Controls.Add(Me.cbxJob)
        Me.Controls.Add(Me.panelCnd)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow
        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "frmCSearch"
        Me.ShowInTaskbar = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
        Me.Text = "     Search Candidate"
        Me.panelCnd.ResumeLayout(False)
        CType(Me.dgCnd, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub frmCSearch_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim JobQuery As String = "SELECT ID, Title FROM Job ORDER BY Title" 'Select Jobs List
        Dim AgentQuery As String = "SELECT ID, Name FROM Agent ORDER BY Name" 'Select Agent List
        CreateCombo.List(JobQuery, cbxJob, "Job", "Title", "ID") 'Creating Job collection for Primary Post ComboBox
        CreateCombo.List(AgentQuery, cbxAgent, "Agent", "Name", "ID") 'Creating Job collection for Primary Post ComboBox
        ROTrue()
    End Sub

    Sub DA(ByVal Query As String)
        Try
            Connection = New OleDbConnection(ConnectionString)
            DACandidate = New OleDbDataAdapter(Query, Connection)
        Catch ex As Exception
            MsgBox("Error at SUDCandidate.DA: " & ex.Message)
        End Try
    End Sub

    Private Sub btnGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGo.Click
        'List of Candidates based on Category List, except selected or shortlisted for other companies.
        PersQuery = "SELECT * FROM Candidate_Personal WHERE (PJobID = " & cbxJob.SelectedValue & " OR SJobID = " & cbxJob.SelectedValue & ") AND id NOT IN (SELECT id FROM Status WHERE (IStatus='" & IS1 & "') OR (IStatus='" & IS2 & "' ))"
        DA(PersQuery)
        DSCndM = New DataSet
        DACandidate.Fill(DSCndM, "Personal")
        dgCnd.DataSource = DSCndM.Tables("Personal")

        'Select Passport Details for Queried Candidates
        PPQuery = "SELECT ID, PassportNumber, DateOfExpiry FROM Candidate_Passport WHERE ID IN (SELECT ID FROM Candidate_Personal WHERE PJobID = " & cbxJob.SelectedValue & " OR SJobID = " & cbxJob.SelectedValue & ")"
        DA(PPQuery)
        DACandidate.Fill(DSCndM, "Passport")

        'Select Educational Details for Queried Candidates
        EduQuery = "SELECT * FROM Candidate_Educational WHERE ID IN (SELECT ID FROM Candidate_Personal WHERE PJobID = " & cbxJob.SelectedValue & " OR SJobID = " & cbxJob.SelectedValue & ")"
        DA(EduQuery)
        DACandidate.Fill(DSCndM, "Educational")

        'Select Experience Details for Queried Candidates
        ExpQuery = "SELECT * FROM Candidate_Experience WHERE ID IN (SELECT ID FROM Candidate_Personal WHERE PJobID = " & cbxJob.SelectedValue & " OR SJobID = " & cbxJob.SelectedValue & ")"
        DA(ExpQuery)
        DACandidate.Fill(DSCndM, "Experience")

    End Sub

    Private Sub dgCnd_CurrentCellChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub
    Sub Personal()
        PersClear()
        'Editing Personal Information
        TmpTable = DSCndM.Tables("Personal")
        cid = Val(dgCnd.Item(dgCnd.CurrentRowIndex(), 0).ToString())
        CurId = "ID = " & cid & ""
        Result = TmpTable.Select(CurId)
        CurrentRow = Result(0)
        'Edit the data
        CandName = CurrentRow("Name")
        EmailID = CurrentRow("Email")
        dtpAppliedOn.Text = CurrentRow("AppliedOn")
        cbxAgent.SelectedValue = CurrentRow("AgentID")
        dtpCandDoB.Text = CurrentRow("DateOfBirth")
        txtCandAddress.Text = CurrentRow("Address")
        txtCandCity.Text = CurrentRow("City")
        txtCandPincode.Text = CurrentRow("Pincode")
        'To store Profile Information
        oDetails = New Details
        oDetails.Profile = CurrentRow("Profile")
    End Sub
    Sub Passport()
        PPClear()
        TmpTable = DSCndM.Tables("Passport")
        Result = TmpTable.Select(CurId)
        If Result.Length <> 0 Then
            CurrentRow = Result(0)
            txtPPNo.Text = CurrentRow("PassportNumber")
            dtpDoE.Text = CurrentRow("DateOfExpiry")
        End If
    End Sub
    Sub Educational()
        EduClear()
        TmpTable = DSCndM.Tables("Educational")
        Result = TmpTable.Select(CurId)
        If Result.Length <> 0 Then
            If Result.Length > 0 Then
                CurrentRow = Result(0)
                txtInstitute1.Text = CurrentRow("Institute")
                txtCourse1.Text = CurrentRow("Course")
                txtMajor1.Text = CurrentRow("Major")
                dtpYears1.Text = CurrentRow("YearOfPassed")
            End If
            If Result.Length > 1 Then
                CurrentRow = Result(1)
                txtInstitute2.Text = CurrentRow("Institute")
                txtCourse2.Text = CurrentRow("Course")
                txtMajor2.Text = CurrentRow("Major")
                dtpYears2.Text = CurrentRow("YearOfPassed")
            End If
            If Result.Length > 2 Then
                CurrentRow = Result(2)
                txtInstitute3.Text = CurrentRow("Institute")
                txtCourse3.Text = CurrentRow("Course")
                txtMajor3.Text = CurrentRow("Major")
                dtpYears3.Text = CurrentRow("YearOfPassed")
            End If
        End If
    End Sub
    Sub Experience()
        ExpClear()
        TmpTable = DSCndM.Tables("Experience")
        Result = TmpTable.Select(CurId)
        If Result.Length <> 0 Then
            If Result.Length > 0 Then
                CurrentRow = Result(0)
                txtCompany1.Text = CurrentRow("CompanyName")
                txtCountry1.Text = CurrentRow("Country")
                txtYears1.Text = CurrentRow("Years")
                txtMonths1.Text = CurrentRow("Months")
                txtJob1.Text = CurrentRow("JobTitle")
            End If
            If Result.Length > 1 Then
                CurrentRow = Result(1)
                txtCompany2.Text = CurrentRow("CompanyName")
                txtCountry2.Text = CurrentRow("Country")
                txtYears2.Text = CurrentRow("Years")
                txtMonths2.Text = CurrentRow("Months")
                txtJob2.Text = CurrentRow("JobTitle")
            End If
            If Result.Length > 2 Then
                CurrentRow = Result(2)
                txtCompany3.Text = CurrentRow("CompanyName")
                txtCountry3.Text = CurrentRow("Country")
                txtYears3.Text = CurrentRow("Years")
                txtMonths3.Text = CurrentRow("Months")
                txtJob3.Text = CurrentRow("JobTitle")
            End If
        End If
    End Sub
    Sub PersClear()
        cbxAgent.SelectedValue = 1
        dtpCandDoB.Text = ""
        txtCandAddress.Text = ""
        txtCandCity.Text = ""
        txtCandPincode.Text = ""
        'Clear Profile Information
        oDetails = New Details
        oDetails.Profile = ""
    End Sub
    Sub PPClear()
        txtPPNo.Text = ""
        dtpDoE.Text = ""
    End Sub
    Sub EduClear()
        txtInstitute1.Text = ""
        txtCourse1.Text = ""
        txtMajor1.Text = ""
        dtpYears1.Text = DateTime.Today
        txtInstitute2.Text = ""
        txtCourse2.Text = ""
        txtMajor2.Text = ""
        dtpYears2.Text = DateTime.Today
        txtInstitute3.Text = ""
        txtCourse3.Text = ""
        txtMajor3.Text = ""
        dtpYears3.Text = DateTime.Today
    End Sub
    Sub ExpClear()
        txtCompany1.Text = ""
        txtCountry1.Text = ""
        txtYears1.Text = ""
        txtMonths1.Text = ""
        txtJob1.Text = ""
        txtCompany2.Text = ""
        txtCountry2.Text = ""
        txtYears2.Text = ""
        txtMonths2.Text = ""
        txtJob2.Text = ""
        txtCompany3.Text = ""
        txtCountry3.Text = ""
        txtYears3.Text = ""
        txtMonths3.Text = ""
        txtJob3.Text = ""
    End Sub
    Sub ROTrue()
        dtpAppliedOn.Enabled = False
        cbxAgent.Enabled = False
        dtpCandDoB.Enabled = False
        txtCandAddress.ReadOnly = True
        txtCandCity.ReadOnly = True
      

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -