protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.RouteData.Values["dll"] != null)
                NavigationTitle(Page.RouteData.Values["dll"].ToString());

            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

            if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
            {
                btn_editpage.Visible = true;
                btn_enable.Visible = true;
                btn_disable.Visible = true;
                btn_delall.Visible = true;

            }
            else
            {
                btn_editpage.Visible = false;
                btn_enable.Visible = false;
                btn_disable.Visible = false;
                btn_delall.Visible = false;
            }

            if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
            {
                btn_enable_approval.Visible = true;
                btn_disable_approval.Visible = true;

            }
            else
            {
                btn_enable_approval.Visible = false;
                btn_disable_approval.Visible = false;
            }

            int group = 0;
            if (!String.IsNullOrEmpty(Page.RouteData.Values["group"].ToString()))
                if (!int.TryParse(Page.RouteData.Values["group"].ToString().Replace(",", ""), out group))
                    Response.Redirect("~/Admin/home/Default.aspx");

            if (group == 0)
                Response.Redirect("~/Admin/home/Default.aspx");
            else
            {
                hddGroup.Value = Convert.ToString(group);

                if (!IsPostBack)
                {

                    ViewCompany(group);

                }
            }


        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.RouteData.Values["dll"] != null)
                NavigationTitle(Page.RouteData.Values["dll"].ToString());

            int group = 0;
            if (!String.IsNullOrEmpty(Page.RouteData.Values["group"].ToString()))
                int.TryParse(Page.RouteData.Values["group"].ToString().Replace(",", ""), out group);
            hddGroup.Value = Convert.ToString(group);

            int Id = -1;
            if (Page.RouteData.Values["Id"] != null)
                int.TryParse(Page.RouteData.Values["Id"].ToString().Replace(",", ""), out Id);

            hddNewsID.Value = Convert.ToString(Id);

            //  ltllistnews.Text = "<asp:HyperLink ID='btn_listnews' runat='server' NavigateUrl='~/Homepage.aspx?dll=" + ((group == 1) ? "listnews" : "listannounce") + "'><img src='Admin_Theme/Icons/icon-danhsach.gif' /></asp:HyperLink>";
            //  ltleditcomment.Text = "<asp:HyperLink ID='btn_editnewscomment' runat='server' NavigateUrl='~/Homepage.aspx?dll=editnewscomment&group=" + Convert.ToString(group) + "' ><img src='Admin_Theme/Icons/icon-taomoi-small.gif' /></asp:HyperLink>";

            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

            if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
            {
                btn_editpage.Visible = true;

                btn_delall.Visible = true;

            }
            else
            {
                btn_editpage.Visible = false;

                btn_delall.Visible = false;
            }

            if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
            {
                btn_enable.Visible = true;
                btn_disable.Visible = true;

            }
            else
            {
                btn_enable.Visible = false;
                btn_disable.Visible = false;
            }


            if (!IsPostBack)
                NewsCommentView(group);
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.RouteData.Values["dll"] != null)
                NavigationTitle(Page.RouteData.Values["dll"].ToString());
            string group = "";
            if (!String.IsNullOrEmpty(Page.RouteData.Values["group"].ToString()))
                group = Page.RouteData.Values["group"].ToString();

            hddGroup.Value = group;

            int Id = -1;
            if (Page.RouteData.Values["Id"] != null)
                int.TryParse(Page.RouteData.Values["Id"].ToString().Replace(",", ""), out Id);
            hddPageID.Value = Convert.ToString(Id);

            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

            if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
            {
                btn_editpage.Visible = true;

                btn_delall.Visible = true;

            }
            else
            {
                btn_editpage.Visible = false;

                btn_delall.Visible = false;
            }

            if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
            {
                btn_enable.Visible = true;
                btn_disable.Visible = true;

            }
            else
            {
                btn_enable.Visible = false;
                btn_disable.Visible = false;
            }

            if (!IsPostBack)
                PageCommentView(group);
        }
Exemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Page.RouteData.Values["dll"] != null)
                NavigationTitle(Page.RouteData.Values["dll"].ToString());
            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

            if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
            {
                btn_editpage.Visible = true;
                btn_enable.Visible = true;
                btn_disable.Visible = true;
                btn_delall.Visible = true;

            }
            else
            {
                btn_editpage.Visible = false;
                btn_enable.Visible = false;
                btn_disable.Visible = false;
                btn_delall.Visible = false;
            }

            if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
            {
                btn_enable_approval.Visible = true;
                btn_disable_approval.Visible = true;

            }
            else
            {
                btn_enable_approval.Visible = false;
                btn_disable_approval.Visible = false;
            }


            if (!IsPostBack)
            {
                string group = "1";
                PagesView(group);
                hddGroup.Value = group;
            }
        }
Exemplo n.º 5
0
        protected void grvPageComment_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int Id = Convert.ToInt32(e.CommandArgument.ToString());
            string cName = e.CommandName.ToLower();
            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            switch (cName)
            {
                case "_view":
                    break;
                case "_edit":
                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
                    {
                        Response.Redirect("~/Admin/editpagecomment/" + Id + "/Default.aspx");

                    }
                    else
                    {
                        //  Response.Redirect("~/Homepage.aspx?dll=listnews");
                    }

                    break;
                case "_delete":
                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
                    {
                        PageCommentBSO pageCommentBSO = new PageCommentBSO();
                        pageCommentBSO.DeletePageComment(Id);
                        PageCommentView(hddGroup.Value);

                    }
                    else
                    {
                        //  Response.Redirect("~/Homepage.aspx?dll=listnews");
                    }

                    break;
            }
        }
Exemplo n.º 6
0
        protected void grvOfficial_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                ImageButton image_del = (ImageButton)e.Row.FindControl("btn_delete");
                //    image_del.Attributes.Add("onclick", "return confirm('Bạn có chắc chắn muốn xóa?');");

                ImageButton image_view = (ImageButton)e.Row.FindControl("btn_view");
                image_view.Attributes.Add("onclick", "javascript:window.open('~/Client/Admin/ViewOfficial.aspx?Id=" + DataBinder.Eval(e.Row.DataItem, "OfficialID") + "','_blank','width=800,height=600');");

                ImageButton image_edit = (ImageButton)e.Row.FindControl("btn_edit");

                AdminBSO adminBSO = new AdminBSO();
                ETO.Admin admin = new ETO.Admin();
                admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
                {
                    image_del.Attributes.Add("onclick", "javascript:return confirm('Bạn có muốn chắc chắn xóa ???');");
                }
                else
                {
                    image_edit.Attributes.Add("onclick", "javascript:return confirm('Bạn không có đủ quyền ???');");
                    image_del.Attributes.Add("onclick", "javascript:return confirm('Bạn không có đủ quyền ???');");
                }
            }
        }
Exemplo n.º 7
0
        protected void grvOfficial_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            int Id = Convert.ToInt32(e.CommandArgument.ToString());
            string cName = e.CommandName.ToLower();
            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            switch (cName)
            {
                case "_listfiles":
                    Response.Redirect("~/Admin/listofficialfiles/" + Id + "/Default.aspx");
                    break;

                case "_addfiles":
                    Response.Redirect("~/Admin/editofficialfiles/" + Id + "/0/Default.aspx");
                    break;


                case "_view":
                    break;

                case "_edit":
                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
                    {
                        Response.Redirect("~/Admin/editofficial/" + Id + "/Default.aspx");

                    }
                    else
                    {
                        //  Response.Redirect("~/Admin/Default.aspx?dll=listnews");
                    }

                    break;
                case "_delete":
                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
                    {
                        OfficialBSO officialBSO = new OfficialBSO();
                        officialBSO.DeleteOfficial(Id);
                        ViewOfficial(); ;

                    }
                    else
                    {
                        //  Response.Redirect("~/Admin/Default.aspx?dll=listnews");
                    }

                    break;
            }
        }
Exemplo n.º 8
0
        protected void grvNewsGroup_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            var id = Convert.ToInt32(e.CommandArgument.ToString());
            var nName = e.CommandName.ToLower();
            var adminBSO = new AdminBSO();
            var admin = new ETO.Admin();
            switch (nName)
            {
                case "_view":
                    break;
                case "_edit":

                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
                    {
                        Response.Redirect("~/Admin/editnewsgroup/" + hddGroup.Value + "/" + id + "/Default.aspx");

                    }
                    else
                    {
                        //  Response.Redirect("~/Homepage.aspx?dll=listnewsGroup");
                    }


                    break;

                case "_move":

                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
                    {
                        Response.Redirect("~/Admin/editnewsgroupmove/" + hddGroup.Value + "/" + id + "/Default.aspx");

                    }
                    else
                    {
                        //  Response.Redirect("~/Homepage.aspx?dll=listnewsGroup");
                    }


                    break;
                case "_delete":
                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
                    {
                        NewsGroupBSO newsGroupBSO = new NewsGroupBSO();
                        newsGroupBSO.DeleteNewsGroup(id);
                        ViewNewsGroup(Convert.ToInt32(hddGroup.Value));

                    }
                    else
                    {
                        //  Response.Redirect("~/Homepage.aspx?dll=listnewsGroup");
                    }

                    break;
            }
        }
