Browse Source

现在的系统设置页面中的手工、自动取数方式只可以二选一,整个取数端都需要采用一种方式进行数据读取,不符合实际使用,需要一页面一配置

master
DESKTOP-58BB7H3\ZJH 4 months ago
parent
commit
2f3bf9080d
22 changed files with 71727 additions and 140 deletions
  1. BIN
      .vs/CNAS_DBSync/v15/.suo
  2. BIN
      .vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide
  3. BIN
      .vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide-wal
  4. +1
    -1
      CNAS_DBSync/ActivationForm.cs
  5. +2
    -2
      CNAS_DBSync/frmInstrumentCode.Designer.cs
  6. +80
    -80
      CNAS_DBSync/frmSyncParams.Designer.cs
  7. +33
    -33
      CNAS_DBSync/frmSyncParams.cs
  8. +26
    -3
      CNAS_DBSync/frmSystemSetting.Designer.cs
  9. +68
    -4
      CNAS_DBSync/frmSystemSetting.cs
  10. +17
    -2
      CnasSynchronusClient/FileOperation.cs
  11. +5
    -0
      CnasSynchrousModel/SourceConfigFile/SystemFormatConfig.cs
  12. BIN
      dll/CNAS_DBSync.exe
  13. BIN
      dll/CnasSynchronusClient.dll
  14. BIN
      dll/CnasSynchrousModel.dll
  15. +1
    -1
      dll/Data/SyncInStrumentData.mes
  16. +1
    -0
      dll/DataConfig/BBB.xml
  17. +1
    -0
      dll/DataConfig/DDD.xml
  18. +1
    -12
      dll/DataConfig/MySqlFormatConfig.xml
  19. +1
    -1
      dll/DataConfig/SystemFormatConfig.xml
  20. +1
    -0
      dll/DataConfig/ccc.xml
  21. +71488
    -0
      dll/ErrorLog/20250214.txt
  22. +1
    -1
      dll/activation.config

BIN
.vs/CNAS_DBSync/v15/.suo View File


BIN
.vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide View File


BIN
.vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide-wal View File


+ 1
- 1
CNAS_DBSync/ActivationForm.cs View File

