www.pudn.com > vb-sql-server.rar > frmOFFER1.frm, change:2003-12-06,size:11320b


VERSION 5.00 
Begin VB.Form frmOFFER1  
   BorderStyle     =   3  'Fixed Dialog 
   Caption         =   "付款信息" 
   ClientHeight    =   4560 
   ClientLeft      =   48 
   ClientTop       =   336 
   ClientWidth     =   6360 
   LinkTopic       =   "Form1" 
   MaxButton       =   0   'False 
   MinButton       =   0   'False 
   ScaleHeight     =   4560 
   ScaleWidth      =   6360 
   ShowInTaskbar   =   0   'False 
   StartUpPosition =   1  'CenterOwner 
   Begin VB.CommandButton cmdSave  
      Caption         =   "付清货款 (&S)" 
      Height          =   375 
      Left            =   1680 
      TabIndex        =   28 
      Top             =   4080 
      Width           =   1215 
   End 
   Begin VB.CommandButton cmdExit  
      Caption         =   "返回 (&X)" 
      Height          =   375 
      Left            =   3120 
      TabIndex        =   27 
      Top             =   4080 
      Width           =   1215 
   End 
   Begin VB.Frame Frame1  
      Caption         =   "付款信息:" 
      Height          =   3732 
      Left            =   120 
      TabIndex        =   0 
      Top             =   120 
      Width           =   6132 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   1 
         Left            =   4560 
         MaxLength       =   20 
         TabIndex        =   13 
         Top             =   360 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   0 
         Left            =   1560 
         MaxLength       =   8 
         TabIndex        =   12 
         Top             =   360 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   2 
         Left            =   1560 
         MaxLength       =   20 
         TabIndex        =   11 
         Top             =   720 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   3 
         Left            =   4560 
         MaxLength       =   20 
         TabIndex        =   10 
         Top             =   720 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   4 
         Left            =   1560 
         MaxLength       =   8 
         TabIndex        =   9 
         Top             =   1080 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   5 
         Left            =   4560 
         MaxLength       =   8 
         TabIndex        =   8 
         Top             =   1080 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   6 
         Left            =   1560 
         MaxLength       =   8 
         TabIndex        =   7 
         Top             =   1440 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   7 
         Left            =   4560 
         MaxLength       =   8 
         TabIndex        =   6 
         Top             =   1440 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   8 
         Left            =   1560 
         MaxLength       =   8 
         TabIndex        =   5 
         Top             =   1800 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   9 
         Left            =   4560 
         MaxLength       =   8 
         TabIndex        =   4 
         Top             =   1800 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   10 
         Left            =   1560 
         MaxLength       =   8 
         TabIndex        =   3 
         Top             =   2160 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   270 
         Index           =   11 
         Left            =   4560 
         MaxLength       =   8 
         TabIndex        =   2 
         Top             =   2160 
         Width           =   1212 
      End 
      Begin VB.TextBox txtItem  
         Height          =   1080 
         Index           =   12 
         Left            =   1560 
         MaxLength       =   200 
         MultiLine       =   -1  'True 
         ScrollBars      =   2  'Vertical 
         TabIndex        =   1 
         Top             =   2520 
         Width           =   4212 
      End 
      Begin VB.Label Label2  
         Caption         =   "进货日期:" 
         Height          =   252 
         Index           =   1 
         Left            =   3360 
         TabIndex        =   26 
         Top             =   360 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "进货单编  号:" 
         Height          =   252 
         Index           =   0 
         Left            =   360 
         TabIndex        =   25 
         Top             =   360 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "供货商编号:" 
         Height          =   252 
         Index           =   5 
         Left            =   360 
         TabIndex        =   24 
         Top             =   720 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "供货商名称:" 
         Height          =   252 
         Index           =   6 
         Left            =   3360 
         TabIndex        =   23 
         Top             =   720 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "商品编号:" 
         Height          =   252 
         Index           =   7 
         Left            =   360 
         TabIndex        =   22 
         Top             =   1080 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "商品名称:" 
         Height          =   252 
         Index           =   8 
         Left            =   3360 
         TabIndex        =   21 
         Top             =   1080 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "商品期号:" 
         Height          =   252 
         Index           =   2 
         Left            =   360 
         TabIndex        =   20 
         Top             =   1440 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "备    注   信    息:" 
         Height          =   252 
         Index           =   10 
         Left            =   360 
         TabIndex        =   19 
         Top             =   2520 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "数量:" 
         Height          =   252 
         Index           =   3 
         Left            =   3360 
         TabIndex        =   18 
         Top             =   1440 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "进货单价:" 
         Height          =   252 
         Index           =   4 
         Left            =   360 
         TabIndex        =   17 
         Top             =   1800 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "进货折扣:" 
         Height          =   252 
         Index           =   9 
         Left            =   3360 
         TabIndex        =   16 
         Top             =   1800 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "总金额:" 
         Height          =   252 
         Index           =   11 
         Left            =   360 
         TabIndex        =   15 
         Top             =   2160 
         Width           =   1212 
      End 
      Begin VB.Label Label2  
         Caption         =   "付款比例:" 
         Height          =   252 
         Index           =   12 
         Left            =   3360 
         TabIndex        =   14 
         Top             =   2160 
         Width           =   1212 
      End 
   End 
