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

📄 frmcustomercontractupdate.frm

📁 很好! 很实用! 免费!
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomct2.ocx"
Begin VB.Form frmCustomerContractUpdate 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "修改客户合同"
   ClientHeight    =   6975
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   9960
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   6975
   ScaleWidth      =   9960
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Height          =   495
      Left            =   6600
      TabIndex        =   18
      Top             =   6420
      Width           =   1575
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      Height          =   495
      Left            =   8340
      TabIndex        =   17
      Top             =   6420
      Width           =   1335
   End
   Begin VB.Frame Frame1 
      Caption         =   "客户合同"
      Height          =   6015
      Left            =   120
      TabIndex        =   0
      Top             =   180
      Width           =   9735
      Begin VB.CommandButton cmdView 
         Caption         =   "查看"
         Height          =   345
         Left            =   8940
         TabIndex        =   19
         Top             =   4710
         Width           =   585
      End
      Begin VB.TextBox txtTitle 
         Height          =   345
         Left            =   4980
         TabIndex        =   7
         Top             =   1470
         Width           =   4665
      End
      Begin VB.TextBox txtSummary 
         Height          =   1365
         Left            =   1260
         MultiLine       =   -1  'True
         TabIndex        =   5
         Top             =   2940
         Width           =   8355
      End
      Begin ClassSystem.SelectFile seFConData 
         Height          =   375
         Left            =   1260
         TabIndex        =   1
         Top             =   4680
         Width           =   7515
         _ExtentX        =   13256
         _ExtentY        =   661
         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
      End
      Begin MSComCtl2.DTPicker dtpEdate 
         Height          =   375
         Left            =   4980
         TabIndex        =   2
         Top             =   2370
         Width           =   3015
         _ExtentX        =   5318
         _ExtentY        =   661
         _Version        =   393216
         Format          =   61145088
         CurrentDate     =   37570
      End
      Begin MSComCtl2.DTPicker dtpBDate 
         Height          =   345
         Left            =   1320
         TabIndex        =   3
         Top             =   2370
         Width           =   2565
         _ExtentX        =   4524
         _ExtentY        =   609
         _Version        =   393216
         Format          =   61145088
         CurrentDate     =   37570
      End
      Begin ClassSystem.GCombo gcbStatus 
         Height          =   315
         Left            =   4980
         TabIndex        =   4
         Top             =   1950
         Width           =   3015
         _ExtentX        =   5318
         _ExtentY        =   556
         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
         FontSize        =   8.25
         FontName        =   "MS Sans Serif"
         ListIndex       =   -1
         Text            =   ""
      End
      Begin MSComCtl2.DTPicker dtpConDate 
         Height          =   345
         Left            =   1320
         TabIndex        =   6
         Top             =   1950
         Width           =   2565
         _ExtentX        =   4524
         _ExtentY        =   609
         _Version        =   393216
         Format          =   61145088
         CurrentDate     =   37570
      End
      Begin ClassSystem.GCombo gcbCustomerID 
         Height          =   315
         Left            =   1320
         TabIndex        =   8
         Top             =   1500
         Width           =   2565
         _ExtentX        =   4524
         _ExtentY        =   556
         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
         FontSize        =   8.25
         FontName        =   "MS Sans Serif"
         ListIndex       =   -1
         Text            =   ""
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "客户名称"
         Height          =   195
         Left            =   330
         TabIndex        =   16
         Top             =   1530
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         Caption         =   "合同标题"
         Height          =   195
         Left            =   4080
         TabIndex        =   15
         Top             =   1560
         Width           =   720
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         Caption         =   "合同摘要"
         Height          =   195
         Left            =   330
         TabIndex        =   14
         Top             =   3000
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         Caption         =   "合同日期"
         Height          =   195
         Left            =   270
         TabIndex        =   13
         Top             =   2010
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         Caption         =   "合同状态"
         Height          =   195
         Left            =   4110
         TabIndex        =   12
         Top             =   1980
         Width           =   720
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         Caption         =   "生效日期"
         Height          =   195
         Left            =   330
         TabIndex        =   11
         Top             =   2460
         Width           =   720
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         Caption         =   "失效日期"
         Height          =   195
         Left            =   4110
         TabIndex        =   10
         Top             =   2430
         Width           =   720
      End
      Begin VB.Label Label8 
         AutoSize        =   -1  'True
         Caption         =   "合同内容"
         Height          =   195
         Left            =   420
         TabIndex        =   9
         Top             =   4800
         Width           =   720
      End
   End
End
Attribute VB_Name = "frmCustomerContractUpdate"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
'新加客户合同
Dim objCustomerContract As New clsCustomerContract

    With objCustomerContract
        .m_ID = newGUID()
        .m_BDate = Me.dtpBDate.value
        .m_ConData = Me.seFConData.Text
        .m_ConDate = Me.dtpConDate.value
        .m_CustomerID = Me.gcbCustomerID.Item("ID")
        .m_EDate = Me.dtpEdate.value
        .m_Status = Me.gcbStatus.Text
        .m_Summary = Me.txtSummary.Text
        .m_Title = Me.txtTitle.Text
        If Not .Insert() Then
            MsgBox "插入失败,请检查数据合法性!", vbInformation, "新增客户合同"
        Else
            Unload Me
            frmCustomerContract.RefreshData
        End If
    End With
    
End Sub

Private Sub cmdView_Click()
Dim x As Long
    x = g_System.File.OpenFile(Me.hwnd, seFConData.Text, vbSW_normal)
End Sub


Private Sub Form_Load()
    Dim objCustomer As New clsCustomer
    Dim objContract As New clsCustomerContract
    'center the form
    Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
    
    Me.gcbStatus.AddItem "待用"
    Me.gcbStatus.AddItem "生效"
    Me.gcbStatus.AddItem "失效"
    Me.gcbStatus.ListIndex = 0
    
    Call objCustomer.FillByID(frmCustomerContract.ExcelGrid1.DataRecordset.Fields("CustomerID").value)
    gcbCustomerID.AddItem objCustomer.m_Name
    gcbCustomerID.Item("ID", gcbCustomerID.NewIndex) = objCustomer.m_ID
    gcbCustomerID.Enabled = False
    gcbCustomerID.ListIndex = 0
    With objContract
        Call .FillByID(frmCustomerContract.ExcelGrid1.DataRecordset.Fields("ID").value)
        Me.txtSummary = .m_Summary
        Me.seFConData.Text = .m_ConData
        Me.txtTitle.Text = .m_Title
        Me.gcbStatus.Text = .m_Status
        Me.dtpBDate.value = .m_BDate
        Me.dtpConDate.value = .m_ConDate
        Me.dtpEdate.value = .m_EDate
    End With
End Sub


⌨️ 快捷键说明

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