DESKTOP-58BB7H3\ZJH пре 4 месеци
родитељ
комит
fe1a716e65
30 измењених фајлова са 1861 додато и 127 уклоњено
  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-shm
  4. BIN
      .vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide-wal
  5. +2
    -1
      CNAS_DBSync/ActivationForm.cs
  6. +87
    -77
      CNAS_DBSync/frmSyncParams.Designer.cs
  7. +36
    -38
      CNAS_DBSync/frmSyncParams.cs
  8. +3
    -0
      CNAS_DBSync/frmSyncParams.resx
  9. +26
    -3
      CNAS_DBSync/frmSystemSetting.Designer.cs
  10. +68
    -4
      CNAS_DBSync/frmSystemSetting.cs
  11. +18
    -2
      CnasSynchronusClient/FileOperation.cs
  12. +2
    -0
      CnasSynchrousModel/SourceConfigFile/SystemFormatConfig.cs
  13. +4
    -0
      CnasSynchrousModel/SyncParamasInfo.cs
  14. BIN
      dll/CNASBalanceDBManage.exe
  15. BIN
      dll/CNAS_BalanceClient.exe
  16. BIN
      dll/CNAS_DBSync.exe
  17. BIN
      dll/CNAS_RunSync.exe
  18. BIN
      dll/CNAS_SerialPort.dll
  19. BIN
      dll/CNAS_SyncService.exe
  20. BIN
      dll/CnasLocalIDAL.dll
  21. BIN
      dll/CnasSynchronousCommon.dll
  22. BIN
      dll/CnasSynchronusClient.dll
  23. BIN
      dll/CnasSynchronusDAL.dll
  24. BIN
      dll/CnasSynchronusIDAL.dll
  25. BIN
      dll/CnasSynchrousModel.dll
  26. +1
    -1
      dll/Data/SyncInStrumentData.mes
  27. +1613
    -0
      dll/ErrorLog/20250216.txt
  28. BIN
      dll/SyncLocalDAL.dll
  29. BIN
      dll/WF-ChangeGUID.exe
  30. +1
    -1
      dll/activation.config

BIN
.vs/CNAS_DBSync/v15/.suo Прегледај датотеку


BIN
.vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide Прегледај датотеку


BIN
.vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide-shm Прегледај датотеку


BIN
.vs/CNAS_DBSync/v15/Server/sqlite3/storage.ide-wal Прегледај датотеку


+ 2
- 1
CNAS_DBSync/ActivationForm.cs Прегледај датотеку

@@ -65,7 +65,8 @@ namespace CNAS_DBSync

try
{
if (ValidateActivationCode(activationCode))
//绕过验证
if (!ValidateActivationCode(activationCode))
{
IsActivated = true;
SaveActivation(); // 保存激活状态


+ 87
- 77
CNAS_DBSync/frmSyncParams.Designer.cs Прегледај датотеку

@@ -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,14 +104,6 @@
this.panel4 = new System.Windows.Forms.Panel();
this.panel13 = new System.Windows.Forms.Panel();
this.panel6 = new System.Windows.Forms.Panel();
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.InstruFieldName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.InstruDataType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CNASFieldName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.CnasDataType = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pnlAll.SuspendLayout();
this.pnlBodyCenter.SuspendLayout();
this.pnlRigh.SuspendLayout();
@@ -237,7 +238,8 @@
this.InstrumentField,
this.CnasField,
this.PrimaryKey,
this.DateKey});
this.DateKey,
this.字段属性});
this.dgvMapping.ContextMenuStrip = this.cmsMapping;
this.dgvMapping.Dock = System.Windows.Forms.DockStyle.Fill;
this.dgvMapping.Location = new System.Drawing.Point(0, 0);
@@ -251,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);
@@ -280,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);
@@ -291,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;
@@ -384,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);
@@ -440,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);
@@ -780,68 +851,6 @@
this.panel6.Size = new System.Drawing.Size(1207, 2);
this.panel6.TabIndex = 1;
//
// InstrumentField
//
this.InstrumentField.DataPropertyName = "SourceField";
this.InstrumentField.HeaderText = "设备数据列";
this.InstrumentField.Name = "InstrumentField";
this.InstrumentField.ReadOnly = true;
this.InstrumentField.Width = 240;
//
// CnasField
//
this.CnasField.DataPropertyName = "TargetField";
this.CnasField.HeaderText = "CNAS数据列";
this.CnasField.Name = "CnasField";
this.CnasField.ReadOnly = true;
this.CnasField.Width = 240;
//
// PrimaryKey
//
this.PrimaryKey.DataPropertyName = "IfPrimaryKey";
this.PrimaryKey.HeaderText = "关键字段";
this.PrimaryKey.Name = "PrimaryKey";
this.PrimaryKey.Width = 240;
//
// DateKey
//
this.DateKey.DataPropertyName = "IfDateField";
this.DateKey.HeaderText = "日期字段";
this.DateKey.Name = "DateKey";
this.DateKey.Width = 240;
//
// 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;
//
// 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;
//
// frmSyncParams
//
this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);
@@ -961,14 +970,15 @@
private System.Windows.Forms.ToolStripMenuItem tsmHelper;
private System.Windows.Forms.Panel pnlBodyCenter;
private System.Windows.Forms.ToolStripMenuItem tsmServiceSetting;
private System.Windows.Forms.DataGridViewTextBoxColumn InstrumentField;
private System.Windows.Forms.DataGridViewTextBoxColumn CnasField;
private System.Windows.Forms.DataGridViewCheckBoxColumn PrimaryKey;
private System.Windows.Forms.DataGridViewCheckBoxColumn DateKey;
private System.Windows.Forms.DataGridViewTextBoxColumn InstruFieldName;
private System.Windows.Forms.DataGridViewTextBoxColumn InstruDataType;
private System.Windows.Forms.DataGridViewTextBoxColumn CNASFieldName;
private System.Windows.Forms.DataGridViewTextBoxColumn CnasDataType;
private System.Windows.Forms.DataGridViewTextBoxColumn InstrumentField;
private System.Windows.Forms.DataGridViewTextBoxColumn CnasField;
private System.Windows.Forms.DataGridViewCheckBoxColumn PrimaryKey;
private System.Windows.Forms.DataGridViewCheckBoxColumn DateKey;
private System.Windows.Forms.DataGridViewTextBoxColumn 字段属性;
}
}


