This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Security.Policy; | |
| using Kendo.Mvc.UI; | |
| using Kendo.Mvc.UI.Fluent; | |
| using Microsoft.AspNetCore.Mvc; | |
| namespace FiftyEggsSample.Models | |
| { | |
| public class StandardGrid<T> where T: class | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @using System.Collections | |
| @using FiftyEggs.Data.Models | |
| @using Kendo.Mvc.UI | |
| @{ | |
| var cn = (string)ViewBag.ControllerName; | |
| var builder = new StandardGrid<Job>(cn, Url); | |
| } | |
| <h2>@cn</h2> | |
| @(builder.Build(Html.Kendo().Grid<Job>(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class JobsController : KendoBaseController<Job> | |
| { | |
| public JobsController(SampleDbContext context) : base(context) {} | |
| public override async Task<ActionResult> Index(int? id=null) | |
| { | |
| var cn = this.ControllerContext.RouteData.Values["controller"].ToString(); | |
| ViewBag.Title = cn; | |
| ViewBag.Id = id; | |
| ViewBag.ControllerName = cn; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class CustomersController : KendoBaseController<Customer> | |
| { | |
| public CustomersController(SampleDbContext context) : base(context) | |
| { | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Threading.Tasks; | |
| using Kendo.Mvc.Extensions; | |
| using Kendo.Mvc.UI; | |
| using Microsoft.AspNetCore.Mvc; | |
| using FiftyEggs.Data.Data; | |
| using Microsoft.AspNetCore.Authorization; | |
| using Microsoft.EntityFrameworkCore; |