示例#1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddMvc()
            .SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
            services.AddAutoMapper();

            DAModule.ConfigureServices(services, Configuration);
            ServicesModule.ConfigureServices(services, Configuration);
            AggregationModule.ConfigureDrivers(services, Configuration);
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string data = "";


            try
            {
                if (!this.IsPostBack)
                {
                    UserData user = ((BasePage)this.Page).Session_CurrentUserData;
                    if (user == null)
                    {
                        //JOSE TODO;
                        //El usuario no puede venir nulo, pues en default.aspx se carga el invitado si no hay cookie
                        //Se puede volver al login
                        //Response.Redirect(Constantes.PORTAL_URL + "../Default.aspx?logout=1", true);

                        //O bien
                        //Se puede cargar el usuario default agregando el usuario a BasePage
                        streamingcpanel.DataAccess.DAUsers muDBUser = new streamingcpanel.DataAccess.DAUsers();
                        user = muDBUser.GetOneUser(streamingcpanel.Constantes.USERFORDEFAULT);
                        muDBUser.cerrar();
                        ((BasePage)this.Page).Session_CurrentUserData = user;
                    }


                    this.LabelMenu.Text = menus.createMenuBootstrap(user);


                    DAModule daModulo = new DAModule();
                    List <DAModuleEntity> moduloEntityList = daModulo.traerModulosPorUsuarioyDefecto(user.User_ID);
                    daModulo.cerrar();
                    string moduleText = "";
                    if (moduloEntityList != null && moduloEntityList.Any())
                    {
                        for (int i = 0; i < moduloEntityList.Count; i++)
                        {
                            moduleText += PaintModule(moduloEntityList[i].Nombre, moduloEntityList[i].Imagen);
                        }
                    }

                    LabelInfoModule.Text = moduleText;
                }
            }
            catch (Exception ex)
            {
                data = ex.Message;
            }


            LabelDatos.Text = data;
        }
    public static long InsertModule(BOCommon objBO)
    {
        DAModule objDA = new DAModule();

        return(Convert.ToInt64(objDA.InsertModule(objBO)));
    }