-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMainMasterAR.master.cs
34 lines (32 loc) · 1.12 KB
/
MainMasterAR.master.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class MainMasterAR : System.Web.UI.MasterPage
{
databaseaccesslayer dataobj = new databaseaccesslayer();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
try
{
string setting = "select * from Ta_Sitting where AlertDate='" + DateTime.Now.ToShortDateString() + "' and Type=1";
DataTable settingcount = dataobj.Selectdatatable(setting);
string Task = "select * from Ta_Task where DateOfAlert='" + DateTime.Now.ToShortDateString() + "' and Status=1";
DataTable TaskCount = dataobj.Selectdatatable(Task);
if (TaskCount.Rows.Count > 0 || settingcount.Rows.Count>0)
{
div.Visible = true;
}
}
catch (Exception)
{
Response.Redirect("MainPage.aspx");
}
}
}
}