-
Notifications
You must be signed in to change notification settings - Fork 39
Expand file tree
/
Copy pathAddCustomer.razor
More file actions
79 lines (76 loc) · 3.45 KB
/
AddCustomer.razor
File metadata and controls
79 lines (76 loc) · 3.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
@page "/add-customer"
@layout MainLayout
@inherits SimpleInvoiceManagementSoftware.Pages.AddCustomerComponent
@using Radzen
@using Radzen.Blazor
@using SimpleInvoiceManagementSoftware.Models.SimpleInvoice
@using Microsoft.AspNetCore.Identity;
@using SimpleInvoiceManagementSoftware.Models
@using Microsoft.AspNetCore.Authorization
@attribute [Authorize]
<RadzenContent Container="main">
<ChildContent>
<div class="row">
<div class="col-md-12">
<RadzenTemplateForm Data="@customer" Visible="@(customer != null)" TItem="SimpleInvoiceManagementSoftware.Models.SimpleInvoice.Customer" Submit="@Form0Submit">
<ChildContent>
<div style="margin-bottom: 1rem" class="row">
<div class="col-md-3">
<RadzenLabel Text="Name" Component="Name" style="width: 100%">
</RadzenLabel>
</div>
<div class="col-md-9">
<RadzenTextBox MaxLength="100" style="display: block; width: 100%" @bind-Value="@(customer.Name)" Name="Name">
</RadzenTextBox>
<RadzenRequiredValidator Component="Name" Text="Name is required" style="position: absolute">
</RadzenRequiredValidator>
</div>
</div>
<div style="margin-bottom: 1rem" class="row">
<div class="col-md-3">
<RadzenLabel Text="Description" Component="Description" style="width: 150%">
</RadzenLabel>
</div>
<div class="col-md-9">
<RadzenTextBox MaxLength="200" style="width: 100%" @bind-Value="@(customer.Description)" Name="Description">
</RadzenTextBox>
</div>
</div>
<div style="margin-bottom: 1rem" class="row">
<div class="col-md-3">
<RadzenLabel Text="Address" Component="Address" style="width: 100%">
</RadzenLabel>
</div>
<div class="col-md-9">
<RadzenTextBox MaxLength="200" style="display: block; width: 100%" @bind-Value="@(customer.Address)" Name="Address">
</RadzenTextBox>
<RadzenRequiredValidator Component="Address" Text="Address is required" style="position: absolute">
</RadzenRequiredValidator>
</div>
</div>
<div style="margin-bottom: 1rem" class="row">
<div class="col-md-3">
<RadzenLabel Text="City" Component="City" style="width: 100%">
</RadzenLabel>
</div>
<div class="col-md-9">
<RadzenTextBox MaxLength="100" style="display: block; width: 100%" @bind-Value="@(customer.City)" Name="City">
</RadzenTextBox>
<RadzenRequiredValidator Component="City" Text="City is required" style="position: absolute">
</RadzenRequiredValidator>
</div>
</div>
<div class="row">
<div class="col offset-sm-3">
<RadzenButton ButtonType="ButtonType.Submit" Icon="save" Text="Save" ButtonStyle="ButtonStyle.Primary">
</RadzenButton>
<RadzenButton ButtonStyle="ButtonStyle.Light" style="margin-left: 1rem" Text="Cancel" Click="@Button2Click">
</RadzenButton>
</div>
</div>
</ChildContent>
</RadzenTemplateForm>
</div>
</div>
</ChildContent>
</RadzenContent>