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

📄 frmstore.frm

📁 这是一个利用VB编写的中小企业ERP。功能比较全
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         Top             =   1200
         Width           =   1020
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "库位描述:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   240
         Left            =   240
         TabIndex        =   7
         Top             =   2040
         Width           =   1275
      End
      Begin VB.Label LblDescription 
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   2400
         Width           =   1455
      End
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Height          =   7095
      Left            =   2880
      TabIndex        =   0
      Top             =   840
      Width           =   11895
      _ExtentX        =   20981
      _ExtentY        =   12515
      _Version        =   393216
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin VB.Label LblCancel 
      BackStyle       =   0  'Transparent
      Caption         =   "返  回"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   9840
      MouseIcon       =   "FrmStore.frx":231A
      MousePointer    =   99  'Custom
      TabIndex        =   15
      Top             =   8160
      Width           =   855
   End
   Begin VB.Image Image4 
      Height          =   300
      Left            =   9240
      Picture         =   "FrmStore.frx":2624
      Top             =   8160
      Width           =   300
   End
   Begin VB.Image Image2 
      Height          =   300
      Left            =   6600
      Picture         =   "FrmStore.frx":2A40
      Top             =   8160
      Width           =   300
   End
   Begin VB.Label LblStoreTrans 
      BackStyle       =   0  'Transparent
      Caption         =   "库存转移"
      Enabled         =   0   'False
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   7320
      MouseIcon       =   "FrmStore.frx":2E5C
      MousePointer    =   99  'Custom
      TabIndex        =   14
      Top             =   8160
      Width           =   1095
   End
   Begin VB.Label LblInfo 
      AutoSize        =   -1  'True
      Caption         =   "库存信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   18
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   360
      Left            =   3720
      TabIndex        =   3
      Top             =   240
      Visible         =   0   'False
      Width           =   1500
   End
End
Attribute VB_Name = "FrmStore"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CmbLocation_Click()
    Adodc2.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
    Adodc2.RecordSource = "select * from StoreRoom where StoreRoom='" + Trim(CmbStoreRoom.Text) + "' and Location='" + Trim(CmbLocation.Text) + "'"
    Adodc2.Refresh
    Set LblDescription.DataSource = Adodc2
    If Adodc2.Recordset.RecordCount <> 0 Then
        LblDescription.Caption = Adodc2.Recordset.Fields(3)
        If LblDescription.Caption <> "" Then
            LblStoreQury.Enabled = True
        Else
            LblStoreQury.Enabled = False
        End If
    End If
    If Trim(CmbLocation.Text) = "请选择库号" Then
        LblDescription.Caption = ""
    End If
End Sub

Private Sub CmbStoreRoom_Click()
    If CmbStoreRoom.Text <> "请选择库号" Then
        CmbLocation.Enabled = True
        CmbLocation.Clear
        '装入CmbLocation的信息
        CmbLocation.AddItem "请选择位号"
        MyStoreIn.Load_Location (CmbStoreRoom.Text)
        i = 0
        Do While Arr_Item(i) <> ""
            CmbLocation.AddItem Arr_Item(i)
            i = i + 1
        Loop
        CmbLocation.ListIndex = 0
    Else
        CmbLocation.Clear
        CmbLocation.Enabled = False
        LblDescription.Caption = ""
    End If
End Sub

Private Sub Form_Load()
    '装入CmbStoreRoom的信息
    CmbStoreRoom.AddItem "请选择库号"
    MyStoreIn.Load_StoreRoom
    i = 0
    Do While Arr_Item(i) <> ""
        CmbStoreRoom.AddItem Arr_Item(i)
        i = i + 1
    Loop
    CmbStoreRoom.ListIndex = 0
    CmbLocation.Enabled = False
    
End Sub

Private Sub ImgItem_Click()
    FrmStoreItemQury.Show 1
End Sub

Private Sub LblCancel_Click()
    Unload Me
End Sub

Private Sub LblDescription_Change()
    If Trim(LblDescription.Caption) = "" Then
        LblStoreQury.Enabled = False
    Else
        LblStoreQury.Enabled = True
    End If
End Sub


Private Sub LblItemQury_Click()
    Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
    Adodc1.RecordSource = "select Item.Item as 货号,Item.Name as 名称,Store.StoreRoom as 库房,Store.Location as 位置,Item.Specification as 规格,Store.Qty as 数量 from Store,Item where Store.Item=Item.Item and Store.Item='" + Trim(TxtItem.Text) + "' "
    Set DataGrid1.DataSource = Adodc1
    Adodc1.Refresh
    LblInfo.Visible = True
    LblInfo.Caption = "按货号查询结果——" + Trim(Adodc1.Recordset.Fields(1)) + "存放位置"
    If Adodc1.Recordset.RecordCount <> 0 Then
        LblStoreTrans.Enabled = True
    End If
End Sub

Private Sub LblStoreQury_Click()
    Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
    Adodc1.RecordSource = "select Item.Item as 货号,Item.Name as 名称,Store.StoreRoom as 库房,Store.Location as 位置,Item.Specification as 规格,Store.Qty as 数量 from Store,Item where Store.Item=Item.Item and StoreRoom='" + Trim(CmbStoreRoom.Text) + "' and Location='" + Trim(CmbLocation.Text) + "'"
    Set DataGrid1.DataSource = Adodc1
    Adodc1.Refresh
    LblInfo.Visible = True
    LblInfo.Caption = "按库位查询结果——" + Trim(CmbStoreRoom.Text) + "-" + Trim(CmbLocation.Text)
    If Adodc1.Recordset.RecordCount <> 0 Then
        LblStoreTrans.Enabled = True
    End If
End Sub

Private Sub LblStoreTrans_Click()
    If Adodc1.Recordset.RecordCount = 0 Then
        MsgBox "没有可转移的货物"
        LblStoreTrans.Enabled = False
        Exit Sub
    End If
    FrmStoreTran.LblItem.Caption = Adodc1.Recordset.Fields(0)
    FrmStoreTran.LblName.Caption = Adodc1.Recordset.Fields(1)
    FrmStoreTran.LblOriStoreroom.Caption = Adodc1.Recordset.Fields(2)
    FrmStoreTran.LblOriLocation.Caption = Adodc1.Recordset.Fields(3)
    
    FrmStoreTran.Show 1
End Sub

Private Sub TxtItem_Change()
    If Trim(TxtItem.Text) <> "" Then
        LblItemQury.Enabled = True
    Else
        LblItemQury.Enabled = False
    End If
End Sub

⌨️ 快捷键说明

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