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

📄 frmcoedit.frm

📁 这是一个利用VB编写的中小企业ERP。功能比较全
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
         BeginProperty Column02 
         EndProperty
         BeginProperty Column03 
         EndProperty
         BeginProperty Column04 
         EndProperty
         BeginProperty Column05 
         EndProperty
         BeginProperty Column06 
         EndProperty
         BeginProperty Column07 
         EndProperty
      EndProperty
   End
   Begin VB.Frame Frame4 
      Caption         =   "送货地选择———从下表中选择出该订单产品送货地"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1815
      Left            =   120
      TabIndex        =   14
      Top             =   2280
      Width           =   11655
      Begin MSAdodcLib.Adodc Adodc2 
         Height          =   375
         Left            =   360
         Top             =   360
         Visible         =   0   'False
         Width           =   2175
         _ExtentX        =   3836
         _ExtentY        =   661
         ConnectMode     =   0
         CursorLocation  =   3
         IsolationLevel  =   -1
         ConnectionTimeout=   15
         CommandTimeout  =   30
         CursorType      =   3
         LockType        =   3
         CommandType     =   8
         CursorOptions   =   0
         CacheSize       =   50
         MaxRecords      =   0
         BOFAction       =   0
         EOFAction       =   0
         ConnectStringType=   1
         Appearance      =   1
         BackColor       =   -2147483643
         ForeColor       =   -2147483640
         Orientation     =   0
         Enabled         =   -1
         Connect         =   ""
         OLEDBString     =   ""
         OLEDBFile       =   ""
         DataSourceName  =   ""
         OtherAttributes =   ""
         UserName        =   ""
         Password        =   ""
         RecordSource    =   ""
         Caption         =   "Adodc2"
         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
         _Version        =   393216
      End
      Begin VB.TextBox TxtDeliverID 
         Enabled         =   0   'False
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   9000
         TabIndex        =   15
         Top             =   240
         Width           =   2295
      End
      Begin VB.Label Label1 
         Caption         =   "选择的送货地是:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   255
         Left            =   6840
         TabIndex        =   16
         Top             =   240
         Width           =   1935
      End
   End
   Begin VB.Image Image3 
      Height          =   300
      Left            =   4320
      Picture         =   "FrmCOEdit.frx":0CCA
      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       =   "FrmCOEdit.frx":10E6
      MousePointer    =   99  'Custom
      TabIndex        =   2
      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       =   "FrmCOEdit.frx":13F0
      MousePointer    =   99  'Custom
      TabIndex        =   3
      Top             =   6960
      Width           =   855
   End
   Begin VB.Image Image4 
      Height          =   300
      Left            =   6840
      Picture         =   "FrmCOEdit.frx":16FA
      Top             =   6960
      Width           =   300
   End
   Begin VB.Label LblSalesItemAdd 
      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            =   4920
      MouseIcon       =   "FrmCOEdit.frx":1B16
      MousePointer    =   99  'Custom
      TabIndex        =   1
      Top             =   4200
      Width           =   2415
   End
   Begin VB.Image Image1 
      Height          =   300
      Left            =   4440
      Picture         =   "FrmCOEdit.frx":1E20
      Top             =   4200
      Width           =   300
   End
End
Attribute VB_Name = "FrmCOEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public Modify As Boolean
Public IsFirst As Boolean
'Public OriCustomerID As String

Private Sub DataGrid1_Click()
    If Adodc1.Recordset.RecordCount <> 0 Then
        TxtCustomer.Text = Adodc1.Recordset.Fields(0)
        
        '装载送货地信息
        Adodc2.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
        Adodc2.RecordSource = "select * from Deliver where CustomerID='" + Trim(TxtCustomer) + "'"
        Set DataGrid2.DataSource = Adodc2
        Adodc2.Refresh
        
        DataGrid2.Enabled = True
    End If
End Sub




Private Sub DataGrid2_Click()
    If Adodc2.Recordset.RecordCount <> 0 Then
        TxtDeliverID.Text = Adodc2.Recordset.Fields(1)
        
        LblSalesItemAdd.Enabled = True
    End If
End Sub

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

Private Sub LblCancel_Click()
    Refresh_CO
    If Adodc3.Recordset.RecordCount <> 0 Then
        MyCO.DeleteCO (TxtCOID.Text)
    End If
    Unload Me
End Sub



Private Sub LblOK_Click()
    Refresh_CO
    If Adodc3.Recordset.RecordCount <> 0 Then
        MsgBox "CO信息添加成功"
        Unload Me
    Else
        MsgBox "尚未在CO中添加具体项目,请添加"
    End If
End Sub

Private Sub LblSalesItemAdd_Click()
    
    
    
    If TxtCOID.Text = "" Then
        MsgBox "请输入CO单号"
        Exit Sub
    End If
    
    If IsFirst = True Then '第一次在CO中添加
        '判断COID是否已经存在
        If MyCO.In_DBCOID(TxtCOID.Text) = True Then
            MsgBox "CO单号重复,请重新设置"
            TxtCOID.SetFocus
            TxtCOID.SelStart = 0
            TxtCOID.SelLength = Len(TxtCOID)
            Exit Sub
        End If
        DataGrid1.Enabled = False
        DataGrid2.Enabled = False
        TxtCOID.Enabled = False
        DTCODate.Enabled = False
        FrmCOSalesItemEdit.Modify = False
        
        FrmCOSalesItemEdit.OriCOID = TxtCOID.Text
        FrmCOSalesItemEdit.OriCODate = DTCODate.Value
        FrmCOSalesItemEdit.OriCustomerID = TxtCustomer.Text
        FrmCOSalesItemEdit.OriDeliverID = TxtDeliverID.Text
        FrmCOSalesItemEdit.Show 1
        Refresh_CO
    Else '在CO中继续添加
        
        FrmCOSalesItemEdit.Modify = False
        
        FrmCOSalesItemEdit.OriCOID = TxtCOID.Text
        FrmCOSalesItemEdit.OriCODate = DTCODate.Value
        FrmCOSalesItemEdit.OriCustomerID = TxtCustomer.Text
        FrmCOSalesItemEdit.OriDeliverID = TxtDeliverID.Text
        FrmCOSalesItemEdit.Show 1
        Refresh_CO
    End If
End Sub

Private Sub Refresh_CO()
    Adodc3.ConnectionString = "driver={SQL Server};server=" + Trim(Server) + ";uid=" + Trim(User) + ";pwd=" + Trim(Password) + ";database=ERP"
    Adodc3.RecordSource = "SELECT Customer.CustomerName, CO.CODate, Deliver.Country, Deliver.Province, Deliver.City, Deliver.Address, CO.COItemID, Item.Item, Item.Name, Item.Unit, CO.COQty, CO.ConsignmentDate, SalesItem.Currency1, SalesItem.UnitPrice, CO.IsComplete From SalesItem, Item, Deliver, CO, Customer WHERE Item.Item=SalesItem.Item and CO.SalesItemID=SalesItem.SalesItemID and Deliver.CustomerID=Customer.CustomerID and Customer.CustomerID=SalesItem.CustomerID and SalesItem.CustomerID= Deliver.CustomerID and CO.DeliverID=Deliver.DeliverID and CO.COID ='" + Trim(TxtCOID.Text) + "' order by CO.COItemID"
    Adodc3.Refresh
    
    Set DataGrid3.DataSource = Adodc3
    
End Sub

⌨️ 快捷键说明

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