62,046
社区成员
发帖
与我相关
我的任务
分享
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Timer ID="Timer1" runat="server" Interval="10000" OnTick="Timer1_Tick">
</asp:Timer>
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="true">
</asp:GridView>
<asp:Panel ID="dxtx" runat="server" Visible="false">
<bgsound src='./dxtx.wav' />
</asp:Panel>
</ContentTemplate>
</asp:UpdatePanel>
protected void Timer1_Tick(object sender, EventArgs e)
{
//如果有待办事宜,就播放声音
try
{
WorkFlowCommon wCommon = new WorkFlowCommon();
DataTable dt = wCommon.GetWorkFlowList(" and fd_seq=0");
GridView1.DataSource = dt;
GridView1.DataBind();
dt = null;
DateTime freshTime = DateTime.Now;
int count = wCommon.GetNewWaitMattersCount(EmpSeq, DeptNo, freshTime,FreshTimeSpan);
if (count > 0)
dxtx.Visible = true;
else
dxtx.Visible = false;
//dxtx.Visible = true;
wCommon = null;
}
catch (Exception ex)
{
Response.Write(ex.Message);
}
}