118 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			118 lines
		
	
	
		
			5.8 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								<UserControl x:Class="DM_Weight.Views.Dialog.AddNewMenuDialog"
							 | 
						||
| 
								 | 
							
								             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
							 | 
						||
| 
								 | 
							
								             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
							 | 
						||
| 
								 | 
							
								             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
							 | 
						||
| 
								 | 
							
								             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
							 | 
						||
| 
								 | 
							
								             xmlns:local="clr-namespace:DM_Weight.Views.Dialog"
							 | 
						||
| 
								 | 
							
								             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
							 | 
						||
| 
								 | 
							
								             mc:Ignorable="d" 
							 | 
						||
| 
								 | 
							
								             d:DesignHeight="450" d:DesignWidth="800">
							 | 
						||
| 
								 | 
							
								    <UserControl.Resources>
							 | 
						||
| 
								 | 
							
								        <Style x:Key="st" TargetType="GridViewColumnHeader">
							 | 
						||
| 
								 | 
							
								            <Style.Setters>
							 | 
						||
| 
								 | 
							
								                <Setter Property="Height">
							 | 
						||
| 
								 | 
							
								                    <Setter.Value>55</Setter.Value>
							 | 
						||
| 
								 | 
							
								                </Setter>
							 | 
						||
| 
								 | 
							
								                <Setter Property="Background">
							 | 
						||
| 
								 | 
							
								                    <Setter.Value>#31ccec</Setter.Value>
							 | 
						||
| 
								 | 
							
								                </Setter>
							 | 
						||
| 
								 | 
							
								                <Setter Property="Foreground">
							 | 
						||
| 
								 | 
							
								                    <Setter.Value>white</Setter.Value>
							 | 
						||
| 
								 | 
							
								                </Setter>
							 | 
						||
| 
								 | 
							
								            </Style.Setters>
							 | 
						||
| 
								 | 
							
								        </Style>
							 | 
						||
| 
								 | 
							
								    </UserControl.Resources>
							 | 
						||
| 
								 | 
							
								    <Grid>
							 | 
						||
| 
								 | 
							
								        <Grid Margin="6">
							 | 
						||
| 
								 | 
							
								            <Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								                <RowDefinition Height="Auto" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition  Height="Auto" />
							 | 
						||
| 
								 | 
							
								                <RowDefinition  Height="Auto" />
							 | 
						||
| 
								 | 
							
								            </Grid.RowDefinitions>
							 | 
						||
| 
								 | 
							
								            <Grid Background="#03a9f4" Grid.Row="0">
							 | 
						||
| 
								 | 
							
								                <TextBlock VerticalAlignment="Center" Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}" Margin="16 4 16 4" Style="{StaticResource MaterialDesignHeadline5TextBlock}" Text="{Binding Title}" />
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignIconForegroundButton}"
							 | 
						||
| 
								 | 
							
								                        Foreground="{DynamicResource PrimaryHueDarkForegroundBrush}"
							 | 
						||
| 
								 | 
							
								                        HorizontalAlignment="Right"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding BtnCloseCommand}"
							 | 
						||
| 
								 | 
							
								                        ToolTip="关闭" Cursor="Hand"
							 | 
						||
| 
								 | 
							
								                    >
							 | 
						||
| 
								 | 
							
								                    <materialDesign:PackIcon Kind="Close" Width="34" Height="34" />
							 | 
						||
| 
								 | 
							
								                </Button>
							 | 
						||
| 
								 | 
							
								            </Grid>
							 | 
						||
| 
								 | 
							
								            <StackPanel Margin="0 6 0 0" Grid.Row="1" HorizontalAlignment="Right" Orientation="Horizontal">
							 | 
						||
| 
								 | 
							
								                <ComboBox
							 | 
						||
| 
								 | 
							
								                    Margin="0 0 6 0"
							 | 
						||
| 
								 | 
							
								                    Grid.Column="0"
							 | 
						||
| 
								 | 
							
								                    materialDesign:HintAssist.Hint="药品名称/拼音码"
							 | 
						||
| 
								 | 
							
								                    IsEditable="True"
							 | 
						||
| 
								 | 
							
								                    ItemsSource="{Binding DrugInfos}"
							 | 
						||
| 
								 | 
							
								                    SelectedItem="{Binding DrugInfo}"
							 | 
						||
| 
								 | 
							
								                    DisplayMemberPath="drug_name_spec" IsEnabled="True" IsTextSearchEnabled="False" KeyUp="ComboBox_KeyUp"
							 | 
						||
| 
								 | 
							
								                />
							 | 
						||
| 
								 | 
							
								                <TextBox
							 | 
						||
