public IActionResult Index() { ViewData["Title"] = "All Periods"; var dbContext = new MyProjectDBContext(); try{ var model = _dbContext.Periods.OrderBy(Periods => Periods.PerNum).ToList(); return(View(model)); } catch { return(View("Error")); } }
public IActionResult Index() { ViewData["Title"] = "All Items"; var dbContext = new MyProjectDBContext(); try{ var model = _dbContext.ItemView.OrderBy(ItemView => ItemView.ItemOrder).ToList(); return(View(model)); } catch { return(View("Error")); } }
public IActionResult LstCnt(int year) { string syear = year.ToString(); ViewData["Title"] = "Relación de Gastos anuales " + syear; var dbContext = new MyProjectDBContext(); try{ //var model = _dbContext.PAccView.Where(AccView => AccView.AccYear ==year).OrderBy(AccView => AccView.AccOrder).ToList(); var model = _dbContext.TAccount.Where(TAccount => TAccount.AccYear == year).OrderBy(TAccount => TAccount).ToList(); return(View("Index", model)); } catch { return(View("Error")); } }
public PeriodsController(MyProjectDBContext dbContext) { _dbContext = dbContext; }
public SQLTownRepository(MyProjectDBContext context) { this.context = context; }
public SQLEmployeeRepository(MyProjectDBContext context) { this.context = context; }
public AccountController(MyProjectDBContext dbContext) { _dbContext = dbContext; }
public ItemController(MyProjectDBContext dbContext) { _dbContext = dbContext; }
public MonthsController(MyProjectDBContext dbContext) { _dbContext = dbContext; }