End 
Attribute VB_Name = "frmOFFER1" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Option Explicit 
'是否改动过记录,ture为改过 
Dim mblChange As Boolean 
Dim mrc As ADODB.Recordset 
Public txtSQL As String 
 
Private Sub cmdExit_Click() 
    If mblChange And cmdSave.Enabled Then 
        If MsgBox("保存当前记录的变化吗?", vbOKCancel + vbExclamation, "警告") = vbOK Then 
            '保存 
            Call cmdSave_Click 
        End If 
    End If 
    Unload Me 
End Sub 
 
Private Sub cmdSave_Click() 
    Dim intCount As Integer 
    Dim sMeg As String 
    Dim MsgText As String 
     
   
    
     
    '再加入新记录 
    txtSQL = "select jsfk,yf from inh where inh_no = '" & Trim(txtItem(0)) & "'" 
    Set mrc = ExecuteSQL(txtSQL, MsgText) 
 
    If Not mrc.EOF Then 
        mrc.Fields(0) = "Y" 
        mrc.Fields(1) = 100 
         
    End If 
     
    mrc.Update 
    mrc.Close 
     
 
        MsgBox "付款登记成功!", vbOKOnly + vbExclamation, "添加记录" 
        For intCount = 0 To 12 
            txtItem(intCount) = "" 
        Next intCount 
         
 
        Unload frmOFFER 
        frmOFFER.txtSQL = "select inh.inh_no,inh.in_date,inh.gfdm,dm_gf.mc,inh.wzdm,dm_wz.mc,inh.s_w,inh.sl,inh.in_danj,inh.i_zk,inh.i_zke,inh.jz,inh.yf,inh.bz from inh inner join dm_gf on inh.gfdm = dm_gf.dm inner join dm_wz on inh.wzdm = dm_wz.dm where inh.jsfk <> 'Y' and inh.s_w = '0' union select inh.inh_no,inh.in_date,inh.gfdm,dm_gf.mc,inh.wzdm,dm_service.mc,inh.s_w,inh.sl,inh.in_danj,inh.i_zk,inh.i_zke,inh.jz,inh.yf,inh.bz from inh inner join dm_gf on inh.gfdm = dm_gf.dm inner join dm_service on inh.wzdm = dm_service.dm where inh.jsfk <> 'Y' and inh.s_w = '1'" 
        frmOFFER.Show 
         
     
End Sub 
 
Private Sub Form_Load() 
    Dim intCount As Integer 
    Dim MsgText As String 
    Dim i As Integer 
   
        Set mrc = ExecuteSQL(txtSQL, MsgText) 
         
        If mrc.EOF = False Then 
            With mrc 
                For intCount = 0 To 12 
                    txtItem(intCount) = .Fields(intCount) 
                    txtItem(intCount).Enabled = False 
                Next intCount 
                                 
                
            End With 
        End If 
End Sub 
 
Private Sub txtItem_Change(Index As Integer) 
    '有变化设置gblchange 
 
End Sub 
 
Private Sub txtItem_GotFocus(Index As Integer) 
    txtItem(Index).SelStart = 0 
    txtItem(Index).SelLength = Len(txtItem(Index)) 
End Sub 
 
Private Sub txtItem_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer) 
    EnterToTab KeyCode 
End Sub