foamRearStore
liuwf 1 year ago
parent dccb3b59a0
commit ec59d7a2f9

Binary file not shown.

@ -124,9 +124,6 @@
<Compile Include="Page\InventoryInfo\InventoryInfoControl.xaml.cs">
<DependentUpon>InventoryInfoControl.xaml</DependentUpon>
</Compile>
<Compile Include="Page\InventoryInfo\SelectTypeWindow.xaml.cs">
<DependentUpon>SelectTypeWindow.xaml</DependentUpon>
</Compile>
<Compile Include="Page\InventoryInfo\SelectType.xaml.cs">
<DependentUpon>SelectType.xaml</DependentUpon>
</Compile>
@ -159,7 +156,6 @@
<Compile Include="viewModel\AssemblyPlan\QuantityIssuedViewModel.cs" />
<Compile Include="viewModel\AssemblyPlan\SearchCriteriaViewModel.cs" />
<Compile Include="viewModel\InStoreInfo\InStoreInfoViewModel.cs" />
<Compile Include="viewModel\InventoryInfo\SelectTypeWindowViewModel.cs" />
<Compile Include="viewModel\InventoryInfo\SelectTypeViewModel.cs" />
<Compile Include="viewModel\InventoryInfo\BoxFoamRearInventoryViewModel.cs" />
<Compile Include="viewModel\InventoryInfo\InventoryInfoViewModel.cs" />
@ -216,10 +212,6 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Page\InventoryInfo\SelectTypeWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="Page\InventoryInfo\SelectType.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>

@ -7,7 +7,7 @@
xmlns:local1="clr-namespace:Aucma.Scada.UI.Converter.AssemblyPlan"
mc:Ignorable="d"
Title="MES生产计划" Height="650" Width="900" Name="window" WindowStartupLocation="CenterScreen" FontFamily="Microsoft YaHei" Background="#1152AC"
ResizeMode="NoResize" Topmost="True">
ResizeMode="NoResize" >
<Window.Resources>
<Style x:Key="DataGridTextColumnCenterSytle" TargetType="{x:Type TextBlock}">
<Setter Property="VerticalAlignment" Value="Center" />

@ -6,7 +6,7 @@
xmlns:local="clr-namespace:Aucma.Scada.UI.Page.AssemblyPlan"
mc:Ignorable="d" FontFamily="Microsoft YaHei" WindowStartupLocation="CenterScreen" Background="#1152AC"
Title="下达数量" Height="500" Width="700" Name="window"
ResizeMode="NoResize" Topmost="True">
ResizeMode="NoResize" >
<Border Margin="5" Background="#1254AB" CornerRadius="10">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>

@ -1,91 +0,0 @@
<Window x:Class="Aucma.Scada.UI.Page.InventoryInfo.SelectTypeWindow"
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"
mc:Ignorable="d" WindowStartupLocation="CenterScreen" FontFamily="Microsoft YaHei"
Title="设置型号" Height="500" Width="500" Name="window" Background="White"
ResizeMode="NoResize" >
<Border Margin="5" Background="#1254AB" CornerRadius="10">
<Border.Effect>
<DropShadowEffect Color="Gray" ShadowDepth="0" BlurRadius="5" Opacity="0.3" Direction="0"></DropShadowEffect>
</Border.Effect>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Border Grid.Column="0" BorderBrush="#1254AB" BorderThickness="3" CornerRadius="5" Background="Transparent" Margin="5,5">
<Border.Effect>
<DropShadowEffect Color="#1254AB" Direction="270" BlurRadius="10" ShadowDepth="5" Opacity="0.5"/>
</Border.Effect>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="产品编码:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,0,0"/>
<TextBox x:Name="MaterialCode" FontSize="20" Text="{Binding PlanInfo.MaterialCode}" Foreground="#FFFFFF" Width="260" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
<StackPanel Grid.Row="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="50,0,0,0">
<TextBlock Text="产品型号:" FontSize="20" Foreground="#FFFFFF" Margin="10,0,0,0"/>
<TextBox x:Name="MaterialName" FontSize="20" Text="{Binding PlanInfo.MaterialName}" Foreground="#FFFFFF" Width="260" IsReadOnly="True" Margin="5,0,10,0"/>
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Horizontal" VerticalAlignment="Center" Margin="60,0,0,0" >
<!--单选框样式-->
<StackPanel.Resources>
<Style TargetType="RadioButton">
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontSize" Value="20"/>
<Setter Property="Background" Value="White"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<BulletDecorator Background="Transparent">
<BulletDecorator.Bullet>
<Grid Width="20" Height="20">
<Ellipse x:Name="BulletRadio" Fill="{TemplateBinding Background}" Stroke="{TemplateBinding BorderBrush}" StrokeThickness="1"/>
</Grid>
</BulletDecorator.Bullet>
<ContentPresenter Margin="4,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/>
</BulletDecorator>
<ControlTemplate.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="BulletRadio" Property="Fill" Value="Green"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
<Style.Triggers>
<Trigger Property="IsChecked" Value="True">
<Setter Property="Background" Value="Green"/>
</Trigger>
</Style.Triggers>
</Style>
</StackPanel.Resources>
<TextBlock Text="选择型号: " FontSize="20" Foreground="#FFFFFF" />
<RadioButton Content="型号1" GroupName="Direction" IsChecked="{Binding IsSelectedOptionA, Mode=TwoWay}" />
<RadioButton Content="型号2" GroupName="Direction" IsChecked="{Binding IsSelectedOptionB, Mode=TwoWay}" Margin="10 0 0 0"/>
<RadioButton Content="型号3" GroupName="Direction" IsChecked="{Binding IsSelectedOptionC, Mode=TwoWay}" Margin="10 0 0 0"/>
</StackPanel>
<StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
<Button Content="保 存" FontSize="20" Command="{Binding SaveCommand}" Background="#FF36B5C1" BorderBrush="#FF36B5C1" Foreground="white" Margin="0,0,10,0" Height="50" Width="100" />
<Button Content="取 消" FontSize="20" Command="{Binding CloseWindowCommand}" CommandParameter="{Binding ElementName=window}" Background="#FF9900" Foreground="white" Margin="10,0,0,0" Height="50" BorderBrush="#FF9900" Width="100" />
</StackPanel>
</Grid>
</Border>
</Grid>
</Border>
</Window>

@ -1,35 +0,0 @@
using Aucma.Scada.Model.domain;
using Aucma.Scada.UI.viewModel.AssemblyPlan;
using Aucma.Scada.UI.viewModel.InventoryInfo;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Aucma.Scada.UI.Page.InventoryInfo
{
/// <summary>
/// SelectType.xaml 的交互逻辑
/// </summary>
public partial class SelectTypeWindow : Window
{
private SelectTypeWindowViewModel viewModel = null;
public SelectTypeWindow(string spaceCode,BaseMaterialInfo info)
{
InitializeComponent();
viewModel = new SelectTypeWindowViewModel(spaceCode,info);
this.DataContext = viewModel;
}
}
}

@ -1,10 +1,10 @@
[system]
#数据库连接
mesConnStr=Data Source=10.100.72.20/ORCLCDB;User ID=c##aucma_mes;Password=aucma
scadaConnStr=Data Source=10.100.72.20/ORCLCDB;User ID=c##aucma_sacda;Password=aucma
scadaConnStr=Data Source=10.100.72.20/ORCLCDB;User ID=c##aucma_scada;Password=aucma
#工位编号
stationCode=ZZ-01
stationCode=1005
#工位名称
stationName=泡后库
@ -16,7 +16,7 @@ linerStoreCode=NDJCK-001
foamStoreCode=FPJCK-001
#泡后物料类型编号
foamMaterialType=2
foamMaterialType=400
#入库任务类型编号
instoreTaskType=1

@ -1 +1 @@
7b2aa194c506f4bc7032df390d071c01dfc42ba8
75eb3c64767d2d658d8639003035c50091a11635

@ -461,5 +461,3 @@ E:\c#\AUCMA\aucma.scada\foam\Aucma.Scada.UI\obj\Debug\Aucma.Scada.UI.exe
E:\c#\AUCMA\aucma.scada\foam\Aucma.Scada.UI\obj\Debug\Aucma.Scada.UI.pdb
E:\c#\AUCMA\aucma.scada\foam\Aucma.Scada.UI\obj\Debug\Page\InventoryInfo\SelectType.baml
E:\c#\AUCMA\aucma.scada\foam\Aucma.Scada.UI\obj\Debug\Page\InventoryInfo\SelectType.g.cs
E:\c#\AUCMA\aucma.scada\foam\Aucma.Scada.UI\obj\Debug\Page\InventoryInfo\SelectTypeWindow.baml
E:\c#\AUCMA\aucma.scada\foam\Aucma.Scada.UI\obj\Debug\Page\InventoryInfo\SelectTypeWindow.g.cs

