Delete Functionality of Location
This commit is contained in:
parent
54c3beaad2
commit
5ddf1ac2a3
@ -23,6 +23,7 @@ namespace LoggingClient.Repository
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
location.AddressId = 2;
|
||||||
using (var conn = new MySqlConnection(ConnectionString))
|
using (var conn = new MySqlConnection(ConnectionString))
|
||||||
{
|
{
|
||||||
conn.Open();
|
conn.Open();
|
||||||
|
@ -34,7 +34,7 @@ namespace LoggingClient.ViewModel
|
|||||||
|
|
||||||
public LocationViewModel()
|
public LocationViewModel()
|
||||||
{
|
{
|
||||||
TxtConnectionString = "Server=localhost;Database=;Uid=root;Pwd=;";
|
TxtConnectionString = "Server=localhost;Database=inventarisierungsloesung;Uid=root;Pwd=MySQLPassword1234!;";
|
||||||
Locations = new List<Location>();
|
Locations = new List<Location>();
|
||||||
NewLocationModelEntry = new Location();
|
NewLocationModelEntry = new Location();
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ namespace LoggingClient.ViewModel
|
|||||||
|
|
||||||
public LogViewModel()
|
public LogViewModel()
|
||||||
{
|
{
|
||||||
TxtConnectionString = "Server=localhost;Database=;Uid=root;Pwd=;";
|
TxtConnectionString = "Server=localhost;Database=inventarisierungsloesung;Uid=root;Pwd=MySQLPassword1234!;";
|
||||||
|
|
||||||
Logs = new List<Logging>();
|
Logs = new List<Logging>();
|
||||||
NewLogModelEntry = new Logging();
|
NewLogModelEntry = new Logging();
|
||||||
|
@ -34,8 +34,7 @@
|
|||||||
</TreeView.ItemTemplate>
|
</TreeView.ItemTemplate>
|
||||||
</TreeView>
|
</TreeView>
|
||||||
|
|
||||||
<!--<Button Content="Load Tree" Height="25" HorizontalAlignment="Left" Margin="703,181,0,0" x:Name="BtnLoadTreeClick" VerticalAlignment="Top" Width="70" Command="{Binding BtnBuildTreeClick}" />-->
|
<!--<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>
|
<Button.Style>
|
||||||
<Style TargetType="{x:Type Button}">
|
<Style TargetType="{x:Type Button}">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
@ -52,9 +51,9 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Button.Style>
|
</Button.Style>
|
||||||
</Button>
|
</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="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="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" >
|
<TextBox HorizontalAlignment="Left" Height="25" Margin="10,366,0,0" TextWrapping="Wrap" x:Name="LocationId" VerticalAlignment="Top" Width="80" >
|
||||||
@ -106,16 +105,16 @@
|
|||||||
</Binding.ValidationRules>
|
</Binding.ValidationRules>
|
||||||
</Binding>
|
</Binding>
|
||||||
</TextBox.Text>
|
</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="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="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="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="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="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>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
@ -28,7 +28,7 @@
|
|||||||
</DataGrid.Columns>
|
</DataGrid.Columns>
|
||||||
</DataGrid>
|
</DataGrid>
|
||||||
|
|
||||||
<Button Content="Add" Height="25" HorizontalAlignment="Left" Margin="418,355,0,0" Name="BtnAdd" VerticalAlignment="Top" Width="85" Command="{Binding BtnAddDataClick}">
|
<Button Content="Add" Height="25" HorizontalAlignment="Left" Margin="418,375,0,0" Name="BtnAdd" VerticalAlignment="Top" Width="85" Command="{Binding BtnAddDataClick}">
|
||||||
<Button.Style>
|
<Button.Style>
|
||||||
<Style TargetType="{x:Type Button}">
|
<Style TargetType="{x:Type Button}">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
@ -48,12 +48,12 @@
|
|||||||
</Style>
|
</Style>
|
||||||
</Button.Style>
|
</Button.Style>
|
||||||
</Button>
|
</Button>
|
||||||
<Button Content="Find Duplicates" Height="25" HorizontalAlignment="Left" Margin="508,355,0,0" Name="BtnFindDuplicates" VerticalAlignment="Top" Width="85" Command="{Binding BtnFindDuplicatesClick}" />
|
<Button Content="Find Duplicates" Height="25" HorizontalAlignment="Left" Margin="508,375,0,0" Name="BtnFindDuplicates" VerticalAlignment="Top" Width="85" Command="{Binding BtnFindDuplicatesClick}" />
|
||||||
<Button Content="Load Data" Height="25" HorizontalAlignment="Left" Margin="598,355,0,0" Name="BtnLoadData" VerticalAlignment="Top" Width="85" Command="{Binding BtnLoadDataClick}" />
|
<Button Content="Load Data" Height="25" HorizontalAlignment="Left" Margin="598,375,0,0" Name="BtnLoadData" VerticalAlignment="Top" Width="85" Command="{Binding BtnLoadDataClick}" />
|
||||||
<Button Content="Confirm" Height="25" HorizontalAlignment="Left" Margin="688,355,0,0" Name="BtnConfirm" VerticalAlignment="Top" Width="85" Command="{Binding BtnConfirmDataClick}"/>
|
<Button Content="Confirm" Height="25" HorizontalAlignment="Left" Margin="688,375,0,0" Name="BtnConfirm" VerticalAlignment="Top" Width="85" Command="{Binding BtnConfirmDataClick}"/>
|
||||||
|
|
||||||
<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="23" Margin="248,22,0,0" TextWrapping="Wrap" Text="{Binding TxtConnectionString}" Name="TxtConnectionString" VerticalAlignment="Top" Width="525" />
|
||||||
<TextBox HorizontalAlignment="Left" Height="25" Margin="10,355,0,0" TextWrapping="Wrap" Name="EnterPod" VerticalAlignment="Top" Width="95">
|
<TextBox HorizontalAlignment="Left" Height="25" Margin="10,345,0,0" TextWrapping="Wrap" Name="EnterPod" VerticalAlignment="Top" Width="95">
|
||||||
<TextBox.Text>
|
<TextBox.Text>
|
||||||
<Binding Path="NewLogModelEntry.Pod" UpdateSourceTrigger="PropertyChanged">
|
<Binding Path="NewLogModelEntry.Pod" UpdateSourceTrigger="PropertyChanged">
|
||||||
<Binding.ValidationRules>
|
<Binding.ValidationRules>
|
||||||
@ -64,7 +64,7 @@
|
|||||||
</Binding>
|
</Binding>
|
||||||
</TextBox.Text>
|
</TextBox.Text>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
<TextBox HorizontalAlignment="Left" Height="25" Margin="110,355,0,0" TextWrapping="Wrap" Name="EnterHostname" VerticalAlignment="Top" Width="95">
|
<TextBox HorizontalAlignment="Left" Height="25" Margin="110,345,0,0" TextWrapping="Wrap" Name="EnterHostname" VerticalAlignment="Top" Width="95">
|
||||||
<TextBox.Text>
|
<TextBox.Text>
|
||||||
<Binding Path="NewLogModelEntry.Hostname" UpdateSourceTrigger="PropertyChanged">
|
<Binding Path="NewLogModelEntry.Hostname" UpdateSourceTrigger="PropertyChanged">
|
||||||
<Binding.ValidationRules>
|
<Binding.ValidationRules>
|
||||||
@ -75,7 +75,7 @@
|
|||||||
</Binding>
|
</Binding>
|
||||||
</TextBox.Text>
|
</TextBox.Text>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
<TextBox HorizontalAlignment="Left" Height="25" Margin="210,355,0,0" TextWrapping="Wrap" Name="EnterSeverity" VerticalAlignment="Top" Width="95" >
|
<TextBox HorizontalAlignment="Left" Height="25" Margin="210,345,0,0" TextWrapping="Wrap" Name="EnterSeverity" VerticalAlignment="Top" Width="95" >
|
||||||
<TextBox.Text>
|
<TextBox.Text>
|
||||||
<Binding Path="NewLogModelEntry.Severity" UpdateSourceTrigger="PropertyChanged">
|
<Binding Path="NewLogModelEntry.Severity" UpdateSourceTrigger="PropertyChanged">
|
||||||
<Binding.ValidationRules>
|
<Binding.ValidationRules>
|
||||||
@ -85,7 +85,7 @@
|
|||||||
</Binding>
|
</Binding>
|
||||||
</TextBox.Text>
|
</TextBox.Text>
|
||||||
</TextBox>
|
</TextBox>
|
||||||
<TextBox HorizontalAlignment="Left" Height="50" Margin="310,355,0,0" TextWrapping="Wrap" Name="EnterMessage" VerticalAlignment="Top" Width="95">
|
<TextBox HorizontalAlignment="Left" Height="25" Margin="310,345,0,0" TextWrapping="Wrap" Name="EnterMessage" VerticalAlignment="Top" Width="463">
|
||||||
<TextBox.Text>
|
<TextBox.Text>
|
||||||
<Binding Path="NewLogModelEntry.Message" UpdateSourceTrigger="PropertyChanged">
|
<Binding Path="NewLogModelEntry.Message" UpdateSourceTrigger="PropertyChanged">
|
||||||
<Binding.ValidationRules>
|
<Binding.ValidationRules>
|
||||||
@ -100,10 +100,10 @@
|
|||||||
<!--<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="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="Pod" HorizontalAlignment="Left" Margin="10,324,0,0" VerticalAlignment="Top" Width="110"/>
|
<Label Content="Pod" HorizontalAlignment="Left" Margin="10,319,0,0" VerticalAlignment="Top" Width="95"/>
|
||||||
<Label Content="Hostname" HorizontalAlignment="Left" Margin="110,324,0,0" VerticalAlignment="Top" Width="110"/>
|
<Label Content="Hostname" HorizontalAlignment="Left" Margin="110,319,0,0" VerticalAlignment="Top" Width="95"/>
|
||||||
<Label Content="Severity" HorizontalAlignment="Left" Margin="210,324,0,0" VerticalAlignment="Top" Width="110"/>
|
<Label Content="Severity" HorizontalAlignment="Left" Margin="210,319,0,0" VerticalAlignment="Top" Width="95"/>
|
||||||
<Label Content="Message" HorizontalAlignment="Left" Margin="310,324,0,0" VerticalAlignment="Top" Width="110"/>
|
<Label Content="Message" HorizontalAlignment="Left" Margin="310,319,0,0" VerticalAlignment="Top" Width="110"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</UserControl>
|
</UserControl>
|
Loading…
Reference in New Issue
Block a user