diff --git a/docs/Tutorials/AspNetCore-Mvc/Part-I.md b/docs/Tutorials/AspNetCore-Mvc/Part-I.md index d6966fd82d..5de17ef142 100644 --- a/docs/Tutorials/AspNetCore-Mvc/Part-I.md +++ b/docs/Tutorials/AspNetCore-Mvc/Part-I.md @@ -157,16 +157,12 @@ namespace Acme.BookStore { [Required] [StringLength(128)] - [Display(Name = "Name")] public string Name { get; set; } - [Display(Name = "Type")] public BookType Type { get; set; } = BookType.Undefined; - [Display(Name = "PublishDate")] public DateTime PublishDate { get; set; } - [Display(Name = "Price")] public float Price { get; set; } } } diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/DynamicForms.cshtml.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/DynamicForms.cshtml.cs index 2901ade738..27075bf09a 100644 --- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/DynamicForms.cshtml.cs +++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/DynamicForms.cshtml.cs @@ -46,33 +46,26 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components public class PersonModel { [Required] - [DisplayName("Name")] public string Name { get; set; } - - [DisplayName("Surname")] + [TextArea(Rows = 4)] public string Surname { get; set; } [Required] - [DisplayName("Age")] [Range(1, 100)] public int Age { get; set; } [Required] - [DisplayName("City")] public Cities City { get; set; } public PhoneModel Phone { get; set; } [DataType(DataType.Date)] - [DisplayName("Day")] [DisplayOrder(10003)] public DateTime Day { get; set; } - - [DisplayName("Is Active")] + public bool IsActive { get; set; } - - [DisplayName("Country")] + [AbpRadioButton(Inline = true)] [SelectItems(nameof(Countries))] public string Country { get; set; } @@ -82,7 +75,6 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Pages.Components { [Required] [DisplayOrder(10002)] - [DisplayName("Number")] public string Number { get; set; } [Required] diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs index b580300dda..558215e5f9 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs @@ -147,16 +147,13 @@ namespace Volo.Abp.Account.Web.Pages.Account { [Required] [StringLength(255)] - [DisplayName(nameof(UserNameOrEmailAddress))] public string UserNameOrEmailAddress { get; set; } [Required] [StringLength(32)] [DataType(DataType.Password)] - [DisplayName(nameof(Password))] public string Password { get; set; } - - [DisplayName(nameof(RememberMe))] + public bool RememberMe { get; set; } } } diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs index ae19ee27c4..170a783197 100644 --- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs +++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs @@ -62,19 +62,16 @@ namespace Volo.Abp.Account.Web.Pages.Account { [Required] [StringLength(32)] - [DisplayName(nameof(UserName))] public string UserName { get; set; } [Required] [EmailAddress] [StringLength(255)] - [DisplayName(nameof(EmailAddress))] public string EmailAddress { get; set; } [Required] [StringLength(32)] [DataType(DataType.Password)] - [DisplayName(nameof(Password))] public string Password { get; set; } } } diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs index 3e166ebd9d..18993f6ec3 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs @@ -58,16 +58,13 @@ namespace Volo.Blogging.Pages.Blog.Posts [Required] [StringLength(PostConsts.MaxTitleLength)] - [Display(Name = "Title")] public string Title { get; set; } [Required] [StringLength(PostConsts.MaxUrlLength)] - [Display(Name = "Url")] public string Url { get; set; } [StringLength(PostConsts.MaxContentLength)] - [Display(Name = "Content")] public string Content { get; set; } } } \ No newline at end of file diff --git a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs index cdd3ff3c88..8a8bbe0c15 100644 --- a/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs +++ b/modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs @@ -52,17 +52,14 @@ namespace Volo.Blogging.Pages.Blog.Posts [Required] [StringLength(PostConsts.MaxTitleLength)] - [Display(Name = "Title")] public string Title { get; set; } [Required] [StringLength(PostConsts.MaxUrlLength)] - [Display(Name = "Url")] public string Url { get; set; } [HiddenInput] [StringLength(PostConsts.MaxContentLength)] - [Display(Name = "Content")] public string Content { get; set; } } } diff --git a/samples/BookStore/src/Acme.BookStore.Application/CreateUpdateBookDto.cs b/samples/BookStore/src/Acme.BookStore.Application/CreateUpdateBookDto.cs index a74a786682..287faf3ece 100644 --- a/samples/BookStore/src/Acme.BookStore.Application/CreateUpdateBookDto.cs +++ b/samples/BookStore/src/Acme.BookStore.Application/CreateUpdateBookDto.cs @@ -10,16 +10,12 @@ namespace Acme.BookStore { [Required] [StringLength(128)] - [Display(Name = "Name")] public string Name { get; set; } - - [Display(Name = "Type")] + public BookType Type { get; set; } = BookType.Undefined; - - [Display(Name = "PublishDate")] + public DateTime PublishDate { get; set; } - - [Display(Name = "Price")] + public float Price { get; set; } } } \ No newline at end of file