@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
E:\c#\AUCMA\aucma.scada\foam\Aucma.Scada.UI\App.xaml
20-1156749108
19-2058867325
1-1257182505
47-1470412683
451801671048
1371426297053
Page\AssemblyPlan\AssemblyPlanControl.xaml;Page\AssemblyPlan\PlanInfoEditWindow.xaml;Page\AssemblyPlan\QuantityIssuedWindow.xaml;Page\AssemblyPlan\SearchCriteriaWindow.xaml;Page\InStoreInfo\InStoreInfoControl.xaml;LogInfoControl.xaml;MainWindow.xaml;Page\InventoryInfo\BomFoamRearInventory.xaml;Page\InventoryInfo\InventoryInfoControl.xaml;Page\InventoryInfo\SelectTypeWindow.xaml;Page\InventoryInfo\SelectType.xaml;Page\InventoryInfo\LinerInventory.xaml;Page\InventoryInfo\MaterialStatisticsWindow.xaml;Page\InventoryInfo\ShellInventory.xaml;Page\InventoryInfo\SpaceDetailWindow.xaml;Page\InventoryInfo\SpaceInfoControl.xaml;Page\OutStoreInfo\OutStoreInfoControl.xaml;Page\TaskInfo\TaskInfoControl.xaml;RecordControl.xaml;templates\style\resourceStyle.xaml;
Page\AssemblyPlan\AssemblyPlanControl.xaml;Page\AssemblyPlan\PlanInfoEditWindow.xaml;Page\AssemblyPlan\QuantityIssuedWindow.xaml;Page\AssemblyPlan\SearchCriteriaWindow.xaml;Page\InStoreInfo\InStoreInfoControl.xaml;LogInfoControl.xaml;MainWindow.xaml;Page\InventoryInfo\BomFoamRearInventory.xaml;Page\InventoryInfo\InventoryInfoControl.xaml;Page\InventoryInfo\SelectType.xaml;Page\InventoryInfo\LinerInventory.xaml;Page\InventoryInfo\MaterialStatisticsWindow.xaml;Page\InventoryInfo\ShellInventory.xaml;Page\InventoryInfo\SpaceDetailWindow.xaml;Page\InventoryInfo\SpaceInfoControl.xaml;Page\OutStoreInfo\OutStoreInfoControl.xaml;Page\TaskInfo\TaskInfoControl.xaml;RecordControl.xaml;templates\style\resourceStyle.xaml;
False

