Commit e523e91a by 任天宇
parents 7c6b7697 787d7483
......@@ -72,6 +72,8 @@ namespace Jst.Report.Download
this.tbxUrlBase = new System.Windows.Forms.TextBox();
this.splitter1 = new System.Windows.Forms.Splitter();
this.gbDownloadConfig = new System.Windows.Forms.GroupBox();
this.cbxPNandSN = new System.Windows.Forms.CheckBox();
this.cbxPgName = new System.Windows.Forms.CheckBox();
this.cbxRenameFileByAjt = new System.Windows.Forms.CheckBox();
this.cbxRenameFileByWph = new System.Windows.Forms.CheckBox();
this.cbxRenameFileByBatchNumber = new System.Windows.Forms.CheckBox();
......@@ -553,6 +555,8 @@ namespace Jst.Report.Download
//
// gbDownloadConfig
//
this.gbDownloadConfig.Controls.Add(this.cbxPNandSN);
this.gbDownloadConfig.Controls.Add(this.cbxPgName);
this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByAjt);
this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByWph);
this.gbDownloadConfig.Controls.Add(this.cbxRenameFileByBatchNumber);
......@@ -571,6 +575,26 @@ namespace Jst.Report.Download
this.gbDownloadConfig.TabStop = false;
this.gbDownloadConfig.Text = "下载操作";
//
// cbxPNandSN
//
this.cbxPNandSN.AutoSize = true;
this.cbxPNandSN.Location = new System.Drawing.Point(467, 30);
this.cbxPNandSN.Name = "cbxPNandSN";
this.cbxPNandSN.Size = new System.Drawing.Size(188, 24);
this.cbxPNandSN.TabIndex = 14;
this.cbxPNandSN.Text = "文件名+品名+批号";
this.cbxPNandSN.UseVisualStyleBackColor = true;
//
// cbxPgName
//
this.cbxPgName.AutoSize = true;
this.cbxPgName.Location = new System.Drawing.Point(674, 29);
this.cbxPgName.Name = "cbxPgName";
this.cbxPgName.Size = new System.Drawing.Size(138, 24);
this.cbxPgName.TabIndex = 13;
this.cbxPgName.Text = "文件名+品名";
this.cbxPgName.UseVisualStyleBackColor = true;
//
// cbxRenameFileByAjt
//
this.cbxRenameFileByAjt.AutoSize = true;
......@@ -792,7 +816,7 @@ namespace Jst.Report.Download
this.Controls.Add(this.pnlLeft);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "FrmMain";
this.Text = "江苏纺检院电子报告下载客户端V2.02";
this.Text = "江苏纺检院电子报告下载客户端V2.03";
this.Load += new System.EventHandler(this.FrmMain_Load);
this.pnlLeft.ResumeLayout(false);
this.gbQuery.ResumeLayout(false);
......@@ -874,6 +898,8 @@ namespace Jst.Report.Download
private System.Windows.Forms.TextBox tbxUserName;
private System.Windows.Forms.Button btnLogout;
private System.Windows.Forms.Button btnLogin;
private System.Windows.Forms.CheckBox cbxPgName;
private System.Windows.Forms.CheckBox cbxPNandSN;
}
}
......@@ -35,6 +35,10 @@ namespace Jst.Report.Download
private bool _renameFileByAjt = false;
private bool _renameFileByProductName = false;
private bool _renameFileByProductNameAndSN = false;
private string _fileRootPath = string.Empty;
#endregion
......@@ -338,6 +342,8 @@ namespace Jst.Report.Download
_renameFileByBatchNumber = cbxRenameFileByBatchNumber.Checked;
_renameFileByWph = cbxRenameFileByWph.Checked;
_renameFileByAjt = cbxRenameFileByAjt.Checked;
_renameFileByProductName = cbxPgName.Checked;
_renameFileByProductNameAndSN = cbxPNandSN.Checked;
Thread thread = new Thread(download);
thread.Start();
}
......@@ -359,6 +365,17 @@ namespace Jst.Report.Download
lblMessage.Text = $"正在下载报告{result.ReportId},共{_results.Results.Count}条,正在处理第{index2}条....";
});
string text = $"{result.ReportId}.pdf";
if (_renameFileByProductNameAndSN)
{
string Text6 = result.SampleName.Trim();
string Text7 = result.SampleBatchNumber.Trim();
text = $"{result.ReportId} {Text6}{Text7}.pdf";
}
if (_renameFileByProductName)
{
string Text5 = result.SampleName.Trim();
text = $"{result.ReportId} {Text5}.pdf";
}
if (_renameFileByBatchNumber)
{
string text2 = result.SampleBatchNumber.Trim();
......
......@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
//通过使用 "*",如下所示:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("5.4.2022.04270")]
[assembly: AssemblyFileVersion("5.4.2022.04270")]
[assembly: AssemblyVersion("5.4.2022.11140")]
[assembly: AssemblyFileVersion("5.4.2022.11140")]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment