protected void Page_Load(object sender, EventArgs e) { if (id == "" || id == null || id == string.Empty) { Response.Redirect(Globals.URLCurrent + "footer.aspx"); } footter = new footter(); string[] sUrlSetEditor = { UrlSetEditor }; if (!this.IsPostBack) { // Set Editor Globals.CKEditor(txtContent12); imgIconHeader.ImageUrl = Globals.UrlImages + "icon_menu1.gif"; ltlHeader.Text = Language.GetTextByID(343); tbxTitle.Attributes.Add("style", "width:300px"); ltlContent.Text = Language.GetTextByID(35); ltlHeader.Text = Language.GetTextByID(29); ltlPublishDate.Text = Language.GetTextByID(156); ltlRequireTitle.Text = Language.GetTextByID(30); ltlRequireContent.Text = Language.GetTextByID(36); DataRow dr = footter.GetInfo(id); if (dr == null) { Response.Redirect(Globals.URLCurrent + "footer.aspx"); } tbxTitle.Text = dr["title"].ToString(); txtContent12.Text = dr["footertext"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { footter = new footter(); string[] sUrlSetEditor = { UrlSetEditor }; // Set Editor if (!this.IsPostBack) { Globals.CKEditor(txtContent); dt = footter.Searchinh(2); rptNews.DataSource = dt; rptNews.DataBind(); if (dt != null) { ltlTotal1.Text = string.Format(Language.GetTextByID(205), dt.Rows.Count); } imgIconHeader.ImageUrl = Globals.UrlImages + "icon_menu1.gif"; ltlHeader.Text = Language.GetTextByID(343); tbxTitle.Attributes.Add("style", "width:300px"); ltlContent.Text = Language.GetTextByID(35); ltlTitle.Text = Language.GetTextByID(29); ltlPublishDate.Text = Language.GetTextByID(156); ltlRequireTitle.Text = Language.GetTextByID(30); ltlRequireContent.Text = Language.GetTextByID(36); // dua du lieu len tren rptnew; lbTaoMoi.Text = "<B>" + Language.GetTextByID(344) + "</B>"; ltlDanhSach.Text = "<B>" + Language.GetTextByID(345) + "</B>"; } }
protected void btnRegister_Click(object sender, EventArgs e) { if (tbxTitle.Text == "") { ltlRequireTitle.Visible = true; return; } else { ltlRequireTitle.Visible = false; } if (txtContent.Text == "") { ltlRequireContent.Visible = true; return; } else { ltlRequireContent.Visible = false; } string Title = tbxTitle.Text.ToString(); string created = rdpPublishDate.SelectedDate.ToString("yyyy-MM-dd HH:mm:ss"); footter = new footter(); footter.Inser(Title, txtContent.Text.Trim(), created); Response.Redirect(Globals.UrlRoot + "temp.aspx?url=" + Request.Url); }
private void lbtOnline_Click(object sender, System.EventArgs e) { LinkButton lbtOnline = (LinkButton)sender; if (lbtOnline.CommandArgument != String.Empty) { string id = lbtOnline.CommandArgument.ToString(); footter = new footter(); footter.SetStatus(id); Response.Redirect(Globals.UrlRoot + "temp.aspx?url=" + Request.Url); } }
protected void BtDelete_Click(object sender, EventArgs e) { footter = new footter(); string id = string.Empty; foreach (RepeaterItem items in rptNews.Items) { CheckBox checkboxID = (CheckBox)items.FindControl("checkboxID"); if (checkboxID.Checked) { Literal ltlIDNews = (Literal)items.FindControl("ltlIDNews"); id = ltlIDNews.Text.Trim(); footter.Delete(id); } } Response.Redirect(Globals.UrlRoot + "temp.aspx?url=" + Request.Url); }
protected void btnRegister_Click(object sender, EventArgs e) { footter = new footter(); if (tbxTitle.Text == "") { ltlRequireTitle.Visible = true; return; } else { ltlRequireTitle.Visible = false; } if (txtContent12.Text == "") { ltlRequireContent.Visible = true; return; } else { ltlRequireContent.Visible = false; } footter.UpDate(id, tbxTitle.Text.Trim(), txtContent12.Text.Trim()); Response.Redirect(Globals.URLCurrent + "footer.aspx"); }