|
@ -272,6 +272,8 @@ namespace DyeingComputer.View |
|
|
string Numder = null; |
|
|
string Numder = null; |
|
|
string ID = null; |
|
|
string ID = null; |
|
|
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0"; |
|
|
string P1 = "0", P2 = "0", P3 = "0", P4 = "0", P5 = "0"; |
|
|
|
|
|
object P1_S1, P2_S1, P3_S1, P4_S1, P5_S1, P1_S2, P2_S2, P3_S2, P4_S2, P5_S2, P1_S3, P2_S3, P3_S3, P4_S3, P5_S3; |
|
|
|
|
|
|
|
|
private void TechnologicalProcess_Import() |
|
|
private void TechnologicalProcess_Import() |
|
|
{ |
|
|
{ |
|
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
|
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
|
@ -323,13 +325,12 @@ namespace DyeingComputer.View |
|
|
// FocusManager.SetFocusedElement(Grid, Grid);
|
|
|
// FocusManager.SetFocusedElement(Grid, Grid);
|
|
|
// Grid.DataContext = new MainWindowViewModel();
|
|
|
// Grid.DataContext = new MainWindowViewModel();
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private void ProgramgroupView_edit_Click(object sender, RoutedEventArgs e)//编辑按钮
|
|
|
private void ProgramgroupView_edit_Click(object sender, RoutedEventArgs e)//编辑按钮
|
|
|
{ |
|
|
{ |
|
|
if (string.IsNullOrEmpty(Numder)) { Numder = null; P1 = "0"; P2 = "0"; P3 = "0"; P4 = "0"; P5 = "0"; } |
|
|
// if (string.IsNullOrEmpty(Numder)) { Numder = null; P1 = "0"; P2 = "0"; P3 = "0"; P4 = "0"; P5 = "0"; }
|
|
|
if (ID == null) ID = sql.Tables[0].Rows.Count.ToString(); |
|
|
if (ID == null) return;//ID = sql.Tables[0].Rows.Count.ToString();
|
|
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "Edit", "STEP = " + ID); |
|
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "Edit", "STEP = " + ID); |
|
|
ViewStep viewstop = new ViewStep(Numder, P1, P2, P3, P4, P5); |
|
|
ViewStep viewstop = new ViewStep(Numder, MainWindowViewModel.dt_TP.Select("STEP = " + ID).First()); |
|
|
viewstop.boxNAME.IsEnabled=false; |
|
|
viewstop.boxNAME.IsEnabled=false; |
|
|
viewstop.no.IsEnabled = false; |
|
|
viewstop.no.IsEnabled = false; |
|
|
viewstop.data = ID; |
|
|
viewstop.data = ID; |
|
@ -443,9 +444,8 @@ namespace DyeingComputer.View |
|
|
Dat(); |
|
|
Dat(); |
|
|
|
|
|
|
|
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "Insert", "STEP = "+ID); |
|
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "UserActions", "Insert", "STEP = "+ID); |
|
|
if (string.IsNullOrEmpty(Numder)) { Numder = null; P1 = "0"; P2 = "0"; P3 = "0"; P4 = "0"; P5 = "0"; } |
|
|
if (ID == null) return;// ID = MainWindowViewModel.dt_TP.Rows.Count.ToString();
|
|
|
if (ID == null) ID = MainWindowViewModel.dt_TP.Rows.Count.ToString(); |
|
|
ViewStep viewstop = new ViewStep(null, MainWindowViewModel.dt_TP.Select("STEP = " + ID).First()); |
|
|
ViewStep viewstop = new ViewStep(null, "0", "0", "0", "0", "0"); |
|
|
|
|
|
viewstop.boxNAME.IsEnabled = false; |
|
|
viewstop.boxNAME.IsEnabled = false; |
|
|
viewstop.no.IsEnabled = false; |
|
|
viewstop.no.IsEnabled = false; |
|
|
viewstop.data = ID; |
|
|
viewstop.data = ID; |
|
@ -529,6 +529,22 @@ namespace DyeingComputer.View |
|
|
P3 = (GridSTEP.Columns[8].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第8列,
|
|
|
P3 = (GridSTEP.Columns[8].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第8列,
|
|
|
P4 = (GridSTEP.Columns[9].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第9列,
|
|
|
P4 = (GridSTEP.Columns[9].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第9列,
|
|
|
P5 = (GridSTEP.Columns[10].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第10列,
|
|
|
P5 = (GridSTEP.Columns[10].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第10列,
|
|
|
|
|
|
|
|
|
|
|
|
P1_S1 = (GridSTEP.Columns[16].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text; |
|
|
|
|
|
P2_S1 = (GridSTEP.Columns[17].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
|
|
|
|
|
|
P3_S1 = (GridSTEP.Columns[18].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
|
|
|
|
|
|
P4_S1 = (GridSTEP.Columns[19].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
|
|
|
|
|
|
P5_S1 = (GridSTEP.Columns[20].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
|
|
|
|
|
|
P1_S2 = (GridSTEP.Columns[21].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text; |
|
|
|
|
|
P2_S2 = (GridSTEP.Columns[22].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
|
|
|
|
|
|
P3_S2 = (GridSTEP.Columns[23].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
|
|
|
|
|
|
P4_S2 = (GridSTEP.Columns[24].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
|
|
|
|
|
|
P5_S2 = (GridSTEP.Columns[25].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
|
|
|
|
|
|
P1_S3 = (GridSTEP.Columns[26].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
|
|
|
|
|
|
P2_S3 = (GridSTEP.Columns[27].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//,
|
|
|
|
|
|
P3_S3 = (GridSTEP.Columns[28].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//,
|
|
|
|
|
|
P4_S3 = (GridSTEP.Columns[29].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//
|
|
|
|
|
|
P5_S3 = (GridSTEP.Columns[30].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|