原料离子类型选项调整
This commit is contained in:
commit
75cc5dc5c3
3 files changed
+48
-17
No files matched your search
@@ -33,26 +33,45 @@ namespace formula_manage.ConvertMoels
|
|||||||
{
|
{
|
||||||
if (stuff_ion == "3")
|
if (stuff_ion == "3")
|
||||||
{
|
{
|
||||||
return "硫化";
|
return "中性";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (stuff_ion == "4")
|
if (stuff_ion == "4")
|
||||||
{
|
{
|
||||||
return "阳离子";
|
return "硫化";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (stuff_ion == "5")
|
if (stuff_ion == "5")
|
||||||
{
|
{
|
||||||
return "酞菁";
|
return "阳离子";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (stuff_ion == "6")
|
if (stuff_ion == "6")
|
||||||
{
|
{
|
||||||
return "直接";
|
return "阴离子";
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (stuff_ion == "7")
|
||||||
|
{
|
||||||
|
return "非离子";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (stuff_ion == "8")
|
||||||
|
{
|
||||||
|
return "酞菁";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (stuff_ion == "9")
|
||||||
|
{
|
||||||
|
return "直接";
|
||||||
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return "未知类型";
|
return "未知类型";
|
||||||
@@ -64,6 +83,9 @@ namespace formula_manage.ConvertMoels
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||||
|
|||||||
+4
-1
@@ -124,13 +124,16 @@
|
|||||||
<TextBlock HorizontalAlignment="Left" Height="30" Margin="670,0,0,100" TextWrapping="Wrap" Text="原料类型"
|
<TextBlock HorizontalAlignment="Left" Height="30" Margin="670,0,0,100" TextWrapping="Wrap" Text="原料类型"
|
||||||
VerticalAlignment="Bottom" Width="100" FontSize="20"/>
|
VerticalAlignment="Bottom" Width="100" FontSize="20"/>
|
||||||
<!--离子类型-->
|
<!--离子类型-->
|
||||||
<ComboBox x:Name="stuff_ion" HorizontalAlignment="Left" Height="30" Margin="755,0,0,50" Text=""
|
<ComboBox x:Name="Stuff_ion" HorizontalAlignment="Left" Height="30" Margin="755,0,0,50" Text=""
|
||||||
VerticalAlignment="Bottom" Width="100" FontSize="16" IsReadOnly="True" IsEditable="True">
|
VerticalAlignment="Bottom" Width="100" FontSize="16" IsReadOnly="True" IsEditable="True">
|
||||||
<ComboBoxItem Content="分散"></ComboBoxItem>
|
<ComboBoxItem Content="分散"></ComboBoxItem>
|
||||||
<ComboBoxItem Content="酸性"></ComboBoxItem>
|
<ComboBoxItem Content="酸性"></ComboBoxItem>
|
||||||
<ComboBoxItem Content="活性"></ComboBoxItem>
|
<ComboBoxItem Content="活性"></ComboBoxItem>
|
||||||
|
<ComboBoxItem Content="中性"></ComboBoxItem>
|
||||||
<ComboBoxItem Content="硫化"></ComboBoxItem>
|
<ComboBoxItem Content="硫化"></ComboBoxItem>
|
||||||
<ComboBoxItem Content="阳离子"></ComboBoxItem>
|
<ComboBoxItem Content="阳离子"></ComboBoxItem>
|
||||||
|
<ComboBoxItem Content="阴离子"></ComboBoxItem>
|
||||||
|
<ComboBoxItem Content="非离子"></ComboBoxItem>
|
||||||
<ComboBoxItem Content="酞菁"></ComboBoxItem>
|
<ComboBoxItem Content="酞菁"></ComboBoxItem>
|
||||||
<ComboBoxItem Content="直接"></ComboBoxItem>
|
<ComboBoxItem Content="直接"></ComboBoxItem>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|||||||
+18
-12
@@ -178,13 +178,16 @@ namespace formula_manage.Windows
|
|||||||
else if (this.stuff_ProductType.Text == "液体染料")
|
else if (this.stuff_ProductType.Text == "液体染料")
|
||||||
int_stuff_ProductType = 3;
|
int_stuff_ProductType = 3;
|
||||||
|
|
||||||
if(stuff_ion.Text == "分散") int_stuff_ion = 0;
|
if(Stuff_ion.Text == "分散") int_stuff_ion = 0;
|
||||||
else if (stuff_ion.Text == "酸性") int_stuff_ion = 1;
|
else if (Stuff_ion.Text == "酸性") int_stuff_ion = 1;
|
||||||
else if (stuff_ion.Text == "活性") int_stuff_ion = 2;
|
else if (Stuff_ion.Text == "活性") int_stuff_ion = 2;
|
||||||
else if (stuff_ion.Text == "硫化") int_stuff_ion = 3;
|
else if (Stuff_ion.Text == "中性") int_stuff_ion = 3;
|
||||||
else if (stuff_ion.Text == "阳离子") int_stuff_ion = 4;
|
else if (Stuff_ion.Text == "硫化") int_stuff_ion = 4;
|
||||||
else if (stuff_ion.Text == "酞菁") int_stuff_ion = 5;
|
else if (Stuff_ion.Text == "阳离子") int_stuff_ion = 5;
|
||||||
else if (stuff_ion.Text == "直接") int_stuff_ion = 6;
|
else if (Stuff_ion.Text == "阴离子") int_stuff_ion = 6;
|
||||||
|
else if (Stuff_ion.Text == "非离子") int_stuff_ion = 7;
|
||||||
|
else if (Stuff_ion.Text == "酞菁") int_stuff_ion = 8;
|
||||||
|
else if (Stuff_ion.Text == "直接") int_stuff_ion = 9;
|
||||||
|
|
||||||
if ((re_number.IsMatch(this.stuff_Price.Text) == false) && (stuff_Price.Text != ""))
|
if ((re_number.IsMatch(this.stuff_Price.Text) == false) && (stuff_Price.Text != ""))
|
||||||
System.Windows.MessageBox.Show("ERR:价格信息错误", "错误");//检查价格输入信息
|
System.Windows.MessageBox.Show("ERR:价格信息错误", "错误");//检查价格输入信息
|
||||||
@@ -245,9 +248,10 @@ namespace formula_manage.Windows
|
|||||||
SqlCommand INSERT_cmd = new SqlCommand(Stuff_sql, conn_SC);
|
SqlCommand INSERT_cmd = new SqlCommand(Stuff_sql, conn_SC);
|
||||||
int sql_in = INSERT_cmd.ExecuteNonQuery(); //执行语句
|
int sql_in = INSERT_cmd.ExecuteNonQuery(); //执行语句
|
||||||
|
|
||||||
if(stuff_ion.Text !="")Stuff_sql = string.Format("UPDATE [dbo].[PRODUCT] SET [ProductIon_Type] ="+ int_stuff_ion + " Where ProductCode='" + Product_Code + "'");
|
if (Stuff_ion.Text != "") Stuff_sql = string.Format("UPDATE [dbo].[PRODUCT] SET [ProductIon_Type] =" + int_stuff_ion + " Where ProductCode='" + Product_Code + "'");
|
||||||
|
else Stuff_sql = string.Format("UPDATE [dbo].[PRODUCT] SET [ProductIon_Type] =NULL Where ProductCode='" + Product_Code + "'");
|
||||||
SqlCommand Stuff_sql_cmd = new SqlCommand(Stuff_sql, conn_SC);
|
SqlCommand Stuff_sql_cmd = new SqlCommand(Stuff_sql, conn_SC);
|
||||||
INSERT_cmd.ExecuteNonQuery(); //执行语句
|
Stuff_sql_cmd.ExecuteNonQuery(); //执行语句
|
||||||
|
|
||||||
conn_SC.Close(); //关闭连接
|
conn_SC.Close(); //关闭连接
|
||||||
if (sql_in == 0)
|
if (sql_in == 0)
|
||||||
@@ -270,9 +274,10 @@ namespace formula_manage.Windows
|
|||||||
SqlCommand INSERT_cmd = new SqlCommand(Stuff_sql, conn_SC);
|
SqlCommand INSERT_cmd = new SqlCommand(Stuff_sql, conn_SC);
|
||||||
int sql_in = INSERT_cmd.ExecuteNonQuery(); //执行语句
|
int sql_in = INSERT_cmd.ExecuteNonQuery(); //执行语句
|
||||||
|
|
||||||
if (stuff_ion.Text != "") Stuff_sql = string.Format("UPDATE [dbo].[PRODUCT] SET [ProductIon_Type] =" + int_stuff_ion + " Where ProductCode='" + Product_Code + "'");
|
if (Stuff_ion.Text != "") Stuff_sql = string.Format("UPDATE [dbo].[PRODUCT] SET [ProductIon_Type] =" + int_stuff_ion + " Where ProductCode='" + Product_Code + "'");
|
||||||
|
else Stuff_sql = string.Format("UPDATE [dbo].[PRODUCT] SET [ProductIon_Type] =NULL Where ProductCode='" + Product_Code + "'");
|
||||||
SqlCommand Stuff_sql_cmd = new SqlCommand(Stuff_sql, conn_SC);
|
SqlCommand Stuff_sql_cmd = new SqlCommand(Stuff_sql, conn_SC);
|
||||||
INSERT_cmd.ExecuteNonQuery(); //执行语句
|
Stuff_sql_cmd.ExecuteNonQuery(); //执行语句
|
||||||
|
|
||||||
conn_SC.Close(); //关闭连接
|
conn_SC.Close(); //关闭连接
|
||||||
if (sql_in == 0)
|
if (sql_in == 0)
|
||||||
@@ -355,7 +360,8 @@ namespace formula_manage.Windows
|
|||||||
stuff_ProductName.Text = DataGridStuff_ProductName.Trim();//原料名称,去除空白字符
|
stuff_ProductName.Text = DataGridStuff_ProductName.Trim();//原料名称,去除空白字符
|
||||||
stuff_Price.Text = DataGridStuff_Price;//价格
|
stuff_Price.Text = DataGridStuff_Price;//价格
|
||||||
stuff_ProductType.Text = DataGridStuff_ProductType;//类型
|
stuff_ProductType.Text = DataGridStuff_ProductType;//类型
|
||||||
stuff_ion.Text = DataGridStuff_stuff_ion;
|
if (DataGridStuff_stuff_ion == "未知类型") Stuff_ion.Text = "";
|
||||||
|
else Stuff_ion.Text = DataGridStuff_stuff_ion;
|
||||||
stuff_SUPPLIER.Text = DataGridstuff_SUPPLIER;//供应商
|
stuff_SUPPLIER.Text = DataGridstuff_SUPPLIER;//供应商
|
||||||
/*stuff_Color.Text = DataGridStuff_Color;//色彩数据*/
|
/*stuff_Color.Text = DataGridStuff_Color;//色彩数据*/
|
||||||
stuff_Concentration.Text = DataGridStuff_Concentration;//浓度
|
stuff_Concentration.Text = DataGridStuff_Concentration;//浓度
|
||||||
|
|||||||
Reference in new issue
Block a user