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

📄 xfedit.frm

📁 是我应我们学校学工部做的软件,其主要是解决想我们学校这样的条件--各个办公室之间还没有建立联网,而且学校分为两个校区(又不在一个城市).   因此
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Caption         =   "编  辑(&E)"
         Default         =   -1  'True
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1320
         TabIndex        =   7
         Top             =   120
         Width           =   1215
      End
   End
   Begin VB.CommandButton Command8 
      Height          =   375
      Left            =   5400
      Picture         =   "xfedit.frx":1578E
      Style           =   1  'Graphical
      TabIndex        =   3
      Top             =   120
      Width           =   375
   End
   Begin VB.PictureBox Picture1 
      BackColor       =   &H00FFE09E&
      Height          =   6735
      Left            =   0
      Picture         =   "xfedit.frx":157E3
      ScaleHeight     =   6675
      ScaleWidth      =   2115
      TabIndex        =   0
      TabStop         =   0   'False
      Top             =   0
      Width           =   2175
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "评测纪录修改"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   -1  'True
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00800000&
         Height          =   375
         Index           =   1
         Left            =   165
         TabIndex        =   1
         Top             =   1005
         Width           =   2430
      End
      Begin VB.Shape Shape2 
         BorderColor     =   &H0000FF00&
         BorderWidth     =   2
         Height          =   15
         Left            =   120
         Top             =   1485
         Width           =   1695
      End
      Begin VB.Shape Shape1 
         BorderColor     =   &H000000FF&
         BorderWidth     =   2
         Height          =   15
         Left            =   120
         Top             =   1440
         Width           =   1815
      End
      Begin VB.Image Image1 
         Height          =   600
         Left            =   240
         Picture         =   "xfedit.frx":4F847
         Stretch         =   -1  'True
         Top             =   240
         Width           =   600
      End
      Begin VB.Label Label5 
         BackStyle       =   0  'Transparent
         Caption         =   "评测纪录修改"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   14.25
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   -1  'True
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FFFFFF&
         Height          =   375
         Index           =   0
         Left            =   130
         TabIndex        =   2
         Top             =   970
         Width           =   2655
      End
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   6015
      Left            =   2280
      TabIndex        =   4
      Top             =   720
      Width           =   3495
      _ExtentX        =   6165
      _ExtentY        =   10610
      View            =   3
      Arrange         =   1
      LabelEdit       =   1
      LabelWrap       =   -1  'True
      HideSelection   =   0   'False
      AllowReorder    =   -1  'True
      FullRowSelect   =   -1  'True
      GridLines       =   -1  'True
      PictureAlignment=   5
      _Version        =   393217
      Icons           =   "ImageList1"
      SmallIcons      =   "ImageList1"
      ColHdrIcons     =   "ImageList1"
      ForeColor       =   -2147483640
      BackColor       =   -2147483634
      BorderStyle     =   1
      Appearance      =   1
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      NumItems        =   4
      BeginProperty ColumnHeader(1) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         Text            =   "学号"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(2) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   1
         Text            =   "姓名"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(3) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   2
         Text            =   "性别"
         Object.Width           =   2540
      EndProperty
      BeginProperty ColumnHeader(4) {BDD1F052-858B-11D1-B16A-00C0F0283628} 
         SubItemIndex    =   3
         Text            =   "政治面貌"
         Object.Width           =   2540
      EndProperty
      Picture         =   "xfedit.frx":50111
   End
   Begin VB.Label Label10 
      BackStyle       =   0  'Transparent
      Caption         =   "请点击右边按键选择班级"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   615
      Left            =   2280
      TabIndex        =   5
      Top             =   120
      Width           =   3015
   End
End
Attribute VB_Name = "xfedit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Command3_Click()
    Unload Me
End Sub

Private Sub Command5_Click()
    On Error GoTo 1
    idf = Right(ListView2.SelectedItem.Key, Len(ListView2.SelectedItem.Key) - 1)
    Dim formtemp As New xfedit_gzif
    formtemp.Text1 = ListView2.SelectedItem.SubItems(1)
    formtemp.Text3 = ListView2.SelectedItem.SubItems(3)
    Dim temprecord As New ADODB.Recordset
    temprecord.Open "select * from [jc] where [ID]=" & idf, main.connect, 3, 2
    If temprecord.RecordCount <> 0 Then
        gzid = temprecord.Fields(2)
        formtemp.Text2.Text = temprecord.Fields(6)
    End If
    temprecord.Close
    temprecord.Open "select * from [gz] where [ID]=" & gzid, main.connect, 3, 2
    If temprecord.RecordCount <> 0 Then
        formtemp.fens = temprecord.Fields(2) * 10
        formtemp.fene = temprecord.Fields(3) * 10
    End If
    formtemp.idf = idf
    formtemp.Label7.Caption = ListView2.SelectedItem.Text
    formtemp.Label10.Caption = Label10.Caption & "------" & ListView1.SelectedItem.SubItems(1)
    
    formtemp.Show 1
    Call ListView1_ItemClick(ListView1.SelectedItem)
    Exit Sub
