forked from wenjy/HighWayIot
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using HighWayIot.Repository.domain;
|
|
using HighWayIot.Repository.service;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace HighWayIot.Winform.UserControlPages.ParamConfigPages
|
|
{
|
|
public partial class UpdateRfidWindow : Form
|
|
{
|
|
private Zx_rfid_settingService zx_rfid_settingService = Zx_rfid_settingService.Instance;
|
|
private int _id;
|
|
public UpdateRfidWindow(int id,string ip,string epc,string no)
|
|
{
|
|
_id = id;
|
|
InitializeComponent();
|
|
RfidIptextBox.Text = ip;
|
|
RfidEpctextBox.Text = epc;
|
|
WorkstateNotextBox.Text = no;
|
|
}
|
|
|
|
private void saveButton_Click(object sender, EventArgs e)
|
|
{
|
|
if (!int.TryParse(WorkstateNotextBox.Text,out int result))
|
|
{
|
|
MessageBox.Show("工作状态编号必须是整数");
|
|
return;
|
|
}
|
|
Zx_rfid_setting zx_Rfid_Setting = zx_rfid_settingService.GetRfidInfoById(_id);
|
|
zx_Rfid_Setting.RfidIp = RfidIptextBox.Text;
|
|
zx_Rfid_Setting.RfidEpc = RfidEpctextBox.Text;
|
|
zx_Rfid_Setting.WorkstateNo = result;
|
|
zx_rfid_settingService.UpdateRfidInfo(zx_Rfid_Setting);
|
|
MessageBox.Show("修改成功");
|
|
}
|
|
}
|
|
}
|