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

📄 frmcxczp.frm

📁 县级电力调度管理信息系统。VB6.0开发。 DMIS调度子系统包括以下功能模块:调度操作票管理、调度运行日志、调度交接班管理、调度值班管理、调度报表管理、调度文档、避峰拉闸限电管理等7个业务模块。
💻 FRM
📖 第 1 页 / 共 3 页
字号:
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   9240
      TabIndex        =   4
      Top             =   120
      Width           =   495
   End
   Begin VB.Label Label2 
      Caption         =   "起"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   6960
      TabIndex        =   3
      Top             =   120
      Width           =   375
   End
   Begin VB.Label Label1 
      Caption         =   "至"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   7320
      TabIndex        =   2
      Top             =   120
      Width           =   495
   End
End
Attribute VB_Name = "frmcxczp"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim plx As String

Private Sub Combo1_Click()
Call Open_link
  If Option1.Value Then
       If Option3.Value Then
             If Trim(Combo1.Text) = "" Then
               Adodc1.RecordSource = "select * from xdgl_zhczpzb where rq between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and zxjg='已执行' "
             Else
                Adodc1.RecordSource = "select * from xdgl_zhczpzb where rq between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and zxjg='已执行' and czdw='" & Trim(Combo1.Text) & "'               "
             End If
       Else
             If Trim(Combo1.Text) = "" Then
               Adodc1.RecordSource = "select * from xdgl_zhczpzb where rq between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and ((zxjg is null) or zxjg='作废') "
             Else
               Adodc1.RecordSource = "select * from xdgl_zhczpzb where rq between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and ((zxjg is null) or zxjg='作废') and czdw='" & Trim(Combo1.Text) & "'"
             End If
       End If
       
   Adodc1.Refresh
   Call sx
      If Option3.Value Then
            sql1 = "select zlph from xdgl_zhczpzb where rq between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "'  and zxjg='已执行' "
      Else
            sql1 = "select zlph from xdgl_zhczpzb where rq between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and ((zxjg is null) or zxjg='作废') and czdw='" & Trim(Combo1.Text) & "'"
      End If
      Combo2.Clear
        Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
                  Combo2.AddItem Trim(RS(0))
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If

Else
       If Option3.Value Then
              If Trim(Combo1.Text) = "" Then
               Adodc1.RecordSource = "select * from xdgl_zxczpzb where scsj between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and zxqk='已执行'"
              Else
               Adodc1.RecordSource = "select * from xdgl_zxczpzb where scsj between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and zxqk='已执行' and czdw='" & Trim(Combo1.Text) & "'               "
              End If
       Else
              If Trim(Combo1.Text) = "" Then
               Adodc1.RecordSource = "select * from xdgl_zxczpzb where scsj between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and ((zxqk is null) or zxqk='作废') "
              Else
               Adodc1.RecordSource = "select * from xdgl_zxczpzb where scsj between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and ((zxqk is null) or zxqk='作废') and czdw='" & Trim(Combo1.Text) & "'               "
              End If
       End If
         If Option3.Value Then
            sql1 = "select zxlph from xdgl_zxczpzb where scsj  between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "'  and zxqk='已执行' "
      Else
            sql1 = "select zxlph from xdgl_zxczpzb where scsj  between  '" & Format(DTPicker1.Value, "yyyy-mm-dd") & "' and '" & Format(DTPicker2.Value, "yyyy-mm-dd") & "' and ((zxqk is null) or zxqk='作废') and czdw='" & Trim(Combo1.Text) & "'"
      End If
      Combo2.Clear
        Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
                  Combo2.AddItem Trim(RS(0))
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If
   Adodc1.Refresh
   Call cx
End If
Call Close_link
End Sub

Private Sub Combo2_Change()
Call Combo2_Click
End Sub

Private Sub Combo2_Click()
 If Option1.Value Then
       Adodc1.RecordSource = "select * from xdgl_zhczpzb where zlph='" & Trim(Combo2.Text) & "'"
   Adodc1.Refresh
   Call sx
Else
   Adodc1.RecordSource = "select * from xdgl_zxczpzb where zxlph='" & Trim(Combo2.Text) & "'"
   Adodc1.Refresh
   Call cx
End If

End Sub


Private Sub command1_Click()
On Error Resume Next
Dim ph As String
If Adodc1.Recordset.EOF Then
  
Else
  If Option2.Value Then
      ph = Trim(DataGrid1.Columns(4).Value)
        Unload frmzxczp
        frmzxczp.Show
        frmzxczp.Move 0, 0, 11890, 7465
        Sql = "select * from xdgl_zxczpzb where zxlph='" & ph & "'"
        If RS.State Then
           RS.Close
        End If
        Call Open_link
        Set RS = ZHCX.Execute(Sql, 0)
        If Not RS.EOF Then
           frmzxczp.Combo1.Text = Trim(RS("npyj"))
           frmzxczp.Text1.Text = Trim(RS("jkbh"))
           frmzxczp.Text3.Text = Trim(RS("czrw"))
           frmzxczp.Text2.Text = Trim(RS("bz"))
           frmzxczp.DTPicker2.Value = Trim(RS("zxsj"))
           If IsNull(RS("zxqk")) Then
                frmzxczp.DataGrid1.AllowAddNew = False
                frmzxczp.DataGrid1.AllowDelete = False
                frmzxczp.DataGrid1.AllowUpdate = True
                frmzxczp.DataGrid1.AllowArrows = False
           Else
                frmzxczp.Command1.Enabled = False
                frmzxczp.Command2.Enabled = False
                frmzxczp.Command3.Enabled = False
                frmzxczp.Command5.Enabled = False
                frmzxczp.DataGrid1.AllowAddNew = False
                frmzxczp.DataGrid1.AllowDelete = False
                frmzxczp.DataGrid1.AllowUpdate = False
                frmzxczp.DataGrid1.AllowArrows = False
           End If
        End If
                frmzxczp.Command1.Enabled = False
                frmzxczp.Command2.Enabled = False
                frmzxczp.Command3.Enabled = False

        frmzxczp.Command5.Enabled = False
        frmzxczp.Label3.Caption = ph
        frmzxczp.Adodc1.RecordSource = "select * from xdgl_zxczpfb where zxlph='" & ph & "'"
        frmzxczp.Adodc1.Refresh
        frmzxczp.Adodc1.Recordset.MoveLast
        Call frmzxczp.sx
        If RS.State Then
          RS.Close
        End If
        Call Close_link
  Else
      ph = DataGrid1.Columns(1).Value
        Unload frmzhczp
        frmzhczp.Show
        frmzhczp.Move 0, 0, 11890, 7465
        Sql = "select * from xdgl_zhczpzb where zlph='" & ph & "'"
        If RS.State Then
           RS.Close
        End If
        Call Open_link
        Set RS = ZHCX.Execute(Sql, 0)
        If Not RS.EOF Then
           frmzhczp.Combo1.Text = Trim(RS("npyj"))
           frmzhczp.Text1.Text = Trim(RS("npjtxm"))
           frmzhczp.Combo2.Text = Trim(RS("czdw"))
           frmzhczp.Text2.Text = Trim(RS("bz"))
           frmzhczp.Text4.Text = Trim(RS("czrw"))
           frmzhczp.DTPicker1.Value = Trim(RS("rq"))
           frmzhczp.DTPicker2.Value = Trim(RS("zxrq"))
           If IsNull(RS("zxjg")) Then
                frmzhczp.DataGrid1.AllowAddNew = False
                frmzhczp.DataGrid1.AllowDelete = False
                frmzhczp.DataGrid1.AllowUpdate = True
                frmzhczp.DataGrid1.AllowArrows = False
           Else
                frmzhczp.Command1.Enabled = False
                frmzhczp.Command2.Enabled = False
                frmzhczp.Command3.Enabled = False
                frmzhczp.DataGrid1.AllowAddNew = False
                frmzhczp.DataGrid1.AllowDelete = False
                frmzhczp.DataGrid1.AllowUpdate = False
                frmzhczp.DataGrid1.AllowArrows = False
           End If

        End If
        frmzhczp.Command1.Enabled = False
        frmzhczp.Command2.Enabled = False
        frmzhczp.Command3.Enabled = False
        frmzhczp.Command5.Enabled = False
        frmzhczp.Label2.Caption = ph
        If RS.State Then
          RS.Close
        End If
        Call Close_link
        frmzhczp.Adodc1.RecordSource = "select * from xdgl_zhczpfb where zlph='" & ph & "'"
        frmzhczp.Adodc1.Refresh
        frmzhczp.Adodc1.Recordset.MoveLast
        Call frmzhczp.sx
  End If
  If Err Then Err.Clear

End If
End Sub

Private Sub Command2_Click()
On Error Resume Next
Dim ph As String
If Option3.Value Then
 Call MsgBox("不能对已执行的票进行操作!", vbOKOnly, "警告")
 Exit Sub
End If
If Adodc1.Recordset.EOF Then
Else
    A = MsgBox("是否要对该记录进行作预发处理!", vbYesNo, "警告")
    If A <> 6 Then
       Exit Sub
    End If
    Call Open_link
    If Option2.Value Then
        ph = Trim(DataGrid1.Columns(4).Value)
        Sql = "select * from xdgl_zxczpzb where zxlph='" & ph & "'"
        If RS.State Then
             RS.Close
        End If
        Set RS = ZHCX.Execute(Sql, 1)
        If RS.EOF Then
           Call MsgBox("选定的记录不存在,请查询记录是否正确!", vbOKOnly, "警告")
           Call Close_link
           Exit Sub
        Else
           If RS.State Then
              RS.Close
           End If
           Sql = "update xdgl_zxczpzb set zxqk='预发' where zlph='" & ph & "'"
           Set RS = ZHCX.Execute(Sql, 1)
        End If

        If RS.State Then
           RS.Close
        End If
        Adodc1.Refresh
        Call cx
    Else
        ph = Trim(DataGrid1.Columns(1).Value)
        Sql = "select * from xdgl_zhczpzb where zlph='" & ph & "'"
        If RS.State Then
             RS.Close
        End If
        Set RS = ZHCX.Execute(Sql, 1)
        If RS.EOF Then
           Call MsgBox("选定的记录不存在,请查询记录是否正确!", vbOKOnly, "警告")
           Call Close_link
           Exit Sub
        Else
           If RS.State Then
              RS.Close
           End If
           Sql = "update xdgl_zhczpzb set zxjg='预发' where zlph='" & ph & "'"
           Set RS = ZHCX.Execute(Sql, 1)
        End If
        If RS.State Then
            RS.Close
        End If
        Adodc1.Refresh
        Call sx
    End If
    Call Close_link

End If

End Sub

Private Sub Command3_Click()
On Error Resume Next
Dim ph As String
If Option3.Value Then
 Call MsgBox("不能对已执行的票进行操作!", vbOKOnly, "警告")
 Exit Sub
End If
If Adodc1.Recordset.EOF Then
Else
    A = MsgBox("是否要对该记录进行作废处理!", vbYesNo, "警告")
    If A <> 6 Then
       Exit Sub
    End If
    Call Open_link
    If Option2.Value Then
        ph = Trim(DataGrid1.Columns(4).Value)
        Sql = "select * from xdgl_zxczpzb where zxlph='" & ph & "'"
        If RS.State Then
             RS.Close
        End If
        Set RS = ZHCX.Execute(Sql, 1)
        If RS.EOF Then
           Call MsgBox("选定的记录不存在,请查询记录是否正确!", vbOKOnly, "警告")
           Call Close_link
           Exit Sub
        Else
           If RS.State Then
              RS.Close
           End If
           Sql = "update xdgl_zxczpzb set zxqk='作废' where zlph='" & ph & "'"
           Set RS = ZHCX.Execute(Sql, 1)
        End If

        If RS.State Then
           RS.Close
        End If
        Adodc1.Refresh
        Call cx
    Else
        ph = Trim(DataGrid1.Columns(1).Value)
        Sql = "select * from xdgl_zhczpzb where zlph='" & ph & "'"
        If RS.State Then
             RS.Close
        End If
        Set RS = ZHCX.Execute(Sql, 1)
        If RS.EOF Then
           Call MsgBox("选定的记录不存在,请查询记录是否正确!", vbOKOnly, "警告")
           Call Close_link
           Exit Sub
        Else
           If RS.State Then
              RS.Close
           End If
           Sql = "update xdgl_zhczpzb set zxjg='作废' where zlph='" & ph & "'"
           Set RS = ZHCX.Execute(Sql, 1)
        End If
        If RS.State Then
            RS.Close
        End If
        Adodc1.Refresh
        Call sx
    End If
    Call Close_link

End If
End Sub

Private Sub Command4_Click()

⌨️ 快捷键说明

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