Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class Customer
- {
- public Customer()
- {
- this.Consignee = new HashSet<Consignee>();
- }
- public int idCustomer { get; set; }
- public string nameCustomer { get; set; }
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
- public virtual ICollection<Consignee> Consignee { get; set; }
- }
- public partial class Consignee
- {
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
- public Consignee()
- {
- this.Servers = new HashSet<Servers>();
- this.Systems = new HashSet<Systems>();
- }
- public int idConsignee { get; set; }
- public int idCustomerConsignee { get; set; }
- public string nameConsignee { get; set; }
- public virtual Customer Customer { get; set; }
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
- public virtual ICollection<Servers> Servers { get; set; }
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
- public virtual ICollection<Systems> Systems { get; set; }
- }
- public partial class Servers
- {
- [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
- public Servers()
- {
- this.Licence = new HashSet<Licence>();
- }
- public string idUidServer { get; set; }
- public string ipServer { get; set; }
- public Nullable<int> idConsigneeServer { get; set; }
- public virtual Consignee Consignee { get; set; }
- }
- <TreeView x:Name="tvForLic">
- <TreeView.ItemTemplate>
- <HierarchicalDataTemplate ItemsSource="{Binding Path = Consignee}" >
- <TextBlock Text="{Binding Path= nameCustomer}" />
- <HierarchicalDataTemplate.ItemTemplate>
- <DataTemplate>
- <TextBlock Text="{Binding Path= nameConsignee}" />
- </DataTemplate>
- </HierarchicalDataTemplate.ItemTemplate>
- </HierarchicalDataTemplate>
- </TreeView.ItemTemplate>
- </TreeView>
- <TreeView x:Name="tvForSystem" ItemsSource="{Binding Consignee}">
- <TreeView.Resources>
- <HierarchicalDataTemplate DataType="{x:Type local:Systems}" ItemsSource="{Binding Consignee}">
- <StackPanel Orientation="Horizontal">
- <CheckBox Margin="2" />
- <TextBlock Text="{Binding nameSystem}" />
- </StackPanel>
- </HierarchicalDataTemplate>
- <HierarchicalDataTemplate DataType="{x:Type local:Customer}" ItemsSource="{Binding Consignee}">
- <StackPanel Orientation="Horizontal">
- <CheckBox Margin="2" />
- <TextBlock Text="{Binding nameCustomer}" />
- </StackPanel>
- </HierarchicalDataTemplate>
- </TreeView.Resources>
- </TreeView>
- xmlns:local="clr-namespace:LicenseManager"
- <TreeView x:Name="tvForSystem" ItemsSource="{Binding Consignee}">
- <TreeView.Resources>
- <HierarchicalDataTemplate DataType="{x:Type local:Customer}" ItemsSource="{Binding Consignee}" >
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding nameCustomer}" />
- </StackPanel>
- </HierarchicalDataTemplate>
- <HierarchicalDataTemplate DataType="{x:Type local:Consignee}" ItemsSource="{Binding Consignee}">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding nameConsignee}" />
- </StackPanel>
- </HierarchicalDataTemplate>
- <DataTemplate DataType="{x:Type local:Systems}">
- <StackPanel Orientation="Horizontal">
- <TextBlock Text="{Binding nameConsignee}" />
- </StackPanel>
- </DataTemplate>
- </TreeView.Resources>
Add Comment
Please, Sign In to add comment