Exemplo n.º 9
0
        protected void initControl(int Id)
        {
            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            if (Id > 0)
            {
                btn_add.Visible = false;
                btn_edit.Visible = true;
                hddCommentID.Value = Convert.ToString(Id);
                try
                {
                    NewsCommentBSO newsCommentBSO = new NewsCommentBSO();
                    NewsComment newsComment = newsCommentBSO.GetNewsCommentById(Id);
                    txtTitle.Text = newsComment.Title;
                    txtFullName.Text = newsComment.FullName;
                    hddNewsID.Value = Convert.ToString(newsComment.NewsID);
                    txtContent.Html = newsComment.Content;
                    txtDateCreated.SelectedDate = newsComment.DateCreated;
                    txtEmail.Text = newsComment.Email;
                    //       rdbActive.SelectedValue = newsComment.Actived.ToString();
                    hddGroup.Value = newsComment.GroupCate.ToString();

                    hddApprovalUserName.Value = newsComment.ApprovalUserName;
                    hddApprovalDate.Value = Convert.ToString(newsComment.ApprovalDate);

                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
                    {
                        rdbActive.SelectedValue = Convert.ToString(newsComment.Actived);
                        rdbActive.Enabled = true;
                    }
                    else
                    {
                        rdbActive.SelectedValue = Convert.ToString(newsComment.Actived);
                        rdbActive.Enabled = false;
                    }

                }
                catch (Exception ex)
                {
                    clientview.Text = ex.Message.ToString();
                }
            }
            else
            {
                btn_add.Visible = true;
                btn_edit.Visible = false;
                //     hddNewsID = 0;

                if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
                {

                    rdbActive.Enabled = true;
                }
                else
                {

                    rdbActive.Enabled = false;
                }
            }
        }
Exemplo n.º 10
0
        private void initControl(int Id)
        {
            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            if (Id > 0)
            {
                btn_add.Visible = false;
                btn_edit.Visible = true;
                try
                {
                    CompanyBSO companyBSO = new CompanyBSO();
                    Company company = companyBSO.GetCompanyById(Id);
                    hddCompanyID.Value = Convert.ToString(company.CompanyID);
                    ddlCategories.SelectedValue = Convert.ToString(company.Categories);
                    txtTitle.Text = company.Title;
                    txtRadDescription.Html = company.Description;
                    txtAuthor.Text = company.Author;
                    rdbIsNormal.SelectedValue = Convert.ToString(company.IsNormal);
                    rdbIsHot.SelectedValue = Convert.ToString(company.IsHot);

                    hddCommentTotal.Value = Convert.ToString(company.CommentTotal);
                    hddVisitTotal.Value = Convert.ToString(company.VisitTotal);
                    hddCreateUserName.Value = company.CreatedUserName;
                    hddApprovalUserName.Value = company.ApprovalUserName;
                    hddApprovalDate.Value = Convert.ToString(company.ApprovalDate);
                    hddCreatedDate.Value = Convert.ToString(company.CreatedDate);

                    rdbComment.SelectedValue = Convert.ToString(company.IsComment);
                    rdbIsDefault.SelectedValue = Convert.ToString(company.IsDefault);

                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
                    {
                        rdbApproval.SelectedValue = Convert.ToString(company.IsApproval);
                        rdbApproval.Enabled = true;
                    }
                    else
                    {
                        rdbApproval.SelectedValue = Convert.ToString(company.IsApproval);
                        rdbApproval.Enabled = false;
                    }

                    hddGroupCate.Value = company.GroupCate.ToString();

                }
                catch (Exception ex)
                {
                    clientview.Text = ex.Message.ToString();
                }

            }
            else
            {
                btn_add.Visible = true;
                btn_edit.Visible = false;

                if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
                {

                    rdbApproval.Enabled = true;
                }
                else
                {

                    rdbApproval.Enabled = false;
                }
            }
        }
Exemplo n.º 11
0
        private void initControl(int Id)
        {
            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            if (Id > 0)
            {
                btn_add.Visible = false;
                btn_edit.Visible = true;
                try
                {
                    News news = new News();
                    NewsBSO newsBSO = new NewsBSO();
                    news = newsBSO.GetNewsById(Id);
                    hddNewsID.Value = Convert.ToString(news.NewsID);
                    ddlCateNews.SelectedValue = Convert.ToString(news.CateNewsID);
                    hddParentNewsID.Value = Convert.ToString(news.ParentNewsID);
                    txtTitle.Text = news.Title;
                    txtRadShort.Html = news.ShortDescribe;
                    txtRadFull.Html = news.FullDescribe;
                    hddImageThumb.Value = news.ImageThumb;
                    hddImageLarge.Value = news.ImageLarge;
                    txtAuthor.Text = news.Author;
                    txtRadDate.SelectedDate = news.PostDate;
                    hddRelationTotal.Value = Convert.ToString(news.RelationTotal);
                    rdbStatus.SelectedValue = Convert.ToString(news.Status);
                    rdbIshot.SelectedValue = Convert.ToString(news.Ishot);
                    rdbIshome.SelectedValue = Convert.ToString(news.Ishome);


                    hddCommentTotal.Value = Convert.ToString(news.CommentTotal);
                    hddIsView.Value = Convert.ToString(news.Isview);
                    hddCreateUserName.Value = news.CreatedUserName;
                    hddApprovalUserName.Value = news.ApprovalUserName;
                    hddApprovalDate.Value = Convert.ToString(news.ApprovalDate);


                    rdbComment.SelectedValue = Convert.ToString(news.IsComment);

                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
                    {
                        rdbApproval.SelectedValue = Convert.ToString(news.IsApproval);
                        rdbApproval.Enabled = true;
                    }
                    else
                    {
                        rdbApproval.SelectedValue = Convert.ToString(news.IsApproval);
                        rdbApproval.Enabled = false;
                    }

                }
                catch (Exception ex)
                {
                    clientview.Text = ex.Message.ToString();
                }
            }
            else
            {
                txtRadDate.SelectedDate = DateTime.Now;
                btn_add.Visible = true;
                btn_edit.Visible = false;
                if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
                {

                    rdbApproval.Enabled = true;
                }
                else
                {

                    rdbApproval.Enabled = false;
                }

            }
        }
