|
|
@ -132,7 +132,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
|
string Machines_ = comboBoxMachine.Text; |
|
|
|
string State_ = "100"; |
|
|
|
string Dyelot_ = comboBoxDyelot.Text; |
|
|
|
// string color_ = color_color.Background.ToString();
|
|
|
|
string color_ = color.Background.ToString(); |
|
|
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
|
|
|
SQLiteHelpers.Open(); //打开数据库
|
|
|
|
try |
|
|
@ -465,7 +465,7 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
|
if (e.Key == Key.Enter) |
|
|
|
{ |
|
|
|
string Connstr_SC; |
|
|
|
string DYELOTS_sql = "SELECT * FROM [dbo].[DYELOTS] WHERE OrderNo = '" + comboBoxWorkOrder.Text + "'";//单号查询语句
|
|
|
|
string DYELOTS_sql = "SELECT * FROM [dbo].[DYELOTS] WHERE Dyelot = '" + comboBoxWorkOrder.Text + "'";//单号查询语句
|
|
|
|
try |
|
|
|
{ |
|
|
|
if (MainWindowViewModel.SQMOD == "Windows Authentication") |
|
|
@ -483,23 +483,38 @@ namespace SunlightCentralizedControlManagement_SCCM_.View |
|
|
|
|
|
|
|
DataTable ds = new DataTable(); |
|
|
|
DYELOTS_data.Fill(ds); |
|
|
|
comboBoxDyelot.Text = ds.AsEnumerable().Select(row => row.Field<string>("Dyelot")).First(); |
|
|
|
comboBoxMachine.Text = ds.AsEnumerable().Select(row => row.Field<string>("Machine")).First(); |
|
|
|
TEXTColorNumber.Text = ds.AsEnumerable().Select(row => row.Field<string>("ColorNo")).First(); |
|
|
|
TEXTColorName.Text = ds.AsEnumerable().Select(row => row.Field<string>("ColorName")).First(); |
|
|
|
TEXTClient.Text = ds.AsEnumerable().Select(row => row.Field<string>("CustomerName")).First(); |
|
|
|
TEXTClothSpecies.Text = ds.AsEnumerable().Select(row => row.Field<string>("FabricName")).First(); |
|
|
|
TEXTClothWeight.Text = ds.AsEnumerable().Select(row => row.Field<float>("TotalWeight")).First().ToString(); |
|
|
|
TEXTClothWeight.Text = ds.AsEnumerable().Select(row => row.Field<Double>("TotalWeight")).First().ToString(); |
|
|
|
TEXTBathRatio.Text = ds.AsEnumerable().Select(row => row.Field<string>("LiquidRatio")).First(); |
|
|
|
TEXTTotal.Text = ds.AsEnumerable().Select(row => row.Field<string>("TotalVolume")).First(); |
|
|
|
TEXTUSER.Text = ds.AsEnumerable().Select(row => row.Field<string>("UserAccount")).First(); |
|
|
|
comboBoxDyelot.Text = ds.AsEnumerable().Select(row => row.Field<string>("Dyelot")).First(); |
|
|
|
|
|
|
|
string machine_ = ds.AsEnumerable().Select(row => row.Field<string>("Machine")).First();//机台
|
|
|
|
if (MainWindowViewModel.Machines.Select("Name ='"+machine_+"'").Length == 0) |
|
|
|
{ |
|
|
|
comboBoxMachine.Text = null; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
comboBoxMachine.Text = machine_; |
|
|
|
} |
|
|
|
string user_ = ds.AsEnumerable().Select(row => row.Field<string>("UserAccount")).First();//用户名
|
|
|
|
if (!String.IsNullOrEmpty(user_)) TEXTUSER.Text = user_; |
|
|
|
comboBoxProgram.Text = ds.AsEnumerable().Select(row => row.Field<string>("Program")).First(); |
|
|
|
color_= color.Background.ToString(); |
|
|
|
|
|
|
|
if (ds.AsEnumerable().Select(row => row.Field<int>("color")).First() > 0)//颜色
|
|
|
|
{ |
|
|
|
string colorValue = string.Format("{0:X6}", ds.AsEnumerable().Select(row => row.Field<int>("color")).First());//十进制RGB数值转十六进制六位RGB并补0位例“C0C0C0”
|
|
|
|
color.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString( |
|
|
|
"#FF" + colorValue.Substring(4, 2) + colorValue.Substring(2, 2) + colorValue.Substring(0, 2))); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception ex) |
|
|
|
{ |
|
|
|
LogGing.ERRDATA(ex); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|