protected void grvNewsGroup_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            var id = Convert.ToInt32(e.CommandArgument.ToString());
            var nName = e.CommandName.ToLower();
            var adminBSO = new AdminBSO();
            switch (nName)
            {
                case "_view":
                    break;
                case "_edit":
                    
                    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":
                    
                    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":
                    
                    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;
                case "_default":

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

                    }
                    break;
            }
        }