@@ -66,7 +66,7 @@ namespace CNAS_DBSync
try
{
///调试绕过验证
if (ValidateActivationCode(activationCode))
if (!ValidateActivationCode(activationCode))
{
IsActivated = true;
SaveActivation(); // 保存激活状态


+ 2
- 2
CNAS_DBSync/frmInstrumentCode.Designer.cs View File

@@ -36,7 +36,7 @@
//
// txtCode
//
this.txtCode.Location = new System.Drawing.Point(128, 56);
this.txtCode.Location = new System.Drawing.Point(120, 60);
this.txtCode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(319, 27);
@@ -56,7 +56,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(56, 59);
this.label1.Location = new System.Drawing.Point(30, 63);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(84, 20);
this.label1.TabIndex = 2;


+ 80
- 80
CNAS_DBSync/frmSyncParams.Designer.cs View File

@@ -46,6 +46,11 @@
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.panel15 = new System.Windows.Forms.Panel();
this.dgvMapping = new System.Windows.Forms.DataGridView();
this.InstrumentField = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CnasField = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PrimaryKey = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.DateKey = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.字段属性 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.cmsMapping = new System.Windows.Forms.ContextMenuStrip(this.components);
this.btnDelMap = new System.Windows.Forms.ToolStripMenuItem();
this.panel14 = new System.Windows.Forms.Panel();
@@ -57,10 +62,14 @@
this.tabPage6 = new System.Windows.Forms.TabPage();
this.splitContainer2 = new System.Windows.Forms.SplitContainer();
this.dgvInstruDS = new System.Windows.Forms.DataGridView();
this.InstruFieldName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.InstruDataType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pnlleft = new System.Windows.Forms.Panel();
this.cbxInstrument = new System.Windows.Forms.ComboBox();
this.label12 = new System.Windows.Forms.Label();
this.dgvCnas = new System.Windows.Forms.DataGridView();
this.CNASFieldName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CnasDataType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pnlRight = new System.Windows.Forms.Panel();
this.cbxCnas = new System.Windows.Forms.ComboBox();
this.label13 = new System.Windows.Forms.Label();
@@ -95,15 +104,6 @@
this.panel4 = new System.Windows.Forms.Panel();
this.panel13 = new System.Windows.Forms.Panel();
this.panel6 = new System.Windows.Forms.Panel();
this.InstruFieldName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.InstruDataType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CnasDataType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CNASFieldName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.InstrumentField = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CnasField = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PrimaryKey = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.DateKey = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.字段属性 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pnlAll.SuspendLayout();
this.pnlBodyCenter.SuspendLayout();
this.pnlRigh.SuspendLayout();
@@ -253,6 +253,43 @@
this.dgvMapping.Size = new System.Drawing.Size(1045, 228);
this.dgvMapping.TabIndex = 1;
//
// InstrumentField
//
this.InstrumentField.DataPropertyName = "SourceField";
this.InstrumentField.HeaderText = "设备数据列";
this.InstrumentField.Name = "InstrumentField";
this.InstrumentField.ReadOnly = true;
this.InstrumentField.Width = 200;
//
// CnasField
//
this.CnasField.DataPropertyName = "TargetField";
this.CnasField.HeaderText = "CNAS数据列";
this.CnasField.Name = "CnasField";
this.CnasField.ReadOnly = true;
this.CnasField.Width = 200;
//
// PrimaryKey
//
this.PrimaryKey.DataPropertyName = "IfPrimaryKey";
this.PrimaryKey.HeaderText = "关键字段";
this.PrimaryKey.Name = "PrimaryKey";
this.PrimaryKey.Width = 200;
//
// DateKey
//
this.DateKey.DataPropertyName = "IfDateField";
this.DateKey.HeaderText = "日期字段";
this.DateKey.Name = "DateKey";
this.DateKey.Width = 200;
//
// 字段属性
//
this.字段属性.DataPropertyName = "DataType";
this.字段属性.HeaderText = "数据类型";
this.字段属性.Name = "字段属性";
this.字段属性.Width = 200;
//
// cmsMapping
//
this.cmsMapping.ImageScalingSize = new System.Drawing.Size(20, 20);
@@ -282,7 +319,7 @@
//
// txtInstrumentColumn
//
this.txtInstrumentColumn.Location = new System.Drawing.Point(429, 6);
this.txtInstrumentColumn.Location = new System.Drawing.Point(453, 9);
this.txtInstrumentColumn.Name = "txtInstrumentColumn";
this.txtInstrumentColumn.ReadOnly = true;
this.txtInstrumentColumn.Size = new System.Drawing.Size(195, 27);
@@ -293,7 +330,7 @@
//
this.cbxCNASColumn.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cbxCNASColumn.FormattingEnabled = true;
this.cbxCNASColumn.Location = new System.Drawing.Point(429, 10);
this.cbxCNASColumn.Location = new System.Drawing.Point(453, 9);
this.cbxCNASColumn.Name = "cbxCNASColumn";
this.cbxCNASColumn.Size = new System.Drawing.Size(184, 28);
this.cbxCNASColumn.TabIndex = 6;
@@ -386,6 +423,22 @@
this.dgvInstruDS.Size = new System.Drawing.Size(508, 310);
this.dgvInstruDS.TabIndex = 1;
//
// InstruFieldName
//
this.InstruFieldName.DataPropertyName = "InstruFieldName";
this.InstruFieldName.HeaderText = "列名";
this.InstruFieldName.Name = "InstruFieldName";
this.InstruFieldName.ReadOnly = true;
this.InstruFieldName.Width = 220;
//
// InstruDataType
//
this.InstruDataType.DataPropertyName = "InstruDataType";
this.InstruDataType.HeaderText = "数据类型";
this.InstruDataType.Name = "InstruDataType";
this.InstruDataType.ReadOnly = true;
this.InstruDataType.Width = 240;
//
// pnlleft
//
this.pnlleft.Controls.Add(this.cbxInstrument);
@@ -442,6 +495,22 @@
this.dgvCnas.Size = new System.Drawing.Size(519, 310);
this.dgvCnas.TabIndex = 2;
//
// CNASFieldName
//
this.CNASFieldName.DataPropertyName = "CnasFieldName";
this.CNASFieldName.HeaderText = "列名";
this.CNASFieldName.Name = "CNASFieldName";
this.CNASFieldName.ReadOnly = true;
this.CNASFieldName.Width = 220;
//
// CnasDataType
//
this.CnasDataType.DataPropertyName = "CnasDataType";
this.CnasDataType.HeaderText = "数据类型";
this.CnasDataType.Name = "CnasDataType";
this.CnasDataType.ReadOnly = true;
this.CnasDataType.Width = 240;
//
// pnlRight
//
this.pnlRight.Controls.Add(this.cbxCnas);
@@ -782,75 +851,6 @@
this.panel6.Size = new System.Drawing.Size(1207, 2);
this.panel6.TabIndex = 1;
//
// InstruFieldName
//
this.InstruFieldName.DataPropertyName = "InstruFieldName";
this.InstruFieldName.HeaderText = "列名";
this.InstruFieldName.Name = "InstruFieldName";
this.InstruFieldName.ReadOnly = true;
this.InstruFieldName.Width = 220;
//
// InstruDataType
//
this.InstruDataType.DataPropertyName = "InstruDataType";
this.InstruDataType.HeaderText = "数据类型";
this.InstruDataType.Name = "InstruDataType";
this.InstruDataType.ReadOnly = true;
this.InstruDataType.Width = 240;
//
// CnasDataType
//
this.CnasDataType.DataPropertyName = "CnasDataType";
this.CnasDataType.HeaderText = "数据类型";
this.CnasDataType.Name = "CnasDataType";
this.CnasDataType.ReadOnly = true;
this.CnasDataType.Width = 240;
//
// CNASFieldName
//
this.CNASFieldName.DataPropertyName = "CnasFieldName";
this.CNASFieldName.HeaderText = "列名";
this.CNASFieldName.Name = "CNASFieldName";
this.CNASFieldName.ReadOnly = true;
this.CNASFieldName.Width = 220;
//
// InstrumentField
//
this.InstrumentField.DataPropertyName = "SourceField";
this.InstrumentField.HeaderText = "设备数据列";
this.InstrumentField.Name = "InstrumentField";
this.InstrumentField.ReadOnly = true;
this.InstrumentField.Width = 200;
//
// CnasField
//
this.CnasField.DataPropertyName = "TargetField";
this.CnasField.HeaderText = "CNAS数据列";
this.CnasField.Name = "CnasField";
this.CnasField.ReadOnly = true;
this.CnasField.Width = 200;
//
// PrimaryKey
//
this.PrimaryKey.DataPropertyName = "IfPrimaryKey";
this.PrimaryKey.HeaderText = "关键字段";
this.PrimaryKey.Name = "PrimaryKey";
this.PrimaryKey.Width = 200;
//
// DateKey
//
this.DateKey.DataPropertyName = "IfDateField";
this.DateKey.HeaderText = "日期字段";
this.DateKey.Name = "DateKey";
this.DateKey.Width = 200;
//
// 字段属性
//
this.字段属性.DataPropertyName = "DataType";
this.字段属性.HeaderText = "数据类型";
this.字段属性.Name = "字段属性";
this.字段属性.Width = 200;
//
// frmSyncParams
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);


+ 33
- 33
CNAS_DBSync/frmSyncParams.cs View File

@@ -52,12 +52,7 @@ namespace CNAS_DBSync
this.btnDel.Visible = false;
}

strTableInfoMode = FileOperation.GetSystemFormatConfigData().TableInfoMode;
if (strTableInfoMode == "1")
{
cbxInstrument.DropDownStyle = ComboBoxStyle.DropDown;
//cbxCnas.DropDownStyle = ComboBoxStyle.DropDown;
}
}

private void frmSyncParams_Load(object sender, EventArgs e)
@@ -178,8 +173,10 @@ namespace CNAS_DBSync
/// <param name="e"></param>
private void btnAdd_Click(object sender, EventArgs e)
{
frmSystemSetting frmSetting = new frmSystemSetting(lstSyncInstrument);

frmInstrumentCode frmCode = new frmInstrumentCode(lstSyncInstrument);
frmCode.InstrumentDelegate = delegate(SyncInstrumentItemInfo Instrumentitem)
frmSetting.InstrumentDelegate = delegate(SyncInstrumentItemInfo Instrumentitem)
{
lstSyncInstrument.Add(Instrumentitem);

@@ -189,7 +186,7 @@ namespace CNAS_DBSync

dgvInstrument_SelectionChanged(null, null);
};
frmCode.ShowDialog();
frmSetting.ShowDialog();
}


@@ -468,6 +465,15 @@ namespace CNAS_DBSync

private void btnLoadDBData_Click(object sender, EventArgs e)
{

string strInstrumentCode = this.dgvInstrument.Rows[this.dgvInstrument.CurrentRow.Index].Cells[0].Value.ToString();

strTableInfoMode = FileOperation.GetSystemFormatConfigData(strInstrumentCode).TableInfoMode;
if (strTableInfoMode == "1")
{
cbxInstrument.DropDownStyle = ComboBoxStyle.DropDown;
//cbxCnas.DropDownStyle = ComboBoxStyle.DropDown;
}
int iReturn = 0;
if (strTableInfoMode=="0")
iReturn=LoadSourceAndTargetData(true);
@@ -732,25 +738,19 @@ namespace CNAS_DBSync
private void dgvInstrument_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (dgvInstrument.Rows.Count <= 0) return;

//当前选中单元格
string strInstrumentCode = this.dgvInstrument.Rows[this.dgvInstrument.CurrentRow.Index].Cells[0].Value.ToString();

frmInstrumentCode frmCode = new frmInstrumentCode(lstSyncInstrument, strInstrumentCode);
frmCode.InstrumentDelegate = delegate (SyncInstrumentItemInfo Instrumentitem)
{
var lstInstrument = lstSyncInstrument.Where(s => s.Code == strInstrumentCode).ToList<SyncInstrumentItemInfo>();
if (lstInstrument.Count == 1)
{
lstInstrument[0].Code = Instrumentitem.Code;
lstInstrument[0].InstruType = Instrumentitem.InstruType;
}
};
if (frmCode.ShowDialog() == DialogResult.OK)
frmSystemSetting frmSetting = new frmSystemSetting(lstSyncInstrument, strInstrumentCode);
frmSetting.InstrumentDelegate = delegate (SyncInstrumentItemInfo Instrumentitem)
{
lstSyncInstrument.Add(Instrumentitem);
//绑定数据
dgvInstrument.DataSource = new BindingList<SyncInstrumentItemInfo>(lstSyncInstrument);
}
dgvInstrument.CurrentCell = dgvInstrument.Rows[dgvInstrument.Rows.Count - 1].Cells[0];
dgvInstrument_SelectionChanged(null, null);
};
frmSetting.ShowDialog();
}

