6 changed files with 135 additions and 6 deletions
@ -0,0 +1,39 @@ |
|||||
|
<c:BWindow x:Class="BBWY.Client.Views.BatchPurchase.EditQuantityRatioWindow" |
||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
||||
|
xmlns:local="clr-namespace:BBWY.Client.Views.BatchPurchase" |
||||
|
mc:Ignorable="d" |
||||
|
xmlns:c="clr-namespace:BBWY.Controls;assembly=BBWY.Controls" |
||||
|
Title="EditQuantityRatioWindow" Height="150" Width="300" |
||||
|
Style="{StaticResource bwstyle}" |
||||
|
MinButtonVisibility="Collapsed" |
||||
|
MaxButtonVisibility="Collapsed"> |
||||
|
<Grid> |
||||
|
<Grid.RowDefinitions> |
||||
|
<RowDefinition Height="30"/> |
||||
|
<RowDefinition/> |
||||
|
<RowDefinition Height="40"/> |
||||
|
</Grid.RowDefinitions> |
||||
|
<Border BorderThickness="0,0,0,1" BorderBrush="{StaticResource MainMenu.BorderBrush}" |
||||
|
Background="{StaticResource Border.Background}"> |
||||
|
<TextBlock Text="组合配置" HorizontalAlignment="Center" VerticalAlignment="Center"/> |
||||
|
</Border> |
||||
|
|
||||
|
<StackPanel Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center"> |
||||
|
<StackPanel Orientation="Horizontal"> |
||||
|
<TextBlock VerticalAlignment="Center"> |
||||
|
<Run Text="1件" Foreground="{StaticResource Text.Pink}"/> |
||||
|
<Run Text="店铺SKU需要配置的数量"/> |
||||
|
</TextBlock> |
||||
|
<c:BTextBox x:Name="txt_quantityRatio" Width="55" Margin="5,0,0,0"/> |
||||
|
</StackPanel> |
||||
|
<TextBlock Text="该数量为组合配置比例,非实际采购数量" Margin="0,10,0,0" |
||||
|
Foreground="Gray"/> |
||||
|
</StackPanel> |
||||
|
|
||||
|
<c:BButton x:Name="btn_Save" Content="保存" Grid.Row="2" Width="60" HorizontalAlignment="Right" Margin="0,0,8,0" |
||||
|
Click="btn_Save_Click"/> |
||||
|
</Grid> |
||||
|
</c:BWindow> |
@ -0,0 +1,43 @@ |
|||||
|
using BBWY.Controls; |
||||
|
using System.Windows; |
||||
|
|
||||
|
namespace BBWY.Client.Views.BatchPurchase |
||||
|
{ |
||||
|
/// <summary>
|
||||
|
/// EditQuantityRatioWindow.xaml 的交互逻辑
|
||||
|
/// </summary>
|
||||
|
public partial class EditQuantityRatioWindow : BWindow |
||||
|
{ |
||||
|
public int QuantityRatio; |
||||
|
|
||||
|
public EditQuantityRatioWindow(int quantityRatio) |
||||
|
{ |
||||
|
InitializeComponent(); |
||||
|
this.QuantityRatio = quantityRatio; |
||||
|
this.Loaded += EditQuantityRatioWindow_Loaded; |
||||
|
} |
||||
|
|
||||
|
private void EditQuantityRatioWindow_Loaded(object sender, RoutedEventArgs e) |
||||
|
{ |
||||
|
txt_quantityRatio.Text = QuantityRatio.ToString(); |
||||
|
} |
||||
|
|
||||
|
private void btn_Save_Click(object sender, RoutedEventArgs e) |
||||
|
{ |
||||
|
if (!int.TryParse(txt_quantityRatio.Text, out int quantityRatio)) |
||||
|
{ |
||||
|
MessageBox.Show("无效数字", "提示"); |
||||
|
return; |
||||
|
} |
||||
|
if (quantityRatio <= 0) |
||||
|
{ |
||||
|
MessageBox.Show("无效数字", "提示"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
this.QuantityRatio = quantityRatio; |
||||
|
this.DialogResult = true; |
||||
|
this.Close(); |
||||
|
} |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue