提交当前本机整理版本
This commit is contained in:
@@ -92,4 +92,32 @@ namespace Lskj.PubBomImportNew
|
||||
{
|
||||
keyvalue = args[7] + "";
|
||||
}
|
||||
if (args.Length > 8 && !string.IsNullOrWh
|
||||
if (args.Length > 8 && !string.IsNullOrWhiteSpace(args[8]))
|
||||
{
|
||||
stratRowHand = args[8] + "";
|
||||
}
|
||||
if (args.Length > 9 && !string.IsNullOrWhiteSpace(args[9]))
|
||||
{
|
||||
endRowHand = args[9] + "";
|
||||
}
|
||||
if (args.Length > 10 && !string.IsNullOrWhiteSpace(args[10]))
|
||||
{
|
||||
speciesNo = args[10] + "";
|
||||
}
|
||||
if (!string.IsNullOrEmpty(args[args.Length - 1]))
|
||||
{
|
||||
try
|
||||
{
|
||||
JObject rowObject = JsonConvert.DeserializeObject<JObject>(args[args.Length - 1]);
|
||||
JArray jArray = new JArray();
|
||||
jArray.Add(rowObject);
|
||||
DataTable dataTable = JsonConvert.DeserializeObject<DataTable>(JsonConvert.SerializeObject(jArray));
|
||||
this.MaintabFocusedRow = dataTable.Rows[0];
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+18
-1
@@ -718,4 +718,21 @@ namespace Lskj.PubBomImport
|
||||
private DevExpress.XtraEditors.DropDownButton dpbImport;
|
||||
private DevExpress.XtraEditors.SimpleButton btnBillAdd;
|
||||
private DevExpress.XtraEditors.SimpleButton btnBillApply;
|
||||
private D
|
||||
private DevExpress.XtraEditors.DropDownButton dpCopyBill;
|
||||
private DevExpress.XtraEditors.DropDownButton btnPrint;
|
||||
private DevExpress.XtraEditors.DropDownButton dpbTools;
|
||||
private DevExpress.XtraEditors.SimpleButton btnDelete;
|
||||
private DevExpress.XtraEditors.SimpleButton btnBillSave;
|
||||
private DevExpress.XtraEditors.PanelControl pl_main_top;
|
||||
private DevExpress.XtraEditors.PanelControl pl_main_top_center;
|
||||
private System.Windows.Forms.Label lbTitle;
|
||||
private DevExpress.XtraEditors.PanelControl pl_main_top_right;
|
||||
private DevExpress.XtraEditors.LabelControl lblOrderNo;
|
||||
private DevExpress.XtraEditors.LabelControl labelControl1;
|
||||
private DevExpress.XtraEditors.PanelControl pl_main_top_left;
|
||||
private DevExpress.XtraEditors.PanelControl pl_red;
|
||||
private System.Windows.Forms.RadioButton rdRed;
|
||||
private DevExpress.XtraEditors.PanelControl pl_blue;
|
||||
private System.Windows.Forms.RadioButton rdBlue;
|
||||
}
|
||||
}
|
||||
@@ -606,4 +606,32 @@ namespace Lskj.PubBomImport
|
||||
if (mainRow != null)
|
||||
{
|
||||
//更新
|
||||
DataTable source = this.gcMain.GridC
|
||||
DataTable source = this.gcMain.GridControl.DataSourceTable();
|
||||
List<DataRow> deleteRows = new List<DataRow>();
|
||||
foreach (DataRow sourceRow in source.Rows)
|
||||
{
|
||||
string bak = sourceRow["bak"] + "";
|
||||
if (!string.IsNullOrEmpty(bak) && bak.Trim().StartsWith("ZZQD"))
|
||||
{
|
||||
deleteRows.Add(sourceRow);
|
||||
}
|
||||
}
|
||||
foreach (DataRow deleteRow in deleteRows)
|
||||
{
|
||||
source.Rows.Remove(deleteRow);
|
||||
}
|
||||
foreach (DataRow newSourceRow in newSource.Rows)
|
||||
{
|
||||
DataRow newRow = source.NewRow();
|
||||
newRow.ItemArray = newSourceRow.ItemArray;
|
||||
source.Rows.Add(newRow);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//新增
|
||||
this.gcMain.GridControl.DataSource = newSource;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+24
-1
@@ -94,4 +94,27 @@ namespace Lskj.PubBomImportNew
|
||||
//
|
||||
// FrmMain
|
||||
//
|
||||
this.Appear
|
||||
this.Appearance.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.Appearance.Options.UseBackColor = true;
|
||||
this.Appearance.Options.UseFont = true;
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
|
||||
this.ClientSize = new System.Drawing.Size(784, 461);
|
||||
this.Controls.Add(this.gcMain);
|
||||
this.Controls.Add(this.pl_bottom);
|
||||
this.Name = "FrmMain";
|
||||
this.Opacity = 0D;
|
||||
this.Text = "表格导入";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).EndInit();
|
||||
this.pl_bottom.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
private DevExpress.XtraEditors.PanelControl pl_bottom;
|
||||
private DevExpress.XtraEditors.SimpleButton btnCancel;
|
||||
private DevExpress.XtraEditors.SimpleButton btnOk;
|
||||
private Control.GridControlEx gcMain;
|
||||
private DevExpress.XtraEditors.SimpleButton btnRead;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -245,27 +245,28 @@ namespace Lskj.PubBomImportNew
|
||||
{
|
||||
if (BaseImpl.HasExistsTable("P_SpecialImportTab"))
|
||||
{
|
||||
if (!BaseImpl.HasExistsColumn("P_SpecialImportTab", "moduleId"))
|
||||
DataTable TabColumnsb = BaseImpl.GetTableColumns("P_SpecialImportTab");
|
||||
if (!TabColumnsb.Columns.Contains("moduleId"))
|
||||
{
|
||||
string addColumnSql = "alter table P_SpecialImportTab add moduleId varchar(100)";
|
||||
SqlHelper.ExecuteNonQuery(addColumnSql);
|
||||
}
|
||||
if (!BaseImpl.HasExistsColumn("P_SpecialImportTab", "rightMenuName"))
|
||||
if (!TabColumnsb.Columns.Contains("rightMenuName"))
|
||||
{
|
||||
string addColumnSql = "alter table P_SpecialImportTab add rightMenuName varchar(100)";
|
||||
SqlHelper.ExecuteNonQuery(addColumnSql);
|
||||
}
|
||||
if (!BaseImpl.HasExistsColumn("P_SpecialImportTab", "Ls_CondFilter"))
|
||||
if (!TabColumnsb.Columns.Contains("Ls_CondFilter"))
|
||||
{
|
||||
string addColumnSql = "alter table P_SpecialImportTab add Ls_CondFilter varchar(1000)";
|
||||
SqlHelper.ExecuteNonQuery(addColumnSql);
|
||||
}
|
||||
if (!BaseImpl.HasExistsColumn("P_SpecialImportTab", "Ls_UnionColumn"))
|
||||
if (!TabColumnsb.Columns.Contains("Ls_UnionColumn"))
|
||||
{
|
||||
string addColumnSql = "alter table P_SpecialImportTab add Ls_UnionColumn varchar(2000)";
|
||||
SqlHelper.ExecuteNonQuery(addColumnSql);
|
||||
}
|
||||
if (!BaseImpl.HasExistsColumn("P_SpecialImportTab", "Ls_CondPurview"))
|
||||
if (!TabColumnsb.Columns.Contains("Ls_CondPurview"))
|
||||
{
|
||||
string addColumnSql = "alter table P_SpecialImportTab add Ls_CondPurview varchar(1000)";
|
||||
SqlHelper.ExecuteNonQuery(addColumnSql);
|
||||
@@ -1436,4 +1437,31 @@ namespace Lskj.PubBomImportNew
|
||||
{
|
||||
case CellType.String:
|
||||
cellValue = cell.StringCellValue;
|
||||
|
||||
break;
|
||||
case CellType.Numeric:
|
||||
cellValue = cell.NumericCellValue.ToString();
|
||||
break;
|
||||
case CellType.Boolean:
|
||||
cellValue = cell.BooleanCellValue.ToString();
|
||||
break;
|
||||
case CellType.Blank:
|
||||
break;
|
||||
default:
|
||||
cellValue.ToString();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
cellValue = cell.ToString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
return cellValue;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
+24
-1
@@ -167,4 +167,27 @@ namespace Lskj.PubBomImportNew
|
||||
this.Name = "FrmMain2";
|
||||
this.Opacity = 0D;
|
||||
this.Text = "表格导入";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_to
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_top)).EndInit();
|
||||
this.pl_top.ResumeLayout(false);
|
||||
this.pl_top.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_bottom)).EndInit();
|
||||
this.pl_bottom.ResumeLayout(false);
|
||||
this.pl_bottom.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pl_main)).EndInit();
|
||||
this.pl_main.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
#endregion
|
||||
private DevExpress.XtraEditors.PanelControl pl_top;
|
||||
private DevExpress.XtraEditors.SimpleButton btnImport;
|
||||
private DevExpress.XtraEditors.SimpleButton btnRead;
|
||||
private System.Windows.Forms.Label label2;
|
||||
private DevExpress.XtraEditors.PanelControl pl_bottom;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private DevExpress.XtraEditors.SimpleButton btnCover;
|
||||
private DevExpress.XtraEditors.PanelControl pl_main;
|
||||
private Control.GridControlEx gcMain;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ using System.Web;
|
||||
using Lskj.Control.BrowserSetting;
|
||||
using System.Net;
|
||||
using Newtonsoft.Json;
|
||||
using System.Data.Common;
|
||||
|
||||
namespace Lskj.PubBomImportNew
|
||||
{
|
||||
@@ -405,8 +406,10 @@ namespace Lskj.PubBomImportNew
|
||||
{
|
||||
GridColumn primKeyColumn = gcMain.GridView.Columns.Where(n => n.FieldName.Equals(_primkey, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
|
||||
string sql = "select * from " + _tableName + " where 1<>1";
|
||||
SqlDataAdapter dat = BaseImpl.GetAdapterResult(sql);
|
||||
SqlCommandBuilder scb = new SqlCommandBuilder(dat);
|
||||
DbDataAdapter dat = BaseImpl.GetAdapterResult(sql);
|
||||
DbCommandBuilder scb = SqlHelper.dbFactory.CreateCommandBuilder();
|
||||
scb.DataAdapter = dat;
|
||||
//SqlCommandBuilder scb = new SqlCommandBuilder(dat);
|
||||
DataTable datatb = new DataTable();
|
||||
DataTable failedData = new DataTable();
|
||||
dat.Fill(datatb);
|
||||
@@ -2036,4 +2039,38 @@ namespace Lskj.PubBomImportNew
|
||||
throw new Exception($"文件{Path.GetFileName(filePath)}上传失败\r\n{ex.Message}");
|
||||
isUpload = false;
|
||||
}
|
||||
msg = retur
|
||||
msg = returnMsg;
|
||||
outFileId = fileId;
|
||||
return isUpload;
|
||||
}
|
||||
/// <summary>
|
||||
/// 附件转换byte[]
|
||||
/// </summary>
|
||||
/// <param name="filePath">附件路径</param>
|
||||
/// <returns>二进制</returns>
|
||||
private byte[] ConvertFileToBytes(string filePath)
|
||||
{
|
||||
byte[] bytContent = null;
|
||||
System.IO.FileStream fs = null;
|
||||
System.IO.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
+26
-1
@@ -140,4 +140,29 @@
|
||||
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 = "导入Bom";
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.panel2.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
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 panel2;
|
||||
private System.Windows.Forms.Label labelCurrentItem;
|
||||
private System.Windows.Forms.ProgressBar progressBarCurrent;
|
||||
private System.Windows.Forms.Label lblAll;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Splitter splitter2;
|
||||
}
|
||||
}
|
||||
@@ -954,4 +954,34 @@ namespace Lskj.PubBomImportNew
|
||||
string pattern = @"^(.*?)(\d+)?$";
|
||||
var match = Regex.Match(fileName, namepattern);
|
||||
code = "";
|
||||
spec = "";
|
||||
spec = "";
|
||||
name = "";
|
||||
extension = "";
|
||||
bb = "";
|
||||
bc = 0;
|
||||
if (match.Success)
|
||||
{
|
||||
code = match.Groups[1].Value.Trim();
|
||||
spec = match.Groups[2].Value.Trim();
|
||||
name = match.Groups[3].Value.Trim();
|
||||
extension = match.Groups[4].Value.Trim();
|
||||
match = Regex.Match(spec, pattern);
|
||||
if (match.Success)
|
||||
{
|
||||
string childsourceCode = match.Groups[1].Value;
|
||||
int.TryParse(match.Groups[2].Value, out bc);//版次
|
||||
Match bbMatch = Regex.Match(childsourceCode, @"^.*?([A-Za-z]+)(\d*)$");
|
||||
if (bbMatch.Success)
|
||||
{
|
||||
bb = bbMatch.Groups[1].Value.Trim();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,7 +102,6 @@
|
||||
<EmbeddedResource Include="FrmProgress.resx">
|
||||
<DependentUpon>FrmProgress.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\licenses.licx" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Lskj.Business\Lskj.Business.csproj">
|
||||
|
||||
@@ -6,4 +6,31 @@ using System.Runtime.InteropServices;
|
||||
// 控制。更改这些特性值可修改
|
||||
// 与程序集关联的信息。
|
||||
[assembly: AssemblyTitle("Lskj.PubBomImportNew")]
|
||||
[assembly: AssemblyDescr
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Lskj.PubBomImportNew")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2025")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// 将 ComVisible 设置为 false 会使此程序集中的类型
|
||||
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
|
||||
//请将此类型的 ComVisible 特性设置为 true。
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
|
||||
[assembly: Guid("8c507c31-8c19-46c9-82f8-85ddcae69190")]
|
||||
|
||||
// 程序集的版本信息由下列四个值组成:
|
||||
//
|
||||
// 主版本
|
||||
// 次版本
|
||||
// 生成号
|
||||
// 修订号
|
||||
//
|
||||
//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
|
||||
//通过使用 "*",如下所示:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
||||
+25
-1
@@ -11,4 +11,28 @@
|
||||
namespace Lskj.PubBomImportNew.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttrib
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.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;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string LastSelectFolder {
|
||||
get {
|
||||
return ((string)(this["LastSelectFolder"]));
|
||||
}
|
||||
set {
|
||||
this["LastSelectFolder"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user