private void cbxCNASColumn_SelectedIndexChanged(object sender, EventArgs e)
@@ -798,19 +798,19 @@ namespace CNAS_DBSync

private void tsmSystemSetting_Click(object sender, EventArgs e)
{
frmSystemSetting frmSystem = new frmSystemSetting();
frmSystem.ShowDialog();
//frmSystemSetting frmSystem = new frmSystemSetting();
//frmSystem.ShowDialog();

strTableInfoMode = FileOperation.GetSystemFormatConfigData().TableInfoMode;
if (strTableInfoMode == "1")
{
cbxInstrument.DropDownStyle = ComboBoxStyle.DropDown;
//cbxCnas.DropDownStyle = ComboBoxStyle.DropDown;
}
else
{
cbxInstrument.DropDownStyle = ComboBoxStyle.DropDownList;
}
//strTableInfoMode = FileOperation.GetSystemFormatConfigData().TableInfoMode;
//if (strTableInfoMode == "1")
//{
// cbxInstrument.DropDownStyle = ComboBoxStyle.DropDown;
// //cbxCnas.DropDownStyle = ComboBoxStyle.DropDown;
//}
//else
//{
// cbxInstrument.DropDownStyle = ComboBoxStyle.DropDownList;
//}
}

private void tsmSourceSetting_Click(object sender, EventArgs e)


+ 26
- 3
CNAS_DBSync/frmSystemSetting.Designer.cs View File

@@ -46,6 +46,8 @@
this.pnlLeft = new System.Windows.Forms.Panel();
this.pnlBottom = new System.Windows.Forms.Panel();
this.pnlTop = new System.Windows.Forms.Panel();
this.txtCode = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.pnlAll.SuspendLayout();
this.pnlBody.SuspendLayout();
this.groupBox1.SuspendLayout();
@@ -89,7 +91,9 @@
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.txtCode);
this.groupBox1.Controls.Add(this.numpLogDataDays);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.cbxAutomatic);
@@ -108,7 +112,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(430, 179);
this.label3.Location = new System.Drawing.Point(430, 166);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(24, 20);
this.label3.TabIndex = 8;
@@ -116,7 +120,7 @@
//
// numpLogDataDays
//
this.numpLogDataDays.Location = new System.Drawing.Point(251, 177);
this.numpLogDataDays.Location = new System.Drawing.Point(251, 164);
this.numpLogDataDays.Name = "numpLogDataDays";
this.numpLogDataDays.Size = new System.Drawing.Size(158, 27);
this.numpLogDataDays.TabIndex = 7;
@@ -124,7 +128,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(41, 177);
this.label4.Location = new System.Drawing.Point(41, 164);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(204, 20);
this.label4.TabIndex = 6;
@@ -220,6 +224,23 @@
this.pnlTop.Size = new System.Drawing.Size(670, 10);
this.pnlTop.TabIndex = 0;
//
// txtCode
//
this.txtCode.Location = new System.Drawing.Point(252, 218);
this.txtCode.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.txtCode.Name = "txtCode";
this.txtCode.Size = new System.Drawing.Size(158, 27);
this.txtCode.TabIndex = 0;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(48, 218);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(84, 20);
this.label5.TabIndex = 2;
this.label5.Text = "仪器编号:";
//
// frmSystemSetting
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
@@ -264,5 +285,7 @@
private System.Windows.Forms.NumericUpDown numpLogDataDays;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btnOK;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtCode;
}
}

+ 68
- 4
CNAS_DBSync/frmSystemSetting.cs View File

