基线 SVN r240
SVN-Revision: r240
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
using Lskj.Model;
|
||||
using Lskj.Util;
|
||||
using Lskj.Business;
|
||||
|
||||
namespace Lskj.BatchUpload
|
||||
{
|
||||
/// <summary>
|
||||
/// c#库被调用统一接口类
|
||||
/// </summary>
|
||||
public sealed class DllBaseClass : IForm
|
||||
{
|
||||
public DllBaseClass()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DllBaseClass(string[] obj)
|
||||
{
|
||||
try
|
||||
{
|
||||
//DynamicPowerModel moduleModel = new DynamicPowerModel(obj);
|
||||
//FrmMain main = new FrmMain();
|
||||
//main.Model = moduleModel;
|
||||
//this.SubForm = main;
|
||||
//main.PubPowerModel = moduleModel;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
LogUtil.WriteError("Lskj.BatchUpload.dll--参数错误-->" + obj.ToString(), ex);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 窗口
|
||||
/// </summary>
|
||||
public Form SubForm { get; set; }
|
||||
}
|
||||
}
|
||||
Generated
+109
@@ -0,0 +1,109 @@
|
||||
|
||||
namespace Lskj.BatchUpload
|
||||
{
|
||||
partial class FrmMain
|
||||
{
|
||||
/// <summary>
|
||||
/// 必需的设计器变量。
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 清理所有正在使用的资源。
|
||||
/// </summary>
|
||||
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows 窗体设计器生成的代码
|
||||
|
||||
/// <summary>
|
||||
/// 设计器支持所需的方法 - 不要修改
|
||||
/// 使用代码编辑器修改此方法的内容。
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.groupBox1 = new System.Windows.Forms.GroupBox();
|
||||
this.btnPreview = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.labAddress = new Lskj.Control.LabelTextEdit();
|
||||
this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// groupBox1
|
||||
//
|
||||
this.groupBox1.Controls.Add(this.btnPreview);
|
||||
this.groupBox1.Controls.Add(this.labAddress);
|
||||
this.groupBox1.Location = new System.Drawing.Point(12, 12);
|
||||
this.groupBox1.Name = "groupBox1";
|
||||
this.groupBox1.Size = new System.Drawing.Size(566, 63);
|
||||
this.groupBox1.TabIndex = 4;
|
||||
this.groupBox1.TabStop = false;
|
||||
//
|
||||
// btnPreview
|
||||
//
|
||||
this.btnPreview.Appearance.Options.UseForeColor = true;
|
||||
this.btnPreview.Location = new System.Drawing.Point(489, 20);
|
||||
this.btnPreview.Name = "btnPreview";
|
||||
this.btnPreview.Size = new System.Drawing.Size(56, 28);
|
||||
this.btnPreview.TabIndex = 6;
|
||||
this.btnPreview.Text = "浏览";
|
||||
this.btnPreview.Click += new System.EventHandler(this.btnPreview_Click);
|
||||
//
|
||||
// labAddress
|
||||
//
|
||||
this.labAddress.BackColor = System.Drawing.Color.Transparent;
|
||||
this.labAddress.EditText = "";
|
||||
this.labAddress.FontSize = 0F;
|
||||
this.labAddress.LabelText = "上传文件路径:";
|
||||
this.labAddress.Location = new System.Drawing.Point(16, 26);
|
||||
this.labAddress.Model = null;
|
||||
this.labAddress.Name = "labAddress";
|
||||
this.labAddress.NullText = "";
|
||||
this.labAddress.ReadOnly = false;
|
||||
this.labAddress.Required = false;
|
||||
this.labAddress.Size = new System.Drawing.Size(464, 18);
|
||||
this.labAddress.TabIndex = 5;
|
||||
//
|
||||
// simpleButton1
|
||||
//
|
||||
this.simpleButton1.Appearance.Options.UseForeColor = true;
|
||||
this.simpleButton1.Location = new System.Drawing.Point(501, 81);
|
||||
this.simpleButton1.Name = "simpleButton1";
|
||||
this.simpleButton1.Size = new System.Drawing.Size(68, 28);
|
||||
this.simpleButton1.TabIndex = 7;
|
||||
this.simpleButton1.Text = "确认上传";
|
||||
this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click);
|
||||
//
|
||||
// FrmMain
|
||||
//
|
||||
this.Appearance.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Appearance.Options.UseBackColor = true;
|
||||
this.Appearance.Options.UseFont = true;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(590, 153);
|
||||
this.Controls.Add(this.simpleButton1);
|
||||
this.Controls.Add(this.groupBox1);
|
||||
this.Name = "FrmMain";
|
||||
this.Text = "批量上传";
|
||||
this.groupBox1.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnPreview;
|
||||
private Control.LabelTextEdit labAddress;
|
||||
private DevExpress.XtraEditors.SimpleButton simpleButton1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
using Lskj.Control;
|
||||
using Lskj.Core;
|
||||
using Lskj.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Lskj.BatchUpload
|
||||
{
|
||||
public partial class FrmMain : BaseForm
|
||||
{
|
||||
public DynamicPowerModel Model;
|
||||
public FrmMain(string args)
|
||||
{
|
||||
DBConfig.Instance.ReadConfig();
|
||||
DBConfig.Instance.CreateConnection();
|
||||
//args = "上传测试,1,管理员,1,121212,1941";
|
||||
if (!string.IsNullOrWhiteSpace(args))
|
||||
{
|
||||
string[] stringArray = args.Split(','); // 将字符串转换回数组
|
||||
Model= new DynamicPowerModel(stringArray);
|
||||
}
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
private void btnPreview_Click(object sender, EventArgs e)
|
||||
{
|
||||
FolderBrowserDialog folderBrowserDialog = new FolderBrowserDialog();
|
||||
folderBrowserDialog.Description = "请选择一个文件夹";
|
||||
if (folderBrowserDialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
this.labAddress.EditText = folderBrowserDialog.SelectedPath;
|
||||
}
|
||||
}
|
||||
private void simpleButton1_Click(object sender, EventArgs e)
|
||||
{
|
||||
string address = this.labAddress.EditText;
|
||||
if (!string.IsNullOrEmpty(address) && Directory.Exists(address))
|
||||
{
|
||||
// 获取文件夹中的所有文件
|
||||
string[] fileNames = Directory.GetFiles(address);
|
||||
FrmProgress dp = new FrmProgress(fileNames.ToList());
|
||||
dp.Model = Model;
|
||||
if (dp.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
MessageUtil.Show("上传完成");
|
||||
this.Close();
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
MessageUtil.Show("上传文件位置出错");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
+222
@@ -0,0 +1,222 @@
|
||||
namespace Lskj.BatchUpload
|
||||
{
|
||||
partial class FrmProgress
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmProgress));
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.splitter1 = new System.Windows.Forms.Splitter();
|
||||
this.progressBarTotal = new System.Windows.Forms.ProgressBar();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.buttonOk = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.labelCurrentItem = new System.Windows.Forms.Label();
|
||||
this.lblAll = new System.Windows.Forms.Label();
|
||||
this.label4 = new System.Windows.Forms.Label();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.splitter2 = new System.Windows.Forms.Splitter();
|
||||
this.panel3.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.label3.Location = new System.Drawing.Point(11, 8);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(57, 12);
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "正在上传";
|
||||
//
|
||||
// splitter1
|
||||
//
|
||||
this.splitter1.BackColor = System.Drawing.SystemColors.InactiveBorder;
|
||||
this.splitter1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.splitter1.Location = new System.Drawing.Point(0, 63);
|
||||
this.splitter1.Name = "splitter1";
|
||||
this.splitter1.Size = new System.Drawing.Size(462, 2);
|
||||
this.splitter1.TabIndex = 10;
|
||||
this.splitter1.TabStop = false;
|
||||
//
|
||||
// progressBarTotal
|
||||
//
|
||||
this.progressBarTotal.Location = new System.Drawing.Point(13, 72);
|
||||
this.progressBarTotal.Name = "progressBarTotal";
|
||||
this.progressBarTotal.Size = new System.Drawing.Size(438, 12);
|
||||
this.progressBarTotal.Step = 1;
|
||||
this.progressBarTotal.TabIndex = 4;
|
||||
//
|
||||
// panel3
|
||||
//
|
||||
this.panel3.Controls.Add(this.buttonOk);
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.panel3.Location = new System.Drawing.Point(0, 169);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(462, 44);
|
||||
this.panel3.TabIndex = 9;
|
||||
//
|
||||
// buttonOk
|
||||
//
|
||||
this.buttonOk.Location = new System.Drawing.Point(372, 6);
|
||||
this.buttonOk.Name = "buttonOk";
|
||||
this.buttonOk.Size = new System.Drawing.Size(83, 29);
|
||||
this.buttonOk.TabIndex = 2;
|
||||
this.buttonOk.Text = "取消";
|
||||
this.buttonOk.UseVisualStyleBackColor = true;
|
||||
this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click);
|
||||
//
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(33, 26);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(173, 12);
|
||||
this.label2.TabIndex = 0;
|
||||
this.label2.Text = "正在上传,请耐心等待一段时间";
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.progressBarTotal);
|
||||
this.panel2.Controls.Add(this.labelCurrentItem);
|
||||
this.panel2.Controls.Add(this.lblAll);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.ForeColor = System.Drawing.SystemColors.ControlDark;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 63);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(462, 150);
|
||||
this.panel2.TabIndex = 8;
|
||||
//
|
||||
// labelCurrentItem
|
||||
//
|
||||
this.labelCurrentItem.AutoSize = true;
|
||||
this.labelCurrentItem.Location = new System.Drawing.Point(11, 29);
|
||||
this.labelCurrentItem.Name = "labelCurrentItem";
|
||||
this.labelCurrentItem.Size = new System.Drawing.Size(65, 12);
|
||||
this.labelCurrentItem.TabIndex = 0;
|
||||
this.labelCurrentItem.Text = "正在上传:";
|
||||
//
|
||||
// lblAll
|
||||
//
|
||||
this.lblAll.AutoSize = true;
|
||||
this.lblAll.Location = new System.Drawing.Point(11, 56);
|
||||
this.lblAll.Name = "lblAll";
|
||||
this.lblAll.Size = new System.Drawing.Size(53, 12);
|
||||
this.lblAll.TabIndex = 2;
|
||||
this.lblAll.Text = "总进度:";
|
||||
//
|
||||
// label4
|
||||
//
|
||||
this.label4.AutoSize = true;
|
||||
this.label4.Location = new System.Drawing.Point(33, 44);
|
||||
this.label4.Name = "label4";
|
||||
this.label4.Size = new System.Drawing.Size(245, 12);
|
||||
this.label4.TabIndex = 0;
|
||||
this.label4.Text = "这段时间您可以使用您的计算机办理其他事务";
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BackColor = System.Drawing.SystemColors.ButtonHighlight;
|
||||
this.panel1.Controls.Add(this.pictureBox1);
|
||||
this.panel1.Controls.Add(this.label4);
|
||||
this.panel1.Controls.Add(this.label2);
|
||||
this.panel1.Controls.Add(this.label3);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(462, 63);
|
||||
this.panel1.TabIndex = 7;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
|
||||
this.pictureBox1.Location = new System.Drawing.Point(379, 3);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(79, 55);
|
||||
this.pictureBox1.TabIndex = 1;
|
||||
this.pictureBox1.TabStop = false;
|
||||
//
|
||||
// splitter2
|
||||
//
|
||||
this.splitter2.BackColor = System.Drawing.SystemColors.InactiveBorder;
|
||||
this.splitter2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.splitter2.Location = new System.Drawing.Point(0, 213);
|
||||
this.splitter2.Name = "splitter2";
|
||||
this.splitter2.Size = new System.Drawing.Size(462, 2);
|
||||
this.splitter2.TabIndex = 11;
|
||||
this.splitter2.TabStop = false;
|
||||
//
|
||||
// FrmProgress
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(462, 215);
|
||||
this.Controls.Add(this.splitter1);
|
||||
this.Controls.Add(this.panel3);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.splitter2);
|
||||
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.MaximizeBox = false;
|
||||
this.MinimizeBox = false;
|
||||
this.Name = "FrmProgress";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "文件上传";
|
||||
this.Load += new System.EventHandler(this.OnFormLoad);
|
||||
this.panel3.ResumeLayout(false);
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.Splitter splitter1;
|
||||
private System.Windows.Forms.ProgressBar progressBarTotal;
|
||||
private System.Windows.Forms.Panel panel3;
|
||||
private System.Windows.Forms.Button buttonOk;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.Label labelCurrentItem;
|
||||
private System.Windows.Forms.Label lblAll;
|
||||
private System.Windows.Forms.Label label4;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Splitter splitter2;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,303 @@
|
||||
/******************************
|
||||
* 说明:下载进度窗口
|
||||
* 创建人:龚宇超
|
||||
* 创建日期:2018-02-09
|
||||
* 修改人:
|
||||
* 修改日期:
|
||||
* 修改备注:
|
||||
* 版本:1.0.0.0
|
||||
******************************/
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Net;
|
||||
using Lskj.Model;
|
||||
using Lskj.Core;
|
||||
using Lskj.Business;
|
||||
using Lskj.Control.BrowserSetting;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace Lskj.BatchUpload
|
||||
{
|
||||
/// <summary>
|
||||
/// 下载进度窗口
|
||||
/// </summary>
|
||||
public partial class FrmProgress : Form
|
||||
{
|
||||
public DynamicPowerModel Model;
|
||||
/// <summary>
|
||||
/// 是否下载完成
|
||||
/// </summary>
|
||||
private bool isFinished = false;
|
||||
/// <summary>
|
||||
/// 上传总数
|
||||
/// </summary>
|
||||
private long total = 0;
|
||||
/// <summary>
|
||||
/// 当前下载的总数
|
||||
/// </summary>
|
||||
private long nDownloadedTotal = 0;
|
||||
/// <summary>
|
||||
/// 上传文件列表
|
||||
/// </summary>
|
||||
private List<string> UploadFileList = new List<string>();
|
||||
private delegate void SetProcessBarCallBack(int current, int total);
|
||||
private delegate void ExitCallBack(bool success);
|
||||
private delegate void ShowCurrentDownloadFileNameCallBack(string name);
|
||||
public FrmProgress(List<string> fileNames)
|
||||
{
|
||||
|
||||
InitializeComponent();
|
||||
total = fileNames.Count;
|
||||
this.UploadFileList = fileNames;
|
||||
System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false;
|
||||
this.lblAll.Text = string.Format("总进度(0/{0})", this.UploadFileList.Count);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:窗口加载</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-02-23 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="sender">The sender.</param>
|
||||
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
|
||||
private void OnFormLoad(object sender, EventArgs e)
|
||||
{
|
||||
ThreadPool.QueueUserWorkItem(new WaitCallback(this.ProcDownload));
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:下载文件</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-02-23 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="o">The o.</param>
|
||||
private void ProcDownload(object o)
|
||||
{
|
||||
if (UploadFileList.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
string sql = @"if isnull((select 1 from Plm_MapNumberTab where plm_mn_dwgNo='{0}'),0)!=1
|
||||
begin
|
||||
insert into Plm_MapNumberTab(plm_mn_dwgNo,plm_mn_BillNo,plm_mn_operatorid,plm_mn_operatedate,plm_mn_modid) values('{0}','{1}','{2}',getdate(),'201041')
|
||||
end";
|
||||
|
||||
string sql2 = "insert into Plm_FigBindingTab(plm_fb_dwgNo,plm_fb_billdocument_id,plm_fb_stepover,plm_fb_operatorid,plm_fb_operatedate,plm_fb_modid) values('{0}','{1}','1','{2}',getdate(),'201043')";
|
||||
|
||||
string sql3 = " update P_fm_FileTab set dwgNo='{0}' where fileId='{1}'";
|
||||
|
||||
//年份后2位+2位月+2位日
|
||||
DateTime now = DateTime.Now;
|
||||
string date = now.ToString("yyMMdd");
|
||||
|
||||
ERPInfo.Instance.UserId = DBConfig.Instance.NoticeUserID;
|
||||
ERPInfo.Instance.UserName = DBConfig.Instance.NoticeUserName;
|
||||
|
||||
int i = 1;
|
||||
foreach (string filePath in UploadFileList)
|
||||
{
|
||||
try
|
||||
{
|
||||
string MaximumValue = SqlHelper.ExecuteScalar("select MAX(plm_mn_id) AS max_value FROM Plm_MapNumberTab;") + "";//主表
|
||||
string DetailsMaximumValue = SqlHelper.ExecuteScalar("select MAX(plm_fb_id) AS max_value FROM Plm_FigBindingTab;") + "";//明细表
|
||||
int number = int.Parse(MaximumValue)+1;//最大id
|
||||
int DetailsNumber = int.Parse(DetailsMaximumValue)+1;
|
||||
|
||||
string filename = Path.GetFileNameWithoutExtension(filePath);
|
||||
string wjm = "TH" + date + number.ToString("D4");
|
||||
string DetailsWjm = "TZ" + date + DetailsNumber.ToString("D4");
|
||||
string ReturnID = string.Empty;
|
||||
bool isUpdate = UploadFile(filePath, DetailsWjm, out string msg, out ReturnID);
|
||||
|
||||
if (isUpdate)
|
||||
{
|
||||
|
||||
SqlHelper.ExecuteNonQuery(string.Format(sql, filename, wjm, ERPInfo.Instance.UserId));
|
||||
SqlHelper.ExecuteNonQuery(string.Format(sql2, filename, DetailsWjm, ERPInfo.Instance.UserId));
|
||||
|
||||
SqlHelper.ExecuteNonQuery(string.Format("update Plm_FigBindingTab set plm_fb_assid=(select plm_mn_id from Plm_MapNumberTab where plm_mn_dwgNo='{0}') where plm_fb_dwgNo='{0}'", filename));
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(ReturnID))SqlHelper.ExecuteNonQuery(string.Format(sql3, filename, ReturnID));
|
||||
// SqlHelper.ExecuteNonQuery(string.Format(sql2, filename, "TZ" + date + i.ToString("D4"), ERPInfo.Instance.UserId));
|
||||
}
|
||||
//Thread.Sleep(500);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//MessageBox.Show(ex.Message);
|
||||
}
|
||||
finally
|
||||
{
|
||||
this.lblAll.Text = string.Format("总进度({0}/{1})", i, this.UploadFileList.Count);
|
||||
progressBarTotal.Value = (int)(i * 100 / total);
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
if (this.UploadFileList.Count == i)
|
||||
Exit(true);
|
||||
else
|
||||
Exit(false);
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:显示当前上传文件</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-02-23 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
private void ShowCurrentDownloadFileName(string name)
|
||||
{
|
||||
if (this.labelCurrentItem.InvokeRequired)
|
||||
{
|
||||
ShowCurrentDownloadFileNameCallBack cb = new ShowCurrentDownloadFileNameCallBack(ShowCurrentDownloadFileName);
|
||||
this.Invoke(cb, new object[] { name });
|
||||
this.labelCurrentItem.Text = "正在上传:" + name;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.labelCurrentItem.Text = "正在上传:" + name;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// <para>说明:退出升级程序</para>
|
||||
/// <para>创建人:龚宇超</para>
|
||||
/// <para>创建日期:2018-02-23 </para>
|
||||
/// <para>修改人:</para>
|
||||
/// <para>修改日期:</para>
|
||||
/// <para>修改备注:</para>
|
||||
/// <para>版本:1.0</para>
|
||||
/// </summary>
|
||||
/// <param name="success">if set to <c>true</c> [success].</param>
|
||||
private void Exit(bool success)
|
||||
{
|
||||
if (this.InvokeRequired)
|
||||
{
|
||||
ExitCallBack cb = new ExitCallBack(Exit);
|
||||
this.Invoke(cb, new object[] { success });
|
||||
}
|
||||
else
|
||||
{
|
||||
this.isFinished = success;
|
||||
this.DialogResult = success ? DialogResult.OK : DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 取消
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
private void buttonOk_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.DialogResult = DialogResult.Cancel;
|
||||
this.Close();
|
||||
}
|
||||
/// <summary>
|
||||
/// 上传文件
|
||||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
/// <param name="msg"></param>
|
||||
/// <returns></returns>
|
||||
private bool UploadFile(string filePath,string wjm, out string msg, out string ReturnID)
|
||||
{
|
||||
bool isUpload = false;
|
||||
string returnMsg = "";
|
||||
string postUrl = "";
|
||||
ReturnID = "";
|
||||
try
|
||||
{
|
||||
FileInfo fileInfo = new FileInfo(filePath);
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
byte[] fileBytes = ConvertFileToBytes(filePath);
|
||||
string fileBase64 = Convert.ToBase64String(fileBytes);
|
||||
//上传文件到服务器目录
|
||||
postUrl = $"{SystemInfo.Instance.OAUrl}Api/FileUploadApi.ashx?moduleId={Model.ModuleCode}&idValue={wjm}&totsize={fileInfo.Length}&position=0&filename={fileName}&method=DoWebUpload";
|
||||
HttpTools.setting("application/x-www-form-urlencoded", null, null);
|
||||
string result = "";
|
||||
CookieCollection cookieCollection = null;
|
||||
HttpWebResponse webResponse = HttpTools.Post(postUrl, fileBase64, null, HttpTools.Method.POST, out cookieCollection, out result);
|
||||
if (webResponse != null && !string.IsNullOrEmpty(result))
|
||||
{
|
||||
JObject jsonObject = (JObject)Newtonsoft.Json.JsonConvert.DeserializeObject(result);
|
||||
string isSuccess = jsonObject["success"] + "";
|
||||
if (isSuccess.Equals("True", StringComparison.CurrentCultureIgnoreCase))
|
||||
{
|
||||
string fileId = jsonObject["other"] + "";
|
||||
ReturnID = fileId;
|
||||
string webpath = jsonObject["data"]["WebRelPath"] + "";
|
||||
isUpload = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (jsonObject.ContainsKey("msg"))
|
||||
{
|
||||
returnMsg = jsonObject["msg"] + "";
|
||||
}
|
||||
isUpload = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
returnMsg = "上传请求失败";
|
||||
isUpload = false;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
returnMsg = ex.Message;
|
||||
isUpload = false;
|
||||
}
|
||||
msg = returnMsg;
|
||||
return isUpload;
|
||||
}
|
||||
/// <summary>
|
||||
/// 附件转换byte[]
|
||||
/// </summary>
|
||||
/// <param name="filePath">附件路径</param>
|
||||
/// <returns>二进制</returns>
|
||||
private byte[] ConvertFileToBytes(string filePath)
|
||||
{
|
||||
byte[] bytContent = null;
|
||||
FileStream fs = null;
|
||||
BinaryReader br = null;
|
||||
try
|
||||
{
|
||||
fs = new FileStream(filePath, System.IO.FileMode.Open);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
throw;
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (fs != null)
|
||||
br = new BinaryReader((Stream)fs);
|
||||
if (br != null)
|
||||
bytContent = br.ReadBytes((Int32)fs.Length);
|
||||
if (fs != null)
|
||||
fs.Dispose();
|
||||
}
|
||||
return bytContent;
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,164 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{88EE02F0-95AE-4288-B569-6D3EA9CBAF42}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>Lskj.BatchUpload</RootNamespace>
|
||||
<AssemblyName>Lskj.BatchUpload</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\Debug\Lib\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>a.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="DevExpress.BonusSkins.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\DEV\Components\Bin\Framework\DevExpress.BonusSkins.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Data.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\DEV\Components\Bin\Framework\DevExpress.Data.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Printing.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\DEV\Components\Bin\Framework\DevExpress.Printing.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Sparkline.v15.2.Core, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\DEV\Components\Bin\Framework\DevExpress.Sparkline.v15.2.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.Utils.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||
<Reference Include="DevExpress.XtraEditors.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\DEV\Components\Bin\Framework\DevExpress.XtraEditors.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraGrid.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\DEV\Components\Bin\Framework\DevExpress.XtraGrid.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraLayout.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\DEV\Components\Bin\Framework\DevExpress.XtraLayout.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="DevExpress.XtraPrinting.v15.2, Version=15.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\DEV\Components\Bin\Framework\DevExpress.XtraPrinting.v15.2.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=13.0.1.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\引用DLL\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Net" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="DllBaseClass.cs" />
|
||||
<Compile Include="FrmMain.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmMain.Designer.cs">
|
||||
<DependentUpon>FrmMain.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="FrmProgress.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="FrmProgress.Designer.cs">
|
||||
<DependentUpon>FrmProgress.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="FrmMain.resx">
|
||||
<DependentUpon>FrmMain.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="FrmProgress.resx">
|
||||
<DependentUpon>FrmProgress.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<None Include="app.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Lskj.Business\Lskj.Business.csproj">
|
||||
<Project>{7EAFCCC2-A18F-49E9-85C6-A984966CFD01}</Project>
|
||||
<Name>Lskj.Business</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Lskj.Control\Lskj.Control.csproj">
|
||||
<Project>{447CDC40-659F-4CCA-9ED6-8E818B4CF8BF}</Project>
|
||||
<Name>Lskj.Control</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Lskj.Core\Lskj.Core.csproj">
|
||||
<Project>{2A1BE6AC-1077-491B-A754-C5822FE8121E}</Project>
|
||||
<Name>Lskj.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Lskj.Data\Lskj.Data.csproj">
|
||||
<Project>{308b9b18-9be2-495c-9c64-eed81d567813}</Project>
|
||||
<Name>Lskj.Data</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Lskj.Model\Lskj.Model.csproj">
|
||||
<Project>{52BC40E0-C0C6-4F78-996B-CAE028D209CA}</Project>
|
||||
<Name>Lskj.Model</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Lskj.Util\Lskj.Util.csproj">
|
||||
<Project>{A51BF642-6543-4DE3-8948-83F558B72BD4}</Project>
|
||||
<Name>Lskj.Util</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="a.ico" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 16
|
||||
VisualStudioVersion = 16.0.35130.168
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Lskj.BatchUpload", "Lskj.BatchUpload.csproj", "{88EE02F0-95AE-4288-B569-6D3EA9CBAF42}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{88EE02F0-95AE-4288-B569-6D3EA9CBAF42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{88EE02F0-95AE-4288-B569-6D3EA9CBAF42}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{88EE02F0-95AE-4288-B569-6D3EA9CBAF42}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{88EE02F0-95AE-4288-B569-6D3EA9CBAF42}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {D59D5605-EE52-42B0-8959-F4724D365A26}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Lskj.BatchUpload
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// 应用程序的主入口点。
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main(string[] args)
|
||||
{
|
||||
string arrayAsString = string.Empty;
|
||||
if (args.Length > 0)
|
||||
{
|
||||
arrayAsString = args[0]; // 获取传递的字符串参数
|
||||
}
|
||||
Application.EnableVisualStyles();
|
||||
Application.SetCompatibleTextRenderingDefault(false);
|
||||
Application.Run(new FrmMain(arrayAsString));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// 有关程序集的一般信息由以下
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Lskj.BatchUpload")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Lskj.BatchUpload")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2024")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("88ee02f0-95ae-4288-b569-6d3ea9cbaf42")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本: 4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace Lskj.BatchUpload.Properties
|
||||
{
|
||||
/// <summary>
|
||||
/// 强类型资源类,用于查找本地化字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或删除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Lskj.BatchUpload.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,29 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
|
||||
namespace Lskj.BatchUpload.Properties
|
||||
{
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
|
||||
{
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default
|
||||
{
|
||||
get
|
||||
{
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-13.0.0.0" newVersion="13.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="NPOI" publicKeyToken="0df73ec7942b34e1" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.1.3.1" newVersion="2.1.3.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-2.6.10.0" newVersion="2.6.10.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user