Пример #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Session["listPermisosPrincipal"] = listPermisosPrincipal;
                Session["listDenegarPermisos"]   = listDenegarPermisos;

                Session["perfilesServices"]      = perfilesServices;
                Session["estatusServices"]       = estatusServices;
                Session["tiposPerfilesServices"] = tiposPerfilesServices;
                Session["modulosServices"]       = modulosServices;
                Session["permisosServices"]      = permisosServices;

                if (Session["UidFranquiciaMaster"] != null)
                {
                    ViewState["UidFranquiciaLocal"] = Session["UidFranquiciaMaster"];
                }
                else
                {
                    ViewState["UidFranquiciaLocal"] = Guid.Empty;
                }

                perfilesServices.CargarPerfilesFranquiciaGridViewModel(new Guid(ViewState["UidFranquiciaLocal"].ToString()));
                gvPerfiles.DataSource = perfilesServices.lsperfilesGridViewModel;
                gvPerfiles.DataBind();

                estatusServices.CargarEstatus();
                ddlEstatus.DataSource     = estatusServices.lsEstatus;
                ddlEstatus.DataTextField  = "VchDescripcion";
                ddlEstatus.DataValueField = "UidEstatus";
                ddlEstatus.DataBind();

                tiposPerfilesServices.CargarTipoPerfil(new Guid("6D70F88D-3CE0-4C8B-87A1-92666039F5B2"));
                ddlTipoPerfil.DataSource     = tiposPerfilesServices.lsTipoPerfil;
                ddlTipoPerfil.DataTextField  = "VchDescripcion";
                ddlTipoPerfil.DataValueField = "UidTipoPerfil";
                ddlTipoPerfil.DataBind();

                ddlTipoPerfil_SelectedIndexChanged(null, null);

                modulosServices.CargarModulosNivelFranquicias(Guid.Parse("D0B10017-5701-4B1D-B72F-8458AA6F7ADE"));
                gvModulosFranquicias.DataSource = modulosServices.lsmodulos;
                gvModulosFranquicias.DataBind();

                modulosServices.CargarModulosNivelClientes(Guid.Parse("85B6CE16-BACE-489E-8E75-2280F72605F1"));
                gvModulosClientes.DataSource = modulosServices.lsmodulos;
                gvModulosClientes.DataBind();

                modulosServices.CargarModulosNivelUsuarios(Guid.Parse("A4B4F919-FDD2-4076-BD4A-59E4011E71C8"));
                gvModulosUsuarios.DataSource = modulosServices.lsmodulos;
                gvModulosUsuarios.DataBind();
            }
            else
            {
                perfilesServices      = (PerfilesServices)Session["perfilesServices"];
                estatusServices       = (EstatusServices)Session["estatusServices"];
                tiposPerfilesServices = (TiposPerfilesServices)Session["tiposPerfilesServices"];
                modulosServices       = (ModulosServices)Session["modulosServices"];
                permisosServices      = (PermisosServices)Session["permisosServices"];

                listPermisosPrincipal = (List <string>)Session["listPermisosPrincipal"];
                listDenegarPermisos   = (List <string>)Session["listDenegarPermisos"];

                pnlAlert.Visible     = false;
                lblMensajeAlert.Text = "";
                divAlert.Attributes.Add("class", "alert alert-danger alert-dismissible fade");
            }
        }
