毕业论文论文范文课程设计实践报告法律论文英语论文教学论文医学论文农学论文艺术论文行政论文管理论文计算机安全
您现在的位置: 毕业论文 >> 论文 >> 正文

人事管理系统ER图+流程图+开题报告+源代码+数据流图 第13页

更新时间:2008-10-29:  来源:毕业论文

人事管理系统ER图+流程图+开题报告+源代码+数据流图 第13页

Option Explicit

Dim Bupdata As Boolean

Dim i As Integer

Private Sub Cmbdegree_Click()

    If Cmbdegree.Text = "定制" Then

        FrmTable.Show

        Cmbdegree.ListIndex = 0

    End If

   

End Sub

 

Private Sub Cmbdepart_Click()

    If Cmbdepart.Text = "定制" Then

        FrmTable.Show

        Cmbdepart.ListIndex = 0

    End If

   

End Sub

 

Private Sub CmdAddNew_Click()

           

    If CmdAddNew.Caption = "添加" Then

   

        CmdAddNew.Caption = "确认"

        CmdDel.Enabled = False

        CmdOK.Enabled = False

        DataA.ReadOnly = False

        For i = 1 To 12

              If Txt(i).Text = "" Then Txt(i).Text = 0 'DataA.Recordset.Fields(i) = 0

                   

        Next i

        DataA.Recordset.AddNew

        Txt(0).Locked = False

  

           

       If FrmMain.cutable = "employee" Then

                                  

            DataA.Recordset.Fields(13) = frmLogin.EmploID

            DataA.Recordset.Fields(14) = Now

           

            If Opsex(0) Then

                DataA.Recordset.Fields(4) = ""

            Else

                DataA.Recordset.Fields(4) = ""

            End If

                DataA.Recordset.Fields(7) = Cmbdegree.Text

                DataA.Recordset.Fields(8) = Cmbdepart.Text

       

        ElseIf FrmMain.cutable = "leave" Then

                                   

            DataA.Recordset.Fields(8) = frmLogin.EmploID

            DataA.Recordset.Fields(9) = Now

                

        Else

                       

            DataA.Recordset.Fields(13) = frmLogin.EmploID

            DataA.Recordset.Fields(14) = Now

       

        End If

              

        Txt(0).SetFocus

   

    Else 'OK

       

        If Txt(0).Text = "" Then

            MsgBox "不可以为空"

            Txt(0).SetFocus

            Exit Sub

        End If

       

        For i = 1 To 12

              If Txt(i).Text = "" Then Txt(i).Text = 0 'DataA.Recordset.Fields(i) = 0

                   

        Next i

   

        If FrmMain.cutable = "employee" Then

                                  

                DataB.Recordset.FindFirst "职工编号=" + Txt(0).Text

           

                If Not DataB.Recordset.NoMatch Then

                    MsgBox "职员编号重复"

                    Txt(0).Text = ""

                    Txt(0).SetFocus

                    Exit Sub

                End If

               

                       

        ElseIf FrmMain.cutable = "leave" Then

           

                DataB.Recordset.FindFirst "假条编号=" + Txt(0).Text

           

                If Not DataB.Recordset.NoMatch Then

                    MsgBox "假条编号重复"

                    Txt(0).Text = ""

                    Txt(0).SetFocus

                    Exit Sub

                End If

                       

                 

        Else

                For i = 4 To 10

                    If Not IsNumeric(Txt(i).Text) Then

                        MsgBox "not a number"

                        Txt(i).SetFocus

                        Exit Sub

                    End If

                   

                Next i

                       

                       

                DataB.Recordset.FindFirst "工资编号=" + Txt(0).Text

           

                If Not DataB.Recordset.NoMatch Then

                    MsgBox "工资编号重复"

                    Txt(0).Text = ""

                    Txt(0).SetFocus

                    Exit Sub

                 End If

                        

        End If

 

 

       

            DataA.Recordset.Update

            DataA.Recordset.MoveLast

            FrmMain.DataA.Refresh

            FrmMain.DataB.Refresh

                       

            DataB.Refresh

       

            CmdAddNew.Caption = "添加"

       

            CmdDel.Enabled = True

            CmdOK.Enabled = True

           

            

   

    End If

   

       

End Sub

 

Private Sub CmdCacel_Click()

   

    If CmdAddNew.Caption = "确认" Then

        DataA.Recordset.CancelUpdate

    End If

      

   

    FrmMain.Enabled = True

    FrmMain.SetFocus

    Unload Me

    FrmMain.DataA.Refresh

   

If FrmMain.cutable = "employee" Then

        FrmMain.DBGA.Columns("性别").Button = True

        FrmMain.DBGA.Columns("学历").Button = True

        FrmMain.DBGA.Columns("部门").Button = True

End If

 

 

End Sub

 

Private Sub CmdDel_Click()

   

    DataA.ReadOnly = False

    DataA.Recordset.Delete

    DataA.Recordset.MoveNext

 

    If DataA.Recordset.EOF Then

        DataA.Recordset.MoveLast

    End If

 

    FrmMain.DataA.Refresh

 << 上一页  [11] [12] [13] [14] 下一页

人事管理系统ER图+流程图+开题报告+源代码+数据流图 第13页下载如图片无法显示或论文不完整,请联系qq752018766
设为首页 | 联系站长 | 友情链接 | 网站地图 |

copyright©youerw.com 优文论文网 严禁转载
如果本毕业论文网损害了您的利益或者侵犯了您的权利,请及时联系,我们一定会及时改正。