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

📄 frmtaskman.frm

📁 Visual Basic + Oracle 9i数据库应用系统开发与实例(项目售后支持管理系统),界面简洁大方,功能完善,数据库完整,适合学生学习利用~
💻 FRM
📖 第 1 页 / 共 2 页
字号:
         BackStyle       =   0  'Transparent
         Caption         =   "提交日期"
         Height          =   180
         Left            =   240
         TabIndex        =   20
         Top             =   3000
         Width           =   720
      End
   End
   Begin VB.Frame Frame1 
      Caption         =   "问题描述"
      Height          =   3375
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   6255
      Begin MSDataListLib.DataList DataList1 
         Bindings        =   "FrmTaskMan.frx":0F4B
         Height          =   3000
         Left            =   120
         TabIndex        =   15
         Top             =   240
         Width           =   975
         _ExtentX        =   1720
         _ExtentY        =   5292
         _Version        =   393216
         ListField       =   "PRID"
      End
      Begin VB.TextBox txtMemo 
         Enabled         =   0   'False
         Height          =   735
         Left            =   2160
         MaxLength       =   20
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   7
         Top             =   2520
         Width           =   3975
      End
      Begin VB.TextBox txtDescribe 
         Enabled         =   0   'False
         Height          =   1095
         Left            =   2160
         MaxLength       =   20
         MultiLine       =   -1  'True
         ScrollBars      =   2  'Vertical
         TabIndex        =   6
         Top             =   1320
         Width           =   3975
      End
      Begin VB.ComboBox ComboType 
         Enabled         =   0   'False
         Height          =   300
         Left            =   4800
         TabIndex        =   5
         Text            =   "ComboType"
         Top             =   960
         Width           =   1335
      End
      Begin VB.ComboBox ComboLevel 
         Enabled         =   0   'False
         Height          =   300
         ItemData        =   "FrmTaskMan.frx":0F63
         Left            =   2160
         List            =   "FrmTaskMan.frx":0F65
         TabIndex        =   4
         Text            =   "ComboLevel"
         Top             =   945
         Width           =   1335
      End
      Begin VB.TextBox txtTel 
         Enabled         =   0   'False
         Height          =   270
         Left            =   4800
         MaxLength       =   20
         TabIndex        =   3
         Top             =   600
         Width           =   1335
      End
      Begin VB.TextBox txtContact 
         Enabled         =   0   'False
         Height          =   270
         Left            =   2160
         MaxLength       =   20
         TabIndex        =   2
         Top             =   600
         Width           =   1335
      End
      Begin VB.TextBox txtClient 
         Enabled         =   0   'False
         Height          =   270
         Left            =   2160
         MaxLength       =   20
         TabIndex        =   1
         Top             =   240
         Width           =   3975
      End
      Begin VB.Label Label7 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "备注信息"
         Height          =   180
         Left            =   1200
         TabIndex        =   14
         Top             =   2565
         Width           =   720
      End
      Begin VB.Label Label6 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "问题描述"
         Height          =   180
         Left            =   1200
         TabIndex        =   13
         Top             =   1365
         Width           =   720
      End
      Begin VB.Label Label5 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "问题类型"
         Height          =   180
         Left            =   3840
         TabIndex        =   12
         Top             =   1020
         Width           =   720
      End
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "严重级别"
         Height          =   180
         Left            =   1200
         TabIndex        =   11
         Top             =   1005
         Width           =   720
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "联系电话"
         Height          =   180
         Left            =   3840
         TabIndex        =   10
         Top             =   645
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "联系人"
         Height          =   180
         Left            =   1200
         TabIndex        =   9
         Top             =   645
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "客户单位"
         Height          =   180
         Left            =   1200
         TabIndex        =   8
         Top             =   285
         Width           =   720
      End
   End
End
Attribute VB_Name = "FrmTaskMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Refresh_Task()
  '设置数据源
  Adodc1.RecordSource = "SELECT TaskId As 编号, Sdate As 开始日期," _
        + "Edate As 结束日期, Rway As 解决方式, Rplace As 工作地点," _
        + "Rdescribe As 工作描述, Rlost As 遗留问题" _
        + " FROM TaskRec WHERE PrId=" + Trim(Val(DataList1.Text)) _
        + " ORDER BY TaskId"
  Adodc1.Refresh
End Sub

Private Sub Cmd_Add_Click()
  If DataList1.Text = "" Then
    MsgBox "请选择问题"
    Exit Sub
  End If
    
  FrmTaskEdit.TmpPrId = Val(DataList1.Text)
  '设置添加记录标记
  FrmTaskEdit.Modify = False
  '初始化frmtaskedit窗体中的控件
  FrmTaskEdit.ComboSdate = Format(Now, "yyyy-mm-dd")
  FrmTaskEdit.ComboEdate = Format(Now, "yyyy-mm-dd")
  '启动窗体
  FrmTaskEdit.Show 1
  '刷新显示
  Refresh_Task
