(由于长度限制,删除了部分代码)
'-----------------------------------------------------------------------------------------------------------------
'页面初始代码
'-----------------------------------------------------------------------------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
SqlConnection1.Open()
receivedeptid = Convert.ToString("dsgd1111ads")
userid = Convert.ToDouble("af00000sra")
username = Convert.ToString("1111").Trim
'--------------------------------------------------------------------------------
ddl_year.Items.Add(Convert.ToString(Today().Year - 2))
ddl_year.Items.Add(Convert.ToString(Today().Year - 1))
ddl_year.Items.Add(Convert.ToString(Today().Year))
ddl_year.Items.Add(Convert.ToString(Today().Year + 1))
ddl_year.SelectedIndex = -1
ddl_year.Items.FindByValue(Convert.ToString(Today().Year)).Selected = True
BINDGRID()
Btn_reg.Enabled = False
BindTree()
Else
Response.Write("<script language=javascript>function init(){document.Form1.page_pos.value = " + Request("page_pos") + "; window.scrollBy(0,document.Form1.page_pos.value); }window.onload=init;</script>")
End If
End Sub
'---------------------------------------------------------------------
'绑定公文表
'---------------------------------------------------------------------
Private Function BINDGRID()
receivedeptid = Convert.ToString("00550000")
Dim tpCnt As Integer
With New DocumentSystem()
tmpDPR = .getDocuArchiveInfo(receivedeptid, Convert.ToString(ddl_year.SelectedItem.Value), "WAIT")
End With
If tmpDPR.Tables(0).Rows.Count > 0 Then
'Btn_reg.Enabled = True
L_tips.Text = ""
tpCnt = tmpDPR.Tables(0).Rows.Count \ DG_DPR.PageSize
If tmpDPR.Tables(0).Rows.Count Mod DG_DPR.PageSize > 0 Then
tpCnt = tpCnt + 1
End If
If tpCnt < DG_DPR.PageCount Then
If DG_DPR.CurrentPageIndex > tpCnt - 1 Then
DG_DPR.CurrentPageIndex = tpCnt - 1
End If
End If
Else
Btn_reg.Enable
'-----------------------------------------------------------------------------------------------------------------
'页面初始代码
'-----------------------------------------------------------------------------------------------------------------
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
SqlConnection1.Open()
receivedeptid = Convert.ToString("dsgd1111ads")
userid = Convert.ToDouble("af00000sra")
username = Convert.ToString("1111").Trim
'--------------------------------------------------------------------------------
ddl_year.Items.Add(Convert.ToString(Today().Year - 2))
ddl_year.Items.Add(Convert.ToString(Today().Year - 1))
ddl_year.Items.Add(Convert.ToString(Today().Year))
ddl_year.Items.Add(Convert.ToString(Today().Year + 1))
ddl_year.SelectedIndex = -1
ddl_year.Items.FindByValue(Convert.ToString(Today().Year)).Selected = True
BINDGRID()
Btn_reg.Enabled = False
BindTree()
Else
Response.Write("<script language=javascript>function init(){document.Form1.page_pos.value = " + Request("page_pos") + "; window.scrollBy(0,document.Form1.page_pos.value); }window.onload=init;</script>")
End If
End Sub
'---------------------------------------------------------------------
'绑定公文表
'---------------------------------------------------------------------
Private Function BINDGRID()
receivedeptid = Convert.ToString("00550000")
Dim tpCnt As Integer
With New DocumentSystem()
tmpDPR = .getDocuArchiveInfo(receivedeptid, Convert.ToString(ddl_year.SelectedItem.Value), "WAIT")
End With
If tmpDPR.Tables(0).Rows.Count > 0 Then
'Btn_reg.Enabled = True
L_tips.Text = ""
tpCnt = tmpDPR.Tables(0).Rows.Count \ DG_DPR.PageSize
If tmpDPR.Tables(0).Rows.Count Mod DG_DPR.PageSize > 0 Then
tpCnt = tpCnt + 1
End If
If tpCnt < DG_DPR.PageCount Then
If DG_DPR.CurrentPageIndex > tpCnt - 1 Then
DG_DPR.CurrentPageIndex = tpCnt - 1
End If
End If
Else
Btn_reg.Enable
| 对此文章发表了评论 |