Пример #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ViewState["gvPerfiles"] = SortDirection.Ascending;

                Session["listPermisosPrincipal"] = listPermisosPrincipal;
                Session["listDenegarPermisos"]   = listDenegarPermisos;

                Session["perfilesServices"]      = perfilesServices;
                Session["estatusServices"]       = estatusServices;
                Session["tiposPerfilesServices"] = tiposPerfilesServices;
                Session["modulosServices"]       = modulosServices;
                Session["permisosServices"]      = permisosServices;

                perfilesServices.CargarPerfilesGridViewModel();
                gvPerfiles.DataSource = perfilesServices.lsperfilesGridViewModel;
                gvPerfiles.DataBind();

                estatusServices.CargarEstatus();
                ddlEstatus.DataSource     = estatusServices.lsEstatus;
                ddlEstatus.DataTextField  = "VchDescripcion";
                ddlEstatus.DataValueField = "UidEstatus";
                ddlEstatus.DataBind();

                tiposPerfilesServices.CargarTipoPerfil(new Guid("514433C7-4439-42F5-ABE4-6BF1C330F0CA"));
                ddlTipoPerfil.DataSource     = tiposPerfilesServices.lsTipoPerfil;
                ddlTipoPerfil.DataTextField  = "VchDescripcion";
                ddlTipoPerfil.DataValueField = "UidTipoPerfil";
                ddlTipoPerfil.DataBind();

                ddlTipoPerfil_SelectedIndexChanged(null, null);

                modulosServices.CargarModulosNivelPrincipal(Guid.Parse("ED9F4B98-EA8F-4D8F-8248-6BA42EC87B4E"));
                gvModulosPrincipal.DataSource = modulosServices.lsmodulos;
                gvModulosPrincipal.DataBind();

                modulosServices.CargarModulosNivelFranquicias(Guid.Parse("D0B10017-5701-4B1D-B72F-8458AA6F7ADE"));
                gvModulosFranquicias.DataSource = modulosServices.lsmodulos;
                gvModulosFranquicias.DataBind();

                modulosServices.CargarModulosNivelClientes(Guid.Parse("85B6CE16-BACE-489E-8E75-2280F72605F1"));
                gvModulosClientes.DataSource = modulosServices.lsmodulos;
                gvModulosClientes.DataBind();

                modulosServices.CargarModulosNivelUsuarios(Guid.Parse("A4B4F919-FDD2-4076-BD4A-59E4011E71C8"));
                gvModulosUsuarios.DataSource = modulosServices.lsmodulos;
                gvModulosUsuarios.DataBind();
            }
            else
            {
                perfilesServices      = (PerfilesServices)Session["perfilesServices"];
                estatusServices       = (EstatusServices)Session["estatusServices"];
                tiposPerfilesServices = (TiposPerfilesServices)Session["tiposPerfilesServices"];
                modulosServices       = (ModulosServices)Session["modulosServices"];
                permisosServices      = (PermisosServices)Session["permisosServices"];

                listPermisosPrincipal = (List <string>)Session["listPermisosPrincipal"];
                listDenegarPermisos   = (List <string>)Session["listDenegarPermisos"];

                pnlAlert.Visible     = false;
                lblMensajeAlert.Text = "";
                divAlert.Attributes.Add("class", "alert alert-danger alert-dismissible fade");
            }
        }
