Example #1
0
    //public void notice_board()
    //{

    //    try
    //    {
    //        dl_Notice dl = new dl_Notice();
    //        bl_Notice bl = new bl_Notice();
    //        ReturnClass.ReturnDataTable dt = new ReturnClass.ReturnDataTable();
    //        // ur.District_id = Session["di"].ToString();
    //        dt = dl.Get_Notice_Data(bl);


    //        if (dt.table.Rows.Count > 0)
    //        {
    //            Literal1.Text = "<div class='col-sm-12  pull-left'>";
    //            //Literal1.Text = "<div class='col-sm-12' >";
    //            Literal1.Text = Literal1.Text + "<div class='col-sm-12 emphasis '>";
    //            Literal1.Text = Literal1.Text + "<h3 class='text-center'> Notice Board </h3 >";
    //           // Literal1.Text = Literal1.Text + "<div style='height:215px; padding-left:30px; overflow:auto;'>";
    //            Literal1.Text = Literal1.Text + " <table border=0  >";

    //            for (int i = 0; i < dt.table.Rows.Count; i++)
    //            {
    //                //Literal11.Text = Literal11.Text + "<li style=padding-bottom:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + "<img src=" + dt.table.Rows[i]["image"].ToString() + " />" + "<a target='_blank' href=" + dt.table.Rows[i]["url"].ToString() + "?fid=" + dt.table.Rows[i]["file_id"].ToString() + ">" + "<span id='blinker'>" + "<b>" + dt.table.Rows[i]["Header"].ToString() + "</b> </span> " + "<span class='spa'><b>" + dt.table.Rows[i]["Publish_Date"].ToString() + "</b>" + " </span> " + "</a>" + " </li>";
    //                if (dt.table.Rows[i]["notice_file_id"].ToString() == "NOT_AVL")
    //                {
    //                    Literal1.Text = Literal1.Text + "<tr> <td>" + (i+1) +" </td>" + "<td><span class=\"spa\" style=\"color: #FFAAFF\">" + dt.table.Rows[i]["Subject"].ToString() + "</span> </td>" + " <td> <span class=\"spa\" style=\"color: #00AA22\" ><b>" + dt.table.Rows[i]["Validity_From"].ToString() + "</b>" + " </span> </td>" + "  </tr>";
    //                }
    //                else
    //                {
    //                    string key = System.Configuration.ConfigurationManager.AppSettings["EncKey"].ToString();
    //                    Utilities ut = new Utilities();
    //                    string encrypt_rti_id = dt.table.Rows[i]["notice_id"].ToString();
    //                    string notice_id = ut.Encrypt_AES(encrypt_rti_id, key);

    //                    Literal1.Text = Literal1.Text + "<tr> <td>" + (i + 1) + " </td> <td> <a target='_blank'  href=\"NoticeFileHandler.ashx?fid=" + notice_id + "\">" + " <span class=\"spa\" style=\"color: #ffff00\">" + dt.table.Rows[i]["Subject"].ToString() + "  </span>" + "</a> </td> <td>" + "<span class=\"spa\" style=\"color: #ffff00\" ><b>" + dt.table.Rows[i]["Validity_From"].ToString() + "</b>" + " </span> " + " </td>";
    //                }
    //            }
    //            Literal1.Text = Literal1.Text + "</table>" + "</div></div>";// "</div></div></div>";
    //        }
    //    }

    //    catch
    //    {
    //    }


    //}// End of function notice_board()

    //-------------------------Naveen notice board------------------------//
    public void notice_board()
    {
        try
        {
            dl_rti_notice dl = new dl_rti_notice();
            //bl_Notice bl = new bl_Notice();
            ReturnClass.ReturnDataTable dt = new ReturnClass.ReturnDataTable();
            dt = dl.Get_Notice_Data1();

            if (dt.table.Rows.Count > 0)
            {
                //Literal1.Text = "<div class='col-sm-12 noticeboard pull-left'>";

                ////Literal1.Text = Literal1.Text + "<div class='col-sm-12 emphasis '>";
                //Literal1.Text = Literal1.Text + "<div class='col-sm-12'>";
                ////Literal1.Text = Literal1.Text + "<h2 class='text-center'> <%=Resources.Resource.NoticeBoard %> </h2 >";
                //if (Session["language"].ToString() == "hi-IN")
                //{
                //    Literal1.Text = Literal1.Text + "<h2 class='text-center'> सूचना पटल  </h2 >";
                //}
                //else
                //{
                //    Literal1.Text = Literal1.Text + "<h2 class='text-center'> Notice Board </h2 >";
                //}
                Literal1.Text = Literal1.Text + "<div >";
                //Literal1.Text = Literal1.Text + "<div style='height:215px; padding-left:15px; overflow:auto;'>";

                Literal1.Text = Literal1.Text;

                for (int i = 0; i < dt.table.Rows.Count; i++)
                {
                    if (dt.table.Rows[i]["Hyperlink"].ToString() == "Y")
                    {
                        if (dt.table.Rows[i]["bold"].ToString() == "Y")
                        {
                            if (dt.table.Rows[i]["image"].ToString() != "")
                            {
                                if (dt.table.Rows[i]["blink"].ToString() == "Y")
                                {
                                    Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><span id='blinker' class='blink_me'><img height=\"20\" width=\"32\" src=" + dt.table.Rows[i]["image"].ToString() + " /></span>" + "<a target='_blank' href=" + dt.table.Rows[i]["url"].ToString() + "?fid=" + dt.table.Rows[i]["file_id"].ToString() + ">" + "<b style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Header"].ToString() + "</b>" + "<span class='spa' style=color:" + dt.table.Rows[i]["color"].ToString() + ">" + " </span> " + "<b>" + dt.table.Rows[i]["Publish_Date"].ToString() + "</b>" + "</a>" + "</li>";


                                    //Literal11.Text = Literal11.Text + "<li style=padding-bottom:10px;><span id='blinker' class='blink_me'><img style=padding-bottom:10px; src=" + dt.table.Rows[i]["image"].ToString() + " /></span>" + "<a target='_blank' href=" + dt.table.Rows[i]["url"].ToString() + "?fid=" + dt.table.Rows[i]["file_id"].ToString() + ">" + "<span style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + "<b>" + dt.table.Rows[i]["Header"].ToString() + "</b> </span> " + "<span class='spa' style=color:" + dt.table.Rows[i]["color"].ToString() + "><b>" + dt.table.Rows[i]["Publish_Date"].ToString() + "</b>" + " </span> " + "</a>" + " </li>";
                                }
                                else
                                {
                                    Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><img height=\"20\" width=\"32\" src=" + dt.table.Rows[i]["image"].ToString() + " />" + "<a target='_blank' href=" + dt.table.Rows[i]["url"].ToString() + "?fid=" + dt.table.Rows[i]["file_id"].ToString() + ">" + "<b style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Header"].ToString() + "</b>" + "<span class='spa' style=color:" + dt.table.Rows[i]["color"].ToString() + ">" + " </span> " + "<b>" + dt.table.Rows[i]["Publish_Date"].ToString() + "</b>" + "</a>" + "</li>";
                                }
                            }
                            else
                            {
                                Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><a target='_blank' href=" + dt.table.Rows[i]["url"].ToString() + "?fid=" + dt.table.Rows[i]["file_id"].ToString() + ">" + "<b style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Header"].ToString() + "</b>" + "<span class='spa' style=color:" + dt.table.Rows[i]["color"].ToString() + ">" + " </span> " + "<b>" + dt.table.Rows[i]["Publish_Date"].ToString() + "</b>" + "</a>" + "</li>";
                            }
                        }
                        else
                        {
                            if (dt.table.Rows[i]["image"].ToString() != "")
                            {
                                if (dt.table.Rows[i]["blink"].ToString() == "Y")
                                {
                                    Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><span id='blinker' class='blink_me'><img height=\"20\" width=\"32\" style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + " src=" + dt.table.Rows[i]["image"].ToString() + " /></span>" + "<a style=color:" + dt.table.Rows[i]["color"].ToString() + " target='_blank' href=" + dt.table.Rows[i]["url"].ToString() + "?fid=" + dt.table.Rows[i]["file_id"].ToString() + ">" + "<span style=color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Header"].ToString() + "</span>" + "<span class='spa' style=color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Publish_Date"].ToString() + "</span>" + "</a>" + "</li>";
                                }
                                else
                                {
                                    Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><img height=\"20\" width=\"32\" style=color:" + dt.table.Rows[i]["color"].ToString() + " src=" + dt.table.Rows[i]["image"].ToString() + " />" + "<a style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + " target='_blank' href=" + dt.table.Rows[i]["url"].ToString() + "?fid=" + dt.table.Rows[i]["file_id"].ToString() + ">" + dt.table.Rows[i]["Header"].ToString() + "<span class='spa' style=color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Publish_Date"].ToString() + "</span>" + "</a>" + "</li>";
                                }
                            }
                            else
                            {
                                Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><a target='_blank' style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + " href=" + dt.table.Rows[i]["url"].ToString() + "?fid=" + dt.table.Rows[i]["file_id"].ToString() + ">" + dt.table.Rows[i]["Header"].ToString() + "<span class='spa' style=color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Publish_Date"].ToString() + "</span>" + "</a>" + "</li>";
                            }
                        }
                    }
                    else if (dt.table.Rows[i]["Hyperlink"].ToString() == "N")
                    {
                        if (dt.table.Rows[i]["bold"].ToString() == "Y")
                        {
                            if (dt.table.Rows[i]["image"].ToString() != "")
                            {
                                if (dt.table.Rows[i]["blink"].ToString() == "Y")
                                {
                                    Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><span id='blinker' class='blink_me'>" + "<img height=\"20\" width=\"32\" src=" + dt.table.Rows[i]["image"].ToString() + " /></span>" + "<b style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Header"].ToString() + "</b>" + "<span class='spa' style=color:" + dt.table.Rows[i]["color"].ToString() + ">" + "</span>" + "<b>" + dt.table.Rows[i]["Publish_Date"].ToString() + "</b>" + "</li>";
                                }
                                else
                                {
                                    Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><img height=\"20\" width=\"32\" src=" + dt.table.Rows[i]["image"].ToString() + " />" + "<b style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Header"].ToString() + "</b>" + "<span class='spa' style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + "</span>" + "<b>" + dt.table.Rows[i]["Publish_Date"].ToString() + "</b>" + "</li>";
                                }
                            }
                            else
                            {
                                Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><b>" + dt.table.Rows[i]["Header"].ToString() + "</b>" + "<span class='spa' style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + "</span>" + "<b>" + dt.table.Rows[i]["Publish_Date"].ToString() + "</b>" + "</li>";
                            }
                        }
                        else
                        {
                            if (dt.table.Rows[i]["image"].ToString() != "")
                            {
                                if (dt.table.Rows[i]["blink"].ToString() == "Y")
                                {
                                    Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><span id='blinker' class='blink_me' style=color:" + dt.table.Rows[i]["color"].ToString() + ">" + "<img height=\"20\" width=\"32\" style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + " src=" + dt.table.Rows[i]["image"].ToString() + " /></span>" + dt.table.Rows[i]["Header"].ToString() + "<span class='spa' style=padding-bottom:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Publish_Date"].ToString() + "</span>" + "</li>";
                                }
                                else
                                {
                                    Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;><img height=\"20\" width=\"32\"  style=color:" + dt.table.Rows[i]["color"].ToString() + " src=" + dt.table.Rows[i]["image"].ToString() + " /><span style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Header"].ToString() + "</span><span class='spa' style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Publish_Date"].ToString() + "</span>" + "</li>";
                                }
                            }
                            else
                            {
                                Literal1.Text = Literal1.Text + "<li style=padding-bottom:10px;>" + dt.table.Rows[i]["Header"].ToString() + "<span class='spa' style=padding-left:10px;color:" + dt.table.Rows[i]["color"].ToString() + ">" + dt.table.Rows[i]["Publish_Date"].ToString() + "</span>" + "</li>";
                            }
                        }
                    }
                }


                //Literal1.Text = Literal1.Text + "</div></div><div style=\"color:black; padding-left:400px; padding-top:310px;\"> <a href=\"../district_dmf/Notice_All.aspx\"  Target=\"_new\" >Show All Notice</a></div></div>";
                Literal1.Text = Literal1.Text + "</div>";

                //Literal1.Text = Literal1.Text + "</div></div></div>";
            }
        }

        catch
        {
        }
    }