Merge branch 'master' of http://scddns.f3322.net:13000/sc/Audit_APP
This commit is contained in:
commit
1eb1a2ecce
2 files changed
+11
-5
No files matched your search
+2
-2
@@ -96,9 +96,9 @@
|
|||||||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,0,0,50" TextWrapping="Wrap" Text="供应商" VerticalAlignment="Bottom" Width="80" FontSize="20"/>
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="15,0,0,50" TextWrapping="Wrap" Text="供应商" VerticalAlignment="Bottom" Width="80" FontSize="20"/>
|
||||||
<TextBox x:Name="stuff_Price" HorizontalAlignment="Left" Height="30" Margin="305,0,0,50" Text="" VerticalAlignment="Bottom" Width="80" FontSize="16" MaxLines="1" MaxLength="25" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="Limitnumber"/>
|
<TextBox x:Name="stuff_Price" HorizontalAlignment="Left" Height="30" Margin="305,0,0,50" Text="" VerticalAlignment="Bottom" Width="80" FontSize="16" MaxLines="1" MaxLength="25" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="Limitnumber"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="255,0,0,50" TextWrapping="Wrap" Text="价格" VerticalAlignment="Bottom" Width="45" FontSize="20"/>
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="255,0,0,50" TextWrapping="Wrap" Text="价格" VerticalAlignment="Bottom" Width="45" FontSize="20"/>
|
||||||
<TextBox x:Name="stuff_Concentration" HorizontalAlignment="Left" Height="30" Margin="585,0,0,50" Text="" VerticalAlignment="Bottom" Width="50" FontSize="16" MaxLines="1" MaxLength="25" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="Limitnumber"/>
|
<TextBox x:Name="stuff_Concentration" HorizontalAlignment="Left" Height="30" Margin="585,0,0,50" Text="0" VerticalAlignment="Bottom" Width="50" FontSize="16" MaxLines="1" MaxLength="25" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="Limitnumber"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="540,0,0,50" TextWrapping="Wrap" Text="浓度" VerticalAlignment="Bottom" Width="45" FontSize="20"/>
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="540,0,0,50" TextWrapping="Wrap" Text="浓度" VerticalAlignment="Bottom" Width="45" FontSize="20"/>
|
||||||
<TextBox x:Name="stuff_GRAVITY" HorizontalAlignment="Left" Height="30" Margin="695,0,0,50" Text="" VerticalAlignment="Bottom" Width="50" FontSize="16" MaxLines="1" MaxLength="25" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="Limitnumber"/>
|
<TextBox x:Name="stuff_GRAVITY" HorizontalAlignment="Left" Height="30" Margin="695,0,0,50" Text="1" VerticalAlignment="Bottom" Width="50" FontSize="16" MaxLines="1" MaxLength="25" InputMethod.IsInputMethodEnabled="False" PreviewTextInput="Limitnumber"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="650,0,0,50" TextWrapping="Wrap" Text="比重" VerticalAlignment="Bottom" Width="45" FontSize="20"/>
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="650,0,0,50" TextWrapping="Wrap" Text="比重" VerticalAlignment="Bottom" Width="45" FontSize="20"/>
|
||||||
<Button Content="存储" HorizontalAlignment="Left" Height="65" Margin="795,0,0,60" VerticalAlignment="Bottom" Width="145" FontSize="40" BorderBrush="{x:Null}" Background="#FFCECECE" Click="Button_Preservation"/>
|
<Button Content="存储" HorizontalAlignment="Left" Height="65" Margin="795,0,0,60" VerticalAlignment="Bottom" Width="145" FontSize="40" BorderBrush="{x:Null}" Background="#FFCECECE" Click="Button_Preservation"/>
|
||||||
<Button Content="删除" HorizontalAlignment="Left" Height="65" Margin="975,0,0,60" VerticalAlignment="Bottom" Width="145" FontSize="40" BorderBrush="{x:Null}" Background="#FFCECECE" Click="Button_Delete"/>
|
<Button Content="删除" HorizontalAlignment="Left" Height="65" Margin="975,0,0,60" VerticalAlignment="Bottom" Width="145" FontSize="40" BorderBrush="{x:Null}" Background="#FFCECECE" Click="Button_Delete"/>
|
||||||
|
|||||||
@@ -44,11 +44,17 @@ namespace Audit.View
|
|||||||
|
|
||||||
private void Button_Preservation(object sender, RoutedEventArgs e)//保存按钮事件
|
private void Button_Preservation(object sender, RoutedEventArgs e)//保存按钮事件
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(this.stuff_ProductCode.Text)) System.Windows.MessageBox.Show("ERR.C0101-1:无效的原料信息");//检查原料代码
|
if (string.IsNullOrEmpty(this.stuff_ProductCode.Text)) System.Windows.MessageBox.Show("ERR.C0101:无效的原料信息");//检查原料代码
|
||||||
else
|
else
|
||||||
if (string.IsNullOrWhiteSpace(this.stuff_ProductName.Text)) System.Windows.MessageBox.Show("ERR.C0101-2:无效的原料信息");//检查原料名称
|
if (string.IsNullOrEmpty(this.stuff_ProductName.Text)) System.Windows.MessageBox.Show("ERR.C0101-2:无效的原料信息,名称不可为空");//检查原料名称
|
||||||
else
|
else
|
||||||
if (string.IsNullOrWhiteSpace(this.stuff_ProductType.Text)) System.Windows.MessageBox.Show("ERR.C0101-3:无效的原料信息");//检查原料类型
|
if (string.IsNullOrEmpty(this.stuff_ProductType.Text)) System.Windows.MessageBox.Show("ERR.C0101-3:无效的原料信息,类型不可为空");//检查原料类型
|
||||||
|
else
|
||||||
|
if (string.IsNullOrEmpty(this.stuff_GRAVITY.Text)) System.Windows.MessageBox.Show("ERR.C0101-1:无效的原料信息,比重不可为空");//检查原料比重
|
||||||
|
else
|
||||||
|
if (int.Parse(this.stuff_GRAVITY.Text) < 0 || int.Parse(this.stuff_GRAVITY.Text) > 5) System.Windows.MessageBox.Show("ERR.C0102-1:原料信息错误,比重错误");//检查比重输入数值
|
||||||
|
else
|
||||||
|
if(int.Parse(this.stuff_Concentration.Text) < 0 || int.Parse(this.stuff_Concentration.Text) > 10) System.Windows.MessageBox.Show("ERR.C0102-2:原料信息错误,浓度错误");//检查浓度输入数值
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user