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

📄 frminupdate.frm

📁 基于vb环境下开发的物资信息管理系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{BDC217C8-ED16-11CD-956C-0000C04E4C0A}#1.1#0"; "TABCTL32.OCX"
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form InUpdate 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "入库信息修改(设计者:陈晓坡 杨建伟)"
   ClientHeight    =   5190
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6930
   Icon            =   "frmInUpdate.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   5190
   ScaleWidth      =   6930
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton cmdClose 
      Caption         =   "退出"
      Height          =   375
      Left            =   5490
      TabIndex        =   22
      Top             =   4650
      Width           =   885
   End
   Begin VB.CommandButton cmdInfo 
      Caption         =   "详细信息"
      Height          =   375
      Left            =   4245
      TabIndex        =   21
      Top             =   4650
      Width           =   885
   End
   Begin VB.CommandButton cmdFind 
      Caption         =   "查找"
      Height          =   375
      Left            =   3030
      TabIndex        =   20
      Top             =   4650
      Width           =   885
   End
   Begin VB.CommandButton cmdDel 
      Caption         =   "删除"
      Height          =   375
      Left            =   1755
      TabIndex        =   19
      Top             =   4650
      Width           =   885
   End
   Begin VB.CommandButton cmdEdit 
      Caption         =   "修改"
      Height          =   375
      Left            =   540
      TabIndex        =   18
      Top             =   4650
      Width           =   885
   End
   Begin TabDlg.SSTab SSTab1 
      Height          =   4335
      Left            =   90
      TabIndex        =   0
      Top             =   60
      Width           =   6705
      _ExtentX        =   11827
      _ExtentY        =   7646
      _Version        =   393216
      Style           =   1
      Tabs            =   2
      Tab             =   1
      TabHeight       =   520
      TabCaption(0)   =   "基本信息"
      TabPicture(0)   =   "frmInUpdate.frx":014A
      Tab(0).ControlEnabled=   0   'False
      Tab(0).Control(0)=   "Command4"
      Tab(0).Control(1)=   "Command5"
      Tab(0).Control(2)=   "Frame1"
      Tab(0).ControlCount=   3
      TabCaption(1)   =   "材料明细"
      TabPicture(1)   =   "frmInUpdate.frx":0166
      Tab(1).ControlEnabled=   -1  'True
      Tab(1).Control(0)=   "cmdAddRecord"
      Tab(1).Control(0).Enabled=   0   'False
      Tab(1).Control(1)=   "cmdDelRecord"
      Tab(1).Control(1).Enabled=   0   'False
      Tab(1).Control(2)=   "MSFlexGrid1"
      Tab(1).Control(2).Enabled=   0   'False
      Tab(1).Control(3)=   "Text6"
      Tab(1).Control(3).Enabled=   0   'False
      Tab(1).ControlCount=   4
      Begin VB.Frame Frame1 
         Caption         =   "进库单基本信息"
         Height          =   3555
         Left            =   -74850
         TabIndex        =   7
         Top             =   450
         Width           =   6345
         Begin VB.TextBox Text1 
            Height          =   345
            Left            =   2070
            TabIndex        =   12
            Top             =   450
            Width           =   2145
         End
         Begin VB.TextBox Text2 
            Height          =   345
            Left            =   2070
            TabIndex        =   11
            Top             =   1065
            Width           =   2145
         End
         Begin VB.TextBox Text3 
            Height          =   345
            Left            =   2070
            TabIndex        =   10
            Top             =   1695
            Width           =   2145
         End
         Begin VB.TextBox Text4 
            Height          =   345
            Left            =   2070
            TabIndex        =   9
            Top             =   2310
            Width           =   2145
         End
         Begin VB.TextBox Text5 
            Height          =   345
            Left            =   2070
            TabIndex        =   8
            Top             =   2940
            Width           =   2145
         End
         Begin VB.Label Label1 
            Caption         =   "进库单号码"
            Height          =   345
            Left            =   600
            TabIndex        =   17
            Top             =   450
            Width           =   945
         End
         Begin VB.Label Label2 
            Caption         =   "发票号码"
            Height          =   345
            Left            =   600
            TabIndex        =   16
            Top             =   1065
            Width           =   945
         End
         Begin VB.Label Label3 
            Caption         =   "进库日期"
            Height          =   465
            Left            =   600
            TabIndex        =   15
            Top             =   1695
            Width           =   1185
         End
         Begin VB.Label Label4 
            Caption         =   "经办人"
            Height          =   345
            Left            =   600
            TabIndex        =   14
            Top             =   2310
            Width           =   945
         End
         Begin VB.Label Label5 
            Caption         =   "保管人"
            Height          =   345
            Left            =   600
            TabIndex        =   13
            Top             =   2940
            Width           =   945
         End
      End
      Begin VB.TextBox Text6 
         Height          =   285
         Left            =   2160
         TabIndex        =   6
         Top             =   1650
         Width           =   1005
      End
      Begin MSFlexGridLib.MSFlexGrid MSFlexGrid1 
         Height          =   2805
         Left            =   210
         TabIndex        =   5
         Top             =   480
         Width           =   6225
         _ExtentX        =   10980
         _ExtentY        =   4948
         _Version        =   393216
      End
      Begin VB.CommandButton Command5 
         Caption         =   "推出"
         Height          =   615
         Left            =   -70230
         TabIndex        =   4
         Top             =   6540
         Width           =   1725
      End
      Begin VB.CommandButton Command4 
         Caption         =   "添加出苦"
         Height          =   525
         Left            =   -74130
         TabIndex        =   3
         Top             =   6630
         Width           =   2175
      End
      Begin VB.CommandButton cmdDelRecord 
         Caption         =   "删除记录"
         Height          =   375
         Left            =   4020
         TabIndex        =   2
         Top             =   3540
         Width           =   1005
      End
      Begin VB.CommandButton cmdAddRecord 
         Caption         =   "添加记录"
         Height          =   375
         Left            =   1560
         TabIndex        =   1
         Top             =   3510
         Width           =   1005
      End
   End
