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

📄 frmzhczptjb.frm

📁 县级电力调度管理信息系统。VB6.0开发。 DMIS调度子系统包括以下功能模块:调度操作票管理、调度运行日志、调度交接班管理、调度值班管理、调度报表管理、调度文档、避峰拉闸限电管理等7个业务模块。
💻 FRM
📖 第 1 页 / 共 3 页
字号:
   sql1 = "update xdgl_zhczpzb set zxjg='已执行' where zlph='" & Trim(Combo2.Text) & "'"
Else
   If Option2.Value Then
    sql1 = "update xdgl_zhczpzb set zxjg='作废' where zlph='" & Trim(Combo2.Text) & "'"
   End If
End If
Set RS = ZHCX.Execute(sql1, 0)
If RS.State Then
   RS.Close
End If
Call Close_link
End Sub

Private Sub Command4_Click()
Unload frmTJ
frmTJ.Show
frmTJ.Move 2400, 900, 3750, 3600
Unload Frmzhczptjb
End Sub

Private Sub DataGrid1_LostFocus()
If Adodc1.Recordset.EOF Then
Else
    Adodc1.Recordset.Update
End If
End Sub

Private Sub DTPicker1_Change()
Combo1.Clear
Combo2.Clear
   Call Open_link
  sql1 = "select sbmc from xdgl_sblx where sblx='厂站' or sblx='单位名称'"
   Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
                  Combo3.AddItem RS(0)
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If
       
 '填写执行结果
 If Command3.Enabled = True Then
 sql1 = "select zlph from xdgl_zhczpzb where zxjg is null  and rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
 Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
             Combo2.Text = Trim(RS("zlph"))
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If
       Combo2.Text = ""
    
 End If
 '填写评价结果
 If Command2.Enabled = True Then
   sql1 = "select zlph from xdgl_zhczpzb where pjjg is null  and rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
 Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
             Combo2.Text = Trim(RS("zlph"))
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If
       Combo2.Text = ""
 End If
 '查询票据
 
    If Trim(Combo1.Text) = "" Then
          sql1 = "select zlph from xdgl_zhczpzb where  rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
    Else
      If Trim(Combo4.Text) = "" Then
          sql1 = "select zlph from xdgl_zhczpzb where zxjg='" & Trim(Combo1.Text) & "' rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
      Else
          sql1 = "select zlph from xdgl_zhczpzb where zxjg='" & Trim(Combo1.Text) & "' and pjjg='" & Trim(Combo4.Text) & "' and rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
      End If
   End If
    Set RS = ZHCX.Execute(sql1, 0)
         Do While Not RS.EOF
           If Not IsNull(RS(0)) Then
               Combo2.AddItem RS(0)
           End If
           RS.MoveNext
         Loop
         If RS.State Then
            RS.Close
         End If
        Combo2.Text = ""
      Call sx
      
   Call Close_link
End Sub

Private Sub DTPicker1_Click()
Combo1.Clear
Combo2.Clear
  Call Open_link
  sql1 = "select sbmc from xdgl_sblx where sblx='厂站' or sblx='单位名称'"
   Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
                  Combo3.AddItem RS(0)
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If
       
 '填写执行结果
 If Command3.Enabled = True Then
 sql1 = "select zlph from xdgl_zhczpzb where zxjg is null  and rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
 Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
             Combo2.Text = Trim(RS("zlph"))
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If
       Combo2.Text = ""
    
 End If
 '填写评价结果
 If Command2.Enabled = True Then
   sql1 = "select zlph from xdgl_zhczpzb where pjjg is null  and rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
 Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
             Combo2.Text = Trim(RS("zlph"))
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If
       Combo2.Text = ""
 End If
 '查询票据
 
    If Trim(Combo1.Text) = "" Then
          sql1 = "select zlph from xdgl_zhczpzb where  rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
    Else
      If Trim(Combo4.Text) = "" Then
          sql1 = "select zlph from xdgl_zhczpzb where zxjg='" & Trim(Combo1.Text) & "' rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
      Else
          sql1 = "select zlph from xdgl_zhczpzb where zxjg='" & Trim(Combo1.Text) & "' and pjjg='" & Trim(Combo4.Text) & "' and rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
      End If
   End If
    Set RS = ZHCX.Execute(sql1, 0)
         Do While Not RS.EOF
           If Not IsNull(RS(0)) Then
               Combo2.AddItem RS(0)
           End If
           RS.MoveNext
         Loop
         If RS.State Then
            RS.Close
         End If
        Combo2.Text = ""
      Call sx
      
   Call Close_link
End Sub