@@ -15,15 +15,35 @@ namespace CNAS_DBSync
public partial class frmSystemSetting : Form
{
private SystemFormatConfig systemConfig;
public frmSystemSetting()
public List<SyncInstrumentItemInfo> lstSyncInstrument = new List<SyncInstrumentItemInfo>();
public string strOldCode = "";
public InstumentCodeHanlder InstrumentDelegate;
public InstrumentType type = InstrumentType.None;
public frmSystemSetting(List<SyncInstrumentItemInfo> lstSyncInstrument)
{
InitializeComponent();
this.lstSyncInstrument = lstSyncInstrument;
this.DialogResult = DialogResult.None;
}

public frmSystemSetting(List<SyncInstrumentItemInfo> lstSyncInstrument, string strOldCode = null)
{
InitializeComponent();

this.lstSyncInstrument = lstSyncInstrument;
this.strOldCode = this.txtCode.Text = strOldCode;

var lstInstrument = lstSyncInstrument.Where(s => s.Code == strOldCode).ToList<SyncInstrumentItemInfo>();
if (lstInstrument.Count == 1)
{
type = lstInstrument[0].InstruType;
//this.cbxInstruType.Text =GlobalCommonOperation.GetTitleByInstruType(type);
}
}
private void frmSystemSetting_Load(object sender, EventArgs e)
{
//加载配置信息
systemConfig= FileOperation.GetSystemFormatConfigData();
systemConfig= FileOperation.GetSystemFormatConfigData(strOldCode);

if (systemConfig.TableInfoMode == "1")
{
@@ -49,14 +69,58 @@ namespace CNAS_DBSync

private void btnOK_Click(object sender, EventArgs e)
{

//判断合法性,存储配置信息
systemConfig.TableInfoMode = this.cbxManual.Checked ? "1" : "0";
systemConfig.ShowDelayDays = (-numpShowDataDays.Value).ToString();
systemConfig.ShowLogDays = (-numpLogDataDays.Value).ToString();
systemConfig.YQName = this.txtCode.Text.Trim();
bool bSave = FileOperation.SaveSystemFormatConfigData(systemConfig, systemConfig.YQName);
if (this.txtCode.Text.Trim() == strOldCode) //此时没有修改任何内容,直接关闭界面
{
//return;
this.Close();
return;
}
if (this.txtCode.Text.Trim() != strOldCode)
{
int iMessage = new InstrumentCodeOperation().CheckInstrumentCode(this.txtCode.Text.Trim(), lstSyncInstrument);
if (iMessage <= 0)
{
switch (iMessage)
{
case 0:
MessageBox.Show("输入不允许为空!请重新输入!");
break;
case -1:
MessageBox.Show("输入含有特殊字符!请重新输入!");
break;
case -2:
MessageBox.Show("仪器编码不允许重复!请重新输入!");
break;

}
this.txtCode.Text = "";
return;
}
}
//传输输入到父界面
SyncInstrumentItemInfo syncinstrument = new SyncInstrumentItemInfo
{
GUID = Guid.NewGuid().ToString(),
Code = this.txtCode.Text.Trim(),
//InstruType = GlobalCommonOperation.GetInstruTypeBySelectedItem(this.cbxInstruType.Text)
InstruType = InstrumentType.None
};

this.InstrumentDelegate(syncinstrument);

bool bSave = FileOperation.SaveSystemFormatConfigData(systemConfig);
this.DialogResult = DialogResult.OK;

MessageBox.Show(bSave?"保存成功!":"保存失败!");
//关闭界面
this.Close();
}

private void cbxManual_CheckedChanged(object sender, EventArgs e)


+ 17
- 2
CnasSynchronusClient/FileOperation.cs View File

@@ -287,14 +287,29 @@ namespace CnasSynchronusClient
return systemFormatConfig;
}

public static bool SaveSystemFormatConfigData(SystemFormatConfig systemFormatConfig)
public static SystemFormatConfig GetSystemFormatConfigData(string strInstrumentCode)
{
SystemFormatConfig systemFormatConfig = new SystemFormatConfig();
try
{
string strLocalFileString = FileHelper.GetLocalFile(strLocalConfigPath_2, strInstrumentCode + ".xml");
if (strLocalFileString != "")
systemFormatConfig = FileHelper.DeserializeToObject<SystemFormatConfig>(strLocalFileString);
}
catch (Exception ex)
{
AppLog.Error(ex.Message);
}
return systemFormatConfig;
}
public static bool SaveSystemFormatConfigData(SystemFormatConfig systemFormatConfig,string FileName)
{
bool bIfSuccess = false;
try
{
string strString = FileHelper.SerializeToXml<SystemFormatConfig>(systemFormatConfig);

bIfSuccess = FileHelper.SaveLocalFile(strLocalConfigPath_2, "SystemFormatConfig.xml", strString);
bIfSuccess = FileHelper.SaveLocalFile(strLocalConfigPath_2, FileName+".xml", strString);
}
catch (Exception ex)
{


+ 5
- 0
CnasSynchrousModel/SourceConfigFile/SystemFormatConfig.cs View File

@@ -42,5 +42,10 @@ namespace CnasSynchrousModel
/// WebApi的Url
/// </summary>
public string WebApiUrl { get; set; }

/// <summary>
/// 仪器名称
/// </summary>
public string YQName { get; set; }
}
}

BIN
dll/CNAS_DBSync.exe View File


BIN
dll/CnasSynchronusClient.dll View File


BIN
dll/CnasSynchrousModel.dll View File


+ 1
- 1
dll/Data/SyncInStrumentData.mes View File

@@ -1 +1 @@
/4OjQUpsGecll0xqHycz/L+lPK0LSkds3kpbfxPz8zCW1I/HueTuOJOcD40MLI2D0tMGBACgOQKJ6uY/zxinGkLrJDCtdmDmvCeR1n1Hv+sdVxRY8tWYGGLijvZWhOzTx+NIPsCCPxG2JhtyMdOmPXaw9rO2jOmxYYzqi+uTe4RSnvmlg2X5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,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><SystemFormatConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ShowDelayDays>-10</ShowDelayDays><TableInfoMode>1</TableInfoMode><ShowLogDays>-10</ShowLogDays><TargetDBType>mysql</TargetDBType><StartGeneralVersion>0</StartGeneralVersion><StartWebApi>0</StartWebApi><WebApiUrl>http://localhost:8080/api</WebApiUrl><YQName>BBB</YQName></SystemFormatConfig>

+ 1
- 0
dll/DataConfig/DDD.xml View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><SystemFormatConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ShowDelayDays>0</ShowDelayDays><TableInfoMode>1</TableInfoMode><ShowLogDays>0</ShowLogDays><YQName>DDD</YQName></SystemFormatConfig>

+ 1
- 12
dll/DataConfig/MySqlFormatConfig.xml View File

@@ -1,12 +1 @@
<?xml version="1.0" encoding="utf-8"?>
<MySqlFormatConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<MySqlFileDateColumnFormat></MySqlFileDateColumnFormat>
<AutoSql>
<MySqlViewName></MySqlViewName>
<MySqlViewSql></MySqlViewSql>
</AutoSql>
<SpecialDtOpera>
<Method></Method>
<Value></Value>
</SpecialDtOpera>
</MySqlFormatConfig>
<?xml version="1.0" encoding="utf-8"?><MySqlFormatConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><MySqlFileDateColumnFormat /><AutoSql><MySqlViewName /><MySqlViewSql>select * from cans.abilitysupervisionrecord</MySqlViewSql></AutoSql><SpecialDtOpera><Method /><Value /></SpecialDtOpera></MySqlFormatConfig>

+ 1
- 1
dll/DataConfig/SystemFormatConfig.xml View File

@@ -1 +1 @@
<?xml version="1.0" encoding="utf-8"?><SystemFormatConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ShowDelayDays>-10</ShowDelayDays><TableInfoMode>0</TableInfoMode><ShowLogDays>-10</ShowLogDays><TargetDBType>mysql</TargetDBType><StartGeneralVersion>0</StartGeneralVersion><StartWebApi>0</StartWebApi><WebApiUrl>http://localhost:8080/api</WebApiUrl></SystemFormatConfig>
<?xml version="1.0" encoding="utf-8"?><SystemFormatConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ShowDelayDays>-10</ShowDelayDays><TableInfoMode>1</TableInfoMode><ShowLogDays>-10</ShowLogDays><TargetDBType>mysql</TargetDBType><StartGeneralVersion>0</StartGeneralVersion><StartWebApi>0</StartWebApi><WebApiUrl>http://localhost:8080/api</WebApiUrl><YQName>DDD</YQName></SystemFormatConfig>

+ 1
- 0
dll/DataConfig/ccc.xml View File

@@ -0,0 +1 @@
<?xml version="1.0" encoding="utf-8"?><SystemFormatConfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><ShowDelayDays>-10</ShowDelayDays><TableInfoMode>0</TableInfoMode><ShowLogDays>-10</ShowLogDays><TargetDBType>mysql</TargetDBType><StartGeneralVersion>0</StartGeneralVersion><StartWebApi>0</StartWebApi><WebApiUrl>http://localhost:8080/api</WebApiUrl><YQName>ccc</YQName></SystemFormatConfig>

+ 71488
- 0
dll/ErrorLog/20250214.txt
File diff suppressed because it is too large
View File


+ 1
- 1
dll/activation.config View File

@@ -1 +1 @@
BFEBFBFF000A0652_B025AA3FD303_00FF7AB4C9BA_8C554AD3D7A5_8E554AD3D7A4_8C554AD3D7A4_8C554AD3D7A8
BFEBFBFF000A0652_B025AA3FD303_8C554AD3D7A5_8E554AD3D7A4_8C554AD3D7A4_00FF7AB4C9BA_8C554AD3D7A8

Loading…
Cancel
Save