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

📄 modifymodel.frm

📁 计算机CAD图纸管理和预览
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form modifymodel 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "机型修改"
   ClientHeight    =   5430
   ClientLeft      =   3585
   ClientTop       =   3150
   ClientWidth     =   8310
   Icon            =   "modifymodel.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5430
   ScaleWidth      =   8310
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   1980
      Index           =   5
      Left            =   360
      TabIndex        =   15
      Top             =   2520
      Width           =   7575
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   300
      Index           =   4
      Left            =   5280
      TabIndex        =   14
      Top             =   1005
      Width           =   2655
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   300
      Index           =   3
      Left            =   5280
      TabIndex        =   13
      Top             =   430
      Width           =   2655
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   300
      Index           =   2
      Left            =   1320
      TabIndex        =   12
      Top             =   1600
      Width           =   2655
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   300
      Index           =   1
      Left            =   1320
      TabIndex        =   11
      Top             =   1005
      Width           =   2655
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00C0FFFF&
      Height          =   300
      Index           =   0
      Left            =   1320
      TabIndex        =   2
      Top             =   430
      Width           =   2655
   End
   Begin VB.CommandButton CancelButton 
      Cancel          =   -1  'True
      Caption         =   "退出"
      Height          =   375
      Left            =   6480
      TabIndex        =   1
      Top             =   4920
      Width           =   1215
   End
   Begin VB.CommandButton SAVEButton 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   375
      Left            =   5040
      TabIndex        =   0
      Top             =   4920
      Width           =   1215
   End
   Begin VB.Frame Frame1 
      Height          =   4575
      Left            =   120
      TabIndex        =   3
      Top             =   120
      Width           =   8055
      Begin MSComCtl2.DTPicker DTPicker1 
         Height          =   300
         Left            =   5160
         TabIndex        =   16
         Top             =   1490
         Width           =   2655
         _ExtentX        =   4683
         _ExtentY        =   529
         _Version        =   393216
         Format          =   71106561
         CurrentDate     =   38973
      End
      Begin VB.Label Label7 
         Caption         =   "备注"
         Height          =   375
         Left            =   240
         TabIndex        =   10
         Top             =   2160
         Width           =   975
      End
      Begin VB.Label Label6 
         Caption         =   "开发年月"
         Height          =   375
         Left            =   4200
         TabIndex        =   9
         Top             =   1560
         Width           =   1575
      End
      Begin VB.Label Label5 
         Caption         =   "项目组员"
         Height          =   375
         Left            =   4200
         TabIndex        =   8
         Top             =   960
         Width           =   1455
      End
      Begin VB.Label Label4 
         Caption         =   "申请人"
         Height          =   375
         Left            =   4200
         TabIndex        =   7
         Top             =   360
         Width           =   1695
      End
      Begin VB.Label Label3 
         Caption         =   "申请图号"
         Height          =   375
         Left            =   240
         TabIndex        =   6
         Top             =   1560
         Width           =   855
      End
      Begin VB.Label Label2 
         Caption         =   "机型名称"
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "机型代号"
         Height          =   375
         Left            =   240
         TabIndex        =   4
         Top             =   360
         Width           =   975
      End
   End
End
Attribute VB_Name = "modifymodel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim datatemp As Variant
Dim temp1 As String
Dim temp2 As String
Dim temp3 As String
Dim temp4 As String
Dim temp5 As String
Dim temp6 As String
Private Sub CancelButton_Click()
  Unload Me
  
End Sub

Private Sub Form_Load()
    
    MakeCenter modifymodel
    
    temp1 = 主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 2)
    Text1(0).Text = temp1
    
    temp2 = 主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 3)
    Text1(1).Text = temp2

    temp3 = 主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 4)
    Text1(2).Text = temp3

    temp4 = 主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 5)
    Text1(3).Text = temp4
    
    temp5 = 主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 6)
    Text1(4).Text = temp5
    
    datatemp = Trim(主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 7))
    If datatemp = Empty Then
      datatemp = Date
    End If
    DTPicker1.Value = datatemp
    datatemp = DTPicker1.Value
    
    temp6 = 主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 8)
    Text1(5).Text = temp6

End Sub


Private Sub Form_Unload(Cancel As Integer)
  Unload Me
  
End Sub

Private Sub SAVEButton_Click()
主菜单.modelbar.Buttons("save").Enabled = True
If Text1(0).Text = Empty Then
      MsgBox "机型代号不能为空", vbInformation, "提醒"
      Exit Sub
End If
    
If Text1(1).Text = Empty Then
        MsgBox "机型名称不能为空", vbInformation, "提醒"
        Exit Sub
End If
If Text1(2).Text = Empty Then
        MsgBox "申请图号不能为空", vbInformation, "提醒"
        Exit Sub
End If
If Text1(3).Text = Empty Then
        MsgBox "申请人不能为空", vbInformation, "提醒"
        Exit Sub
End If

'没有改变就跳出
If Trim(Text1(0).Text) = temp1 Then
  If Trim(Text1(1).Text) = temp2 Then
    If Trim(Text1(2).Text) = temp3 Then
     If Trim(Text1(3).Text) = temp4 Then
       If Trim(Text1(4).Text) = temp5 Then
         If DTPicker1.Value = datatemp Then
          If Trim(Text1(5).Text) = temp6 Then
            Unload Me
            Exit Sub
          End If
         End If
       End If
     End If
    End If
  End If
End If

Dim i As Integer
For i = 1 To 主菜单.mainGrid.Rows - 1
  If Trim(Text1(0).Text) = 主菜单.mainGrid.TextMatrix(i, 2) Then
       If Trim(Text1(0).Text) <> temp1 Then
          MsgBox Trim(Text1(0).Text) & "该机型代号已被申请", vbInformation, "提醒"
          Exit Sub
       End If
  End If
  If Trim(Text1(2).Text) = 主菜单.mainGrid.TextMatrix(i, 4) Then
      If Trim(Text1(2).Text) <> temp3 Then
            MsgBox Trim(Text1(2).Text) & "该图号已被申请", vbInformation, "提醒"
            Exit Sub
      End If
  End If
        
Next i
        
主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 2) = Trim(Text1(0).Text)
主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 3) = Trim(Text1(1).Text)
主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 4) = Trim(Text1(2).Text)
主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 5) = Trim(Text1(3).Text)
主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 6) = Trim(Text1(4).Text)
主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 7) = DTPicker1.Value
主菜单.mainGrid.TextMatrix(主菜单.Selectrow, 8) = Trim(Text1(5).Text)

Dim n As Integer
For n = 1 To 主菜单.mainGrid.Cols - 1
        主菜单.mainGrid.Col = n
        主菜单.mainGrid.CellBackColor = &HFFFF&
Next n
Unload Me

主菜单.Selectrow = Empty

End Sub

⌨️ 快捷键说明

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