Exemple #1
0
        protected void Decentralization()
        {
            RolesModel role = CheckDecentralization.checkRole_Register(Request.Cookies["Username"].Value);

            foreach (GridViewRow row in GridViewManufacturer.Rows)
            {
                if (!role.U_Manufacturer)
                {
                    row.Cells[2].Enabled = false;
                }
                if (!role.D_Manufacturer)
                {
                    row.Cells[3].Enabled = false;
                }
            }
        }
        protected void Decentralization()
        {
            String     pathRuning = HttpContext.Current.Request.Url.AbsolutePath;
            RolesModel role       = CheckDecentralization.checkRole_Register(Request.Cookies["Username"].Value);

            foreach (GridViewRow row in GridViewEmp.Rows)
            {
                if (!role.U_Register)
                {
                    row.Cells[8].Enabled = false;
                    if (pathRuning.Equals("/admin/UpdateInfoEmp.aspx"))
                    {
                        Response.Redirect("HomeAdmin.aspx");
                    }
                }
                if (!role.D_Register)
                {
                    row.Cells[9].Enabled = false;
                }
            }
        }