From 45a3def8e177d6745cb61adebf3588aa367ae299 Mon Sep 17 00:00:00 2001 From: "chikyun.kim" Date: Tue, 30 Oct 2018 17:29:21 +0900 Subject: [PATCH] .. --- Project/History.txt | 4 +- Project/Properties/AssemblyInfo.cs | 4 +- SubProject/FCM0000/FCM0000.csproj | 26 ++ SubProject/FCM0000/dsMSSQL.Designer.cs | 83 +++- SubProject/FCM0000/dsMSSQL.xsd | 33 +- SubProject/FCM0000/fInventory.Designer.cs | 413 ++++++++++-------- SubProject/FCM0000/fInventory.cs | 32 +- SubProject/FCM0000/fInventory.resx | 50 ++- SubProject/FCM0000/fLovItem.Designer.cs | 91 ++-- SubProject/FCM0000/fLovItem.cs | 63 +-- .../FEQ0000/Purchase/fPurchase.Designer.cs | 33 +- SubProject/FEQ0000/Purchase/fPurchase.cs | 64 ++- .../Purchase/fPurchase_Import.Designer.cs | 103 +++-- .../FEQ0000/Purchase/fPurchase_Import.cs | 2 +- SubProject/FEQ0000/dsPurchase.Designer.cs | 19 +- SubProject/FEQ0000/dsPurchase.xsd | 14 +- 16 files changed, 670 insertions(+), 364 deletions(-) diff --git a/Project/History.txt b/Project/History.txt index 0363c45..031e09d 100644 --- a/Project/History.txt +++ b/Project/History.txt @@ -1,4 +1,6 @@ -181023 chi getAuth_Purchase, 추가 +181030 chi 구매시 - 서플라이 검색 기능 추가됨, 날짜 입력 편하게 됨 + indate 가 자동 활성화되는 현상 수정 +181023 chi getAuth_Purchase, 추가 181004 chi 장비목록 출력물이 나오지 않는 현상 제거 (resource path 오류) 장비목록 내부검색기능 추가 180917 chi diff --git a/Project/Properties/AssemblyInfo.cs b/Project/Properties/AssemblyInfo.cs index 1df7b53..3cf0fcb 100644 --- a/Project/Properties/AssemblyInfo.cs +++ b/Project/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호가 자동으로 // 지정되도록 할 수 있습니다. // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("18.10.29.1000")] -[assembly: AssemblyFileVersion("18.10.29.1000")] +[assembly: AssemblyVersion("18.10.30.1700")] +[assembly: AssemblyFileVersion("18.10.30.1700")] diff --git a/SubProject/FCM0000/FCM0000.csproj b/SubProject/FCM0000/FCM0000.csproj index 38e7915..cb292ca 100644 --- a/SubProject/FCM0000/FCM0000.csproj +++ b/SubProject/FCM0000/FCM0000.csproj @@ -134,6 +134,11 @@ True dsMSSQL.xsd + + True + True + DSReport.xsd + Form @@ -194,6 +199,12 @@ fSelectDate.cs + + Form + + + RepInvStock.cs + @@ -236,6 +247,10 @@ fSelectDate.cs + + + RepInvStock.cs + ResXFileCodeGenerator @@ -260,6 +275,17 @@ dsMSSQL.xsd + + DSReport.xsd + + + Designer + MSDataSetGenerator + DSReport.Designer.cs + + + DSReport.xsd + SettingsSingleFileGenerator diff --git a/SubProject/FCM0000/dsMSSQL.Designer.cs b/SubProject/FCM0000/dsMSSQL.Designer.cs index e515440..a2706e1 100644 --- a/SubProject/FCM0000/dsMSSQL.Designer.cs +++ b/SubProject/FCM0000/dsMSSQL.Designer.cs @@ -8695,7 +8695,7 @@ SELECT idx, pdate, uid, item, serial, dr_qty, dr_amt, cr_qty, cr_amt, memo, proj [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] private void InitCommandCollection() { - this._commandCollection = new global::System.Data.SqlClient.SqlCommand[2]; + this._commandCollection = new global::System.Data.SqlClient.SqlCommand[3]; this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[0].Connection = this.Connection; this._commandCollection[0].CommandText = "SELECT idx, pdate, uid, item, serial, dr_qty, dr_amt, cr_qty, cr_amt, memo, proj" + @@ -8704,13 +8704,22 @@ SELECT idx, pdate, uid, item, serial, dr_qty, dr_amt, cr_qty, cr_amt, memo, proj 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 ItemName, cr_amt, cr_qty, dr_amt, dr_qty, idx, invtype, item, memo, pdate," + - " project, projectName, serial, uid, wdate, wuid FROM Inventory WHERE (pdate BETW" + - "EEN @sd AND @ed) AND (uid = @uid) ORDER BY pdate"; + this._commandCollection[1].CommandText = "SELECT idx, pdate, uid, item, serial, dr_qty, dr_amt, cr_qty, cr_amt, memo, proj" + + "ect, wuid, wdate, invtype, ItemName, projectName\r\nFROM Inventory\r\nWHERE (pd" + + "ate BETWEEN @sd AND @ed) AND (dbo.getUserName(uid) = @uname)\r\nORDER BY pdate"; this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; this._commandCollection[1].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[1].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[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@uid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "uid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); + this._commandCollection[1].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@uname", global::System.Data.SqlDbType.VarChar, 1024, global::System.Data.ParameterDirection.Input, 0, 0, "", 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 ItemName, cr_amt, cr_qty, dr_amt, dr_qty, idx, invtype, item, memo, pdate," + + " project, projectName, serial, uid, wdate, wuid FROM Inventory WHERE (pdate BETW" + + "EEN @sd AND @ed) AND (uid = @uid) ORDER BY pdate"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[2].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[2].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[2].Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@uid", global::System.Data.SqlDbType.VarChar, 20, global::System.Data.ParameterDirection.Input, 0, 0, "uid", global::System.Data.DataRowVersion.Current, false, null, "", "", "")); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] @@ -8741,7 +8750,7 @@ SELECT idx, pdate, uid, item, serial, dr_qty, dr_amt, cr_qty, cr_amt, memo, proj [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 FillByUID(dsMSSQL.InventoryDataTable dataTable, string sd, string ed, string uid) { + public virtual int FillByName(dsMSSQL.InventoryDataTable dataTable, string sd, string ed, string uname) { this.Adapter.SelectCommand = this.CommandCollection[1]; if ((sd == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; @@ -8755,6 +8764,66 @@ SELECT idx, pdate, uid, item, serial, dr_qty, dr_amt, cr_qty, cr_amt, memo, proj else { this.Adapter.SelectCommand.Parameters[1].Value = ((string)(ed)); } + if ((uname == null)) { + throw new global::System.ArgumentNullException("uname"); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(uname)); + } + if ((this.ClearBeforeFill == true)) { + dataTable.Clear(); + } + int returnValue = this.Adapter.Fill(dataTable); + return returnValue; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual dsMSSQL.InventoryDataTable GetbyName(string sd, string ed, string uname) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((sd == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(sd)); + } + if ((ed == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(ed)); + } + if ((uname == null)) { + throw new global::System.ArgumentNullException("uname"); + } + else { + this.Adapter.SelectCommand.Parameters[2].Value = ((string)(uname)); + } + dsMSSQL.InventoryDataTable dataTable = new dsMSSQL.InventoryDataTable(); + this.Adapter.Fill(dataTable); + return dataTable; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] + public virtual int FillByUID(dsMSSQL.InventoryDataTable dataTable, string sd, string ed, string uid) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((sd == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(sd)); + } + if ((ed == null)) { + this.Adapter.SelectCommand.Parameters[1].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[1].Value = ((string)(ed)); + } if ((uid == null)) { this.Adapter.SelectCommand.Parameters[2].Value = global::System.DBNull.Value; } @@ -8773,7 +8842,7 @@ SELECT idx, pdate, uid, item, serial, dr_qty, dr_amt, cr_qty, cr_amt, memo, proj [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] public virtual dsMSSQL.InventoryDataTable GetbyUID(string sd, string ed, string uid) { - this.Adapter.SelectCommand = this.CommandCollection[1]; + this.Adapter.SelectCommand = this.CommandCollection[2]; if ((sd == null)) { this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; } diff --git a/SubProject/FCM0000/dsMSSQL.xsd b/SubProject/FCM0000/dsMSSQL.xsd index 4ed1597..24434f5 100644 --- a/SubProject/FCM0000/dsMSSQL.xsd +++ b/SubProject/FCM0000/dsMSSQL.xsd @@ -341,6 +341,21 @@ SELECT idx, pdate, uid, item, serial, dr_qty, dr_amt, cr_qty, cr_amt, memo, proj + + + + SELECT idx, pdate, uid, item, serial, dr_qty, dr_amt, cr_qty, cr_amt, memo, project, wuid, wdate, invtype, ItemName, projectName +FROM Inventory +WHERE (pdate BETWEEN @sd AND @ed) AND (dbo.getUserName(uid) = @uname) +ORDER BY pdate + + + + + + + + @@ -1148,7 +1163,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1222,7 +1237,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1292,7 +1307,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1363,7 +1378,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1408,7 +1423,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1475,7 +1490,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1534,7 +1549,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1598,7 +1613,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + @@ -1687,7 +1702,7 @@ where name like @search or tel like @search or email like @search or memo like @ - + diff --git a/SubProject/FCM0000/fInventory.Designer.cs b/SubProject/FCM0000/fInventory.Designer.cs index 2ddece0..b39df30 100644 --- a/SubProject/FCM0000/fInventory.Designer.cs +++ b/SubProject/FCM0000/fInventory.Designer.cs @@ -30,42 +30,45 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(fInventory)); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle(); - this.dsMSSQL = new FCM0000.dsMSSQL(); - this.bs = new System.Windows.Forms.BindingSource(this.components); - this.ta = new FCM0000.dsMSSQLTableAdapters.InventoryTableAdapter(); - this.tam = new FCM0000.dsMSSQLTableAdapters.TableAdapterManager(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + 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(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); this.bn = new System.Windows.Forms.BindingNavigator(this.components); - this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel(); - this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton(); - this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton(); - this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator(); this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox(); this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator(); - this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton(); - this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.inventoryBindingNavigatorSaveItem = new System.Windows.Forms.ToolStripButton(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripLabel3 = new System.Windows.Forms.ToolStripLabel(); - this.toolStripTextBox1 = new System.Windows.Forms.ToolStripTextBox(); - this.tbFind = new System.Windows.Forms.ToolStripButton(); + this.tbFind = new System.Windows.Forms.ToolStripTextBox(); this.cm1 = new System.Windows.Forms.ContextMenuStrip(this.components); this.autoColumnsSizeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStripLabel1 = 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.dtED = new System.Windows.Forms.ToolStripTextBox(); this.btSearch = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton(); + this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton(); + this.inventoryBindingNavigatorSaveItem = new System.Windows.Forms.ToolStripButton(); + this.btFind = new System.Windows.Forms.ToolStripButton(); + this.toolStripButton1 = new System.Windows.Forms.ToolStripButton(); + this.bs = new System.Windows.Forms.BindingSource(this.components); + this.dsMSSQL = new FCM0000.dsMSSQL(); + this.ta = new FCM0000.dsMSSQLTableAdapters.InventoryTableAdapter(); + this.tam = new FCM0000.dsMSSQLTableAdapters.TableAdapterManager(); this.taItem = new FCM0000.dsMSSQLTableAdapters.ItemsTableAdapter(); + this.taPrj = new FCM0000.dsMSSQLTableAdapters.ProjectsTableAdapter(); this.dv1 = new arCtl.arDatagridView(); this.dvc_iffnvtype = new System.Windows.Forms.DataGridViewComboBoxColumn(); this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -77,40 +80,18 @@ this.dataGridViewTextBoxColumn6 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn10 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.taPrj = new FCM0000.dsMSSQLTableAdapters.ProjectsTableAdapter(); - this.toolStripLabel4 = new System.Windows.Forms.ToolStripLabel(); - ((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); + this.toolStripLabel5 = new System.Windows.Forms.ToolStripLabel(); + this.tbName = new System.Windows.Forms.ToolStripTextBox(); + this.toolStripSeparator2 = new System.Windows.Forms.ToolStripSeparator(); ((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit(); this.bn.SuspendLayout(); this.cm1.SuspendLayout(); this.toolStrip1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit(); this.SuspendLayout(); // - // dsMSSQL - // - this.dsMSSQL.DataSetName = "dsMSSQL"; - this.dsMSSQL.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; - // - // bs - // - this.bs.DataMember = "Inventory"; - this.bs.DataSource = this.dsMSSQL; - this.bs.Sort = ""; - // - // ta - // - this.ta.ClearBeforeFill = true; - // - // tam - // - this.tam.BackupDataSetBeforeUpdate = false; - this.tam.InventoryTableAdapter = this.ta; - this.tam.ItemsTableAdapter = null; - this.tam.ProjectsTableAdapter = null; - this.tam.UpdateOrder = FCM0000.dsMSSQLTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete; - // // bn // this.bn.AddNewItem = this.bindingNavigatorAddNewItem; @@ -133,8 +114,9 @@ this.inventoryBindingNavigatorSaveItem, this.toolStripSeparator1, this.toolStripLabel3, - this.toolStripTextBox1, - this.tbFind}); + this.tbFind, + this.btFind, + this.toolStripButton1}); this.bn.Location = new System.Drawing.Point(0, 388); this.bn.MoveFirstItem = this.bindingNavigatorMoveFirstItem; this.bn.MoveLastItem = this.bindingNavigatorMoveLastItem; @@ -146,6 +128,131 @@ this.bn.TabIndex = 0; this.bn.Text = "bindingNavigator1"; // + // bindingNavigatorCountItem + // + this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; + this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22); + this.bindingNavigatorCountItem.Text = "/{0}"; + this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수"; + // + // bindingNavigatorSeparator + // + this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator"; + this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25); + // + // bindingNavigatorPositionItem + // + this.bindingNavigatorPositionItem.AccessibleName = "위치"; + this.bindingNavigatorPositionItem.AutoSize = false; + this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem"; + this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23); + this.bindingNavigatorPositionItem.Text = "0"; + this.bindingNavigatorPositionItem.ToolTipText = "현재 위치"; + // + // bindingNavigatorSeparator1 + // + this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1"; + this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25); + // + // bindingNavigatorSeparator2 + // + this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2"; + this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25); + // + // toolStripSeparator1 + // + this.toolStripSeparator1.Name = "toolStripSeparator1"; + this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); + // + // toolStripLabel3 + // + this.toolStripLabel3.Name = "toolStripLabel3"; + this.toolStripLabel3.Size = new System.Drawing.Size(28, 22); + this.toolStripLabel3.Text = "find"; + this.toolStripLabel3.Click += new System.EventHandler(this.toolStripLabel3_Click); + // + // tbFind + // + this.tbFind.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tbFind.Name = "tbFind"; + this.tbFind.Size = new System.Drawing.Size(100, 25); + this.tbFind.KeyDown += new System.Windows.Forms.KeyEventHandler(this.toolStripTextBox1_KeyDown); + this.tbFind.Click += new System.EventHandler(this.toolStripTextBox1_Click); + this.tbFind.TextChanged += new System.EventHandler(this.toolStripTextBox1_TextChanged); + // + // cm1 + // + this.cm1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.autoColumnsSizeToolStripMenuItem}); + this.cm1.Name = "cm1"; + this.cm1.Size = new System.Drawing.Size(175, 26); + // + // autoColumnsSizeToolStripMenuItem + // + this.autoColumnsSizeToolStripMenuItem.Name = "autoColumnsSizeToolStripMenuItem"; + this.autoColumnsSizeToolStripMenuItem.Size = new System.Drawing.Size(174, 22); + this.autoColumnsSizeToolStripMenuItem.Text = "AutoColumns Size"; + this.autoColumnsSizeToolStripMenuItem.Click += new System.EventHandler(this.autoColumnsSizeToolStripMenuItem_Click); + // + // toolStrip1 + // + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripLabel1, + this.dtSD, + this.toolStripLabel4, + this.toolStripLabel2, + this.dtED, + this.toolStripLabel5, + this.tbName, + this.toolStripSeparator2, + this.btSearch}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(762, 25); + this.toolStrip1.TabIndex = 2; + this.toolStrip1.Text = "toolStrip1"; + // + // toolStripLabel1 + // + this.toolStripLabel1.Name = "toolStripLabel1"; + this.toolStripLabel1.Size = new System.Drawing.Size(32, 22); + this.toolStripLabel1.Text = "Start"; + this.toolStripLabel1.Click += new System.EventHandler(this.toolStripLabel1_Click); + // + // dtSD + // + this.dtSD.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.dtSD.Name = "dtSD"; + this.dtSD.Size = new System.Drawing.Size(100, 25); + // + // toolStripLabel4 + // + 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.toolStripLabel2.Click += new System.EventHandler(this.toolStripLabel2_Click); + // + // dtED + // + this.dtED.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.dtED.Name = "dtED"; + this.dtED.Size = new System.Drawing.Size(100, 25); + // + // btSearch + // + this.btSearch.Image = ((System.Drawing.Image)(resources.GetObject("btSearch.Image"))); + this.btSearch.ImageTransparentColor = System.Drawing.Color.Magenta; + this.btSearch.Name = "btSearch"; + this.btSearch.Size = new System.Drawing.Size(81, 22); + this.btSearch.Text = "Refresh(&R)"; + this.btSearch.Click += new System.EventHandler(this.btSearch_Click); + // // bindingNavigatorAddNewItem // this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image"))); @@ -154,13 +261,6 @@ this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(65, 22); this.bindingNavigatorAddNewItem.Text = "Add(&A)"; // - // bindingNavigatorCountItem - // - this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; - this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22); - this.bindingNavigatorCountItem.Text = "/{0}"; - this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수"; - // // bindingNavigatorDeleteItem // this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image"))); @@ -187,25 +287,6 @@ this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22); this.bindingNavigatorMovePreviousItem.Text = "이전으로 이동"; // - // bindingNavigatorSeparator - // - this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator"; - this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25); - // - // bindingNavigatorPositionItem - // - this.bindingNavigatorPositionItem.AccessibleName = "위치"; - this.bindingNavigatorPositionItem.AutoSize = false; - this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem"; - this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23); - this.bindingNavigatorPositionItem.Text = "0"; - this.bindingNavigatorPositionItem.ToolTipText = "현재 위치"; - // - // bindingNavigatorSeparator1 - // - this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1"; - this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25); - // // bindingNavigatorMoveNextItem // this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -224,11 +305,6 @@ this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22); this.bindingNavigatorMoveLastItem.Text = "마지막으로 이동"; // - // bindingNavigatorSeparator2 - // - this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2"; - this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25); - // // inventoryBindingNavigatorSaveItem // this.inventoryBindingNavigatorSaveItem.Image = ((System.Drawing.Image)(resources.GetObject("inventoryBindingNavigatorSaveItem.Image"))); @@ -237,102 +313,61 @@ this.inventoryBindingNavigatorSaveItem.Text = "Save(&S)"; this.inventoryBindingNavigatorSaveItem.Click += new System.EventHandler(this.inventoryBindingNavigatorSaveItem_Click); // - // toolStripSeparator1 + // btFind // - this.toolStripSeparator1.Name = "toolStripSeparator1"; - this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25); + 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(50, 22); + this.btFind.Text = "Find"; // - // toolStripLabel3 + // toolStripButton1 // - this.toolStripLabel3.Name = "toolStripLabel3"; - this.toolStripLabel3.Size = new System.Drawing.Size(28, 22); - this.toolStripLabel3.Text = "find"; + this.toolStripButton1.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + 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(63, 22); + this.toolStripButton1.Text = "재고장"; + this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click); // - // toolStripTextBox1 + // bs // - this.toolStripTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.toolStripTextBox1.Name = "toolStripTextBox1"; - this.toolStripTextBox1.Size = new System.Drawing.Size(100, 25); - this.toolStripTextBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.toolStripTextBox1_KeyDown); - this.toolStripTextBox1.Click += new System.EventHandler(this.toolStripTextBox1_Click); - this.toolStripTextBox1.TextChanged += new System.EventHandler(this.toolStripTextBox1_TextChanged); + this.bs.DataMember = "Inventory"; + this.bs.DataSource = this.dsMSSQL; + this.bs.Sort = ""; // - // tbFind + // dsMSSQL // - this.tbFind.Image = ((System.Drawing.Image)(resources.GetObject("tbFind.Image"))); - this.tbFind.ImageTransparentColor = System.Drawing.Color.Magenta; - this.tbFind.Name = "tbFind"; - this.tbFind.Size = new System.Drawing.Size(50, 22); - this.tbFind.Text = "Find"; + this.dsMSSQL.DataSetName = "dsMSSQL"; + this.dsMSSQL.SchemaSerializationMode = System.Data.SchemaSerializationMode.IncludeSchema; // - // cm1 + // ta // - this.cm1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.autoColumnsSizeToolStripMenuItem}); - this.cm1.Name = "cm1"; - this.cm1.Size = new System.Drawing.Size(175, 26); + this.ta.ClearBeforeFill = true; // - // autoColumnsSizeToolStripMenuItem + // tam // - this.autoColumnsSizeToolStripMenuItem.Name = "autoColumnsSizeToolStripMenuItem"; - this.autoColumnsSizeToolStripMenuItem.Size = new System.Drawing.Size(174, 22); - this.autoColumnsSizeToolStripMenuItem.Text = "AutoColumns Size"; - this.autoColumnsSizeToolStripMenuItem.Click += new System.EventHandler(this.autoColumnsSizeToolStripMenuItem_Click); - // - // toolStrip1 - // - this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripLabel1, - this.dtSD, - this.toolStripLabel4, - this.toolStripLabel2, - this.dtED, - this.btSearch}); - this.toolStrip1.Location = new System.Drawing.Point(0, 0); - this.toolStrip1.Name = "toolStrip1"; - this.toolStrip1.Size = new System.Drawing.Size(762, 25); - this.toolStrip1.TabIndex = 2; - this.toolStrip1.Text = "toolStrip1"; - // - // toolStripLabel1 - // - this.toolStripLabel1.Name = "toolStripLabel1"; - this.toolStripLabel1.Size = new System.Drawing.Size(32, 22); - this.toolStripLabel1.Text = "Start"; - this.toolStripLabel1.Click += new System.EventHandler(this.toolStripLabel1_Click); - // - // dtSD - // - this.dtSD.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.dtSD.Name = "dtSD"; - this.dtSD.Size = new System.Drawing.Size(100, 25); - // - // toolStripLabel2 - // - this.toolStripLabel2.Name = "toolStripLabel2"; - this.toolStripLabel2.Size = new System.Drawing.Size(27, 22); - this.toolStripLabel2.Text = "End"; - this.toolStripLabel2.Click += new System.EventHandler(this.toolStripLabel2_Click); - // - // dtED - // - this.dtED.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.dtED.Name = "dtED"; - this.dtED.Size = new System.Drawing.Size(100, 25); - // - // btSearch - // - this.btSearch.Image = ((System.Drawing.Image)(resources.GetObject("btSearch.Image"))); - this.btSearch.ImageTransparentColor = System.Drawing.Color.Magenta; - this.btSearch.Name = "btSearch"; - this.btSearch.Size = new System.Drawing.Size(81, 22); - this.btSearch.Text = "Refresh(&R)"; - this.btSearch.Click += new System.EventHandler(this.btSearch_Click); + this.tam.BackupDataSetBeforeUpdate = false; + this.tam.BoardTableAdapter = null; + this.tam.CommonTableAdapter = null; + this.tam.CustomsTableAdapter = null; + this.tam.InventoryTableAdapter = this.ta; + this.tam.ItemsTableAdapter = null; + this.tam.MailDataTableAdapter = null; + this.tam.MailFormTableAdapter = null; + this.tam.ProjectsTableAdapter = null; + this.tam.RequestItemTableAdapter = null; + this.tam.UpdateOrder = FCM0000.dsMSSQLTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete; // // taItem // this.taItem.ClearBeforeFill = true; // + // taPrj + // + this.taPrj.ClearBeforeFill = true; + // // dv1 // this.dv1.A_DelCurrentCell = true; @@ -385,8 +420,8 @@ // dvc_projectname // this.dvc_projectname.DataPropertyName = "projectName"; - dataGridViewCellStyle25.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); - this.dvc_projectname.DefaultCellStyle = dataGridViewCellStyle25; + dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); + this.dvc_projectname.DefaultCellStyle = dataGridViewCellStyle7; this.dvc_projectname.HeaderText = "Project"; this.dvc_projectname.Name = "dvc_projectname"; this.dvc_projectname.Width = 69; @@ -394,9 +429,9 @@ // dvc_project // this.dvc_project.DataPropertyName = "project"; - dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle26.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this.dvc_project.DefaultCellStyle = dataGridViewCellStyle26; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.dvc_project.DefaultCellStyle = dataGridViewCellStyle8; this.dvc_project.HeaderText = "idx"; this.dvc_project.Name = "dvc_project"; this.dvc_project.Width = 47; @@ -404,8 +439,8 @@ // dvc_itemName // this.dvc_itemName.DataPropertyName = "itemName"; - dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); - this.dvc_itemName.DefaultCellStyle = dataGridViewCellStyle27; + dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(224)))), ((int)(((byte)(192))))); + this.dvc_itemName.DefaultCellStyle = dataGridViewCellStyle9; this.dvc_itemName.HeaderText = "Item"; this.dvc_itemName.Name = "dvc_itemName"; this.dvc_itemName.Width = 54; @@ -413,9 +448,9 @@ // dvc_item // this.dvc_item.DataPropertyName = "item"; - dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle28.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); - this.dvc_item.DefaultCellStyle = dataGridViewCellStyle28; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224))))); + this.dvc_item.DefaultCellStyle = dataGridViewCellStyle10; this.dvc_item.HeaderText = "idx"; this.dvc_item.Name = "dvc_item"; this.dvc_item.Width = 47; @@ -430,8 +465,8 @@ // dataGridViewTextBoxColumn6 // this.dataGridViewTextBoxColumn6.DataPropertyName = "dr_qty"; - dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridViewTextBoxColumn6.DefaultCellStyle = dataGridViewCellStyle29; + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridViewTextBoxColumn6.DefaultCellStyle = dataGridViewCellStyle11; this.dataGridViewTextBoxColumn6.HeaderText = "Qty"; this.dataGridViewTextBoxColumn6.Name = "dataGridViewTextBoxColumn6"; this.dataGridViewTextBoxColumn6.Width = 64; @@ -439,8 +474,8 @@ // dataGridViewTextBoxColumn7 // this.dataGridViewTextBoxColumn7.DataPropertyName = "dr_amt"; - dataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - this.dataGridViewTextBoxColumn7.DefaultCellStyle = dataGridViewCellStyle30; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this.dataGridViewTextBoxColumn7.DefaultCellStyle = dataGridViewCellStyle12; this.dataGridViewTextBoxColumn7.HeaderText = "Amt"; this.dataGridViewTextBoxColumn7.Name = "dataGridViewTextBoxColumn7"; this.dataGridViewTextBoxColumn7.Width = 68; @@ -452,15 +487,23 @@ this.dataGridViewTextBoxColumn10.Name = "dataGridViewTextBoxColumn10"; this.dataGridViewTextBoxColumn10.Width = 66; // - // taPrj + // toolStripLabel5 // - this.taPrj.ClearBeforeFill = true; + this.toolStripLabel5.Name = "toolStripLabel5"; + this.toolStripLabel5.Size = new System.Drawing.Size(30, 22); + this.toolStripLabel5.Text = "User"; // - // toolStripLabel4 + // tbName // - this.toolStripLabel4.Name = "toolStripLabel4"; - this.toolStripLabel4.Size = new System.Drawing.Size(15, 22); - this.toolStripLabel4.Text = "~"; + this.tbName.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.tbName.Name = "tbName"; + this.tbName.Size = new System.Drawing.Size(100, 25); + this.tbName.TextBoxTextAlign = System.Windows.Forms.HorizontalAlignment.Center; + // + // toolStripSeparator2 + // + this.toolStripSeparator2.Name = "toolStripSeparator2"; + this.toolStripSeparator2.Size = new System.Drawing.Size(6, 25); // // fInventory // @@ -473,14 +516,14 @@ this.Name = "fInventory"; this.Text = "fInventory"; this.Load += new System.EventHandler(this.@__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(); this.cm1.ResumeLayout(false); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.dsMSSQL)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.dv1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -515,8 +558,8 @@ private System.Windows.Forms.ToolStripButton btSearch; private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; private System.Windows.Forms.ToolStripLabel toolStripLabel3; - private System.Windows.Forms.ToolStripButton tbFind; - private System.Windows.Forms.ToolStripTextBox toolStripTextBox1; + private System.Windows.Forms.ToolStripButton btFind; + private System.Windows.Forms.ToolStripTextBox tbFind; private System.Windows.Forms.ContextMenuStrip cm1; private System.Windows.Forms.ToolStripMenuItem autoColumnsSizeToolStripMenuItem; private dsMSSQLTableAdapters.ItemsTableAdapter taItem; @@ -532,5 +575,9 @@ private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn7; private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn10; private System.Windows.Forms.ToolStripLabel toolStripLabel4; + private System.Windows.Forms.ToolStripButton toolStripButton1; + private System.Windows.Forms.ToolStripLabel toolStripLabel5; + private System.Windows.Forms.ToolStripTextBox tbName; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator2; } } \ No newline at end of file diff --git a/SubProject/FCM0000/fInventory.cs b/SubProject/FCM0000/fInventory.cs index 1433395..89d21ca 100644 --- a/SubProject/FCM0000/fInventory.cs +++ b/SubProject/FCM0000/fInventory.cs @@ -63,9 +63,12 @@ namespace FCM0000 { var form = this as Form; FCOMMON.Util.SetFormStatus(ref form, this.Name, true); - this.Show(); + this.Show(); Application.DoEvents(); + //사용자이름 181030 + this.tbName.Text = FCOMMON.info.Login.nameK; + //마지막 자료를 가져온날을 찾는다. var dateList = FCOMMON.DBM.getDateList("Inventory", "uid='" + FCOMMON.info.Login.no + "'"); dtED.Text = DateTime.Now.ToShortDateString(); @@ -82,7 +85,7 @@ namespace FCM0000 { string sd = dtSD.Text; string ed = dtED.Text; - this.ta.FillByUID(this.dsMSSQL.Inventory, sd, ed, FCOMMON.info.Login.no); + this.ta.FillByName(this.dsMSSQL.Inventory, sd, ed,tbName.Text); this.dsMSSQL.Inventory.AcceptChanges(); dv1.AutoResizeColumns(); } @@ -143,11 +146,11 @@ namespace FCM0000 { if (e.KeyCode == Keys.Enter) { - string inputstr = toolStripTextBox1.Text.Trim(); + string inputstr = tbFind.Text.Trim(); if (inputstr == "") { bs.Filter = ""; - toolStripTextBox1.BackColor = Color.White; + tbFind.BackColor = Color.White; } else { @@ -161,13 +164,13 @@ namespace FCM0000 try { bs.Filter = filter.ToString(); - toolStripTextBox1.BackColor = Color.Lime; - toolStripTextBox1.SelectAll(); - toolStripTextBox1.Focus(); + tbFind.BackColor = Color.Lime; + tbFind.SelectAll(); + tbFind.Focus(); } catch (Exception eX) { - toolStripTextBox1.BackColor = Color.Red; + tbFind.BackColor = Color.Red; } } } @@ -317,6 +320,19 @@ namespace FCM0000 } } + private void toolStripButton1_Click(object sender, EventArgs e) + { + Inventory.RepInvStock f = new Inventory.RepInvStock(this.tbName.Text.Trim()); + f.MdiParent = this.MdiParent; + f.Show(); + } + + private void toolStripLabel3_Click(object sender, EventArgs e) + { + tbFind.Text = string.Empty; + btFind.PerformClick(); + } + } } diff --git a/SubProject/FCM0000/fInventory.resx b/SubProject/FCM0000/fInventory.resx index cfbd6f2..05577bb 100644 --- a/SubProject/FCM0000/fInventory.resx +++ b/SubProject/FCM0000/fInventory.resx @@ -117,18 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - 17, 17 - - - 122, 17 - - - 186, 17 - - - 248, 17 - 321, 17 @@ -145,6 +133,12 @@ rkJggg== + + 122, 17 + + + 17, 17 + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO @@ -204,7 +198,22 @@ dtINAGGiDUDGyGpoawAxeNSAQWkAORiqnRLAwAAA9EMMU8Daa3MAAAAASUVORK5CYII= - + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG @@ -236,9 +245,21 @@ dBo6zn/3OB7XHovRyuhQ6+hhYKA9DpL+A1keRebNAhkaJH0OHOcP031C4EjYr6wAAAAASUVORK5CYII= + + 17, 17 + + + 186, 17 + + + 248, 17 + 568, 17 + + 655, 17 + True @@ -254,7 +275,4 @@ True - - 655, 17 - \ No newline at end of file diff --git a/SubProject/FCM0000/fLovItem.Designer.cs b/SubProject/FCM0000/fLovItem.Designer.cs index 53658e2..c4faace 100644 --- a/SubProject/FCM0000/fLovItem.Designer.cs +++ b/SubProject/FCM0000/fLovItem.Designer.cs @@ -53,6 +53,10 @@ 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.model = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel1 = new System.Windows.Forms.Panel(); this.textBox3 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); @@ -63,10 +67,6 @@ this.priceTextBox = new System.Windows.Forms.TextBox(); this.ta = new FCM0000.dsMSSQLTableAdapters.ItemsTableAdapter(); this.tam = new FCM0000.dsMSSQLTableAdapters.TableAdapterManager(); - this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.model = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); manuLabel = new System.Windows.Forms.Label(); supplyLabel = new System.Windows.Forms.Label(); memoLabel = new System.Windows.Forms.Label(); @@ -163,7 +163,7 @@ this.bn.MovePreviousItem = this.bindingNavigatorMovePreviousItem; this.bn.Name = "bn"; this.bn.PositionItem = this.bindingNavigatorPositionItem; - this.bn.Size = new System.Drawing.Size(884, 25); + this.bn.Size = new System.Drawing.Size(984, 25); this.bn.TabIndex = 0; this.bn.Text = "bindingNavigator1"; // @@ -284,10 +284,48 @@ this.dv.RowHeadersVisible = false; this.dv.RowTemplate.Height = 23; this.dv.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dv.Size = new System.Drawing.Size(594, 493); + this.dv.Size = new System.Drawing.Size(694, 493); this.dv.TabIndex = 1; + this.dv.DoubleClick += new System.EventHandler(this.dv_DoubleClick); this.dv.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dv_KeyDown); // + // 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 = 60; + // + // dataGridViewTextBoxColumn2 + // + this.dataGridViewTextBoxColumn2.DataPropertyName = "name"; + this.dataGridViewTextBoxColumn2.HeaderText = "Name"; + this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; + this.dataGridViewTextBoxColumn2.ReadOnly = true; + this.dataGridViewTextBoxColumn2.Width = 74; + // + // model + // + this.model.DataPropertyName = "model"; + dataGridViewCellStyle2.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.model.DefaultCellStyle = dataGridViewCellStyle2; + this.model.HeaderText = "model"; + this.model.Name = "model"; + this.model.ReadOnly = true; + this.model.Width = 74; + // + // dataGridViewTextBoxColumn3 + // + this.dataGridViewTextBoxColumn3.DataPropertyName = "sid"; + this.dataGridViewTextBoxColumn3.HeaderText = "SID"; + this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; + this.dataGridViewTextBoxColumn3.ReadOnly = true; + this.dataGridViewTextBoxColumn3.Width = 59; + // // panel1 // this.panel1.Controls.Add(this.textBox3); @@ -304,7 +342,7 @@ 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(594, 0); + this.panel1.Location = new System.Drawing.Point(694, 0); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(290, 493); this.panel1.TabIndex = 2; @@ -398,47 +436,10 @@ this.tam.RequestItemTableAdapter = null; this.tam.UpdateOrder = FCM0000.dsMSSQLTableAdapters.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete; // - // 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 = 60; - // - // dataGridViewTextBoxColumn2 - // - this.dataGridViewTextBoxColumn2.DataPropertyName = "name"; - this.dataGridViewTextBoxColumn2.HeaderText = "Name"; - this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; - this.dataGridViewTextBoxColumn2.ReadOnly = true; - this.dataGridViewTextBoxColumn2.Width = 74; - // - // model - // - this.model.DataPropertyName = "model"; - dataGridViewCellStyle2.Font = new System.Drawing.Font("Tahoma", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); - this.model.DefaultCellStyle = dataGridViewCellStyle2; - this.model.HeaderText = "model"; - this.model.Name = "model"; - this.model.ReadOnly = true; - this.model.Width = 74; - // - // dataGridViewTextBoxColumn3 - // - this.dataGridViewTextBoxColumn3.DataPropertyName = "sid"; - this.dataGridViewTextBoxColumn3.HeaderText = "SID"; - this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; - this.dataGridViewTextBoxColumn3.ReadOnly = true; - this.dataGridViewTextBoxColumn3.Width = 59; - // // fLovItem // this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; - this.ClientSize = new System.Drawing.Size(884, 518); + this.ClientSize = new System.Drawing.Size(984, 518); this.Controls.Add(this.dv); this.Controls.Add(this.panel1); this.Controls.Add(this.bn); diff --git a/SubProject/FCM0000/fLovItem.cs b/SubProject/FCM0000/fLovItem.cs index 374bc73..c9340a6 100644 --- a/SubProject/FCM0000/fLovItem.cs +++ b/SubProject/FCM0000/fLovItem.cs @@ -40,6 +40,35 @@ namespace FCM0000 private void itemsBindingNavigatorSaveItem_Click(object sender, EventArgs e) { + var drv = bs.Current as DataRowView; + if (drv == null) + { + itemName = string.Empty; + item = -1; + itemmodel = string.Empty; + itemprice = 0; + itemSupply = string.Empty; + itemSupplyidx = -1; + SID = string.Empty; + return; + } + else + { + var dr = drv.Row as dsMSSQL.ItemsRow; + item = dr.idx; + if (dr.IsnameNull()) itemName = string.Empty; + else itemName = dr.name; + if (dr.IsmodelNull()) itemmodel = string.Empty; + else itemmodel = dr.model; + if (dr.IspriceNull()) itemprice = 0; + else itemprice = dr.price; + if (dr.IssupplyNull()) itemSupply = string.Empty; + else itemSupply = dr.supply; + if (dr.IssupplyidxNull()) itemSupplyidx = -1; + else itemSupplyidx = dr.supplyidx; + SID = dr.sid; + } + if (itemName.isEmpty() || item == -1) DialogResult = System.Windows.Forms.DialogResult.Cancel; else DialogResult = System.Windows.Forms.DialogResult.OK; } @@ -54,37 +83,15 @@ namespace FCM0000 { if (e.KeyCode == Keys.Enter) { - var drv = bs.Current as DataRowView; - if (drv == null) - { - itemName = string.Empty; - item = -1; - itemmodel = string.Empty; - itemprice = 0; - itemSupply = string.Empty; - itemSupplyidx = -1; - SID = string.Empty; - return; - } - else - { - var dr = drv.Row as dsMSSQL.ItemsRow; - item = dr.idx; - if (dr.IsnameNull()) itemName = string.Empty; - else itemName = dr.name; - if (dr.IsmodelNull()) itemmodel = string.Empty; - else itemmodel = dr.model; - if (dr.IspriceNull()) itemprice = 0; - else itemprice = dr.price; - if (dr.IssupplyNull()) itemSupply = string.Empty; - else itemSupply = dr.supply; - if (dr.IssupplyidxNull()) itemSupplyidx = -1; - else itemSupplyidx = dr.supplyidx; - SID = dr.sid; - } + btOK.PerformClick(); } } + + private void dv_DoubleClick(object sender, EventArgs e) + { + btOK.PerformClick(); + } } } diff --git a/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs b/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs index 15fd170..893d27a 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs +++ b/SubProject/FEQ0000/Purchase/fPurchase.Designer.cs @@ -90,8 +90,9 @@ this.editDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator(); this.viewThisUserDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.exportDataToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.lbStt = new System.Windows.Forms.ToolStripLabel(); + this.cmDate = new System.Windows.Forms.ToolStripComboBox(); this.dtSD = new System.Windows.Forms.ToolStripTextBox(); this.lbEnd = new System.Windows.Forms.ToolStripLabel(); this.dtED = new System.Windows.Forms.ToolStripTextBox(); @@ -345,9 +346,10 @@ this.copyDataToolStripMenuItem, this.editDataToolStripMenuItem, this.toolStripMenuItem2, - this.viewThisUserDataToolStripMenuItem}); + this.viewThisUserDataToolStripMenuItem, + this.exportDataToolStripMenuItem}); this.cm1.Name = "contextMenuStrip1"; - this.cm1.Size = new System.Drawing.Size(337, 184); + this.cm1.Size = new System.Drawing.Size(337, 226); // // columnSizeToolStripMenuItem // @@ -423,10 +425,17 @@ this.viewThisUserDataToolStripMenuItem.Text = "View This User data"; this.viewThisUserDataToolStripMenuItem.Click += new System.EventHandler(this.viewThisUserDataToolStripMenuItem_Click); // + // exportDataToolStripMenuItem + // + this.exportDataToolStripMenuItem.Name = "exportDataToolStripMenuItem"; + this.exportDataToolStripMenuItem.Size = new System.Drawing.Size(336, 42); + this.exportDataToolStripMenuItem.Text = "Export List"; + this.exportDataToolStripMenuItem.Click += new System.EventHandler(this.exportDataToolStripMenuItem_Click); + // // toolStrip1 // this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.lbStt, + this.cmDate, this.dtSD, this.lbEnd, this.dtED, @@ -443,12 +452,15 @@ this.toolStrip1.TabIndex = 3; this.toolStrip1.Text = "toolStrip1"; // - // lbStt + // cmDate // - 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); + this.cmDate.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cmDate.Items.AddRange(new object[] { + "Date", + "InDate", + "ExpDate"}); + this.cmDate.Name = "cmDate"; + this.cmDate.Size = new System.Drawing.Size(75, 25); // // dtSD // @@ -744,7 +756,6 @@ private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem; private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2; private System.Windows.Forms.ToolStrip toolStrip1; - private System.Windows.Forms.ToolStripLabel lbStt; private System.Windows.Forms.ToolStripTextBox dtSD; private System.Windows.Forms.ToolStripLabel lbEnd; private System.Windows.Forms.ToolStripTextBox dtED; @@ -778,5 +789,7 @@ private System.Windows.Forms.ToolStripMenuItem loadToolStripMenuItem; private System.Windows.Forms.ToolStripButton btEdit; private FarPoint.Win.Spread.SheetView sheetView1; + private System.Windows.Forms.ToolStripMenuItem exportDataToolStripMenuItem; + private System.Windows.Forms.ToolStripComboBox cmDate; } } diff --git a/SubProject/FEQ0000/Purchase/fPurchase.cs b/SubProject/FEQ0000/Purchase/fPurchase.cs index f8c5262..b28438e 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase.cs +++ b/SubProject/FEQ0000/Purchase/fPurchase.cs @@ -20,9 +20,44 @@ namespace FEQ0000 fn_fpcolsize = util.MakeFilePath(util.CurrentPath, "formSetting", "fp_" + this.Name + ".ini"); this.dsPurchase.Purchase.TableNewRow += Purchase_TableNewRow; this.FormClosed += __Closed; + dtSD.KeyDown += dtSD_KeyDown; + dtED.KeyDown += dtSD_KeyDown; //this.dv1.CellFormatting += dv1_CellFormatting; } + void dtSD_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode != Keys.Enter) return; + var tb = sender as ToolStripTextBox; + var input = tb.Text.Trim(); + if (input == "") tb.Text = DateTime.Now.ToShortDateString(); + else + { + string dt = string.Empty; + if (!util.MakeDateString(input, out dt)) + { + FCOMMON.Util.MsgE("입력값이 올바르지 않습니다."); + tb.SelectAll(); + tb.Focus(); + return; + } + else + { + tb.Text = dt; + } + } + if(tb == dtSD) + { + dtED.Focus(); + dtED.SelectAll(); + } + else + { + btSearch.PerformClick(); + tb.SelectAll(); + } + } + void __Closed(object sender, FormClosedEventArgs e) { @@ -44,7 +79,8 @@ namespace FEQ0000 private void __Load(object sender, EventArgs e) { - this.tbRequest.Text = FCOMMON.info.Login.nameK; + this.cmDate.SelectedIndex = 0; + this.tbRequest.Text = string.Empty; //양진원 FCOMMON.info.Login.nameK; this.dtSD.Text = DateTime.Now.AddDays(-30).ToShortDateString(); this.dtED.Text = DateTime.Now.AddDays(10).ToShortDateString(); @@ -55,7 +91,7 @@ namespace FEQ0000 cmbState.Items.Add("-- incomplete --"); foreach (var item in stList) cmbState.Items.Add(item); - this.cmbState.SelectedIndex = 1; + this.cmbState.SelectedIndex = 0; //all기본 - 양진원 //일반사용자의경우에는 상태를 변경하지 못한다. int curLevel = Math.Max(FCOMMON.info.Login.level, FCOMMON.DBM.getAuth_Purchase()); @@ -85,12 +121,15 @@ namespace FEQ0000 if (cmbState.SelectedIndex > 1) state = cmbState.Text.Split(',')[0].Substring(1); string request = "%"; if (tbRequest.Text.Trim() != "") request = "%" + this.tbRequest.Text.Trim() + "%"; + string dateField = "pdate"; + if (cmDate.SelectedIndex == 1) dateField = "indate"; + else if (cmDate.SelectedIndex == 2) dateField = "expdate"; System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter(); System.Data.SqlClient.SqlCommand cmd = new System.Data.SqlClient.SqlCommand(); cmd.CommandText = " select *, dbo.getCodeName('04', state) AS stateName" + " from purchase " + - " where pdate between @sd and @ed " + + " where isnull(" + dateField + ",'') between @sd and @ed " + " and (isnull(request,'') like @req or isnull(receive,'') like @req)"; if (cmbState.SelectedIndex != 1) cmd.CommandText += " and state like @st"; @@ -334,7 +373,9 @@ namespace FEQ0000 } else { - string filter = "sid like ? or process like ? or sc like ? or pumname like ? or pumscale like ? or project like ?"; + search = search.Replace("'", "''"); + // search = search.Replace("*", ""); + string filter = "supply like ? or sid like ? or process like ? or sc like ? or pumname like ? or pumscale like ? or project like ?"; filter = filter.Replace("?", "'%" + search + "%'"); this.bs.Filter = filter; tbFind.BackColor = Color.Lime; @@ -481,5 +522,20 @@ namespace FEQ0000 } } + private void exportDataToolStripMenuItem_Click(object sender, EventArgs e) + { + SaveFileDialog sd = new SaveFileDialog(); + sd.Filter = "excel|*.xls"; + sd.FileName = "nrplist.xls"; + if (sd.ShowDialog() == System.Windows.Forms.DialogResult.OK) + { + fpSpread1.SaveExcel(sd.FileName, + FarPoint.Excel.ExcelSaveFlags.SaveAsViewed + | FarPoint.Excel.ExcelSaveFlags.NoFormulas + | FarPoint.Excel.ExcelSaveFlags.SaveCustomColumnHeaders); + } + + } + } } diff --git a/SubProject/FEQ0000/Purchase/fPurchase_Import.Designer.cs b/SubProject/FEQ0000/Purchase/fPurchase_Import.Designer.cs index 2a334c7..96d6778 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase_Import.Designer.cs +++ b/SubProject/FEQ0000/Purchase/fPurchase_Import.Designer.cs @@ -36,6 +36,10 @@ this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.button3 = new System.Windows.Forms.Button(); this.panel1 = new System.Windows.Forms.Panel(); + this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); + this.label6 = new System.Windows.Forms.Label(); + this.ed = new System.Windows.Forms.DateTimePicker(); + this.sd = new System.Windows.Forms.DateTimePicker(); this.label4 = new System.Windows.Forms.Label(); this.nudCE = new System.Windows.Forms.NumericUpDown(); this.nudCS = new System.Windows.Forms.NumericUpDown(); @@ -60,12 +64,10 @@ this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.progressBar1 = new System.Windows.Forms.ToolStripProgressBar(); this.bs = new System.Windows.Forms.BindingSource(this.components); - this.sd = new System.Windows.Forms.DateTimePicker(); - this.ed = new System.Windows.Forms.DateTimePicker(); - this.numericUpDown2 = new System.Windows.Forms.NumericUpDown(); - this.label6 = new System.Windows.Forms.Label(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.panel1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudCE)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudCS)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudE)).BeginInit(); @@ -74,7 +76,6 @@ ((System.ComponentModel.ISupportInitialize)(this.bn)).BeginInit(); this.bn.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.bs)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).BeginInit(); this.SuspendLayout(); // // textBox1 @@ -128,6 +129,7 @@ // // panel1 // + this.panel1.Controls.Add(this.checkBox1); this.panel1.Controls.Add(this.numericUpDown2); this.panel1.Controls.Add(this.label6); this.panel1.Controls.Add(this.ed); @@ -153,6 +155,47 @@ this.panel1.TabIndex = 0; this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.panel1_Paint); // + // numericUpDown2 + // + this.numericUpDown2.Location = new System.Drawing.Point(406, 63); + this.numericUpDown2.Maximum = new decimal(new int[] { + 65535, + 0, + 0, + 0}); + this.numericUpDown2.Name = "numericUpDown2"; + this.numericUpDown2.Size = new System.Drawing.Size(45, 21); + this.numericUpDown2.TabIndex = 18; + this.numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; + this.numericUpDown2.Value = new decimal(new int[] { + 6, + 0, + 0, + 0}); + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(312, 67); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(87, 12); + this.label6.TabIndex = 17; + this.label6.Text = "Column Name"; + // + // ed + // + this.ed.Location = new System.Drawing.Point(42, 67); + this.ed.Name = "ed"; + this.ed.Size = new System.Drawing.Size(170, 21); + this.ed.TabIndex = 16; + // + // sd + // + this.sd.Location = new System.Drawing.Point(42, 40); + this.sd.Name = "sd"; + this.sd.Size = new System.Drawing.Size(170, 21); + this.sd.TabIndex = 15; + // // label4 // this.label4.AutoSize = true; @@ -404,46 +447,15 @@ this.progressBar1.Name = "progressBar1"; this.progressBar1.Size = new System.Drawing.Size(200, 22); // - // sd + // checkBox1 // - this.sd.Location = new System.Drawing.Point(42, 40); - this.sd.Name = "sd"; - this.sd.Size = new System.Drawing.Size(170, 21); - this.sd.TabIndex = 15; - // - // ed - // - this.ed.Location = new System.Drawing.Point(42, 67); - this.ed.Name = "ed"; - this.ed.Size = new System.Drawing.Size(170, 21); - this.ed.TabIndex = 16; - // - // numericUpDown2 - // - this.numericUpDown2.Location = new System.Drawing.Point(406, 63); - this.numericUpDown2.Maximum = new decimal(new int[] { - 65535, - 0, - 0, - 0}); - this.numericUpDown2.Name = "numericUpDown2"; - this.numericUpDown2.Size = new System.Drawing.Size(45, 21); - this.numericUpDown2.TabIndex = 18; - this.numericUpDown2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; - this.numericUpDown2.Value = new decimal(new int[] { - 6, - 0, - 0, - 0}); - // - // label6 - // - this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(312, 67); - this.label6.Name = "label6"; - this.label6.Size = new System.Drawing.Size(87, 12); - this.label6.TabIndex = 17; - this.label6.Text = "Column Name"; + this.checkBox1.AutoSize = true; + this.checkBox1.Location = new System.Drawing.Point(474, 66); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(127, 16); + this.checkBox1.TabIndex = 19; + this.checkBox1.Text = "Auto Delete Import"; + this.checkBox1.UseVisualStyleBackColor = true; // // fPurchase_Import // @@ -459,6 +471,7 @@ ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudCE)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudCS)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.nudE)).EndInit(); @@ -468,7 +481,6 @@ this.bn.ResumeLayout(false); this.bn.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.bs)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.numericUpDown2)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -510,5 +522,6 @@ private System.Windows.Forms.DateTimePicker sd; private System.Windows.Forms.NumericUpDown numericUpDown2; private System.Windows.Forms.Label label6; + private System.Windows.Forms.CheckBox checkBox1; } } \ No newline at end of file diff --git a/SubProject/FEQ0000/Purchase/fPurchase_Import.cs b/SubProject/FEQ0000/Purchase/fPurchase_Import.cs index 023cecd..02f9351 100644 --- a/SubProject/FEQ0000/Purchase/fPurchase_Import.cs +++ b/SubProject/FEQ0000/Purchase/fPurchase_Import.cs @@ -284,7 +284,7 @@ namespace FEQ0000 } var taE = new dsPurchaseTableAdapters.PurchaseTableAdapter(); - taE.DeleteImport(); + if(checkBox1.Checked) taE.DeleteImport(sd.Value.ToShortDateString(),ed.Value.ToShortDateString()); taE.Update((dsPurchase.PurchaseDataTable)dt); dt.AcceptChanges(); diff --git a/SubProject/FEQ0000/dsPurchase.Designer.cs b/SubProject/FEQ0000/dsPurchase.Designer.cs index 4dc1188..a8dd98f 100644 --- a/SubProject/FEQ0000/dsPurchase.Designer.cs +++ b/SubProject/FEQ0000/dsPurchase.Designer.cs @@ -2135,8 +2135,10 @@ ORDER BY pdate DESC, idx DESC"; 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 = "DELETE FROM [Purchase] WHERE import = 1"; + this._commandCollection[1].CommandText = "DELETE FROM Purchase\r\nWHERE (import = 1) AND (pdate BETWEEN @sd AND @ed)"; this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].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.Original, false, null, "", "", "")); + this._commandCollection[1].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.Original, false, null, "", "", "")); this._commandCollection[2] = new global::System.Data.SqlClient.SqlCommand(); this._commandCollection[2].Connection = this.Connection; this._commandCollection[2].CommandText = @"SELECT idx, pdate, state, process, receive, sc, request, sid, pumname, pumscale, pumunit, pumqty, pumprice, pumamt, supply, supplyidx, project, projectidx, asset, edate, indate, po, dept, wuid, @@ -3149,9 +3151,20 @@ ORDER BY pdate DESC, idx DESC"; [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] - [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, false)] - public virtual int DeleteImport() { + public virtual int DeleteImport(string sd, string ed) { global::System.Data.SqlClient.SqlCommand command = this.CommandCollection[1]; + if ((sd == null)) { + command.Parameters[0].Value = global::System.DBNull.Value; + } + else { + command.Parameters[0].Value = ((string)(sd)); + } + if ((ed == null)) { + command.Parameters[1].Value = global::System.DBNull.Value; + } + else { + command.Parameters[1].Value = ((string)(ed)); + } global::System.Data.ConnectionState previousConnectionState = command.Connection.State; if (((command.Connection.State & global::System.Data.ConnectionState.Open) != global::System.Data.ConnectionState.Open)) { diff --git a/SubProject/FEQ0000/dsPurchase.xsd b/SubProject/FEQ0000/dsPurchase.xsd index 60d271b..1cdfba5 100644 --- a/SubProject/FEQ0000/dsPurchase.xsd +++ b/SubProject/FEQ0000/dsPurchase.xsd @@ -222,13 +222,23 @@ SELECT idx, pdate, state, process, receive, sc, request, sid, pumname, pumscale, - + DELETE FROM [Purchase] WHERE import = 1 + + + DELETE FROM Purchase +WHERE (import = 1) AND (pdate BETWEEN @sd AND @ed) + + + + + + @@ -255,7 +265,7 @@ ORDER BY pdate DESC, idx DESC - +