End
Attribute VB_Name = "InUpdate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim Myws As Workspace
Dim Mydb As Database
Dim Myrs1 As Recordset
Dim Myrs2 As Recordset

Private Sub cmdAddRecord_Click()
    Project.StatusBar1.Panels(2).Text = "添加进库信息"
    InfoEdit.Show 1
    
End Sub

Private Sub cmdClose_Click()
    Myrs1.Close
    Myrs2.Close
    Mydb.Close
    Myws.Close
    Unload Me
    Project.StatusBar1.Panels(2).Text = "就绪"
End Sub

Private Sub cmdDel_Click()
    Dim a As Integer
    Dim SQLstring As String
    Dim mrc1 As Recordset
    Dim mrc2 As Recordset
    Dim mrc As Recordset
    Dim str As String
    Dim Num As Integer
    Dim price As Single
    
    a = MsgBox("您确认要删除此项记录吗?", vbOKCancel + vbInformation, "信息提示")
    Set mrc1 = Mydb.OpenRecordset("select * from inlib where 进库单号码='" & Trim(Text1) & "'")
    Set mrc2 = Mydb.OpenRecordset("select * from inlibdetail where 进库单号码='" & Trim(Text1) & "'")
    If a = vbOK Then
        mrc1.Delete
        While mrc2.EOF = False
            str = mrc2.Fields("材料编码")
            Num = mrc2.Fields("数量")
            price = mrc2.Fields("金额")
            SQLstring = "update msurplus set 数量=数量-" + CStr(Num) + ",金额=金额-" + CStr(price) + " where 材料编码='" & str & "'"
            Mydb.Execute (SQLstring)
            
            mrc2.Delete
            mrc2.MoveNext
        Wend
        Unload Me
    End If
    mrc2.Close
    mrc1.Close
    InUpdate.Show
End Sub

Private Sub cmdDelRecord_Click()
    Dim i As Integer, j As Integer
    
    Text6.Visible = False
    If MSFlexGrid1.Rows > 1 Then
        If MsgBox("确认要删除这条记录吗?", vbOKCancel + vbExclamation, "警告") = vbOK Then
            i = MSFlexGrid1.Row
            Text6.Text = MSFlexGrid1.TextMatrix(i, 0)
            Text6.Text = ""
            MSFlexGrid1.TextMatrix(i, 0) = Text6.Text
            Text6.Text = MSFlexGrid1.TextMatrix(i, 1)
            Text6.Text = ""
            MSFlexGrid1.TextMatrix(i, 1) = Text6.Text
            Text6.Text = MSFlexGrid1.TextMatrix(i, 2)
            Text6.Text = ""
            MSFlexGrid1.TextMatrix(i, 2) = Text6.Text
            Text6.Text = MSFlexGrid1.TextMatrix(i, 3)
            Text6.Text = ""
            MSFlexGrid1.TextMatrix(i, 3) = Text6.Text
            Text6.Text = MSFlexGrid1.TextMatrix(i, 4)
            Text6.Text = ""
            MSFlexGrid1.TextMatrix(i, 4) = Text6.Text
            Text6.Text = MSFlexGrid1.TextMatrix(i, 5)
            Text6.Text = ""
            MSFlexGrid1.TextMatrix(i, 5) = Text6.Text
            Text6.Text = MSFlexGrid1.TextMatrix(i, 6)
            Text6.Text = ""
            MSFlexGrid1.TextMatrix(i, 6) = Text6.Text

⌨️ 快捷键说明

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