protected void btn_add_Click_more(object sender, EventArgs e) { try { CateNews catenews = ReceiveHtml(); CateNewsBSO catenewsBSO = new CateNewsBSO(); int catenews1 = catenewsBSO.CreateCateNewGet(catenews); if (!Session["Admin_UserName"].ToString().Equals("administrator")) { AdminRolesBSO adminRolesBSO = new AdminRolesBSO(); DataTable table = adminRolesBSO.GetAdminRolesByUserName(Session["Admin_UserName"].ToString()); CateNewsPermissionBSO catenewPermissionBSO = new CateNewsPermissionBSO(); CateNewsPermission cateNewsPermission = new CateNewsPermission(); if (table.Rows.Count > 0) { foreach (DataRow subrow in table.Rows) { cateNewsPermission.CateNewsID = catenews1; cateNewsPermission.RolesID = Convert.ToInt32(subrow["RolesID"].ToString()); //cateNewsPermission.Permission = subrow["Permission"].ToString(); cateNewsPermission.Permission = ""; cateNewsPermission.UserName = Session["Admin_UserName"].ToString(); cateNewsPermission.Created = DateTime.Now; cateNewsPermission.Language = Language.language; catenewPermissionBSO.CreateCateNewsPermission(cateNewsPermission); } } } clientview.Text = "<div class='alert alert-sm alert-danger bg-gradient'>Thêm mới thành công !</div>"; ViewCateGroup(Convert.ToInt32(HddGroupCate.Value)); AspNetCache.Reset(); } catch (Exception ex) { clientview.Text = ex.Message.ToString(); } }