Exemplo n.º 12
0
        protected void initControl(int Id)
        {
            AdminBSO adminBSO = new AdminBSO();
            ETO.Admin admin = new ETO.Admin();
            if (Id > 0)
            {
                btn_add.Visible = false;
                btn_edit.Visible = true;
                hddPageID.Value = Convert.ToString(Id);
                try
                {
                    PagesBSO pagesBSO = new PagesBSO();
                    Pages pages = pagesBSO.GetPagesById(Id);
                    ddlPage.SelectedValue = pages.PageName;
                    txtPageName.Text = pages.PageName;
                    rdbGroup.SelectedValue = pages.Icon;
                    txtTitle.Text = pages.PageTitle;
                    rdbType1.SelectedValue = pages.PageType.ToString();
                    rdbType1.Enabled = false;
                    txtRadshort.Html = pages.Describe;
                    hddImage.Value = pages.Imagethumb;
                    txtRad_full.Html = pages.PageContent;
                    txtRadDate.SelectedDate = pages.PostDate;
                    txtAuthor.Text = pages.Author;
                    rdbActive.SelectedValue = pages.Status.ToString();
                    rdbIsView.SelectedValue = pages.IsView.ToString();
                    rdbComment.SelectedValue = pages.IsComment.ToString();

                    hddCommentTotal.Value = Convert.ToString(pages.CommentTotal);
                    hddVisitTotal.Value = Convert.ToString(pages.VisitTotal);
                    hddCreateUserName.Value = pages.CreatedUserName;
                    hddApprovalUserName.Value = pages.ApprovalUserName;
                    hddApprovalDate.Value = Convert.ToString(pages.ApprovalDate);



                    admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                    if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
                    {
                        rdbApproval.SelectedValue = Convert.ToString(pages.IsApproval);
                        rdbApproval.Enabled = true;
                    }
                    else
                    {
                        rdbApproval.SelectedValue = Convert.ToString(pages.IsApproval);
                        rdbApproval.Enabled = false;
                    }

                    if (pages.PageType == true)
                    {
                        divFull.Visible = true;
                        divTitle1.Visible = true;
                    }
                    else
                    {
                        divFull.Visible = false;
                        divTitle1.Visible = false;
                    }

                }
                catch (Exception ex)
                {
                    clientview.Text = ex.Message.ToString();
                }
            }
            else
            {
                txtRadDate.SelectedDate = DateTime.Now;
                btn_add.Visible = true;
                btn_edit.Visible = false;

                if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Approval"))
                {

                    rdbApproval.Enabled = true;
                }
                else
                {

                    rdbApproval.Enabled = false;
                }

            }
        }
        protected void grvNewsComment_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                ImageButton image_del = (ImageButton)e.Row.FindControl("btn_delete");
                //   image_del.Attributes.Add("onclick", "return confirm('Bạn có chắc chắn muốn xóa?');");
                ImageButton image_edit = (ImageButton)e.Row.FindControl("btn_edit");

                AdminBSO adminBSO = new AdminBSO();
                ETO.Admin admin = new ETO.Admin();
                admin = adminBSO.GetAdminById(Session["Admin_UserName"].ToString());

                if (Session["Admin_UserName"].ToString().Equals("administrator") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Edit") || adminBSO.CheckPermission(Session["Admin_UserName"].ToString(), "Write"))
                {
                    image_del.Attributes.Add("onclick", "javascript:return confirm('Bạn có muốn chắc chắn xóa ???');");
                }
                else
                {
                    image_edit.Attributes.Add("onclick", "javascript:return confirm('Bạn không có đủ quyền ???');");
                    image_del.Attributes.Add("onclick", "javascript:return confirm('Bạn không có đủ quyền ???');");
                }

            }
        }