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

📄 frmpoedit.frm

📁 这是一个利用VB编写的中小企业ERP。功能比较全
💻 FRM
📖 第 1 页 / 共 2 页
字号:
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ColumnCount     =   2
         BeginProperty Column00 
            DataField       =   "BusinessmanID"
            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       =   "BusinessmanName"
            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 
               ColumnWidth     =   3614.74
            EndProperty
            BeginProperty Column01 
               ColumnWidth     =   3630.047
            EndProperty
         EndProperty
      End
      Begin VB.Label Label2 
         Caption         =   "选择的供应商是:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   3360
         TabIndex        =   6
         Top             =   360
         Width           =   1935
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "PO基本信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1935
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   3375
      Begin MSComCtl2.DTPicker DTPODate 
         Height          =   375
         Left            =   1080
         TabIndex        =   9
         Top             =   1200
         Width           =   2055
         _ExtentX        =   3625
         _ExtentY        =   661
         _Version        =   393216
         Format          =   69795841
         CurrentDate     =   38204
      End
      Begin VB.TextBox TxtPOID 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   1080
         TabIndex        =   1
         Top             =   480
         Width           =   2055
      End
      Begin VB.Label Label3 
         Caption         =   "PO日期"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   1200
         Width           =   1095
      End
      Begin VB.Label Label4 
         Caption         =   "PO单号"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   240
         TabIndex        =   2
         Top             =   480
         Width           =   1095
      End
   End
   Begin VB.Label Label1 
      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            =   240
      MouseIcon       =   "FrmPOEdit.frx":0CCA
      TabIndex        =   16
      Top             =   5400
      Width           =   1455
   End
   Begin VB.Label Label5 
      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            =   240
      MouseIcon       =   "FrmPOEdit.frx":0FD4
      TabIndex        =   15
      Top             =   5880
      Width           =   1455
   End
   Begin VB.Label Label8 
      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            =   240
      MouseIcon       =   "FrmPOEdit.frx":12DE
      TabIndex        =   14
      Top             =   6360
      Width           =   1455
   End
   Begin VB.Image Image3 
      Height          =   300
      Left            =   4320
      Picture         =   "FrmPOEdit.frx":15E8
      Top             =   6960
      Width           =   300
   End
   Begin VB.Label LblOK 
      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            =   4920
      MouseIcon       =   "FrmPOEdit.frx":1A04
      MousePointer    =   99  'Custom
      TabIndex        =   12
      Top             =   6960
      Width           =   735
   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            =   7440
      MouseIcon       =   "FrmPOEdit.frx":1D0E
      MousePointer    =   99  'Custom
      TabIndex        =   11
      Top             =   6960
      Width           =   855
   End
   Begin VB.Image Image4 
      Height          =   300
      Left            =   6840
      Picture         =   "FrmPOEdit.frx":2018
      Top             =   6960
      Width           =   300
   End
   Begin VB.Label LblPurchaseItemAdd 
      BackStyle       =   0  'Transparent
      Caption         =   "添加采购产品信息"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   5160
      MouseIcon       =   "FrmPOEdit.frx":2434
      MousePointer    =   99  'Custom
      TabIndex        =   10
      Top             =   2400
      Width           =   2415
   End
   Begin VB.Image Image1 
      Height          =   300
      Left            =   4680
      Picture         =   "FrmPOEdit.frx":273E
      Top             =   2400
      Width           =   300
   End
End
Attribute VB_Name = "FrmPOEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public IsFirst As Boolean

Private Sub DataGrid1_Click()
    If Adodc1.Recordset.RecordCount <> 0 Then
        TxtBusinessman.Text = Adodc1.Recordset.Fields(0)
        LblPurchaseItemAdd.Enabled = True
    End If
End Sub


Private Sub Form_Load()
    If Modify = False Then
        LblPurchaseItemAdd.Enabled = False
    Else
        LblPurchaseItemModify.Visible = True
        LblPurchaseItemDelete.Visible = True
    End If
    
    Adodc1.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
    Adodc1.RecordSource = "select * from Businessman"
    Set DataGrid1.DataSource = Adodc1
    IsFirst = True
End Sub

Private Sub LblCancel_Click()
    Refresh_PO
    If Adodc2.Recordset.RecordCount <> 0 Then
        MyPO.DeletePO (TxtPOID.Text)
    End If
    Unload Me
End Sub



Private Sub LblOK_Click()
    Refresh_PO
    If Adodc2.Recordset.RecordCount <> 0 Then
        
        '添加POInfo信息
        MyPO.PaymentCondition = TxtPaymentCondition.Text
        MyPO.DeliverDemand = TxtDeliverDemand.Text
        MyPO.Other = TxtOther.Text
        MyPO.POID = TxtPOID.Text
        MyPO.InsertPOInfo
        
        MsgBox "PO信息添加成功"
        Unload Me
    Else
        MsgBox "尚未在PO中添加具体项目,请添加"
    End If
End Sub

Private Sub LblPurchaseItemAdd_Click()
    
    
    
    If TxtPOID.Text = "" Then
        MsgBox "请输入PO单号"
        Exit Sub
    End If
    If IsFirst = True Then '第一次在PO中添加
        '判断POID是否已经存在
        If MyPO.In_DBPOID(TxtPOID.Text) = True Then
            MsgBox "PO单号重复,请重新设置"
            TxtPOID.SetFocus
            TxtPOID.SelStart = 0
            TxtPOID.SelLength = Len(TxtPOID)
            Exit Sub
        End If
        DataGrid1.Enabled = False
        TxtPOID.Enabled = False
        DTPODate.Enabled = False
        
        FrmPOPurchaseItemEdit.Modify = False
        
        FrmPOPurchaseItemEdit.OriPOID = TxtPOID.Text
        FrmPOPurchaseItemEdit.OriPODate = DTPODate.Value
        FrmPOPurchaseItemEdit.OriBusinessmanID = TxtBusinessman.Text
        FrmPOPurchaseItemEdit.Show 1
        Refresh_PO
    Else '在PO中继续添加
        
        FrmPOPurchaseItemEdit.Modify = False
        
        FrmPOPurchaseItemEdit.OriPOID = TxtPOID.Text
        FrmPOPurchaseItemEdit.OriPODate = DTPODate.Value
        FrmPOPurchaseItemEdit.OriBusinessmanID = TxtBusinessman.Text
        FrmPOPurchaseItemEdit.Show 1
        Refresh_PO
    End If
End Sub

Private Sub Refresh_PO()
    Adodc2.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
    Adodc2.RecordSource = "SELECT Businessman.BusinessmanName, PO.PODate, PO.POItemID, Item.Item, Item.Name, Item.Unit, PO.POQty, PO.ConsignmentDate, PurchaseItem.Currency1, PurchaseItem.UnitPrice, PO.IsComplete,Businessman.BusinessmanID,PurchaseItem.PurchaseItemID From PurchaseItem, Item, PO, Businessman WHERE Item.Item=PurchaseItem.Item and PO.PurchaseItemID=PurchaseItem.PurchaseItemID  and Businessman.BusinessmanID=PurchaseItem.BusinessmanID and PO.POID ='" + Trim(TxtPOID.Text) + "' order by PO.POItemID"
    Adodc2.Refresh
    
    Set DataGrid2.DataSource = Adodc2
    
End Sub

⌨️ 快捷键说明

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