@ -51,7 +51,7 @@ namespace Audit.View
//string DataGridStuff_Color = (DataGridStuff.Columns[6].GetCellContent(DataGridStuff.Items[rownum])as TextBlock).Text;//定位第5列选中行单元格,色彩
string DataGridStuff_Concentration = ( DataGridStuff . Columns [ 7 ] . GetCellContent ( DataGridStuff . Items [ rownum ] ) as TextBlock ) . Text ; //定位第6列选中行单元格,浓度
string DataGridStuff_GRAVITY = ( DataGridStuff . Columns [ 8 ] . GetCellContent ( DataGridStuff . Items [ rownum ] ) as TextBlock ) . Text ; //定位第7列选中行单元格,比重
stuff_Color . Background = ( DataGridStuff . Columns [ 6 ] . GetCellContent ( DataGridStuff . Items [ rownum ] ) as TextBlock ) . Background ; //定位第5列选中行单元格,色彩,背景色传递至色彩框背景色
//stuff_Color.Background = (DataGridStuff.Columns[6].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Background; //定位第5列选中行单元格,色彩,背景色传递至色彩框背景色
stuff_ProductCode . Text = DataGridStuff_ProductCode . ToString ( ) ; //填入原料代码
stuff_ProductName . Text = DataGridStuff_ProductName . ToString ( ) ; //填入原料名称
stuff_Price . Text = DataGridStuff_Price . ToString ( ) ; //填入价格
@ -62,6 +62,14 @@ namespace Audit.View
if ( DataGridStuff_ProductType . ToString ( ) = = "0" ) stuff_ProductType . Text = "染料" ; //判断类型1-染料。2-助剂。3-粉体助剂。冰填入
if ( DataGridStuff_ProductType . ToString ( ) = = "1" ) stuff_ProductType . Text = "助剂" ;
if ( DataGridStuff_ProductType . ToString ( ) = = "2" ) stuff_ProductType . Text = "粉体助剂" ;
if ( ( DataGridStuff . Columns [ 6 ] . GetCellContent ( DataGridStuff . Items [ rownum ] ) as TextBlock ) . Background ! = null ) //定位第5列选中行单元格,色彩,判断参数是否有效
{
stuff_Color . Background = ( DataGridStuff . Columns [ 6 ] . GetCellContent ( DataGridStuff . Items [ rownum ] ) as TextBlock ) . Background ; //定位第5列选中行单元格,色彩,有效背景色传递至色彩框背景色
}
else
{
stuff_Color . Background = new SolidColorBrush ( System . Windows . Media . Color . FromArgb ( 2 5 5 , 2 5 5 , 2 5 5 , 2 5 5 ) ) ; //有效背景色传递至色彩框背景色
}
}