using System;
using System.Data;
using System.Globalization;
using System.IO;
using System.Resources;
using System.Threading;
using System.Web.UI;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.ReportSource;
using CrystalDecisions.Shared;

public partial class MasterFile_GetNotification : Base.BasePage
{
    #region Variable Declaration
    ResourceManager rm;
    CultureInfo ci;
    cls_Common objCommon = new cls_Common();
    ReportDocument rptDoc = new ReportDocument();
    GetReports rptEmp = new GetReports();
    HeaderInformation hdrTable = new HeaderInformation();
    Rpt_Common rptcommon = new Rpt_Common();
    EmailConfiguration objEmailConfiguration = new EmailConfiguration();
    string strNotification = "", pathname = "", strIsFrom = "";
    int intLeave, intpermission, intOnduty = 0, intCountValue = 0;
    int otApprovalExists, leaveSanctionExists, manualEntryExists = 0;
    int intNewsID;
    int payrollConfig = 0;
    #endregion
    protected override void Page_Load(object sender, EventArgs e)
    {
        string source_Language;
        GC.Collect();
        base.Page_Load(sender, e);
        source_Language = Convert.ToString(Session["Session_ActiveLanguage"]);
        rm = new ResourceManager(source_Language, System.Reflection.Assembly.Load("App_GlobalResources"));
        ci = Thread.CurrentThread.CurrentCulture;
        if (Request.QueryString["pathname"] != null)
            pathname = Convert.ToString(Request.QueryString["pathname"]);
        if (Request.QueryString["IsFrom"] != null)
            strIsFrom = Convert.ToString(Request.QueryString["IsFrom"]);
        if (Request.QueryString["NewsID"] != null)
            intNewsID = Convert.ToInt32(Request.QueryString["NewsID"]);
        payrollConfig = objCommon.CheckPageExistsInLicense(185);
        if (strIsFrom == "Notification")
        {
            loadNotification();
        }
        else if (strIsFrom == "News")
        {
            LoadNews();
        }
        else if (strIsFrom == "NewsContent")
        {
            LoadNewsContent();
        }
        else if (strIsFrom == "Close")
        {
            Session["NewsAndEventStatus"] = "Close";
            strNotification = "";
        }
        Response.Write(strNotification);
        Response.End();
    }
    private void loadNotification()
    {
        otApprovalExists = objCommon.CheckPageExistsInLicense(97);
        leaveSanctionExists = objCommon.CheckPageExistsInLicense(248);
        manualEntryExists = objCommon.CheckPageExistsInLicense(98);
        payrollConfig = objCommon.CheckPageExistsInLicense(185);
        DataSet ds = new DataSet();
        strNotification = "";
        if (otApprovalExists == 0 && leaveSanctionExists == 0 && manualEntryExists == 0)
        {
            strNotification = "*No";
        }
        else
        {
            if (Convert.ToString(Session["IndividualUsers"]) == "True")
            {
                strNotification = "*No";
            }
            else
            {
                ds = objCommon.GetNotification(Convert.ToInt32(Session["EmpAutoId"]), Convert.ToString(Session["UserGroupName"]));
                strNotification = "";
                if (ds.Tables[0].Rows.Count > 0)
                {
                    #region Leave
                    //if (ds.Tables[0].Rows[0]["LevelID"] != DBNull.Value)
                    //{
                    //    Session["parentLevelId"] = Convert.ToInt32(ds.Tables[0].Rows[0]["LevelID"]);
                    //}
                    if (Convert.ToString(ds.Tables[0].Rows[0]["PendingLeave"]) != "0")
                    {
                        if (intLeave == 0)
                        {
                            strNotification += "<li class=\"footer\"><a><i class='fa fa-check-square-o faa-vertical animated-hover' style=\"font-size:16px;color:green;\"></i> " + rm.GetString("Transactions_LeaveApplication", ci) + " </a></li>";
                            intLeave = 1;
                        }
                        string currentPageFileName = new FileInfo(this.Request.Url.LocalPath).Name;
                        if (currentPageFileName != "GetNotification.aspx" || pathname == "MyCalendar.aspx" || pathname == "DashBoard.aspx")
                        {
                            if (payrollConfig == 0)
                            {
                                strNotification += "<li> <a href='Transactions/TA_UI_Transactions_LeaveSanctionView.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Pending&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-exclamation-triangle faa-vertical animated-hover' style='color:#DD4B39'></i> " + rm.GetString("btn_Pending", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["PendingLeave"]) + "</a></li>";
                            }
                            else
                            {
                                strNotification += "<li> <a href='Transactions/TA_UI_Transactions_LeaveSanctionView_Angler.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Pending&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-exclamation-triangle faa-vertical animated-hover' style='color:#DD4B39'></i> " + rm.GetString("btn_Pending", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["PendingLeave"]) + "</a></li>";
                            }
                        }
                        else
                        {
                            if (payrollConfig == 0)
                            {
                                strNotification += "<li> <a href='../Transactions/TA_UI_Transactions_LeaveSanctionView.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Pending&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-exclamation-triangle faa-vertical animated-hover' style='color:#DD4B39'></i> " + rm.GetString("btn_Pending", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["PendingLeave"]) + "</a></li>";
                            }
                            else
                            {
                                strNotification += "<li> <a href='../Transactions/TA_UI_Transactions_LeaveSanctionView_Angler.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Pending&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-exclamation-triangle faa-vertical animated-hover' style='color:#DD4B39'></i> " + rm.GetString("btn_Pending", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["PendingLeave"]) + "</a></li>";
                            }
                        }
                    }

                    if (Convert.ToString(ds.Tables[0].Rows[0]["ForwardLeave"]) != "0")
                    {
                        if (intLeave == 0)
                        {
                            strNotification += "<li class=\"footer\"><a><i class='fa fa-check-square-o faa-vertical animated-hover' style=\"font-size:16px;color:green;\"></i> " + rm.GetString("Transactions_LeaveApplication", ci) + " </a></li>";
                            intLeave = 1;
                        }
                        string currentPageFileName = new FileInfo(this.Request.Url.LocalPath).Name;
                        if (currentPageFileName != "GetNotification.aspx" || pathname == "MyCalendar.aspx" || pathname == "DashBoard.aspx")
                        {
                            if (payrollConfig == 0)
                            {
                                strNotification += "<li> <a href='Transactions/TA_UI_Transactions_LeaveSanctionView.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Forwarded&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-share faa-vertical animated-hover' style='color:#FF7F00'></i> " + rm.GetString("btn_Forwarded", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["ForwardLeave"]) + "</a></li>";
                            }
                            else
                            {
                                strNotification += "<li> <a href='Transactions/TA_UI_Transactions_LeaveSanctionView_Angler.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Forwarded&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-share faa-vertical animated-hover' style='color:#FF7F00'></i> " + rm.GetString("btn_Forwarded", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["ForwardLeave"]) + "</a></li>";
                            }
                        }
                        else
                        {
                            if (payrollConfig == 0)
                            {
                                strNotification += "<li> <a href='../Transactions/TA_UI_Transactions_LeaveSanctionView.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Forwarded&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-share faa-vertical animated-hover' style='color:#FF7F00'></i>" + rm.GetString("btn_Forwarded", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["ForwardLeave"]) + "</a></li>";
                            }
                            else
                            {
                                strNotification += "<li> <a href='../Transactions/TA_UI_Transactions_LeaveSanctionView_Angler.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Forwarded&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-share faa-vertical animated-hover' style='color:#FF7F00'></i>" + rm.GetString("btn_Forwarded", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["ForwardLeave"]) + "</a></li>";
                            }
                        }
                    }
                    #endregion
                    #region Permission

                    if (Convert.ToString(ds.Tables[0].Rows[0]["PendingPermission"]) != "0")
                    {
                        if (intpermission == 0)
                        {
                            strNotification += "<li class=\"footer\"><a><i class='fa fa-calendar faa-vertical animated-hover' style=\"font-size:16px;color:#579AD0;\"></i> " + rm.GetString("Menu_Transactions_Permission", ci) + "</a></li>";
                            intpermission = 1;
                        }
                        string currentPageFileName = new FileInfo(this.Request.Url.LocalPath).Name;
                        if (currentPageFileName != "GetNotification.aspx" || pathname == "MyCalendar.aspx" || pathname == "DashBoard.aspx")
                        {
                            if (payrollConfig == 0)
                            {
                                strNotification += "<li> <a href='Transactions/TA_UI_Transactions_PermissionSanctionView.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Pending&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-exclamation-triangle faa-vertical animated-hover' style='color:#DD4B39'></i> " + rm.GetString("btn_Pending", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["PendingPermission"]) + "</a></li>";
                            }
                            else
                            {
                                strNotification += "<li> <a href='Transactions/TA_UI_Transactions_PermissionSanctionView_Angler.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Pending&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-exclamation-triangle faa-vertical animated-hover' style='color:#DD4B39'></i> " + rm.GetString("btn_Pending", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["PendingPermission"]) + "</a></li>";
                            }
                        }
                        else
                        {
                            if (payrollConfig == 0)
                            {
                                strNotification += "<li> <a href='../Transactions/TA_UI_Transactions_PermissionSanctionView.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Pending&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-exclamation-triangle faa-vertical animated-hover' style='color:#DD4B39'></i> " + rm.GetString("btn_Pending", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["PendingPermission"]) + "</a></li>";
                            }
                            else
                            {
                                strNotification += "<li> <a href='../Transactions/TA_UI_Transactions_PermissionSanctionView_Angler.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Pending&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-exclamation-triangle faa-vertical animated-hover' style='color:#DD4B39'></i> " + rm.GetString("btn_Pending", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["PendingPermission"]) + "</a></li>";
                            }
                        }

                    }
                    if (Convert.ToString(ds.Tables[0].Rows[0]["ForwardPermission"]) != "0")
                    {
                        if (intpermission == 0)
                        {
                            strNotification += "<li class=\"footer\"><a><i class='fa fa-calendar faa-vertical animated-hover' style=\"font-size:16px;color:#579AD0;\"></i> " + rm.GetString("Menu_Transactions_Permission", ci) + "</a></li>";
                            intpermission = 1;
                        }
                        string currentPageFileName = new FileInfo(this.Request.Url.LocalPath).Name;
                        if (currentPageFileName != "GetNotification.aspx" || pathname == "MyCalendar.aspx" || pathname == "DashBoard.aspx")
                        {
                            if (payrollConfig == 0)
                            {
                                strNotification += "<li> <a href='Transactions/TA_UI_Transactions_PermissionSanctionView.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Forwarded&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-share faa-vertical animated-hover' style='color:#FF7F00'></i> " + rm.GetString("btn_Forwarded", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["ForwardPermission"]) + "</a></li>";
                            }
                            else
                            {
                                strNotification += "<li> <a href='Transactions/TA_UI_Transactions_PermissionSanctionView_Angler.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Forwarded&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-share faa-vertical animated-hover' style='color:#FF7F00'></i> " + rm.GetString("btn_Forwarded", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["ForwardPermission"]) + "</a></li>";
                            }
                        }
                        else
                        {
                            if (payrollConfig == 0)
                            {
                                strNotification += "<li> <a href='../Transactions/TA_UI_Transactions_PermissionSanctionView.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Forwarded&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-share faa-vertical animated-hover' style='color:#FF7F00'></i> " + rm.GetString("btn_Forwarded", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["ForwardPermission"]) + "</a></li>";
                            }
                            else
                            {
                                strNotification += "<li> <a href='../Transactions/TA_UI_Transactions_PermissionSanctionView_Angler.aspx?LevelId=" + Convert.ToString(ds.Tables[0].Rows[0]["LevelID"]) + "&Status=Forwarded&From_Date=&To_Date=&strSwipeCardNo=&strEmployeeName=&strEmployeeCodeId=&Shift=&isNotification=yes'> <i class='fa fa-share faa-vertical animated-hover' style='color:#FF7F00'></i> " + rm.GetString("btn_Forwarded", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["ForwardPermission"]) + "</a></li>";
                            }
                        }
                    }
                    #endregion
                    #region Onduty

                    if (Convert.ToString(ds.Tables[0].Rows[0]["PendingOnduty"]) != "0")
                    {
                        if (intOnduty == 0)
                        {
                            strNotification += "<li class=\"footer\"><a><i class='fa fa-briefcase faa-vertical animated-hover' style=\"font-size:16px;color:#0088cc;\"></i> " + rm.GetString("Notification_OndutyApplication", ci) + "</a></li>";
                            intOnduty = 1;
                        }
                        string currentPageFileName = new FileInfo(this.Request.Url.LocalPath).Name;
                        if (currentPageFileName != "GetNotification.aspx" || pathname == "MyCalendar.aspx" || pathname == "DashBoard.aspx")
                        {
                            strNotification += "<li> <a href='Transactions/TA_UI_Transactions_OnDutySanctionView.aspx?EmpId=&EmpName=&EmpCategory=0&EmpType=0&FromDate=&ToDate=&Status=Pending&SwipeCard=&Shift=&isNotification=yes'> <i class='fa fa-exclamation-triangle faa-vertical animated-hover' style='color:#DD4B39'></i> " + rm.GetString("btn_Pending", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["PendingOnduty"]) + "</a></li>";
                        }
                        else
                        {
                            strNotification += "<li> <a href='../Transactions/TA_UI_Transactions_OnDutySanctionView.aspx?EmpId=&EmpName=&EmpCategory=0&EmpType=0&FromDate=&ToDate=&Status=Pending&SwipeCard=&Shift=&isNotification=yes'> <i class='fa fa-exclamation-triangle faa-vertical animated-hover' style='color:#DD4B39'></i> " + rm.GetString("btn_Pending", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["PendingOnduty"]) + "</a></li>";
                        }

                    }
                    if (Convert.ToString(ds.Tables[0].Rows[0]["ForwardOnduty"]) != "0")
                    {
                        if (intOnduty == 0)
                        {
                            strNotification += "<li class=\"footer\"><a><i class='fa fa-briefcase faa-vertical animated-hover' style=\"font-size:16px;color:#0088cc;\"></i> " + rm.GetString("Notification_OndutyApplication", ci) + "</a></li>";
                            intOnduty = 1;
                        }
                        string currentPageFileName = new FileInfo(this.Request.Url.LocalPath).Name;
                        if (currentPageFileName != "GetNotification.aspx" || pathname == "MyCalendar.aspx" || pathname == "DashBoard.aspx")
                        {
                            strNotification += "<li> <a href='Transactions/TA_UI_Transactions_OnDutySanctionView.aspx?EmpId=&EmpName=&EmpCategory=0&EmpType=0&FromDate=&ToDate=&Status=Forwarded&SwipeCard=&Shift=&isNotification=yes'> <i class='fa fa-share faa-vertical animated-hover' style='color:#FF7F00'></i> " + rm.GetString("btn_Forwarded", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["ForwardOnduty"]) + "</a></li>";
                        }
                        else
                        {
                            strNotification += "<li> <a href='../Transactions/TA_UI_Transactions_OnDutySanctionView.aspx?EmpId=&EmpName=&EmpCategory=0&EmpType=0&FromDate=&ToDate=&Status=Forwarded&SwipeCard=&Shift=&isNotification=yes'> <i class='fa fa-share faa-vertical animated-hover' style='color:#FF7F00'></i> " + rm.GetString("btn_Forwarded", ci) + " : " + Convert.ToString(ds.Tables[0].Rows[0]["ForwardOnduty"]) + "</a></li>";
                        }

                    }
                    if (Convert.ToString(ds.Tables[0].Rows[0]["TotalNotification"]) != "0")
                    {
                        //NotCount2.Text = "You Have " + Convert.ToString(ds.Tables[0].Rows[0]["TotalNotification"]) + " Notification";
                        strNotification += "~" + Convert.ToString(ds.Tables[0].Rows[0]["TotalNotification"]);
                    }
                    if (Convert.ToString(Session["UserGroupName"]) == "SuperAdmin")
                    {
                        strNotification = "*No";
                    }
                    //if(Convert.ToString(ds.Tables[0].Rows[0]["IsReportingto"]) == "0" && Convert.ToString(ds.Tables[0].Rows[0]["IsSanctionto"]) == "0")
                    //{
                    //    strNotification += "*No";
                    //}
                    #endregion
                }
            }
        }
    }
    private void LoadNews()
    {
        strNotification = "";
        DataSet ds = new DataSet();
        ds = objCommon.getNewsBanner("LeftNewsEvent");

        if (ds.Tables.Count > 0)
        {
            if (ds.Tables[0].Rows.Count > 0)
            {
                for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
                {
                    strNotification += "<li style=\"cursor: pointer\"> <a data-toggle=\"modal\" data-target=\"#myModalForNewsAndEvent\" onclick=\"return ajaxGetNewsContent('" + ds.Tables[0].Rows[i][0] + "');\"><i class='fa fa-info-circle faa-vertical animated-hover' style='color:#DD4B39'></i> " + Convert.ToString(ds.Tables[0].Rows[i]["NewsEventTitle"]) + "</a></li>";
                    intCountValue = intCountValue + 1;
                }
            }
            else
            {
                strNotification = "*No";
            }
            if (ds.Tables[0].Rows.Count > 0)
            {
                //NotCount2.Text = "You Have " + Convert.ToString(ds.Tables[0].Rows[0]["TotalNotification"]) + " Notification";
                strNotification += "~" + Convert.ToString(intCountValue);
            }
        }
        else
        {
            strNotification = "*No";
        }

        //this.litLeftNews.Text = "";
        //string marqText = "<marquee direction='up' onmouseover='this.stop();' onmouseout='this.start();' scrollamount='1' height='72'>";
        //for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
        //{
        //    if (ds.Tables[0].Rows[i]["NewsEventTitle"] != DBNull.Value && ds.Tables[0].Rows[i]["NewsEventDescription"] != DBNull.Value)
        //        marqText = marqText + "<b>" + ds.Tables[0].Rows[i]["NewsEventTitle"] + "</b><br><br>" + ds.Tables[0].Rows[i]["NewsEventDescription"] + "<br><br>";
        //}
        //marqText = marqText + " </marquee>";
        //this.litLeftNews.Text = marqText;
        //ds = objCommon.getNewsBanner("RightNewsEvent");
        //this.litRightNews.Text = "";
        //marqText = "<marquee direction='up' onmouseover='this.stop();' onmouseout='this.start();' scrollamount='1' height='72'>";
        //for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
        //{
        //    if (ds.Tables[0].Rows[i]["NewsEventTitle"] != DBNull.Value && ds.Tables[0].Rows[i]["NewsEventDescription"] != DBNull.Value)
        //        marqText = marqText + "<b>" + ds.Tables[0].Rows[i]["NewsEventTitle"] + "</b><br><br>" + ds.Tables[0].Rows[i]["NewsEventDescription"] + "<br><br>";
        //}
        //marqText = marqText + " </marquee>";
        //this.litRightNews.Text = marqText;
    }
    private void LoadNewsContent()
    {
        strNotification = "";
        DataSet ds = new DataSet();
        if (intNewsID != 0)
        {
            ds = objCommon.getNewsByID(intNewsID);
            if (ds.Tables.Count > 0)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    strNotification = "<br><b>" + ds.Tables[0].Rows[0]["NewsEventTitle"] + "</b><br><br>" + ds.Tables[0].Rows[0]["NewsEventDescription"] + "<br><br>";
                }
            }
        }
        else
        {
            ds = objCommon.getNewsBanner("LeftNewsEvent");
            strNotification = "";
            if (ds.Tables.Count > 0)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    strNotification = "<marquee direction='up' onmouseover='this.stop();' onmouseout='this.start();' scrollamount='3' height='250'>";
                    for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
                    {
                        if (ds.Tables[0].Rows[i]["NewsEventTitle"] != DBNull.Value && ds.Tables[0].Rows[i]["NewsEventDescription"] != DBNull.Value)
                            strNotification = strNotification + "<b>Title : </b>" + ds.Tables[0].Rows[i]["NewsEventTitle"] + "<br><br>" + ds.Tables[0].Rows[i]["NewsEventDescription"] + "<br><br><div style=\"border-bottom:1px solid #A9A9A9;border-radius: 25px;\"></div><br>";
                    }
                    strNotification = strNotification + " </marquee>";
                }
            }

        }
    }
}