Yunus Emre Kalkan 8 years ago
parent
commit
321c0620be
  1. 4
      docs/Tutorials/AspNetCore-Mvc/Part-I.md
  2. 14
      framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Pages/Components/DynamicForms.cshtml.cs
  3. 5
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs
  4. 3
      modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs
  5. 3
      modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/Edit.cshtml.cs
  6. 3
      modules/blogging/src/Volo.Blogging.Web/Pages/Blog/Posts/New.cshtml.cs
  7. 10
      samples/BookStore/src/Acme.BookStore.Application/CreateUpdateBookDto.cs

4
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; }
}
}

14
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]

5
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; }
}
}

3
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; }
}
}

3
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; }
}
}

3
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; }
}
}

10
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; }
}
}
Loading…
Cancel
Save