+ 36
- 38
CNAS_DBSync/frmSyncParams.cs Прегледај датотеку

@@ -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();
}


@@ -384,13 +381,11 @@ namespace CNAS_DBSync

//仪器表名和选中行
syncParamas.SourceTable = cbxInstrument.Text.ToString().ToUpper();
//syncParamas.SourceField = dgvInstruDS.Rows[dgvInstruDS.CurrentCell.RowIndex].Cells[0].Value.ToString().ToUpper();
syncParamas.SourceField = dgvInstruDS.Rows[dgvInstruDS.CurrentCell.RowIndex].Cells[0].Value.ToString();

syncParamas.SourceField = dgvInstruDS.Rows[dgvInstruDS.CurrentCell.RowIndex].Cells[0].Value.ToString().ToUpper();
syncParamas.DataType = dgvInstruDS.Rows[dgvInstruDS.CurrentCell.RowIndex].Cells[1].Value.ToString().ToUpper();
//CNAS表名和选中行
syncParamas.TargetTable = cbxCnas.Text.ToString().ToUpper();
//syncParamas.TargetField = dgvCnas.Rows[dgvCnas.CurrentCell.RowIndex].Cells[0].Value.ToString().ToUpper();
syncParamas.TargetField = dgvCnas.Rows[dgvCnas.CurrentCell.RowIndex].Cells[0].Value.ToString();
syncParamas.TargetField = dgvCnas.Rows[dgvCnas.CurrentCell.RowIndex].Cells[0].Value.ToString().ToUpper();

//验证数据合法性
SyncParamsOperation paramsOperation = new SyncParamsOperation();
@@ -470,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);
@@ -734,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)
@@ -800,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)


+ 3
- 0
CNAS_DBSync/frmSyncParams.resx Прегледај датотеку

@@ -129,6 +129,9 @@
<metadata name="DateKey.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="字段属性.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="cmsMapping.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>


+ 26
- 3
CNAS_DBSync/frmSystemSetting.Designer.cs Прегледај датотеку

@@ -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 Прегледај датотеку

@@ -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)


+ 18
- 2
CnasSynchronusClient/FileOperation.cs Прегледај датотеку

@@ -287,14 +287,30 @@ 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)
{


+ 2
- 0
CnasSynchrousModel/SourceConfigFile/SystemFormatConfig.cs Прегледај датотеку

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

public string YQName { get; set; }
}
}

+ 4
- 0
CnasSynchrousModel/SyncParamasInfo.cs Прегледај датотеку

@@ -39,5 +39,9 @@ namespace CnasSynchrousModel
/// 是否是关键日期字段
/// </summary>
public bool IfDateField { get; set; }
/// <summary>
/// 数据类型
/// </summary>
public string DataType { get; set; }
}
}

BIN
dll/CNASBalanceDBManage.exe Прегледај датотеку


BIN
dll/CNAS_BalanceClient.exe Прегледај датотеку


BIN
dll/CNAS_DBSync.exe Прегледај датотеку


BIN
dll/CNAS_RunSync.exe Прегледај датотеку


BIN
dll/CNAS_SerialPort.dll Прегледај датотеку


BIN
dll/CNAS_SyncService.exe Прегледај датотеку


BIN
dll/CnasLocalIDAL.dll Прегледај датотеку


BIN
dll/CnasSynchronousCommon.dll Прегледај датотеку


BIN
dll/CnasSynchronusClient.dll Прегледај датотеку


BIN
dll/CnasSynchronusDAL.dll Прегледај датотеку


BIN
dll/CnasSynchronusIDAL.dll Прегледај датотеку


BIN
dll/CnasSynchrousModel.dll Прегледај датотеку


+ 1
- 1
dll/Data/SyncInStrumentData.mes Прегледај датотеку

@@ -1 +1 @@
/4OjQUpsGecll0xqHycz/L+lPK0LSkds3kpbfxPz8zCW1I/HueTuOJOcD40MLI2D0tMGBACgOQKJ6uY/zxinGkLrJDCtdmDmvCeR1n1Hv+sdVxRY8tWYGGLijvZWhOzTx+NIPsCCPxG2JhtyMdOmPXaw9rO2jOmxYYzqi+uTe4RSnvmlg2X5u1T39xZueFOnurq+m5Q3v1PRYgqU2LlZXdR+P4SwRnjM07xrUsBgEyB6DIJlrLWpuf3zIYTNaGpbtAZT9OjBMEswq6FKgFlf4BcZavbykYiwj18hJ8w3fUVgbBepGudbCvY94r49XQ5QFuMkBLy7kfuJlkbRYaSTIl3H8hM1jUOBdZBUaXyuKMrShjHJKX7YcZBz23/88i2TCojLWuaKOQFEz4r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CVJacRBlhSq+I4eywUk6dLJczw3wfE2VYJWGMmAmlObRHwdKxj8rELP3jL4rXitNNduCkz1SV4iNBfyDoWLtnngWVGEl3j/6m3oK/GLoymz3SnhiVqjzka9+hTgvogNDhSdIZhn0Kn+kQSm4ggk0Civjp5khsLVJ0byZIo8K/nOLZE9uTGVlFwQAnUR7EFBbhMClRlPw5xGMbcUeWDHkHqxFn6WLjrg3wnMET7DpTFxb6FZ9lVb18+jIi3DpjXGepf2UVV1LilQ0hyHsi+cpXEB4/8D70A8XDkJnHztD82j6KsLP9xkY3szilaRlOQjpu13YTmh3jNKZvwg9Wh/L/fLc5HzfQqOqvCMWsH8UoOeYPTR170aLhU2cmmNhZFx6RjUshlYeBpkCkRDQX8+G+0Gjzr5MmNaK4RlgcqaFJPh8woIILku5hs2Bgl43XfsqEpnvbwMudm/aTv8jfI+j7O1AEGmaXtOStUjV0qZ7vXbX/ol2RoyHKPVBKr6+JeEBxNNcFlVDhhve5AJ5cXRznApLiA6V1wjZt3efxMgtjdJeTamc2nfN0YEE5qmCc6fMGmxRuMXZKpUtv9dGK3FRjey31pi4kvema+0WJi8M6k+lPu/Z/DHbScefiZ99EA6XkI3RJTewP4kyVf7BjIKQ7Z8aIij1gwXfk0GCu29kmkp0vLPYlQE4GBZn//TZ4Mu1A/Lf6RkNSpY//CJ9rvrLTF9t9hzpqZ0gqFwQcQPxyb+hjWmL+/OpNZ1ss4/3u0lcJxaN4L1JHGj8/uYc7J4qlPupIJus323hzDeuq+ld+/G1qvvZqRos/Yt4qKWg=

+ 1613
- 0
dll/ErrorLog/20250216.txt
Разлика између датотеке није приказан због своје велике величине
Прегледај датотеку


BIN
dll/SyncLocalDAL.dll Прегледај датотеку


BIN
dll/WF-ChangeGUID.exe Прегледај датотеку


+ 1
- 1
dll/activation.config Прегледај датотеку

@@ -1 +1 @@
BFEBFBFF000B06A2_7413EA0CEB72_7613EA0CEB71_7413EA0CEB71
BFEBFBFF000A0652_B025AA3FD303_00FF7AB4C9BA_8C554AD3D7A5_8E554AD3D7A4_8C554AD3D7A4_8C554AD3D7A8

Loading…
Откажи
Сачувај