Minor WPF Changes and Prepare for CTE Testat

This commit is contained in:
francesco 2020-08-09 16:17:41 +02:00
parent b67302361b
commit 7c24cf009b
39 changed files with 108 additions and 184 deletions

View File

@ -62,6 +62,7 @@
<Reference Include="System.Configuration" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Data" />
<Reference Include="System.Data.Linq" />
<Reference Include="System.Drawing" />
<Reference Include="System.Drawing.Design" />
<Reference Include="System.Management" />
@ -86,87 +87,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</ApplicationDefinition>
<Compile Include="DTO\abrechnung.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\address.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\contact.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\credentials.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\Customer.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\DataAccessLayer.Context.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>DataAccessLayer.Context.tt</DependentUpon>
</Compile>
<Compile Include="DTO\DataAccessLayer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\DataAccessLayer.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>DataAccessLayer.edmx</DependentUpon>
</Compile>
<Compile Include="DTO\device.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\deviceport.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\devicetype.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\interface.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\kundenkonto.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\Location.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\log.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\network.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\operatingsystem.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\person.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\pointofdelivery.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\produkte.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\produktegruppe.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\softwaredienstleistung.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\town.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\transportmedium.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="DTO\v_logentries.cs">
<DependentUpon>DataAccessLayer.tt</DependentUpon>
</Compile>
<Compile Include="Model\Customer.cs">
<DependentUpon>Inventar.tt</DependentUpon>
</Compile>
@ -262,13 +182,6 @@
<Generator>EntityModelCodeGenerator</Generator>
<LastGenOutput>Inventar.Designer.cs</LastGenOutput>
</EntityDeploy>
<EntityDeploy Include="DTO\DataAccessLayer.edmx">
<Generator>EntityModelCodeGenerator</Generator>
<LastGenOutput>DataAccessLayer.Designer.cs</LastGenOutput>
</EntityDeploy>
<None Include="DTO\DataAccessLayer.edmx.diagram">
<DependentUpon>DataAccessLayer.edmx</DependentUpon>
</None>
<None Include="Model\Inventar.edmx.diagram">
<DependentUpon>Inventar.edmx</DependentUpon>
</None>
@ -284,16 +197,6 @@
</None>
</ItemGroup>
<ItemGroup>
<Content Include="DTO\DataAccessLayer.Context.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>DataAccessLayer.edmx</DependentUpon>
<LastGenOutput>DataAccessLayer.Context.cs</LastGenOutput>
</Content>
<Content Include="DTO\DataAccessLayer.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<DependentUpon>DataAccessLayer.edmx</DependentUpon>
<LastGenOutput>DataAccessLayer.cs</LastGenOutput>
</Content>
<Content Include="Model\Inventar.Context.tt">
<Generator>TextTemplatingFileGenerator</Generator>
<LastGenOutput>Inventar.Context.cs</LastGenOutput>
@ -308,5 +211,11 @@
<ItemGroup>
<Service Include="{508349B6-6B84-4DF5-91F0-309BEEBAD82D}" />
</ItemGroup>
<ItemGroup>
<Folder Include="DTO\" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

0
LoggingClient/LoggingClient/MainWindow.xaml Executable file → Normal file
View File

0
LoggingClient/LoggingClient/MainWindow.xaml.cs Executable file → Normal file
View File

13
LoggingClient/LoggingClient/Model/Customer.cs Executable file → Normal file
View File

@ -9,19 +9,28 @@
namespace LoggingClient.Model
{
using System;
using System.Collections.Generic;
using System.Data.Linq.Mapping;
[Table(Name = "inventarisierungsloesung.Customer")]
public partial class Customer
{
[Column(IsPrimaryKey = true, Name = "CustomerId")]
public long customer_id { get; set; }
[Column(Name ="FirstName")]
public string firstname { get; set; }
[Column(Name = "LastName")]
public string lastname { get; set; }
[Column(Name = "CustomerNumber")]
public string customernumber { get; set; }
[Column(Name = "KundenKontoFK")]
public long kundenkonto_fk { get; set; }
[Column(Name = "PhoneNumber")]
public string tel { get; set; }
[Column(Name = "EMail")]
public string email { get; set; }
[Column(Name = "URL")]
public string url { get; set; }
[Column(Name = "Password")]
public string password { get; set; }
public Customer() { }

0
LoggingClient/LoggingClient/Model/Inventar.Context.cs Executable file → Normal file
View File

0
LoggingClient/LoggingClient/Model/Inventar.Context.tt Executable file → Normal file
View File

0
LoggingClient/LoggingClient/Model/Inventar.Designer.cs generated Executable file → Normal file
View File

0
LoggingClient/LoggingClient/Model/Inventar.cs Executable file → Normal file
View File

0
LoggingClient/LoggingClient/Model/Inventar.edmx Executable file → Normal file
View File

View File

0
LoggingClient/LoggingClient/Model/Inventar.tt Executable file → Normal file
View File

0
LoggingClient/LoggingClient/Model/Location.cs Executable file → Normal file
View File

0
LoggingClient/LoggingClient/Model/Logging.cs Executable file → Normal file
View File

0
LoggingClient/LoggingClient/Model/Model.cs Executable file → Normal file
View File

0
LoggingClient/LoggingClient/Model/Node.cs Executable file → Normal file
View File

View File

View File

View File

View File

@ -1,59 +1,66 @@
using System;
using LoggingClient.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LoggingClient.Repository
{
public class CustomerRepositoryLinq<Customer> : RepositoryBase<Customer>
public class CustomerRepositoryLinq
{
public List<Customer> Customers { get; set; }
public CustomerRepositoryLinq(string connectionString) : base(connectionString)
inventarisierungsloesungEntities _dataContext;
public CustomerRepositoryLinq()
{
Customers = new List<Customer>();
_dataContext = new inventarisierungsloesungEntities();
}
public override string TableName => throw new NotImplementedException();
public void Add(Customer entity)
{
var customer = new Customer()
{
firstname = entity.firstname,
lastname = entity.lastname,
customernumber = entity.customernumber,
kundenkonto_fk = entity.kundenkonto_fk,
tel = entity.tel,
email = entity.email,
url = entity.url,
password = entity.password
};
_dataContext.Customer.Add(customer);
_dataContext.SaveChanges();
}
public override string ColumnsForSelect => throw new NotImplementedException();
public override string ColumnsForAdd => throw new NotImplementedException();
public override string PrimaryKeyFromTable => throw new NotImplementedException();
public override void Add(Customer entity)
public void CallStoredProcedure(Customer entity)
{
throw new NotImplementedException();
}
public override void CallStoredProcedure(Customer entity)
public void Delete(Customer entity)
{
var x = (from c in _dataContext.Customer
where (c.customer_id == entity.customer_id)
select c).SingleOrDefault();
_dataContext.Customer.Remove(x);
_dataContext.SaveChanges();
}
public List<Customer> GetAll(string whereCondition, Dictionary<string, object> parameterValues)
{
throw new NotImplementedException();
}
public override void Delete(Customer entity)
public IQueryable<Customer> GetAll()
{
return _dataContext.Customer.AsQueryable();
}
public Customer GetSingle<P>(P pkValue)
{
throw new NotImplementedException();
}
public override List<Customer> GetAll(string whereCondition, Dictionary<string, object> parameterValues)
{
throw new NotImplementedException();
}
public override List<Customer> GetAll()
{
throw new NotImplementedException();
}
public override Customer GetSingle<P>(P pkValue)
{
throw new NotImplementedException();
}
public override void Update(Customer entity)
public void Update(Customer entity)
{
throw new NotImplementedException();
}

View File

View File

View File

View File

View File

View File

View File

View File

View File

@ -33,7 +33,7 @@ namespace LoggingClient.ViewModel
}
}
public Customer NewCustomerEntry { get; set; }
public Customer SelectedItem { get; set; }
private long _customerId;
public long customer_id
@ -67,14 +67,14 @@ namespace LoggingClient.ViewModel
OnPropertyChanged(nameof(LinqIsChecked));
}
}
public Customer SelectedItem { get; set; }
public CustomerViewModel()
{
TxtConnectionString = "Server=localhost;Database=inventarisierungsloesung;Uid=root;Pwd=MySQLPassword1234!;";
Customers = new List<Customer>();
NewCustomerEntry = new Customer();
_dupChecker = new DuplicateChecker();
}
public Customer MySelectedItem { get; set; }
@ -171,8 +171,8 @@ namespace LoggingClient.ViewModel
{
try
{
var customerModelRepositoryLinq = new CustomerRepositoryLinq<Customer>(TxtConnectionString);
Customers = customerModelRepositoryLinq.GetAll();
var customerModelRepositoryLinq = new CustomerRepositoryLinq();
Customers = customerModelRepositoryLinq.GetAll().ToList();
}
catch (Exception ex)
{
@ -199,7 +199,7 @@ namespace LoggingClient.ViewModel
try
{
var customerModelRepositoryEF = new CustomerRepositoryEF();
customerModelRepositoryEF.Add(NewCustomerEntry);
customerModelRepositoryEF.Add(SelectedItem);
Customers = customerModelRepositoryEF.GetAll();
}
catch (Exception ex)
@ -211,9 +211,9 @@ namespace LoggingClient.ViewModel
{
try
{
var customerModelRepositoryLinq = new CustomerRepositoryLinq<Customer>(TxtConnectionString);
customerModelRepositoryLinq.Add(NewCustomerEntry);
Customers = customerModelRepositoryLinq.GetAll();
//var customerModelRepositoryLinq = new CustomerRepositoryLinq<Customer>(TxtConnectionString);
//customerModelRepositoryLinq.Add(NewCustomerEntry);
//Customers = customerModelRepositoryLinq.GetAll();
}
catch (Exception ex)
{
@ -225,7 +225,7 @@ namespace LoggingClient.ViewModel
try
{
var customerModelRepository = new CustomerRepository(TxtConnectionString);
customerModelRepository.Add(this.NewCustomerEntry);
customerModelRepository.Add(this.SelectedItem);
this.Customers = customerModelRepository.GetAll().ToList();
}
catch (Exception ex)
@ -253,9 +253,9 @@ namespace LoggingClient.ViewModel
{
try
{
var customerModelRepositoryLinq = new CustomerRepositoryLinq<Customer>(TxtConnectionString);
var customerModelRepositoryLinq = new CustomerRepositoryLinq();
customerModelRepositoryLinq.Delete(MySelectedItem);
Customers = customerModelRepositoryLinq.GetAll();
Customers = customerModelRepositoryLinq.GetAll().ToList();
}
catch (Exception ex)
{
@ -267,7 +267,7 @@ namespace LoggingClient.ViewModel
try
{
var customerModelRepository = new CustomerRepository(TxtConnectionString);
customerModelRepository.Delete(this.NewCustomerEntry);
customerModelRepository.Delete(this.SelectedItem);
this.Customers = customerModelRepository.GetAll().ToList();
}
catch (Exception ex)
@ -306,7 +306,7 @@ namespace LoggingClient.ViewModel
try
{
var customerModelRepository = new CustomerRepository(TxtConnectionString);
customerModelRepository.Update(this.NewCustomerEntry);
customerModelRepository.Update(this.SelectedItem);
this.Customers = customerModelRepository.GetAll().ToList();
}
catch (Exception ex)

View File

View File

@ -29,15 +29,13 @@ namespace LoggingClient.ViewModel
}
}
private List<Location> _locations;
public Location NewLocationModelEntry { get; set; }
public Location SelectedItem { get; set; }
public List<Node<Location>> LocationTree { get; set; }
public LocationViewModel()
{
TxtConnectionString = "Server=localhost;Database=inventarisierungsloesung;Uid=root;Pwd=MySQLPassword1234!;";
Locations = new List<Location>();
NewLocationModelEntry = new Location();
}
public Location MySelectedItem { get; set; }
public event PropertyChangedEventHandler PropertyChanged;
@ -126,7 +124,7 @@ namespace LoggingClient.ViewModel
try
{
var locationModelRepository = new LocationRepository(TxtConnectionString);
locationModelRepository.Add(this.NewLocationModelEntry);
locationModelRepository.Add(SelectedItem);
this.Locations = locationModelRepository.GetAll();
}
catch (Exception ex)
@ -139,7 +137,7 @@ namespace LoggingClient.ViewModel
try
{
var locationModelRepository = new LocationRepository(TxtConnectionString);
locationModelRepository.Delete(this.NewLocationModelEntry);
locationModelRepository.Delete(SelectedItem);
this.Locations = locationModelRepository.GetAll();
}
catch (Exception ex)
@ -152,7 +150,7 @@ namespace LoggingClient.ViewModel
try
{
var locationModelRepository = new LocationRepository(TxtConnectionString);
locationModelRepository.Update(this.NewLocationModelEntry);
locationModelRepository.Update(SelectedItem);
this.Locations = locationModelRepository.GetAll();
}
catch (Exception ex)

0
LoggingClient/LoggingClient/ViewModel/LogViewModel.cs Executable file → Normal file
View File

View File

18
LoggingClient/LoggingClient/Views/CustomerView.xaml Executable file → Normal file
View File

@ -15,7 +15,7 @@
<Grid Height="450" Width="800" Background="#FF89A9B2" >
<TextBlock Height="32" HorizontalAlignment="Left" Margin="10,18,0,0" Name="TextBlockHeading" Text="Customers" VerticalAlignment="Top" Width="310" FontSize="20" FontStretch="Normal"/>
<Grid HorizontalAlignment="Left" Height="416" VerticalAlignment="Top" Width="773">
<DataGrid CanUserAddRows="False" AutoGenerateColumns="False" HorizontalAlignment="Left" SelectedItem="{Binding MySelectedItem, Mode=TwoWay}" Margin="10,55,0,131" Name="DataGridLogs" Width="763" ItemsSource="{Binding Path=Customers}" CanUserResizeRows="False">
<DataGrid CanUserAddRows="False" AutoGenerateColumns="False" HorizontalAlignment="Left" SelectedItem="{Binding MySelectedItem, Mode=TwoWay}" Margin="10,55,0,131" x:Name="DataGridCustomer" Width="763" ItemsSource="{Binding Path=Customers}" CanUserResizeRows="False">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Path=customer_id}" Header="ID" Width="40" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Path=firstname}" Header="First Name" Width="70" IsReadOnly="True" />
@ -35,7 +35,7 @@
<Label Content="Firstname" HorizontalAlignment="Left" Margin="10,290,0,0" VerticalAlignment="Top" Width="95"/>
<TextBox HorizontalAlignment="Left" Height="25" Margin="10,321,0,0" TextWrapping="Wrap" Name="EnterFirstName" VerticalAlignment="Top" Width="95">
<TextBox.Text>
<Binding Path="NewCustomerEntry.firstname" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridCustomer" Path="SelectedItem.firstname" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:StringRangeValidationRule
MinimumLength="1" MaximumLength="45"
@ -48,7 +48,7 @@
<Label Content="Lastname" HorizontalAlignment="Left" Margin="110,290,0,0" VerticalAlignment="Top" Width="95"/>
<TextBox HorizontalAlignment="Left" Height="25" Margin="110,321,0,0" TextWrapping="Wrap" Name="EnterLastName" VerticalAlignment="Top" Width="95" >
<TextBox.Text>
<Binding Path="NewCustomerEntry.lastname" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridCustomer" Path="SelectedItem.lastname" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:StringRangeValidationRule
MinimumLength="1" MaximumLength="45"
@ -61,7 +61,7 @@
<Label Content="CustomerNr" HorizontalAlignment="Left" Margin="210,290,0,0" VerticalAlignment="Top" Width="95"/>
<TextBox HorizontalAlignment="Left" Height="25" Margin="210,321,0,0" TextWrapping="Wrap" Name="EnterCustomerNr" VerticalAlignment="Top" Width="95">
<TextBox.Text>
<Binding Path="NewCustomerEntry.customernumber" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridCustomer" Path="SelectedItem.customernumber" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:StringRangeValidationRule
MinimumLength="1" MaximumLength="45"
@ -73,7 +73,7 @@
<Label Content="Url" HorizontalAlignment="Left" Margin="310,291,0,0" VerticalAlignment="Top" Width="95"/>
<TextBox HorizontalAlignment="Left" Height="25" Margin="310,321,0,0" TextWrapping="Wrap" x:Name="EnterUrl" VerticalAlignment="Top" Width="95">
<Binding Path="NewCustomerEntry.url" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridCustomer" Path="SelectedItem.url" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:StringRangeValidationRule
MinimumLength="1" MaximumLength="30"
@ -85,7 +85,7 @@
<Label Content="CustAcc ID" HorizontalAlignment="Left" Margin="10,346,0,0" VerticalAlignment="Top" Width="95"/>
<TextBox HorizontalAlignment="Left" Height="25" Margin="10,372,0,0" TextWrapping="Wrap" Name="EnterCustAccFk" VerticalAlignment="Top" Width="95">
<TextBox.Text>
<Binding Path="NewCustomerEntry.kundenkonto_fk" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridCustomer" Path="SelectedItem.kundenkonto_fk" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:IntRangeValidationRule
MinimumLength="1" MaximumLength="8"/>
@ -97,7 +97,7 @@
<Label Content="Phone" HorizontalAlignment="Left" Margin="110,346,0,0" VerticalAlignment="Top" Width="95"/>
<TextBox HorizontalAlignment="Left" Height="25" Margin="110,372,0,0" TextWrapping="Wrap" Name="EnterPhoneNumber" VerticalAlignment="Top" Width="95">
<TextBox.Text>
<Binding Path="NewCustomerEntry.tel" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridCustomer" Path="SelectedItem.tel" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:StringRangeValidationRule
MinimumLength="1" MaximumLength="20"
@ -109,7 +109,7 @@
<Label Content="Email" HorizontalAlignment="Left" Margin="210,346,0,0" VerticalAlignment="Top" Width="95"/>
<TextBox HorizontalAlignment="Left" Height="25" Margin="210,372,0,0" TextWrapping="Wrap" x:Name="EnterEmail" VerticalAlignment="Top" Width="95">
<Binding Path="NewCustomerEntry.email" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridCustomer" Path="SelectedItem.email" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:StringRangeValidationRule
MinimumLength="1" MaximumLength="30"
@ -120,7 +120,7 @@
<Label Content="Password" HorizontalAlignment="Left" Margin="310,347,0,0" VerticalAlignment="Top" Width="95"/>
<TextBox HorizontalAlignment="Left" Height="25" Margin="310,372,0,0" TextWrapping="Wrap" x:Name="EnterPassword" VerticalAlignment="Top" Width="95">
<Binding Path="NewCustomerEntry.password" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridCustomer" Path="SelectedItem.password" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:StringRangeValidationRule
MinimumLength="1" MaximumLength="255"

0
LoggingClient/LoggingClient/Views/CustomerView.xaml.cs Executable file → Normal file
View File

45
LoggingClient/LoggingClient/Views/LocationView.xaml Executable file → Normal file
View File

@ -16,7 +16,7 @@
<Grid Height="450" Width="800" Background="#FF89A9B2" >
<TextBlock Height="32" HorizontalAlignment="Left" Margin="10,18,0,0" Name="TextBlockHeading" Text="Locations" VerticalAlignment="Top" Width="310" FontSize="20" FontStretch="Normal"/>
<Grid HorizontalAlignment="Left" Height="416" VerticalAlignment="Top" Width="773">
<DataGrid Validation.ErrorTemplate="{x:Null}" CanUserAddRows="False" AutoGenerateColumns="False" HorizontalAlignment="Left" SelectedItem="{Binding MySelectedItem, Mode=TwoWay}" Margin="10,196,0,76" Name="DataGridLocations" Width="763" ItemsSource="{Binding Path=Locations}" CanUserResizeRows="False">
<DataGrid Validation.ErrorTemplate="{x:Null}" CanUserAddRows="False" AutoGenerateColumns="False" HorizontalAlignment="Left" SelectedItem="{Binding MySelectedItem, Mode=TwoWay}" Margin="10,196,0,76" x:Name="DataGridLocations" Width="763" ItemsSource="{Binding Path=Locations}" CanUserResizeRows="False">
<DataGrid.Columns>
<DataGridTextColumn Binding="{Binding Path=Id}" Header="id" Width="1*" IsReadOnly="True" />
<DataGridTextColumn Binding="{Binding Path=ParentId}" Header="ParentId" Width="1*" IsReadOnly="True" />
@ -34,7 +34,7 @@
</TreeView.ItemTemplate>
</TreeView>
<!--<Button Content="Add" Height="25" HorizontalAlignment="Left" Margin="478,366,0,0" Name="BtnAdd" VerticalAlignment="Top" Width="70" Command="{Binding BtnAddDataClick}">
<Button Content="Add" Height="25" HorizontalAlignment="Left" Margin="478,366,0,0" Name="BtnAdd" VerticalAlignment="Top" Width="70" Command="{Binding BtnAddDataClick}">
<Button.Style>
<Style TargetType="{x:Type Button}">
<Style.Triggers>
@ -51,22 +51,15 @@
</Style>
</Button.Style>
</Button>
<Button Content="Update" Height="25" HorizontalAlignment="Left" Margin="553,366,0,0" Name="BtnUpdateDataClick" VerticalAlignment="Top" Width="70" Command="{Binding BtnUpdateDataClick}" />-->
<Button Content="Update" Height="25" HorizontalAlignment="Left" Margin="553,366,0,0" Name="BtnUpdateDataClick" VerticalAlignment="Top" Width="70" Command="{Binding BtnUpdateDataClick}" />
<Button Content="Load Data" Height="25" HorizontalAlignment="Left" Margin="628,366,0,0" Name="BtnLoadDataClick" VerticalAlignment="Top" Width="70" Command="{Binding BtnLoadDataClick}" />
<!--<Button Content="Delete" Height="25" HorizontalAlignment="Left" Margin="703,366,0,0" Name="BtnDeleteDataClick" VerticalAlignment="Top" Width="70" Command="{Binding BtnDeleteDataClick}"/>-->
<Button Content="Delete" Height="25" HorizontalAlignment="Left" Margin="703,366,0,0" Name="BtnDeleteDataClick" VerticalAlignment="Top" Width="70" Command="{Binding BtnDeleteDataClick}"/>
<TextBox HorizontalAlignment="Left" Height="23" Margin="248,22,0,0" TextWrapping="Wrap" Text="{Binding TxtConnectionString}" Name="TxtConnectionString" VerticalAlignment="Top" Width="525" />
<!--<TextBox HorizontalAlignment="Left" Height="25" Margin="10,366,0,0" TextWrapping="Wrap" x:Name="LocationId" VerticalAlignment="Top" Width="80" >
<Binding Path="NewLocationModelEntry.AddressId" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:IntRangeValidationRule
MinimumLength="1" MaximumLength="10000"/>
</Binding.ValidationRules>
</Binding>
</TextBox>
<TextBox HorizontalAlignment="Left" Height="25" Margin="95,366,0,0" TextWrapping="Wrap" Name="EnterParentId" VerticalAlignment="Top" Width="80">
<TextBox HorizontalAlignment="Left" Height="25" Margin="10,366,0,0" TextWrapping="Wrap" Name="EnterParentId" VerticalAlignment="Top" Width="80">
<TextBox.Text>
<Binding Path="NewLocationModelEntry.ParentId" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridLocations" Path="SelectedItem.ParentId" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:IntRangeValidationRule
validators:MinimumLength="1" validators:MaximumLength="10000"/>
@ -74,9 +67,17 @@
</Binding>
</TextBox.Text>
</TextBox>
<TextBox HorizontalAlignment="Left" Height="25" Margin="95,366,0,0" TextWrapping="Wrap" x:Name="AddressId" VerticalAlignment="Top" Width="80" >
<Binding ElementName="DataGridLocations" Path="SelectedItem.AddressId" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:IntRangeValidationRule
MinimumLength="1" MaximumLength="10000"/>
</Binding.ValidationRules>
</Binding>
</TextBox>
<TextBox HorizontalAlignment="Left" Height="25" Margin="180,366,0,0" TextWrapping="Wrap" Name="EnterDesignation" VerticalAlignment="Top" Width="80">
<TextBox.Text>
<Binding Path="NewLocationModelEntry.Designation" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridLocations" Path="SelectedItem.Designation" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:StringRangeValidationRule
validators:MinimumLength="1" validators:MaximumLength="45"
@ -88,7 +89,7 @@
<TextBox HorizontalAlignment="Left" Height="25" Margin="265,366,0,0" TextWrapping="Wrap" Name="EnterBuildingNr" VerticalAlignment="Top" Width="80">
<TextBox.Text>
<Binding Path="NewLocationModelEntry.BuildingNr" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridLocations" Path="SelectedItem.BuildingNr" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:IntRangeValidationRule
validators:MinimumLength="1" validators:MaximumLength="10000"/>
@ -98,23 +99,23 @@
</TextBox>
<TextBox HorizontalAlignment="Left" Height="25" Margin="350,366,0,0" TextWrapping="Wrap" Name="EnterRoomNr" VerticalAlignment="Top" Width="80" >
<TextBox.Text>
<Binding Path="NewLocationModelEntry.RoomNr" UpdateSourceTrigger="PropertyChanged">
<Binding ElementName="DataGridLocations" Path="SelectedItem.RoomNr" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<validators:IntRangeValidationRule
validators:MinimumLength="1" validators:MaximumLength="10000"/>
</Binding.ValidationRules>
</Binding>
</TextBox.Text>
</TextBox>-->
</TextBox>
<!--<ComboBox x:Name="SeverityCombobox" DisplayMemberPath="Severity" SelectedValuePath="id" ItemsSource="{Binding SeverityComboBox}" SelectedValue="{Binding Path=Severity , Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="240,359,470,66" Width="90" Height="25"/>-->
<ComboBox x:Name="SeverityCombobox" DisplayMemberPath="Severity" SelectedValuePath="id" ItemsSource="{Binding SeverityComboBox}" SelectedValue="{Binding Path=Severity , Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="240,359,470,66" Width="90" Height="25"/>
<Label Content="Database Connection" HorizontalAlignment="Left" Margin="118,22,0,0" VerticalAlignment="Top" Height="23" Width="125" Background="{x:Null}" RenderTransformOrigin="0.366,0.725"/>
<!--<Label Content="LocationId" HorizontalAlignment="Left" Margin="10,340,0,0" VerticalAlignment="Top" Width="80" FontSize="12"/>
<Label Content="ParentId" HorizontalAlignment="Left" Margin="95,340,0,0" VerticalAlignment="Top" Width="80" FontSize="12"/>
<Label Content="ParentId" HorizontalAlignment="Left" Margin="10,340,0,0" VerticalAlignment="Top" Width="80" FontSize="12"/>
<Label Content="AddressId" HorizontalAlignment="Left" Margin="95,340,0,0" VerticalAlignment="Top" Width="80" FontSize="12"/>
<Label Content="Designation" HorizontalAlignment="Left" Margin="180,340,0,0" VerticalAlignment="Top" Width="80" FontSize="12"/>
<Label Content="BuildingNr" HorizontalAlignment="Left" Margin="265,340,0,0" VerticalAlignment="Top" Width="80" FontSize="12"/>
<Label Content="RoomNr" HorizontalAlignment="Left" Margin="350,340,0,0" VerticalAlignment="Top" Width="80" FontSize="12"/>-->
<Label Content="RoomNr" HorizontalAlignment="Left" Margin="350,340,0,0" VerticalAlignment="Top" Width="80" FontSize="12"/>
</Grid>
</Grid>
</UserControl>

0
LoggingClient/LoggingClient/Views/LocationView.xaml.cs Executable file → Normal file
View File

0
LoggingClient/LoggingClient/Views/LogView.xaml Executable file → Normal file
View File

0
LoggingClient/LoggingClient/Views/LogView.xaml.cs Executable file → Normal file
View File

0
LoggingClient/LoggingClient/packages.config Executable file → Normal file
View File