Exemple #1
0
 public bool BindNotificationMessage()
 {
     try
     {
         PPRDataBL obj = new PPRDataBL();
         DataTable dt  = new DataTable();
         dt = obj.BindNotificationMessageBL(Session["UserId"].ToString(), "MasterPageNotification");
         if (dt.Rows.Count > 0)
         {
             StringBuilder s = new StringBuilder();
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 s.Append("<div class='alert alert-danger clearfix'>");
                 s.Append("<span class='alert-icon'><i class='fa fa-bell fa-2x'></i></span>");
                 s.Append("<div class='noti-info'>");
                 s.Append("<a href='#'>");
                 s.Append(dt.Rows[i]["Notifications"].ToString() + "</a>");
                 s.Append("</div>");
                 s.Append("</div>");
             }
             // lblNotificationMessage.Text = s.ToString();
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
     return(false);
 }
Exemple #2
0
 public bool BindNotificationMessage()
 {
     try
     {
         PPRDataBL obj = new PPRDataBL();
         DataTable dt  = new DataTable();
         if (Session["LoginId"] != null)
         {
             dt = obj.BindNotificationMessageBL(Session["LoginId"].ToString(), "MasterPageNotification");
         }
         if (dt.Rows.Count > 0)
         {
             StringBuilder s = new StringBuilder();
             s.Append("<div style='max-height:10px; !important'>");
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 if (dt.Rows[i]["HasRead"].Equals("N"))
                 {
                     s.Append("<div class='alert alert-danger clearfix' style='max-height:100px;'>");
                     s.Append("<span class='alert-icon'><i class='fa fa-bell fa-2x'></i></span>");
                     s.Append("<div class='noti-info'>");
                     s.Append("<a href='#'>");
                     s.Append(dt.Rows[i]["Notifications"].ToString() + "</a>");
                     s.Append("</div>");
                     s.Append("</div>");
                 }
                 if (dt.Rows[i]["HasRead"].Equals("Y"))
                 {
                     s.Append("<div class='alert alert-success clearfix' style='max-height:100px;'>");
                     s.Append("<span class='alert-icon'><i class='fa fa-bell fa-2x'></i></span>");
                     s.Append("<div class='noti-info'>");
                     s.Append("<a href='#'>");
                     s.Append(dt.Rows[i]["Notifications"].ToString() + "</a>");
                     s.Append("</div>");
                     s.Append("</div>");
                 }
             }
             s.Append("</div>");
             //lblNotificationMessage.Text = s.ToString();
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
     return(false);
 }
Exemple #3
0
 public bool BindNotificationMessage()
 {
     try
     {
         PPRDataBL obj = new PPRDataBL();
         DataTable dt  = new DataTable();
         dt = obj.BindNotificationMessageBL(Session["LoginId"].ToString(), "DefaultPageNotification");
         StringBuilder s = new StringBuilder();
         if (dt.Rows.Count > 0)
         {
             for (int i = 0; i < dt.Rows.Count; i++)
             {
                 if (i % 2 == 0)
                 {
                     s.Append("<div class='alert alert-danger' style='min-height: 66px;'>");
                     s.Append("<span class='alert-icon'><i class='fa fa-envelope'></i></span>");
                     s.Append("<div class='notification-info'>");
                     s.Append("<ul class='clearfix notification-meta'>");
                     s.Append("<li class='pull-left notification-sender'><span><a href='#'>" + dt.Rows[i]["Notifications"].ToString() + "</a></span></li>");
                     s.Append("<li class='pull-right notification-time'>" + dt.Rows[i]["DateOfNotification"].ToString() + "</li>");
                     s.Append("</ul>");
                     s.Append("<p>");
                     s.Append("</p>");
                     s.Append("</div>");
                     s.Append("</div>");
                 }
                 else
                 {
                     s.Append("<div class='alert alert-success' style='min-height: 66px;'>");
                     s.Append("<span class='alert-icon'><i class='fa fa-envelope'></i></span>");
                     s.Append("<div class='notification-info'>");
                     s.Append("<ul class='clearfix notification-meta'>");
                     s.Append("<li class='pull-left notification-sender'><span><a href='#'>" + dt.Rows[i]["Notifications"].ToString() + "</a></span></li>");
                     s.Append("<li class='pull-right notification-time'>" + dt.Rows[i]["DateOfNotification"].ToString() + "</li>");
                     s.Append("</ul>");
                     s.Append("<p>");
                     s.Append("</p>");
                     s.Append("</div>");
                     s.Append("</div>");
                 }
             }
             //lblDefaultNotification.Text = s.ToString();
         }
         else
         {
             s.Append("<div class='alert alert-danger' style='min-height: 66px;'>");
             s.Append("<span class='alert-icon'><i class='fa fa-envelope'></i></span>");
             s.Append("<div class='notification-info'>");
             s.Append("<ul class='clearfix notification-meta'>");
             s.Append("<li class='pull-left notification-sender'><span><a href='#'>Currently there is no Notification Available</a></span></li>");
             s.Append("<li class='pull-right notification-time'></li>");
             s.Append("</ul>");
             s.Append("<p>");
             s.Append("</p>");
             s.Append("</div>");
             s.Append("</div>");
             //lblDefaultNotification.Text = s.ToString();
             //SeeAllNoti.Visible = false;
         }
     }
     catch (Exception ex)
     {
         LogError(ex);
     }
     return(false);
 }