You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
64 lines
3.4 KiB
64 lines
3.4 KiB
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 Audit.View
|
|
{
|
|
/// <summary>
|
|
/// StuffView.xaml 的交互逻辑
|
|
/// </summary>
|
|
public partial class StuffView : UserControl
|
|
{
|
|
/// <summary>
|
|
/// StuffView
|
|
/// </summary>
|
|
public StuffView()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Button_Preservation(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void Button_Delete(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void DataGridStuff_MouseDoubleClick(object sender, MouseButtonEventArgs e)
|
|
{
|
|
int rownum = this.DataGridStuff.SelectedIndex;//获取鼠标选中行并定义变量
|
|
string DataGridStuff_ProductCode = (DataGridStuff.Columns[1].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第0列选中行单元格,原料代码
|
|
string DataGridStuff_ProductName = (DataGridStuff.Columns[2].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第1列选中行单元格,原料名称
|
|
string DataGridStuff_Price = (DataGridStuff.Columns[3].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第2列选中行单元格,价格
|
|
string DataGridStuff_ProductUnit = (DataGridStuff.Columns[4].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第3列选中行单元格,供应商
|
|
string DataGridStuff_ProductType = (DataGridStuff.Columns[5].GetCellContent(DataGridStuff.Items[rownum]) as TextBlock).Text;//定位第4列选中行单元格,类型
|
|
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_ProductCode.Text = DataGridStuff_ProductCode.ToString();//填入原料代码
|
|
stuff_ProductName.Text = DataGridStuff_ProductName.ToString();//填入原料名称
|
|
stuff_Price.Text = DataGridStuff_Price.ToString();//填入价格
|
|
stuff_ProductUnit.Text = DataGridStuff_ProductUnit.ToString();//填入供应商
|
|
stuff_Color.Text = DataGridStuff_Color.ToString();//填入色彩
|
|
stuff_Concentration.Text = DataGridStuff_Concentration.ToString();//填入浓度
|
|
stuff_GRAVITY.Text = DataGridStuff_GRAVITY.ToString();//填入比重
|
|
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 = "粉体助剂";
|
|
}
|
|
}
|
|
}
|
|
|