1
    MsgBox "您没有选择欲操作的对象", vbOKOnly Or vbInformation, "提示"
End Sub

Private Sub Command8_Click()
    Dim temp As New selectclass
    temp.Label1.Visible = False
    temp.Show 1
    If temp.yesno = False Then Exit Sub
    Label10.Caption = temp.nn
    id = temp.kk
    Set temp = Nothing
    
    ListView1.ListItems.Clear
    
    Dim itmX As ListItem
    
    Dim bb As New ADODB.Recordset
    bb.Open "select * from [student] where [clasid]=" & id & " order by [stid]", main.connect, 3, 2
    
    For i = 1 To bb.RecordCount
        Set itmX = ListView1.ListItems.Add(, "S" & bb.Fields(0), bb.Fields(3), 1, 1)
        itmX.SubItems(1) = bb.Fields(1)
        If bb.Fields(2) = True Then itmX.SubItems(2) = "男" Else itmX.SubItems(2) = "女"
        If bb.Fields(4) = 0 Then itmX.SubItems(3) = "无"
        If bb.Fields(4) = 1 Then itmX.SubItems(3) = "中国共青团员"
        If bb.Fields(4) = 2 Then itmX.SubItems(3) = "中国共产党员"
        bb.MoveNext
    Next
    bb.Close
End Sub

Private Sub Form_Load()
Call ListView1.ListItems.Add(, "S1", "skdks", 1, 1)
   ListView1.ListItems.Clear
    ListView1.Refresh
    Call ListView2.ListItems.Add(, "S1", "skdks", 1, 1)
    ListView2.ListItems.Clear
    ListView2.Refresh
End Sub

Private Sub Form_Resize()
    On Error GoTo 1
   
    
    If Me.Width < 10500 Then Me.Width = 10500
    If Me.Height < 7000 Then Me.Height = 7000
    
    Picture2.Left = Me.Width - Picture2.Width - 200
    Picture2.Top = Me.Height - Picture2.Height - 500
    
    Picture1.Height = Me.Height - 1200
    
    Frame2.Width = Me.Width - 400 - Picture1.Width - ListView1.Width
    Frame2.Height = Me.Height - Picture2.Height - 800
    ListView1.Height = Frame2.Height - ListView1.Top + 100
    ListView2.Height = Frame2.Height - ListView2.Top - 200
    
    ListView2.Width = Frame2.Width - 400
1
    
End Sub

Private Sub ListView1_ItemClick(ByVal Item As MSComctlLib.ListItem)
   On Error GoTo 1
    
    Label3.Caption = Item.Text
    Label6.Caption = Item.SubItems(1)
    Label9.Caption = Item.SubItems(2)
    Label8.Caption = Item.SubItems(3)
    
    id = Right(ListView1.SelectedItem.Key, Len(ListView1.SelectedItem.Key) - 1)
    Dim temp As New ADODB.Recordset
    Dim temp2 As New ADODB.Recordset
    Dim itmX As ListItem
    
    temp.Open " select * from [jc] where [stid]=" & id & " order by [xn]", main.connect, 3, 2
    ListView2.ListItems.Clear
    
    For i = 1 To temp.RecordCount
        b = ""
        
        temp2.Open "select * from [gz] ", main.connect, 3, 2
        temp2.Find "ID = " & temp.Fields(2), 0, adSearchForward, 1
        While (Not (temp2.EOF))
            b = "[" & temp2.Fields(1) & "]" & b
            idf = temp2.Fields(5)
            temp2.Find "ID = " & idf, 0, adSearchForward, 1
        Wend
        temp2.Close
        
        Set itmX = ListView2.ListItems.Add(, "S" & temp.Fields(0), b, 2, 2)
        itmX.SubItems(1) = temp.Fields(4) & "-" & temp.Fields(4) + 1
        itmX.SubItems(2) = temp.Fields(3)
        itmX.SubItems(3) = temp.Fields(5)
        temp2.Open "select * from [gz] where [ID]=" & temp.Fields(2), main.connect, 3, 2
        If temp2.RecordCount <> 0 Then
            itmX.SubItems(4) = temp2.Fields(4)
            itmX.SubItems(5) = temp2.Fields(4) * temp.Fields(5)
        End If
        temp2.Close
        temp.MoveNext
    Next
    temp.Close
1
End Sub
Private Sub Command11_Click()
    On Error GoTo 1
    idf = Right(ListView2.SelectedItem.Key, Len(ListView2.SelectedItem.Key) - 1)
    If MsgBox("您确定删除此项吗?", vbYesNo Or vbQuestion, "提示") <> vbYes Then Exit Sub
    main.connect.Execute "Delete from [jc] where [ID]=" & idf
    ListView2.ListItems.Remove (ListView2.SelectedItem.Key)
    Exit Sub
1
    MsgBox "您没有选择欲操作的对象", vbOKOnly Or vbInformation, "提示"
End Sub

⌨️ 快捷键说明

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