This commit is contained in:
sc committed 2024-12-07 22:47:04 +08:00
commit 55d5121292
5 files changed
+17 -7

No files matched your search

+1 -1
View File
@@ -69,7 +69,7 @@
</DataGrid.Columns>
</DataGrid>
<TextBlock x:Name="log" HorizontalAlignment="Left" Margin="0,40,0,0" TextWrapping="Wrap" Width="600" FontSize="25" Background="White" Text="{Binding Sys_log}"/>
<TextBlock x:Name="name" HorizontalAlignment="Left" Margin="600,0,0,0" TextWrapping="Wrap" FontSize="24" Background="#FFD0D0D0" Text="NAME" Height="30" Block.TextAlignment="Center">
<TextBlock x:Name="name" HorizontalAlignment="Left" Margin="600,0,0,0" TextWrapping="Wrap" FontSize="24" Background="#FFD0D0D0" Text="{Binding Program_Name}" Height="30" Block.TextAlignment="Center">
<TextBlock.LayoutTransform>
<!--文字同样旋转90度-->
<RotateTransform Angle="270"/>
+3 -4
View File
@@ -49,7 +49,6 @@ namespace DyeingComputer.View
}
public static object workName;
public static string Program_Name;
public static SQLiteHelper SQLiteHelpers = null; //定义数据库
public static readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
public static DataSet sql; //内存数据缓存
@@ -61,7 +60,7 @@ namespace DyeingComputer.View
string sql_script = "select * from WorkorderSteps where ProgramID = '" + workName + "'";
if (sql != null) sql.Clear(); //清空缓存
sql = SQLiteHelpers.ExecuteDataSet(sql_script, null); //读取表写入缓存
Program_Name = SQLiteHelpers.ExecuteScalar("select ProgramName from WorkOrder where ProgramID = '" + workName + "'", null).ToString();
MainWindowViewModel.ProgramName = SQLiteHelpers.ExecuteScalar("select ProgramName from WorkOrder where ProgramID = '" + workName + "'", null).ToString();
if (sql != null) dt_TP = sql.Tables[0]; //转换显示计划表
SQLiteHelpers.Delete("RUN", null, null); //删除run信息
@@ -92,7 +91,7 @@ namespace DyeingComputer.View
string sql_script = "select * from RUN";
if (sql != null) sql.Clear(); //清空缓存
sql = SQLiteHelpers.ExecuteDataSet(sql_script, null); //读取表写入缓存
Program_Name = SQLiteHelpers.ExecuteScalar("select Program from RUN where Step = '1'", null).ToString();
MainWindowViewModel.ProgramName = SQLiteHelpers.ExecuteScalar("select Program from RUN where Step = '1'", null).ToString();
MainWindowViewModel.WorkNumder = SQLiteHelpers.ExecuteScalar("select DYELOT from RUN where Step = '1'", null).ToString();
SQLiteHelpers.Close(); //关闭连接
@@ -319,7 +318,7 @@ namespace DyeingComputer.View
// MainWindowViewModel.TechnologicalProcess_View = MainWindowViewModel.ToObservableCollection<TechnologicalProcess>(sql.Tables[0]);
// Grid.ItemsSource = dt_m.DE sql.Tables[0].DefaultView; //转换显示计划表
name.Text = Program_Name;
// name.Text = Program_Name;
}
}
}