Пример #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                ViewState["gvPerfiles"] = SortDirection.Ascending;

                Session["listPermisosPrincipal"] = listPermisosPrincipal;
                Session["listDenegarPermisos"]   = listDenegarPermisos;

                Session["perfilesServices"]      = perfilesServices;
                Session["estatusServices"]       = estatusServices;
                Session["tiposPerfilesServices"] = tiposPerfilesServices;
                Session["modulosServices"]       = modulosServices;
                Session["permisosServices"]      = permisosServices;

                perfilesServices.CargarPerfilesGridViewModel();
                gvPerfiles.DataSource = perfilesServices.lsperfilesGridViewModel;
                gvPerfiles.DataBind();

                estatusServices.CargarEstatus();
                ddlEstatus.DataSource     = estatusServices.lsEstatus;
                ddlEstatus.DataTextField  = "VchDescripcion";
                ddlEstatus.DataValueField = "UidEstatus";
                ddlEstatus.DataBind();

                tiposPerfilesServices.CargarTipoPerfil(new Guid("514433C7-4439-42F5-ABE4-6BF1C330F0CA"));
                ddlTipoPerfil.DataSource     = tiposPerfilesServices.lsTipoPerfil;
                ddlTipoPerfil.DataTextField  = "VchDescripcion";
                ddlTipoPerfil.DataValueField = "UidTipoPerfil";
                ddlTipoPerfil.DataBind();

                ddlTipoPerfil_SelectedIndexChanged(null, null);

                modulosServices.CargarModulosNivelPrincipal(Guid.Parse("17BB8F08-9D5F-425C-9B9B-1CA230C07C7F"));
                gvModulosPrincipal.DataSource = modulosServices.lsmodulos;
                gvModulosPrincipal.DataBind();

                modulosServices.CargarModulosNivelFranquicias(Guid.Parse("18523B2B-C671-44AE-A3F6-F0255C4D11A8"));
                gvModulosFranquicias.DataSource = modulosServices.lsmodulos;
                gvModulosFranquicias.DataBind();

                modulosServices.CargarModulosNivelClientes(Guid.Parse("D2C80D47-C14C-4677-A63D-C46BCB50FE17"));
                gvModulosClientes.DataSource = modulosServices.lsmodulos;
                gvModulosClientes.DataBind();

                modulosServices.CargarModulosNivelUsuarios(Guid.Parse("18E9669B-C238-4BCC-9213-AF995644A5A4"));
                gvModulosUsuarios.DataSource = modulosServices.lsmodulos;
                gvModulosUsuarios.DataBind();
            }
            else
            {
                perfilesServices      = (PerfilesServices)Session["perfilesServices"];
                estatusServices       = (EstatusServices)Session["estatusServices"];
                tiposPerfilesServices = (TiposPerfilesServices)Session["tiposPerfilesServices"];
                modulosServices       = (ModulosServices)Session["modulosServices"];
                permisosServices      = (PermisosServices)Session["permisosServices"];

                listPermisosPrincipal = (List <string>)Session["listPermisosPrincipal"];
                listDenegarPermisos   = (List <string>)Session["listDenegarPermisos"];

                pnlAlert.Visible     = false;
                lblMensajeAlert.Text = "";
                divAlert.Attributes.Add("class", "alert alert-danger alert-dismissible fade");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Session["listPermisosPrincipal"] = listPermisosPrincipal;
                Session["listDenegarPermisos"]   = listDenegarPermisos;

                Session["perfilesServices"]      = perfilesServices;
                Session["estatusServices"]       = estatusServices;
                Session["tiposPerfilesServices"] = tiposPerfilesServices;
                Session["modulosServices"]       = modulosServices;
                Session["permisosServices"]      = permisosServices;

                if (Session["UidFranquiciaMaster"] != null)
                {
                    ViewState["UidFranquiciaLocal"] = Session["UidFranquiciaMaster"];
                }
                else
                {
                    ViewState["UidFranquiciaLocal"] = Guid.Empty;
                }

                perfilesServices.CargarPerfilesFranquiciaGridViewModel(new Guid(ViewState["UidFranquiciaLocal"].ToString()));
                gvPerfiles.DataSource = perfilesServices.lsperfilesGridViewModel;
                gvPerfiles.DataBind();

                estatusServices.CargarEstatus();
                ddlEstatus.DataSource     = estatusServices.lsEstatus;
                ddlEstatus.DataTextField  = "VchDescripcion";
                ddlEstatus.DataValueField = "UidEstatus";
                ddlEstatus.DataBind();

                tiposPerfilesServices.CargarTipoPerfil(new Guid("6D70F88D-3CE0-4C8B-87A1-92666039F5B2"));
                ddlTipoPerfil.DataSource     = tiposPerfilesServices.lsTipoPerfil;
                ddlTipoPerfil.DataTextField  = "VchDescripcion";
                ddlTipoPerfil.DataValueField = "UidTipoPerfil";
                ddlTipoPerfil.DataBind();

                ddlTipoPerfil_SelectedIndexChanged(null, null);

                modulosServices.CargarModulosNivelFranquicias(Guid.Parse("18523B2B-C671-44AE-A3F6-F0255C4D11A8"));
                gvModulosFranquicias.DataSource = modulosServices.lsmodulos;
                gvModulosFranquicias.DataBind();

                modulosServices.CargarModulosNivelClientes(Guid.Parse("D2C80D47-C14C-4677-A63D-C46BCB50FE17"));
                gvModulosClientes.DataSource = modulosServices.lsmodulos;
                gvModulosClientes.DataBind();

                modulosServices.CargarModulosNivelUsuarios(Guid.Parse("18E9669B-C238-4BCC-9213-AF995644A5A4"));
                gvModulosUsuarios.DataSource = modulosServices.lsmodulos;
                gvModulosUsuarios.DataBind();
            }
            else
            {
                perfilesServices      = (PerfilesServices)Session["perfilesServices"];
                estatusServices       = (EstatusServices)Session["estatusServices"];
                tiposPerfilesServices = (TiposPerfilesServices)Session["tiposPerfilesServices"];
                modulosServices       = (ModulosServices)Session["modulosServices"];
                permisosServices      = (PermisosServices)Session["permisosServices"];

                listPermisosPrincipal = (List <string>)Session["listPermisosPrincipal"];
                listDenegarPermisos   = (List <string>)Session["listDenegarPermisos"];

                pnlAlert.Visible     = false;
                lblMensajeAlert.Text = "";
                divAlert.Attributes.Add("class", "alert alert-danger alert-dismissible fade");
            }
        }