@ -10,11 +10,11 @@ none
false
DEBUG;TRACE
E:\c#\AUCMA\aucma.scada\foam\Aucma.Scada.UI\App.xaml
20-1156749108
19-2058867325
1-1257182505
48451365438
46-571518127
1371426297053
Page\AssemblyPlan\AssemblyPlanControl.xaml;Page\AssemblyPlan\PlanInfoEditWindow.xaml;Page\AssemblyPlan\QuantityIssuedWindow.xaml;Page\AssemblyPlan\SearchCriteriaWindow.xaml;Page\InStoreInfo\InStoreInfoControl.xaml;LogInfoControl.xaml;MainWindow.xaml;Page\InventoryInfo\BomFoamRearInventory.xaml;Page\InventoryInfo\InventoryInfoControl.xaml;Page\InventoryInfo\SelectTypeWindow.xaml;Page\InventoryInfo\SelectType.xaml;Page\InventoryInfo\LinerInventory.xaml;Page\InventoryInfo\MaterialStatisticsWindow.xaml;Page\InventoryInfo\ShellInventory.xaml;Page\InventoryInfo\SpaceDetailWindow.xaml;Page\InventoryInfo\SpaceInfoControl.xaml;Page\OutStoreInfo\OutStoreInfoControl.xaml;Page\TaskInfo\TaskInfoControl.xaml;RecordControl.xaml;templates\style\resourceStyle.xaml;
Page\AssemblyPlan\AssemblyPlanControl.xaml;Page\AssemblyPlan\PlanInfoEditWindow.xaml;Page\AssemblyPlan\QuantityIssuedWindow.xaml;Page\AssemblyPlan\SearchCriteriaWindow.xaml;Page\InStoreInfo\InStoreInfoControl.xaml;LogInfoControl.xaml;MainWindow.xaml;Page\InventoryInfo\BomFoamRearInventory.xaml;Page\InventoryInfo\InventoryInfoControl.xaml;Page\InventoryInfo\SelectType.xaml;Page\InventoryInfo\LinerInventory.xaml;Page\InventoryInfo\MaterialStatisticsWindow.xaml;Page\InventoryInfo\ShellInventory.xaml;Page\InventoryInfo\SpaceDetailWindow.xaml;Page\InventoryInfo\SpaceInfoControl.xaml;Page\OutStoreInfo\OutStoreInfoControl.xaml;Page\TaskInfo\TaskInfoControl.xaml;RecordControl.xaml;templates\style\resourceStyle.xaml;
False

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\AssemblyPlan\PlanInfoEditWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "67A36CB586D2F3B36539DC0916D8739A7C2D3C7A5603D4816DC265521C562725"
#pragma checksum "..\..\..\..\Page\AssemblyPlan\PlanInfoEditWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "B659539AE4E067497E0D82C0BD50A089445DAE70FC3F9B0813DCDEA948D7AC79"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\AssemblyPlan\PlanInfoEditWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "67A36CB586D2F3B36539DC0916D8739A7C2D3C7A5603D4816DC265521C562725"
#pragma checksum "..\..\..\..\Page\AssemblyPlan\PlanInfoEditWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "B659539AE4E067497E0D82C0BD50A089445DAE70FC3F9B0813DCDEA948D7AC79"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\AssemblyPlan\QuantityIssuedWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "C65B89F83DEDB61F4D6FBEF4698AD190D5986C6D1FE63858985DA50C9DB448FE"
#pragma checksum "..\..\..\..\Page\AssemblyPlan\QuantityIssuedWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "B017D567ADBADDB2AAD3C6767A919E9FCF09A1A5DFF750B5D8012AEBA6E1A462"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。

@ -1,4 +1,4 @@
#pragma checksum "..\..\..\..\Page\AssemblyPlan\QuantityIssuedWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "C65B89F83DEDB61F4D6FBEF4698AD190D5986C6D1FE63858985DA50C9DB448FE"
#pragma checksum "..\..\..\..\Page\AssemblyPlan\QuantityIssuedWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "B017D567ADBADDB2AAD3C6767A919E9FCF09A1A5DFF750B5D8012AEBA6E1A462"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。

@ -1,110 +0,0 @@
#pragma checksum "..\..\..\..\Page\InventoryInfo\SelectTypeWindow.xaml" "{8829d00f-11b8-4213-878b-770e8597ac16}" "A060D390BE09B0923D3E15AD99DD377E4E52A9208275233265A9BA428BAFA31B"
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Windows.Shell;
namespace Aucma.Scada.UI.Page.InventoryInfo {
/// <summary>
/// SelectTypeWindow
/// </summary>
public partial class SelectTypeWindow : System.Windows.Window, System.Windows.Markup.IComponentConnector {
#line 7 "..\..\..\..\Page\InventoryInfo\SelectTypeWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal Aucma.Scada.UI.Page.InventoryInfo.SelectTypeWindow window;
#line default
#line hidden
#line 36 "..\..\..\..\Page\InventoryInfo\SelectTypeWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox MaterialCode;
#line default
#line hidden
#line 40 "..\..\..\..\Page\InventoryInfo\SelectTypeWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox MaterialName;
#line default
#line hidden
private bool _contentLoaded;
/// <summary>
/// InitializeComponent
/// </summary>
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
public void InitializeComponent() {
if (_contentLoaded) {
return;
}
_contentLoaded = true;
System.Uri resourceLocater = new System.Uri("/Aucma.Scada.UI;component/page/inventoryinfo/selecttypewindow.xaml", System.UriKind.Relative);
#line 1 "..\..\..\..\Page\InventoryInfo\SelectTypeWindow.xaml"
System.Windows.Application.LoadComponent(this, resourceLocater);
#line default
#line hidden
}
[System.Diagnostics.DebuggerNonUserCodeAttribute()]
[System.CodeDom.Compiler.GeneratedCodeAttribute("PresentationBuildTasks", "4.0.0.0")]
[System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
switch (connectionId)
{
case 1:
this.window = ((Aucma.Scada.UI.Page.InventoryInfo.SelectTypeWindow)(target));
return;
case 2:
this.MaterialCode = ((System.Windows.Controls.TextBox)(target));
return;
case 3:
this.MaterialName = ((System.Windows.Controls.TextBox)(target));
return;
}
this._contentLoaded = true;
}
}
}

