Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rendelosch
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
JetBrains YouTrack
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
KSZK
DevTeam
Rendelosch
Commits
3826d395
Commit
3826d395
authored
1 year ago
by
Laci
Browse files
Options
Downloads
Patches
Plain Diff
Második alkalom
parent
d53dfe31
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
Rendelosch/Models/ProductForm.cs
+9
-2
9 additions, 2 deletions
Rendelosch/Models/ProductForm.cs
Rendelosch/Pages/SubmitForm.cshtml
+27
-0
27 additions, 0 deletions
Rendelosch/Pages/SubmitForm.cshtml
Rendelosch/Pages/SubmitForm.cshtml.cs
+19
-0
19 additions, 0 deletions
Rendelosch/Pages/SubmitForm.cshtml.cs
with
55 additions
and
2 deletions
Rendelosch/Models/ProductForm.cs
+
9
−
2
View file @
3826d395
namespace
Rendelosch.Model
s
;
using
System.Collection
s
;
public
class
ProductForm
namespace
Rendelosch.Models
;
public
class
ProductForm
:
IEnumerable
{
{
public
readonly
string
Id
;
public
readonly
string
Id
;
public
readonly
string
Title
;
public
readonly
string
Title
;
...
@@ -15,4 +17,9 @@ public class ProductForm
...
@@ -15,4 +17,9 @@ public class ProductForm
Title
=
title
;
Title
=
title
;
Fields
=
fields
;
Fields
=
fields
;
}
}
public
IEnumerator
GetEnumerator
()
{
throw
new
NotImplementedException
();
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Rendelosch/Pages/SubmitForm.cshtml
0 → 100644
+
27
−
0
View file @
3826d395
@page "{Id}"
@model Rendelosch.Pages.SubmitForm
@{
ViewData["Title"] = "Submit";
}
<form
method=
"post"
>
<div
class=
"container-lg"
>
<h1>
@Model.Repository.GetProductForm(Request.RouteValues["Id"].ToString()).Title
</h1>
<div>
@foreach (var productForm in Model.Repository.GetProductForm(Request.RouteValues["Id"].ToString()).Fields)
{
<div
class=
"card-title col-6 m-0 me-3"
>
<Label
>
@productForm.Name
</Label>
<input
class=
"form-control col-6"
/>
</div>
}
<input
class=
"btn btn-primary mt-4"
type=
"submit"
/>
</div>
</div>
</form>
This diff is collapsed.
Click to expand it.
Rendelosch/Pages/SubmitForm.cshtml.cs
0 → 100644
+
19
−
0
View file @
3826d395
using
Microsoft.AspNetCore.Mvc.RazorPages
;
using
Rendelosch.Repository
;
namespace
Rendelosch.Pages
;
public
class
SubmitForm
:
PageModel
{
public
IProductFormRepository
Repository
{
get
;
}
public
SubmitForm
(
IProductFormRepository
repository
)
{
Repository
=
repository
;
}
public
void
OnPost
()
{
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment