步骤编辑修改
This commit is contained in:
commit
fa836593f5
5 files changed
+51
-22
No files matched your search
@@ -54,13 +54,15 @@ namespace DyeingComputer.ConvertMoels
|
||||
case "055":
|
||||
return new BitmapImage(new Uri("/Lmage/ID055.png", UriKind.Relative));//主泵启动
|
||||
case "056":
|
||||
|
||||
return new BitmapImage(new Uri("/Lmage/ID056.png", UriKind.Relative));//
|
||||
case "064":
|
||||
return new BitmapImage(new Uri("/Lmage/ID064.png", UriKind.Relative));//
|
||||
case "065":
|
||||
return new BitmapImage(new Uri("/Lmage/ID065.png", UriKind.Relative));//
|
||||
case "067":
|
||||
return new BitmapImage(new Uri("/Lmage/ID067.png", UriKind.Relative));//
|
||||
case "068":
|
||||
return new BitmapImage(new Uri("/Lmage/ID068.png", UriKind.Relative));//
|
||||
case "090":
|
||||
return new BitmapImage(new Uri("/Lmage/ID090.png", UriKind.Relative));//
|
||||
case "091":
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using DyeingComputer.UserClass;
|
||||
using DyeingComputer.ViewModel;
|
||||
using DyeingComputer.Windows;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -127,12 +128,12 @@ namespace DyeingComputer.View
|
||||
}
|
||||
return child;
|
||||
}
|
||||
|
||||
/***********/
|
||||
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 (ID == null) ID = sql.Tables[0].Rows.Count.ToString();
|
||||
ViewStep viewstop = new ViewStep(Numder, P1, P2, P3, P4, P5);
|
||||
ViewStep viewstop = new ViewStep(Numder, sql.Tables[0].Select("STEP = " + ID).First());
|
||||
viewstop.AddressUpdated += new ViewStep.AddressUpdateHandler(Address_ButtonClicked);
|
||||
viewstop.data = ID;
|
||||
viewstop.ShowDialog();
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
<ConvertMoels:StatenToImageConvert x:Key="StatenToImageConvert"/>
|
||||
</UserControl.Resources>
|
||||
<Grid>
|
||||
<ScrollViewer PanningMode="VerticalOnly" VerticalScrollBarVisibility="Auto">
|
||||
<DataGrid x:Name="GridSTEP" AlternationCount="2" IsReadOnly="True" SelectionChanged="Grid_SelectionChanged"
|
||||
Margin="630,40,0,0" d:ItemsSource="{d:SampleData ItemCount=90}" AutoGenerateColumns="False" MinColumnWidth="30"
|
||||
ItemsSource="{Binding Path=TechnologicalProcess_View,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"
|
||||
@@ -93,8 +92,21 @@
|
||||
<DataGridTextColumn Binding="{Binding Parameter8}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter9}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter10}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding DYELOT}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
|
||||
<DataGridTextColumn Binding="{Binding Parameter1_S1}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter2_S1}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter3_S1}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter4_S1}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter5_S1}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter1_S2}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter2_S2}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter3_S2}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter4_S2}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter5_S2}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter1_S3}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter2_S3}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter3_S3}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter4_S3}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTextColumn Binding="{Binding Parameter5_S3}" Width="0" MinWidth="0" MaxWidth="0"/>
|
||||
<DataGridTemplateColumn Header="{x:Static lang:Resources.Directives}" Width="100" IsReadOnly="True">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate>
|
||||
@@ -147,11 +159,9 @@
|
||||
</DataGridTemplateColumn>
|
||||
</DataGrid.Columns>
|
||||
</DataGrid>
|
||||
</ScrollViewer>
|
||||
<Grid Width="600" Margin="0,40,0,0" HorizontalAlignment="Left" >
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto" PanningMode="VerticalOnly">
|
||||
<TextBlock x:Name="log" FontSize="25" Background="White"
|
||||
Text="{Binding Sys_log}" />
|
||||
<TextBlock x:Name="log" FontSize="25" Background="White" Text="{Binding Sys_log}" />
|
||||
</ScrollViewer>
|
||||
<DataGrid x:Name="Receip" IsHitTestVisible="False" Visibility="Collapsed"
|
||||
AutoGenerateColumns="False" FontSize="15" AlternationCount="2"
|
||||
|
||||
@@ -272,6 +272,8 @@ namespace DyeingComputer.View
|
||||
string Numder = null;
|
||||
string ID = null;
|
||||
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()
|
||||
{
|
||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||
@@ -323,13 +325,12 @@ namespace DyeingComputer.View
|
||||
// FocusManager.SetFocusedElement(Grid, Grid);
|
||||
// Grid.DataContext = new MainWindowViewModel();
|
||||
}
|
||||
|
||||
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 (ID == null) ID = sql.Tables[0].Rows.Count.ToString();
|
||||
// if (string.IsNullOrEmpty(Numder)) { Numder = null; P1 = "0"; P2 = "0"; P3 = "0"; P4 = "0"; P5 = "0"; }
|
||||
if (ID == null) return;//ID = sql.Tables[0].Rows.Count.ToString();
|
||||
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.no.IsEnabled = false;
|
||||
viewstop.data = ID;
|
||||
@@ -443,9 +444,8 @@ namespace DyeingComputer.View
|
||||
Dat();
|
||||
|
||||
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) ID = MainWindowViewModel.dt_TP.Rows.Count.ToString();
|
||||
ViewStep viewstop = new ViewStep(null, "0", "0", "0", "0", "0");
|
||||
if (ID == null) return;// ID = MainWindowViewModel.dt_TP.Rows.Count.ToString();
|
||||
ViewStep viewstop = new ViewStep(null, MainWindowViewModel.dt_TP.Select("STEP = " + ID).First());
|
||||
viewstop.boxNAME.IsEnabled = false;
|
||||
viewstop.no.IsEnabled = false;
|
||||
viewstop.data = ID;
|
||||
@@ -529,6 +529,22 @@ namespace DyeingComputer.View
|
||||
P3 = (GridSTEP.Columns[8].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第8列,
|
||||
P4 = (GridSTEP.Columns[9].GetCellContent(GridSTEP.Items[rownum]) as TextBlock).Text;//定位第9列,
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace DyeingComputer.Windows
|
||||
//声明一个更新Address的事件
|
||||
public event AddressUpdateHandler AddressUpdated;
|
||||
|
||||
public ViewStep(string Numder ,string P1D,string P2D,string P3D,string P4D,string P5D)
|
||||
public ViewStep(string Numder ,DataRow DAT)
|
||||
{
|
||||
InitializeComponent();
|
||||
this.DataContext = this;
|
||||
@@ -42,11 +42,11 @@ namespace DyeingComputer.Windows
|
||||
boxNAME.Focus();
|
||||
boxNAME.Text = Numder;
|
||||
|
||||
P1.Text = P1D;
|
||||
P2.Text = P2D;
|
||||
P3.Text = P3D;
|
||||
P4.Text = P4D;
|
||||
P5.Text = P5D;
|
||||
P1.Text = DAT.Field<string>("Parameter1");
|
||||
P2.Text = DAT.Field<string>("Parameter2");
|
||||
P3.Text = DAT.Field<string>("Parameter3");
|
||||
P4.Text = DAT.Field<string>("Parameter4");
|
||||
P5.Text = DAT.Field<string>("Parameter5");
|
||||
/* P1.Visibility = Visibility.Collapsed;
|
||||
P1N.Visibility = Visibility.Collapsed;
|
||||
P2.Visibility = Visibility.Collapsed;
|
||||
|
||||
Reference in new issue
Block a user