Example #1
0
 public UserAccessModel(ProcessCardContext context, IHttpContextAccessor contextaccessor)
 {
     this.context         = context;
     this.contextAccessor = contextaccessor;
     UpdateUser(contextAccessor.HttpContext.User.Identity.Name);
 }
 public ProcessCardsModel(ProcessCardContext processCardContext, IUserAccessModel userAccess)
 {
     this.context    = processCardContext;
     this.userAccess = userAccess;
     this.products   = context.BlisProductsView.Where(x => x.ActiveStatus.Contains("Y")).ToList();
 }
Example #3
0
 public ProductsModel(ProcessCardContext context)
 {
     this.context = context;
     products     = context.BlisProductsView.Where(x => x.ActiveStatus == "Y").ToList();
 }
Example #4
0
 public QualityAlertsModel(ProcessCardContext context)
 {
     productAlerts = new List <IProductAlerts>(context.ProductAlerts.ToList().Cast <IProductAlerts>());
 }
Example #5
0
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory, Model.ProcessCardContext context, Model.BrinellRecordsContext brinellContext)
        {
            loggerFactory.AddConsole(Configuration.GetSection("Logging"));
            loggerFactory.AddDebug();

            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseBrowserLink();
            }
            else
            {
                app.UseDeveloperExceptionPage();
                //app.UseExceptionHandler("/Home/Error");
            }

            app.UseStaticFiles();
            //            app.UseIdentity();
            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });
        }