files tree made better.
This commit is contained in:
parent
ffbf032480
commit
ccc91bbf19
1630 changed files with 18209 additions and 41860 deletions
|
|
@ -1,50 +0,0 @@
|
|||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue