Exemple #1
0
        /// <summary>
        /// Format Text
        /// </summary>
        public string FormatText(object o)
        {
            Utility Util = new Utility();

            string formattxt = Util.FormatText(Convert.ToString(o));
            Util = null;
            return formattxt;
        }
Exemple #2
0
        public void AddFeed(short state)
        {
            Feed feed = new Feed();
            Utility Util = new Utility();
            feed.Author = "Administrator";
            foreach (sCategory cat in constant.FeedCategory)
            {
                if(cat.Name == "JOBS")
                    feed.CategoryID = cat.ID;
            }

            feed.Title = Util.FormatTextForInput(Request.Form[JobTitle.UniqueID]);
            feed.Link = constant.JobsPageBase + Util.FormatTextForInput(Request.Form[JobLink.UniqueID]);

            string tmp = "";
            GenerateSummary(ref tmp);
            testsummary.Text = tmp;
            feed.Summary = tmp;
            //feed.
            GenerateDetails(ref tmp);
            testdetails.Text = tmp;
            feed.Description = tmp;

            feed.isValid = state;
            feed.DisplayIn = "-1";

            SummaryPreview.Visible = true;
            DetailPreview.Visible = true;

            if ((state == 1) || (state == 2))
            {
                FeedRepository feedrep = new FeedRepository();
                if (feedrep.isFeedLinkDuplicate(feed.Link, feed.CategoryID) == 0)
                {
                    feedrep.Add(feed);
                }
                else
                {
                    lblWarningMessage.Visible = true;
                    lblWarningMessage.Text = "Error!! FeedLink is Duplicate";
                }
                feedrep = null;
            }

            Util = null;
            feed = null;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //Populate year in the dropdwonlist - starting from 2000 to the current year.

                lblrecordperpageFooter.Text = "Showing default 40 records per page";

                //Set the default pagesize.
                dgrd_announcement.PageSize = 40;

                //Data binding
                BindData();

                //Release allocated memory
                Util = null;
            }
        }
Exemple #4
0
        /// <summary>
        /// Get Feed title, author, date, hits, summmary, description etc from feed id
        /// </summary>
        public override void FillUp(int ID)
        {
            Utility Util = new Utility();

            try
            {
                IDataReader dr = Blogic.ActionProcedureDataProvider.GetFeedDetails(ID);
                if (dr.Read())
                {
                    //dr.Read();
                    //Feed item = new Feed();
                    if (dr["Title"] != DBNull.Value)
                    {
                        this.Title = (string)dr["Title"];
                    }

                    this.FeedID = ID;

                    if (dr["Title"] != DBNull.Value)
                    {
                        this.Title = (string)dr["Title"];
                    }
                    if (dr["Author"] != DBNull.Value)
                    {
                        this.Author = (string)dr["Author"];
                    }
                    if (dr["Description"] != DBNull.Value)
                    {
                        this.Description = (string)dr["Description"];
                    }
                    if (dr["Summary"] != DBNull.Value)
                    {
                        this.Summary = (string)dr["Summary"];
                    }
                    if (dr["Link"] != DBNull.Value)
                    {
                        this.Link = (string)dr["Link"];
                    }
                    if (dr["Category"] != DBNull.Value)
                    {
                        this.CategoryID = (int)dr["Category"];
                    }
                    if (dr["DatePublished"] != DBNull.Value)
                    {
                        this.DatePublised = (DateTime)dr["DatePublished"];
                    }
                    if (dr["isValid"] != DBNull.Value)
                    {
                        this.isValid = Int16.Parse(dr["isValid"].ToString());
                    }
                    if (dr["DisplayIn"] != DBNull.Value)
                    {
                        this.DisplayIn = (string)dr["DisplayIn"];
                    }

                }

                dr.Close();
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //Get total article count
            ArticleCount = 10;// Blogic.ActionProcedureDataProvider.ArticleCountAll;

            //Assign selected value to lastviewed dropdown menu
            int lv = (int)Util.Val(Request.QueryString["lv"]);
            GetLastViewedSelectedValue(lv);

            if (!IsPostBack)
            {
                //Populate year in the dropdwonlist - starting from 2000 to the current year.
                int tempDT = DateTime.Now.Year;
                for (int i = tempDT; (tempDT - i) < 9; i--)
                    ddlyear.Items.Add(new ListItem(i.ToString(), i.ToString()));

                MonthSearch();

                //Populate dropdown category list
                GetDropdownCategoryList();

                //Display A-Z alhpabet letter announcement name
                lblalphaletter.Text = AlphabetLink.BuildLink("feedmanager.aspx?l=", "dlet", "Browse all announcement starting with letter", "&nbsp;&nbsp;");

                //Get admin username from the sessioan variable and place it in the label.

                lblletterlegend.Text = "Announcement A-Z:";
                lblunapproved2.Visible = false;
                lblmangermainpage.Text = "Default View";
                lblmangeraddpagelink.Text = "Add Feed";
                lblmangermainpagelink.ToolTip = "Back to Default View";
                lbCountAnnouncement.Text = "Total Approved Announcements:&nbsp;";// +string.Format("{0:#,###}", Blogic.ActionProcedureDataProvider.GetHomepageTotalAnnouncementCount);
                lbCountCat.Text = "Total Category:&nbsp;";// +Blogic.ActionProcedureDataProvider.GetHomepageTotalCategoryCount;
                lblunapproved.Text = "Deactivated Feeds:&nbsp;";// +Blogic.ActionProcedureDataProvider.AdminAnnouncementManagerGetWaitingforApprovalCount;
                lblsaved.Text = "Saved Feeds:&nbsp;";
                //lblrecordperpage.Text = "Default 40 records per page";
                lblrecordperpageFooter.Text = "Showing default 40 records per page";
                lblrecordperpageTop.Text = "- 40 records per page";
                approvallink.ToolTip = "There are (";// +Blogic.ActionProcedureDataProvider.AdminAnnouncementManagerGetWaitingforApprovalCount + ") announcements waiting for your approval. Click this link to approve the announcement";

                //Data binding
                /*BindData();

                LastUpdatedAnnouncements.DataSource = Blogic.ActionProcedureDataProvider.GetLast10UpdatedAnnouncement;
                LastUpdatedAnnouncements.DataBind();
                */
                //Release allocated memory
                Util = null;
            }
        }
Exemple #6
0
        /// <summary>
        /// Admin section username and password validation.
        /// </summary>
        public static void IsAdminAuthenticated()
        {
            Utility Util = new Utility();

            if (!CookieLoginHelper.IsLoginAdminSessionExists)
            {
                //Redirect to admin login page.
                Util.PageRedirect(6);
            }

            Util = null;
        }
Exemple #7
0
        public void GenerateDetails(ref string detailtags)
        {
            Utility Util = new Utility();
            detailtags = "<div class=\"jobDetail unit\">" + "<ul> <li>";
            string tmp = "";
            GenerateTableTags(ref tmp, tbldtl);
            if (tmp.Length != 0)
            {
                detailtags += "<h5>" + Util.FormatTextForInput(Request.Form[DetailTbl.UniqueID]) + "</h5>";
                detailtags += tmp;
                detailtags += "<br />";
            }

            tmp = "";
            GenerateTableTags(ref tmp, tbldtl2);
            if (tmp.Length != 0)
            {
                detailtags += "<h5>" + Util.FormatTextForInput(Request.Form[Detail2Tbl.UniqueID]) + "</h5>";
                detailtags += tmp;
                detailtags += "<br />";
            }

            detailtags += "<p><h5>How To Apply: </h5>" + Util.FormatTextForInput(Request.Form[HowToApply.UniqueID]) + "</p>";
            detailtags += "<br />";

            tmp = "";
            GenerateTableTags(ref tmp, tblimpdate);
            if (tmp.Length != 0)
            {
                detailtags += "<h5>" + Util.FormatTextForInput(Request.Form[ImpDatesTbl.UniqueID]) + "</h5>";
                detailtags += tmp;
                detailtags += "<br />";
            }

            detailtags += "<p><h5>How To Prepare: </h5>" + Util.FormatTextForInput(Request.Form[HowToPrepare.UniqueID]) + "</p>";
            detailtags += "<br />";

            tmp = "";
            GenerateTableTags(ref tmp, tblpaidtest);
            if (tmp.Length != 0)
            {
                detailtags += "<h5>" + Util.FormatTextForInput(Request.Form[PaidTestTbl.UniqueID]) + "</h5>";
                detailtags += tmp;
                detailtags += "<br />";
            }

            tmp = "";
            GenerateTableTags(ref tmp, tblfreetest);
            if (tmp.Length != 0)
            {
                detailtags += "<h5>" + Util.FormatTextForInput(Request.Form[FreeTestTbl.UniqueID]) + "</h5>";
                detailtags += tmp;
                detailtags += "<br />";
            }

            detailtags +=
                "</li></ul>";
        }
Exemple #8
0
        public void GenerateSummary(ref string summarytags)
        {
            Utility Util = new Utility();
            summarytags = "<div class=\"jobDetail unit\">" +
                    "<table width=\"80%\" border=\"0\"><tr><td align=\"left\"><img src=" + "\"" + Util.FormatTextForInput(Request.Form[logoimg.UniqueID]) + "\"" + "runat=\"server\"" + "/ ><td align=\"right\">" + Util.FormatTextForInput(Request.Form[LastDate.UniqueID]) + "</tr></table> <br /><br /><br />" +
                    "<ul> <li> <table width=\"80%\"> " +
                    "<tr> <td class=\"txt\" width=\"40%\" align=\"left\"><b>Eligibility: </b>" + "<td class=\"txt\" width=\"60%\" align=\"left\">" + Util.FormatTextForInput(Request.Form[Eligiblity.UniqueID]) +
                    "<tr> <td class=\"txt\" width=\"40%\" align=\"left\"><b>Location: </b>" + "<td class=\"txt\" width=\"60%\" align=\"left\">" + Util.FormatTextForInput(Request.Form[Location.UniqueID]) +
                    "<tr> <td class=\"txt\" width=\"40%\" align=\"left\"><b>Job Category: </b>" + "<td class=\"txt\" width=\"60%\" align=\"left\">" + Util.FormatTextForInput(Request.Form[JobCategory.UniqueID]) +
                    "<tr> <td class=\"txt\" width=\"40%\" align=\"left\"><b>Last Date: </b>" + "<td class=\"txt\" width=\"60%\" align=\"left\">" + Util.FormatTextForInput(Request.Form[LastDate.UniqueID]) +
                    "<tr> <td class=\"txt\" width=\"40%\" align=\"left\"><b>Job Type: </b>" + "<td class=\"txt\" width=\"60%\" align=\"left\">" + Util.FormatTextForInput(Request.Form[JobType.UniqueID]) +
                    "<tr> <td class=\"txt\" width=\"40%\" align=\"left\"><b>Hiring Process: </b>" + "<td class=\"txt\" width=\"60%\" align=\"left\">" + Util.FormatTextForInput(Request.Form[HiringProcess.UniqueID]) +
                    "</table>";

            string tmp = "";
            GenerateTableTags(ref tmp, tblsmmry);
            if (tmp.Length != 0)
            {
                summarytags += "<br />";
                summarytags += "<h5>" + Util.FormatTextForInput(Request.Form[SummaryTbl.UniqueID]) + "</h5>";
                summarytags += tmp;
            }

            summarytags += "</li></ul></div>";
        }