io更新逻辑修改设置生效方式修改
This commit is contained in:
commit
82720d78da
11 files changed
+82
-46
No files matched your search
Generated
+9
@@ -834,6 +834,15 @@ namespace DyeingComputer.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Protocols 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string Protocols {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("Protocols", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Pump 的本地化字符串。
|
/// 查找类似 Pump 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -489,4 +489,7 @@
|
|||||||
<data name="DyeingMachine" xml:space="preserve">
|
<data name="DyeingMachine" xml:space="preserve">
|
||||||
<value>Dyeing</value>
|
<value>Dyeing</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Protocols" xml:space="preserve">
|
||||||
|
<value>Protocols</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -489,4 +489,7 @@
|
|||||||
<data name="DyeingMachine" xml:space="preserve">
|
<data name="DyeingMachine" xml:space="preserve">
|
||||||
<value>DyeingMachine</value>
|
<value>DyeingMachine</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Protocols" xml:space="preserve">
|
||||||
|
<value>Protocols</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -489,4 +489,7 @@
|
|||||||
<data name="DyeingMachine" xml:space="preserve">
|
<data name="DyeingMachine" xml:space="preserve">
|
||||||
<value>染色机</value>
|
<value>染色机</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Protocols" xml:space="preserve">
|
||||||
|
<value>协议</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -483,10 +483,13 @@
|
|||||||
<data name="Bottom" xml:space="preserve">
|
<data name="Bottom" xml:space="preserve">
|
||||||
<value>底</value>
|
<value>底</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DyeingMachine" xml:space="preserve">
|
|
||||||
<value>染色機</value>
|
|
||||||
</data>
|
|
||||||
<data name="Receipt" xml:space="preserve">
|
<data name="Receipt" xml:space="preserve">
|
||||||
<value>領料單</value>
|
<value>領料單</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="DyeingMachine" xml:space="preserve">
|
||||||
|
<value>染色機</value>
|
||||||
|
</data>
|
||||||
|
<data name="Protocols" xml:space="preserve">
|
||||||
|
<value />
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -8,10 +8,12 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="500" d:DesignWidth="800">
|
d:DesignHeight="500" d:DesignWidth="800">
|
||||||
<Grid>
|
<Grid>
|
||||||
<ComboBox HorizontalAlignment="Left" Height="30" Margin="150,10,0,0" x:Name="comboBoxCOM" VerticalAlignment="Top" Width="200" SelectionChanged="comboBoxCOM_SelectionChanged" FontSize="20" IsEditable="True" IsReadOnly="True"/>
|
<ComboBox HorizontalAlignment="Left" Height="30" Margin="150,50,0,0" x:Name="comboBoxCOM" VerticalAlignment="Top" Width="200" SelectionChanged="comboBoxCOM_SelectionChanged" FontSize="20" IsEditable="True" IsReadOnly="True"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,10,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.Port}" VerticalAlignment="Top" Width="120" FontSize="25"/>
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,50,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.Port}" VerticalAlignment="Top" Width="120" FontSize="25"/>
|
||||||
<ComboBox HorizontalAlignment="Left" Height="30" Margin="150,50,0,0" x:Name="comboBoxLanguage" VerticalAlignment="Top" Width="200" SelectionChanged="comboBoxLanguage_SelectionChanged" FontSize="20" IsEditable="True" IsReadOnly="True"/>
|
<ComboBox HorizontalAlignment="Left" Height="30" Margin="150,90,0,0" x:Name="comboBoxCOMmod" VerticalAlignment="Top" Width="200" SelectionChanged="comboBoxCOMmod_SelectionChanged" FontSize="20" IsEditable="True" IsReadOnly="True"/>
|
||||||
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,50,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.Language}" VerticalAlignment="Top" Width="120" FontSize="25"/>
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,90,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.Protocols}" VerticalAlignment="Top" Width="120" FontSize="25"/>
|
||||||
|
<ComboBox HorizontalAlignment="Left" Height="30" Margin="150,10,0,0" x:Name="comboBoxLanguage" VerticalAlignment="Top" Width="200" SelectionChanged="comboBoxLanguage_SelectionChanged" FontSize="20" IsEditable="True" IsReadOnly="True"/>
|
||||||
|
<TextBlock HorizontalAlignment="Left" Height="40" Margin="10,10,0,0" TextWrapping="Wrap" Text="{x:Static lang:Resources.Language}" VerticalAlignment="Top" Width="120" FontSize="25"/>
|
||||||
<TextBlock Name="RX" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="30" Width="100" Margin="5,0,0,0"/>
|
<TextBlock Name="RX" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="30" Width="100" Margin="5,0,0,0"/>
|
||||||
<TextBlock Name="TX" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="30" Width="100" Margin="200,0,0,0"/>
|
<TextBlock Name="TX" TextWrapping="Wrap" HorizontalAlignment="Left" VerticalAlignment="Bottom" Height="30" Width="100" Margin="200,0,0,0"/>
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,10 @@ namespace DyeingComputer.View
|
|||||||
comboBoxCOM.ItemsSource = ports;
|
comboBoxCOM.ItemsSource = ports;
|
||||||
comboBoxCOM.Text = Configini.IniReadvalue("SYS", "COM");
|
comboBoxCOM.Text = Configini.IniReadvalue("SYS", "COM");
|
||||||
|
|
||||||
|
string[] protocols = { "SUNLIGHT_R", "MODBUS_RTU" };
|
||||||
|
comboBoxCOMmod.ItemsSource = protocols;
|
||||||
|
comboBoxCOMmod.Text = Configini.IniReadvalue("SYS", "Protocols");
|
||||||
|
|
||||||
string[] Language = { "en-US", "zh-CN", "zh -TW" };
|
string[] Language = { "en-US", "zh-CN", "zh -TW" };
|
||||||
comboBoxLanguage.ItemsSource = Language;
|
comboBoxLanguage.ItemsSource = Language;
|
||||||
comboBoxLanguage.Text = Configini.IniReadvalue("SYS", "Language");
|
comboBoxLanguage.Text = Configini.IniReadvalue("SYS", "Language");
|
||||||
@@ -42,7 +46,10 @@ namespace DyeingComputer.View
|
|||||||
{
|
{
|
||||||
Configini.IniWritevalue("SYS", "COM", comboBoxCOM.SelectedValue.ToString());
|
Configini.IniWritevalue("SYS", "COM", comboBoxCOM.SelectedValue.ToString());
|
||||||
}
|
}
|
||||||
|
private void comboBoxCOMmod_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
Configini.IniWritevalue("SYS", "Protocols", comboBoxCOMmod.SelectedValue.ToString());
|
||||||
|
}
|
||||||
private void comboBoxLanguage_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void comboBoxLanguage_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
Configini.IniWritevalue("SYS", "Language", comboBoxLanguage.SelectedValue.ToString());
|
Configini.IniWritevalue("SYS", "Language", comboBoxLanguage.SelectedValue.ToString());
|
||||||
@@ -64,5 +71,7 @@ namespace DyeingComputer.View
|
|||||||
RX.Text = MainWindowViewModel.RX.ToString();
|
RX.Text = MainWindowViewModel.RX.ToString();
|
||||||
TX.Text = MainWindowViewModel.TX.ToString();
|
TX.Text = MainWindowViewModel.TX.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+2
-14
@@ -57,13 +57,7 @@
|
|||||||
</DataGrid.CellStyle>
|
</DataGrid.CellStyle>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<!--列信息绑定-->
|
<!--列信息绑定-->
|
||||||
<DataGridTextColumn Header="DIO" Width="100" Binding="{Binding ID}" IsReadOnly="True">
|
<DataGridTextColumn Header="DIO" MinWidth="0" MaxWidth="0" Binding="{Binding ID}" IsReadOnly="True"/>
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
|
||||||
<Setter Property="Foreground" Value="{Binding Path=type,Converter={StaticResource IORBConvert}}"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Header="PLC" Width="100" Binding="{Binding PLC}">
|
<DataGridTextColumn Header="PLC" Width="100" Binding="{Binding PLC}">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
@@ -125,13 +119,7 @@
|
|||||||
</DataGrid.CellStyle>
|
</DataGrid.CellStyle>
|
||||||
<DataGrid.Columns>
|
<DataGrid.Columns>
|
||||||
<!--列信息绑定-->
|
<!--列信息绑定-->
|
||||||
<DataGridTextColumn Header="AIO" Width="100" Binding="{Binding ID}" IsReadOnly="True">
|
<DataGridTextColumn Header="AIO" MinWidth="0" MaxWidth="0" Binding="{Binding ID}" IsReadOnly="True"/>
|
||||||
<DataGridTextColumn.ElementStyle>
|
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
|
||||||
<Setter Property="Foreground" Value="{Binding Path=type,Converter={StaticResource IORBConvert}}"/>
|
|
||||||
</Style>
|
|
||||||
</DataGridTextColumn.ElementStyle>
|
|
||||||
</DataGridTextColumn>
|
|
||||||
<DataGridTextColumn Header="PLC" Width="100" Binding="{Binding PLC}">
|
<DataGridTextColumn Header="PLC" Width="100" Binding="{Binding PLC}">
|
||||||
<DataGridTextColumn.ElementStyle>
|
<DataGridTextColumn.ElementStyle>
|
||||||
<Style TargetType="{x:Type TextBlock}">
|
<Style TargetType="{x:Type TextBlock}">
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ namespace DyeingComputer.View
|
|||||||
MainWindowViewModel.dt_ParameterSet = SQLiteHelpers.ExecuteDataSet("select * from Parameters order by ParameterID asc", null).Tables[0]; //读取计划表写入缓存
|
MainWindowViewModel.dt_ParameterSet = SQLiteHelpers.ExecuteDataSet("select * from Parameters order by ParameterID asc", null).Tables[0]; //读取计划表写入缓存
|
||||||
SQLiteHelpers.Close();//关闭数据库
|
SQLiteHelpers.Close();//关闭数据库
|
||||||
}
|
}
|
||||||
|
MainWindowViewModel.set_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)//打开页面时的操作
|
private void UserControl_Loaded(object sender, RoutedEventArgs e)//打开页面时的操作
|
||||||
|
|||||||
@@ -61,6 +61,8 @@ namespace DyeingComputer.View
|
|||||||
MainWindowViewModel.dt_SysSet = SQLiteHelpers.ExecuteDataSet("select * from System order by ParameterID asc", null).Tables[0];
|
MainWindowViewModel.dt_SysSet = SQLiteHelpers.ExecuteDataSet("select * from System order by ParameterID asc", null).Tables[0];
|
||||||
SQLiteHelpers.Close();//关闭数据库
|
SQLiteHelpers.Close();//关闭数据库
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MainWindowViewModel.set_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UserControl_Loaded(object sender, RoutedEventArgs e)//打开页面时的操作
|
private void UserControl_Loaded(object sender, RoutedEventArgs e)//打开页面时的操作
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ using System.Runtime.Remoting.Channels;
|
|||||||
using System.Diagnostics.Eventing.Reader;
|
using System.Diagnostics.Eventing.Reader;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using TouchSocket.Sockets;
|
||||||
|
|
||||||
|
|
||||||
namespace DyeingComputer.ViewModel
|
namespace DyeingComputer.ViewModel
|
||||||
@@ -139,7 +140,9 @@ namespace DyeingComputer.ViewModel
|
|||||||
public int MS17;//副缸
|
public int MS17;//副缸
|
||||||
public int MS18;//副缸
|
public int MS18;//副缸
|
||||||
public int MS19;//副缸
|
public int MS19;//副缸
|
||||||
void SYS_SET()
|
|
||||||
|
public static bool set_=false;
|
||||||
|
public void SYS_SET()
|
||||||
{
|
{
|
||||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
@@ -245,9 +248,9 @@ namespace DyeingComputer.ViewModel
|
|||||||
//设置定时器
|
//设置定时器
|
||||||
DispatcherTimer disTimer = new DispatcherTimer
|
DispatcherTimer disTimer = new DispatcherTimer
|
||||||
{
|
{
|
||||||
Interval = TimeSpan.FromMilliseconds(200) //毫秒
|
Interval = TimeSpan.FromMilliseconds(500) //毫秒
|
||||||
};
|
};
|
||||||
disTimer.Tick += DisTimer_200MS;
|
disTimer.Tick += DisTimer_500MS;
|
||||||
disTimer.Start();//计时开始
|
disTimer.Start();//计时开始
|
||||||
}//时间周期初始化
|
}//时间周期初始化
|
||||||
void Tick_Event_1S()//Tick_Event周期执行事件1S
|
void Tick_Event_1S()//Tick_Event周期执行事件1S
|
||||||
@@ -259,7 +262,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
StatusStr = Status_Str;
|
StatusStr = Status_Str;
|
||||||
Program_Name = ProgramName;
|
Program_Name = ProgramName;
|
||||||
if(dt_TP==null) Process_step = dt_TP.Select("Step=" + RUN_STEPID).First().Field<string>("ParameterName");
|
if(dt_TP==null) Process_step = dt_TP.Select("Step=" + RUN_STEPID).First().Field<string>("ParameterName");
|
||||||
|
if (set_) { set_ = false;SYS_SET(); }//设置更新
|
||||||
if (!SETP_runtime) DIDETime++;
|
if (!SETP_runtime) DIDETime++;
|
||||||
|
|
||||||
STEP_RUN();
|
STEP_RUN();
|
||||||
@@ -285,13 +288,13 @@ namespace DyeingComputer.ViewModel
|
|||||||
if (string.IsNullOrEmpty(Name_err.ToString()) && ((Selet_dtm("1010") < 1) || (Selet_dtm("1010") > 160)))
|
if (string.IsNullOrEmpty(Name_err.ToString()) && ((Selet_dtm("1010") < 1) || (Selet_dtm("1010") > 160)))
|
||||||
{ Name_err = Resources.Temperature + Resources.Sensor + Resources.Malfunction; } //温度故障提示
|
{ Name_err = Resources.Temperature + Resources.Sensor + Resources.Malfunction; } //温度故障提示
|
||||||
}
|
}
|
||||||
void DisTimer_200MS(object sender, EventArgs e)//Tick_Event周期执行事件200MS
|
void DisTimer_500MS(object sender, EventArgs e)//Tick_Event周期执行事件200MS
|
||||||
{
|
{
|
||||||
timer1s_++;
|
timer1s_++;
|
||||||
timer5s_++;
|
timer5s_++;
|
||||||
|
|
||||||
if (timer1s_ > 5) Tick_Event_1S();
|
if (timer1s_ >= 2) { timer1s_ =0; Tick_Event_1S(); }
|
||||||
if (timer5s_ > 25) Tick_Event_5S();
|
if (timer5s_ >=10) { timer5s_ = 0; Tick_Event_5S(); }
|
||||||
|
|
||||||
if (LINK_OK) IO_data();
|
if (LINK_OK) IO_data();
|
||||||
|
|
||||||
@@ -1423,21 +1426,23 @@ namespace DyeingComputer.ViewModel
|
|||||||
|
|
||||||
public static SerialPort port = new SerialPort();//创建串口
|
public static SerialPort port = new SerialPort();//创建串口
|
||||||
static ModbusFactory factory = new ModbusFactory();
|
static ModbusFactory factory = new ModbusFactory();
|
||||||
|
string protocols_;
|
||||||
// Create Modbus Master
|
// Create Modbus Master
|
||||||
static IModbusMaster master = factory.CreateRtuMaster(port);
|
static IModbusMaster master = factory.CreateRtuMaster(port);
|
||||||
void UPort()
|
void UPort()
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
protocols_ = Configini.IniReadvalue("SYS", "Protocols");
|
||||||
port.PortName = Configini.IniReadvalue("SYS", "COM");
|
port.PortName = Configini.IniReadvalue("SYS", "COM");
|
||||||
port.BaudRate = 115200;//配置
|
port.BaudRate = 57600;//配置
|
||||||
port.DataBits = 8;
|
port.DataBits = 8;
|
||||||
port.Parity = Parity.None;
|
port.Parity = Parity.Even;
|
||||||
port.StopBits = StopBits.One;
|
port.StopBits = StopBits.One;
|
||||||
port.ReadTimeout = 1000;
|
port.ReadTimeout = 1000;
|
||||||
port.WriteTimeout = 1000;
|
port.WriteTimeout = 1000;
|
||||||
port.Open();//打开串口
|
port.Open();//打开串口
|
||||||
Modbus_link();
|
Port_link();
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -1460,18 +1465,28 @@ namespace DyeingComputer.ViewModel
|
|||||||
ushort[] RW = new ushort[63];
|
ushort[] RW = new ushort[63];
|
||||||
ushort RW_L = 63;
|
ushort RW_L = 63;
|
||||||
readonly byte slaveId = 1;
|
readonly byte slaveId = 1;
|
||||||
private async void Modbus_link()
|
private async void Port_link()
|
||||||
{
|
{
|
||||||
if (Name_err.ToString() != "800_SerialPort_Not")
|
if (Name_err.ToString() != "800_SerialPort_Not")
|
||||||
{
|
{
|
||||||
await Task.Run(() =>
|
await Task.Run(() =>
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
|
{
|
||||||
|
if (protocols_ == "MODBUS_RTU")
|
||||||
|
{
|
||||||
|
DO = master.ReadCoils(slaveId, 0, DO_L); //读取线圈
|
||||||
|
RW = master.ReadHoldingRegisters(slaveId, 0, RW_L); //读取寄存器
|
||||||
|
master.WriteMultipleCoils(slaveId, 0, DQ); //写入线圈
|
||||||
|
master.WriteMultipleRegisters(slaveId, 0, DW); //写入寄存器
|
||||||
|
}//MODBUSRTU
|
||||||
|
else
|
||||||
{
|
{
|
||||||
DO = master.ReadCoils(slaveId, 02255, DO_L); //读取线圈
|
DO = master.ReadCoils(slaveId, 02255, DO_L); //读取线圈
|
||||||
RW = master.ReadHoldingRegisters(slaveId, 06000, RW_L); //读取寄存器
|
RW = master.ReadHoldingRegisters(slaveId, 06000, RW_L); //读取寄存器
|
||||||
master.WriteMultipleCoils(slaveId, 02000, DQ); //写入线圈
|
master.WriteMultipleCoils(slaveId, 02000, DQ); //写入线圈
|
||||||
master.WriteMultipleRegisters(slaveId, 07000, DW); //写入寄存器
|
master.WriteMultipleRegisters(slaveId, 07000, DW); //写入寄存器
|
||||||
|
}//SCMODBUSRTU
|
||||||
LINK_OK = true;
|
LINK_OK = true;
|
||||||
Name_err = "";
|
Name_err = "";
|
||||||
LINK_RUN++;
|
LINK_RUN++;
|
||||||
@@ -1484,7 +1499,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
Modbus_link();
|
Port_link();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -1776,12 +1791,11 @@ namespace DyeingComputer.ViewModel
|
|||||||
{
|
{
|
||||||
lock (dt_d)//锁
|
lock (dt_d)//锁
|
||||||
{
|
{
|
||||||
DataRow drEmploye = dt_d.Select("PLC=" + key).First();
|
DataRow[] arrRows = dt_d.Select("PLC=" + key);
|
||||||
drEmploye.BeginEdit();
|
foreach (DataRow row in arrRows)
|
||||||
drEmploye["DIO"] = Value;
|
{
|
||||||
drEmploye.EndEdit();
|
row["DIO"] = Value;
|
||||||
drEmploye.AcceptChanges();
|
}
|
||||||
drEmploye.ClearErrors();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -1795,12 +1809,11 @@ namespace DyeingComputer.ViewModel
|
|||||||
{
|
{
|
||||||
lock (dt_a)
|
lock (dt_a)
|
||||||
{
|
{
|
||||||
DataRow drEmploye = dt_a.Select("PLC=" + key).First();
|
DataRow[] arrRows = dt_a.Select("PLC=" + key);
|
||||||
drEmploye.BeginEdit();
|
foreach (DataRow row in arrRows)
|
||||||
drEmploye["AIO"] = Value;
|
{
|
||||||
drEmploye.EndEdit();
|
row["AIO"] = Value;
|
||||||
drEmploye.AcceptChanges();
|
}
|
||||||
drEmploye.ClearErrors();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|||||||
Reference in new issue
Block a user