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

📄 frmsumman.frm

📁 本系统实现了软件项目开发的流程管理和控制
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      Begin VB.Label Label4 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "预算金额"
         Height          =   180
         Left            =   240
         TabIndex        =   19
         Top             =   1437
         Width           =   720
      End
      Begin VB.Label Label3 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "联系电话"
         Height          =   180
         Left            =   2880
         TabIndex        =   18
         Top             =   1053
         Width           =   720
      End
      Begin VB.Label Label2 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "联系人"
         Height          =   180
         Left            =   240
         TabIndex        =   17
         Top             =   1053
         Width           =   540
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         BackStyle       =   0  'Transparent
         Caption         =   "客户单位"
         Height          =   180
         Left            =   240
         TabIndex        =   16
         Top             =   669
         Width           =   720
      End
   End
   Begin MSDataGridLib.DataGrid DataGrid1 
      Bindings        =   "FrmSumMan.frx":1E9A
      Height          =   2655
      Left            =   240
      TabIndex        =   10
      Top             =   3840
      Width           =   5415
      _ExtentX        =   9551
      _ExtentY        =   4683
      _Version        =   393216
      AllowUpdate     =   0   'False
      AllowArrows     =   0   'False
      HeadLines       =   1
      RowHeight       =   15
      BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ColumnCount     =   2
      BeginProperty Column00 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      BeginProperty Column01 
         DataField       =   ""
         Caption         =   ""
         BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
            Type            =   0
            Format          =   ""
            HaveTrueFalseNull=   0
            FirstDayOfWeek  =   0
            FirstWeekOfYear =   0
            LCID            =   2052
            SubFormatType   =   0
         EndProperty
      EndProperty
      SplitCount      =   1
      BeginProperty Split0 
         BeginProperty Column00 
         EndProperty
         BeginProperty Column01 
         EndProperty
      EndProperty
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   -120
      Top             =   7200
      Visible         =   0   'False
      Width           =   1815
      _ExtentX        =   3201
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=SoftSys"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "SoftSys"
      OtherAttributes =   ""
      UserName        =   "sa"
      Password        =   "sa"
      RecordSource    =   "SELECT * FROM Summary"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
End
Attribute VB_Name = "FrmSumMan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub Refresh_Sum()
  Adodc1.RecordSource = "SELECT SumId As 编号, Title As 标题," _
        + " Author As 作者, CreateDate As 日期 FROM Summary" _
        + " WHERE ProjId=" + Trim(CurProj.ProjId) + " ORDER BY SumId DESC"
  Adodc1.Refresh
End Sub

Private Sub Cmd_Add_Click()
  FrmSumEdit.Modify = False
  FrmSumEdit.lblAuthor = CurUser.Ename
  FrmSumEdit.lblCreateDate = Format(Now, "yyyy-mm-dd")
  FrmSumEdit.Show 1
  Refresh_Sum
End Sub

Private Sub Cmd_Back_Click()
  MyProj.Amount = Val(txtAmount1)
  MyProj.Benefit = Val(txtBenefit1)
  MyProj.FinishDate = Trim(txtFinishDate1)
  MyProj.UpdateResult (CurProj.ProjId)
  
  Unload Me
End Sub

Private Sub Cmd_Del_Click()
  If Adodc1.Recordset.EOF = True Then
    MsgBox "请选择要删除的项目总结"
    Exit Sub
  End If
  If Trim(Adodc1.Recordset.Fields(2)) <> CurUser.Ename Then
    MsgBox "只有作者才能删除此信息"
    Exit Sub
  End If
  If MsgBox("是否删除此信息?", vbYesNo, "请确认") = vbYes Then
    MySum.Delete (Adodc1.Recordset.Fields(0))
    Refresh_Sum
  End If
End Sub

Private Sub Cmd_Modi_Click()
  If Adodc1.Recordset.EOF = True Then
    MsgBox "请选择要修改的项目总结"
    Exit Sub
  End If
  If Cmd_Modi.Caption = "修 改" Then
    If Trim(Adodc1.Recordset.Fields(2)) <> CurUser.Ename Then
      MsgBox "只有作者才能修改此报告"
      Exit Sub
    End If
  End If
  
  FrmSumEdit.Modify = True
  FrmSumEdit.OriId = Adodc1.Recordset.Fields(0)
  FrmSumEdit.OriTitle = Trim(Adodc1.Recordset.Fields(1))
  FrmSumEdit.txtTitle = Trim(Adodc1.Recordset.Fields(1))
  MySum.GetInfo (Adodc1.Recordset.Fields(0))
  FrmSumEdit.txtBody = MySum.Body
  FrmSumEdit.lblAuthor = Trim(Adodc1.Recordset.Fields(2))
  FrmSumEdit.lblCreateDate = Trim(Adodc1.Recordset.Fields(3))
  If Cmd_Modi.Caption = "查 看" Then
    FrmSumEdit.Cmd_Ok.Visible = False
    FrmSumEdit.Cmd_Cancel.Caption = "返 回"
    FrmSumEdit.Cmd_Cancel.Left = 2350
  End If
  FrmSumEdit.Show 1
  Refresh_Sum
End Sub

Private Sub Form_Load()
  'CurProj对象中保存的是当前选择工程的数据
  '把当前选择工程的数据显示到相应的控件中
  txtProj = CurProj.ProjName
  txtClient = CurProj.Client
  txtContact = CurProj.Contact
  txtTel = CurProj.Ctel
  txtAmount = CurProj.Amount0
  txtBenefit = CurProj.Benefit0
  txtFinishDate = CurProj.FinishDate0
  lblFillin = CurProj.ApplyEmp
  lblFilldate = CurProj.ApplyDate
  '装入实际数据
  txtAmount1 = CurProj.Amount
  txtBenefit1 = CurProj.Benefit
  txtFinishDate1 = CurProj.FinishDate
  '在表格中显示项目总结信息
  Refresh_Sum
  '管理权限控制
  If CurUser.UserType <> 4 Then
    Cmd_Add.Visible = False
    Cmd_Modi.Caption = "查 看"
    Cmd_Del.Visible = False
    Cmd_Back.Left = 3010
  End If
End Sub

⌨️ 快捷键说明

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