files tree made better.

This commit is contained in:
Paul Schneider 2019-01-01 16:28:47 +00:00
commit ccc91bbf19
1630 changed files with 18209 additions and 41860 deletions

View file

@ -0,0 +1,50 @@
using System;
using System.Threading.Tasks;
using Microsoft.AspNet.Mvc;
using Yavsc.Models;
using Yavsc.Services;
namespace Yavsc.ViewComponents
{
public class CalendarViewComponent : ViewComponent
{
ApplicationDbContext _dbContext;
ICalendarManager _manager;
public CalendarViewComponent (
ApplicationDbContext dbContext,
ICalendarManager manager)
{
_manager = manager;
_dbContext = dbContext;
}
public async Task<IViewComponentResult> InvokeAsync (
string htmlFieldName,
string calId = null)
{
var minDate = DateTime.Now;
var maxDate = minDate.AddDays(20);
var model = await _manager.CreateViewModelAsync(
htmlFieldName,
calId, minDate, maxDate
);
return View(model);
}
public async Task<IViewComponentResult> InvokeAsync (
string htmlFieldName)
{
var minDate = DateTime.Now;
var maxDate = minDate.AddDays(20);
var model = await _manager.CreateViewModelAsync(
htmlFieldName,
null, minDate, maxDate
);
return View(model);
}
}
}