protected void gvwNews_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e) { int topicId = 0; topicId = Convert.ToInt32(e.CommandArgument); this.TopicId = topicId; if (e.CommandName == "cmdEdit") { SetControlName(GetNewById(topicId)); // TabContainer1.ActiveTab = 0; //btn.Visible = false; } if (e.CommandName == "cmdelete") { newsbal.DeleteNewsLetter(topicId, "Admin", DateTime.Now); BindNewsLetter(); Cancel(); } if (e.CommandName == "cmdDetails") { //pnlDetails.Visible = true; ModalPopupExtender2.Show(); } }
protected void gvwNews_RowCommand(object sender, System.Web.UI.WebControls.GridViewCommandEventArgs e) { int topicId = 0; topicId = Convert.ToInt32(e.CommandArgument); var id = topicId; this.TopicId = id; List <NewsLetterDom> lstNews = new List <NewsLetterDom>(); if (e.CommandName == "cmdEdit") { NewsLetterDom newsDom = new NewsLetterDom(); SetControlName(GetNewById(topicId)); string imageName = newsDom.ImageName; newsDom = newsbal.ReadNewsLetterByImage(topicId, imageName); lstNews.Add(newsDom); string Name = lstNews[0].ImageName; if (lstNews.Count > 0 && Name != null) { grvw_image.DataSource = lstNews; grvw_image.DataBind(); } else { grvw_image.DataSource = null; grvw_image.DataBind(); } // grvw_image.Visible = true; TabContainer1.ActiveTabIndex = 0; btnUpdate.Visible = true; btnSave.Visible = false; Session["f"] = lstNews; } if (e.CommandName == "cmdelete") { newsbal.DeleteNewsLetter(topicId, "Admin", DateTime.Now); BindNewsLetter(); Cancel(); } if (e.CommandName == "cmdDetails") { SetControlName(GetNewById(topicId)); ModalPopupExtender2.Show(); Cancel(); } }
protected void gvwNews_RowCommand(object sender, GridViewCommandEventArgs e) { int topicId = 0; topicId = Convert.ToInt32(e.CommandArgument); this.TopicId = topicId; if (e.CommandName == "cmdEdit") { SetControlName(GetNewById(topicId)); btn.Visible = false; } if (e.CommandName == "cmdelete") { newsbal.DeleteNewsLetter(topicId, "Admin", DateTime.Now); BindNewsLetter(); } }