зеркало из
1
0
Форкнуть 0

chore: migrate razor pages examples

This commit is contained in:
Tsvetomir Milchev 2019-11-18 19:22:53 +02:00
Родитель 715cac9c41
Коммит d248f5a716
426 изменённых файлов: 15434 добавлений и 98114 удалений

Просмотреть файл

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<configuration>
    <packageSources>
        <clear /> <!-- ensure only the sources defined below are used -->
        <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
        <add key="Telerik.UI.for.AspNet.Core.Trial.2019.3.1023" value=".\\src" />
    </packageSources>
</configuration>
<packageSources>
<clear /> <!-- ensure only the sources defined below are used -->
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Telerik.UI.for.AspNet.Core.Trial.2019.3.1023" value=".\\src" />
</packageSources>
</configuration>

Просмотреть файл

@ -1,9 +1,9 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.27703.2035
# Visual Studio Version 16
VisualStudioVersion = 16.0.29319.158
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "src", "src\GridRazorPagesApp.csproj", "{D65F7873-2076-4821-BCAE-F1B328395827}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kendo.Examples.RazorPages", "Kendo.Examples.RazorPages\Kendo.Examples.RazorPages.csproj", "{F34D8004-A671-4DF1-A5A8-BAF17D4A9DB1}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -11,15 +11,15 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D65F7873-2076-4821-BCAE-F1B328395827}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D65F7873-2076-4821-BCAE-F1B328395827}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D65F7873-2076-4821-BCAE-F1B328395827}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D65F7873-2076-4821-BCAE-F1B328395827}.Release|Any CPU.Build.0 = Release|Any CPU
{F34D8004-A671-4DF1-A5A8-BAF17D4A9DB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F34D8004-A671-4DF1-A5A8-BAF17D4A9DB1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F34D8004-A671-4DF1-A5A8-BAF17D4A9DB1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F34D8004-A671-4DF1-A5A8-BAF17D4A9DB1}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {12BC3D49-4410-49A8-8C60-929185AFD9A0}
SolutionGuid = {783FB8D2-4983-426A-9954-99C0E2888E0E}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -0,0 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="3.0.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="3.0.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="3.0.0" />
<PackageReference Include="Telerik.UI.for.AspNet.Core.Trial" Version="2019.3.1023" />
</ItemGroup>
<ItemGroup>
<Folder Include="Pages\Shared\EditorTemplates\" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,19 +1,18 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace RazorPageGridTest
{
public class Customer
{
public long CustomerId { get; set; }
public string Name { get; set; }
public string Address { get; set; }
public DateTime? ClockOut { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Kendo.Examples.RazorPages.Models
{
public class Customer
{
public long CustomerId { get; set; }
public string Name { get; set; }
public string Address { get; set; }
public DateTime? ClockOut { get; set; }
}
}

Просмотреть файл

@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
namespace Gantt_RazorPages.Data
namespace Kendo.Examples.RazorPages.Models
{
public class DependencyViewModel : IGanttDependency
{

Просмотреть файл

@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace GridRazorPagesApp.Data
namespace Kendo.Examples.RazorPages.Models
{
public class OrderViewModel
{

Просмотреть файл

@ -5,7 +5,7 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
namespace Gantt_RazorPages.Data
namespace Kendo.Examples.RazorPages.Models
{
public class TaskViewModel : IGanttTask
{

Просмотреть файл

@ -0,0 +1,26 @@
@page
@model ErrorModel
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to the <strong>Development</strong> environment displays detailed information about the error that occurred.
</p>
<p>
<strong>The Development environment shouldn't be enabled for deployed applications.</strong>
It can result in displaying sensitive information from exceptions to end users.
For local debugging, enable the <strong>Development</strong> environment by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>
and restarting the app.
</p>

Просмотреть файл

@ -1,23 +1,31 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace RazorPageGridTest.Pages
{
public class ErrorModel : PageModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
namespace Kendo.Examples.RazorPages.Pages
{
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public class ErrorModel : PageModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
private readonly ILogger<ErrorModel> _logger;
public ErrorModel(ILogger<ErrorModel> logger)
{
_logger = logger;
}
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}

Просмотреть файл

@ -1,10 +1,12 @@
@page
@model IndexModel
@model Kendo.Examples.RazorPages.Pages.Gantt.GanttIndexModel
@{
ViewData["Title"] = "Home Page";
ViewData["Title"] = "GanttIndex";
}
@using Gantt_RazorPages.Data
<h1>GanttIndex</h1>
@using Kendo.Examples.RazorPages.Models
@using Kendo.Mvc.UI
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
@ -37,10 +39,10 @@
m.Field(f => f.Expanded).DefaultValue(true);
m.Field("TaskID", typeof(String));
})
.Read(r => r.Url("/Index?handler=Read").Data("forgeryToken"))
.Create(r => r.Url("/Index?handler=Create").Data("forgeryToken"))
.Update(r => r.Url("/Index?handler=Update").Data("forgeryToken"))
.Destroy(r => r.Url("/Index?handler=Destroy").Data("forgeryToken"))
.Read(r => r.Url("/Gantt/GanttIndex?handler=Read").Data("forgeryToken"))
.Create(r => r.Url("/Gantt/GanttIndex?handler=Create").Data("forgeryToken"))
.Update(r => r.Url("/Gantt/GanttIndex?handler=Update").Data("forgeryToken"))
.Destroy(r => r.Url("/Gantt/GanttIndex?handler=Destroy").Data("forgeryToken"))
)
.DependenciesDataSource(d => d
.Model(m =>

Просмотреть файл

@ -2,15 +2,15 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Kendo.Examples.RazorPages.Models;
using Kendo.Mvc.Extensions;
using Kendo.Mvc.UI;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Gantt_RazorPages.Data;
using Kendo.Mvc.Extensions;
namespace Gantt_RazorPages.Pages
namespace Kendo.Examples.RazorPages.Pages.Gantt
{
public class IndexModel : PageModel
public class GanttIndexModel : PageModel
{
public static IList<TaskViewModel> tasks;
public static IList<DependencyViewModel> dependencies;
@ -137,6 +137,5 @@ namespace Gantt_RazorPages.Pages
return new JsonResult(new[] { dependency }.ToDataSourceResult(request, ModelState));
}
}
}
}

Просмотреть файл

@ -0,0 +1,52 @@
@page
@model Kendo.Examples.RazorPages.Pages.Grid.GridCrudOperationsModel
@{
ViewData["Title"] = "GridCrudOperations";
}
<h1>GridCrudOperations</h1>
@using Kendo.Examples.RazorPages.Models
@using Kendo.Mvc.UI
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
@Html.AntiForgeryToken()
@(Html.Kendo().Grid<OrderViewModel>().Name("grid")
.Groupable()
.Sortable()
.Editable()
.Scrollable()
.ToolBar(x => x.Excel())
.Columns(columns =>
{
columns.Bound(column => column.Freight);
columns.Bound(column => column.ShipName);
columns.Bound(column => column.ShipCity);
columns.Command(column =>
{
column.Edit();
column.Destroy();
});
})
.Excel(excel => excel
.FileName("Export.xlsx")
.Filterable(true)
.ProxyURL("/Grid/GridCrudOperations?handler=Save")
)
.DataSource(ds => ds.Ajax()
.Read(r => r.Url("/Grid/GridCrudOperations?handler=Read").Data("forgeryToken"))
.Update(u => u.Url("/Grid/GridCrudOperations?handler=Update").Data("forgeryToken"))
.Create(c => c.Url("/Grid/GridCrudOperations?handler=Create").Data("forgeryToken"))
.Destroy(d => d.Url("/Grid/GridCrudOperations?handler=Destroy").Data("forgeryToken"))
.Model(m => m.Id(id => id.OrderID))
.PageSize(10)
)
.Pageable()
)
<script>
function forgeryToken() {
return kendo.antiForgeryTokens();
}
</script>

Просмотреть файл

@ -2,15 +2,15 @@
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Kendo.Examples.RazorPages.Models;
using Kendo.Mvc.Extensions;
using Kendo.Mvc.UI;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using GridRazorPagesApp.Data;
using Kendo.Mvc.Extensions;
namespace GridRazorPagesApp.Pages
namespace Kendo.Examples.RazorPages.Pages.Grid
{
public class IndexModel : PageModel
public class GridCrudOperationsModel : PageModel
{
public static IList<OrderViewModel> orders;
@ -18,9 +18,9 @@ namespace GridRazorPagesApp.Pages
{
if (orders == null)
{
orders = new List<OrderViewModel>();
orders = new List<OrderViewModel>();
Enumerable.Range(0, 50).ToList().ForEach(i => orders.Add( new OrderViewModel
Enumerable.Range(0, 50).ToList().ForEach(i => orders.Add(new OrderViewModel
{
OrderID = i + 1,
Freight = i * 10,
@ -58,7 +58,7 @@ namespace GridRazorPagesApp.Pages
return new JsonResult(new[] { order }.ToDataSourceResult(request, ModelState));
}
[HttpPost]
[HttpPost]
public ActionResult OnPostSave(string contentType, string base64, string fileName)
{
var fileContents = Convert.FromBase64String(base64);
@ -66,4 +66,4 @@ namespace GridRazorPagesApp.Pages
return File(fileContents, contentType, fileName);
}
}
}
}

Просмотреть файл

@ -1,72 +1,74 @@
@page
@model RazorPageGridTest.Pages.Customer.IndexModel
@{
ViewData["Title"] = "Index";
}
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
@Html.AntiForgeryToken()
@using Kendo.Mvc.UI
@{
var culture111 = System.Globalization.CultureInfo.CurrentCulture.ToString();
}
<h2>Index</h2>
<div id="grid">
</div>
@(Html.Kendo().Grid<RazorPageGridTest.Customer>().Name("grid")
.AutoBind(false)
.Columns(x =>
{
x.Bound(p => p.Address);
x.Bound(p => p.ClockOut).EditorTemplateName("TimePicker").Format("{0:hh:mm tt}");
x.Command(c => c.Edit());
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.DataSource(d =>
d.Custom()
.Transport(t =>
{
t.Read(r => r.Action("Customer", "Index", new { handler = "ReadRecords" }).Type(HttpVerbs.Post));
t.Update(r => r.Action("Customer", "Index", new { handler = "UpdateRecord" }).Type(HttpVerbs.Post));
t.ParameterMap("parameterMap");
})
.Schema(s => s.Model(m =>
{
m.Id(i => i.CustomerId);
m.Field("ClockOut", typeof(DateTime?));
}))
.PageSize(10)
)
.Pageable()
)
<script>
function parameterMap(options, operation) {
if (operation === "update") {
options.ClockOut = options.ClockOut.toUTCString();
return options;
}
}
</script>
<script>
$(function () {
var grid = $("#grid").data("kendoGrid");
grid.dataSource.transport.options.read.beforeSend = function (req) {
req.setRequestHeader('RequestVerificationToken', $('input:hidden[name="__RequestVerificationToken"]').val());
};
grid.dataSource.transport.options.update.beforeSend = function (req) {
req.setRequestHeader('RequestVerificationToken', $('input:hidden[name="__RequestVerificationToken"]').val());
};
grid.dataSource.read();
});
@page
@model Kendo.Examples.RazorPages.Pages.Grid.GridCustomDataSourceModel
@{
ViewData["Title"] = "GridCustomDataSource";
}
<h1>GridCustomDataSource</h1>
@inject Microsoft.AspNetCore.Antiforgery.IAntiforgery Xsrf
@Html.AntiForgeryToken()
@using Kendo.Mvc.UI
@{
var culture111 = System.Globalization.CultureInfo.CurrentCulture.ToString();
}
<h2>Index</h2>
<div id="grid">
</div>
@(Html.Kendo().Grid<Kendo.Examples.RazorPages.Models.Customer>().Name("grid")
.AutoBind(false)
.Columns(x =>
{
x.Bound(p => p.Address);
x.Bound(p => p.ClockOut).EditorTemplateName("TimePicker").Format("{0:hh:mm tt}");
x.Command(c => c.Edit());
})
.Editable(editable => editable.Mode(GridEditMode.InLine))
.DataSource(d =>
d.Custom()
.Transport(t =>
{
t.Read(r => r.Action("Grid", "GridCustomDataSource", new { handler = "ReadRecords" }).Type(HttpVerbs.Post));
t.Update(r => r.Action("Grid", "GridCustomDataSource", new { handler = "UpdateRecord" }).Type(HttpVerbs.Post));
t.ParameterMap("parameterMap");
})
.Schema(s => s.Model(m =>
{
m.Id(i => i.CustomerId);
m.Field("ClockOut", typeof(DateTime?));
}))
.PageSize(10)
)
.Pageable()
)
<script>
function parameterMap(options, operation) {
if (operation === "update") {
options.ClockOut = options.ClockOut.toUTCString();
return options;
}
}
</script>
<script>
$(function () {
var grid = $("#grid").data("kendoGrid");
grid.dataSource.transport.options.read.beforeSend = function (req) {
req.setRequestHeader('RequestVerificationToken', $('input:hidden[name="__RequestVerificationToken"]').val());
};
grid.dataSource.transport.options.update.beforeSend = function (req) {
req.setRequestHeader('RequestVerificationToken', $('input:hidden[name="__RequestVerificationToken"]').val());
};
grid.dataSource.read();
});
</script>

Просмотреть файл

@ -1,39 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Kendo.Mvc.UI;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace RazorPageGridTest.Pages.Customer
{
public class IndexModel : PageModel
{
public JsonResult OnPostReadRecords()
{
List<RazorPageGridTest.Customer> data = new List<RazorPageGridTest.Customer>();
for (int i = 1; i <= 100; i++)
{
data.Add(new RazorPageGridTest.Customer()
{
CustomerId = i,
Name = "Name "+ i.ToString(),
Address = "Address " + i.ToString(),
ClockOut = DateTime.Now.AddHours(i)
});
}
return new JsonResult(data);
}
public JsonResult OnPostUpdateRecord([DataSourceRequest] DataSourceRequest request, RazorPageGridTest.Customer customer)
{
System.Diagnostics.Debug.WriteLine("Updating");
return new JsonResult(customer);
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Kendo.Examples.RazorPages.Models;
using Kendo.Mvc.UI;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Kendo.Examples.RazorPages.Pages.Grid
{
public class GridCustomDataSourceModel : PageModel
{
public JsonResult OnPostReadRecords()
{
List<Customer> data = new List<Customer>();
for (int i = 1; i <= 100; i++)
{
data.Add(new Customer()
{
CustomerId = i,
Name = "Name " + i.ToString(),
Address = "Address " + i.ToString(),
ClockOut = DateTime.Now.AddHours(i)
});
}
return new JsonResult(data);
}
public JsonResult OnPostUpdateRecord([DataSourceRequest] DataSourceRequest request, Customer customer)
{
System.Diagnostics.Debug.WriteLine("Updating");
return new JsonResult(customer);
}
}
}

Просмотреть файл

@ -0,0 +1,12 @@
@page
@model IndexModel
@{
ViewData["Title"] = "Home page";
}
<div class="text-center">
<h1 class="display-4">Welcome</h1>
<p>Learn about <a href="https://docs.microsoft.com/aspnet/core">building Web apps with ASP.NET Core</a>.</p>
</div>
@(Html.Kendo().DatePicker().Name("picker"))

Просмотреть файл

@ -1,17 +1,25 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace RazorPageGridTest.Pages
{
public class IndexModel : PageModel
{
public void OnGet()
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
namespace Kendo.Examples.RazorPages.Pages
{
public class IndexModel : PageModel
{
private readonly ILogger<IndexModel> _logger;
public IndexModel(ILogger<IndexModel> logger)
{
_logger = logger;
}
public void OnGet()
{
}
}
}

Просмотреть файл

@ -0,0 +1,8 @@
@page
@model PrivacyModel
@{
ViewData["Title"] = "Privacy Policy";
}
<h1>@ViewData["Title"]</h1>
<p>Use this page to detail your site's privacy policy.</p>

Просмотреть файл

@ -1,16 +1,24 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace RazorPageGridTest.Pages
{
public class PrivacyModel : PageModel
{
public void OnGet()
{
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.Logging;
namespace Kendo.Examples.RazorPages.Pages
{
public class PrivacyModel : PageModel
{
private readonly ILogger<PrivacyModel> _logger;
public PrivacyModel(ILogger<PrivacyModel> logger)
{
_logger = logger;
}
public void OnGet()
{
}
}
}

Просмотреть файл

@ -0,0 +1,4 @@
@using Kendo.Mvc.UI
@model DateTime?
@(Html.Kendo().TimePickerFor(m => m).Format("{0:hh:mm tt}"))

Просмотреть файл

@ -0,0 +1,59 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Kendo.Examples.RazorPages</title>
<link href="https://kendo.cdn.telerik.com/2019.3.1023/styles/kendo.common-material.min.css" rel="stylesheet" type="text/css" />
<link href="https://kendo.cdn.telerik.com/2019.3.1023/styles/kendo.mobile.all.min.css" rel="stylesheet" type="text/css" />
<link href="https://kendo.cdn.telerik.com/2019.3.1023/styles/kendo.material.min.css" rel="stylesheet" type="text/css" />
<script src="https://kendo.cdn.telerik.com/2019.3.1023/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2019.3.1023/js/jszip.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2019.3.1023/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2019.3.1023/js/kendo.aspnetmvc.min.js"></script>
<link rel="stylesheet" href="~/lib/bootstrap/dist/css/bootstrap.min.css" />
<link rel="stylesheet" href="~/css/site.css" />
</head>
<body>
<header>
<nav class="navbar navbar-expand-sm navbar-toggleable-sm navbar-light bg-white border-bottom box-shadow mb-3">
<div class="container">
<a class="navbar-brand" asp-area="" asp-page="/Index">Kendo.Examples.RazorPages</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target=".navbar-collapse" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="navbar-collapse collapse d-sm-inline-flex flex-sm-row-reverse">
<ul class="navbar-nav flex-grow-1">
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-page="/Index">Home</a>
</li>
<li class="nav-item">
<a class="nav-link text-dark" asp-area="" asp-page="/Privacy">Privacy</a>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div class="container">
<main role="main" class="pb-3">
@RenderBody()
</main>
</div>
<footer class="border-top footer text-muted">
<div class="container">
&copy; 2019 - Kendo.Examples.RazorPages - <a asp-area="" asp-page="/Privacy">Privacy</a>
</div>
</footer>
<script src="~/lib/bootstrap/dist/js/bootstrap.bundle.min.js"></script>
<script src="~/js/site.js" asp-append-version="true"></script>
@RenderSection("Scripts", required: false)
</body>
</html>

Просмотреть файл

@ -0,0 +1,2 @@
<script src="~/lib/jquery-validation/dist/jquery.validate.min.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"></script>

Просмотреть файл

@ -0,0 +1,5 @@
@using Kendo.Examples.RazorPages
@namespace Kendo.Examples.RazorPages.Pages
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Kendo.Mvc
@using Kendo.Mvc.UI

Просмотреть файл

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
namespace Kendo.Examples.RazorPages
{
public class Program
{
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
});
}
}

Просмотреть файл

@ -1,27 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:64813",
"sslPort": 44377
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"RazorPageGridTest": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:65194",
"sslPort": 44361
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"Kendo.Examples.RazorPages": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:5001;http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

Просмотреть файл

@ -4,14 +4,13 @@ using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.HttpsPolicy;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Newtonsoft.Json.Serialization;
namespace GridRazorPagesApp
namespace Kendo.Examples.RazorPages
{
public class Startup
{
@ -25,19 +24,18 @@ namespace GridRazorPagesApp
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.Configure<CookiePolicyOptions>(options =>
{
// This lambda determines whether user consent for non-essential cookies is needed for a given request.
options.CheckConsentNeeded = context => true;
options.MinimumSameSitePolicy = SameSiteMode.None;
});
services.AddMvc()
.AddNewtonsoftJson(options =>
options.SerializerSettings.ContractResolver =
new DefaultContractResolver());
services.AddRazorPages();
services.AddKendo();
services.AddMvc().AddJsonOptions(options => options.SerializerSettings.ContractResolver = new DefaultContractResolver());
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
if (env.IsDevelopment())
{
@ -46,14 +44,21 @@ namespace GridRazorPagesApp
else
{
app.UseExceptionHandler("/Error");
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
app.UseHsts();
}
app.UseHttpsRedirection();
app.UseStaticFiles();
app.UseCookiePolicy();
app.UseMvc();
app.UseRouting();
app.UseAuthorization();
app.UseEndpoints(endpoints =>
{
endpoints.MapRazorPages();
});
}
}
}

Просмотреть файл

@ -0,0 +1,10 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}

Просмотреть файл

@ -0,0 +1,71 @@
/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */
a.navbar-brand {
white-space: normal;
text-align: center;
word-break: break-all;
}
/* Provide sufficient contrast against white background */
a {
color: #0366d6;
}
.btn-primary {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
color: #fff;
background-color: #1b6ec2;
border-color: #1861ac;
}
/* Sticky footer styles
-------------------------------------------------- */
html {
font-size: 14px;
}
@media (min-width: 768px) {
html {
font-size: 16px;
}
}
.border-top {
border-top: 1px solid #e5e5e5;
}
.border-bottom {
border-bottom: 1px solid #e5e5e5;
}
.box-shadow {
box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}
button.accept-policy {
font-size: 1rem;
line-height: inherit;
}
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 60px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
white-space: nowrap;
line-height: 60px; /* Vertically center the text there */
}

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 31 KiB

После

Ширина:  |  Высота:  |  Размер: 31 KiB

Просмотреть файл

@ -1,6 +1,7 @@
The MIT License (MIT)
Copyright (c) 2011-2016 Twitter, Inc.
Copyright (c) 2011-2018 Twitter, Inc.
Copyright (c) 2011-2018 The Bootstrap Authors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,7 +1,7 @@
/*!
* Bootstrap Reboot v4.1.3 (https://getbootstrap.com/)
* Copyright 2011-2018 The Bootstrap Authors
* Copyright 2011-2018 Twitter, Inc.
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/
@ -15,22 +15,16 @@ html {
font-family: sans-serif;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
-ms-overflow-style: scrollbar;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
@-ms-viewport {
width: device-width;
}
article, aside, figcaption, figure, footer, header, hgroup, main, nav, section {
display: block;
}
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 400;
line-height: 1.5;
@ -66,6 +60,8 @@ abbr[data-original-title] {
text-decoration: underline dotted;
cursor: help;
border-bottom: 0;
-webkit-text-decoration-skip-ink: none;
text-decoration-skip-ink: none;
}
address {
@ -101,10 +97,6 @@ blockquote {
margin: 0 0 1rem;
}
dfn {
font-style: italic;
}
b,
strong {
font-weight: bolder;
@ -134,7 +126,6 @@ a {
color: #007bff;
text-decoration: none;
background-color: transparent;
-webkit-text-decoration-skip: objects;
}
a:hover {
@ -168,7 +159,6 @@ pre {
margin-top: 0;
margin-bottom: 1rem;
overflow: auto;
-ms-overflow-style: scrollbar;
}
figure {
@ -236,13 +226,24 @@ select {
text-transform: none;
}
select {
word-wrap: normal;
}
button,
html [type="button"],
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button:not(:disabled),
[type="button"]:not(:disabled),
[type="reset"]:not(:disabled),
[type="submit"]:not(:disabled) {
cursor: pointer;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
@ -302,7 +303,6 @@ progress {
-webkit-appearance: none;
}
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -0,0 +1,8 @@
/*!
* Bootstrap Reboot v4.3.1 (https://getbootstrap.com/)
* Copyright 2011-2019 The Bootstrap Authors
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)
*/*,::after,::before{box-sizing:border-box}html{font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}article,aside,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";font-size:1rem;font-weight:400;line-height:1.5;color:#212529;text-align:left;background-color:#fff}[tabindex="-1"]:focus{outline:0!important}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:#007bff;text-decoration:none;background-color:transparent}a:hover{color:#0056b3;text-decoration:underline}a:not([href]):not([tabindex]){color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus,a:not([href]):not([tabindex]):hover{color:inherit;text-decoration:none}a:not([href]):not([tabindex]):focus{outline:0}code,kbd,pre,samp{font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;font-size:1em}pre{margin-top:0;margin-bottom:1rem;overflow:auto}figure{margin:0 0 1rem}img{vertical-align:middle;border-style:none}svg{overflow:hidden;vertical-align:middle}table{border-collapse:collapse}caption{padding-top:.75rem;padding-bottom:.75rem;color:#6c757d;text-align:left;caption-side:bottom}th{text-align:inherit}label{display:inline-block;margin-bottom:.5rem}button{border-radius:0}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,input{overflow:visible}button,select{text-transform:none}select{word-wrap:normal}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]:not(:disabled),[type=reset]:not(:disabled),[type=submit]:not(:disabled),button:not(:disabled){cursor:pointer}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{padding:0;border-style:none}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=date],input[type=datetime-local],input[type=month],input[type=time]{-webkit-appearance:listbox}textarea{overflow:auto;resize:vertical}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;max-width:100%;padding:0;margin-bottom:.5rem;font-size:1.5rem;line-height:inherit;color:inherit;white-space:normal}progress{vertical-align:baseline}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{outline-offset:-2px;-webkit-appearance:none}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}output{display:inline-block}summary{display:list-item;cursor:pointer}template{display:none}[hidden]{display:none!important}
/*# sourceMappingURL=bootstrap-reboot.min.css.map */

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -1,6 +1,7 @@
// Unobtrusive validation support library for jQuery and jQuery Validate
// Copyright (C) Microsoft Corporation. All rights reserved.
// @version v3.2.9
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
// @version v3.2.11
/*jslint white: true, browser: true, onevar: true, undef: true, nomen: true, eqeqeq: true, plusplus: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: false */
/*global document: false, jQuery: false */
@ -8,7 +9,7 @@
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define("jquery.validate.unobtrusive", ['jquery.validation'], factory);
define("jquery.validate.unobtrusive", ['jquery-validation'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports
module.exports = factory(require('jquery-validation'));
@ -117,7 +118,7 @@
.removeClass("field-validation-error")
.removeData("unobtrusiveContainer")
.find(">*") // If we were using valmsg-replace, get the underlying error
.removeData("unobtrusiveContainer");
.removeData("unobtrusiveContainer");
}
function validationInfo(form) {
@ -233,10 +234,10 @@
// element with data-val=true
var $selector = $(selector),
$forms = $selector.parents()
.addBack()
.filter("form")
.add($selector.find("form"))
.has("[data-val=true]");
.addBack()
.filter("form")
.add($selector.find("form"))
.has("[data-val=true]");
$selector.find("[data-val=true]").each(function () {
$jQval.unobtrusive.parseElement(this, true);
@ -428,4 +429,4 @@
});
return $jQval.unobtrusive;
}));
}));

Просмотреть файл

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear /> <!-- ensure only the sources defined below are used -->
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Telerik.UI.for.AspNet.Core.Trial.2019.3.1023" value=".\\src" />
</packageSources>
</configuration>

Двоичный файл не отображается.

Просмотреть файл

@ -3,13 +3,25 @@ A collection of Telerik UI for ASP.NET Core examples
- The sample ASP.NET Core projects are provided to demonstrate different frequently asked questions, features and scenarios.
- They are not part of our testing procedures and should be regarded as a knowledge base.
- Projects are tested only upon creation well as an update or upgrade of the project.
- Projects are tested only upon creation as well as when updating or upgrading the project.
- Mandatory prerequisite is to have installed ASP.NET Core 3.0
**If you download a project and run it (without upgrading it first) it should run without errors.**
To run projects from this repository:
To run the projects from this repository:
1. Clone the repo
2. Open the .sln file in VS2017
3. Clean the solution
4. Build the solution and run the project.
## Kendo.Examples.Mvc
1. Open the Kendo.Examples.Mvc.sln file in VS2019
2. Clean the solution
3. Build the solution and run the project.
4. Navigate to a certain example by adding the ControllerName/ActionMethod to the URL, i.e https://localhost:44361/ajaxbinding/ajaxbinding
> The project uses a local database which is created upon building the project based on the existent migrations.
## Kendo.Examples.RazorPages
1. Open the Kendo.Examples.RazorPages.sln file in VS2019
2. Clean the solution
3. Build the solution and run the project.
4. Navigate to a certain example by adding the PageFolder/ViewName to the URL, i.e https://localhost:44361/grid/gridcustomdatasource

Просмотреть файл

@ -1,46 +0,0 @@
@model Kendo.Examples.Mvc.Models.EditorData
@{
ViewData["Title"] = "Create";
}
<h1>Create</h1>
<h4>EditorData</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create" id="EditorDataForm">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="EditorContent"></label>
<kendo-editor for="EditorContent">
</kendo-editor>
<span asp-validation-for="EditorContent" class="text-danger k-invalid-msg" data-for="EditorContent"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="k-button k-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index" class="k-button">Back to List</a>
</div>
<script>
$(document).ready(function () {
$("#EditorDataForm").kendoValidator({
// You can define your custom rules here:
//rules: {}
});
})
</script>
<style>
.k-editor{
width:800px !important;
height:400px !important;
}
</style>

Просмотреть файл

@ -1,27 +0,0 @@
@model Kendo.Examples.Mvc.Models.EditorData
@{
ViewData["Title"] = "Delete";
}
<h1>Delete</h1>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>EditorData</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.EditorContent)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.EditorContent)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="ContentId" />
<input type="submit" value="Delete" class="k-button k-primary" /> |
<a asp-action="EditorContent" class="k-button">Back to List</a>
</form>
</div>

Просмотреть файл

@ -1,24 +0,0 @@
@model Kendo.Examples.Mvc.Models.EditorData
b4
@{
ViewData["Title"] = "Details";
}
<h1>Details</h1>
<div>
<h4>EditorData</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.EditorContent)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.EditorContent)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.ContentId" class="k-button k-primary">Edit</a> |
<a asp-action="Index" class="k-button">Back to List</a>
</div>

Просмотреть файл

@ -1,50 +0,0 @@
@model Kendo.Examples.Mvc.Models.EditorData
@{
ViewData["Title"] = "Edit";
}
<h1>Edit</h1>
<h4>EditorData</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit" id="EditorDataForm">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="ContentId" />
<div class="form-group">
<label asp-for="EditorContent"></label>
<kendo-editor for="EditorContent">
</kendo-editor>
<span asp-validation-for="EditorContent" class="text-danger k-invalid-msg" data-for="EditorContent"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="k-button k-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index" class="k-button">Back to List</a>
</div>
<script>
$(document).ready(function () {
$("#EditorDataForm").kendoValidator({
// You can define your custom rules here:
//rules: {}
});
})
</script>
<style>
.k-editor {
width: 800px !important;
height: 400px !important;
}
</style>

Просмотреть файл

@ -1,30 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.352
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gantt_RazorPages", "Gantt-RazorPages\Gantt_RazorPages.csproj", "{67087845-DE6D-41E8-9726-85CA46E9A78D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3397380D-3299-4AE6-9BFF-9B722E3DAFC7}"
ProjectSection(SolutionItems) = preProject
global.json = global.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{67087845-DE6D-41E8-9726-85CA46E9A78D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{67087845-DE6D-41E8-9726-85CA46E9A78D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{67087845-DE6D-41E8-9726-85CA46E9A78D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{67087845-DE6D-41E8-9726-85CA46E9A78D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {01E63EFB-BB7A-4A9A-9E24-7808F6F36017}
EndGlobalSection
EndGlobal

Просмотреть файл

@ -1,23 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Telerik.UI.for.AspNet.Core" Version="2019.2.619" />
</ItemGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DefineConstants>$(DefineConstants);RELEASE</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Templates\**" />
<Content Remove="Templates\**" />
<EmbeddedResource Remove="Templates\**" />
<None Remove="Templates\**" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ActiveDebugProfile>IIS Express</ActiveDebugProfile>
</PropertyGroup>
</Project>

Просмотреть файл

@ -1,9 +0,0 @@
@page
@model AboutModel
@{
ViewData["Title"] = "About";
}
<h2>@ViewData["Title"]</h2>
<h3>@Model.Message</h3>
<p>Use this area to provide additional information.</p>

Просмотреть файл

@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Gantt_RazorPages.Pages
{
public class AboutModel : PageModel
{
public string Message { get; set; }
public void OnGet()
{
Message = "Your application description page.";
}
}
}

Просмотреть файл

@ -1,19 +0,0 @@
@page
@model ContactModel
@{
ViewData["Title"] = "Contact";
}
<h2>@ViewData["Title"]</h2>
<h3>@Model.Message</h3>
<address>
One Microsoft Way<br />
Redmond, WA 98052-6399<br />
<abbr title="Phone">P:</abbr>
425.555.0100
</address>
<address>
<strong>Support:</strong> <a href="mailto:Support@example.com">Support@example.com</a><br />
<strong>Marketing:</strong> <a href="mailto:Marketing@example.com">Marketing@example.com</a>
</address>

Просмотреть файл

@ -1,18 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Gantt_RazorPages.Pages
{
public class ContactModel : PageModel
{
public string Message { get; set; }
public void OnGet()
{
Message = "Your contact page.";
}
}
}

Просмотреть файл

@ -1,23 +0,0 @@
@page
@model ErrorModel
@{
ViewData["Title"] = "Error";
}
<h1 class="text-danger">Error.</h1>
<h2 class="text-danger">An error occurred while processing your request.</h2>
@if (Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
</p>

Просмотреть файл

@ -1,23 +0,0 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Gantt_RazorPages.Pages
{
public class ErrorModel : PageModel
{
public string RequestId { get; set; }
public bool ShowRequestId => !string.IsNullOrEmpty(RequestId);
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public void OnGet()
{
RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier;
}
}
}

Просмотреть файл

@ -1,8 +0,0 @@
@page
@model PrivacyModel
@{
ViewData["Title"] = "Privacy Policy";
}
<h2>@ViewData["Title"]</h2>
<p>Use this page to detail your site's privacy policy.</p>

Просмотреть файл

@ -1,16 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;
namespace Gantt_RazorPages.Pages
{
public class PrivacyModel : PageModel
{
public void OnGet()
{
}
}
}

Просмотреть файл

@ -1,41 +0,0 @@
@using Microsoft.AspNetCore.Http.Features
@{
var consentFeature = Context.Features.Get<ITrackingConsentFeature>();
var showBanner = !consentFeature?.CanTrack ?? false;
var cookieString = consentFeature?.CreateConsentCookie();
}
@if (showBanner)
{
<nav id="cookieConsent" class="navbar navbar-default navbar-fixed-top" role="alert">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#cookieConsent .navbar-collapse">
<span class="sr-only">Toggle cookie consent banner</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<span class="navbar-brand"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></span>
</div>
<div class="collapse navbar-collapse">
<p class="navbar-text">
Use this space to summarize your privacy and cookie use policy.
</p>
<div class="navbar-right">
<a asp-page="/Privacy" class="btn btn-info navbar-btn">Learn More</a>
<button type="button" class="btn btn-default navbar-btn" data-cookie-string="@cookieString">Accept</button>
</div>
</div>
</div>
</nav>
<script>
(function () {
document.querySelector("#cookieConsent button[data-cookie-string]").addEventListener("click", function (el) {
document.cookie = el.target.dataset.cookieString;
document.querySelector("#cookieConsent").classList.add("hidden");
}, false);
})();
</script>
}

Просмотреть файл

@ -1,18 +0,0 @@
<environment include="Development">
<script src="~/lib/jquery-validation/dist/jquery.validate.js"></script>
<script src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js"></script>
</environment>
<environment exclude="Development">
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.17.0/jquery.validate.min.js"
asp-fallback-src="~/lib/jquery-validation/dist/jquery.validate.min.js"
asp-fallback-test="window.jQuery && window.jQuery.validator"
crossorigin="anonymous"
integrity="sha384-rZfj/ogBloos6wzLGpPkkOr/gpkBNLZ6b6yLy4o+ok+t/SAKlL5mvXLr0OXNi1Hp">
</script>
<script src="https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.9/jquery.validate.unobtrusive.min.js"
asp-fallback-src="~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js"
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive"
crossorigin="anonymous"
integrity="sha384-ifv0TYDWxBHzvAk2Z0n8R434FL1Rlv/Av18DXE43N/1rvHyOG4izKst0f2iSLdds">
</script>
</environment>

Просмотреть файл

@ -1,57 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>@ViewData["Title"] - Gantt_RazorPages</title>
<link href="https://kendo.cdn.telerik.com/2019.2.619/styles/kendo.bootstrap-v4.min.css" rel="stylesheet" type="text/css" />
<script src="https://kendo.cdn.telerik.com/2019.2.619/js/jquery.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2019.2.619/js/jszip.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2019.2.619/js/kendo.all.min.js"></script>
<script src="https://kendo.cdn.telerik.com/2019.2.619/js/kendo.aspnetmvc.min.js"></script>
<environment include="Development">
<link rel="stylesheet" href="~/lib/bootstrap/css/bootstrap.css" />
<link rel="stylesheet" href="~/css/site.css" />
</environment>
<environment exclude="Development">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"
asp-fallback-href="~/lib/bootstrap/css/bootstrap.min.css"
asp-fallback-test-class="sr-only" asp-fallback-test-property="position" asp-fallback-test-value="absolute" />
<link rel="stylesheet" href="~/css/site.min.css" asp-append-version="true" />
</environment>
</head>
<body class="k-content">
<nav class="navbar navbar-dark bg-dark mb-5">
<div class="k-header container">
<a class="navbar-brand" asp-controller="Home" asp-action="Index">Your .NET Core Application</a>
</div>
</nav>
<main>
<div class="container">
@RenderBody()
</div>
</main>
<footer class="footer text-center d-flex align-items-center">
<div class="container-fluid">
<p class="text-muted">
Copyright © @DateTime.Now.Year Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.
</p>
</div>
</footer>
<environment names="Development">
<script src="~/lib/bootstrap/js/bootstrap.js"></script>
</environment>
<environment names="Staging,Production">
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js"
asp-fallback-src="~/lib/bootstrap/js/bootstrap.min.js"
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"></script>
</environment>
@RenderSection("Scripts", required: false)
</body>
</html>

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше