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

📄 frmstoreinedit.frm

📁 本系统为汽车销售系统
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Height          =   2415
      Left            =   120
      TabIndex        =   0
      Top             =   840
      Width           =   5055
      Begin VB.TextBox txtaddr 
         DataSource      =   "select "
         Height          =   375
         Index           =   1
         Left            =   1080
         TabIndex        =   11
         Text            =   " "
         Top             =   1560
         Width           =   3495
      End
      Begin VB.TextBox txtcode 
         Height          =   270
         Index           =   1
         Left            =   1080
         TabIndex        =   9
         Text            =   " "
         Top             =   1080
         Width           =   1455
      End
      Begin VB.TextBox txtphone 
         Height          =   270
         Index           =   0
         Left            =   3480
         TabIndex        =   7
         Top             =   720
         Width           =   1215
      End
      Begin VB.TextBox txtcontact 
         Height          =   270
         Left            =   1080
         TabIndex        =   5
         Top             =   720
         Width           =   1455
      End
      Begin VB.ComboBox Comboclt 
         BeginProperty DataFormat 
            Type            =   1
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
         DataSource      =   "Adodc2"
         Height          =   300
         Left            =   1080
         TabIndex        =   3
         Top             =   240
         Width           =   3615
      End
      Begin VB.Label Label5 
         Caption         =   "联系电话"
         Height          =   375
         Left            =   2640
         TabIndex        =   10
         Top             =   720
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "通信地址"
         Height          =   255
         Left            =   120
         TabIndex        =   8
         Top             =   1680
         Width           =   855
      End
      Begin VB.Label Label3 
         Caption         =   "邮政编码"
         Height          =   255
         Left            =   120
         TabIndex        =   6
         Top             =   1200
         Width           =   1095
      End
      Begin VB.Label Label2 
         Caption         =   "联系人"
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   720
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "客户单位"
         Height          =   375
         Left            =   120
         TabIndex        =   2
         Top             =   360
         Width           =   1095
      End
   End
End
Attribute VB_Name = "frmstoreinedit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriId As Long
'客户信息
Public OriClt As String
Public OriCltType As Integer
'产品信息
Public OriType1, OriType2 As String
Public OriPro As String
'仓库信息
Public OriStore As String

Private Sub Fill_Clt()
  If Comboclt.Text = "" Then
    txtcontact = ""
   ' txtaddr = ""
   ' txtcode = ""
    'txtphone = ""
    
 'Else
    MyClt.GetInfo (MyClt.GetId(Comboclt.Text))
    txtcontact = MyClt.Contact
    'txtaddr = MyClt.Address
    'txtcode = MyClt.Postcode
    'txtphone = MyClt.Phone
    
  End If
End Sub

Private Sub Fill_Pro()
  If Combopro.Text = "" Then
    txtStyle = ""
    txtunit = ""
    txtprice = ""
  Else
    MyPro.GetInfo (MyPro.GetId(Combopro.Text))
    txtStyle = MyPro.ProStyle
    txtunit = MyPro.ProUnit
    txtprice = MyPro.ProPrice
  End If
End Sub

Private Function Check() As Boolean
  If Trim(Comboclt.Text) = "" Then
    MsgBox "请选择客户单位"
    Check = False
    Exit Function
  End If
  If Trim(Combopro.Text) = "" Then
    MsgBox "请选择产品名称"
    Check = False
    Exit Function
  End If
  If txtnum = "" Then
    MsgBox "请输入产品数量"
    txtnum.SetFocus
    Check = False
    Exit Function
  End If
'  If ComboCreateDate.Text = "" Then
   ' MsgBox "请输入生产日期"
   ' Check = False
   ' Exit Function
 ' End If
  If Combostore.Text = "" Then
    MsgBox "请选择存储的仓库"
    Check = False
    Exit Function
  End If
  
  Check = True
End Function

Private Sub cmd_ok_Click()
DB_Connect
  
  sqlstmt = "INSERT INTO ProInStore (ProId, ProPrice, ProNum," _
     + " ClientId,  StoreId) Values(" _
     + Trim(Str(ProId)) + "," + Trim(Str(ProPrice)) + "," _
     + Trim(Str(ProNum)) + "," + Trim(Str(ClientId)) + "," _
     + Trim(Str(StoreId)) + ")"
  OdbcExt (sqlstmt)
  Rc = SQLFreeStmt(Hstmt, SQL_DROP)
  DB_Disconnect
  
  Unload Me
End Sub

Private Sub Cmd_close_Click()
  Unload Me
End Sub

Private Sub ComboClt_Click()
  Fill_Clt
End Sub



Private Sub ComboPro_Click()
  Fill_Pro
End Sub







Private Sub Form_Load()
  Dim TmpType As Long
  Dim i As Integer
  
  If Modify = True Then
    OriId = frmstoreinman.Adodc1.Recordset.Fields(0)
    If InCombo(Trim(frmstoreinman.Adodc1.Recordset.Fields(2)), ComboStoreinType) = True Then
      ComboStoreinType.Text = Trim(frmstoreinman.Adodc1.Recordset.Fields(2))
    End If
    '读取产品名称和类目
    OriPro = Trim(frmstoreinman.Adodc1.Recordset.Fields(3))
    MyPro.GetInfo (MyPro.GetId(Trim(frmstoreinman.Adodc1.Recordset.Fields(3))))
    Combopro.Enabled = False
    
        
    OriStore = Trim(frmstoreinman.Adodc1.Recordset.Fields(9))
    lblEmpName = Trim(frmstoreinman.Adodc1.Recordset.Fields(10))
    lbloptDate = Trim(frmstoreinman.Adodc1.Recordset.Fields(11))
    Combostore.Enabled = False
  End If
  
  '装入客户数据
  MyClt.Load_Client (OriCltType)
  i = 0
  Comboclt.Clear
  Do While Arr_Client(i) <> ""
    Comboclt.AddItem Arr_Client(i)
    i = i + 1
  Loop
  If Modify = False Then
    If Comboclt.ListCount > 0 Then
      Comboclt.ListIndex = 0
    End If
  Else
    If InCombo(OriClt, Comboclt) = True Then
      Comboclt.Text = OriClt
    End If
  End If
  Fill_Clt
  
  
  '装入产品名称
  MyPro.Load_by_Type (TmpType)
  i = 0
  Combopro.Clear
  Do While Arr_Product(i) <> ""
    Combopro.AddItem Arr_Product(i)
    i = i + 1
  Loop
  If OriPro = "" Then
    If Combopro.ListCount > 0 Then
      Combopro.ListIndex = 0
    End If
  Else
    If InCombo(OriPro, Combopro) = True Then
      Combopro.Text = OriPro
    End If
  End If
  Fill_Pro
  
  '入库信息
  MyStore.Load_Store
  i = 0
 Combostore.Clear
  Do While Arr_Store(i) <> ""
    Combostore.AddItem Arr_Store(i)
    i = i + 1
  Loop
  If OriStore = "" Then
    If Combostore.ListCount > 0 Then
      Combostore.ListIndex = 0
    End If
  Else
    If InCombo(OriStore, Combostore) = True Then
      Combostore.Text = OriStore
    End If
  End If
End Sub

Private Sub txtNum_Change()
  txtAmount = Val(txtprice1) * Val(txtnum)
End Sub

Private Sub txtNum_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
  If In_Int(KeyAscii) = False Then
    KeyAscii = 0
  End If
End Sub

Private Sub txtPos_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
End Sub

Private Sub txtPrice1_Change()
  txtAmount = Val(txtprice1) * Val(txtnum)
End Sub

Private Sub txtPrice1_KeyPress(KeyAscii As Integer)
  EnterTAB (KeyAscii)
  If In_Single(KeyAscii) = False Then
    KeyAscii = 0
  End If
End Sub


⌨️ 快捷键说明

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