protected void btn_add_Click_more(object sender, EventArgs e) { try { NewsGroup newsgroup = ReceiveHtml(); NewsGroupBSO newsgroupBSO = new NewsGroupBSO(); int _newsgroupID = newsgroupBSO.CreateNewsGroupGet(newsgroup); //Add NewsCate add_NewsCate(_newsgroupID); NewsLogBSO newsLogBSO = new NewsLogBSO(); NewsLog _newsLog = newsLogBSO.GetNewsLog(newsgroup, Session["Admin_UserName"].ToString(), DateTime.Now, 0); int _newsLogID = newsLogBSO.CreateNewsLog(_newsLog); clientview.Text = "<div class='alert alert-sm alert-danger bg-gradient'>Thêm mới thành công !</div>"; AspNetCache.Reset(); } catch (Exception ex) { clientview.Text = ex.Message.ToString(); } }
protected void btn_add_Click(object sender, EventArgs e) { try { NewsGroup newsgroup = ReceiveHtml(); NewsGroupBSO newsgroupBSO = new NewsGroupBSO(); int _newsgroupID = newsgroupBSO.CreateNewsGroupGet(newsgroup); add_NewsCate(_newsgroupID); NewsLogBSO newsLogBSO = new NewsLogBSO(); NewsLog _newsLog = newsLogBSO.GetNewsLog(newsgroup, Session["Admin_UserName"].ToString(), DateTime.Now, 0); int _newsLogID = newsLogBSO.CreateNewsLog(_newsLog); clientview.Text = "<div class='alert alert-sm alert-danger bg-gradient'>Thêm mới thành công !</div>"; initControl(_newsgroupID); AspNetCache.Reset(); ViewNewsLog(_newsgroupID); //Response.Redirect("~/Admin/Group/listnewsgroup/" + hddGroup.Value + "/Default.aspx"); } catch (Exception ex) { clientview.Text = ex.Message.ToString(); } }
protected void btn_add_Click(object sender, EventArgs e) { try { NewsGroup newsgroup = ReceiveHtml(); NewsGroupBSO newsgroupBSO = new NewsGroupBSO(); // MessageBox.Show(); //if (Tool.CountWords2(Tool.StripTagsCharArray(newsgroup.ShortDescribe)) > 60) //{ // String csname = "PopupScript"; // Type cstype = this.GetType(); // ClientScriptManager cs = Page.ClientScript; // if (!cs.IsStartupScriptRegistered(cstype, csname)) // { // String cstext = "Confirmation();"; // cs.RegisterStartupScript(cstype, csname, cstext, true); // } // if (hnd.Value != "") // { int _newsgroupID = newsgroupBSO.CreateNewsGroupGet(newsgroup); //Add NewsCate add_NewsCate(_newsgroupID); NewsLogBSO newsLogBSO = new NewsLogBSO(); NewsLog _newsLog = newsLogBSO.GetNewsLog(newsgroup, Session["Admin_UserName"].ToString(), DateTime.Now, 0); int _newsLogID = newsLogBSO.CreateNewsLog(_newsLog); clientview.Text = "<div class='alert alert-sm alert-danger bg-gradient'>Thêm mới thành công !</div>"; initControl(_newsgroupID); AspNetCache.Reset(); ViewNewsLog(_newsgroupID); //Response.Redirect("~/Admin/Group/listnewsgroup/" + hddGroup.Value + "/Default.aspx"); } catch (Exception ex) { clientview.Text = ex.Message.ToString(); } }