private void InitializePage() { if (!string.IsNullOrEmpty(Request.QueryString["ID"])) { RECid = Convert.ToInt16(Request.QueryString["ID"]); ABOUTUSCOUNTER item = DALAboutUsCounter.Get(RECid); if (item != null) { hdnDescription.Value = Server.HtmlDecode(item.MAINTEXT); txtTitle.Text = item.TITLE; btnSave.Text = "Güncelle"; } } }
protected void btnSave_Click(object sender, EventArgs e) { if (ValidateItem()) { ABOUTUSCOUNTER rec = new ABOUTUSCOUNTER(); if (RECid > 0) { rec = DALAboutUsCounter.Get(RECid); rec.MAINTEXT = Server.HtmlEncode(hdnDescription.Value); rec.TITLE = txtTitle.Text; DALAboutUsCounter.Update(rec); } ScriptManager.RegisterStartupScript(Page, Page.GetType(), "ClosePage", "CloseModal(true);", true); } }
private void fillAbout() { rptrAbout.Bind(DALAboutUs.GetAll().OrderBy(p => p.ID)); lblCountAboutUs.Text = "(" + rptrAbout.Items.Count.ToString() + ")"; foreach (RepeaterItem item in rptrAbout.Items) { HiddenField hdn = item.FindControl("hdnImage") as HiddenField; Image img = item.FindControl("imgImage") as Image; img.ImageUrl = Functions.SITEURL.PathAndQuery + "Admin/assets/images/" + hdn.Value + "_s.jpg"; img.Width = new Unit(GetPrameterValue("SLIDERADMINWIDTH")); img.Height = new Unit(GetPrameterValue("SLIDERADMINHEIGHT")); } rptrCounter.Bind(DALAboutUsCounter.GetAll().OrderBy(p => p.ID)); lblCountCounter.Text = "(" + rptrCounter.Items.Count.ToString() + ")"; }