029 Third View (Division) - chempkovsky/CS82ANGULAR GitHub Wiki
- First page of the Wizard
- Second page of the Wizard
- Third page of the Wizard
- Fourth page of the Wizard
- Fifth page of the Wizard
- Sixth page of the Wizard
- Seventh page of the Wizard
- Eighth page of the Wizard
- Ninth page of the Wizard
read the following article as reminder
repeat the steps described in the article
repeat the steps described in the article
repeat the steps described in the article
- On the third page of the Wizard we select Entity for the View. Choose
PhBkEntity.csproj
andPhbkDivision
-class and clickNext
-button
Click to show the picture
repeat the steps described in the article
- On the fifth page of the Wizard we define subset of properties, we turn on
Jenerate JsonProperty Attribute
-CheckBox, weTitle
andPlural Title
for the given view.
Click to show the picture
- On the fifth page of the Wizard click
Foreign Keys / Enterprise: Divisions
node in the tree- In the right panel select master View (in our case it is
PhbkEnterpriseView
)
- In the right panel select master View (in our case it is
Click to show the picture
- On the fifth page of the Wizard click
Foreign Keys / Enterprise: Divisions
node in the tree- In the right panel replace
EnterprisePhbkEnterpriseView
withE
in theForeign Key Prefix
-control
- In the right panel replace
Click to show the picture
- On the fifth page of the Wizard click
Foreign Keys / Enterprise: Divisions
node in the tree- expand
Properties
-sub node - uncheck
EEntrprsId
- property - uncheck
EEntrprsDesc
- property
- expand
Click to show the picture
- click
Next
-button
repeat the steps described in the article
repeat the steps described in the article
The PhbkDivisionView.cs
will be created in the PhBk
-folder of the PhBkViews.csproj
-project
Click to show the code
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Linq.Expressions;
using System.Text.Json.Serialization;
namespace PhBkViews.PhBk {
public class PhbkDivisionView {
// [JsonProperty(PropertyName = "divisionId")]
[JsonPropertyName("divisionId")]
[Required]
[Display(Description="Row id",Name="Id of the Division",Prompt="Enter Division Id",ShortName="Division Id")]
public System.Int32 DivisionId { get; set; }
// [JsonProperty(PropertyName = "divisionName")]
[JsonPropertyName("divisionName")]
[Required]
[Display(Description="Name of the Enterprise Division",Name="Name of the Division",Prompt="Enter Division Name",ShortName="Division Name")]
[StringLength(20,MinimumLength=3,ErrorMessage="Invalid")]
public System.String DivisionName { get; set; } = null!;
// [JsonProperty(PropertyName = "divisionDesc")]
[JsonPropertyName("divisionDesc")]
[Display(Description="Description of the Enterprise Division",Name="Description of the Division",Prompt="Enter Enterprise Division Description",ShortName="Division Description")]
[StringLength(250,ErrorMessage="Invalid")]
public System.String ? DivisionDesc { get; set; }
// [JsonProperty(PropertyName = "entrprsIdRef")]
[JsonPropertyName("entrprsIdRef")]
[Required]
[Display(Description="Row id",Name="Id of the Enterprise",Prompt="Enter Enterprise Id",ShortName="Enterprise Id")]
public System.Int32 EntrprsIdRef { get; set; }
// [JsonProperty(PropertyName = "eEntrprsName")]
[JsonPropertyName("eEntrprsName")]
[Required]
[Display(Description="Name of the Enterprise",Name="Name of the Enterprise",Prompt="Enter Enterprise Name",ShortName="Enterprise Name")]
[StringLength(20,MinimumLength=3,ErrorMessage="Invalid")]
public System.String EEntrprsName { get; set; } = null!;
}
}
repeat the steps described in the article
repeat the steps described in the article
The PhbkDivisionViewPage.cs
will be created in the PhBk
-folder of the PhBkViews.csproj
-project
Click to show the code
//using System;
//using System.Collections.Generic;
//using System.ComponentModel.DataAnnotations;
//using System.Linq;
//using System.Linq.Expressions;
// using Newtonsoft.Json;
// using Newtonsoft.Json.Serialization;
namespace PhBkViews.PhBk {
public class PhbkDivisionViewPage {
public int page { get; set; }
public int pagesize { get; set; }
public int pagecount { get; set; }
public int total { get; set; }
public List<PhbkDivisionView> items { get; set; } = null!;
}
}
- After
Save
-operation in the solution folder the Wizard's repo file will be created(or updated). - A separate repo file is created for each DbContext.
- The repo file is updated only when you click the save button.