protected void Page_Load(object sender, EventArgs e) { facade = new BusinessLogic.BusinessFacade(myConnStr); if(Request.Params["aId"]==null){ Page.ClientScript.RegisterClientScriptBlock(GetType(),"","<script>alert('There is no article!')</script>"); return; } BusinessLogic.Facade.Intership.Intership _intership = BusinessLogic.Facade.Intership.Intership.getIntershipById(Convert.ToInt32(Request.Params["aId"].ToString())); if (_intership == null) { Page.ClientScript.RegisterClientScriptBlock(GetType(), "", "<script>alert('There is no article as you request!')</script>"); return; } liPageHeader.Text = _intership.ArticleName; aHeader.Text = _intership.ArticleName; aContent.Text = _intership.ArticleContent; liCreatedDate.Text = Convert.ToDateTime(_intership.CreatedDate).ToShortDateString(); }
protected void Page_Load(object sender, EventArgs e) { facade = new BusinessLogic.BusinessFacade(myConn); Intership intership = new Intership(); //repeater_tabs.DataSource = Intership.GetAll(); //repeater_tabs.DataBind(); repeater_Content.DataSource = repeater_tabs.DataSource; repeater_Content.DataBind(); //File reader string filepath = Server.MapPath("~/UserData/template/Preparation.txt"); if (File.Exists(filepath)) { StreamReader reader = new StreamReader(filepath); literal_stickyText.Text = reader.ReadToEnd().Replace(Environment.NewLine, "<br />"); } if (User.IsInRole("superadmin") || User.IsInRole("admin")) { pnl_ApplyAdd.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { try { ass = Assembly.Load("App_GlobalResources"); rm = new ResourceManager("Resources.Resource", ass); facade = new BusinessLogic.BusinessFacade(myConn); Form.DefaultButton = btn_Post.UniqueID; //File reader string filepath = Server.MapPath("~/UserData/template/HiringAdvice.txt"); if (File.Exists(filepath)) { StreamReader reader = new StreamReader(filepath); literal_stickyText.Text = reader.ReadToEnd().Replace(Environment.NewLine, "<br />"); } if (Request.Params["cateid"] != null && Request.Params["cateindex"] != null) { currentId = Convert.ToInt16(Request.Params["cateid"].ToString()); currentIndex = Convert.ToInt16(Request.Params["cateindex"].ToString()); } else { currentIndex = 0; currentId = facade.GetFirstCateId(); } repeater_tabs.DataSource = facade.view_HiringAdvice_Category(); repeater_tabs.DataBind(); repeater_Content.DataSource = facade.view_HiringAdvice(currentId); repeater_Content.DataBind(); txt_Detail.Attributes.Add("onkeydown", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_Detail.Attributes.Add("onkeyup", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_Detail.Attributes.Add("onmousedown", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_Detail.Attributes.Add("onmouseup", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_Detail.Attributes.Add("onblur", "textCounter(this,'" + Label1.ClientID + "', 5000)"); } catch (Exception ex) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "PopopScript", "<script>alert('"+ex.Message+"');</script>"); //Response.Redirect(Request.RawUrl.ToString()); } }
protected void Page_Load(object sender, EventArgs e) { facade = new BusinessLogic.BusinessFacade(myConn); CollectionPager1.MaxPages = 10000; CollectionPager1.PageSize = 5; CollectionPager1.DataSource = facade.View_TestimonialArticle(); CollectionPager1.BindToControl = repeater_Content; repeater_Content.DataSource = CollectionPager1.DataSourcePaged; repeater_Content.DataBind(); //File reader string filepath = Server.MapPath("~/UserData/template/Testimonial.txt"); if (File.Exists(filepath)) { StreamReader reader = new StreamReader(filepath); literal_stickyText.Text = reader.ReadToEnd().Replace(Environment.NewLine, "<br />"); } //Limit input characters txt_body.Attributes.Add("onkeydown", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_body.Attributes.Add("onkeyup", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_body.Attributes.Add("onmousedown", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_body.Attributes.Add("onmouseup", "textCounter(this,'" + Label1.ClientID + "', 5000)"); txt_body.Attributes.Add("onblur", "textCounter(this,'" + Label1.ClientID + "', 5000)"); }
protected void Page_Load(object sender, EventArgs e) { empUniqueId = Request.Params["eid"].ToString(); empLogic = new BusinessLogic.Facade.Employer.EmployerLogic(myConn); mu = Membership.GetUser(new Guid(empUniqueId)); DataSet dataset = empLogic.GetEmployerInfo(empUniqueId); tbl_EmpInfo = dataset.Tables["tbl_EmpInfo"]; title.Text = tbl_EmpInfo.Rows[0][3].ToString(); objList = new List<objValue>(); if (tbl_EmpInfo.Rows[0][14].ToString().Trim() != "" && tbl_EmpInfo.Rows[0][14].ToString().Trim() != null) { objList.Add(new objValue("<b>School type: </b>",tbl_EmpInfo.Rows[0][6].ToString() + "<br />" + tbl_EmpInfo.Rows[0][14].ToString())); } else { objList.Add(new objValue("<b>School type: </b>",tbl_EmpInfo.Rows[0][6].ToString())); } if (tbl_EmpInfo.Rows[0][10].ToString().Trim() == "" || tbl_EmpInfo.Rows[0][10].ToString().Trim() == null) { objList.Add(new objValue("<b>From: </b>",tbl_EmpInfo.Rows[0][11].ToString())); } else { objList.Add(new objValue("<b>From: </b>", tbl_EmpInfo.Rows[0][10].ToString() + " - " + tbl_EmpInfo.Rows[0][11].ToString())); } addToList("Address", 7); addToList("Phone", 9); addToList("Fax number", 8); addToList("Zip code", 12); addToList("Contact", 0); objList.Add(new objValue("<b>Website: </b>", "<a href='http://" + tbl_EmpInfo.Rows[0][5].ToString() + "'>" + tbl_EmpInfo.Rows[0][5].ToString() + "</a>")); //string info_EmpPhone = tbl_EmpInfo.Rows[0][1].ToString(); //string info_PersonalImage = tbl_EmpInfo.Rows[0][2].ToString(); //string info_Website = tbl_EmpInfo.Rows[0][5].ToString(); //hpl_OrgWebsite.Text = info_Website; //hpl_OrgWebsite.NavigateUrl = "http://" + info_Website; Repeater_Info.DataSource = objList; Repeater_Info.DataBind(); //li_postedjob_heading.Text = "Jobs which was posted by " + title.Text; BusinessLogic.BusinessFacade facade = new BusinessLogic.BusinessFacade(myConn); var list = facade.GetPostedJobByUser(empUniqueId); if (list.Count!=0) { Repeater_PostedJob.DataSource = list; Repeater_PostedJob.DataBind(); } else { literal_postedJobInform.Text = "This employer has posted no job."; } var list2 = TrainingCourseLogic.GetCoursesByEmployer(mu.ProviderUserKey.ToString()); if (list2.Count != 0) { Repeater_TrainingCourse.DataSource = list2; Repeater_TrainingCourse.DataBind(); } else { literal_courseInform.Text = "This employer has posted no training course."; } }
protected void Page_Load(object sender, EventArgs e) { facade = new BusinessLogic.BusinessFacade(myConn); repeater_tabs.DataSource = facade.view_HiringAdvice_Category(); repeater_tabs.DataBind(); repeater_Content.DataSource = null; repeater_Content.DataBind(); //File reader string filepath = Server.MapPath("~/UserData/template/HiringAdvice.txt"); if (File.Exists(filepath)) { StreamReader reader = new StreamReader(filepath); literal_stickyText.Text = reader.ReadToEnd().Replace(Environment.NewLine, "<br />"); } }