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

📄 frmtaskedit.frm

📁 售后服务管理系统,采用VB+SQL实现,包含源程序及数据库备份,完美运行,完整无缺.
💻 FRM
字号:
VERSION 5.00
Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
Begin VB.Form FrmTaskEdit 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "编辑工作记录"
   ClientHeight    =   4200
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5910
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4200
   ScaleWidth      =   5910
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame1 
      Height          =   3255
      Left            =   240
      TabIndex        =   6
      Top             =   120
      Width           =   5415
      Begin MSComCtl2.DTPicker DTSDate 
         Height          =   270
         Left            =   1200
         TabIndex        =   13
         Top             =   240
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   476
         _Version        =   393216
         Format          =   68419585
         CurrentDate     =   38719
      End
      Begin VB.TextBox txtWay 
         Height          =   270
         Left            =   1200
         MaxLength       =   20
         TabIndex        =   0
         Top             =   660
         Width           =   1335
      End
      Begin VB.TextBox txtPlace 
         Height          =   270
         Left            =   3840
         MaxLength       =   20
         TabIndex        =   1
         Top             =   660
         Width           =   1335
      End
      Begin VB.TextBox txtDetail 
         Height          =   1095
         Left            =   1200
         MaxLength       =   20
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   2
         Top             =   1080
         Width           =   3975
      End
      Begin VB.TextBox txtLost 
         Height          =   735
         Left            =   1200
         MaxLength       =   20
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   3
         Top             =   2350
         Width           =   3975
      End
      Begin MSComCtl2.DTPicker DTEDate 
         Height          =   270
         Left            =   3840
         TabIndex        =   14
         Top             =   240
         Width           =   1335
         _ExtentX        =   2355
         _ExtentY        =   476
         _Version        =   393216
         Format          =   68419585
         CurrentDate     =   38719
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "解决方式"
         Height          =   180
         Left            =   240
         TabIndex        =   12
         Top             =   705
         Width           =   720
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "工作地点"
         Height          =   180
         Left            =   2880
         TabIndex        =   11
         Top             =   705
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "开始日期"
         Height          =   180
         Left            =   240
         TabIndex        =   10
         Top             =   285
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "结束日期"
         Height          =   180
         Left            =   2880
         TabIndex        =   9
         Top             =   300
         Width           =   720
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "工作描述"
         Height          =   180
         Left            =   240
         TabIndex        =   8
         Top             =   1125
         Width           =   720
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "遗留问题"
         Height          =   180
         Left            =   240
         TabIndex        =   7
         Top             =   2400
         Width           =   720
      End
   End
   Begin VB.CommandButton Cmd_Cancel 
      BackColor       =   &H80000000&
      Cancel          =   -1  'True
      Caption         =   "取 消"
      Height          =   400
      Left            =   3195
      MouseIcon       =   "FrmTaskEdit.frx":0000
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   3600
      Width           =   1300
   End
   Begin VB.CommandButton Cmd_Ok 
      BackColor       =   &H80000000&
      Caption         =   "确 定"
      Height          =   400
      Left            =   1395
      MouseIcon       =   "FrmTaskEdit.frx":030A
      MousePointer    =   99  'Custom
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   3600
      Width           =   1300
   End
End
Attribute VB_Name = "FrmTaskEdit"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public OriId As Long
Public TmpProId As Long
Public Modify As Boolean

Private Sub Cmd_Cancel_Click()
  Unload Me
End Sub

Private Sub Cmd_OK_Click()
  '检查用户录入数据的有效性
  If Trim(txtWay) = "" Then
    MsgBox "请输入解决方式"
    txtWay.SetFocus
    Exit Sub
  End If
  If Trim(txtDetail) = "" Then
    MsgBox "请输入工作描述"
    txtDetail.SetFocus
    Exit Sub
  End If
  '更新工作任务表TaskRec
  With MyTask
    .ProId = TmpProId               '问题编号
    .StartDate = Format(DTSDate.Value, "yyyy-mm-dd")    '开始日期
    .EndDate = Format(DTEDate.Value, "yyyy-mm-dd")      '结束日期
    .SolveWay = txtWay.Text         '处理方法
    .Place = txtPlace.Text          '工作地点
    .Detail = txtDetail.Text        '工作描述
    .LostMemo = txtLost.Text        '遗留问题
    '根据变量Modify的值,决定是插入新数据,还是更新已有的数据
    If Modify = False Then
      .Insert
    Else
      .Update (OriId)
    End If
  End With
  '关闭窗体
  Unload Me
End Sub

Private Sub Form_Load()
  '如果当前用户为主管用户,则只能查看,不能编辑记录
  If CurUser.UserType = 1 Then
    DTSDate.Enabled = False
    DTEDate.Enabled = False
    txtWay.Enabled = False
    txtPlace.Enabled = False
    txtDetail.Enabled = False
    txtLost.Enabled = False
    '只保留一个“取消”按钮,显示为“关闭”
    Cmd_Ok.Visible = False
    Cmd_Cancel.Caption = "关 闭"
    '把“关闭”按钮显示在窗体中央
    Cmd_Cancel.Left = 2300
  End If
End Sub

⌨️ 快捷键说明

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