End Sub

Private Sub Cmd_Back_Click()
  Unload Me
End Sub

Private Sub Cmd_Del_Click()
  '判断是否选择了要删除的记录
  If Adodc1.Recordset.EOF = True Then
    MsgBox "请选择记录"
    Exit Sub
  End If
  '确认删除
  If MsgBox("是否删除当前工作记录?", vbYesNo, "请确认") = vbYes Then
    MyTask.Delete (Adodc1.Recordset.Fields(0))
    Refresh_Task
  End If
End Sub

Private Sub Cmd_Edit_Click()
  '判断是否选择了要修改的记录
  If Adodc1.Recordset.BOF = True Then
    MsgBox "请选择记录"
    Exit Sub
  End If
  '保存光标位置
  p = Adodc1.Recordset.AbsolutePosition
  '读取当前记录的各列数据
  '任务编号
  FrmTaskEdit.OriId = Adodc1.Recordset.Fields(0)
  '问题编号
  FrmTaskEdit.TmpPrId = Val(DataList1.Text)
  '开始日期
  FrmTaskEdit.ComboSdate = Trim(Adodc1.Recordset.Fields(1))
  '结束日期
  FrmTaskEdit.ComboEdate = Trim(Adodc1.Recordset.Fields(2))
  '解决方法
  FrmTaskEdit.txtWay = Trim(Adodc1.Recordset.Fields(3))
  '工作地点
  FrmTaskEdit.txtPlace = Trim(Adodc1.Recordset.Fields(4))
  '工作描述
  FrmTaskEdit.txtDetail = Trim(Adodc1.Recordset.Fields(5))
  '遗留问题
  FrmTaskEdit.txtLost = Trim(Adodc1.Recordset.Fields(6))
  '设置修改标记
  FrmTaskEdit.Modify = True
  '启动窗体
  FrmTaskEdit.Show 1
  '刷新显示
  Refresh_Task
  '恢复光标位置
  Adodc1.Recordset.Move 0
  Adodc1.Recordset.Move p - 1
End Sub

Private Sub Cmd_Solve_Click()
  '判断是否选择了要解决的记录
  If DataList1.Text = "" Then
    MsgBox "请选择记录"
    Exit Sub
  End If
  '确定是否要把当前记录设置为“已解决”状态
  If MsgBox("是否将当前问题标记为已解决?", vbYesNo, "请确认") = vbYes Then
    '更新MyPrRec表
    MyPrRec.Pstatus = "已解决"
    MyPrRec.UpdateStatus (Val(DataList1.Text))
    '在服务调查表中添加一条空记录
    MyInv.PrId = Val(DataList1.Text)
    MyInv.Insert
  End If
  Refresh_Task
End Sub

Private Sub DataList1_Click()
  If DataList1.Text = "" Then
    txtClient = ""
    txtContact = ""
    txtTel = ""
    ComboLevel = ""
    ComboType = ""
    txtDescribe = ""
    txtMemo = ""
    txtMuser = ""
    ComboEuser = ""
    txtMsuggest = ""
    lblDesDate = ""
    lblDealDate = ""
  Else
    With MyPrRec
    .GetInfo (Val(DataList1.Text))
    txtClient = .Cname
    txtContact = .Cperson
    txtTel = .Ctel
    ComboLevel = .Plevel
    ComboType = .Ptype
    txtDescribe = .Pdetail
    txtMemo = .Pcomment
    End With
    With MyDespatch
    .GetInfo (Val(DataList1.Text))
    txtMuser = .Muser
    ComboEuser = .Euser
    txtMsuggest = .Msuggest
    lblDesDate = .Ddate
    lblDealDate = .Mdate
    End With
  End If
  Refresh_Task
End Sub

Private Sub Form_Load()
  '如果是主管用户,则只能查看,不能编辑
  If CurUser.UserType = 2 Then
    Cmd_Add.Visible = False
    Cmd_Del.Visible = False
    Cmd_Edit.Caption = "查看"
    Cmd_Edit.Left = 3635
    Cmd_Solve.Left = 5305
    Cmd_Back.Left = 6975
    '设置数据源,读取当前主管用户所属的问题
    AdoPrList.RecordSource = "SELECT PrId FROM Despatch WHERE Muser='" _
          + Trim(CurUser.Ename) + "' ORDER BY PrId"
  Else
    '设置数据源,读取当前普通用户所属的问题
    AdoPrList.RecordSource = "SELECT PrId FROM Despatch WHERE Euser='" _
          + Trim(CurUser.Ename) + "' ORDER BY PrId"
  End If
  '刷新问题列表
  AdoPrList.Refresh
  '刷新问题描述
  DataList1_Click
End Sub

⌨️ 快捷键说明

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