-
Notifications
You must be signed in to change notification settings - Fork 0
/
MasterForCallManagement.master.cs
132 lines (118 loc) · 4.01 KB
/
MasterForCallManagement.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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class MasterForCallManagement : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
try
{
if (Session["EmpId"].ToString() == "")
Response.Redirect("Login.aspx", false);
if (Session["EmpId"].ToString() == null)
Response.Redirect("Login.aspx", false);
//if (Session["EmpId"].ToString() == "10069")
//{
MasterTab.Visible = true;
//}
string Thoughts = "";
DataTable dt = new DataTable();
Attendance a = new Attendance();
dt = a.GetWeek(int.Parse(Session["EmpId"].ToString()));
foreach (DataRow ro in dt.Rows)
{
Thoughts = ro[0].ToString();
}
lblUserName.Text = "Welcome " + Session["Name"].ToString() + " !";
lblDate.Text = (DateTime.Now).ToString("dd/MM/yyyy");
lblThougt.Text = Thoughts;
StudentRegistrationDAL s = new StudentRegistrationDAL();
int Count = s.IsMissedCall(int.Parse(Session["EmpId"].ToString()));
if (Count > 0)
{
imgRequest.ImageUrl = "~/Icons/notifcation-message.png";
lblCount.Visible = true;
div1.Visible = true;
lblCount.Text = Count.ToString();
}
else
{
imgRequest.ImageUrl = "~/Icons/notification-on.png";
lblCount.Visible = false;
div1.Visible = false;
}
int fCount = s.IsFollowupschedule(int.Parse(Session["EmpId"].ToString()));
if (fCount > 0)
{
imgRequest1.ImageUrl = "~/Icons/notifcation-message.png";
lblCount1.Visible = true;
div2.Visible = true;
lblCount1.Text = fCount.ToString();
Session["fcount"] = fCount;
}
else
{
imgRequest1.ImageUrl = "~/Icons/notification-on.png";
lblCount1.Visible = false;
div2.Visible = false;
}
try
{
int vCount = s.IsVisitschedule(int.Parse(Session["EmpId"].ToString()));
if (vCount > 0)
{
Image1.ImageUrl = "~/Icons/notifcation-message.png";
Lblvisit.Visible = true;
div3.Visible = true;
Lblvisit.Text = vCount.ToString();
Session["vcount"] = vCount;
}
else
{
Image1.ImageUrl = "~/Icons/notification-on.png";
Lblvisit.Visible = false;
div3.Visible = false;
}
}
catch
{
}
if (Session["GroupName"].ToString() == "UAE")
dvHide.Visible = true;
else
dvHide.Visible = false;
}
catch
{
Response.Redirect("Login.aspx", false);
}
}
protected void UpdateTimer_Tick(object sender, EventArgs e)
{
try
{
StudentRegistrationDAL s = new StudentRegistrationDAL();
int Count = s.IsMissedCall(int.Parse(Session["EmpId"].ToString()));
if (Count > 0)
{
imgRequest.ImageUrl = "~/Icons/notifcation-message.png";
lblCount.Visible = true;
div1.Visible = true;
lblCount.Text = Count.ToString();
}
else
{
imgRequest.ImageUrl = "~/Icons/notification-on.png";
lblCount.Visible = false;
div1.Visible = false;
}
}
catch (Exception ex)
{
}
}
}