| 
								 | 
							
								                Grid.Column="1"
							 | 
						||
| 
								 | 
							
								                Text="{Binding BaseQuantity}"
							 | 
						||
| 
								 | 
							
								                materialDesign:HintAssist.Hint="药品基数"
							 | 
						||
| 
								 | 
							
								                Margin="16 0 32 6" Width="100"
							 | 
						||
| 
								 | 
							
								                Style="{StaticResource MaterialDesignTextBoxBase}"/>
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                        Margin="6 0 6 6"
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                        ToolTip="添加"
							 | 
						||
| 
								 | 
							
								                        Content="添加"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding BindingDrug}"/>
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                        Margin="6 0 6 6"
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                        ToolTip="删除"
							 | 
						||
| 
								 | 
							
								                        Content="删除"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding RemoveBinding}" />                
							 | 
						||
| 
								 | 
							
								                <Button Margin="6 0 6 6"
							 | 
						||
| 
								 | 
							
								                        Content="关闭"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding BtnCloseCommand}" 
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignOutlinedLightButton}" />
							 | 
						||
| 
								 | 
							
								                <Button
							 | 
						||
| 
								 | 
							
								                        Margin="0 0 6 6"
							 | 
						||
| 
								 | 
							
								                        Style="{StaticResource MaterialDesignOutlinedLightButton}"
							 | 
						||
| 
								 | 
							
								                        ToolTip="刷新"
							 | 
						||
| 
								 | 
							
								                        Command="{Binding Query}"
							 | 
						||
| 
								 | 
							
								                        Content="{materialDesign:PackIcon Refresh}"/>
							 | 
						||
| 
								 | 
							
								            </StackPanel>
							 | 
						||
| 
								 | 
							
								            <ListView
							 | 
						||
| 
								 | 
							
								                Padding="0 6 0 0" Grid.Row="2"
							 | 
						||
| 
								 | 
							
								                ItemsSource="{Binding MenuList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"      
							 | 
						||
| 
								 | 
							
								                materialDesign:ListViewAssist.HeaderRowBackground="#31ccec"
							 | 
						||
| 
								 | 
							
								                materialDesign:DataGridAssist.ColumnHeaderPadding="10"
							 | 
						||
| 
								 | 
							
								                materialDesign:ListViewAssist.ListViewItemPadding="13">
							 | 
						||
| 
								 | 
							
								                <ListView.Resources>
							 | 
						||
| 
								 | 
							
								                    <Style TargetType="{x:Type GridViewColumnHeader}" BasedOn="{StaticResource {x:Type GridViewColumnHeader}}">
							 | 
						||
| 
								 | 
							
								                        <Setter Property="Foreground" Value="White" />
							 | 
						||
| 
								 | 
							
								                    </Style>
							 | 
						||
| 
								 | 
							
								                </ListView.Resources>
							 | 
						||
| 
								 | 
							
								                <ListView.View>
							 | 
						||
| 
								 | 
							
								                    <GridView>
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn Width="200"
							 | 
						||
| 
								 | 
							
								                        DisplayMemberBinding="{Binding DrugInfo.DrugName}"
							 | 
						||
| 
								 | 
							
								                        Header="药品名称"/>
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn Width="200"
							 | 
						||
| 
								 | 
							
								                        DisplayMemberBinding="{Binding DrugInfo.Manufactory}"
							 | 
						||
| 
								 | 
							
								                        Header="厂家"/>
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn Width="200"
							 | 
						||
| 
								 | 
							
								                        DisplayMemberBinding="{Binding DrugInfo.DrugSpec}"
							 | 
						||
| 
								 | 
							
								                        Header="规格"/>
							 | 
						||
| 
								 | 
							
								                        <GridViewColumn Width="100"
							 | 
						||
| 
								 | 
							
								                        DisplayMemberBinding="{Binding BaseQuantity}"
							 | 
						||
| 
								 | 
							
								                        Header="药品基数"/>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								                    </GridView>
							 | 
						||
| 
								 | 
							
								                </ListView.View>
							 | 
						||
| 
								 | 
							
								            </ListView>
							 | 
						||
| 
								 | 
							
								            <materialDesign:Snackbar
							 | 
						||
| 
								 | 
							
								                Background="{Binding SnackbarBackground}"
							 | 
						||
| 
								 | 
							
								                MessageQueue="{Binding SnackbarMessageQueue}"/>
							 | 
						||
| 
								 | 
							
								        </Grid>
							 | 
						||
| 
								 | 
							
								    </Grid>
							 | 
						||
| 
								 | 
							
								</UserControl>
							 |