From 306f6118735cac2f3ca6ba2af3df271c0c2e7184 Mon Sep 17 00:00:00 2001 From: "chikyun.kim" Date: Thu, 3 Jan 2019 17:42:39 +0900 Subject: [PATCH] .. --- Project/fMain.Designer.cs | 22 +- Project/fMain.cs | 7 + Project/fMain.resx | 20 +- SubProject/FCM0000/FCM0000.csproj | 9 + SubProject/FCM0000/dsMSSQL.Designer.cs | 607 +++++++++++++++--- SubProject/FCM0000/dsMSSQL.xsd | 115 ++-- .../FCM0000/fMaterial_Import.Designer.cs | 539 ++++++++++++++++ SubProject/FCM0000/fMaterial_Import.cs | 242 +++++++ SubProject/FCM0000/fMaterial_Import.resx | 197 ++++++ .../FEQ0000/Purchase/fPurchase.Designer.cs | 10 +- .../Purchase/fPurchase_Add.Designer.cs | 82 +-- 11 files changed, 1652 insertions(+), 198 deletions(-) create mode 100644 SubProject/FCM0000/fMaterial_Import.Designer.cs create mode 100644 SubProject/FCM0000/fMaterial_Import.cs create mode 100644 SubProject/FCM0000/fMaterial_Import.resx diff --git a/Project/fMain.Designer.cs b/Project/fMain.Designer.cs index b9b9290..faa6d55 100644 --- a/Project/fMain.Designer.cs +++ b/Project/fMain.Designer.cs @@ -73,6 +73,7 @@ this.라인코드관리ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.personalInventoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.nRPurchaseToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.패치내역ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.btDev = new System.Windows.Forms.ToolStripMenuItem(); this.purchaseImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.purchaseDataConvertToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -86,7 +87,7 @@ this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.toolStripContainer1 = new System.Windows.Forms.ToolStripContainer(); - this.패치내역ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.materialImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.cmTab.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout(); @@ -433,10 +434,18 @@ this.nRPurchaseToolStripMenuItem.Text = "NR구매신청"; this.nRPurchaseToolStripMenuItem.Click += new System.EventHandler(this.nRPurchaseToolStripMenuItem_Click); // + // 패치내역ToolStripMenuItem + // + this.패치내역ToolStripMenuItem.Name = "패치내역ToolStripMenuItem"; + this.패치내역ToolStripMenuItem.Size = new System.Drawing.Size(77, 23); + this.패치내역ToolStripMenuItem.Text = "패치내역"; + this.패치내역ToolStripMenuItem.Click += new System.EventHandler(this.패치내역ToolStripMenuItem_Click); + // // btDev // this.btDev.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.purchaseImportToolStripMenuItem, + this.materialImportToolStripMenuItem, this.purchaseDataConvertToolStripMenuItem, this.customerImportToolStripMenuItem}); this.btDev.ForeColor = System.Drawing.Color.Blue; @@ -581,12 +590,12 @@ this.toolStripContainer1.TabIndex = 35; this.toolStripContainer1.Text = "toolStripContainer1"; // - // 패치내역ToolStripMenuItem + // materialImportToolStripMenuItem // - this.패치내역ToolStripMenuItem.Name = "패치내역ToolStripMenuItem"; - this.패치내역ToolStripMenuItem.Size = new System.Drawing.Size(77, 23); - this.패치내역ToolStripMenuItem.Text = "패치내역"; - this.패치내역ToolStripMenuItem.Click += new System.EventHandler(this.패치내역ToolStripMenuItem_Click); + this.materialImportToolStripMenuItem.Name = "materialImportToolStripMenuItem"; + this.materialImportToolStripMenuItem.Size = new System.Drawing.Size(222, 24); + this.materialImportToolStripMenuItem.Text = "Material Import"; + this.materialImportToolStripMenuItem.Click += new System.EventHandler(this.materialImportToolStripMenuItem_Click); // // fMain // @@ -682,6 +691,7 @@ private System.Windows.Forms.ToolStripContainer toolStripContainer1; private System.Windows.Forms.ToolStripButton toolStripButton5; private System.Windows.Forms.ToolStripMenuItem 패치내역ToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem materialImportToolStripMenuItem; } } diff --git a/Project/fMain.cs b/Project/fMain.cs index 487c276..eca67c9 100644 --- a/Project/fMain.cs +++ b/Project/fMain.cs @@ -496,5 +496,12 @@ namespace Project f.Show(); } + private void materialImportToolStripMenuItem_Click(object sender, EventArgs e) + { + var f = new FCM0000.fMaterial_Import(); + // f.MdiParent = this; + f.Show(); + } + } } diff --git a/Project/fMain.resx b/Project/fMain.resx index 2d9f7cd..10e1b01 100644 --- a/Project/fMain.resx +++ b/Project/fMain.resx @@ -153,16 +153,16 @@ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIaSURBVDhPlY9daFJhGMdPdN1tV112G3QTRF0EQ2cX0d1u - 0jx55jm6Flut6fnQ47tQmZme48dppjvqxmiQLWEDkZQaFRUtiBaDICqC7mIfRMTc/HjK+XpEksV+8Ofl - fZ7n9/I+BKU6PlJJNzBseNXGS2cJzBTSH016DKUpQXdau7t0JYXrP7430IbK8h8saWGV5sOXKE76TBBw - 6C6vO6dwho0ldGE3wRq24ny/PuHp+/EYmWrqhO676jhzBOvd0C5Us94bWx9Hw7Xkg3EolRHEAiMNhC42 - CrEbjd/v/LCs0DvT4vmXuYGBw1jrQN4K/vI9SkHqzX2QllPgLUSAXfCDbZYHUmVhZM4FEzkRxPT13bGo - 9ZV5mjVhtQXju70mZhNQ+vbknxS/lCG3tgjpt/MQeZYG02KobspwG1htQXm9c2RYrral0NNkz7MZdWUe - BmeE91htQfn9tA2hWnvIrDp7ns00f0Fm2IdYbWENBI4xggTFr+X/PoCK8YpZdfiw2kFvDNdnX+f3hvZb - 4ebC5M/LqpPGWgcLurMZzGe1wV5Z+lQEY4avXElyp7DWgfIGVvqCvjolj263Y8xyFWOW12JRru4Mzrhl - rHTDcJKd5qUCvh4c2hk+wbCTW1ZBPolLB8cuRl/YXagx5I4Bw8tdsbujQJLR6jWP0nuFJkYBVdT8c7CN - ytu4pLFfT2Po7+skGakOi/EQLml09wjiD5+5oXO84tdnAAAAAElFTkSuQmCC + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIbSURBVDhPY0iaU3o9aWbN/7Ty3ovplX3WDFAwrd5VbGad + +65pVS4WcH61y64pFW4qYAUwkDS/8lLi3KqLqZW9UUkVfXcYGP4zTq10sZ9S4f52U73Pr+nl7u8nV7q5 + Tq9zerWzPubPnAaXx3NKrXih2lFBanX9n5QZRW9K6rP/zFxZ8n/X7vr/E9vz/tXX+/3bMrHw39dzrf/3 + T0n9ObvW4+iq0FBmqDYEiG/s+tyydtb/WSeX/u/bP+t/89YJ/8vXtP5PX1j5P35O+f+8xdX/G1bV/q+d + W/CraGLKsbjZ5TFQrRCQ1tJ5pXb+9P+7HuzFwNvv7v6/6srG/3NPL/s/4eDc/9Ebe/7GzKt4C9UKAUnN + zYvje/t/wzT17JuJlQbhOaeW/U9eUHUBqhUCklpbU9Pr6//AFMXNKcNKgzDIFfHzyldDtUJASkeHTFpV + 3//t93YTNKB+++QfcXNKW6BaEcAlqvfvwuPrwIrweaF4TfvH2DllqVBtCJBY3/2ua918uEJseNOt7f+j + 51X+SJhZYQrVhgBJzR2nHLta/ib153+H4ej5FT+i51fCceKUrJ/JC2r6oVpQQVpFX0ZqZd9WKJd0kFrW + q5tW3v4+parfACpEOsionXg4o7r+X2bNpP9plf0oOKNm4v/4+Im/c+qmYPcCCERX1f+Ys+7Q//T8/u9Q + ITjAJwcHmUDT4+Mn/M6undwDFYIDVDkGBgCJ5qFro7SHLQAAAABJRU5ErkJggg== diff --git a/SubProject/FCM0000/FCM0000.csproj b/SubProject/FCM0000/FCM0000.csproj index 1f255ca..7ffe822 100644 --- a/SubProject/FCM0000/FCM0000.csproj +++ b/SubProject/FCM0000/FCM0000.csproj @@ -182,6 +182,12 @@ Customer_Import.cs + + Form + + + fMaterial_Import.cs + Form @@ -239,6 +245,9 @@ Customer_Import.cs + + fMaterial_Import.cs + fSelectDate.cs diff --git a/SubProject/FCM0000/dsMSSQL.Designer.cs b/SubProject/FCM0000/dsMSSQL.Designer.cs index 7436ed4..f55e305 100644 --- a/SubProject/FCM0000/dsMSSQL.Designer.cs +++ b/SubProject/FCM0000/dsMSSQL.Designer.cs @@ -657,6 +657,14 @@ namespace FCM0000 { private global::System.Data.DataColumn columnunit; + private global::System.Data.DataColumn columndisable; + + private global::System.Data.DataColumn columnbparam1; + + private global::System.Data.DataColumn columniparam1; + + private global::System.Data.DataColumn columnimport; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public ItemsDataTable() { @@ -802,6 +810,38 @@ namespace FCM0000 { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn disableColumn { + get { + return this.columndisable; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn bparam1Column { + get { + return this.columnbparam1; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn iparam1Column { + get { + return this.columniparam1; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn importColumn { + get { + return this.columnimport; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -839,7 +879,24 @@ namespace FCM0000 { [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] - public ItemsRow AddItemsRow(string name, string sid, string model, string manu, string supply, string memo, string wuid, System.DateTime wdate, decimal price, string cate, int supplyidx, double scale, string unit) { + public ItemsRow AddItemsRow( + string name, + string sid, + string model, + string manu, + string supply, + string memo, + string wuid, + System.DateTime wdate, + decimal price, + string cate, + int supplyidx, + double scale, + string unit, + bool disable, + bool bparam1, + int iparam1, + string import) { ItemsRow rowItemsRow = ((ItemsRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, @@ -855,7 +912,11 @@ namespace FCM0000 { cate, supplyidx, scale, - unit}; + unit, + disable, + bparam1, + iparam1, + import}; rowItemsRow.ItemArray = columnValuesArray; this.Rows.Add(rowItemsRow); return rowItemsRow; @@ -899,6 +960,10 @@ namespace FCM0000 { this.columnsupplyidx = base.Columns["supplyidx"]; this.columnscale = base.Columns["scale"]; this.columnunit = base.Columns["unit"]; + this.columndisable = base.Columns["disable"]; + this.columnbparam1 = base.Columns["bparam1"]; + this.columniparam1 = base.Columns["iparam1"]; + this.columnimport = base.Columns["import"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -932,6 +997,14 @@ namespace FCM0000 { base.Columns.Add(this.columnscale); this.columnunit = new global::System.Data.DataColumn("unit", typeof(string), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnunit); + this.columndisable = new global::System.Data.DataColumn("disable", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columndisable); + this.columnbparam1 = new global::System.Data.DataColumn("bparam1", typeof(bool), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnbparam1); + this.columniparam1 = new global::System.Data.DataColumn("iparam1", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columniparam1); + this.columnimport = new global::System.Data.DataColumn("import", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnimport); this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnidx}, true)); this.columnidx.AutoIncrement = true; @@ -940,19 +1013,20 @@ namespace FCM0000 { this.columnidx.AllowDBNull = false; this.columnidx.ReadOnly = true; this.columnidx.Unique = true; - this.columnname.MaxLength = 100; + this.columnname.MaxLength = 200; this.columnsid.MaxLength = 50; - this.columnmodel.MaxLength = 100; + this.columnmodel.MaxLength = 200; this.columnmanu.MaxLength = 100; this.columnsupply.MaxLength = 100; this.columnmemo.MaxLength = 255; this.columnwuid.AllowDBNull = false; this.columnwuid.MaxLength = 20; this.columnwdate.AllowDBNull = false; - this.columncate.MaxLength = 20; + this.columncate.MaxLength = 50; this.columnscale.DefaultValue = ((double)(1D)); this.columnunit.DefaultValue = ((string)("EA")); this.columnunit.MaxLength = 10; + this.columnimport.MaxLength = 1; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -5928,6 +6002,70 @@ namespace FCM0000 { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool disable { + get { + try { + return ((bool)(this[this.tableItems.disableColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("\'Items\' 테이블의 \'disable\' 열의 값이 DBNull입니다.", e); + } + } + set { + this[this.tableItems.disableColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool bparam1 { + get { + try { + return ((bool)(this[this.tableItems.bparam1Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("\'Items\' 테이블의 \'bparam1\' 열의 값이 DBNull입니다.", e); + } + } + set { + this[this.tableItems.bparam1Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int iparam1 { + get { + try { + return ((int)(this[this.tableItems.iparam1Column])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("\'Items\' 테이블의 \'iparam1\' 열의 값이 DBNull입니다.", e); + } + } + set { + this[this.tableItems.iparam1Column] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string import { + get { + try { + return ((string)(this[this.tableItems.importColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("\'Items\' 테이블의 \'import\' 열의 값이 DBNull입니다.", e); + } + } + set { + this[this.tableItems.importColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool IsnameNull() { @@ -6059,6 +6197,54 @@ namespace FCM0000 { public void SetunitNull() { this[this.tableItems.unitColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsdisableNull() { + return this.IsNull(this.tableItems.disableColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetdisableNull() { + this[this.tableItems.disableColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool Isbparam1Null() { + return this.IsNull(this.tableItems.bparam1Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void Setbparam1Null() { + this[this.tableItems.bparam1Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool Isiparam1Null() { + return this.IsNull(this.tableItems.iparam1Column); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void Setiparam1Null() { + this[this.tableItems.iparam1Column] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsimportNull() { + return this.IsNull(this.tableItems.importColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetimportNull() { + this[this.tableItems.importColumn] = global::System.Convert.DBNull; + } } /// @@ -10190,10 +10376,14 @@ namespace FCM0000.dsMSSQLTableAdapters { tableMapping.ColumnMappings.Add("supplyidx", "supplyidx"); tableMapping.ColumnMappings.Add("scale", "scale"); tableMapping.ColumnMappings.Add("unit", "unit"); + tableMapping.ColumnMappings.Add("disable", "disable"); + tableMapping.ColumnMappings.Add("bparam1", "bparam1"); + tableMapping.ColumnMappings.Add("iparam1", "iparam1"); + tableMapping.ColumnMappings.Add("import", "import"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; - this._adapter.DeleteCommand.CommandText = @"DELETE FROM [Items] WHERE (([idx] = @Original_idx) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_sid = 1 AND [sid] IS NULL) OR ([sid] = @Original_sid)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsNull_manu = 1 AND [manu] IS NULL) OR ([manu] = @Original_manu)) AND ((@IsNull_supply = 1 AND [supply] IS NULL) OR ([supply] = @Original_supply)) AND ((@IsNull_price = 1 AND [price] IS NULL) OR ([price] = @Original_price)) AND ((@IsNull_memo = 1 AND [memo] IS NULL) OR ([memo] = @Original_memo)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_supplyidx = 1 AND [supplyidx] IS NULL) OR ([supplyidx] = @Original_supplyidx)) AND ((@IsNull_scale = 1 AND [scale] IS NULL) OR ([scale] = @Original_scale)) AND ((@IsNull_unit = 1 AND [unit] IS NULL) OR ([unit] = @Original_unit)))"; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM [Items] WHERE (([idx] = @Original_idx) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_sid = 1 AND [sid] IS NULL) OR ([sid] = @Original_sid)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsNull_manu = 1 AND [manu] IS NULL) OR ([manu] = @Original_manu)) AND ((@IsNull_supply = 1 AND [supply] IS NULL) OR ([supply] = @Original_supply)) AND ((@IsNull_price = 1 AND [price] IS NULL) OR ([price] = @Original_price)) AND ((@IsNull_memo = 1 AND [memo] IS NULL) OR ([memo] = @Original_memo)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_supplyidx = 1 AND [supplyidx] IS NULL) OR ([supplyidx] = @Original_supplyidx)) AND ((@IsNull_scale = 1 AND [scale] IS NULL) OR ([scale] = @Original_scale)) AND ((@IsNull_unit = 1 AND [unit] IS NULL) OR ([unit] = @Original_unit)) AND ((@IsNull_disable = 1 AND [disable] IS NULL) OR ([disable] = @Original_disable)) AND ((@IsNull_bparam1 = 1 AND [bparam1] IS NULL) OR ([bparam1] = @Original_bparam1)) AND ((@IsNull_iparam1 = 1 AND [iparam1] IS NULL) OR ([iparam1] = @Original_iparam1)) AND ((@IsNull_import = 1 AND [import] IS NULL) OR ([import] = @Original_import)))"; this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idx", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); @@ -10220,10 +10410,18 @@ namespace FCM0000.dsMSSQLTableAdapters { this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_scale", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "scale", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_unit", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "unit", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_unit", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "unit", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_disable", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disable", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_disable", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disable", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_bparam1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "bparam1", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_bparam1", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "bparam1", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_iparam1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "iparam1", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_iparam1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "iparam1", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_import", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "import", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_import", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "import", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; - this._adapter.InsertCommand.CommandText = @"INSERT INTO [Items] ([name], [sid], [model], [manu], [supply], [price], [memo], [wuid], [wdate], [cate], [supplyidx], [scale], [unit]) VALUES (@name, @sid, @model, @manu, @supply, @price, @memo, @wuid, @wdate, @cate, @supplyidx, @scale, @unit); -SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit FROM Items WHERE (idx = SCOPE_IDENTITY()) ORDER BY cate, name, idx"; + this._adapter.InsertCommand.CommandText = @"INSERT INTO [Items] ([name], [sid], [model], [manu], [supply], [price], [memo], [wuid], [wdate], [cate], [supplyidx], [scale], [unit], [disable], [bparam1], [iparam1], [import]) VALUES (@name, @sid, @model, @manu, @supply, @price, @memo, @wuid, @wdate, @cate, @supplyidx, @scale, @unit, @disable, @bparam1, @iparam1, @import); +SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit, disable, bparam1, iparam1, import FROM Items WHERE (idx = SCOPE_IDENTITY()) ORDER BY cate, name, idx"; this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sid", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "sid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -10238,10 +10436,35 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@supplyidx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "supplyidx", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@scale", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "scale", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@unit", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "unit", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@disable", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disable", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@bparam1", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "bparam1", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@iparam1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "iparam1", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@import", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "import", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; - this._adapter.UpdateCommand.CommandText = @"UPDATE [Items] SET [name] = @name, [sid] = @sid, [model] = @model, [manu] = @manu, [supply] = @supply, [price] = @price, [memo] = @memo, [wuid] = @wuid, [wdate] = @wdate, [cate] = @cate, [supplyidx] = @supplyidx, [scale] = @scale, [unit] = @unit WHERE (([idx] = @Original_idx) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_sid = 1 AND [sid] IS NULL) OR ([sid] = @Original_sid)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsNull_manu = 1 AND [manu] IS NULL) OR ([manu] = @Original_manu)) AND ((@IsNull_supply = 1 AND [supply] IS NULL) OR ([supply] = @Original_supply)) AND ((@IsNull_price = 1 AND [price] IS NULL) OR ([price] = @Original_price)) AND ((@IsNull_memo = 1 AND [memo] IS NULL) OR ([memo] = @Original_memo)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_supplyidx = 1 AND [supplyidx] IS NULL) OR ([supplyidx] = @Original_supplyidx)) AND ((@IsNull_scale = 1 AND [scale] IS NULL) OR ([scale] = @Original_scale)) AND ((@IsNull_unit = 1 AND [unit] IS NULL) OR ([unit] = @Original_unit))); -SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit FROM Items WHERE (idx = @idx) ORDER BY cate, name, idx"; + this._adapter.UpdateCommand.CommandText = "UPDATE [Items] SET [name] = @name, [sid] = @sid, [model] = @model, [manu] = @manu" + + ", [supply] = @supply, [price] = @price, [memo] = @memo, [wuid] = @wuid, [wdate] " + + "= @wdate, [cate] = @cate, [supplyidx] = @supplyidx, [scale] = @scale, [unit] = @" + + "unit, [disable] = @disable, [bparam1] = @bparam1, [iparam1] = @iparam1, [import]" + + " = @import WHERE (([idx] = @Original_idx) AND ((@IsNull_name = 1 AND [name] IS N" + + "ULL) OR ([name] = @Original_name)) AND ((@IsNull_sid = 1 AND [sid] IS NULL) OR (" + + "[sid] = @Original_sid)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model]" + + " = @Original_model)) AND ((@IsNull_manu = 1 AND [manu] IS NULL) OR ([manu] = @Or" + + "iginal_manu)) AND ((@IsNull_supply = 1 AND [supply] IS NULL) OR ([supply] = @Ori" + + "ginal_supply)) AND ((@IsNull_price = 1 AND [price] IS NULL) OR ([price] = @Origi" + + "nal_price)) AND ((@IsNull_memo = 1 AND [memo] IS NULL) OR ([memo] = @Original_me" + + "mo)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate) AND ((@IsNull" + + "_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_supply" + + "idx = 1 AND [supplyidx] IS NULL) OR ([supplyidx] = @Original_supplyidx)) AND ((@" + + "IsNull_scale = 1 AND [scale] IS NULL) OR ([scale] = @Original_scale)) AND ((@IsN" + + "ull_unit = 1 AND [unit] IS NULL) OR ([unit] = @Original_unit)) AND ((@IsNull_dis" + + "able = 1 AND [disable] IS NULL) OR ([disable] = @Original_disable)) AND ((@IsNul" + + "l_bparam1 = 1 AND [bparam1] IS NULL) OR ([bparam1] = @Original_bparam1)) AND ((@" + + "IsNull_iparam1 = 1 AND [iparam1] IS NULL) OR ([iparam1] = @Original_iparam1)) AN" + + "D ((@IsNull_import = 1 AND [import] IS NULL) OR ([import] = @Original_import)));" + + "\r\nSELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, su" + + "pplyidx, scale, unit, disable, bparam1, iparam1, import FROM Items WHERE (idx = " + + "@idx) ORDER BY cate, name, idx"; this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sid", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "sid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); @@ -10256,6 +10479,10 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@supplyidx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "supplyidx", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@scale", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "scale", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@unit", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "unit", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@disable", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disable", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@bparam1", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "bparam1", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@iparam1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "iparam1", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@import", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "import", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_idx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "idx", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_name", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "name", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); @@ -10281,6 +10508,14 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_scale", global::System.Data.SqlDbType.Float, 0, global::System.Data.ParameterDirection.Input, 0, 0, "scale", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_unit", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "unit", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_unit", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "unit", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_disable", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disable", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_disable", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "disable", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_bparam1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "bparam1", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_bparam1", global::System.Data.SqlDbType.Bit, 0, global::System.Data.ParameterDirection.Input, 0, 0, "bparam1", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_iparam1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "iparam1", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_iparam1", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "iparam1", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_import", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "import", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_import", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "import", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idx", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idx", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } @@ -10294,50 +10529,42 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[5]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[6]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp" + - "lyidx, scale, unit\r\nFROM Items\r\nORDER BY cate, name, idx"; + "lyidx, scale, unit, disable, bparam1, iparam1, import\r\nFROM Items\r\nORDER BY " + + "cate, name, idx"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; - this._commandCollection[1].CommandText = @"SELECT cate, idx, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid -FROM Items -WHERE (sid IN - (SELECT sid - FROM Items AS Items_1 - GROUP BY sid - HAVING (COUNT(*) > 1))) AND (ISNULL(sid, '') <> '') AND (cate LIKE @cate) -ORDER BY sid, name, idx"; + this._commandCollection[1].CommandText = "DELETE FROM Items\r\nWHERE (import = @imptag)"; this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cate", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "cate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@imptag", global::System.Data.SqlDbType.Char, 1, global::System.Data.ParameterDirection.Input, 0, 0, "import", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; - this._commandCollection[2].CommandText = "SELECT cate, idx, manu, memo, model, name, price, scale, sid, supply, supplyidx," + - " unit, wdate, wuid\r\nFROM Items\r\nWHERE (cate LIKE @cate)\r\nORDER BY name, idx" + - ""; + this._commandCollection[2].CommandText = @"SELECT bparam1, cate, disable, idx, import, iparam1, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items WHERE (sid IN (SELECT sid FROM Items AS Items_1 GROUP BY sid HAVING (COUNT(*) > 1))) AND (ISNULL(sid, '') <> '') AND (cate LIKE @cate) ORDER BY sid, name, idx"; this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; this._commandCollection[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cate", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "cate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[3] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[3].Connection = this.Connection; - this._commandCollection[3].CommandText = @"SELECT cate, idx, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid -FROM Items -WHERE (ISNULL(name, N'') LIKE @search) OR - (ISNULL(sid, N'') LIKE @search) OR - (ISNULL(manu, N'') LIKE @search) OR - (ISNULL(supply, N'') LIKE @search) OR - (ISNULL(model, N'') LIKE @search) OR - (ISNULL(memo, N'') LIKE @search) -ORDER BY name, idx"; + this._commandCollection[3].CommandText = "SELECT bparam1, cate, disable, idx, import, iparam1, manu, memo, model, name, pri" + + "ce, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items WHERE (cate LIKE" + + " @cate) ORDER BY name, idx"; this._commandCollection[3].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@search", global::System.Data.SqlDbType.NVarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[3].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cate", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "cate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[4] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[4].Connection = this.Connection; - this._commandCollection[4].CommandText = "SELECT cate, idx, manu, memo, model, name, price, scale, sid, supply, supplyidx, " + - "unit, wdate, wuid FROM Items WHERE (idx = @idx)"; + this._commandCollection[4].CommandText = @"SELECT bparam1, cate, disable, idx, import, iparam1, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items WHERE (ISNULL(name, N'') LIKE @search) OR (ISNULL(sid, N'') LIKE @search) OR (ISNULL(manu, N'') LIKE @search) OR (ISNULL(supply, N'') LIKE @search) OR (ISNULL(model, N'') LIKE @search) OR (ISNULL(memo, N'') LIKE @search) ORDER BY name, idx"; this._commandCollection[4].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idx", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idx", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[4].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@search", global::System.Data.SqlDbType.NVarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[5] = new global::System.Data.SqlClient.SqlCommand(); + this._commandCollection[5].Connection = this.Connection; + this._commandCollection[5].CommandText = "SELECT bparam1, cate, disable, idx, import, iparam1, manu, memo, model, name, pri" + + "ce, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items WHERE (idx = @id" + + "x)"; + this._commandCollection[5].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[5].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idx", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idx", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -10369,7 +10596,7 @@ ORDER BY name, idx"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] public virtual int FillDupCheck(dsMSSQL.ItemsDataTable dataTable, string cate) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((cate == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -10388,7 +10615,7 @@ ORDER BY name, idx"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsMSSQL.ItemsDataTable GetDupCheck(string cate) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((cate == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -10405,7 +10632,7 @@ ORDER BY name, idx"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] public virtual int FillNoImage(dsMSSQL.ItemsDataTable dataTable, string cate) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((cate == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -10424,7 +10651,7 @@ ORDER BY name, idx"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsMSSQL.ItemsDataTable GetNoImage(string cate) { - this.Adapter.SelectCommand = this.CommandCollection[2]; + this.Adapter.SelectCommand = this.CommandCollection[3]; if ((cate == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -10441,7 +10668,7 @@ ORDER BY name, idx"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] public virtual int FillSearch(dsMSSQL.ItemsDataTable dataTable, string search) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((search == null)) { throw new global::System.ArgumentNullException("search"); } @@ -10460,7 +10687,7 @@ ORDER BY name, idx"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsMSSQL.ItemsDataTable GetSearch(string search) { - this.Adapter.SelectCommand = this.CommandCollection[3]; + this.Adapter.SelectCommand = this.CommandCollection[4]; if ((search == null)) { throw new global::System.ArgumentNullException("search"); } @@ -10477,7 +10704,7 @@ ORDER BY name, idx"; [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsMSSQL.ItemsDataTable GetIDX(int idx) { - this.Adapter.SelectCommand = this.CommandCollection[4]; + this.Adapter.SelectCommand = this.CommandCollection[5]; this.Adapter.SelectCommand.Parameters[0].Value = ((int)(idx)); dsMSSQL.ItemsDataTable dataTable = new dsMSSQL.ItemsDataTable(); this.Adapter.Fill(dataTable); @@ -10517,7 +10744,25 @@ ORDER BY name, idx"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)] - public virtual int Delete(int Original_idx, string Original_name, string Original_sid, string Original_model, string Original_manu, string Original_supply, global::System.Nullable Original_price, string Original_memo, string Original_wuid, System.DateTime Original_wdate, string Original_cate, global::System.Nullable Original_supplyidx, global::System.Nullable Original_scale, string Original_unit) { + public virtual int Delete( + int Original_idx, + string Original_name, + string Original_sid, + string Original_model, + string Original_manu, + string Original_supply, + global::System.Nullable Original_price, + string Original_memo, + string Original_wuid, + System.DateTime Original_wdate, + string Original_cate, + global::System.Nullable Original_supplyidx, + global::System.Nullable Original_scale, + string Original_unit, + global::System.Nullable Original_disable, + global::System.Nullable Original_bparam1, + global::System.Nullable Original_iparam1, + string Original_import) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idx)); if ((Original_name == null)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); @@ -10614,6 +10859,38 @@ ORDER BY name, idx"; this.Adapter.DeleteCommand.Parameters[23].Value = ((object)(0)); this.Adapter.DeleteCommand.Parameters[24].Value = ((string)(Original_unit)); } + if ((Original_disable.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[25].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[26].Value = ((bool)(Original_disable.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[25].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[26].Value = global::System.DBNull.Value; + } + if ((Original_bparam1.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[27].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[28].Value = ((bool)(Original_bparam1.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[27].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[28].Value = global::System.DBNull.Value; + } + if ((Original_iparam1.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[29].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[30].Value = ((int)(Original_iparam1.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[29].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[30].Value = global::System.DBNull.Value; + } + if ((Original_import == null)) { + this.Adapter.DeleteCommand.Parameters[31].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[32].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[31].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[32].Value = ((string)(Original_import)); + } global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -10634,7 +10911,24 @@ ORDER BY name, idx"; [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] - public virtual int Insert(string name, string sid, string model, string manu, string supply, global::System.Nullable price, string memo, string wuid, System.DateTime wdate, string cate, global::System.Nullable supplyidx, global::System.Nullable scale, string unit) { + public virtual int Insert( + string name, + string sid, + string model, + string manu, + string supply, + global::System.Nullable price, + string memo, + string wuid, + System.DateTime wdate, + string cate, + global::System.Nullable supplyidx, + global::System.Nullable scale, + string unit, + global::System.Nullable disable, + global::System.Nullable bparam1, + global::System.Nullable iparam1, + string import) { if ((name == null)) { this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -10708,6 +11002,30 @@ ORDER BY name, idx"; else { this.Adapter.InsertCommand.Parameters[12].Value = ((string)(unit)); } + if ((disable.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[13].Value = ((bool)(disable.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[13].Value = global::System.DBNull.Value; + } + if ((bparam1.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[14].Value = ((bool)(bparam1.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[14].Value = global::System.DBNull.Value; + } + if ((iparam1.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[15].Value = ((int)(iparam1.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[15].Value = global::System.DBNull.Value; + } + if ((import == null)) { + this.Adapter.InsertCommand.Parameters[16].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[16].Value = ((string)(import)); + } global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -10742,6 +11060,10 @@ ORDER BY name, idx"; global::System.Nullable supplyidx, global::System.Nullable scale, string unit, + global::System.Nullable disable, + global::System.Nullable bparam1, + global::System.Nullable iparam1, + string import, int Original_idx, string Original_name, string Original_sid, @@ -10756,6 +11078,10 @@ ORDER BY name, idx"; global::System.Nullable Original_supplyidx, global::System.Nullable Original_scale, string Original_unit, + global::System.Nullable Original_disable, + global::System.Nullable Original_bparam1, + global::System.Nullable Original_iparam1, + string Original_import, int idx) { if ((name == null)) { this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; @@ -10830,103 +11156,159 @@ ORDER BY name, idx"; else { this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(unit)); } - this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Original_idx)); - if ((Original_name == null)) { - this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); + if ((disable.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[13].Value = ((bool)(disable.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + } + if ((bparam1.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[14].Value = ((bool)(bparam1.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; + } + if ((iparam1.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(iparam1.Value)); + } + else { this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; } - else { - this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_name)); - } - if ((Original_sid == null)) { - this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; + if ((import == null)) { + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; } else { - this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_sid)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(import)); } - if ((Original_model == null)) { + this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_idx)); + if ((Original_name == null)) { this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_model)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_name)); } - if ((Original_manu == null)) { + if ((Original_sid == null)) { this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_manu)); + this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_sid)); } - if ((Original_supply == null)) { + if ((Original_model == null)) { this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[23].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Original_supply)); + this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Original_model)); } - if ((Original_price.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[25].Value = ((decimal)(Original_price.Value)); - } - else { + if ((Original_manu == null)) { this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[25].Value = global::System.DBNull.Value; } - if ((Original_memo == null)) { + else { + this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[25].Value = ((string)(Original_manu)); + } + if ((Original_supply == null)) { this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[27].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[27].Value = ((string)(Original_memo)); + this.Adapter.UpdateCommand.Parameters[27].Value = ((string)(Original_supply)); } - if ((Original_wuid == null)) { - throw new global::System.ArgumentNullException("Original_wuid"); + if ((Original_price.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[29].Value = ((decimal)(Original_price.Value)); } else { - this.Adapter.UpdateCommand.Parameters[28].Value = ((string)(Original_wuid)); + this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[29].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[29].Value = ((System.DateTime)(Original_wdate)); - if ((Original_cate == null)) { + if ((Original_memo == null)) { this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[31].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[31].Value = ((string)(Original_cate)); + this.Adapter.UpdateCommand.Parameters[31].Value = ((string)(Original_memo)); } - if ((Original_supplyidx.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[33].Value = ((int)(Original_supplyidx.Value)); + if ((Original_wuid == null)) { + throw new global::System.ArgumentNullException("Original_wuid"); } else { - this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[33].Value = global::System.DBNull.Value; + this.Adapter.UpdateCommand.Parameters[32].Value = ((string)(Original_wuid)); } - if ((Original_scale.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[35].Value = ((double)(Original_scale.Value)); - } - else { + this.Adapter.UpdateCommand.Parameters[33].Value = ((System.DateTime)(Original_wdate)); + if ((Original_cate == null)) { this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[35].Value = global::System.DBNull.Value; } - if ((Original_unit == null)) { + else { + this.Adapter.UpdateCommand.Parameters[34].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[35].Value = ((string)(Original_cate)); + } + if ((Original_supplyidx.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[37].Value = ((int)(Original_supplyidx.Value)); + } + else { this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[37].Value = global::System.DBNull.Value; } - else { - this.Adapter.UpdateCommand.Parameters[36].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[37].Value = ((string)(Original_unit)); + if ((Original_scale.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[38].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[39].Value = ((double)(Original_scale.Value)); } - this.Adapter.UpdateCommand.Parameters[38].Value = ((int)(idx)); + else { + this.Adapter.UpdateCommand.Parameters[38].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[39].Value = global::System.DBNull.Value; + } + if ((Original_unit == null)) { + this.Adapter.UpdateCommand.Parameters[40].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[41].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[40].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[41].Value = ((string)(Original_unit)); + } + if ((Original_disable.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[42].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[43].Value = ((bool)(Original_disable.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[42].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[43].Value = global::System.DBNull.Value; + } + if ((Original_bparam1.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[45].Value = ((bool)(Original_bparam1.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[44].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[45].Value = global::System.DBNull.Value; + } + if ((Original_iparam1.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[46].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[47].Value = ((int)(Original_iparam1.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[46].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[47].Value = global::System.DBNull.Value; + } + if ((Original_import == null)) { + this.Adapter.UpdateCommand.Parameters[48].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[49].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[48].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[49].Value = ((string)(Original_import)); + } + this.Adapter.UpdateCommand.Parameters[50].Value = ((int)(idx)); global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State; if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { @@ -10961,6 +11343,10 @@ ORDER BY name, idx"; global::System.Nullable supplyidx, global::System.Nullable scale, string unit, + global::System.Nullable disable, + global::System.Nullable bparam1, + global::System.Nullable iparam1, + string import, int Original_idx, string Original_name, string Original_sid, @@ -10974,8 +11360,41 @@ ORDER BY name, idx"; string Original_cate, global::System.Nullable Original_supplyidx, global::System.Nullable Original_scale, - string Original_unit) { - return this.Update(name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit, Original_idx, Original_name, Original_sid, Original_model, Original_manu, Original_supply, Original_price, Original_memo, Original_wuid, Original_wdate, Original_cate, Original_supplyidx, Original_scale, Original_unit, Original_idx); + string Original_unit, + global::System.Nullable Original_disable, + global::System.Nullable Original_bparam1, + global::System.Nullable Original_iparam1, + string Original_import) { + return this.Update(name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit, disable, bparam1, iparam1, import, Original_idx, Original_name, Original_sid, Original_model, Original_manu, Original_supply, Original_price, Original_memo, Original_wuid, Original_wdate, Original_cate, Original_supplyidx, Original_scale, Original_unit, Original_disable, Original_bparam1, Original_iparam1, Original_import, Original_idx); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, false)] + public virtual int DeleteImport(string imptag) { + global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((imptag == null)) { + command.Parameters[0].Value = global::System.DBNull.Value; + } + else { + command.Parameters[0].Value = ((string)(imptag)); + } + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + int returnValue; + try { + returnValue = command.ExecuteNonQuery(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + return returnValue; } } diff --git a/SubProject/FCM0000/dsMSSQL.xsd b/SubProject/FCM0000/dsMSSQL.xsd index 5a1bec8..157aed3 100644 --- a/SubProject/FCM0000/dsMSSQL.xsd +++ b/SubProject/FCM0000/dsMSSQL.xsd @@ -12,7 +12,7 @@ - DELETE FROM [Items] WHERE (([idx] = @Original_idx) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_sid = 1 AND [sid] IS NULL) OR ([sid] = @Original_sid)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsNull_manu = 1 AND [manu] IS NULL) OR ([manu] = @Original_manu)) AND ((@IsNull_supply = 1 AND [supply] IS NULL) OR ([supply] = @Original_supply)) AND ((@IsNull_price = 1 AND [price] IS NULL) OR ([price] = @Original_price)) AND ((@IsNull_memo = 1 AND [memo] IS NULL) OR ([memo] = @Original_memo)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_supplyidx = 1 AND [supplyidx] IS NULL) OR ([supplyidx] = @Original_supplyidx)) AND ((@IsNull_scale = 1 AND [scale] IS NULL) OR ([scale] = @Original_scale)) AND ((@IsNull_unit = 1 AND [unit] IS NULL) OR ([unit] = @Original_unit))) + DELETE FROM [Items] WHERE (([idx] = @Original_idx) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_sid = 1 AND [sid] IS NULL) OR ([sid] = @Original_sid)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsNull_manu = 1 AND [manu] IS NULL) OR ([manu] = @Original_manu)) AND ((@IsNull_supply = 1 AND [supply] IS NULL) OR ([supply] = @Original_supply)) AND ((@IsNull_price = 1 AND [price] IS NULL) OR ([price] = @Original_price)) AND ((@IsNull_memo = 1 AND [memo] IS NULL) OR ([memo] = @Original_memo)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_supplyidx = 1 AND [supplyidx] IS NULL) OR ([supplyidx] = @Original_supplyidx)) AND ((@IsNull_scale = 1 AND [scale] IS NULL) OR ([scale] = @Original_scale)) AND ((@IsNull_unit = 1 AND [unit] IS NULL) OR ([unit] = @Original_unit)) AND ((@IsNull_disable = 1 AND [disable] IS NULL) OR ([disable] = @Original_disable)) AND ((@IsNull_bparam1 = 1 AND [bparam1] IS NULL) OR ([bparam1] = @Original_bparam1)) AND ((@IsNull_iparam1 = 1 AND [iparam1] IS NULL) OR ([iparam1] = @Original_iparam1)) AND ((@IsNull_import = 1 AND [import] IS NULL) OR ([import] = @Original_import))) @@ -39,13 +39,21 @@ + + + + + + + + - INSERT INTO [Items] ([name], [sid], [model], [manu], [supply], [price], [memo], [wuid], [wdate], [cate], [supplyidx], [scale], [unit]) VALUES (@name, @sid, @model, @manu, @supply, @price, @memo, @wuid, @wdate, @cate, @supplyidx, @scale, @unit); -SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit FROM Items WHERE (idx = SCOPE_IDENTITY()) ORDER BY cate, name, idx + INSERT INTO [Items] ([name], [sid], [model], [manu], [supply], [price], [memo], [wuid], [wdate], [cate], [supplyidx], [scale], [unit], [disable], [bparam1], [iparam1], [import]) VALUES (@name, @sid, @model, @manu, @supply, @price, @memo, @wuid, @wdate, @cate, @supplyidx, @scale, @unit, @disable, @bparam1, @iparam1, @import); +SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit, disable, bparam1, iparam1, import FROM Items WHERE (idx = SCOPE_IDENTITY()) ORDER BY cate, name, idx @@ -60,12 +68,16 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp + + + + - SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit + SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit, disable, bparam1, iparam1, import FROM Items ORDER BY cate, name, idx @@ -73,8 +85,8 @@ ORDER BY cate, name, idx - UPDATE [Items] SET [name] = @name, [sid] = @sid, [model] = @model, [manu] = @manu, [supply] = @supply, [price] = @price, [memo] = @memo, [wuid] = @wuid, [wdate] = @wdate, [cate] = @cate, [supplyidx] = @supplyidx, [scale] = @scale, [unit] = @unit WHERE (([idx] = @Original_idx) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_sid = 1 AND [sid] IS NULL) OR ([sid] = @Original_sid)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsNull_manu = 1 AND [manu] IS NULL) OR ([manu] = @Original_manu)) AND ((@IsNull_supply = 1 AND [supply] IS NULL) OR ([supply] = @Original_supply)) AND ((@IsNull_price = 1 AND [price] IS NULL) OR ([price] = @Original_price)) AND ((@IsNull_memo = 1 AND [memo] IS NULL) OR ([memo] = @Original_memo)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_supplyidx = 1 AND [supplyidx] IS NULL) OR ([supplyidx] = @Original_supplyidx)) AND ((@IsNull_scale = 1 AND [scale] IS NULL) OR ([scale] = @Original_scale)) AND ((@IsNull_unit = 1 AND [unit] IS NULL) OR ([unit] = @Original_unit))); -SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit FROM Items WHERE (idx = @idx) ORDER BY cate, name, idx + UPDATE [Items] SET [name] = @name, [sid] = @sid, [model] = @model, [manu] = @manu, [supply] = @supply, [price] = @price, [memo] = @memo, [wuid] = @wuid, [wdate] = @wdate, [cate] = @cate, [supplyidx] = @supplyidx, [scale] = @scale, [unit] = @unit, [disable] = @disable, [bparam1] = @bparam1, [iparam1] = @iparam1, [import] = @import WHERE (([idx] = @Original_idx) AND ((@IsNull_name = 1 AND [name] IS NULL) OR ([name] = @Original_name)) AND ((@IsNull_sid = 1 AND [sid] IS NULL) OR ([sid] = @Original_sid)) AND ((@IsNull_model = 1 AND [model] IS NULL) OR ([model] = @Original_model)) AND ((@IsNull_manu = 1 AND [manu] IS NULL) OR ([manu] = @Original_manu)) AND ((@IsNull_supply = 1 AND [supply] IS NULL) OR ([supply] = @Original_supply)) AND ((@IsNull_price = 1 AND [price] IS NULL) OR ([price] = @Original_price)) AND ((@IsNull_memo = 1 AND [memo] IS NULL) OR ([memo] = @Original_memo)) AND ([wuid] = @Original_wuid) AND ([wdate] = @Original_wdate) AND ((@IsNull_cate = 1 AND [cate] IS NULL) OR ([cate] = @Original_cate)) AND ((@IsNull_supplyidx = 1 AND [supplyidx] IS NULL) OR ([supplyidx] = @Original_supplyidx)) AND ((@IsNull_scale = 1 AND [scale] IS NULL) OR ([scale] = @Original_scale)) AND ((@IsNull_unit = 1 AND [unit] IS NULL) OR ([unit] = @Original_unit)) AND ((@IsNull_disable = 1 AND [disable] IS NULL) OR ([disable] = @Original_disable)) AND ((@IsNull_bparam1 = 1 AND [bparam1] IS NULL) OR ([bparam1] = @Original_bparam1)) AND ((@IsNull_iparam1 = 1 AND [iparam1] IS NULL) OR ([iparam1] = @Original_iparam1)) AND ((@IsNull_import = 1 AND [import] IS NULL) OR ([import] = @Original_import))); +SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit, disable, bparam1, iparam1, import FROM Items WHERE (idx = @idx) ORDER BY cate, name, idx @@ -89,6 +101,10 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp + + + + @@ -114,6 +130,14 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp + + + + + + + + @@ -135,19 +159,27 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp + + + + + + + + DELETE FROM Items +WHERE (import = @imptag) + + + + + + - SELECT cate, idx, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid -FROM Items -WHERE (sid IN - (SELECT sid - FROM Items AS Items_1 - GROUP BY sid - HAVING (COUNT(*) > 1))) AND (ISNULL(sid, '') <> '') AND (cate LIKE @cate) -ORDER BY sid, name, idx + SELECT bparam1, cate, disable, idx, import, iparam1, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items WHERE (sid IN (SELECT sid FROM Items AS Items_1 GROUP BY sid HAVING (COUNT(*) > 1))) AND (ISNULL(sid, '') <> '') AND (cate LIKE @cate) ORDER BY sid, name, idx @@ -157,10 +189,7 @@ ORDER BY sid, name, idx - SELECT cate, idx, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid -FROM Items -WHERE (cate LIKE @cate) -ORDER BY name, idx + SELECT bparam1, cate, disable, idx, import, iparam1, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items WHERE (cate LIKE @cate) ORDER BY name, idx @@ -170,15 +199,7 @@ ORDER BY name, idx - SELECT cate, idx, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid -FROM Items -WHERE (ISNULL(name, N'') LIKE @search) OR - (ISNULL(sid, N'') LIKE @search) OR - (ISNULL(manu, N'') LIKE @search) OR - (ISNULL(supply, N'') LIKE @search) OR - (ISNULL(model, N'') LIKE @search) OR - (ISNULL(memo, N'') LIKE @search) -ORDER BY name, idx + SELECT bparam1, cate, disable, idx, import, iparam1, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items WHERE (ISNULL(name, N'') LIKE @search) OR (ISNULL(sid, N'') LIKE @search) OR (ISNULL(manu, N'') LIKE @search) OR (ISNULL(supply, N'') LIKE @search) OR (ISNULL(model, N'') LIKE @search) OR (ISNULL(memo, N'') LIKE @search) ORDER BY name, idx @@ -188,7 +209,7 @@ ORDER BY name, idx - SELECT cate, idx, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items WHERE (idx = @idx) + SELECT bparam1, cate, disable, idx, import, iparam1, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items WHERE (idx = @idx) @@ -1584,14 +1605,14 @@ WHERE (supplyidx = @idx) - + - + @@ -1605,7 +1626,7 @@ WHERE (supplyidx = @idx) - + @@ -1642,7 +1663,7 @@ WHERE (supplyidx = @idx) - + @@ -1655,10 +1676,20 @@ WHERE (supplyidx = @idx) + + + + + + + + + + - + @@ -1728,7 +1759,7 @@ WHERE (supplyidx = @idx) - + @@ -1799,7 +1830,7 @@ WHERE (supplyidx = @idx) - + @@ -1844,7 +1875,7 @@ WHERE (supplyidx = @idx) - + @@ -1911,7 +1942,7 @@ WHERE (supplyidx = @idx) - + @@ -1972,7 +2003,7 @@ WHERE (supplyidx = @idx) - + @@ -2036,7 +2067,7 @@ WHERE (supplyidx = @idx) - + @@ -2125,7 +2156,7 @@ WHERE (supplyidx = @idx) - + @@ -2231,7 +2262,7 @@ WHERE (supplyidx = @idx) - + @@ -2289,7 +2320,7 @@ WHERE (supplyidx = @idx) - + diff --git a/SubProject/FCM0000/fMaterial_Import.Designer.cs b/SubProject/FCM0000/fMaterial_Import.Designer.cs new file mode 100644 index 0000000..6f84fc5 --- /dev/null +++ b/SubProject/FCM0000/fMaterial_Import.Designer.cs @@ -0,0 +1,539 @@ +namespace FCM0000 +{ + partial class fMaterial_Import + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fMaterial_Import)); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.linkLabel1 = new System.Windows.Forms.LinkLabel(); + this.button1 = new System.Windows.Forms.Button(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.button3 = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); + this.label6 = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); + this.nudCE = new System.Windows.Forms.NumericUpDown(); + this.nudCS = new System.Windows.Forms.NumericUpDown(); + this.label5 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.nudE = new System.Windows.Forms.NumericUpDown(); + this.nudS = new System.Windows.Forms.NumericUpDown(); + this.label2 = new System.Windows.Forms.Label(); + this.numericUpDown1 = new System.Windows.Forms.NumericUpDown(); + this.label1 = new System.Windows.Forms.Label(); + this.bn = new System.Windows.Forms.BindingNavigator(this.components); + this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel(); + this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator(); + this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox(); + this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.progressBar1 = new System.Windows.Forms.ToolStripProgressBar(); + this.bs = new System.Windows.Forms.BindingSource(this.components); + this.dsMSSQL = new FCM0000.dsMSSQL(); + this.ta = new FCM0000.dsMSSQLTableAdapters.ItemsTableAdapter(); + this.textBox2 = new System.Windows.Forms.TextBox(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudCE)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudCS)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudE)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudS)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit(); + this.bn.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).BeginInit(); + this.SuspendLayout(); + // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(42, 9); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(170, 21); + this.textBox1.TabIndex = 1; + // + // linkLabel1 + // + this.linkLabel1.AutoSize = true; + this.linkLabel1.Location = new System.Drawing.Point(12, 13); + this.linkLabel1.Name = "linkLabel1"; + this.linkLabel1.Size = new System.Drawing.Size(25, 12); + this.linkLabel1.TabIndex = 0; + this.linkLabel1.TabStop = true; + this.linkLabel1.Text = "File"; + this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked); + // + // button1 + // + this.button1.Location = new System.Drawing.Point(525, 8); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(102, 21); + this.button1.TabIndex = 4; + this.button1.Text = "1.View"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // dataGridView1 + // + this.dataGridView1.AllowUserToAddRows = false; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataGridView1.Location = new System.Drawing.Point(0, 97); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.RowTemplate.Height = 23; + this.dataGridView1.Size = new System.Drawing.Size(906, 535); + this.dataGridView1.TabIndex = 1; + // + // button3 + // + this.button3.Location = new System.Drawing.Point(525, 35); + this.button3.Name = "button3"; + this.button3.Size = new System.Drawing.Size(102, 21); + this.button3.TabIndex = 6; + this.button3.Text = "2.Save"; + this.button3.UseVisualStyleBackColor = true; + this.button3.Click += new System.EventHandler(this.button3_Click); + // + // panel1 + // + this.panel1.Controls.Add(this.textBox2); + this.panel1.Controls.Add(this.checkBox1); + this.panel1.Controls.Add(this.numericUpDown2); + this.panel1.Controls.Add(this.label6); + this.panel1.Controls.Add(this.label4); + this.panel1.Controls.Add(this.nudCE); + this.panel1.Controls.Add(this.nudCS); + this.panel1.Controls.Add(this.label5); + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.nudE); + this.panel1.Controls.Add(this.nudS); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.numericUpDown1); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.button3); + this.panel1.Controls.Add(this.textBox1); + this.panel1.Controls.Add(this.linkLabel1); + this.panel1.Controls.Add(this.button1); + 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(906, 97); + this.panel1.TabIndex = 0; + this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Location = new System.Drawing.Point(474, 66); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(127, 16); + this.checkBox1.TabIndex = 19; + this.checkBox1.Text = "Auto Delete Import"; + this.checkBox1.UseVisualStyleBackColor = true; + // + // numericUpDown2 + // + this.numericUpDown2.Location = new System.Drawing.Point(406, 63); + this.numericUpDown2.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.numericUpDown2.Name = "numericUpDown2"; + this.numericUpDown2.Size = new System.Drawing.Size(45, 21); + this.numericUpDown2.TabIndex = 18; + this.numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numericUpDown2.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(312, 67); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(87, 12); + this.label6.TabIndex = 17; + this.label6.Text = "Column Name"; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(455, 13); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(14, 12); + this.label4.TabIndex = 14; + this.label4.Text = "~"; + // + // nudCE + // + this.nudCE.Location = new System.Drawing.Point(474, 9); + this.nudCE.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.nudCE.Name = "nudCE"; + this.nudCE.Size = new System.Drawing.Size(45, 21); + this.nudCE.TabIndex = 13; + this.nudCE.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.nudCE.Value = new decimal(new int[] { + 25, + 0, + 0, + 0}); + // + // nudCS + // + this.nudCS.Location = new System.Drawing.Point(406, 9); + this.nudCS.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.nudCS.Name = "nudCS"; + this.nudCS.Size = new System.Drawing.Size(45, 21); + this.nudCS.TabIndex = 12; + this.nudCS.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.nudCS.Value = new decimal(new int[] { + 1, + 0, + 0, + 0}); + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(335, 13); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(64, 12); + this.label5.TabIndex = 11; + this.label5.Text = "Col Range"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(455, 40); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(14, 12); + this.label3.TabIndex = 10; + this.label3.Text = "~"; + // + // nudE + // + this.nudE.Location = new System.Drawing.Point(474, 36); + this.nudE.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.nudE.Name = "nudE"; + this.nudE.Size = new System.Drawing.Size(45, 21); + this.nudE.TabIndex = 9; + this.nudE.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.nudE.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); + // + // nudS + // + this.nudS.Location = new System.Drawing.Point(406, 36); + this.nudS.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.nudS.Name = "nudS"; + this.nudS.Size = new System.Drawing.Size(45, 21); + this.nudS.TabIndex = 8; + this.nudS.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.nudS.Value = new decimal(new int[] { + 2, + 0, + 0, + 0}); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(329, 40); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(70, 12); + this.label2.TabIndex = 7; + this.label2.Text = "Row Range"; + // + // numericUpDown1 + // + this.numericUpDown1.Location = new System.Drawing.Point(261, 9); + this.numericUpDown1.Maximum = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.numericUpDown1.Name = "numericUpDown1"; + this.numericUpDown1.Size = new System.Drawing.Size(45, 21); + this.numericUpDown1.TabIndex = 3; + this.numericUpDown1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(218, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(37, 12); + this.label1.TabIndex = 2; + this.label1.Text = "Sheet"; + // + // bn + // + this.bn.AddNewItem = this.bindingNavigatorAddNewItem; + this.bn.BindingSource = this.bs; + this.bn.CountItem = this.bindingNavigatorCountItem; + this.bn.DeleteItem = this.bindingNavigatorDeleteItem; + this.bn.Dock = System.Windows.Forms.DockStyle.Bottom; + this.bn.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.bindingNavigatorMoveFirstItem, + this.bindingNavigatorMovePreviousItem, + this.bindingNavigatorSeparator, + this.bindingNavigatorPositionItem, + this.bindingNavigatorCountItem, + this.bindingNavigatorSeparator1, + this.bindingNavigatorMoveNextItem, + this.bindingNavigatorMoveLastItem, + this.bindingNavigatorSeparator2, + this.bindingNavigatorAddNewItem, + this.bindingNavigatorDeleteItem, + this.progressBar1}); + this.bn.Location = new System.Drawing.Point(0, 632); + this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem; + this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem; + this.bn.MoveNextItem = this.bindingNavigatorMoveNextItem; + this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem; + this.bn.Name = "bn"; + this.bn.PositionItem = this.bindingNavigatorPositionItem; + this.bn.Size = new System.Drawing.Size(906, 25); + this.bn.TabIndex = 2; + this.bn.Text = "bindingNavigator1"; + // + // bindingNavigatorAddNewItem + // + this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image"))); + this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem"; + this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorAddNewItem.Text = "새로 추가"; + // + // bindingNavigatorCountItem + // + this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; + this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22); + this.bindingNavigatorCountItem.Text = "/{0}"; + this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수"; + // + // bindingNavigatorDeleteItem + // + this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image"))); + this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem"; + this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorDeleteItem.Text = "삭제"; + // + // bindingNavigatorMoveFirstItem + // + this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image"))); + this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem"; + this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorMoveFirstItem.Text = "처음으로 이동"; + // + // bindingNavigatorMovePreviousItem + // + this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image"))); + this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem"; + this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorMovePreviousItem.Text = "이전으로 이동"; + // + // bindingNavigatorSeparator + // + this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator"; + this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25); + // + // bindingNavigatorPositionItem + // + this.bindingNavigatorPositionItem.AccessibleName = "위치"; + this.bindingNavigatorPositionItem.AutoSize = false; + this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem"; + this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23); + this.bindingNavigatorPositionItem.Text = "0"; + this.bindingNavigatorPositionItem.ToolTipText = "현재 위치"; + // + // bindingNavigatorSeparator1 + // + this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1"; + this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25); + // + // bindingNavigatorMoveNextItem + // + this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image"))); + this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem"; + this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorMoveNextItem.Text = "다음으로 이동"; + // + // bindingNavigatorMoveLastItem + // + this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image"))); + this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem"; + this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorMoveLastItem.Text = "마지막으로 이동"; + // + // bindingNavigatorSeparator2 + // + this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2"; + this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25); + // + // progressBar1 + // + this.progressBar1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(200, 22); + // + // bs + // + this.bs.DataMember = "Items"; + this.bs.DataSource = this.dsMSSQL; + // + // dsMSSQL + // + this.dsMSSQL.DataSetName = "dsMSSQL"; + this.dsMSSQL.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; + // + // ta + // + this.ta.ClearBeforeFill = true; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(646, 13); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(170, 21); + this.textBox2.TabIndex = 20; + this.textBox2.Text = "D"; + // + // fMaterial_Import + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(906, 657); + this.Controls.Add(this.dataGridView1); + this.Controls.Add(this.bn); + this.Controls.Add(this.panel1); + this.Name = "fMaterial_Import"; + this.Text = "Material Import"; + this.Load += new System.EventHandler(this.@__Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudCE)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudCS)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudE)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.nudS)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bn)).EndInit(); + this.bn.ResumeLayout(false); + this.bn.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.LinkLabel linkLabel1; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.Button button3; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.BindingNavigator bn; + private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem; + private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem; + private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem; + private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem; + private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem; + private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator; + private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem; + private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1; + private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem; + private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem; + private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2; + private System.Windows.Forms.ToolStripProgressBar progressBar1; + private System.Windows.Forms.BindingSource bs; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.NumericUpDown numericUpDown1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.NumericUpDown nudE; + private System.Windows.Forms.NumericUpDown nudS; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.NumericUpDown nudCE; + private System.Windows.Forms.NumericUpDown nudCS; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.NumericUpDown numericUpDown2; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.CheckBox checkBox1; + private dsMSSQL dsMSSQL; + private dsMSSQLTableAdapters.ItemsTableAdapter ta; + private System.Windows.Forms.TextBox textBox2; + } +} \ No newline at end of file diff --git a/SubProject/FCM0000/fMaterial_Import.cs b/SubProject/FCM0000/fMaterial_Import.cs new file mode 100644 index 0000000..9815086 --- /dev/null +++ b/SubProject/FCM0000/fMaterial_Import.cs @@ -0,0 +1,242 @@ +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; + +namespace FCM0000 +{ + public partial class fMaterial_Import : Form + { + DataTable dt = new dsMSSQL.ItemsDataTable();// dsPurchase.PurchaseDataTable(); + DataTable dtExcel = new DataTable(); + public fMaterial_Import() + { + InitializeComponent(); + this.FormClosed += __Closed; + } + + private void __Load(object sender, EventArgs e) + { + // TODO: 이 코드는 데이터를 'dsMSSQL.Items' 테이블에 로드합니다. 필요한 경우 이 코드를 이동하거나 제거할 수 있습니다. + //this.ta.Fill(this.dsMSSQL.Items); + + } + + void __Closed(object sender, FormClosedEventArgs e) + { + + } + + private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) + { + OpenFileDialog od = new OpenFileDialog(); + od.Filter = "excel|*.xlsx|all files|*.*"; + od.InitialDirectory = FCOMMON.Util.CurrentPath + "model"; + od.FilterIndex = 1; + od.RestoreDirectory = true; + if (od.ShowDialog() != System.Windows.Forms.DialogResult.OK) return; + textBox1.Text = od.FileName; + } + + private void button1_Click(object sender, EventArgs e) + { + int ColumnNameNo = (int)numericUpDown2.Value; + if(textBox1.Text.isEmpty()) + { + FCOMMON.Util.MsgE("파일을 선택하세요"); + textBox1.Focus(); + return; + } + if(!System.IO.File.Exists(textBox1.Text)) + { + FCOMMON.Util.MsgE("입력하신 파일이 존재하지 않습니다."); + textBox1.Focus(); + textBox1.SelectAll(); + return; + } + + dtExcel.Columns.Clear(); + dtExcel.Rows.Clear(); + dtExcel.AcceptChanges(); + + dtExcel.Columns.Add("SID"); + dtExcel.Columns.Add("Cate"); + dtExcel.Columns.Add("Name"); + dtExcel.Columns.Add("Model"); + dtExcel.Columns.Add("Memo"); + dtExcel.Columns.Add("Delete"); + dtExcel.Columns.Add("Name0"); + dtExcel.Columns.Add("Name1"); + dtExcel.Columns.Add("Name2"); + + libxl.Book book;// = new libxl.BinBook(); + book = new libxl.XmlBook(); + book.setKey(FCOMMON.info.libxlCompany, FCOMMON.info.libxlKey); + try + { + book.load(textBox1.Text); + }catch (Exception ex) + { + FCOMMON.Util.MsgE(ex.Message); + return; + } + + int sheetNum = (int)numericUpDown1.Value; + if (sheetNum >= book.sheetCount()) + { + FCOMMON.Util.MsgE("입력한 시트 번호는 존재하지 않습니다."); + book = null; + return; + } + var sheet = book.getSheet(sheetNum); + var MaxRow = sheet.lastRow(); + var MinRow = sheet.firstRow(); + + MaxRow = (int)Math.Min(MaxRow, nudE.Value-1); + MinRow = (int)Math.Max(MinRow, nudS.Value-1); + if(MinRow <= (ColumnNameNo-1)) + { + FCOMMON.Util.MsgI("시작줄을 제목줄 보다 커야 합니다. 자동으로 +1 증가합니다."); + MinRow = ColumnNameNo ; + } + + + var MaxCol = sheet.lastCol(); + var MinCol = sheet.firstCol(); + + MaxCol = (int)Math.Min(MaxCol, nudCE.Value - 1); + MinCol = (int)Math.Max(MinCol, nudCS.Value - 1); + + //제목줄을 처리한다. 181029 + List cols = new List(); + + + + try{ + for (int r = MinRow; r <= MaxRow; r++) + { + + var v_sid = sheet.readStr(r, 0); + var v_cate = sheet.readStr(r, 4); + var v_memo = sheet.readStr(r, 23); + var v_model = sheet.readStr(r, 22); + var v_name0 = sheet.readStr(r, 21); + var v_name1 = sheet.readStr(r, 2); + var v_name2 = sheet.readStr(r, 1); + var v_del = sheet.readStr(r, 8); + var v_name = v_name0; + if (v_name == "") v_name = v_name1; + if (v_name == "") v_name = v_name2; + if (v_name.Trim() == "") continue; //품명과 sid 없는 건 제외 + if (v_sid.Trim() == "") continue; + + DataRow dr = dtExcel.NewRow(); + dr["sid"] = v_sid; + dr["cate"] = v_cate; + dr["memo"] = v_memo; + dr["model"] = v_model; + dr["name"] = v_name; + dr["name0"] = v_name0; + dr["name1"] = v_name1; + dr["name2"] = v_name2; + dr["delete"] = v_del; + if (dr != null) + { + dtExcel.Rows.Add(dr); + } + } + dtExcel.AcceptChanges(); + } + catch(Exception ex) + { + FCOMMON.Util.MsgE("불러오는 중 오류 발생\n" + ex.Message); + } + // + book = null; + + this.bs.DataSource = dtExcel; + this.dataGridView1.DataSource = dtExcel; + this.bn.BindingSource = this.bs; + + if(this.bs.Count < 1) + { + FCOMMON.Util.MsgE("입력된 자료가 없습니다.\n\n지정된 엑셀의 1번째 칸에 값이 없다면 입력되지 않습니다."); + } + } + + + private void button3_Click(object sender, EventArgs e) + { + if(dtExcel == null || dtExcel.Rows.Count < 1) + { + FCOMMON.Util.MsgE("등록 가능한 자료가 없습니다."); + return; + } + + System.Text.StringBuilder sb = new StringBuilder(); + sb.AppendLine("다음 자료를 추가하시겠습니까?"); + sb.AppendLine(); + sb.AppendLine("'저장 완료' 메세지가 나올때 까지 기다려 주세요."); + sb.AppendLine(); + sb.AppendLine("실행 하려면 '예' 를 누르세요"); + var dlg = FCOMMON.Util.MsgQ(sb.ToString()); + if (dlg != System.Windows.Forms.DialogResult.Yes) return; + + + dt.Clear(); + dt.AcceptChanges(); + + this.progressBar1.Value = 0; + this.progressBar1.Maximum = dtExcel.Rows.Count; + if (checkBox1.Checked) ta.DeleteImport(textBox2.Text); + int cnt = 0; + //12,13 + foreach (DataRow dr in dtExcel.Rows) + { + cnt += 1; + if(cnt % 1000 == 0) + { + + ta.Update((dsMSSQL.ItemsDataTable)dt); + dt.AcceptChanges(); + Application.DoEvents(); + } + this.progressBar1.Value += 1; + + //데이터추가 + var newdr = dt.NewRow() as dsMSSQL.ItemsRow; + if (dr[0] == DBNull.Value) continue; //nullerror + if (dr[2].ToString().Length > 180) continue; //너무긴것도 뺸다. + + newdr.sid = dr[0].ToString(); + newdr.cate = dr[1].ToString(); + newdr.name = dr[2].ToString(); + newdr.model = dr[3].ToString(); + newdr.memo = dr[4].ToString(); + if(dr[5].ToString() == "X") newdr.disable=true; + else newdr.disable =false; + newdr.wuid = "DEV"; + newdr.wdate =DateTime.Now; + newdr.unit = "--"; + newdr.import = textBox2.Text; + dt.Rows.Add(newdr); + } + + + ta.Update((dsMSSQL.ItemsDataTable)dt); + dt.AcceptChanges(); + + FCOMMON.Util.MsgI("Save OK"); + } + + private void panel1_Paint(object sender, PaintEventArgs e) + { + + } + + } +} diff --git a/SubProject/FCM0000/fMaterial_Import.resx b/SubProject/FCM0000/fMaterial_Import.resx new file mode 100644 index 0000000..efaf8fb --- /dev/null +++ b/SubProject/FCM0000/fMaterial_Import.resx @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAUpJREFUOE9jGLzg7gL2/7fmcf6/Oofr/8UZvP+hwsSD60CNfx41/v/zsOH/yckC + pBtwfjov3ICDPSKkG3B8kiBQc93/Pw+q/u9oFydswKWZPP/PTuX7fxKo8Ui/0P993SJAzeX//94r+r++ + Qeb/qhq5/0srFf/PL1X+P6tIFdPAU0B//nlYD9RUC8SV///cKwHivP9/72b+/3sn+f/f23H//92MAOKQ + /5NyNDENONQrDHbu3/ulQI0FQI3ZQI2pQI0J///digZqDPv/70bQ/3/X/f53peliGrCzXeL/lmap/+vA + zpX/v6RC8f/fWzFAjeH/p+Zp/J+QpfW/O0P3f3uq/v/mREPCYTIb6E+Qc//dCPjfk6FDWAM6APnz3w1/ + IPb735qsT7oB3em6YP+CcH2cEekGtCQZ/G+IN/xfE2v8vzLahHQD6AQYGAAkI9iedfyIaQAAAABJRU5E + rkJggg== + + + + 83, 17 + + + 147, 17 + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAW9JREFUOE+1kE0ow2Ecx3dV3krt4oJaOSCTvIRkMqSxyITIzCQHDouEdnFwIOVC + DrhIDiQl5UTiNG/z2ppafy1S2gX/uDwfY6i1v7Hie3nqeb7fz+/7/FR/Ilwn0G0Exw4fV5GJlXlEZxXC + rIet9bAQvB5Ymgn2sLYAvSZEux7RUQFzE4qQt4bCXAYjPaHvnDoCkLpsRGMB2JqCTGLIijDlwqQ9bEMV + i9OIytR3EMNWcJ/BWH8A6j8/bOGFxwXNxYEvGbMQ9XnQ1/K78KfY3/VXzkMY0qFGG2H4RoLGQshJQNbG + 86CNhdrsX9a/uQZTPhQl4rMY4OLofbl3aX7I8uwPC7y/g1YdjyVJuEvT8e1tfwUYteHUxCCfHChDeHmG + QQvokjlOU+PbWA0x3pZnILVVI3uvQyHsbiLnqnGmRCF1NYD8pDhpRxOH7HQoAKZGkFKjceszQbpSrumX + bO+G80MFwKUTxgfgcO/b8D9IpXoFiiMDHIQm0skAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAASpJREFUOE9jGDygcNbz/00Lnv/PnPj4P1QIA4S3P8Apx5A789n/VUfe/8elKL77 + wf/ghmu4DciY8vT/wn0fsCqK73n4f+n+///9qy/gNiCh58n/aVveYyiKaL8P1pw56/9/r9ITuA2I7Hr0 + v3f1BxRFoa33wJpb1wFt7/z73yX/AG4DApsf/q+b/w6uKLjl7v9Fe///7wBqzpjz879d3c//9hnbcRvg + UXX/f/60NyiK7Ipv/0+f8/u/f9e3/zqF7/5bJKzHbYB96d3/2ZNfYyjSTzn/36ToxX+VrE//jSOX4TbA + Iu/O/9T+11gVGSSd+C+b9vW/bvA83AYYZt3+H9byEqci/dTL/zV8p+E2QCftxn+/6od4Fal4TMBtgFPu + lf8gBXgVDULAwAAA8HbAq6XlmnAAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAALZJREFUOE9jGDogvP3BfyiTdBDf/eB/cMM18gyI73n4f+n+///9qy+QbkBE+32w + 5sxZ//97lZ4gzYDQ1ntgza3rgLZ3/v3vkn+AeAOCW+7+X7T3//8OoOaMOT//29X9/G+fsZ00F9gV3/6f + Puf3f/+ub/91Ct/9t0hYT3oY6Kec/29S9OK/Stan/8aRy0g3AAQMkk78l037+l83eB55BoCAfurl/xq+ + 08g3AARUPCZQZsBgBQwMANAUYJgEulBVAAAAAElFTkSuQmCC + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAKNJREFUOE9jGHygcNbz/1AmeSB35rP/Cd33yDckY8rT//P2//6f0HWHPEMSep78 + n73v1//OrX//u5VeJt2QyK5H/6ds+/W/ZOnf/wnT//63yT1LmiGBzQ//t659D9ZsXPLlv3T0tf/GkcuI + N8Sj6v7/krnv4JoVXXpIc4F96d3/gS3PyNMMAhZ5d/7bFFwhTzMIGGbdJl8zCOik3SBf81AEDAwAoH5f + oAc0QjgAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAASxJREFUOE9jGFygcNbz/1AmBgDJNS14/j9z4mOcahhyZz77n9B9D6sCkNyqI+// + h7c/wG1AxpSn/+ft//0/oesOhiKQ3MJ9H/4HN1zDbUBCz5P/s/f9+t+59e9/t9LLKApBctO2vP/vX30B + twGRXY/+T9n263/J0r//E6b//W+TexauGCTXu/rDf6/SE7gNCGx++L917XuwZuOSL/+lo6/9N45cBtYA + kqub/+6/S/4B3AZ4VN3/XzL3HVyzoksPXDFILn/am//2GdtxG2Bfevd/YMszDM0gAJLLnvz6v0XCetwG + WOTd+W9TcAVDMwiA5FL7X8O9hBUYZt3GqhkEQHJhLS//6wbPw22ATtoNnJIgOb/qh/81fKfhNgAfcMq9 + 8l/FYwIYQ4UGBWBgAAC+0b+zuQxOnAAAAABJRU5ErkJggg== + + + + 252, 17 + + \ No newline at end of file diff --git a/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs b/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs index 038c463..70a845c 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs +++ b/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs @@ -661,8 +661,8 @@ this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 15).Value = "*"; this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 16).Value = "관련프로젝트"; this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 17).Value = "*"; - this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 18).Value = "적용장비"; - this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 19).Value = "적용위치"; + this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 18).Value = "모델\r\n공정"; + this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 19).Value = "장비\r\n제조사"; this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 20).Value = "입고예정"; this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 21).Value = "입고일"; this.fpSpread1_Sheet1.ColumnHeader.Cells.Get(0, 22).Value = "PO#"; @@ -802,14 +802,14 @@ this.fpSpread1_Sheet1.Columns.Get(18).CellType = textCellType13; this.fpSpread1_Sheet1.Columns.Get(18).DataField = "asset"; this.fpSpread1_Sheet1.Columns.Get(18).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; - this.fpSpread1_Sheet1.Columns.Get(18).Label = "적용장비"; + this.fpSpread1_Sheet1.Columns.Get(18).Label = "모델\r\n공정"; this.fpSpread1_Sheet1.Columns.Get(18).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; this.fpSpread1_Sheet1.Columns.Get(18).Width = 35F; this.fpSpread1_Sheet1.Columns.Get(19).DataField = "dept"; this.fpSpread1_Sheet1.Columns.Get(19).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; - this.fpSpread1_Sheet1.Columns.Get(19).Label = "적용위치"; + this.fpSpread1_Sheet1.Columns.Get(19).Label = "장비\r\n제조사"; this.fpSpread1_Sheet1.Columns.Get(19).VerticalAlignment = FarPoint.Win.Spread.CellVerticalAlignment.Center; - this.fpSpread1_Sheet1.Columns.Get(19).Width = 34F; + this.fpSpread1_Sheet1.Columns.Get(19).Width = 49F; this.fpSpread1_Sheet1.Columns.Get(20).CellType = textCellType14; this.fpSpread1_Sheet1.Columns.Get(20).DataField = "edate"; this.fpSpread1_Sheet1.Columns.Get(20).HorizontalAlignment = FarPoint.Win.Spread.CellHorizontalAlignment.Center; diff --git a/SubProject/FEQ0000/Purchase/fPurchase_Add.Designer.cs b/SubProject/FEQ0000/Purchase/fPurchase_Add.Designer.cs index dfb90e4..63ecd93 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase_Add.Designer.cs +++ b/SubProject/FEQ0000/Purchase/fPurchase_Add.Designer.cs @@ -77,6 +77,8 @@ this.groupBox1 = new System.Windows.Forms.GroupBox(); this.linkLabel1 = new System.Windows.Forms.LinkLabel(); this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.tbAsset = new System.Windows.Forms.ComboBox(); + this.tbDept = new System.Windows.Forms.ComboBox(); this.linkLabel4 = new System.Windows.Forms.LinkLabel(); this.linkLabel3 = new System.Windows.Forms.LinkLabel(); this.linkLabel2 = new System.Windows.Forms.LinkLabel(); @@ -84,8 +86,6 @@ this.dsPurchase = new FEQ0000.dsPurchase(); this.purchaseBindingSource = new System.Windows.Forms.BindingSource(this.components); this.purchaseTableAdapter = new FEQ0000.dsPurchaseTableAdapters.PurchaseTableAdapter(); - this.tbDept = new System.Windows.Forms.ComboBox(); - this.tbAsset = new System.Windows.Forms.ComboBox(); processLabel = new System.Windows.Forms.Label(); receiveLabel = new System.Windows.Forms.Label(); scLabel = new System.Windows.Forms.Label(); @@ -223,12 +223,12 @@ // assetLabel // assetLabel.AutoSize = true; - assetLabel.Location = new System.Drawing.Point(27, 194); + assetLabel.Location = new System.Drawing.Point(24, 194); assetLabel.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); assetLabel.Name = "assetLabel"; - assetLabel.Size = new System.Drawing.Size(69, 20); + assetLabel.Size = new System.Drawing.Size(72, 20); assetLabel.TabIndex = 10; - assetLabel.Text = "적용장비"; + assetLabel.Text = "모델,공정"; // // poLabel // @@ -270,6 +270,16 @@ stateLabel.TabIndex = 0; stateLabel.Text = "구매상태"; // + // label2 + // + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(12, 228); + label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(84, 20); + label2.TabIndex = 12; + label2.Text = "장비제조사"; + // // tbSC // this.tbSC.Location = new System.Drawing.Point(104, 125); @@ -648,6 +658,32 @@ this.groupBox2.TabStop = false; this.groupBox2.Text = "추가정보"; // + // tbAsset + // + this.tbAsset.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + this.tbAsset.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.tbAsset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.tbAsset.FormattingEnabled = true; + this.tbAsset.ImeMode = System.Windows.Forms.ImeMode.Hangul; + this.tbAsset.Location = new System.Drawing.Point(104, 191); + this.tbAsset.Margin = new System.Windows.Forms.Padding(4); + this.tbAsset.Name = "tbAsset"; + this.tbAsset.Size = new System.Drawing.Size(286, 28); + this.tbAsset.TabIndex = 11; + // + // tbDept + // + this.tbDept.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; + this.tbDept.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; + this.tbDept.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.tbDept.FormattingEnabled = true; + this.tbDept.ImeMode = System.Windows.Forms.ImeMode.Hangul; + this.tbDept.Location = new System.Drawing.Point(104, 225); + this.tbDept.Margin = new System.Windows.Forms.Padding(4); + this.tbDept.Name = "tbDept"; + this.tbDept.Size = new System.Drawing.Size(286, 28); + this.tbDept.TabIndex = 13; + // // linkLabel4 // this.linkLabel4.AutoSize = true; @@ -709,42 +745,6 @@ // this.purchaseTableAdapter.ClearBeforeFill = true; // - // label2 - // - label2.AutoSize = true; - label2.Location = new System.Drawing.Point(27, 228); - label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0); - label2.Name = "label2"; - label2.Size = new System.Drawing.Size(69, 20); - label2.TabIndex = 12; - label2.Text = "적용위치"; - // - // tbDept - // - this.tbDept.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.tbDept.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.tbDept.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.tbDept.FormattingEnabled = true; - this.tbDept.ImeMode = System.Windows.Forms.ImeMode.Hangul; - this.tbDept.Location = new System.Drawing.Point(104, 225); - this.tbDept.Margin = new System.Windows.Forms.Padding(4); - this.tbDept.Name = "tbDept"; - this.tbDept.Size = new System.Drawing.Size(286, 28); - this.tbDept.TabIndex = 13; - // - // tbAsset - // - this.tbAsset.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend; - this.tbAsset.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems; - this.tbAsset.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.tbAsset.FormattingEnabled = true; - this.tbAsset.ImeMode = System.Windows.Forms.ImeMode.Hangul; - this.tbAsset.Location = new System.Drawing.Point(104, 191); - this.tbAsset.Margin = new System.Windows.Forms.Padding(4); - this.tbAsset.Name = "tbAsset"; - this.tbAsset.Size = new System.Drawing.Size(286, 28); - this.tbAsset.TabIndex = 11; - // // fPurchase_Add // this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 20F);