Skip to content

Commit 50e5268

Browse files
committed
Created Orders page
1 parent c22342b commit 50e5268

File tree

4 files changed

+60
-6
lines changed

4 files changed

+60
-6
lines changed

ModularCRM/modules/modularcrm.ordering/ModularCrm.Ordering.sln

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
#
4-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModularCrm.Ordering.Contracts", "ModularCrm.Ordering.Contracts\ModularCrm.Ordering.Contracts.csproj", "{1BAC7BA9-CA00-483F-AC4B-171650DBA677}"
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.11.35208.52
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModularCrm.Ordering.Contracts", "ModularCrm.Ordering.Contracts\ModularCrm.Ordering.Contracts.csproj", "{1BAC7BA9-CA00-483F-AC4B-171650DBA677}"
57
EndProject
6-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModularCrm.Ordering", "ModularCrm.Ordering\ModularCrm.Ordering.csproj", "{823675BD-DC5A-4864-8182-66CE0044C564}"
8+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ModularCrm.Ordering", "ModularCrm.Ordering\ModularCrm.Ordering.csproj", "{823675BD-DC5A-4864-8182-66CE0044C564}"
79
EndProject
810
Global
911
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -14,9 +16,6 @@ Global
1416
Release|x64 = Release|x64
1517
Release|x86 = Release|x86
1618
EndGlobalSection
17-
GlobalSection(SolutionProperties) = preSolution
18-
HideSolutionNode = FALSE
19-
EndGlobalSection
2019
GlobalSection(ProjectConfigurationPlatforms) = postSolution
2120
{1BAC7BA9-CA00-483F-AC4B-171650DBA677}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2221
{1BAC7BA9-CA00-483F-AC4B-171650DBA677}.Debug|Any CPU.Build.0 = Debug|Any CPU
@@ -43,4 +42,10 @@ Global
4342
{823675BD-DC5A-4864-8182-66CE0044C564}.Release|x86.ActiveCfg = Release|Any CPU
4443
{823675BD-DC5A-4864-8182-66CE0044C564}.Release|x86.Build.0 = Release|Any CPU
4544
EndGlobalSection
45+
GlobalSection(SolutionProperties) = preSolution
46+
HideSolutionNode = FALSE
47+
EndGlobalSection
48+
GlobalSection(ExtensibilityGlobals) = postSolution
49+
SolutionGuid = {7FE275E9-D48D-4563-9CAB-2A3A652AE17A}
50+
EndGlobalSection
4651
EndGlobal
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
@page
2+
@model ModularCrm.Ordering.Pages.Orders.IndexModel
3+
<h1>Orders</h1>
4+
5+
<abp-card>
6+
<abp-card-body>
7+
<abp-list-group>
8+
@foreach (var order in Model.Orders)
9+
{
10+
<abp-list-group-item>
11+
<strong>Customer:</strong> @order.CustomerName <br />
12+
<strong>Product:</strong> @order.ProductId <br />
13+
<strong>State:</strong> @order.State
14+
</abp-list-group-item>
15+
}
16+
</abp-list-group>
17+
</abp-card-body>
18+
</abp-card>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
using Microsoft.AspNetCore.Mvc;
2+
using Microsoft.AspNetCore.Mvc.RazorPages;
3+
using ModularCrm.Ordering.Entities;
4+
using System;
5+
using System.Collections.Generic;
6+
using System.Threading.Tasks;
7+
using Volo.Abp.Domain.Repositories;
8+
9+
namespace ModularCrm.Ordering.Pages.Orders
10+
{
11+
public class IndexModel : PageModel
12+
{
13+
public List<Order> Orders { get; set; }
14+
15+
private readonly IRepository<Order, Guid> _orderRepository;
16+
17+
public IndexModel(IRepository<Order, Guid> orderRepository)
18+
{
19+
_orderRepository = orderRepository;
20+
}
21+
22+
public async Task OnGetAsync()
23+
{
24+
Orders = await _orderRepository.GetListAsync();
25+
}
26+
}
27+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
2+
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
3+
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
4+
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

0 commit comments

Comments
 (0)