Private Sub Form_Load()
 On Error Resume Next
 DTPicker1.Value = Format(Now, "yyyy-mm")
 Call sx
 Call qk
 Combo1.AddItem "作废"
 Combo1.AddItem "已执行"
 Combo4.AddItem "合格"
 Combo4.AddItem "不合格"
 Call Open_link
  sql1 = "select sbmc from xdgl_sblx where sblx='厂站' or sblx='单位名称'"
   Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
                  Combo3.AddItem RS(0)
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If
       
 '填写执行结果
 If Command3.Value = True Then
 sql1 = "select zlph from xdgl_zhczpzb where zxjg is null  and rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
 Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
             Combo2.Text = Trim(RS("zlph"))
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If
       Combo2.Text = ""
 sql2 = "select * from xdgl_zhczpzb where zlph='" & Trim(Combo2.Text) & "'"
       Set RS = ZHCX.Execute(sql2, 0)
         If Not RS.EOF Then
          If Not IsNull(RS("npyj")) Then
              Label2.Caption = Trim(RS("npyj"))
          End If
          If Not IsNull(RS("npjtxm")) Then
              Label11.Caption = Trim(RS("npjtxm"))
          End If
          If Not IsNull(RS("czdw")) Then
              Combo3.Text = Trim(RS("czdw"))
          End If
          If Not IsNull(RS("czrw")) Then
              Text4.Text = Trim(RS("czrw"))
          End If
          If Not IsNull(RS("bz")) Then
             Text2.Text = Trim(RS("bz"))
         End If

      
       End If
       If RS.State Then
          RS.Close
       End If
 sql3 = "select * from xdgl_zhczqfb where zlph='" & Trim(Combo2.Text) & "'"
  Set RS = ZHCX.Execute(sql1, 0)
      If Not Adodc1.Recordset.EOF Then
           Adodc1.Recordset.Update
       End If
      If RS.State Then
         RS.Close
      End If
      Adodc1.Refresh
      DataGrid1.Refresh
  
    
 End If
 '填写评价结果
 If Command2.Value = True Then
   sql1 = "select zlph from xdgl_zhczpzb where pjjg is null  and rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
 Set RS = ZHCX.Execute(sql1, 0)
       Do While Not RS.EOF
          If Not IsNull(RS(0)) Then
             Combo2.Text = Trim(RS("zlph"))
          End If
          RS.MoveNext
       Loop
       If RS.State Then
          RS.Close
       End If
       Combo2.Text = ""
sql2 = "select * from xdgl_zhczpzb where zlph='" & Trim(Combo2.Text) & "'"
       Set RS = ZHCX.Execute(sql2, 0)
         If Not RS.EOF Then
          If Not IsNull(RS("npyj")) Then
              Label2.Caption = Trim(RS("npyj"))
          End If
          If Not IsNull(RS("npjtxm")) Then
              Label11.Caption = Trim(RS("npjtxm"))
          End If
          If Not IsNull(RS("czdw")) Then
              Combo3.Text = Trim(RS("czdw"))
          End If
          If Not IsNull(RS("czrw")) Then
              Text4.Text = Trim(RS("czrw"))
          End If
          If Not IsNull(RS("bz")) Then
             Text2.Text = Trim(RS("bz"))
         End If

       End If
       If RS.State Then
          RS.Close
       End If
 sql3 = "select * from xdgl_zhczqfb where zlph='" & Trim(Combo2.Text) & "'"
  Set RS = ZHCX.Execute(sql1, 0)
      If Not Adodc1.Recordset.EOF Then
           Adodc1.Recordset.Update
       End If
      If RS.State Then
         RS.Close
      End If
      Adodc1.Refresh
      DataGrid1.Refresh
      Call sx
 End If
 '查询票据
 
    If Trim(Combo1.Text) = "" Then
          sql1 = "select zlph from xdgl_zhczpzb where  rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
    Else
      If Trim(Combo4.Text) = "" Then
          sql1 = "select zlph from xdgl_zhczpzb where zxjg='" & Trim(Combo1.Text) & "' rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
      Else
          sql1 = "select zlph from xdgl_zhczpzb where zxjg='" & Trim(Combo1.Text) & "' and pjjg='" & Trim(Combo4.Text) & "' and rq between '" & Format(DTPicker1.Value, "yyyy-mm-01") & "' and '" & DateAdd("d", -1, DateAdd("m", 1, Format(DTPicker1.Value, "yyyy-mm-01"))) & "'"
      End If
   End If
    Set RS = ZHCX.Execute(sql1, 0)
         Do While Not RS.EOF
           If Not IsNull(RS(0)) Then
               Combo2.AddItem RS(0)
           End If
           RS.MoveNext
         Loop
         If RS.State Then
            RS.Close
         End If
         sql2 = "select * from xdgl_zhczpzb where zlph='" & Trim(Combo2.Text) & "'"
         Set RS = ZHCX.Execute(sql2, 0)
         If Not RS.EOF Then
          If Not IsNull(RS("npyj")) Then
              Label2.Caption = Trim(RS("npyj"))
          End If
          If Not IsNull(RS("npjtxm")) Then
              Label11.Caption = Trim(RS("npjtxm"))
          End If
          If Not IsNull(RS("czdw")) Then
              Combo3.Text = Trim(RS("czdw"))
          End If
          If Not IsNull(RS("czrw")) Then
              Text4.Text = Trim(RS("czrw"))
          End If
          If Not IsNull(RS("bz")) Then
             Text2.Text = Trim(RS("bz"))
         End If
       
       End If
       If RS.State Then
          RS.Close
       End If
  sql3 = "select * from xdgl_zhczqfb where zlph='" & Trim(Combo2.Text) & "'"
  Set RS = ZHCX.Execute(sql1, 0)
      If Not Adodc1.Recordset.EOF Then
           Adodc1.Recordset.Update
       End If
      If RS.State Then
         RS.Close
      End If
      Adodc1.Refresh
      DataGrid1.Refresh
      Call sx
      Call sx
      
   Call Close_link
 End Sub
Sub qk()
  Label2.Caption = ""
  Label11.Caption = ""
  Combo2.Clear
  Combo3.Clear
  Combo1.Clear
  Combo4.Clear
  Text2.Text = ""
  Text4.Text = ""
End Sub
Sub sx()
 DataGrid1.Columns(0).Visible = False
 DataGrid1.Columns(1).Caption = "序号"
 DataGrid1.Columns(2).Visible = False
 DataGrid1.Columns(3).Caption = "注意事项"
 DataGrid1.Columns(3).Width = 10000
End Sub

⌨️ 快捷键说明

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