diff --git a/EETGW.v12.suo b/EETGW.v12.suo deleted file mode 100644 index aa34d1d..0000000 Binary files a/EETGW.v12.suo and /dev/null differ diff --git a/Project/Dialog/fLogin.cs b/Project/Dialog/fLogin.cs index 211aa48..58de5f8 100644 --- a/Project/Dialog/fLogin.cs +++ b/Project/Dialog/fLogin.cs @@ -50,10 +50,12 @@ namespace Project.Dialog var encpass = Pub.MakePasswordEnc(tbPW.Text.Trim()); var ta = new dsMSSQLTableAdapters.UsersTableAdapter(); - var users = ta.GetIDPW(tbID.Text.Trim(), encpass); + var users = ta.GetIDPW(encpass, tbID.Text.Trim()); if(users.Rows.Count < 1) { Util.MsgE("No user"); + tbPW.SelectAll(); + tbPW.Focus(); return; } else diff --git a/Project/Properties/AssemblyInfo.cs b/Project/Properties/AssemblyInfo.cs index 9367069..49e24aa 100644 --- a/Project/Properties/AssemblyInfo.cs +++ b/Project/Properties/AssemblyInfo.cs @@ -5,12 +5,12 @@ using System.Runtime.InteropServices; // 어셈블리에 대한 일반 정보는 다음 특성 집합을 통해 // 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 // 이러한 특성 값을 변경하세요. -[assembly: AssemblyTitle("Frame Project")] +[assembly: AssemblyTitle("Amkor K4-EET GroupWare")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("Frame Project")] -[assembly: AssemblyProduct("Frame Project")] -[assembly: AssemblyCopyright("Copyright ©SIMP 2018")] +[assembly: AssemblyCompany("Amkor K4-EET")] +[assembly: AssemblyProduct("Amkor K4-EET GroupWare")] +[assembly: AssemblyCopyright("Copyright ©ATK4 2018")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 // 지정되도록 할 수 있습니다. // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("18.09.28.0000")] -[assembly: AssemblyFileVersion("18.09.28.0000")] +[assembly: AssemblyVersion("18.10.02.0000")] +[assembly: AssemblyFileVersion("18.10.02.0000")] diff --git a/Project/dsMSSQL.Designer.cs b/Project/dsMSSQL.Designer.cs index 9200eeb..feb38e1 100644 --- a/Project/dsMSSQL.Designer.cs +++ b/Project/dsMSSQL.Designer.cs @@ -4469,12 +4469,14 @@ SELECT id, password, name, nameE, dept, grade, email, level, indate, outdate, te 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 dept, email, grade, hp, id, indate, level, memo, name, nameE, outdate, pa" + - "ssword, tel, wdate, wuid\r\nFROM Users\r\nWHERE (id = @id) AND (password = @enc" + - "pw) OR\r\n (password = @encpw) AND (email = @id)"; + this._commandCollection[1].CommandText = @"SELECT dept, email, grade, hp, id, indate, level, memo, name, nameE, outdate, password, tel, wdate, wuid +FROM Users +WHERE (password = @encpw) AND (level > 0) AND (email = @idkey) OR + (password = @encpw) AND (level > 0) AND (id = @idkey) OR + (password = @encpw) AND (level > 0) AND (email = { fn CONCAT(@idkey, '@amkor.co.kr') })"; this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; - this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@id", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "id", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@encpw", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "password", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@idkey", global::System.Data.SqlDbType.VarChar, 50, global::System.Data.ParameterDirection.Input, 0, 0, "email", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -4505,19 +4507,19 @@ SELECT id, password, name, nameE, dept, grade, email, level, indate, outdate, te [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.Fill, false)] - public virtual int FillIDPW(dsMSSQL.UsersDataTable dataTable, string id, string encpw) { + public virtual int FillIDPW(dsMSSQL.UsersDataTable dataTable, string encpw, string idkey) { this.Adapter.SelectCommand = this.CommandCollection[1]; - if ((id == null)) { - throw new global::System.ArgumentNullException("id"); + if ((encpw == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[0].Value = ((string)(id)); + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(encpw)); } - if ((encpw == null)) { + if ((idkey == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[1].Value = ((string)(encpw)); + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(idkey)); } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); @@ -4530,19 +4532,19 @@ SELECT id, password, name, nameE, dept, grade, email, level, indate, outdate, te [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.Select, false)] - public virtual dsMSSQL.UsersDataTable GetIDPW(string id, string encpw) { + public virtual dsMSSQL.UsersDataTable GetIDPW(string encpw, string idkey) { this.Adapter.SelectCommand = this.CommandCollection[1]; - if ((id == null)) { - throw new global::System.ArgumentNullException("id"); + if ((encpw == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[0].Value = ((string)(id)); + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(encpw)); } - if ((encpw == null)) { + if ((idkey == null)) { this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; } else { - this.Adapter.SelectCommand.Parameters[1].Value = ((string)(encpw)); + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(idkey)); } dsMSSQL.UsersDataTable dataTable = new dsMSSQL.UsersDataTable(); this.Adapter.Fill(dataTable); diff --git a/Project/dsMSSQL.xsd b/Project/dsMSSQL.xsd index db7760f..0bbc620 100644 --- a/Project/dsMSSQL.xsd +++ b/Project/dsMSSQL.xsd @@ -149,11 +149,12 @@ SELECT id, password, name, nameE, dept, grade, email, level, indate, outdate, te SELECT dept, email, grade, hp, id, indate, level, memo, name, nameE, outdate, password, tel, wdate, wuid FROM Users -WHERE (id = @id) AND (password = @encpw) OR - (password = @encpw) AND (email = @id) +WHERE (password = @encpw) AND (level > 0) AND (email = @idkey) OR + (password = @encpw) AND (level > 0) AND (id = @idkey) OR + (password = @encpw) AND (level > 0) AND (email = { fn CONCAT(@idkey, '@amkor.co.kr') }) - + @@ -653,7 +654,7 @@ WHERE (idx = @idx) - + @@ -752,7 +753,7 @@ WHERE (idx = @idx) - + @@ -823,7 +824,7 @@ WHERE (idx = @idx) - + @@ -881,7 +882,7 @@ WHERE (idx = @idx) - + @@ -951,7 +952,7 @@ WHERE (idx = @idx) - + diff --git a/Project/fMain.Designer.cs b/Project/fMain.Designer.cs index 280b00c..47ae20a 100644 --- a/Project/fMain.Designer.cs +++ b/Project/fMain.Designer.cs @@ -55,6 +55,7 @@ this.staffGridToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.userInfoToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.mailFormToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.customerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.boardsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.minutesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.holidayToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -81,8 +82,8 @@ this.purchaseImportToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.purchaseDataConvertToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStrip = new System.Windows.Forms.ToolStrip(); - this.customerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); this.cmVision.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout(); @@ -238,45 +239,52 @@ // itemsToolStripMenuItem // this.itemsToolStripMenuItem.Name = "itemsToolStripMenuItem"; - this.itemsToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.itemsToolStripMenuItem.Size = new System.Drawing.Size(129, 22); this.itemsToolStripMenuItem.Text = "Items"; this.itemsToolStripMenuItem.Click += new System.EventHandler(this.itemsToolStripMenuItem_Click); // // codesToolStripMenuItem // this.codesToolStripMenuItem.Name = "codesToolStripMenuItem"; - this.codesToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.codesToolStripMenuItem.Size = new System.Drawing.Size(129, 22); this.codesToolStripMenuItem.Text = "Codes"; this.codesToolStripMenuItem.Click += new System.EventHandler(this.codesToolStripMenuItem_Click); // // lineCodeToolStripMenuItem // this.lineCodeToolStripMenuItem.Name = "lineCodeToolStripMenuItem"; - this.lineCodeToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.lineCodeToolStripMenuItem.Size = new System.Drawing.Size(129, 22); this.lineCodeToolStripMenuItem.Text = "Line Code"; this.lineCodeToolStripMenuItem.Click += new System.EventHandler(this.lineCodeToolStripMenuItem_Click); // // staffGridToolStripMenuItem // this.staffGridToolStripMenuItem.Name = "staffGridToolStripMenuItem"; - this.staffGridToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.staffGridToolStripMenuItem.Size = new System.Drawing.Size(129, 22); this.staffGridToolStripMenuItem.Text = "Staff Grid"; this.staffGridToolStripMenuItem.Click += new System.EventHandler(this.staffGridToolStripMenuItem_Click); // // userInfoToolStripMenuItem // this.userInfoToolStripMenuItem.Name = "userInfoToolStripMenuItem"; - this.userInfoToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.userInfoToolStripMenuItem.Size = new System.Drawing.Size(129, 22); this.userInfoToolStripMenuItem.Text = "User Info"; this.userInfoToolStripMenuItem.Click += new System.EventHandler(this.userInfoToolStripMenuItem_Click); // // mailFormToolStripMenuItem // this.mailFormToolStripMenuItem.Name = "mailFormToolStripMenuItem"; - this.mailFormToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.mailFormToolStripMenuItem.Size = new System.Drawing.Size(129, 22); this.mailFormToolStripMenuItem.Text = "Mail Form"; this.mailFormToolStripMenuItem.Click += new System.EventHandler(this.mailFormToolStripMenuItem_Click); // + // customerToolStripMenuItem + // + this.customerToolStripMenuItem.Name = "customerToolStripMenuItem"; + this.customerToolStripMenuItem.Size = new System.Drawing.Size(129, 22); + this.customerToolStripMenuItem.Text = "Customer"; + this.customerToolStripMenuItem.Click += new System.EventHandler(this.customerToolStripMenuItem_Click); + // // boardsToolStripMenuItem // this.boardsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { @@ -293,21 +301,21 @@ // minutesToolStripMenuItem // this.minutesToolStripMenuItem.Name = "minutesToolStripMenuItem"; - this.minutesToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.minutesToolStripMenuItem.Size = new System.Drawing.Size(144, 22); this.minutesToolStripMenuItem.Text = "Minutes"; this.minutesToolStripMenuItem.Click += new System.EventHandler(this.minutesToolStripMenuItem_Click); // // holidayToolStripMenuItem // this.holidayToolStripMenuItem.Name = "holidayToolStripMenuItem"; - this.holidayToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.holidayToolStripMenuItem.Size = new System.Drawing.Size(144, 22); this.holidayToolStripMenuItem.Text = "holiday"; this.holidayToolStripMenuItem.Click += new System.EventHandler(this.holidayToolStripMenuItem_Click); // // requestITemToolStripMenuItem // this.requestITemToolStripMenuItem.Name = "requestITemToolStripMenuItem"; - this.requestITemToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.requestITemToolStripMenuItem.Size = new System.Drawing.Size(144, 22); this.requestITemToolStripMenuItem.Text = "Request Item"; this.requestITemToolStripMenuItem.Click += new System.EventHandler(this.requestITemToolStripMenuItem_Click); // @@ -315,21 +323,21 @@ // this.freeBoardToolStripMenuItem.Enabled = false; this.freeBoardToolStripMenuItem.Name = "freeBoardToolStripMenuItem"; - this.freeBoardToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.freeBoardToolStripMenuItem.Size = new System.Drawing.Size(144, 22); this.freeBoardToolStripMenuItem.Text = "Free Board"; // // bugReportToolStripMenuItem // this.bugReportToolStripMenuItem.Enabled = false; this.bugReportToolStripMenuItem.Name = "bugReportToolStripMenuItem"; - this.bugReportToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.bugReportToolStripMenuItem.Size = new System.Drawing.Size(144, 22); this.bugReportToolStripMenuItem.Text = "Bug Report"; // // todoListToolStripMenuItem // this.todoListToolStripMenuItem.Enabled = false; this.todoListToolStripMenuItem.Name = "todoListToolStripMenuItem"; - this.todoListToolStripMenuItem.Size = new System.Drawing.Size(152, 22); + this.todoListToolStripMenuItem.Size = new System.Drawing.Size(144, 22); this.todoListToolStripMenuItem.Text = "Todo List"; // // managementToolStripMenuItem @@ -477,20 +485,14 @@ // toolStrip // this.toolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripButton1}); + this.toolStripButton1, + this.toolStripButton2}); this.toolStrip.Location = new System.Drawing.Point(1, 25); this.toolStrip.Name = "toolStrip"; this.toolStrip.Size = new System.Drawing.Size(1035, 25); this.toolStrip.TabIndex = 32; this.toolStrip.Text = "ToolStrip"; // - // customerToolStripMenuItem - // - this.customerToolStripMenuItem.Name = "customerToolStripMenuItem"; - this.customerToolStripMenuItem.Size = new System.Drawing.Size(152, 22); - this.customerToolStripMenuItem.Text = "Customer"; - this.customerToolStripMenuItem.Click += new System.EventHandler(this.customerToolStripMenuItem_Click); - // // toolStripButton1 // this.toolStripButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -498,9 +500,20 @@ this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton1.Name = "toolStripButton1"; this.toolStripButton1.Size = new System.Drawing.Size(23, 22); - this.toolStripButton1.Text = "toolStripButton1"; + this.toolStripButton1.Text = "메일전송"; this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); // + // toolStripButton2 + // + this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.toolStripButton2.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton2.Image"))); + this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton2.Name = "toolStripButton2"; + this.toolStripButton2.Size = new System.Drawing.Size(23, 22); + this.toolStripButton2.Text = "구매신청"; + this.toolStripButton2.ToolTipText = "파트구매신청서 작성"; + this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click); + // // fMain // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; @@ -586,6 +599,7 @@ private System.Windows.Forms.ToolStripMenuItem purchaseImportToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem purchaseDataConvertToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem customerToolStripMenuItem; + private System.Windows.Forms.ToolStripButton toolStripButton2; } } diff --git a/Project/fMain.cs b/Project/fMain.cs index f1f8c65..7b9f9eb 100644 --- a/Project/fMain.cs +++ b/Project/fMain.cs @@ -341,6 +341,11 @@ namespace Project private void toolStripButton1_Click(object sender, EventArgs e) { + if(FCOMMON.info.Login.level < 10) + { + FCOMMON.Util.MsgE("테스트 기능이므로 개발자만 사용가능 합니다."); + return; + } FCM0000.fSendMail f = new FCM0000.fSendMail(); f.MdiParent = this; f.Show(); @@ -373,5 +378,10 @@ namespace Project f.MdiParent = this; f.Show(); } + + private void toolStripButton2_Click(object sender, EventArgs e) + { + nRPurchaseToolStripMenuItem.PerformClick(); + } } } diff --git a/Project/fMain.resx b/Project/fMain.resx index 2224691..6a0d496 100644 --- a/Project/fMain.resx +++ b/Project/fMain.resx @@ -148,6 +148,21 @@ nL1jEAaAAgpkACGng/CcsxAvoBgACuHHb76ANcNsR3YBsmaYAXauoQgD8vvWgw1AthlmO7pmEAapRTEA FK+gqAFJgDDIBlwYJA9Sq2nojDAA5OzQ7C44BsUxCINCGoRB/gVhkK0gDNKMkg4oAdAcMWCAgQEAUU2N V3HhzrYAAAAASUVORK5CYII= + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIWSURBVDhPY0iaV3E9aWbN/7SKvovplX3WDFAwrd5VbGad + +65pVS4WcH6N664pFW4qYAUwkDS/6lLSvKqLqZW9UakVfXcYGP4zTq10sZ9Z4/5254zoX7PrPN5PrnRz + nVXn9mrnjJg/cxrcH88pteKFakcFqdW9fzJmlL8pmZr9Z+bKkv+7dtf/37Qi79+UZr9/VzcV/vt6rvX/ + 0cWpP4GGHl0VGsoM1YYAqY1dn1vWzvo/6+TS/337Z/1v3jrhf/ma1v/pCyv/x88p/5+3uPp/w6ra/7Vz + C34VT0w9Fje7PAaqFQLSWjqv1M6f/n/Xg70YePvd3f9XXdn4f+7pZf8nHJz7v2Zjz9+EeRVvoVohIKm5 + ZXFeb/9vmKaefTOx0iA859Sy/8kLqi5AtUJAUmtranpDzx+Yorg5ZVhpEAa5AuiC1VCtEJDS0SGTVtX3 + f/u93QQNaNo++UfcnNIWqFYEAMbE34XH14EV4fNC8Zr2j7FzylKh2hAgtaH7Xde6+XCF2PCmW9v/J86r + /JEws8IUqg0BUpo7TiV1tfwFptDvMJw4v+JH4vxKBJ5X/jN5QU0/VAsqACbpjNTKvq1QLukgtaxXF2jI + +5SqfgOoEOkgo3bi4YzqCf8yayb9T6vsR8EZNRP/p1dN/J1TNwW7F0AgvWrCjznrDgEVTvgOFYIDfHJw + kAU0Pa1ywu/s2sk9UCE4QJVjYAAAy1mkyv1iYtYAAAAASUVORK5CYII= diff --git a/SubProject/FCM0000/FCM0000.csproj b/SubProject/FCM0000/FCM0000.csproj index bd10437..ab8acea 100644 --- a/SubProject/FCM0000/FCM0000.csproj +++ b/SubProject/FCM0000/FCM0000.csproj @@ -120,6 +120,12 @@ fItems.cs + + Form + + + fLovOneItem.cs + Form @@ -168,6 +174,9 @@ fItems.cs + + fLovOneItem.cs + fLovSupply.cs diff --git a/SubProject/FCM0000/dsMSSQL.Designer.cs b/SubProject/FCM0000/dsMSSQL.Designer.cs index 2036f3c..e515440 100644 --- a/SubProject/FCM0000/dsMSSQL.Designer.cs +++ b/SubProject/FCM0000/dsMSSQL.Designer.cs @@ -583,6 +583,10 @@ namespace FCM0000 { private global::System.Data.DataColumn columnsupplyidx; + private global::System.Data.DataColumn columnscale; + + private global::System.Data.DataColumn columnunit; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public ItemsDataTable() { @@ -712,6 +716,22 @@ namespace FCM0000 { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn scaleColumn { + get { + return this.columnscale; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn unitColumn { + get { + return this.columnunit; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Browsable(false)] @@ -749,7 +769,7 @@ 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) { + 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) { ItemsRow rowItemsRow = ((ItemsRow)(this.NewRow())); object[] columnValuesArray = new object[] { null, @@ -763,7 +783,9 @@ namespace FCM0000 { wdate, price, cate, - supplyidx}; + supplyidx, + scale, + unit}; rowItemsRow.ItemArray = columnValuesArray; this.Rows.Add(rowItemsRow); return rowItemsRow; @@ -805,6 +827,8 @@ namespace FCM0000 { this.columnprice = base.Columns["price"]; this.columncate = base.Columns["cate"]; this.columnsupplyidx = base.Columns["supplyidx"]; + this.columnscale = base.Columns["scale"]; + this.columnunit = base.Columns["unit"]; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -834,6 +858,10 @@ namespace FCM0000 { base.Columns.Add(this.columncate); this.columnsupplyidx = new global::System.Data.DataColumn("supplyidx", typeof(int), null, global::System.Data.MappingType.Element); base.Columns.Add(this.columnsupplyidx); + this.columnscale = new global::System.Data.DataColumn("scale", typeof(double), null, global::System.Data.MappingType.Element); + 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.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { this.columnidx}, true)); this.columnidx.AutoIncrement = true; @@ -852,6 +880,9 @@ namespace FCM0000 { this.columnwuid.MaxLength = 20; this.columnwdate.AllowDBNull = false; this.columncate.MaxLength = 20; + this.columnscale.DefaultValue = ((double)(1D)); + this.columnunit.DefaultValue = ((string)("EA")); + this.columnunit.MaxLength = 10; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -4593,6 +4624,38 @@ namespace FCM0000 { } } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public double scale { + get { + if (this.IsscaleNull()) { + return 1D; + } + else { + return ((double)(this[this.tableItems.scaleColumn])); + } + } + set { + this[this.tableItems.scaleColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string unit { + get { + if (this.IsunitNull()) { + return "EA"; + } + else { + return ((string)(this[this.tableItems.unitColumn])); + } + } + set { + this[this.tableItems.unitColumn] = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] public bool IsnameNull() { @@ -4700,6 +4763,30 @@ namespace FCM0000 { public void SetsupplyidxNull() { this[this.tableItems.supplyidxColumn] = global::System.Convert.DBNull; } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsscaleNull() { + return this.IsNull(this.tableItems.scaleColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetscaleNull() { + this[this.tableItems.scaleColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsunitNull() { + return this.IsNull(this.tableItems.unitColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetunitNull() { + this[this.tableItems.unitColumn] = global::System.Convert.DBNull; + } } /// @@ -7545,10 +7632,12 @@ namespace FCM0000.dsMSSQLTableAdapters { tableMapping.ColumnMappings.Add("price", "price"); tableMapping.ColumnMappings.Add("cate", "cate"); tableMapping.ColumnMappings.Add("supplyidx", "supplyidx"); + tableMapping.ColumnMappings.Add("scale", "scale"); + tableMapping.ColumnMappings.Add("unit", "unit"); 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)))"; + 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.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, "", "", "")); @@ -7571,10 +7660,14 @@ namespace FCM0000.dsMSSQLTableAdapters { this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_cate", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_supplyidx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "supplyidx", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_supplyidx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "supplyidx", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_scale", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "scale", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + 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.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]) VALUES (@name, @sid, @model, @manu, @supply, @price, @memo, @wuid, @wdate, @cate, @supplyidx); -SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx FROM Items WHERE (idx = SCOPE_IDENTITY()) ORDER BY cate, name"; + 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.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, "", "", "")); @@ -7587,10 +7680,12 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@wdate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "wdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cate", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 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.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 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))); -SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx FROM Items WHERE (idx = @idx) ORDER BY cate, name"; + 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.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, "", "", "")); @@ -7603,6 +7698,8 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@wdate", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "wdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@cate", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); 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("@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, "", "", "")); @@ -7624,6 +7721,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("@Original_cate", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "cate", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_supplyidx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "supplyidx", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_supplyidx", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "supplyidx", global::System.Data.DataRowVersion.Original, false, null, "", "", "")); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_scale", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "scale", global::System.Data.DataRowVersion.Original, true, null, "", "", "")); + 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("@idx", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "idx", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } @@ -7641,27 +7742,30 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp 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\r\nFROM Items\r\nORDER BY cate, name, idx"; + "lyidx, scale, unit\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 idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx + 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, '') <> '') -ORDER BY sid, cate, name, idx"; + HAVING (COUNT(*) > 1))) AND (ISNULL(sid, '') <> '') AND (cate LIKE @cate) +ORDER BY sid, name, idx"; 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[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, sid, supply, supplyidx, wdate," + - " wuid\r\nFROM Items\r\nORDER BY cate, name, idx"; + 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].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, sid, supply, supplyidx, wdate, wuid + 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 @@ -7669,13 +7773,13 @@ WHERE (ISNULL(name, N'') LIKE @search) OR (ISNULL(supply, N'') LIKE @search) OR (ISNULL(model, N'') LIKE @search) OR (ISNULL(memo, N'') LIKE @search) -ORDER BY cate, name, idx"; +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[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, sid, supply, supplyidx, wdate, " + - "wuid FROM Items WHERE (idx = @idx)"; + 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].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, "", "", "")); } @@ -7708,8 +7812,14 @@ ORDER BY cate, 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.Fill, false)] - public virtual int FillDupCheck(dsMSSQL.ItemsDataTable dataTable) { + public virtual int FillDupCheck(dsMSSQL.ItemsDataTable dataTable, string cate) { this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((cate == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(cate)); + } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } @@ -7721,8 +7831,14 @@ ORDER BY cate, 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.Select, false)] - public virtual dsMSSQL.ItemsDataTable GetDupCheck() { + public virtual dsMSSQL.ItemsDataTable GetDupCheck(string cate) { this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((cate == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(cate)); + } dsMSSQL.ItemsDataTable dataTable = new dsMSSQL.ItemsDataTable(); this.Adapter.Fill(dataTable); return dataTable; @@ -7732,8 +7848,14 @@ ORDER BY cate, 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.Fill, false)] - public virtual int FillNoImage(dsMSSQL.ItemsDataTable dataTable) { + public virtual int FillNoImage(dsMSSQL.ItemsDataTable dataTable, string cate) { this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((cate == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(cate)); + } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } @@ -7745,8 +7867,14 @@ ORDER BY cate, 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.Select, false)] - public virtual dsMSSQL.ItemsDataTable GetNoImage() { + public virtual dsMSSQL.ItemsDataTable GetNoImage(string cate) { this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((cate == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(cate)); + } dsMSSQL.ItemsDataTable dataTable = new dsMSSQL.ItemsDataTable(); this.Adapter.Fill(dataTable); return dataTable; @@ -7833,7 +7961,7 @@ ORDER BY cate, 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) { + 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) { this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_idx)); if ((Original_name == null)) { this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); @@ -7914,6 +8042,22 @@ ORDER BY cate, name, idx"; this.Adapter.DeleteCommand.Parameters[19].Value = ((object)(1)); this.Adapter.DeleteCommand.Parameters[20].Value = global::System.DBNull.Value; } + if ((Original_scale.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[22].Value = ((double)(Original_scale.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[21].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[22].Value = global::System.DBNull.Value; + } + if ((Original_unit == null)) { + this.Adapter.DeleteCommand.Parameters[23].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[24].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[23].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[24].Value = ((string)(Original_unit)); + } 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)) { @@ -7934,7 +8078,7 @@ ORDER BY cate, 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) { + 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) { if ((name == null)) { this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; } @@ -7996,6 +8140,18 @@ ORDER BY cate, name, idx"; else { this.Adapter.InsertCommand.Parameters[10].Value = global::System.DBNull.Value; } + if ((scale.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[11].Value = ((double)(scale.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[11].Value = global::System.DBNull.Value; + } + if ((unit == null)) { + this.Adapter.InsertCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[12].Value = ((string)(unit)); + } 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)) { @@ -8028,6 +8184,8 @@ ORDER BY cate, name, idx"; System.DateTime wdate, string cate, global::System.Nullable supplyidx, + global::System.Nullable scale, + string unit, int Original_idx, string Original_name, string Original_sid, @@ -8040,6 +8198,8 @@ ORDER BY cate, name, idx"; System.DateTime Original_wdate, string Original_cate, global::System.Nullable Original_supplyidx, + global::System.Nullable Original_scale, + string Original_unit, int idx) { if ((name == null)) { this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; @@ -8102,87 +8262,115 @@ ORDER BY cate, name, idx"; else { this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_idx)); - if ((Original_name == null)) { - this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + if ((scale.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[11].Value = ((double)(scale.Value)); } else { - this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[13].Value = ((string)(Original_name)); + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; } - if ((Original_sid == null)) { + if ((unit == null)) { + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; + } + 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)); 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_sid)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((string)(Original_name)); } - if ((Original_model == null)) { + if ((Original_sid == null)) { this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; } else { this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_model)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_sid)); } - if ((Original_manu == null)) { + if ((Original_model == 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_manu)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_model)); } - if ((Original_supply == null)) { + if ((Original_manu == 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_supply)); + this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_manu)); } - if ((Original_price.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[23].Value = ((decimal)(Original_price.Value)); - } - else { + if ((Original_supply == null)) { this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[23].Value = global::System.DBNull.Value; } - if ((Original_memo == null)) { + else { + this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Original_supply)); + } + if ((Original_price.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[25].Value = ((decimal)(Original_price.Value)); + } + else { this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[25].Value = global::System.DBNull.Value; } + if ((Original_memo == null)) { + this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[27].Value = global::System.DBNull.Value; + } else { - this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[25].Value = ((string)(Original_memo)); + this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[27].Value = ((string)(Original_memo)); } if ((Original_wuid == null)) { throw new global::System.ArgumentNullException("Original_wuid"); } else { - this.Adapter.UpdateCommand.Parameters[26].Value = ((string)(Original_wuid)); + this.Adapter.UpdateCommand.Parameters[28].Value = ((string)(Original_wuid)); } - this.Adapter.UpdateCommand.Parameters[27].Value = ((System.DateTime)(Original_wdate)); + this.Adapter.UpdateCommand.Parameters[29].Value = ((System.DateTime)(Original_wdate)); if ((Original_cate == null)) { - this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(1)); - this.Adapter.UpdateCommand.Parameters[29].Value = global::System.DBNull.Value; - } - else { - this.Adapter.UpdateCommand.Parameters[28].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[29].Value = ((string)(Original_cate)); - } - if ((Original_supplyidx.HasValue == true)) { - this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(0)); - this.Adapter.UpdateCommand.Parameters[31].Value = ((int)(Original_supplyidx.Value)); - } - else { this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(1)); this.Adapter.UpdateCommand.Parameters[31].Value = global::System.DBNull.Value; } - this.Adapter.UpdateCommand.Parameters[32].Value = ((int)(idx)); + else { + this.Adapter.UpdateCommand.Parameters[30].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[31].Value = ((string)(Original_cate)); + } + if ((Original_supplyidx.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[33].Value = ((int)(Original_supplyidx.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[32].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[33].Value = global::System.DBNull.Value; + } + 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[34].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[35].Value = global::System.DBNull.Value; + } + if ((Original_unit == null)) { + 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)); + } + this.Adapter.UpdateCommand.Parameters[38].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)) { @@ -8215,6 +8403,8 @@ ORDER BY cate, name, idx"; System.DateTime wdate, string cate, global::System.Nullable supplyidx, + global::System.Nullable scale, + string unit, int Original_idx, string Original_name, string Original_sid, @@ -8226,8 +8416,10 @@ ORDER BY cate, name, idx"; string Original_wuid, System.DateTime Original_wdate, string Original_cate, - global::System.Nullable Original_supplyidx) { - return this.Update(name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, 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_idx); + 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); } } diff --git a/SubProject/FCM0000/dsMSSQL.xsd b/SubProject/FCM0000/dsMSSQL.xsd index 4877e33..4ed1597 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))) + 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))) @@ -35,13 +35,17 @@ + + + + - INSERT INTO [Items] ([name], [sid], [model], [manu], [supply], [price], [memo], [wuid], [wdate], [cate], [supplyidx]) VALUES (@name, @sid, @model, @manu, @supply, @price, @memo, @wuid, @wdate, @cate, @supplyidx); -SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx FROM Items WHERE (idx = SCOPE_IDENTITY()) ORDER BY cate, name + 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 @@ -54,12 +58,14 @@ 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 + SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx, scale, unit FROM Items ORDER BY cate, name, idx @@ -67,8 +73,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 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))); -SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supplyidx FROM Items WHERE (idx = @idx) ORDER BY cate, name + 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 @@ -81,6 +87,8 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp + + @@ -102,7 +110,11 @@ SELECT idx, name, sid, model, manu, supply, price, memo, wuid, wdate, cate, supp - + + + + + @@ -121,37 +133,44 @@ 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 + 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, '') <> '') -ORDER BY sid, cate, name, idx - + HAVING (COUNT(*) > 1))) AND (ISNULL(sid, '') <> '') AND (cate LIKE @cate) +ORDER BY sid, name, idx + + + - SELECT cate, idx, manu, memo, model, name, price, sid, supply, supplyidx, wdate, wuid + SELECT cate, idx, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items -ORDER BY cate, name, idx - +WHERE (cate LIKE @cate) +ORDER BY name, idx + + + - SELECT cate, idx, manu, memo, model, name, price, sid, supply, supplyidx, wdate, wuid + 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 @@ -159,7 +178,7 @@ WHERE (ISNULL(name, N'') LIKE @search) OR (ISNULL(supply, N'') LIKE @search) OR (ISNULL(model, N'') LIKE @search) OR (ISNULL(memo, N'') LIKE @search) -ORDER BY cate, name, idx +ORDER BY name, idx @@ -169,7 +188,7 @@ ORDER BY cate, name, idx - SELECT cate, idx, manu, memo, model, name, price, sid, supply, supplyidx, wdate, wuid FROM Items WHERE (idx = @idx) + SELECT cate, idx, manu, memo, model, name, price, scale, sid, supply, supplyidx, unit, wdate, wuid FROM Items WHERE (idx = @idx) @@ -1129,7 +1148,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1192,10 +1211,18 @@ where name like @search or tel like @search or email like @search or memo like @ + + + + + + + + - + @@ -1265,7 +1292,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1336,7 +1363,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1381,7 +1408,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1448,7 +1475,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1507,7 +1534,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1571,7 +1598,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1660,7 +1687,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + diff --git a/SubProject/FCM0000/fItems.Designer.cs b/SubProject/FCM0000/fItems.Designer.cs index 252d40e..d446d35 100644 --- a/SubProject/FCM0000/fItems.Designer.cs +++ b/SubProject/FCM0000/fItems.Designer.cs @@ -30,9 +30,13 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fItems)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); this.bn = new System.Windows.Forms.BindingNavigator(this.components); this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton(); this.bs = new System.Windows.Forms.BindingSource(this.components); @@ -48,7 +52,23 @@ this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.itemsBindingNavigatorSaveItem = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel(); + this.tbFind = new System.Windows.Forms.ToolStripTextBox(); + this.btFind = new System.Windows.Forms.ToolStripButton(); this.dv1 = new System.Windows.Forms.DataGridView(); + this.cm1 = new System.Windows.Forms.ContextMenuStrip(this.components); + this.autoColumnSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.cm1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.ta = new FCM0000.dsMSSQLTableAdapters.ItemsTableAdapter(); + this.tam = new FCM0000.dsMSSQLTableAdapters.TableAdapterManager(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel(); + this.cmbCate = new System.Windows.Forms.ToolStripComboBox(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); + this.cmbMode = new System.Windows.Forms.ToolStripComboBox(); + this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.cate = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -56,17 +76,11 @@ this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.supplyidx = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.price = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.scale = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.unit = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.cm1 = new System.Windows.Forms.ContextMenuStrip(this.components); - this.autoColumnSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.cm1ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.ta = new FCM0000.dsMSSQLTableAdapters.ItemsTableAdapter(); - this.tam = new FCM0000.dsMSSQLTableAdapters.TableAdapterManager(); - this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.cmbMode = new System.Windows.Forms.ToolStripComboBox(); - this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); - this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); ((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit(); this.bn.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); @@ -95,7 +109,11 @@ this.bindingNavigatorSeparator2, this.bindingNavigatorAddNewItem, this.bindingNavigatorDeleteItem, - this.itemsBindingNavigatorSaveItem}); + this.itemsBindingNavigatorSaveItem, + this.toolStripSeparator2, + this.toolStripLabel3, + this.tbFind, + this.btFind}); this.bn.Location = new System.Drawing.Point(0, 441); this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem; this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem; @@ -208,6 +226,35 @@ this.itemsBindingNavigatorSaveItem.Text = "Save(&S)"; this.itemsBindingNavigatorSaveItem.Click += new System.EventHandler(this.itemsBindingNavigatorSaveItem_Click); // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); + // + // toolStripLabel3 + // + this.toolStripLabel3.Name = "toolStripLabel3"; + this.toolStripLabel3.Size = new System.Drawing.Size(41, 22); + this.toolStripLabel3.Text = "search"; + // + // tbFind + // + this.tbFind.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tbFind.Name = "tbFind"; + this.tbFind.Size = new System.Drawing.Size(100, 25); + this.tbFind.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.tbFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.btFind_KeyDown); + // + // btFind + // + this.btFind.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.btFind.Image = ((System.Drawing.Image)(resources.GetObject("btFind.Image"))); + this.btFind.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btFind.Name = "btFind"; + this.btFind.Size = new System.Drawing.Size(23, 22); + this.btFind.Text = "toolStripButton1"; + this.btFind.Click += new System.EventHandler(this.toolStripButton1_Click_1); + // // dv1 // this.dv1.AllowUserToAddRows = false; @@ -222,7 +269,10 @@ this.dataGridViewTextBoxColumn4, this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn6, + this.supplyidx, this.price, + this.scale, + this.unit, this.dataGridViewTextBoxColumn7}); this.dv1.ContextMenuStrip = this.cm1; this.dv1.DataSource = this.bs; @@ -232,77 +282,9 @@ this.dv1.RowTemplate.Height = 23; this.dv1.Size = new System.Drawing.Size(758, 416); this.dv1.TabIndex = 1; + this.dv1.CellEndEdit += new System.Windows.Forms.DataGridViewCellEventHandler(this.dv1_CellEndEdit); this.dv1.DataError += new System.Windows.Forms.DataGridViewDataErrorEventHandler(this.dv1_DataError); - // - // dataGridViewTextBoxColumn1 - // - this.dataGridViewTextBoxColumn1.DataPropertyName = "idx"; - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle10; - this.dataGridViewTextBoxColumn1.HeaderText = "idx"; - this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; - this.dataGridViewTextBoxColumn1.ReadOnly = true; - this.dataGridViewTextBoxColumn1.Width = 47; - // - // cate - // - this.cate.DataPropertyName = "cate"; - this.cate.HeaderText = "Category"; - this.cate.Name = "cate"; - // - // dataGridViewTextBoxColumn2 - // - this.dataGridViewTextBoxColumn2.DataPropertyName = "name"; - this.dataGridViewTextBoxColumn2.HeaderText = "name"; - this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; - this.dataGridViewTextBoxColumn2.Width = 62; - // - // dataGridViewTextBoxColumn3 - // - this.dataGridViewTextBoxColumn3.DataPropertyName = "sid"; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle11; - this.dataGridViewTextBoxColumn3.HeaderText = "sid"; - this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; - this.dataGridViewTextBoxColumn3.Width = 47; - // - // dataGridViewTextBoxColumn4 - // - this.dataGridViewTextBoxColumn4.DataPropertyName = "model"; - this.dataGridViewTextBoxColumn4.HeaderText = "model"; - this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; - this.dataGridViewTextBoxColumn4.Width = 65; - // - // dataGridViewTextBoxColumn5 - // - this.dataGridViewTextBoxColumn5.DataPropertyName = "manu"; - this.dataGridViewTextBoxColumn5.HeaderText = "manu"; - this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; - this.dataGridViewTextBoxColumn5.Width = 62; - // - // dataGridViewTextBoxColumn6 - // - this.dataGridViewTextBoxColumn6.DataPropertyName = "supply"; - this.dataGridViewTextBoxColumn6.HeaderText = "supply"; - this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; - this.dataGridViewTextBoxColumn6.Width = 68; - // - // price - // - this.price.DataPropertyName = "price"; - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - dataGridViewCellStyle12.Format = "N0"; - this.price.DefaultCellStyle = dataGridViewCellStyle12; - this.price.HeaderText = "price"; - this.price.Name = "price"; - // - // dataGridViewTextBoxColumn7 - // - this.dataGridViewTextBoxColumn7.DataPropertyName = "memo"; - this.dataGridViewTextBoxColumn7.HeaderText = "memo"; - this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; - this.dataGridViewTextBoxColumn7.Width = 66; + this.dv1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dv1_KeyDown); // // cm1 // @@ -346,6 +328,9 @@ // toolStrip1 // this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripLabel2, + this.cmbCate, + this.toolStripSeparator1, this.toolStripLabel1, this.cmbMode, this.toolStripButton2}); @@ -355,6 +340,32 @@ this.toolStrip1.TabIndex = 2; this.toolStrip1.Text = "toolStrip1"; // + // toolStripLabel2 + // + this.toolStripLabel2.Name = "toolStripLabel2"; + this.toolStripLabel2.Size = new System.Drawing.Size(55, 22); + this.toolStripLabel2.Text = "Category"; + // + // cmbCate + // + this.cmbCate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbCate.Items.AddRange(new object[] { + "Normal", + "Duplication"}); + this.cmbCate.Name = "cmbCate"; + this.cmbCate.Size = new System.Drawing.Size(100, 25); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); + // + // toolStripLabel1 + // + this.toolStripLabel1.Name = "toolStripLabel1"; + this.toolStripLabel1.Size = new System.Drawing.Size(68, 22); + this.toolStripLabel1.Text = "Query Type"; + // // cmbMode // this.cmbMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; @@ -373,11 +384,103 @@ this.toolStripButton2.Text = "Refresh"; this.toolStripButton2.Click += new System.EventHandler(this.toolStripButton2_Click); // - // toolStripLabel1 + // dataGridViewTextBoxColumn1 // - this.toolStripLabel1.Name = "toolStripLabel1"; - this.toolStripLabel1.Size = new System.Drawing.Size(68, 22); - this.toolStripLabel1.Text = "Query Type"; + this.dataGridViewTextBoxColumn1.DataPropertyName = "idx"; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle1; + this.dataGridViewTextBoxColumn1.HeaderText = "idx"; + this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; + this.dataGridViewTextBoxColumn1.ReadOnly = true; + this.dataGridViewTextBoxColumn1.Width = 47; + // + // cate + // + this.cate.DataPropertyName = "cate"; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(255))))); + this.cate.DefaultCellStyle = dataGridViewCellStyle2; + this.cate.HeaderText = "Category"; + this.cate.Name = "cate"; + // + // dataGridViewTextBoxColumn2 + // + this.dataGridViewTextBoxColumn2.DataPropertyName = "name"; + this.dataGridViewTextBoxColumn2.HeaderText = "name"; + this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; + this.dataGridViewTextBoxColumn2.Width = 62; + // + // dataGridViewTextBoxColumn3 + // + this.dataGridViewTextBoxColumn3.DataPropertyName = "sid"; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle3; + this.dataGridViewTextBoxColumn3.HeaderText = "sid"; + this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; + this.dataGridViewTextBoxColumn3.Width = 47; + // + // dataGridViewTextBoxColumn4 + // + this.dataGridViewTextBoxColumn4.DataPropertyName = "model"; + this.dataGridViewTextBoxColumn4.HeaderText = "model"; + this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; + this.dataGridViewTextBoxColumn4.Width = 65; + // + // dataGridViewTextBoxColumn5 + // + this.dataGridViewTextBoxColumn5.DataPropertyName = "manu"; + this.dataGridViewTextBoxColumn5.HeaderText = "manu"; + this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; + this.dataGridViewTextBoxColumn5.Width = 62; + // + // dataGridViewTextBoxColumn6 + // + this.dataGridViewTextBoxColumn6.DataPropertyName = "supply"; + this.dataGridViewTextBoxColumn6.HeaderText = "supply"; + this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; + this.dataGridViewTextBoxColumn6.Width = 68; + // + // supplyidx + // + this.supplyidx.DataPropertyName = "supplyidx"; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.supplyidx.DefaultCellStyle = dataGridViewCellStyle4; + this.supplyidx.HeaderText = "idx"; + this.supplyidx.Name = "supplyidx"; + // + // price + // + this.price.DataPropertyName = "price"; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle5.Format = "N0"; + this.price.DefaultCellStyle = dataGridViewCellStyle5; + this.price.HeaderText = "price"; + this.price.Name = "price"; + // + // scale + // + this.scale.DataPropertyName = "scale"; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.scale.DefaultCellStyle = dataGridViewCellStyle6; + this.scale.HeaderText = "scale"; + this.scale.Name = "scale"; + // + // unit + // + this.unit.DataPropertyName = "unit"; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.unit.DefaultCellStyle = dataGridViewCellStyle7; + this.unit.HeaderText = "unit"; + this.unit.Name = "unit"; + // + // dataGridViewTextBoxColumn7 + // + this.dataGridViewTextBoxColumn7.DataPropertyName = "memo"; + this.dataGridViewTextBoxColumn7.HeaderText = "memo"; + this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; + this.dataGridViewTextBoxColumn7.Width = 66; // // fItems // @@ -427,6 +530,17 @@ private System.Windows.Forms.ContextMenuStrip cm1; private System.Windows.Forms.ToolStripMenuItem autoColumnSizeToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem cm1ToolStripMenuItem; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripComboBox cmbMode; + private System.Windows.Forms.ToolStripButton toolStripButton2; + private System.Windows.Forms.ToolStripLabel toolStripLabel1; + private System.Windows.Forms.ToolStripLabel toolStripLabel2; + private System.Windows.Forms.ToolStripComboBox cmbCate; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripLabel toolStripLabel3; + private System.Windows.Forms.ToolStripTextBox tbFind; + private System.Windows.Forms.ToolStripButton btFind; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; private System.Windows.Forms.DataGridViewTextBoxColumn cate; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; @@ -434,11 +548,10 @@ private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; + private System.Windows.Forms.DataGridViewTextBoxColumn supplyidx; private System.Windows.Forms.DataGridViewTextBoxColumn price; + private System.Windows.Forms.DataGridViewTextBoxColumn scale; + private System.Windows.Forms.DataGridViewTextBoxColumn unit; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7; - private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ToolStripComboBox cmbMode; - private System.Windows.Forms.ToolStripButton toolStripButton2; - private System.Windows.Forms.ToolStripLabel toolStripLabel1; } } \ No newline at end of file diff --git a/SubProject/FCM0000/fItems.cs b/SubProject/FCM0000/fItems.cs index db404fa..dd39a0c 100644 --- a/SubProject/FCM0000/fItems.cs +++ b/SubProject/FCM0000/fItems.cs @@ -23,16 +23,26 @@ namespace FCM0000 } private void fItems_Load(object sender, EventArgs e) { + //get catelist + var cateList = FCOMMON.DBM.getGroupTable("cate", "Items", "isnull(cate,'') <> ''"); + this.cmbCate.Items.Clear(); + this.cmbCate.Items.Add("-- All --"); + foreach (var item in cateList) + cmbCate.Items.Add(item.Key); + this.cmbCate.SelectedIndex = 0; + this.cmbMode.SelectedIndex = 0; refreshData(); } void refreshData() { //refresh data + string cateSearch = "%"; + if (cmbCate.SelectedIndex > 0) cateSearch = cmbCate.Text; if (cmbMode.SelectedIndex == 0) - this.ta.FillNoImage(this.dsMSSQL.Items); + this.ta.FillNoImage(this.dsMSSQL.Items, cateSearch); else - this.ta.FillDupCheck(this.dsMSSQL.Items); + this.ta.FillDupCheck(this.dsMSSQL.Items, cateSearch); this.dv1.AutoResizeColumns(); } @@ -54,11 +64,12 @@ namespace FCM0000 try { this.tam.UpdateAll(this.dsMSSQL); - }catch (Exception ex) + } + catch (Exception ex) { FCOMMON.Util.MsgE(ex.Message); } - + } @@ -69,7 +80,7 @@ namespace FCM0000 private void toolStripButton1_Click(object sender, EventArgs e) { - + } private void dv1_DataError(object sender, DataGridViewDataErrorEventArgs e) @@ -82,6 +93,73 @@ namespace FCM0000 refreshData(); } - + private void dv1_KeyDown(object sender, KeyEventArgs e) + { + + } + + private void dv1_CellEndEdit(object sender, DataGridViewCellEventArgs e) + { + var col = this.dv1.Columns[e.ColumnIndex]; + var value = this.dv1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value; + + switch (col.DataPropertyName.ToLower()) + { + case "supply": //공급처는 검색하게 한다. + if (value == null) return; + var search = value.ToString(); + if (search.isEmpty()) return; + + FCM0000.fLovSupply f = new fLovSupply(search); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + var name = f.Title; + var idx = f.Index; + dv1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = name; + dv1.Rows[e.RowIndex].Cells[e.ColumnIndex + 1].Value = idx; + } + break; + } + } + + private void toolStripButton1_Click_1(object sender, EventArgs e) + { + Find(); + } + + void Find() + { + var search = tbFind.Text.Trim(); + if (search.isEmpty()) + { + bs.Filter = ""; + tbFind.BackColor = Color.White; + } + else + { + string filter = "name like '' or sid like '' or model like '' or supply like ''"; + filter = filter.Replace("''", "'%" + search.Replace("'","''") + "%'"); + try + { + bs.Filter = filter; + tbFind.BackColor = Color.Lime; + } + catch (Exception ex) + { + tbFind.BackColor = Color.Pink; + } + } + tbFind.SelectAll(); + tbFind.Focus(); + + } + + private void btFind_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Enter) Find(); + + } + + } } diff --git a/SubProject/FCM0000/fItems.resx b/SubProject/FCM0000/fItems.resx index 5747455..c5941b1 100644 --- a/SubProject/FCM0000/fItems.resx +++ b/SubProject/FCM0000/fItems.resx @@ -198,15 +198,32 @@ dtINAGGiDUDGyGpoawAxeNSAQWkAORiqnRLAwAAA9EMMU8Daa3MAAAAASUVORK5CYII= - - 17, 17 - + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE3SURBVDhPnZIxS8NQFEb7W/wLjh0Fl9a1SxBHBekkWFd1 + qYg4Ci5dndSCg2AHl4LQSaRSKDqoFUE7VAjUmvTKueWmL2mw2gunL7zmO+/mJhmZoTJusdF868vpXUfO + b5/lpPEox9f3SvnsRtk8uojxHQ7HEgSEkXS6vrz3xqtdu+xdfUiheEBsJOGCk/mz/hROUHsIIrp+qIKY + hB/a9r+CVAG4Auj5g7iA5/1NACaptgIVLHkb0wWVw13ZL60p2+uerqkCJs1mMgwUU6d1k/xJwI10RZj1 + 9TPUN7Wam9dgTMC75QR7TjCBkRQs5Jd1jQS8c1ewtZLTPcQW/peADpC44cudgnjZOQ1OCGjTwkwaGBon + GoSrpcVIQqmAj6LZftFBup9vWiUlUQdIDCbsQrsGZRJKBbOXyA++SlEsu6QjvQAAAABJRU5ErkJggg== + + True + + True + True + + True + + + True + 387, 17 diff --git a/SubProject/FCM0000/fLovItem.Designer.cs b/SubProject/FCM0000/fLovItem.Designer.cs index e2fbfa1..d0d8621 100644 --- a/SubProject/FCM0000/fLovItem.Designer.cs +++ b/SubProject/FCM0000/fLovItem.Designer.cs @@ -29,19 +29,15 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.Label modelLabel; System.Windows.Forms.Label manuLabel; System.Windows.Forms.Label supplyLabel; System.Windows.Forms.Label memoLabel; System.Windows.Forms.Label priceLabel; System.Windows.Forms.Label label1; System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fLovItem)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dsMSSQL = new FCM0000.dsMSSQL(); - this.bs = new System.Windows.Forms.BindingSource(this.components); - this.ta = new FCM0000.dsMSSQLTableAdapters.ItemsTableAdapter(); - this.tam = new FCM0000.dsMSSQLTableAdapters.TableAdapterManager(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.Label label2; this.bn = new System.Windows.Forms.BindingNavigator(this.components); this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel(); this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton(); @@ -54,107 +50,81 @@ this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.btOK = new System.Windows.Forms.ToolStripButton(); this.dv = new System.Windows.Forms.DataGridView(); - this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel1 = new System.Windows.Forms.Panel(); this.textBox1 = new System.Windows.Forms.TextBox(); - this.modelTextBox = new System.Windows.Forms.TextBox(); this.manuTextBox = new System.Windows.Forms.TextBox(); this.supplyTextBox = new System.Windows.Forms.TextBox(); this.memoTextBox = new System.Windows.Forms.TextBox(); this.priceTextBox = new System.Windows.Forms.TextBox(); - modelLabel = new System.Windows.Forms.Label(); + this.model = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.bs = new System.Windows.Forms.BindingSource(this.components); + this.dsMSSQL = new FCM0000.dsMSSQL(); + this.ta = new FCM0000.dsMSSQLTableAdapters.ItemsTableAdapter(); + this.tam = new FCM0000.dsMSSQLTableAdapters.TableAdapterManager(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox3 = new System.Windows.Forms.TextBox(); manuLabel = new System.Windows.Forms.Label(); supplyLabel = new System.Windows.Forms.Label(); memoLabel = new System.Windows.Forms.Label(); priceLabel = new System.Windows.Forms.Label(); label1 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); + label2 = new System.Windows.Forms.Label(); ((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit(); this.bn.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dv)).BeginInit(); this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).BeginInit(); this.SuspendLayout(); // - // modelLabel - // - modelLabel.AutoSize = true; - modelLabel.Location = new System.Drawing.Point(22, 15); - modelLabel.Name = "modelLabel"; - modelLabel.Size = new System.Drawing.Size(64, 22); - modelLabel.TabIndex = 6; - modelLabel.Text = "model:"; - // // manuLabel // manuLabel.AutoSize = true; - manuLabel.Location = new System.Drawing.Point(22, 54); + manuLabel.Location = new System.Drawing.Point(16, 15); manuLabel.Name = "manuLabel"; - manuLabel.Size = new System.Drawing.Size(60, 22); + manuLabel.Size = new System.Drawing.Size(50, 18); manuLabel.TabIndex = 8; manuLabel.Text = "manu:"; // // supplyLabel // supplyLabel.AutoSize = true; - supplyLabel.Location = new System.Drawing.Point(22, 93); + supplyLabel.Location = new System.Drawing.Point(12, 54); supplyLabel.Name = "supplyLabel"; - supplyLabel.Size = new System.Drawing.Size(67, 22); + supplyLabel.Size = new System.Drawing.Size(54, 18); supplyLabel.TabIndex = 10; supplyLabel.Text = "supply:"; // // memoLabel // memoLabel.AutoSize = true; - memoLabel.Location = new System.Drawing.Point(22, 132); + memoLabel.Location = new System.Drawing.Point(11, 88); memoLabel.Name = "memoLabel"; - memoLabel.Size = new System.Drawing.Size(65, 22); + memoLabel.Size = new System.Drawing.Size(55, 18); memoLabel.TabIndex = 12; memoLabel.Text = "memo:"; // // priceLabel // priceLabel.AutoSize = true; - priceLabel.Location = new System.Drawing.Point(22, 249); + priceLabel.Location = new System.Drawing.Point(23, 249); priceLabel.Name = "priceLabel"; - priceLabel.Size = new System.Drawing.Size(53, 22); + priceLabel.Size = new System.Drawing.Size(43, 18); priceLabel.TabIndex = 18; priceLabel.Text = "price:"; // // label1 // label1.AutoSize = true; - label1.Location = new System.Drawing.Point(22, 288); + label1.Location = new System.Drawing.Point(30, 288); label1.Name = "label1"; - label1.Size = new System.Drawing.Size(42, 22); + label1.Size = new System.Drawing.Size(36, 18); label1.TabIndex = 20; label1.Text = "cate"; // - // dsMSSQL - // - this.dsMSSQL.DataSetName = "dsMSSQL"; - this.dsMSSQL.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; - // - // bs - // - this.bs.DataMember = "Items"; - this.bs.DataSource = this.dsMSSQL; - this.bs.CurrentChanged += new System.EventHandler(this.bs_CurrentChanged); - // - // ta - // - this.ta.ClearBeforeFill = true; - // - // tam - // - this.tam.BackupDataSetBeforeUpdate = false; - this.tam.InventoryTableAdapter = null; - this.tam.ItemsTableAdapter = this.ta; - this.tam.ProjectsTableAdapter = null; - this.tam.UpdateOrder = FCM0000.dsMSSQLTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete; - // // bn // this.bn.AddNewItem = null; @@ -271,17 +241,18 @@ this.dv.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2, + this.model, this.dataGridViewTextBoxColumn3}); this.dv.DataSource = this.bs; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("Tahoma", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.Padding = new System.Windows.Forms.Padding(1, 3, 1, 3); - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dv.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle4.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle4.Padding = new System.Windows.Forms.Padding(1, 3, 1, 3); + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dv.DefaultCellStyle = dataGridViewCellStyle4; this.dv.Dock = System.Windows.Forms.DockStyle.Fill; this.dv.Location = new System.Drawing.Point(0, 0); this.dv.Name = "dv"; @@ -289,20 +260,95 @@ this.dv.RowHeadersVisible = false; this.dv.RowTemplate.Height = 23; this.dv.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dv.Size = new System.Drawing.Size(513, 327); + this.dv.Size = new System.Drawing.Size(544, 327); this.dv.TabIndex = 1; this.dv.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dv_KeyDown); // + // panel1 + // + this.panel1.Controls.Add(this.textBox3); + this.panel1.Controls.Add(label2); + this.panel1.Controls.Add(this.textBox2); + this.panel1.Controls.Add(label1); + this.panel1.Controls.Add(this.textBox1); + this.panel1.Controls.Add(manuLabel); + this.panel1.Controls.Add(this.manuTextBox); + this.panel1.Controls.Add(supplyLabel); + this.panel1.Controls.Add(this.supplyTextBox); + this.panel1.Controls.Add(memoLabel); + this.panel1.Controls.Add(this.memoTextBox); + this.panel1.Controls.Add(priceLabel); + this.panel1.Controls.Add(this.priceTextBox); + this.panel1.Dock = System.Windows.Forms.DockStyle.Right; + this.panel1.Location = new System.Drawing.Point(544, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(290, 327); + this.panel1.TabIndex = 2; + // + // textBox1 + // + this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "cate", true)); + this.textBox1.Location = new System.Drawing.Point(75, 286); + this.textBox1.Name = "textBox1"; + this.textBox1.ReadOnly = true; + this.textBox1.Size = new System.Drawing.Size(200, 25); + this.textBox1.TabIndex = 21; + // + // manuTextBox + // + this.manuTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "manu", true)); + this.manuTextBox.Location = new System.Drawing.Point(75, 13); + this.manuTextBox.Name = "manuTextBox"; + this.manuTextBox.ReadOnly = true; + this.manuTextBox.Size = new System.Drawing.Size(200, 25); + this.manuTextBox.TabIndex = 9; + // + // supplyTextBox + // + this.supplyTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "supply", true)); + this.supplyTextBox.Location = new System.Drawing.Point(75, 52); + this.supplyTextBox.Name = "supplyTextBox"; + this.supplyTextBox.ReadOnly = true; + this.supplyTextBox.Size = new System.Drawing.Size(200, 25); + this.supplyTextBox.TabIndex = 11; + // + // memoTextBox + // + this.memoTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "memo", true)); + this.memoTextBox.Location = new System.Drawing.Point(75, 86); + this.memoTextBox.Multiline = true; + this.memoTextBox.Name = "memoTextBox"; + this.memoTextBox.ReadOnly = true; + this.memoTextBox.Size = new System.Drawing.Size(200, 120); + this.memoTextBox.TabIndex = 13; + // + // priceTextBox + // + this.priceTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "price", true)); + this.priceTextBox.Location = new System.Drawing.Point(75, 247); + this.priceTextBox.Name = "priceTextBox"; + this.priceTextBox.ReadOnly = true; + this.priceTextBox.Size = new System.Drawing.Size(200, 25); + this.priceTextBox.TabIndex = 19; + // + // model + // + this.model.DataPropertyName = "model"; + this.model.HeaderText = "model"; + this.model.Name = "model"; + this.model.ReadOnly = true; + this.model.Width = 74; + // // dataGridViewTextBoxColumn1 // this.dataGridViewTextBoxColumn1.DataPropertyName = "idx"; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle3; this.dataGridViewTextBoxColumn1.HeaderText = "IDX"; this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; this.dataGridViewTextBoxColumn1.ReadOnly = true; - this.dataGridViewTextBoxColumn1.Width = 66; + this.dataGridViewTextBoxColumn1.Width = 60; // // dataGridViewTextBoxColumn2 // @@ -318,82 +364,63 @@ this.dataGridViewTextBoxColumn3.HeaderText = "SID"; this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; this.dataGridViewTextBoxColumn3.ReadOnly = true; - this.dataGridViewTextBoxColumn3.Width = 66; + this.dataGridViewTextBoxColumn3.Width = 59; // - // panel1 + // bs // - this.panel1.Controls.Add(label1); - this.panel1.Controls.Add(this.textBox1); - this.panel1.Controls.Add(modelLabel); - this.panel1.Controls.Add(this.modelTextBox); - this.panel1.Controls.Add(manuLabel); - this.panel1.Controls.Add(this.manuTextBox); - this.panel1.Controls.Add(supplyLabel); - this.panel1.Controls.Add(this.supplyTextBox); - this.panel1.Controls.Add(memoLabel); - this.panel1.Controls.Add(this.memoTextBox); - this.panel1.Controls.Add(priceLabel); - this.panel1.Controls.Add(this.priceTextBox); - this.panel1.Dock = System.Windows.Forms.DockStyle.Right; - this.panel1.Location = new System.Drawing.Point(513, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(321, 327); - this.panel1.TabIndex = 2; + this.bs.DataMember = "Items"; + this.bs.DataSource = this.dsMSSQL; + this.bs.CurrentChanged += new System.EventHandler(this.bs_CurrentChanged); // - // textBox1 + // dsMSSQL // - this.textBox1.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "cate", true)); - this.textBox1.Location = new System.Drawing.Point(107, 285); - this.textBox1.Name = "textBox1"; - this.textBox1.ReadOnly = true; - this.textBox1.Size = new System.Drawing.Size(200, 28); - this.textBox1.TabIndex = 21; + this.dsMSSQL.DataSetName = "dsMSSQL"; + this.dsMSSQL.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // - // modelTextBox + // ta // - this.modelTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "model", true)); - this.modelTextBox.Location = new System.Drawing.Point(107, 12); - this.modelTextBox.Name = "modelTextBox"; - this.modelTextBox.ReadOnly = true; - this.modelTextBox.Size = new System.Drawing.Size(200, 28); - this.modelTextBox.TabIndex = 7; + this.ta.ClearBeforeFill = true; // - // manuTextBox + // tam // - this.manuTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "manu", true)); - this.manuTextBox.Location = new System.Drawing.Point(107, 51); - this.manuTextBox.Name = "manuTextBox"; - this.manuTextBox.ReadOnly = true; - this.manuTextBox.Size = new System.Drawing.Size(200, 28); - this.manuTextBox.TabIndex = 9; + this.tam.BackupDataSetBeforeUpdate = false; + this.tam.BoardTableAdapter = null; + this.tam.CommonTableAdapter = null; + this.tam.CustomsTableAdapter = null; + this.tam.InventoryTableAdapter = null; + this.tam.ItemsTableAdapter = this.ta; + this.tam.MailDataTableAdapter = null; + this.tam.MailFormTableAdapter = null; + this.tam.ProjectsTableAdapter = null; + this.tam.RequestItemTableAdapter = null; + this.tam.UpdateOrder = FCM0000.dsMSSQLTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete; // - // supplyTextBox + // label2 // - this.supplyTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "supply", true)); - this.supplyTextBox.Location = new System.Drawing.Point(107, 90); - this.supplyTextBox.Name = "supplyTextBox"; - this.supplyTextBox.ReadOnly = true; - this.supplyTextBox.Size = new System.Drawing.Size(200, 28); - this.supplyTextBox.TabIndex = 11; + label2.AutoSize = true; + label2.Location = new System.Drawing.Point(23, 218); + label2.Name = "label2"; + label2.Size = new System.Drawing.Size(41, 18); + label2.TabIndex = 22; + label2.Text = "Scale"; // - // memoTextBox + // textBox2 // - this.memoTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "memo", true)); - this.memoTextBox.Location = new System.Drawing.Point(107, 129); - this.memoTextBox.Multiline = true; - this.memoTextBox.Name = "memoTextBox"; - this.memoTextBox.ReadOnly = true; - this.memoTextBox.Size = new System.Drawing.Size(200, 111); - this.memoTextBox.TabIndex = 13; + this.textBox2.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "scale", true)); + this.textBox2.Location = new System.Drawing.Point(75, 215); + this.textBox2.Name = "textBox2"; + this.textBox2.ReadOnly = true; + this.textBox2.Size = new System.Drawing.Size(156, 25); + this.textBox2.TabIndex = 23; // - // priceTextBox + // textBox3 // - this.priceTextBox.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "price", true)); - this.priceTextBox.Location = new System.Drawing.Point(107, 246); - this.priceTextBox.Name = "priceTextBox"; - this.priceTextBox.ReadOnly = true; - this.priceTextBox.Size = new System.Drawing.Size(200, 28); - this.priceTextBox.TabIndex = 19; + this.textBox3.DataBindings.Add(new System.Windows.Forms.Binding("Text", this.bs, "unit", true)); + this.textBox3.Location = new System.Drawing.Point(237, 215); + this.textBox3.Name = "textBox3"; + this.textBox3.ReadOnly = true; + this.textBox3.Size = new System.Drawing.Size(38, 25); + this.textBox3.TabIndex = 24; // // fLovItem // @@ -402,18 +429,18 @@ this.Controls.Add(this.dv); this.Controls.Add(this.panel1); this.Controls.Add(this.bn); - this.Font = new System.Drawing.Font("Tahoma", 13F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Font = new System.Drawing.Font("Tahoma", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.Name = "fLovItem"; this.Text = "Select Item"; this.Load += new System.EventHandler(this.fLovItem_Load); - ((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bn)).EndInit(); this.bn.ResumeLayout(false); this.bn.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dv)).EndInit(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -438,7 +465,6 @@ private System.Windows.Forms.ToolStripButton btOK; private System.Windows.Forms.DataGridView dv; private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.TextBox modelTextBox; private System.Windows.Forms.TextBox manuTextBox; private System.Windows.Forms.TextBox supplyTextBox; private System.Windows.Forms.TextBox memoTextBox; @@ -446,7 +472,10 @@ private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn model; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.TextBox textBox2; } } \ No newline at end of file diff --git a/SubProject/FCM0000/fLovItem.resx b/SubProject/FCM0000/fLovItem.resx index fe872c7..04beeea 100644 --- a/SubProject/FCM0000/fLovItem.resx +++ b/SubProject/FCM0000/fLovItem.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - False - False @@ -135,20 +132,14 @@ False - - 216, 17 + + 321, 17 17, 17 - - 81, 17 - - - 143, 17 - - - 321, 17 + + 216, 17 @@ -198,4 +189,19 @@ dtINAGGiDUDGyGpoawAxeNSAQWkAORiqnRLAwAAA9EMMU8Daa3MAAAAASUVORK5CYII= + + True + + + False + + + 216, 17 + + + 81, 17 + + + 143, 17 + \ No newline at end of file diff --git a/SubProject/FCOMMON/DataBaseManager.cs b/SubProject/FCOMMON/DataBaseManager.cs index 10508b9..2317172 100644 --- a/SubProject/FCOMMON/DataBaseManager.cs +++ b/SubProject/FCOMMON/DataBaseManager.cs @@ -99,6 +99,23 @@ namespace FCOMMON where = string.Format(where, GroupCode); return getTwoColumnList("Common", "code", "memo", where, "code"); } + public static string getCodeSavlue(string GroupCode, string code) + { + var cn = getCn(); + cn.Open(); + var sql = "select isnull(SValue,'')" + + " from Common" + + " where Grp = '{0}' and code = '{1}'"; + + sql = string.Format(sql, GroupCode, code); + var cmd = new System.Data.SqlClient.SqlCommand(sql, cn); + var data = cmd.ExecuteScalar(); + cmd.Dispose(); + cn.Close(); + cn.Dispose(); + return data.ToString(); + + } public static System.Data.DataTable getCodeTable(string GroupCode = "99") { var list = getCodeList(GroupCode); diff --git a/SubProject/FEQ0000/FEQ0000.csproj b/SubProject/FEQ0000/FEQ0000.csproj index 2c3d853..d8e4aab 100644 --- a/SubProject/FEQ0000/FEQ0000.csproj +++ b/SubProject/FEQ0000/FEQ0000.csproj @@ -151,6 +151,7 @@ True Resources.resx + True @@ -219,7 +220,9 @@ FCOMMON - + + + + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,13 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + ..\Resources\action_save.gif;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + \ No newline at end of file diff --git a/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs b/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs index 230c918..6fb03f0 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs +++ b/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs @@ -40,6 +40,7 @@ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); this.dsPurchase = new FEQ0000.dsPurchase(); this.bs = new System.Windows.Forms.BindingSource(this.components); this.ta = new FEQ0000.dsPurchaseTableAdapters.PurchaseTableAdapter(); @@ -57,33 +58,42 @@ this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton(); this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.btSave = new System.Windows.Forms.ToolStripButton(); + this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripLabel5 = new System.Windows.Forms.ToolStripLabel(); + this.lbSum = new System.Windows.Forms.ToolStripLabel(); this.dv1 = new System.Windows.Forms.DataGridView(); this.cm1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.autoResizeColumnsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.viewThisUserDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); + this.lbStt = new System.Windows.Forms.ToolStripLabel(); this.dtSD = new System.Windows.Forms.ToolStripTextBox(); - this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel(); - this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel(); + this.lbEnd = new System.Windows.Forms.ToolStripLabel(); this.dtED = new System.Windows.Forms.ToolStripTextBox(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); + this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); + this.cmbState = new System.Windows.Forms.ToolStripComboBox(); + this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel(); this.tbRequest = new System.Windows.Forms.ToolStripTextBox(); this.btSearch = new System.Windows.Forms.ToolStripButton(); - this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.pumidx = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn11 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn12 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn14 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn15 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.supplyidx = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn17 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn19 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn20 = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -138,22 +148,26 @@ this.bindingNavigatorSeparator2, this.bindingNavigatorAddNewItem, this.bindingNavigatorDeleteItem, - this.toolStripButton1}); - this.bn.Location = new System.Drawing.Point(0, 515); + this.toolStripButton1, + this.btSave, + this.toolStripSeparator1, + this.toolStripLabel5, + this.lbSum}); + this.bn.Location = new System.Drawing.Point(0, 514); 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(811, 25); + this.bn.Size = new System.Drawing.Size(811, 26); this.bn.TabIndex = 0; this.bn.Text = "bindingNavigator1"; // // bindingNavigatorCountItem // this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; - this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22); + this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 23); this.bindingNavigatorCountItem.Text = "/{0}"; this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수"; // @@ -162,7 +176,7 @@ 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(78, 22); + this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(78, 23); this.bindingNavigatorDeleteItem.Text = "Delete(&D)"; // // bindingNavigatorMoveFirstItem @@ -171,7 +185,7 @@ 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.Size = new System.Drawing.Size(23, 23); this.bindingNavigatorMoveFirstItem.Text = "처음으로 이동"; // // bindingNavigatorMovePreviousItem @@ -180,13 +194,13 @@ 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.Size = new System.Drawing.Size(23, 23); this.bindingNavigatorMovePreviousItem.Text = "이전으로 이동"; // // bindingNavigatorSeparator // this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator"; - this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25); + this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 26); // // bindingNavigatorPositionItem // @@ -200,7 +214,7 @@ // bindingNavigatorSeparator1 // this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1"; - this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25); + this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 26); // // bindingNavigatorMoveNextItem // @@ -208,7 +222,7 @@ 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.Size = new System.Drawing.Size(23, 23); this.bindingNavigatorMoveNextItem.Text = "다음으로 이동"; // // bindingNavigatorMoveLastItem @@ -217,20 +231,20 @@ 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.Size = new System.Drawing.Size(23, 23); this.bindingNavigatorMoveLastItem.Text = "마지막으로 이동"; // // bindingNavigatorSeparator2 // this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2"; - this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25); + this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 26); // // bindingNavigatorAddNewItem // 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(65, 22); + this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(65, 23); this.bindingNavigatorAddNewItem.Text = "Add(&A)"; this.bindingNavigatorAddNewItem.Click += new System.EventHandler(this.bindingNavigatorAddNewItem_Click); // @@ -240,10 +254,37 @@ this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image"))); this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta; this.toolStripButton1.Name = "toolStripButton1"; - this.toolStripButton1.Size = new System.Drawing.Size(122, 22); + this.toolStripButton1.Size = new System.Drawing.Size(122, 23); this.toolStripButton1.Text = "Report(Summary)"; this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click_1); // + // btSave + // + this.btSave.Image = global::FEQ0000.Properties.Resources.action_save; + this.btSave.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btSave.Name = "btSave"; + this.btSave.Size = new System.Drawing.Size(67, 23); + this.btSave.Text = "Save(&S)"; + this.btSave.Click += new System.EventHandler(this.btSave_Click); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 26); + // + // toolStripLabel5 + // + this.toolStripLabel5.Name = "toolStripLabel5"; + this.toolStripLabel5.Size = new System.Drawing.Size(58, 23); + this.toolStripLabel5.Text = "Sub Total"; + // + // lbSum + // + this.lbSum.Font = new System.Drawing.Font("Tahoma", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.lbSum.Name = "lbSum"; + this.lbSum.Size = new System.Drawing.Size(22, 23); + this.lbSum.Text = "0"; + // // dv1 // this.dv1.AllowUserToAddRows = false; @@ -252,21 +293,22 @@ this.dv1.ColumnHeadersHeight = 30; this.dv1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.dv1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2, this.dataGridViewTextBoxColumn3, this.dataGridViewTextBoxColumn4, - this.dataGridViewTextBoxColumn5, - this.dataGridViewTextBoxColumn6, this.dataGridViewTextBoxColumn7, + this.dataGridViewTextBoxColumn6, + this.dataGridViewTextBoxColumn5, this.dataGridViewTextBoxColumn8, this.dataGridViewTextBoxColumn9, + this.pumidx, this.dataGridViewTextBoxColumn10, this.dataGridViewTextBoxColumn11, this.dataGridViewTextBoxColumn12, this.dataGridViewTextBoxColumn13, this.dataGridViewTextBoxColumn14, this.dataGridViewTextBoxColumn15, + this.supplyidx, this.dataGridViewTextBoxColumn17, this.dataGridViewTextBoxColumn19, this.dataGridViewTextBoxColumn20, @@ -277,19 +319,22 @@ this.dv1.DataSource = this.bs; this.dv1.Dock = System.Windows.Forms.DockStyle.Fill; this.dv1.Location = new System.Drawing.Point(0, 25); + this.dv1.MultiSelect = false; this.dv1.Name = "dv1"; this.dv1.ReadOnly = true; this.dv1.RowTemplate.Height = 23; this.dv1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dv1.Size = new System.Drawing.Size(811, 490); + this.dv1.Size = new System.Drawing.Size(811, 489); this.dv1.TabIndex = 2; + this.dv1.DoubleClick += new System.EventHandler(this.dv1_DoubleClick); // // cm1 // this.cm1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.autoResizeColumnsToolStripMenuItem}); + this.autoResizeColumnsToolStripMenuItem, + this.viewThisUserDataToolStripMenuItem}); this.cm1.Name = "contextMenuStrip1"; - this.cm1.Size = new System.Drawing.Size(186, 26); + this.cm1.Size = new System.Drawing.Size(186, 48); // // autoResizeColumnsToolStripMenuItem // @@ -298,14 +343,24 @@ this.autoResizeColumnsToolStripMenuItem.Text = "AutoResize Columns"; this.autoResizeColumnsToolStripMenuItem.Click += new System.EventHandler(this.autoResizeColumnsToolStripMenuItem_Click); // + // viewThisUserDataToolStripMenuItem + // + this.viewThisUserDataToolStripMenuItem.Name = "viewThisUserDataToolStripMenuItem"; + this.viewThisUserDataToolStripMenuItem.Size = new System.Drawing.Size(185, 22); + this.viewThisUserDataToolStripMenuItem.Text = "View This User data"; + this.viewThisUserDataToolStripMenuItem.Click += new System.EventHandler(this.viewThisUserDataToolStripMenuItem_Click); + // // toolStrip1 // this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripLabel1, + this.lbStt, this.dtSD, - this.toolStripLabel4, - this.toolStripLabel2, + this.lbEnd, this.dtED, + this.toolStripSeparator2, + this.toolStripLabel1, + this.cmbState, + this.toolStripSeparator3, this.toolStripLabel3, this.tbRequest, this.btSearch}); @@ -315,47 +370,69 @@ this.toolStrip1.TabIndex = 3; this.toolStrip1.Text = "toolStrip1"; // - // toolStripLabel1 + // lbStt // - this.toolStripLabel1.Name = "toolStripLabel1"; - this.toolStripLabel1.Size = new System.Drawing.Size(32, 22); - this.toolStripLabel1.Text = "Start"; + this.lbStt.Name = "lbStt"; + this.lbStt.Size = new System.Drawing.Size(41, 22); + this.lbStt.Text = "Period"; + this.lbStt.Click += new System.EventHandler(this.lbStt_Click); // // dtSD // this.dtSD.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.dtSD.Name = "dtSD"; this.dtSD.Size = new System.Drawing.Size(100, 25); + this.dtSD.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center; // - // toolStripLabel4 + // lbEnd // - this.toolStripLabel4.Name = "toolStripLabel4"; - this.toolStripLabel4.Size = new System.Drawing.Size(15, 22); - this.toolStripLabel4.Text = "~"; - // - // toolStripLabel2 - // - this.toolStripLabel2.Name = "toolStripLabel2"; - this.toolStripLabel2.Size = new System.Drawing.Size(27, 22); - this.toolStripLabel2.Text = "End"; + this.lbEnd.Name = "lbEnd"; + this.lbEnd.Size = new System.Drawing.Size(15, 22); + this.lbEnd.Text = "~"; + this.lbEnd.Click += new System.EventHandler(this.lbEnd_Click); // // dtED // this.dtED.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.dtED.Name = "dtED"; this.dtED.Size = new System.Drawing.Size(100, 25); + this.dtED.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); + // + // toolStripLabel1 + // + this.toolStripLabel1.Name = "toolStripLabel1"; + this.toolStripLabel1.Size = new System.Drawing.Size(34, 22); + this.toolStripLabel1.Text = "State"; + // + // cmbState + // + this.cmbState.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmbState.Name = "cmbState"; + this.cmbState.Size = new System.Drawing.Size(100, 25); + // + // toolStripSeparator3 + // + this.toolStripSeparator3.Name = "toolStripSeparator3"; + this.toolStripSeparator3.Size = new System.Drawing.Size(6, 25); // // toolStripLabel3 // this.toolStripLabel3.Name = "toolStripLabel3"; this.toolStripLabel3.Size = new System.Drawing.Size(66, 22); this.toolStripLabel3.Text = "User Name"; + this.toolStripLabel3.Click += new System.EventHandler(this.toolStripLabel3_Click); // // tbRequest // this.tbRequest.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.tbRequest.Name = "tbRequest"; - this.tbRequest.Size = new System.Drawing.Size(100, 25); + this.tbRequest.Size = new System.Drawing.Size(70, 25); + this.tbRequest.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.tbRequest.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tbRequest_KeyDown); // // btSearch @@ -367,17 +444,6 @@ this.btSearch.Text = "Refresh(&R)"; this.btSearch.Click += new System.EventHandler(this.btSearch_Click); // - // dataGridViewTextBoxColumn1 - // - this.dataGridViewTextBoxColumn1.DataPropertyName = "idx"; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this.dataGridViewTextBoxColumn1.DefaultCellStyle = dataGridViewCellStyle1; - this.dataGridViewTextBoxColumn1.HeaderText = "IDX"; - this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; - this.dataGridViewTextBoxColumn1.ReadOnly = true; - this.dataGridViewTextBoxColumn1.Width = 50; - // // dataGridViewTextBoxColumn2 // this.dataGridViewTextBoxColumn2.DataPropertyName = "pdate"; @@ -388,9 +454,9 @@ // dataGridViewTextBoxColumn3 // this.dataGridViewTextBoxColumn3.DataPropertyName = "stateName"; - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.dataGridViewTextBoxColumn3.DefaultCellStyle = dataGridViewCellStyle1; this.dataGridViewTextBoxColumn3.HeaderText = "State"; this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; this.dataGridViewTextBoxColumn3.ReadOnly = true; @@ -402,38 +468,38 @@ this.dataGridViewTextBoxColumn4.Name = "dataGridViewTextBoxColumn4"; this.dataGridViewTextBoxColumn4.ReadOnly = true; // - // dataGridViewTextBoxColumn5 - // - this.dataGridViewTextBoxColumn5.DataPropertyName = "receive"; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridViewTextBoxColumn5.DefaultCellStyle = dataGridViewCellStyle3; - this.dataGridViewTextBoxColumn5.HeaderText = "receive"; - this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; - this.dataGridViewTextBoxColumn5.ReadOnly = true; - // - // dataGridViewTextBoxColumn6 - // - this.dataGridViewTextBoxColumn6.DataPropertyName = "sc"; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridViewTextBoxColumn6.DefaultCellStyle = dataGridViewCellStyle4; - this.dataGridViewTextBoxColumn6.HeaderText = "sc#"; - this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; - this.dataGridViewTextBoxColumn6.ReadOnly = true; - // // dataGridViewTextBoxColumn7 // this.dataGridViewTextBoxColumn7.DataPropertyName = "request"; - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridViewTextBoxColumn7.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridViewTextBoxColumn7.DefaultCellStyle = dataGridViewCellStyle2; this.dataGridViewTextBoxColumn7.HeaderText = "request"; this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; this.dataGridViewTextBoxColumn7.ReadOnly = true; // + // dataGridViewTextBoxColumn6 + // + this.dataGridViewTextBoxColumn6.DataPropertyName = "sc"; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridViewTextBoxColumn6.DefaultCellStyle = dataGridViewCellStyle3; + this.dataGridViewTextBoxColumn6.HeaderText = "sc#"; + this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; + this.dataGridViewTextBoxColumn6.ReadOnly = true; + // + // dataGridViewTextBoxColumn5 + // + this.dataGridViewTextBoxColumn5.DataPropertyName = "receive"; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridViewTextBoxColumn5.DefaultCellStyle = dataGridViewCellStyle4; + this.dataGridViewTextBoxColumn5.HeaderText = "receive"; + this.dataGridViewTextBoxColumn5.Name = "dataGridViewTextBoxColumn5"; + this.dataGridViewTextBoxColumn5.ReadOnly = true; + // // dataGridViewTextBoxColumn8 // this.dataGridViewTextBoxColumn8.DataPropertyName = "sid"; - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridViewTextBoxColumn8.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridViewTextBoxColumn8.DefaultCellStyle = dataGridViewCellStyle5; this.dataGridViewTextBoxColumn8.HeaderText = "sid#"; this.dataGridViewTextBoxColumn8.Name = "dataGridViewTextBoxColumn8"; this.dataGridViewTextBoxColumn8.ReadOnly = true; @@ -445,6 +511,18 @@ this.dataGridViewTextBoxColumn9.Name = "dataGridViewTextBoxColumn9"; this.dataGridViewTextBoxColumn9.ReadOnly = true; // + // pumidx + // + this.pumidx.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.pumidx.DataPropertyName = "pumidx"; + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.pumidx.DefaultCellStyle = dataGridViewCellStyle6; + this.pumidx.HeaderText = "*"; + this.pumidx.Name = "pumidx"; + this.pumidx.ReadOnly = true; + this.pumidx.Width = 50; + // // dataGridViewTextBoxColumn10 // this.dataGridViewTextBoxColumn10.DataPropertyName = "pumscale"; @@ -496,6 +574,18 @@ this.dataGridViewTextBoxColumn15.Name = "dataGridViewTextBoxColumn15"; this.dataGridViewTextBoxColumn15.ReadOnly = true; // + // supplyidx + // + this.supplyidx.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; + this.supplyidx.DataPropertyName = "supplyidx"; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.supplyidx.DefaultCellStyle = dataGridViewCellStyle10; + this.supplyidx.HeaderText = "*"; + this.supplyidx.Name = "supplyidx"; + this.supplyidx.ReadOnly = true; + this.supplyidx.Width = 50; + // // dataGridViewTextBoxColumn17 // this.dataGridViewTextBoxColumn17.DataPropertyName = "project"; @@ -527,8 +617,8 @@ // dataGridViewTextBoxColumn22 // this.dataGridViewTextBoxColumn22.DataPropertyName = "po"; - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridViewTextBoxColumn22.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridViewTextBoxColumn22.DefaultCellStyle = dataGridViewCellStyle11; this.dataGridViewTextBoxColumn22.HeaderText = "PO"; this.dataGridViewTextBoxColumn22.Name = "dataGridViewTextBoxColumn22"; this.dataGridViewTextBoxColumn22.ReadOnly = true; @@ -585,10 +675,9 @@ private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2; private System.Windows.Forms.DataGridView dv1; private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ToolStripLabel toolStripLabel1; + private System.Windows.Forms.ToolStripLabel lbStt; private System.Windows.Forms.ToolStripTextBox dtSD; - private System.Windows.Forms.ToolStripLabel toolStripLabel4; - private System.Windows.Forms.ToolStripLabel toolStripLabel2; + private System.Windows.Forms.ToolStripLabel lbEnd; private System.Windows.Forms.ToolStripTextBox dtED; private System.Windows.Forms.ToolStripButton btSearch; private System.Windows.Forms.ContextMenuStrip cm1; @@ -596,21 +685,31 @@ private System.Windows.Forms.ToolStripLabel toolStripLabel3; private System.Windows.Forms.ToolStripTextBox tbRequest; private System.Windows.Forms.ToolStripButton toolStripButton1; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; + private System.Windows.Forms.ToolStripLabel toolStripLabel5; + private System.Windows.Forms.ToolStripLabel lbSum; + private System.Windows.Forms.ToolStripButton btSave; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; + private System.Windows.Forms.ToolStripLabel toolStripLabel1; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator3; + private System.Windows.Forms.ToolStripComboBox cmbState; + private System.Windows.Forms.ToolStripMenuItem viewThisUserDataToolStripMenuItem; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn4; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; - private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn6; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn5; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn8; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn9; + private System.Windows.Forms.DataGridViewTextBoxColumn pumidx; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn11; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn12; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn13; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn14; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn15; + private System.Windows.Forms.DataGridViewTextBoxColumn supplyidx; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn17; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn19; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn20; diff --git a/SubProject/FEQ0000/Purchase/fPurchase.cs b/SubProject/FEQ0000/Purchase/fPurchase.cs index 5cd3b28..c036f32 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase.cs +++ b/SubProject/FEQ0000/Purchase/fPurchase.cs @@ -15,6 +15,18 @@ namespace FEQ0000 { InitializeComponent(); this.dsPurchase.Purchase.TableNewRow += Purchase_TableNewRow; + if (FCOMMON.info.Login.level > 9) + { + dv1.SelectionMode = DataGridViewSelectionMode.CellSelect; + dv1.EditMode = DataGridViewEditMode.EditOnKeystrokeOrF2; + btSave.Visible = true; + } + else + { + dv1.SelectionMode = DataGridViewSelectionMode.FullRowSelect; + dv1.EditMode = DataGridViewEditMode.EditProgrammatically; + btSave.Visible = false; + } } void Purchase_TableNewRow(object sender, DataTableNewRowEventArgs e) @@ -36,10 +48,19 @@ namespace FEQ0000 this.tbRequest.Text = FCOMMON.info.Login.nameK; this.dtSD.Text = DateTime.Now.AddDays(-30).ToShortDateString(); this.dtED.Text = DateTime.Now.AddDays(10).ToShortDateString(); + + //state list + var stList = FCOMMON.DBM.getCodeList("04"); + this.cmbState.Items.Clear(); + cmbState.Items.Add("-- All --"); + foreach (var item in stList) + cmbState.Items.Add(item); + this.cmbState.SelectedIndex = 0; + refreshData(); } - private void purchaseBindingNavigatorSaveItem_Click(object sender, EventArgs e) + private void saveData() { this.Validate(); this.bs.EndEdit(); @@ -51,16 +72,27 @@ namespace FEQ0000 { try { + string state = "%"; + if (cmbState.SelectedIndex > 0) { + state = cmbState.Text.Split(',')[0].Substring(1); + } string request = "%"; if (tbRequest.Text.Trim() != "") request = "%" + this.tbRequest.Text.Trim() + "%"; - this.ta.Fill(this.dsPurchase.Purchase, dtSD.Text,dtED.Text,request); + this.ta.Fill(this.dsPurchase.Purchase, dtSD.Text, dtED.Text, request, state); if (!tbRequest.Text.isEmpty()) this.dv1.AutoResizeColumns(); + showSummary(); } catch (System.Exception ex) { System.Windows.Forms.MessageBox.Show(ex.Message); } - + } + void showSummary() + { + decimal sum = 0; + foreach (dsPurchase.PurchaseRow dr in this.dsPurchase.Purchase.Rows) + if(!dr.IspumamtNull()) sum += dr.pumamt; + lbSum.Text = sum.ToString("N0"); } private void btSearch_Click(object sender, EventArgs e) @@ -103,5 +135,65 @@ namespace FEQ0000 if(e.KeyCode == Keys.Enter) btSearch.PerformClick(); } + + private void btSave_Click(object sender, EventArgs e) + { + saveData(); + } + + private void dv1_DoubleClick(object sender, EventArgs e) + { + var drv = this.bs.Current as DataRowView; + if (drv == null) return; + var dr = drv.Row as dsPurchase.PurchaseRow; + + fPurchase_Add f = new fPurchase_Add(dr); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + this.ta.Update(dr); + dr.AcceptChanges(); + } + else dr.RejectChanges(); + } + + private void lbStt_Click(object sender, EventArgs e) + { + //start date + var list = FCOMMON.DBM.getGroupList("pdate", "purchase","", true); + FCM0000.fLovOneItem f = new FCM0000.fLovOneItem(list); + if(f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + dtSD.Text = f.Title; + dtED.Focus(); + } + } + + private void lbEnd_Click(object sender, EventArgs e) + { + //end date + var list = FCOMMON.DBM.getGroupList("pdate", "purchase", "pdate >= '" + dtSD.Text + "'", true); + FCM0000.fLovOneItem f = new FCM0000.fLovOneItem(list); + if (f.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + dtED.Text = f.Title; + btSearch.PerformClick(); + } + } + + private void toolStripLabel3_Click(object sender, EventArgs e) + { + //사용자목록처리 + tbRequest.Text = string.Empty; + btSearch.PerformClick(); + } + + private void viewThisUserDataToolStripMenuItem_Click(object sender, EventArgs e) + { + var drv = this.bs.Current as DataRowView; + if (drv == null) return; + if(drv["request"] == null) return; + this.tbRequest.Text = drv["request"].ToString(); + btSearch.PerformClick(); + } } } diff --git a/SubProject/FEQ0000/Purchase/fPurchase.resx b/SubProject/FEQ0000/Purchase/fPurchase.resx index 2901dde..f269f0c 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase.resx +++ b/SubProject/FEQ0000/Purchase/fPurchase.resx @@ -212,6 +212,12 @@ TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + True + + + True + 502, 17 diff --git a/SubProject/FEQ0000/Purchase/rPurchase.cs b/SubProject/FEQ0000/Purchase/rPurchase.cs index dc79b7e..f498db0 100644 --- a/SubProject/FEQ0000/Purchase/rPurchase.cs +++ b/SubProject/FEQ0000/Purchase/rPurchase.cs @@ -35,7 +35,7 @@ namespace FEQ0000.Purchase } void refreshData() { - this.ta.Fill(this.dsPurchase.Purchase, dtSD.Text, dtED.Text, "%"); + this.ta.Fill(this.dsPurchase.Purchase, dtSD.Text, dtED.Text, "%","%"); //Set DataSource Microsoft.Reporting.WinForms.ReportDataSource DsEQ = new Microsoft.Reporting.WinForms.ReportDataSource(); diff --git a/SubProject/FEQ0000/dsPurchase.Designer.cs b/SubProject/FEQ0000/dsPurchase.Designer.cs index ce87013..079a365 100644 --- a/SubProject/FEQ0000/dsPurchase.Designer.cs +++ b/SubProject/FEQ0000/dsPurchase.Designer.cs @@ -2132,12 +2132,13 @@ SELECT idx, pdate, state, process, receive, sc, request, sid, pumname, pumscale, wdate, import, pumidx, dbo.getCodeName('04', state) AS stateName FROM Purchase WHERE (pdate BETWEEN @sd AND @ed) AND (ISNULL(request, '') LIKE @request OR - ISNULL(receive, '') LIKE @request) + ISNULL(receive, '') LIKE @request) AND (ISNULL(state, '') LIKE @state) ORDER BY pdate DESC, idx DESC"; this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@sd", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ed", global::System.Data.SqlDbType.VarChar, 10, global::System.Data.ParameterDirection.Input, 0, 0, "pdate", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@request", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[0].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@state", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); this._commandCollection[1] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[1].Connection = this.Connection; this._commandCollection[1].CommandText = "DELETE FROM [Purchase] WHERE import = 1"; @@ -2148,7 +2149,7 @@ ORDER BY pdate DESC, idx DESC"; [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.Fill, true)] - public virtual int Fill(dsPurchase.PurchaseDataTable dataTable, string sd, string ed, string request) { + public virtual int Fill(dsPurchase.PurchaseDataTable dataTable, string sd, string ed, string request, string state) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((sd == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; @@ -2168,6 +2169,12 @@ ORDER BY pdate DESC, idx DESC"; else { this.Adapter.SelectCommand.Parameters[2].Value = ((string)(request)); } + if ((state == null)) { + throw new global::System.ArgumentNullException("state"); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = ((string)(state)); + } if ((this.ClearBeforeFill == true)) { dataTable.Clear(); } @@ -2179,7 +2186,7 @@ ORDER BY pdate DESC, idx DESC"; [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.Select, true)] - public virtual dsPurchase.PurchaseDataTable GetData(string sd, string ed, string request) { + public virtual dsPurchase.PurchaseDataTable GetData(string sd, string ed, string request, string state) { this.Adapter.SelectCommand = this.CommandCollection[0]; if ((sd == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; @@ -2199,6 +2206,12 @@ ORDER BY pdate DESC, idx DESC"; else { this.Adapter.SelectCommand.Parameters[2].Value = ((string)(request)); } + if ((state == null)) { + throw new global::System.ArgumentNullException("state"); + } + else { + this.Adapter.SelectCommand.Parameters[3].Value = ((string)(state)); + } dsPurchase.PurchaseDataTable dataTable = new dsPurchase.PurchaseDataTable(); this.Adapter.Fill(dataTable); return dataTable; diff --git a/SubProject/FEQ0000/dsPurchase.xsd b/SubProject/FEQ0000/dsPurchase.xsd index 9bf6639..421611f 100644 --- a/SubProject/FEQ0000/dsPurchase.xsd +++ b/SubProject/FEQ0000/dsPurchase.xsd @@ -104,12 +104,13 @@ SELECT idx, pdate, state, process, receive, sc, request, sid, pumname, pumscale, wdate, import, pumidx, dbo.getCodeName('04', state) AS stateName FROM Purchase WHERE (pdate BETWEEN @sd AND @ed) AND (ISNULL(request, '') LIKE @request OR - ISNULL(receive, '') LIKE @request) + ISNULL(receive, '') LIKE @request) AND (ISNULL(state, '') LIKE @state) ORDER BY pdate DESC, idx DESC + @@ -246,7 +247,7 @@ SELECT idx, pdate, state, process, receive, sc, request, sid, pumname, pumscale, - +