@ -1,159 +0,0 @@
using Aucma.Scada.Model.domain;
using Aucma.Scada.UI.Model;
using Aucma.Scada.UI.Page.AssemblyPlan;
using Aucma.Scada.UI.Page.InventoryInfo;
using GalaSoft.MvvmLight;
using GalaSoft.MvvmLight.Command;
using HighWayIot.Config;
using HighWayIot.Log4net;
using HighWayIot.Repository.service;
using HighWayIot.Repository.service.Impl;
using System;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Media3D;
namespace Aucma.Scada.UI.viewModel.InventoryInfo
{
public class SelectTypeWindowViewModel : ViewModelBase
{
private AppConfig appConfig = AppConfig.Instance;
public RelayCommand<object> CloseWindowCommand { get; set; }
public RelayCommand SaveCommand { get; set; }
private IBaseSpaceInfoService baseSpaceInfoService = new BaseSpaceInfoServiceImpl();
private string spaceCodes = string.Empty;
public SelectTypeWindowViewModel(string spaceCode,BaseMaterialInfo info)
{
spaceCodes = spaceCode;
CloseWindowCommand = new RelayCommand<object>(t => CloseWindow(t));
SaveCommand = new RelayCommand(updateDirection);
PlanInfo = info;
}
private BaseMaterialInfo planInfo = new BaseMaterialInfo();
public BaseMaterialInfo PlanInfo
{
get { return planInfo; }
set
{
planInfo = value;
RaisePropertyChanged(nameof(PlanInfo));
}
}
#region 单选框
private bool _isSelectedOptionA;
public bool IsSelectedOptionA
{
get { return _isSelectedOptionA; }
set
{
if (_isSelectedOptionA != value)
{
_isSelectedOptionA = value;
RaisePropertyChanged(nameof(IsSelectedOptionA));
// 如果选择了A选项将BC选项设为false
if (_isSelectedOptionA)
{
IsSelectedOptionB = false;
IsSelectedOptionC = false;
}
}
}
}
private bool _isSelectedOptionB;
public bool IsSelectedOptionB
{
get { return _isSelectedOptionB; }
set
{
if (_isSelectedOptionB != value)
{
_isSelectedOptionB = value;
RaisePropertyChanged(nameof(IsSelectedOptionB));
// 如果选择了B选项将A选项设为false
if (_isSelectedOptionB)
{
IsSelectedOptionA = false;
IsSelectedOptionC = false;
}
}
}
}
private bool _isSelectedOptionC;
public bool IsSelectedOptionC
{
get { return _isSelectedOptionC; }
set
{
if (_isSelectedOptionC != value)
{
_isSelectedOptionC = value;
RaisePropertyChanged(nameof(IsSelectedOptionC));
if (_isSelectedOptionC)
{
IsSelectedOptionA = false;
IsSelectedOptionB = false;
}
}
}
}
#endregion
//关闭窗口
private void CloseWindow(object parameter)
{
var window = parameter as Window;
if (window != null)
{
window.Close();
}
}
private async void updateDirection()
{
if(!IsSelectedOptionA && !IsSelectedOptionB && !IsSelectedOptionC)
{
MessageBox.Show("请至少选择一个型号!");
return;
}
// 查询货道信息
BaseSpaceInfo space = baseSpaceInfoService.GetSpaceInfoBySpaceCode(appConfig.foamStoreCode, spaceCodes);
if(IsSelectedOptionA)
{
space.materialType = PlanInfo.MaterialCode;
space.typeNameA = PlanInfo.MaterialName;
}
else if(IsSelectedOptionB)
{
space.typeCodeB = PlanInfo.MaterialCode;
space.typeNameB = PlanInfo.MaterialName;
}
else if (IsSelectedOptionC)
{
space.typeCodeC = PlanInfo.MaterialCode;
space.typeNameC = PlanInfo.MaterialName;
}
baseSpaceInfoService.UpdateSpaceInfo(space);
//if (result)
//{
// MessageBox.Show(info.MaterialName + "入库方向修改成功");
//}
}
}
}
Loading…
Cancel
Save