From d75585cf261f311c707c14350de56952c1104362 Mon Sep 17 00:00:00 2001 From: LGram16 Date: Fri, 9 Jan 2026 00:14:59 +0900 Subject: [PATCH] =?UTF-8?q?mareditor=20=EB=B6=84=EB=A6=AC=EC=9E=91?= =?UTF-8?q?=EC=97=85=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- unimarc/unimarc/Helper_DB.cs | 2 +- unimarc/unimarc/UniMarc.csproj | 34 +- unimarc/unimarc/UniMarc.csproj.user | 2 +- unimarc/unimarc/마크/Helper008.cs | 10 +- unimarc/unimarc/마크/Mac_List.Designer.cs | 361 ++++---- unimarc/unimarc/마크/Mac_List.cs | 29 +- unimarc/unimarc/마크/Marc.cs | 89 -- unimarc/unimarc/마크/Marc2.cs | 817 ++++++++++++++++++ unimarc/unimarc/마크/Marc2.designer.cs | 568 ++++++++++++ .../마크/{MarcEditor.resx => Marc2.resx} | 106 --- unimarc/unimarc/마크/MarcCopySelect.cs | 14 +- ...esigner.cs => MarcEditorControl.Designer.cs} | 513 +---------- .../{MarcEditor.cs => MarcEditorControl.cs} | 773 +++-------------- unimarc/unimarc/마크/Marc_FillBlank.cs | 4 +- unimarc/unimarc/마크/Marc_memo.cs | 12 +- unimarc/unimarc/마크/Marc_mkList.cs | 4 +- unimarc/unimarc/마크/findNchange.cs | 12 +- 17 files changed, 1827 insertions(+), 1523 deletions(-) create mode 100644 unimarc/unimarc/마크/Marc2.cs create mode 100644 unimarc/unimarc/마크/Marc2.designer.cs rename unimarc/unimarc/마크/{MarcEditor.resx => Marc2.resx} (58%) rename unimarc/unimarc/마크/{MarcEditor.designer.cs => MarcEditorControl.Designer.cs} (85%) rename unimarc/unimarc/마크/{MarcEditor.cs => MarcEditorControl.cs} (80%) diff --git a/unimarc/unimarc/Helper_DB.cs b/unimarc/unimarc/Helper_DB.cs index c08d387..3fabcb2 100644 --- a/unimarc/unimarc/Helper_DB.cs +++ b/unimarc/unimarc/Helper_DB.cs @@ -14,7 +14,7 @@ namespace WindowsFormsApp1 /// /// DB접속을 도와주는 클래스 /// - class Helper_DB + public class Helper_DB { // 접속 MySqlConnection conn; diff --git a/unimarc/unimarc/UniMarc.csproj b/unimarc/unimarc/UniMarc.csproj index 3f29df9..828a770 100644 --- a/unimarc/unimarc/UniMarc.csproj +++ b/unimarc/unimarc/UniMarc.csproj @@ -358,18 +358,24 @@ Mac_List_Add.cs - - Form - - - MarcEditor.cs - Form MarcCopySelect.cs + + UserControl + + + MarcEditorControl.cs + + + Form + + + Marc.cs + Form @@ -541,11 +547,11 @@ Make_Document.cs - + Form - - Marc.cs + + Marc2.cs Form @@ -1058,12 +1064,12 @@ Mac_List_Add.cs - - MarcEditor.cs - MarcCopySelect.cs + + Marc.cs + Marc_FillBlank.cs @@ -1148,8 +1154,8 @@ Make_Document.cs - - Marc.cs + + Marc2.cs Marc_memo.cs diff --git a/unimarc/unimarc/UniMarc.csproj.user b/unimarc/unimarc/UniMarc.csproj.user index a66c462..f0d6d75 100644 --- a/unimarc/unimarc/UniMarc.csproj.user +++ b/unimarc/unimarc/UniMarc.csproj.user @@ -9,7 +9,7 @@ ko-KR false - ProjectFiles + ShowAllFiles false diff --git a/unimarc/unimarc/마크/Helper008.cs b/unimarc/unimarc/마크/Helper008.cs index 0c87dd1..3423083 100644 --- a/unimarc/unimarc/마크/Helper008.cs +++ b/unimarc/unimarc/마크/Helper008.cs @@ -18,8 +18,14 @@ namespace ExcelTest public string call = ""; Marc mac; Marc_Plan_Sub_MarcEdit me; - MarcEditor mae; - public Helper008(MarcEditor _mae) + Marc2 mae; + MarcEditorControl mec; + public Helper008(MarcEditorControl _mae) + { + InitializeComponent(); + mec = _mae; + } + public Helper008(Marc2 _mae) { InitializeComponent(); mae = _mae; diff --git a/unimarc/unimarc/마크/Mac_List.Designer.cs b/unimarc/unimarc/마크/Mac_List.Designer.cs index 8eff0a4..5a4c9ca 100644 --- a/unimarc/unimarc/마크/Mac_List.Designer.cs +++ b/unimarc/unimarc/마크/Mac_List.Designer.cs @@ -33,6 +33,20 @@ this.label1 = new System.Windows.Forms.Label(); this.tb_Search = new System.Windows.Forms.TextBox(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.start_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.end_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dvc_custname = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.work_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.stock = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.unstock = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.state = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.charge = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dvc_cust = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.check = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.cb_state = new System.Windows.Forms.ComboBox(); this.label2 = new System.Windows.Forms.Label(); this.btn_Lookup = new System.Windows.Forms.Button(); @@ -48,20 +62,7 @@ this.panel1 = new System.Windows.Forms.Panel(); this.btnSearchISBN = new System.Windows.Forms.Button(); this.panel2 = new System.Windows.Forms.Panel(); - this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.start_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.end_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dvc_custname = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.work_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.stock = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.unstock = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.state = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.charge = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dvc_cust = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.check = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.chkEditorTest = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); @@ -136,165 +137,6 @@ this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); // - // cb_state - // - this.cb_state.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cb_state.FormattingEnabled = true; - this.cb_state.Location = new System.Drawing.Point(354, 9); - this.cb_state.Name = "cb_state"; - this.cb_state.Size = new System.Drawing.Size(74, 20); - this.cb_state.TabIndex = 49; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(323, 13); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(29, 12); - this.label2.TabIndex = 5; - this.label2.Text = "상태"; - // - // btn_Lookup - // - this.btn_Lookup.Location = new System.Drawing.Point(484, 2); - this.btn_Lookup.Margin = new System.Windows.Forms.Padding(1); - this.btn_Lookup.Name = "btn_Lookup"; - this.btn_Lookup.Size = new System.Drawing.Size(61, 32); - this.btn_Lookup.TabIndex = 50; - this.btn_Lookup.Text = "조 회"; - this.btn_Lookup.UseVisualStyleBackColor = true; - this.btn_Lookup.Click += new System.EventHandler(this.btn_Lookup_Click); - // - // btn_Excel - // - this.btn_Excel.Location = new System.Drawing.Point(990, 2); - this.btn_Excel.Margin = new System.Windows.Forms.Padding(1); - this.btn_Excel.Name = "btn_Excel"; - this.btn_Excel.Size = new System.Drawing.Size(61, 32); - this.btn_Excel.TabIndex = 50; - this.btn_Excel.Text = "엑셀반출"; - this.btn_Excel.UseVisualStyleBackColor = true; - this.btn_Excel.Click += new System.EventHandler(this.btn_Excel_Click); - // - // btn_Close - // - this.btn_Close.Location = new System.Drawing.Point(1053, 2); - this.btn_Close.Margin = new System.Windows.Forms.Padding(1); - this.btn_Close.Name = "btn_Close"; - this.btn_Close.Size = new System.Drawing.Size(61, 32); - this.btn_Close.TabIndex = 50; - this.btn_Close.Text = "닫 기"; - this.btn_Close.UseVisualStyleBackColor = true; - this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click); - // - // btn_Save - // - this.btn_Save.Location = new System.Drawing.Point(927, 2); - this.btn_Save.Margin = new System.Windows.Forms.Padding(1); - this.btn_Save.Name = "btn_Save"; - this.btn_Save.Size = new System.Drawing.Size(61, 32); - this.btn_Save.TabIndex = 50; - this.btn_Save.Text = "체크사항\r\n저장"; - this.btn_Save.UseVisualStyleBackColor = true; - this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click); - // - // btn_Merge - // - this.btn_Merge.Location = new System.Drawing.Point(673, 2); - this.btn_Merge.Margin = new System.Windows.Forms.Padding(1); - this.btn_Merge.Name = "btn_Merge"; - this.btn_Merge.Size = new System.Drawing.Size(61, 32); - this.btn_Merge.TabIndex = 51; - this.btn_Merge.Text = "목록병합"; - this.btn_Merge.UseVisualStyleBackColor = true; - this.btn_Merge.Click += new System.EventHandler(this.btn_Merge_Click); - // - // btn_Progress - // - this.btn_Progress.Location = new System.Drawing.Point(738, 2); - this.btn_Progress.Margin = new System.Windows.Forms.Padding(1); - this.btn_Progress.Name = "btn_Progress"; - this.btn_Progress.Size = new System.Drawing.Size(61, 32); - this.btn_Progress.TabIndex = 51; - this.btn_Progress.Text = "진행처리"; - this.btn_Progress.UseVisualStyleBackColor = true; - this.btn_Progress.Click += new System.EventHandler(this.btn_Progress_Click); - // - // btn_Completion - // - this.btn_Completion.Location = new System.Drawing.Point(801, 2); - this.btn_Completion.Margin = new System.Windows.Forms.Padding(1); - this.btn_Completion.Name = "btn_Completion"; - this.btn_Completion.Size = new System.Drawing.Size(61, 32); - this.btn_Completion.TabIndex = 51; - this.btn_Completion.Text = "완료처리"; - this.btn_Completion.UseVisualStyleBackColor = true; - this.btn_Completion.Click += new System.EventHandler(this.btn_Completion_Click); - // - // btn_Delete - // - this.btn_Delete.Location = new System.Drawing.Point(864, 2); - this.btn_Delete.Margin = new System.Windows.Forms.Padding(1); - this.btn_Delete.Name = "btn_Delete"; - this.btn_Delete.Size = new System.Drawing.Size(61, 32); - this.btn_Delete.TabIndex = 51; - this.btn_Delete.Text = "목록삭제"; - this.btn_Delete.UseVisualStyleBackColor = true; - this.btn_Delete.Click += new System.EventHandler(this.btn_Delete_Click); - // - // btn_AddList - // - this.btn_AddList.Location = new System.Drawing.Point(610, 2); - this.btn_AddList.Margin = new System.Windows.Forms.Padding(1); - this.btn_AddList.Name = "btn_AddList"; - this.btn_AddList.Size = new System.Drawing.Size(61, 32); - this.btn_AddList.TabIndex = 50; - this.btn_AddList.Text = "목록생성"; - this.btn_AddList.UseVisualStyleBackColor = true; - this.btn_AddList.Click += new System.EventHandler(this.btn_AddList_Click); - // - // panel1 - // - this.panel1.Controls.Add(this.label1); - this.panel1.Controls.Add(this.btn_Delete); - this.panel1.Controls.Add(this.label2); - this.panel1.Controls.Add(this.btn_Completion); - this.panel1.Controls.Add(this.tb_Search); - this.panel1.Controls.Add(this.btn_Progress); - this.panel1.Controls.Add(this.cb_state); - this.panel1.Controls.Add(this.btn_Merge); - this.panel1.Controls.Add(this.btnSearchISBN); - this.panel1.Controls.Add(this.btn_Lookup); - this.panel1.Controls.Add(this.btn_Close); - this.panel1.Controls.Add(this.btn_AddList); - this.panel1.Controls.Add(this.btn_Excel); - this.panel1.Controls.Add(this.btn_Save); - this.panel1.Dock = System.Windows.Forms.DockStyle.Top; - this.panel1.Location = new System.Drawing.Point(0, 0); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1179, 38); - this.panel1.TabIndex = 52; - // - // btnSearchISBN - // - this.btnSearchISBN.Location = new System.Drawing.Point(547, 2); - this.btnSearchISBN.Margin = new System.Windows.Forms.Padding(1); - this.btnSearchISBN.Name = "btnSearchISBN"; - this.btnSearchISBN.Size = new System.Drawing.Size(61, 32); - this.btnSearchISBN.TabIndex = 50; - this.btnSearchISBN.Text = "ISBN 조회"; - this.btnSearchISBN.UseVisualStyleBackColor = true; - this.btnSearchISBN.Click += new System.EventHandler(this.btnSearchISBN_Click); - // - // panel2 - // - this.panel2.Controls.Add(this.dataGridView1); - this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; - this.panel2.Location = new System.Drawing.Point(0, 38); - this.panel2.Name = "panel2"; - this.panel2.Size = new System.Drawing.Size(1179, 623); - this.panel2.TabIndex = 53; - // // idx // this.idx.HeaderText = "idx"; @@ -377,6 +219,178 @@ this.check.Name = "check"; this.check.Width = 35; // + // cb_state + // + this.cb_state.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cb_state.FormattingEnabled = true; + this.cb_state.Location = new System.Drawing.Point(354, 9); + this.cb_state.Name = "cb_state"; + this.cb_state.Size = new System.Drawing.Size(74, 20); + this.cb_state.TabIndex = 49; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(323, 13); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(29, 12); + this.label2.TabIndex = 5; + this.label2.Text = "상태"; + // + // btn_Lookup + // + this.btn_Lookup.Location = new System.Drawing.Point(502, 3); + this.btn_Lookup.Margin = new System.Windows.Forms.Padding(1); + this.btn_Lookup.Name = "btn_Lookup"; + this.btn_Lookup.Size = new System.Drawing.Size(61, 32); + this.btn_Lookup.TabIndex = 50; + this.btn_Lookup.Text = "조 회"; + this.btn_Lookup.UseVisualStyleBackColor = true; + this.btn_Lookup.Click += new System.EventHandler(this.btn_Lookup_Click); + // + // btn_Excel + // + this.btn_Excel.Location = new System.Drawing.Point(1008, 3); + this.btn_Excel.Margin = new System.Windows.Forms.Padding(1); + this.btn_Excel.Name = "btn_Excel"; + this.btn_Excel.Size = new System.Drawing.Size(61, 32); + this.btn_Excel.TabIndex = 50; + this.btn_Excel.Text = "엑셀반출"; + this.btn_Excel.UseVisualStyleBackColor = true; + this.btn_Excel.Click += new System.EventHandler(this.btn_Excel_Click); + // + // btn_Close + // + this.btn_Close.Location = new System.Drawing.Point(1071, 3); + this.btn_Close.Margin = new System.Windows.Forms.Padding(1); + this.btn_Close.Name = "btn_Close"; + this.btn_Close.Size = new System.Drawing.Size(61, 32); + this.btn_Close.TabIndex = 50; + this.btn_Close.Text = "닫 기"; + this.btn_Close.UseVisualStyleBackColor = true; + this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click); + // + // btn_Save + // + this.btn_Save.Location = new System.Drawing.Point(945, 3); + this.btn_Save.Margin = new System.Windows.Forms.Padding(1); + this.btn_Save.Name = "btn_Save"; + this.btn_Save.Size = new System.Drawing.Size(61, 32); + this.btn_Save.TabIndex = 50; + this.btn_Save.Text = "체크사항\r\n저장"; + this.btn_Save.UseVisualStyleBackColor = true; + this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click); + // + // btn_Merge + // + this.btn_Merge.Location = new System.Drawing.Point(691, 3); + this.btn_Merge.Margin = new System.Windows.Forms.Padding(1); + this.btn_Merge.Name = "btn_Merge"; + this.btn_Merge.Size = new System.Drawing.Size(61, 32); + this.btn_Merge.TabIndex = 51; + this.btn_Merge.Text = "목록병합"; + this.btn_Merge.UseVisualStyleBackColor = true; + this.btn_Merge.Click += new System.EventHandler(this.btn_Merge_Click); + // + // btn_Progress + // + this.btn_Progress.Location = new System.Drawing.Point(756, 3); + this.btn_Progress.Margin = new System.Windows.Forms.Padding(1); + this.btn_Progress.Name = "btn_Progress"; + this.btn_Progress.Size = new System.Drawing.Size(61, 32); + this.btn_Progress.TabIndex = 51; + this.btn_Progress.Text = "진행처리"; + this.btn_Progress.UseVisualStyleBackColor = true; + this.btn_Progress.Click += new System.EventHandler(this.btn_Progress_Click); + // + // btn_Completion + // + this.btn_Completion.Location = new System.Drawing.Point(819, 3); + this.btn_Completion.Margin = new System.Windows.Forms.Padding(1); + this.btn_Completion.Name = "btn_Completion"; + this.btn_Completion.Size = new System.Drawing.Size(61, 32); + this.btn_Completion.TabIndex = 51; + this.btn_Completion.Text = "완료처리"; + this.btn_Completion.UseVisualStyleBackColor = true; + this.btn_Completion.Click += new System.EventHandler(this.btn_Completion_Click); + // + // btn_Delete + // + this.btn_Delete.Location = new System.Drawing.Point(882, 3); + this.btn_Delete.Margin = new System.Windows.Forms.Padding(1); + this.btn_Delete.Name = "btn_Delete"; + this.btn_Delete.Size = new System.Drawing.Size(61, 32); + this.btn_Delete.TabIndex = 51; + this.btn_Delete.Text = "목록삭제"; + this.btn_Delete.UseVisualStyleBackColor = true; + this.btn_Delete.Click += new System.EventHandler(this.btn_Delete_Click); + // + // btn_AddList + // + this.btn_AddList.Location = new System.Drawing.Point(628, 3); + this.btn_AddList.Margin = new System.Windows.Forms.Padding(1); + this.btn_AddList.Name = "btn_AddList"; + this.btn_AddList.Size = new System.Drawing.Size(61, 32); + this.btn_AddList.TabIndex = 50; + this.btn_AddList.Text = "목록생성"; + this.btn_AddList.UseVisualStyleBackColor = true; + this.btn_AddList.Click += new System.EventHandler(this.btn_AddList_Click); + // + // panel1 + // + this.panel1.Controls.Add(this.chkEditorTest); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.btn_Delete); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.btn_Completion); + this.panel1.Controls.Add(this.tb_Search); + this.panel1.Controls.Add(this.btn_Progress); + this.panel1.Controls.Add(this.cb_state); + this.panel1.Controls.Add(this.btn_Merge); + this.panel1.Controls.Add(this.btnSearchISBN); + this.panel1.Controls.Add(this.btn_Lookup); + this.panel1.Controls.Add(this.btn_Close); + this.panel1.Controls.Add(this.btn_AddList); + this.panel1.Controls.Add(this.btn_Excel); + this.panel1.Controls.Add(this.btn_Save); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(1179, 38); + this.panel1.TabIndex = 52; + // + // btnSearchISBN + // + this.btnSearchISBN.Location = new System.Drawing.Point(565, 3); + this.btnSearchISBN.Margin = new System.Windows.Forms.Padding(1); + this.btnSearchISBN.Name = "btnSearchISBN"; + this.btnSearchISBN.Size = new System.Drawing.Size(61, 32); + this.btnSearchISBN.TabIndex = 50; + this.btnSearchISBN.Text = "ISBN 조회"; + this.btnSearchISBN.UseVisualStyleBackColor = true; + this.btnSearchISBN.Click += new System.EventHandler(this.btnSearchISBN_Click); + // + // panel2 + // + this.panel2.Controls.Add(this.dataGridView1); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(0, 38); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(1179, 623); + this.panel2.TabIndex = 53; + // + // chkEditorTest + // + this.chkEditorTest.AutoSize = true; + this.chkEditorTest.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.chkEditorTest.ForeColor = System.Drawing.Color.Red; + this.chkEditorTest.Location = new System.Drawing.Point(436, 7); + this.chkEditorTest.Name = "chkEditorTest"; + this.chkEditorTest.Size = new System.Drawing.Size(65, 28); + this.chkEditorTest.TabIndex = 52; + this.chkEditorTest.Text = "Editor\r\n(Test)"; + this.chkEditorTest.UseVisualStyleBackColor = true; + // // Mac_List // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); @@ -430,5 +444,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn charge; private System.Windows.Forms.DataGridViewTextBoxColumn dvc_cust; private System.Windows.Forms.DataGridViewTextBoxColumn check; + private System.Windows.Forms.CheckBox chkEditorTest; } } \ No newline at end of file diff --git a/unimarc/unimarc/마크/Mac_List.cs b/unimarc/unimarc/마크/Mac_List.cs index fb8fee9..1fc1bd8 100644 --- a/unimarc/unimarc/마크/Mac_List.cs +++ b/unimarc/unimarc/마크/Mac_List.cs @@ -312,14 +312,27 @@ namespace WindowsFormsApp1.Mac int idx_col = e.ColumnIndex; if (3 <= idx_col && idx_col <= 8) { - var marc = this.main.OpenFormInTab(() => new ExcelTest.Marc(this), allowMultiple: true); - - marc.input_list( - dataGridView1.Rows[idx_row].Cells["idx"].Value.ToString(), - dataGridView1.Rows[idx_row].Cells["list_name"].Value.ToString(), compidx, - (dataGridView1.Rows[idx_row].Cells["dvc_cust"]?.Value.ToString() ?? string.Empty), - (dataGridView1.Rows[idx_row].Cells["dvc_custname"]?.Value.ToString() ?? string.Empty) - ); + if (chkEditorTest.Checked) + { + var marc = this.main.OpenFormInTab(() => new ExcelTest.Marc2(this), allowMultiple: true); + marc.input_list( + dataGridView1.Rows[idx_row].Cells["idx"].Value.ToString(), + dataGridView1.Rows[idx_row].Cells["list_name"].Value.ToString(), compidx, + (dataGridView1.Rows[idx_row].Cells["dvc_cust"]?.Value.ToString() ?? string.Empty), + (dataGridView1.Rows[idx_row].Cells["dvc_custname"]?.Value.ToString() ?? string.Empty) + ); + } + else + { + var marc = this.main.OpenFormInTab(() => new ExcelTest.Marc(this), allowMultiple: true); + marc.input_list( + dataGridView1.Rows[idx_row].Cells["idx"].Value.ToString(), + dataGridView1.Rows[idx_row].Cells["list_name"].Value.ToString(), compidx, + (dataGridView1.Rows[idx_row].Cells["dvc_cust"]?.Value.ToString() ?? string.Empty), + (dataGridView1.Rows[idx_row].Cells["dvc_custname"]?.Value.ToString() ?? string.Empty) + ); + } + } if (((DataGridView)sender).Columns[idx_col].Name == "check") { diff --git a/unimarc/unimarc/마크/Marc.cs b/unimarc/unimarc/마크/Marc.cs index dde4f25..e0d6f21 100644 --- a/unimarc/unimarc/마크/Marc.cs +++ b/unimarc/unimarc/마크/Marc.cs @@ -98,95 +98,6 @@ namespace ExcelTest #endregion } - //public void input_list(string l_idx, string value) - //{ - // db.DBcon(); - - // lbl_BookList.Text = value; - - // string Area = - // // 0 1 2 3 - // "olb.idx, olb.isbn_marc, olb.header, olb.num, " + - // // 4 5 6 7 8 9 - // "olb.book_name, olb.author, olb.book_comp, olb.`count`, olb.price, olb.image_url, " + - // // 10 11 12 13 14 15 16 - // "mac.idx, mac.marc, mac.marc_chk, mac.marc1, mac.marc_chk1, mac.marc2, mac.marc_chk2, " + - // // 17 18 19 20 - // "mac.grade, mac.compidx, mac.`user`, mac.date"; - - // string CMD = string.Format("" + - // "SELECT {0} " + - // "FROM Obj_List_Book AS olb " + - // "LEFT JOIN Marc AS mac " + - // // "ON if (olb.m_idx = 0, mac.ISBN = olb.isbn_marc, mac.idx = olb.m_idx) " + - // "ON mac.ISBN = olb.isbn_marc " + - // "WHERE olb.l_idx = {1} " + - // "GROUP BY olb.book_name " + - // "ORDER BY olb.idx ASC;", Area, l_idx); - // string db_res = db.DB_Send_CMD_Search(CMD); - // string[] db_data = db_res.Split('|'); - - // string[] grid = { - // "", "", "", "", "", - // "", "", "", "", "", - // "", "", "V", "", "" }; - - // string[] MarcData = { "", "", "", "", "", "" }; - - // for (int a = 0; a < db_data.Length; a++) - // { - // if (a % 21 == 00) grid[0] = db_data[a]; - // if (a % 21 == 01) grid[1] = db_data[a]; - // if (a % 21 == 02) grid[2] = db_data[a]; - // if (a % 21 == 03) grid[2] += db_data[a]; - // if (a % 21 == 04) grid[3] = db_data[a]; - // if (a % 21 == 05) grid[4] = db_data[a]; - // if (a % 21 == 06) grid[5] = db_data[a]; - // if (a % 21 == 07) grid[6] = db_data[a]; - // if (a % 21 == 08) grid[7] = db_data[a]; - // if (a % 21 == 09) grid[8] = db_data[a]; - // if (a % 21 == 10) grid[9] = db_data[a]; - // if (a % 21 == 11) MarcData[0] = db_data[a]; - // if (a % 21 == 12) MarcData[1] = db_data[a]; - // if (a % 21 == 13) MarcData[2] = db_data[a]; - // if (a % 21 == 14) MarcData[3] = db_data[a]; - // if (a % 21 == 15) MarcData[4] = db_data[a]; - // if (a % 21 == 16) MarcData[5] = db_data[a]; - // if (a % 21 == 17) - // { - // grid[10] = RealMarc(MarcData); - // if (grid[10] == "") grid[11] = "3"; - // else grid[11] = db_data[a]; - // } - // if (a % 21 == 18) { - // if (db_data[a] == "") grid[13] = ""; - // else if (mCompidx != db_data[a]) { - // string FindCompCmd = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", db_data[a]); - // grid[13] = db.DB_Send_CMD_Search(FindCompCmd).Replace("|", ""); - // } - // } - // if (a % 21 == 19) { - // if (grid[13] == "") - // grid[13] = db_data[a]; - // } - // if (a % 21 == 20) - // { - // grid[14] = db_data[a]; - // List_Book.Rows.Add(grid); - // } - // } - - // for (int a = 0; a < List_Book.Rows.Count; a++) - // { - // string Grade = List_Book.Rows[a].Cells["grade"].Value.ToString(); - // string SaveDate = List_Book.Rows[a].Cells["SaveDate"].Value.ToString(); - // List_Book.Rows[a].DefaultCellStyle.ForeColor = SetGradeColor(Grade); - // SaveDateCheck(SaveDate, a); - // } - - - //} - private string RealMarc(string[] MarcData) { string result = ""; diff --git a/unimarc/unimarc/마크/Marc2.cs b/unimarc/unimarc/마크/Marc2.cs new file mode 100644 index 0000000..bcf750c --- /dev/null +++ b/unimarc/unimarc/마크/Marc2.cs @@ -0,0 +1,817 @@ +//using Microsoft.Office.Interop.Excel; +using AR; +using OpenQA.Selenium.DevTools.V136.Animation; +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Drawing.Drawing2D; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Text.RegularExpressions; +using System.Web.UI; +using System.Windows.Forms; +using UniMarc; +using UniMarc.ListOfValue; +using UniMarc.마크; +using WindowsFormsApp1; +using WindowsFormsApp1.Mac; + +namespace ExcelTest +{ + public partial class Marc2 : Form + { + /// + /// isbn / 도서명 / 저자 / 출판사 / 가격 + /// + string[] data_book = { "", "", "", "", "" }; + int SaveRowIdx = -1; + public string mUserName; + string mCompidx = UniMarc.Properties.Settings.Default.compidx; + string mListIdx = ""; + public string find; + public string change; + public string call = ""; + private string data008 = string.Empty; + private bool mLoadCompleted = false; + string tbName = ""; + public int checkCout = 0; + public bool gridViewChk = false; // True / False + Helper_DB db = new Helper_DB(); + Help008Tag tag008 = new Help008Tag(); + Skill_Search_Text search_Text = new Skill_Search_Text(); + String_Text st = new String_Text(); + Mac_List ml; + + public Marc2() + { + InitializeComponent(); + this.ml = null; + mUserName = string.Empty; + marcEditorControl1.db = this.db; + marcEditorControl1.BookSaved += MarcEditorControl_BookSaved; + marcEditorControl1.FillBlankClicked += MarcEditorControl_FillBlankClicked; + } + public Marc2(Mac_List _ml) + { + InitializeComponent(); + ml = _ml; + mUserName = ml.user_name; + marcEditorControl1.db = this.db; + marcEditorControl1.BookSaved += MarcEditorControl_BookSaved; + marcEditorControl1.FillBlankClicked += MarcEditorControl_FillBlankClicked; + } + + string l_idx = string.Empty; + string c_idx = string.Empty; + private void Marc_Load(object sender, EventArgs e) + { + + } + + /// + /// 가져온 목록을 책목록과 연동하여 Grid에 집어넣음. + /// + /// 목록일자 + /// 목록명 + public void input_list(string l_idx, string value, string C_idx, string custidx, string custname) + { + db.DBcon(); + if (value.isEmpty() == false) + { + if (value.IndexOf("]") != -1) + this.Text = $"마크 작성(1)-{value.Substring(value.IndexOf("]") + 1)}"; + else + this.Text = $"마크 작성(1){value}"; + } + + this.l_idx = l_idx; + this.c_idx = C_idx; + string Area = "`idx`, `isbn_marc`, `header`, `num`, `book_name`, `author`, `book_comp`, `count`, `pay`, `image_url`, `m_idx`"; + string[] sear_tbl = { "l_idx", "compidx" }; + string[] sear_col = { l_idx, C_idx }; + + lbl_BookList.Text = value; + tbCustName.Text = custname; + lbCustIDX.Text = custidx; + + string cmd = + string.Format("SELECT {0} " + + "FROM {1} " + + "WHERE `{2}` = \"{4}\" AND `{3}` = \"{5}\"" + + "ORDER BY `idx` ASC;", Area, "Obj_List_Book", sear_tbl[0], sear_tbl[1], sear_col[0], sear_col[1]); + string db_res = db.DB_Send_CMD_Search(cmd); + string[] db_data = db_res.Split('|'); + string[] grid = { + "", "", "", "", "", + "", "", "", "", "", + "", "", "V", "", "" }; + + + + mLoadCompleted = false; + for (int a = 0; a < db_data.Length - 1; a += 11) + { + + grid[0] = db_data[a]; // 0: idx + grid[1] = db_data[a + 1]; // 1: isbn + grid[2] = db_data[a + 2]; // 2: header + grid[2] += db_data[a + 3]; // 2: num + grid[3] = db_data[a + 4]; // 3: book_num + grid[4] = db_data[a + 5]; // 4: author + grid[5] = db_data[a + 6]; // 5: book_comp + grid[6] = db_data[a + 7]; // 6: count + grid[7] = db_data[a + 8]; // 7: pay + grid[8] = db_data[a + 9]; // 8: image_url + grid[9] = db_data[a + 10]; // 9: m_idx + + List_Book.Rows.Add(grid); + //if (a % 11 == 0) { grid[0] = db_data[a]; } // 0: idx + //if (a % 11 == 1) { grid[1] = db_data[a+1]; } // 1: isbn + //if (a % 11 == 2) { grid[2] = db_data[a+2]; } // 2: header + //if (a % 11 == 3) { grid[2] += db_data[a+3]; } // 2: num + //if (a % 11 == 4) { grid[3] = db_data[a+4]; } // 3: book_num + //if (a % 11 == 5) { grid[4] = db_data[a+5]; } // 4: author + //if (a % 11 == 6) { grid[5] = db_data[a+6]; } // 5: book_comp + //if (a % 11 == 7) { grid[6] = db_data[a+7]; } // 6: count + //if (a % 11 == 8) { grid[7] = db_data[a+8]; } // 7: pay + //if (a % 11 == 9) { grid[8] = db_data[a+9]; } // 8: image_url + //if (a % 11 == 10) { grid[9] = db_data[a+10]; // 9: m_idx + // List_Book.Rows.Add(grid); + //} + } + chk_Marc(); + mLoadCompleted = true; + + List_Book.ClearSelection(); + if (this.List_Book.RowCount > 0) + List_Book.Rows[0].Selected = true; + } + + /// + /// 마크 유무 확인하는 함수 + /// + void chk_Marc() + { + for (int a = 0; a < List_Book.Rows.Count; a++) + { + string Area = + // 0 1 + "`idx`, `compidx`, " + + // 2 3 4 5 6 7 + "`marc`, `marc_chk`, `marc1`, `marc_chk1`, `marc2`, `marc_chk2`, " + + // 8 9 10 11 + "`grade`, `008tag`, `user`, `date`"; + + string Table = "Marc"; + + string[] sear_tbl = { "ISBN" }; + string[] sear_col = { List_Book.Rows[a].Cells["ISBN13"].Value.ToString() }; + + //if (List_Book.Rows[a].Cells["marc_idx"].Value.ToString() != "0") {//여기 조건이 이상함.. 여기 조건때문에 순서가 잘 못 뜨는 경우 발생.. + // sear_tbl[0] = "idx"; + // sear_col[0] = List_Book.Rows[a].Cells["marc_idx"].Value.ToString(); + //} + + string Chk_Cmd = string.Format("SELECT {0} FROM {1} WHERE `{2}` = \"{3}\" ORDER BY FIELD(`compidx`, {4}) DESC;", + Area, Table, sear_tbl[0], sear_col[0], mCompidx); + + string Chk_Res = db.DB_Send_CMD_Search(Chk_Cmd); + string[] Chk_Arr = Chk_Res.Split('|'); + + bool isMyData = true; + if (Chk_Arr.Length < 2) + { + List_Book.Rows[a].Cells["grade"].Value = "3"; + List_Book.Rows[a].DefaultCellStyle.ForeColor = Color.Red; + continue; + } + + if (Chk_Arr[1] != mCompidx) + isMyData = false; + + string[] MarcData = { Chk_Arr[2], Chk_Arr[4], Chk_Arr[6] }; + string[] CheckData = { Chk_Arr[3], Chk_Arr[5], Chk_Arr[7] }; + + List_Book.Rows[a].DefaultCellStyle.ForeColor = SetGradeColor(Chk_Arr[8], isMyData); + List_Book.Rows[a].Cells["marc_idx"].Value = Chk_Arr[0]; + List_Book.Rows[a].Cells["db_marc"].Value = MarcData[0];//NewestMarc(MarcData, CheckData); + List_Book.Rows[a].Cells["grade"].Value = Chk_Arr[8]; + // text008.Text = Chk_Arr[9]; + List_Book.Rows[a].Cells["user"].Value = Chk_Arr[10]; + List_Book.Rows[a].Cells["SaveDate"].Value = Chk_Arr[11]; + + if (isMyData) + SaveDateCheck(Chk_Arr[11], a); + + else + { + string FindCompCmd = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", Chk_Arr[1]); + List_Book.Rows[a].Cells["user"].Value = db.DB_Send_CMD_Search(FindCompCmd).Replace("|", ""); + List_Book.Rows[a].DefaultCellStyle.BackColor = Color.LightGray; + } + } + } + + private string NewestMarc(string[] marc, string[] marc_chk) + { + string result = ""; + int count = 0; + foreach (string chk in marc_chk) + { + if (chk == "1") + result = marc[count]; + + count++; + } + return result; + } + + private Color SetGradeColor(string Grade, bool isMyData = true) + { + if (!isMyData) + return Color.Orange; + + switch (Grade) + { + case "0": // A + return Color.Blue; + + case "1": // B + return Color.Black; + + case "2": // C + return Color.Gray; + + case "3": // D + return Color.Red; + + default: + return Color.Black; + } + } + + /// + /// 마지막 저장시각 14일이전일 경우 배경 색 변경 + /// + /// 마지막 저장시각 + /// 해당 행 + private void SaveDateCheck(string Date, int row) + { + DateTime SaveDate = DateTime.ParseExact(Date, "yyyy-MM-dd HH:mm:ss", + System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None); + DateTime TargetDate = DateTime.Today.AddDays(-14); + + int result = DateTime.Compare(SaveDate, TargetDate); + + if (result >= 0) // SaveDate가 같거나 큼 + List_Book.Rows[row].DefaultCellStyle.BackColor = Color.Yellow; + + else // TargetDate가 큼 + List_Book.Rows[row].DefaultCellStyle.BackColor = Color.White; + + } + + + private string mOldMarc = string.Empty; + private void List_Book_SelectionChanged(object sender, EventArgs e) + { + if (!mLoadCompleted) return; + int row_idx = List_Book.CurrentCell.RowIndex; + int col_idx = List_Book.CurrentCell.ColumnIndex; + if (row_idx == -1 || col_idx == -1) { return; } + SaveRowIdx = row_idx; + + mOldMarc = List_Book.Rows[row_idx].Cells["db_marc"].Value.ToString(); + string isbn = List_Book.Rows[row_idx].Cells["ISBN13"].Value.ToString(); + if (isbn != "") + { + string CountQuery = string.Format("SELECT Count(isbn) FROM Marc WHERE isbn = {0} GROUP BY isbn;", isbn); + string CountResult = db.self_Made_Cmd(CountQuery).Replace("|", ""); + + if (CountResult == "") + btn_CopySelect.Text = "0"; + + if (CountResult == "0") + { + btn_CopySelect.Enabled = false; + btn_CopySelect.BackColor = Color.Silver; + } + else + { + btn_CopySelect.Enabled = true; + btn_CopySelect.BackColor = Color.Khaki; + } + + btn_CopySelect.Text = CountResult; + } + + if (check_V(row_idx, col_idx)) + return; + + string isbn13 = List_Book.Rows[row_idx].Cells["ISBN13"].Value?.ToString() ?? ""; + string bookName = List_Book.Rows[row_idx].Cells["book_name"].Value?.ToString() ?? ""; + string author = List_Book.Rows[row_idx].Cells["author"].Value?.ToString() ?? ""; + string publisher = List_Book.Rows[row_idx].Cells["book_comp"].Value?.ToString() ?? ""; + string price = List_Book.Rows[row_idx].Cells["pay"].Value?.ToString() ?? ""; + string url = List_Book.Rows[row_idx].Cells["url"].Value?.ToString() ?? ""; // or image_url? + string marcIdx = List_Book.Rows[row_idx].Cells["marc_idx"].Value?.ToString() ?? ""; + string dbMarc = List_Book.Rows[row_idx].Cells["db_marc"].Value?.ToString() ?? ""; + string grade = List_Book.Rows[row_idx].Cells["grade"].Value?.ToString() ?? ""; + string user = List_Book.Rows[row_idx].Cells["user"].Value?.ToString() ?? ""; + string saveDate = List_Book.Rows[row_idx].Cells["SaveDate"].Value?.ToString() ?? ""; + string listIdx = List_Book.Rows[row_idx].Cells["list_idx"].Value?.ToString() ?? ""; // verify this column name in input_list + + marcEditorControl1.LoadBookData(isbn13, bookName, author, publisher, price, url, marcIdx, dbMarc, grade, user, saveDate, listIdx); + } + //private void List_Book_CellClick(object sender, DataGridViewCellEventArgs e) + //{ + // //if (e.RowIndex == -1) { return; } + // //int row_idx = e.RowIndex; + // //SaveRowIdx = row_idx; + // //int col_idx = e.ColumnIndex; + + // //string isbn = List_Book.Rows[row_idx].Cells["ISBN13"].Value.ToString(); + // //if (isbn != "") { + // // string CountQuery = string.Format("SELECT Count(isbn) FROM Marc WHERE isbn = {0} GROUP BY isbn;", isbn); + // // string CountResult = db.self_Made_Cmd(CountQuery).Replace("|", ""); + + // // if (CountResult == "") + // // btn_CopySelect.Text = "0"; + + // // if (CountResult == "0") { + // // btn_CopySelect.Enabled = false; + // // btn_CopySelect.BackColor = Color.Silver; + // // } + // // else { + // // btn_CopySelect.Enabled = true; + // // btn_CopySelect.BackColor = Color.Khaki; + // // } + + // // btn_CopySelect.Text = CountResult; + // //} + + // //tabControl1.SelectedIndex = 0; + + // //if (check_V(row_idx, col_idx)) + // // return; + + // //Save_data(row_idx); + // //richTextBox1.Text = ""; + + // //bool check_Marc = click_Marc(row_idx); + + // //if (!check_Marc) + // // richTextBox1.Text = Make_Empty(); + // //else + // // ReadRemark(row_idx); + + // //input_picture(row_idx); + // //Create_008(); + // //st.Color_change("▼", richTextBox1); + // //st.Color_change("▲", richTextBox1); + + // //int grade = 2; + // //if (List_Book.Rows[row_idx].Cells["grade"].Value != null || List_Book.Rows[row_idx].Cells["grade"].Value.ToString() != "") { + // // grade = Convert.ToInt32(List_Book.Rows[row_idx].Cells["grade"].Value.ToString()); + // //} + // //cb_grade.SelectedIndex = grade; + // //OnSaveData(row_idx); + //} + + + bool check_V(int row, int col) + { + string name = List_Book.Columns[col].Name; + if (name == "colCheck") + { + if (List_Book.Rows[row].Cells[col].Value.ToString() == "V") + List_Book.Rows[row].Cells[col].Value = ""; + + else + List_Book.Rows[row].Cells["colCheck"].Value = "V"; + + return true; + } + else + return false; + } + + + private void btn_Search_Click(object sender, EventArgs e) + { + if (List_Book.RowCount < 0) return; + + Search_ReSet(); + + bool isSort = rb_Sort.Checked; + int combo = comboBox8.SelectedIndex; // 0: 등급 / 1: 복본 + + if (isSort) + { + if (combo == 0) + { + List_Book.Sort(List_Book.Columns["grade"], System.ComponentModel.ListSortDirection.Ascending); + } + else + { + List_Book.Sort(List_Book.Columns["ISBN13"], System.ComponentModel.ListSortDirection.Ascending); + } + } + else + { + int comboIdx; + if (combo == 0) + { + comboIdx = comboBox9.SelectedIndex; + Search_Filter("grade", comboIdx); + } + else + { // 수정필요 + + } + } + } + #region Search_Click_Sub + private void Search_ReSet() + { + DataGridViewBand reSet; + for (int a = 0; a < List_Book.RowCount; a++) + { + reSet = List_Book.Rows[a]; + reSet.Visible = true; + } + } + + private void Search_Filter(string target, int comboIdx) + { + int count = List_Book.Rows.Count; + DataGridViewBand band; + if (comboIdx == 0) + { + for (int a = 0; a < count; a++) + { + band = List_Book.Rows[a]; + band.Visible = true; + } + return; + } + + comboIdx--; + for (int a = 0; a < count; a++) + { + if (List_Book.Rows[a].Cells[target].Value.ToString() != comboIdx.ToString()) + { + band = List_Book.Rows[a]; + band.Visible = false; + } + } + } + #endregion + + private void btn_CopySelect_Click(object sender, EventArgs e) + { + //TODO: 마크 물리는쪽 + int row = List_Book.CurrentCell.RowIndex; + string isbn = List_Book.Rows[row].Cells["ISBN13"].Value.ToString(); + + MarcCopySelect copySelect = new MarcCopySelect(this); + copySelect.MarcFormRowIndex = row; + copySelect.Init("isbn", isbn); + copySelect.Show(); + } + + /// + /// 선택된 마크에 대한 정보를 그리드뷰에 저장. + /// + /// + /// [0] idx, [1] compidx, [2] user, [3] date, [4] grade, [5] tag008, [6] marc + public void SelectMarc_Sub(int row, string[] GridData) + { + List_Book.Rows[row].Cells["marc_idx"].Value = GridData[0]; + List_Book.Rows[row].Cells["user"].Value = GridData[2]; + List_Book.Rows[row].Cells["SaveDate"].Value = GridData[4]; + List_Book.Rows[row].Cells["grade"].Value = GridData[3]; + // text008.Text = GridData[5]; + List_Book.Rows[row].Cells["db_marc"].Value = GridData[6]; + mOldMarc = GridData[6]; + List_Book.Rows[row].DefaultCellStyle.ForeColor = SetGradeColor(GridData[4]); + List_Book.Rows[row].DefaultCellStyle.BackColor = Color.Yellow; + + if (List_Book.CurrentRow != null && List_Book.CurrentRow.Index == row) + { + List_Book_SelectionChanged(null, null); + } + } + + private void MarcEditorControl_BookSaved(object sender, ExcelTest.MarcEditorControl.BookSavedEventArgs e) + { + if (SaveRowIdx >= 0 && SaveRowIdx < List_Book.Rows.Count) + { + string currentListIdx = List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value?.ToString(); + // If list_idx column name differs, check input_list. Assuming "list_idx" or "idx". + // In input_list: grid[0] = db_data[a]; (idx). + // And MarcEditorControl uses "list_idx" passed from List_Book_SelectionChanged. + // We need to match what we passed. + + // Just update based on SaveRowIdx for now, assuming modal blocking or single user interaction. + List_Book.Rows[SaveRowIdx].Cells["grade"].Value = e.Grade; + List_Book.Rows[SaveRowIdx].Cells["SaveDate"].Value = e.SaveDate; + List_Book.Rows[SaveRowIdx].Cells["user"].Value = e.User; + List_Book.Rows[SaveRowIdx].Cells["db_marc"].Value = e.DBMarc; + List_Book.Rows[SaveRowIdx].Cells["marc_idx"].Value = e.MarcIdx; + List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor = SetGradeColor(e.Grade); + } + } + + private void MarcEditorControl_FillBlankClicked(object sender, EventArgs e) + { + if (List_Book.CurrentRow == null) return; + int row = List_Book.CurrentRow.Index; + string ISBN = List_Book.Rows[row].Cells["ISBN13"].Value?.ToString(); + + if (string.IsNullOrEmpty(ISBN)) + { + MessageBox.Show("ISBN이 존재하지않습니다!"); + return; + } + + UniMarc.Marc_FillBlank fb = new UniMarc.Marc_FillBlank(this); + for (int a = 0; a < List_Book.Rows.Count; a++) + { + if (List_Book.Rows[a].DefaultCellStyle.ForeColor == Color.Red) + { + string[] GridData = + { + a.ToString(), + List_Book.Rows[a].Cells["ISBN13"].Value?.ToString() ?? "", + List_Book.Rows[a].Cells["book_name"].Value?.ToString() ?? "", + List_Book.Rows[a].Cells["author"].Value?.ToString() ?? "", + List_Book.Rows[a].Cells["book_comp"].Value?.ToString() ?? "", + List_Book.Rows[a].Cells["pay"].Value?.ToString() ?? "", + "" + }; + fb.InitFillBlank(GridData); + } + } + fb.ISBN = ISBN; + fb.Show(); + } + + private void comboBox8_SelectedIndexChanged(object sender, EventArgs e) + { + comboBox9.Items.Clear(); + + ComboBox cb = sender as ComboBox; + if (cb.SelectedIndex == 0) + { + comboBox9.Enabled = true; + string[] grade = { "전체", "A", "B", "C", "D" }; + comboBox9.Items.AddRange(grade); + comboBox9.SelectedIndex = 0; + } + else + comboBox9.Enabled = false; + } + + private void Radio_Sort_CheckedChanged(object sender, EventArgs e) + { + RadioButton rb = sender as RadioButton; + string text = rb.Text; + if (text == "정렬") + comboBox9.Enabled = false; + + else + comboBox9.Enabled = true; + } + + + private void btn_mk_marcList_Click(object sender, EventArgs e) + { + Marc_mkList mkList = new Marc_mkList(this); + mkList.StartPosition = FormStartPosition.CenterScreen; + mkList.Show(); + } + #region 마크생성목록_Sub + public bool Check_BackColor(int row) + { + if (List_Book.Rows[row].DefaultCellStyle.ForeColor != Color.Red) + return true; + + return false; + } + public bool Check_List_V(int row) + { + if (List_Book.Rows[row].Cells["colCheck"].Value.ToString() == "V") + return true; + + return false; + } + #endregion + + private void checkBox3_CheckedChanged(object sender, EventArgs e) + { + bool isCheck = checkBox3.Checked; + if (isCheck) + { + for (int a = 0; a < List_Book.Rows.Count; a++) + { + List_Book.Rows[a].Cells["colCheck"].Value = "V"; + } + } + else + { + for (int a = 0; a < List_Book.Rows.Count; a++) + { + List_Book.Rows[a].Cells["colCheck"].Value = ""; + } + } + } + + private void List_Book_KeyDown(object sender, KeyEventArgs e) + { + int row = List_Book.CurrentCell.RowIndex; + if (e.KeyCode == Keys.Space) + { + if (List_Book.Rows[row].Cells["colCheck"].Value.ToString() == "V") + List_Book.Rows[row].Cells["colCheck"].Value = ""; + + else + List_Book.Rows[row].Cells["colCheck"].Value = "V"; + } + } + + private void FillTextBox_KeyDown(object sender, KeyEventArgs e) + { + TextBox tb = sender as TextBox; + + //if (e.KeyCode == Keys.F3) + //{ + // int line = tb.SelectionStart; + // tb.Text = tb.Text.Insert(line, "▽"); + // tb.SelectionStart = line + 1; + //} + if (e.KeyCode == Keys.F3) + { + tb.InvokeInsertText("▽"); + //tb.Select(tb.Text.Length, 0); + } + else if (e.KeyCode == Keys.F4) + { + tb.InvokeInsertText("△"); + //tb.Select(tb.Text.Length, 0); + } + + //tb.SelectionStart = tb.Text.Length; + //tb.Select(tb.Text.Length, 0); + } + + + #region DataGridView 드래그 행이동 이벤트 함수 + + Skill_Grid sg = new Skill_Grid(); + + private void List_Book_MouseMove(object sender, MouseEventArgs e) + { + sg.MouseMove(sender, e); + } + + private void List_Book_MouseDown(object sender, MouseEventArgs e) + { + sg.MouseDown(sender, e); + } + + private void List_Book_DragOver(object sender, DragEventArgs e) + { + sg.DragOver(sender, e); + } + + private void List_Book_DragDrop(object sender, DragEventArgs e) + { + sg.DragDrop(sender, e); + } + + #endregion + + + + private bool isEmpty(string boxText) + { + if (boxText == "") + return false; + return true; + } + + private bool isEmpty(string[] boxText) + { + bool[] isText = new bool[boxText.Length]; + int count = 0; + int chkCount = 0; + foreach (string Check in boxText) + { + if (Check == "") + isText[count] = false; + else + { + isText[count] = true; + chkCount++; + } + count++; + } + + if (chkCount == 0) + return false; + + return true; + } + + + private void btn_FilterReturn_Click(object sender, EventArgs e) + { + rb_Filter.Checked = false; + rb_Sort.Checked = false; + + comboBox8.SelectedIndex = 0; + comboBox9.SelectedIndex = 0; + + List_Book.Sort(list_idx, System.ComponentModel.ListSortDirection.Ascending); + } + + private void List_Book_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Skill_Grid sg = new Skill_Grid(); + sg.Print_Grid_Num(sender, e); + } + + private void lbl_BookList_Click(object sender, EventArgs e) + { + LovCustom(); + + } + + void LovCustom() + { + var inputsearch = "";// tbCustName.Text.Trim(); + var where = ""; + if (inputsearch.isEmpty() == false) + { + where = $"c_sangho like '%{inputsearch.Replace("'", "''")}%'"; + } + var dt = DB2.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where); + using (var f = new fSelectDT(dt)) + if (f.ShowDialog() == DialogResult.OK) + { + var dr = f.SelectedRow; + if (dr == null) return; + lbCustIDX.Text = dr["idx"]?.ToString() ?? string.Empty; + tbCustName.Text = dr["c_sangho"]?.ToString() ?? string.Empty; + + if (int.TryParse(lbCustIDX.Text, out int custidx) && custidx >= 0) + { + var sql = $"update Obj_List set customer={custidx} where idx = {l_idx} and comp_num={c_idx}"; + var cnt = DB2.ExcuteNonQuery(sql); + if (cnt != 1) + UTIL.MsgE($"데이터 저장시 오류가 발생했습니다. 영향을 받은 행 수 = {cnt}"); + } + + } + } + + private void Marc_KeyDown(object sender, KeyEventArgs e) + { + if (e.KeyCode == Keys.Escape) + { + if (UTIL.MsgQ("현재 화면을 닫을까요?") != DialogResult.Yes) return; + this.Close(); + } + } + + private void button1_Click(object sender, EventArgs e) + { + // 현재 데이터를 한줄 복사하고 ISBN 값을 삭제한다 + // 생성된 자료는 좌측 목록에 추가되어야하고, 그 목록이 선택되도록 한다. + if (List_Book.SelectedRows.Count == 0) + return; + + DataGridViewRow selectedRow = List_Book.SelectedRows[0]; + int nRow = List_Book.Rows.Add(); + DataGridViewRow newRow = List_Book.Rows[nRow]; + + for (int i = 0; i < selectedRow.Cells.Count; i++) + { + newRow.Cells[i].Value = selectedRow.Cells[i].Value; + } + + newRow.Cells["ISBN13"].Value = ""; + newRow.Cells["marc_idx"].Value = ""; + newRow.Cells["list_idx"].Value = ""; + //newRow.Cells["grade"].Value = "3"; // 등급 초기화 (D) + newRow.DefaultCellStyle.ForeColor = Color.Red; // 색상 초기화 (D급 색상) + + List_Book.ClearSelection(); + newRow.Selected = true; + List_Book.FirstDisplayedScrollingRowIndex = nRow; + } + } +} \ No newline at end of file diff --git a/unimarc/unimarc/마크/Marc2.designer.cs b/unimarc/unimarc/마크/Marc2.designer.cs new file mode 100644 index 0000000..c212378 --- /dev/null +++ b/unimarc/unimarc/마크/Marc2.designer.cs @@ -0,0 +1,568 @@ +namespace ExcelTest +{ + partial class Marc2 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.Label label31; + System.Windows.Forms.Label label30; + System.Windows.Forms.Label label33; + System.Windows.Forms.Label label32; + System.Windows.Forms.Label label29; + System.Windows.Forms.Label label28; + System.Windows.Forms.Label label24; + System.Windows.Forms.Label label25; + System.Windows.Forms.Label label26; + System.Windows.Forms.Label label27; + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle32 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle31 = new System.Windows.Forms.DataGridViewCellStyle(); + this.marcEditorControl1 = new ExcelTest.MarcEditorControl(); + this.List_Book = new System.Windows.Forms.DataGridView(); + this.list_idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ISBN13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.num = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.pay = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.url = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.marc_idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.db_marc = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.grade = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCheck = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.user = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.SaveDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.rb_Sort = new System.Windows.Forms.RadioButton(); + this.rb_Filter = new System.Windows.Forms.RadioButton(); + this.comboBox8 = new System.Windows.Forms.ComboBox(); + this.comboBox9 = new System.Windows.Forms.ComboBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.btn_mk_marcList = new System.Windows.Forms.Button(); + this.btn_CopySelect = new System.Windows.Forms.Button(); + this.btn_FilterReturn = new System.Windows.Forms.Button(); + this.btn_Search = new System.Windows.Forms.Button(); + this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.tbCustName = new System.Windows.Forms.Button(); + this.lbCustIDX = new System.Windows.Forms.Label(); + this.lbl_BookList = new System.Windows.Forms.Label(); + this.btCopy = new System.Windows.Forms.Button(); + label31 = new System.Windows.Forms.Label(); + label30 = new System.Windows.Forms.Label(); + label33 = new System.Windows.Forms.Label(); + label32 = new System.Windows.Forms.Label(); + label29 = new System.Windows.Forms.Label(); + label28 = new System.Windows.Forms.Label(); + label24 = new System.Windows.Forms.Label(); + label25 = new System.Windows.Forms.Label(); + label26 = new System.Windows.Forms.Label(); + label27 = new System.Windows.Forms.Label(); + ((System.ComponentModel.ISupportInitialize)(this.List_Book)).BeginInit(); + this.panel1.SuspendLayout(); + this.SuspendLayout(); + // + // marcEditorControl1 + // + this.marcEditorControl1.BackColor = System.Drawing.Color.Gray; + this.marcEditorControl1.CurrentAuthor = null; + this.marcEditorControl1.CurrentBookName = null; + this.marcEditorControl1.CurrentDBMarc = null; + this.marcEditorControl1.CurrentGrade = null; + this.marcEditorControl1.CurrentISBN13 = null; + this.marcEditorControl1.CurrentListIdx = null; + this.marcEditorControl1.CurrentMarcIdx = null; + this.marcEditorControl1.CurrentPrice = null; + this.marcEditorControl1.CurrentPublisher = null; + this.marcEditorControl1.CurrentSaveDate = null; + this.marcEditorControl1.CurrentURL = null; + this.marcEditorControl1.CurrentUser = null; + this.marcEditorControl1.Location = new System.Drawing.Point(562, 7); + this.marcEditorControl1.Name = "marcEditorControl1"; + this.marcEditorControl1.Size = new System.Drawing.Size(1230, 892); + this.marcEditorControl1.TabIndex = 0; + // + // label31 + // + label31.Location = new System.Drawing.Point(0, 0); + label31.Name = "label31"; + label31.Size = new System.Drawing.Size(100, 23); + label31.TabIndex = 0; + // + // label30 + // + label30.Location = new System.Drawing.Point(0, 0); + label30.Name = "label30"; + label30.Size = new System.Drawing.Size(100, 23); + label30.TabIndex = 0; + // + // label33 + // + label33.Location = new System.Drawing.Point(0, 0); + label33.Name = "label33"; + label33.Size = new System.Drawing.Size(100, 23); + label33.TabIndex = 0; + // + // label32 + // + label32.Location = new System.Drawing.Point(0, 0); + label32.Name = "label32"; + label32.Size = new System.Drawing.Size(100, 23); + label32.TabIndex = 0; + // + // label29 + // + label29.Location = new System.Drawing.Point(0, 0); + label29.Name = "label29"; + label29.Size = new System.Drawing.Size(100, 23); + label29.TabIndex = 0; + // + // label28 + // + label28.Location = new System.Drawing.Point(0, 0); + label28.Name = "label28"; + label28.Size = new System.Drawing.Size(100, 23); + label28.TabIndex = 0; + // + // label24 + // + label24.Location = new System.Drawing.Point(0, 0); + label24.Name = "label24"; + label24.Size = new System.Drawing.Size(100, 23); + label24.TabIndex = 0; + // + // label25 + // + label25.Location = new System.Drawing.Point(0, 0); + label25.Name = "label25"; + label25.Size = new System.Drawing.Size(100, 23); + label25.TabIndex = 0; + // + // label26 + // + label26.Location = new System.Drawing.Point(0, 0); + label26.Name = "label26"; + label26.Size = new System.Drawing.Size(100, 23); + label26.TabIndex = 0; + // + // label27 + // + label27.Location = new System.Drawing.Point(0, 0); + label27.Name = "label27"; + label27.Size = new System.Drawing.Size(100, 23); + label27.TabIndex = 0; + // + // List_Book + // + this.List_Book.AllowDrop = true; + this.List_Book.AllowUserToAddRows = false; + this.List_Book.AllowUserToDeleteRows = false; + this.List_Book.AllowUserToResizeColumns = false; + this.List_Book.BackgroundColor = System.Drawing.Color.Gray; + this.List_Book.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle29.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle29.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle29.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle29.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle29.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle29.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle29.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.List_Book.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle29; + this.List_Book.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.list_idx, + this.ISBN13, + this.num, + this.book_name, + this.author, + this.book_comp, + this.count, + this.pay, + this.url, + this.marc_idx, + this.db_marc, + this.grade, + this.colCheck, + this.user, + this.SaveDate}); + this.List_Book.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; + this.List_Book.Location = new System.Drawing.Point(12, 74); + this.List_Book.MultiSelect = false; + this.List_Book.Name = "List_Book"; + this.List_Book.ReadOnly = true; + dataGridViewCellStyle32.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle32.BackColor = System.Drawing.SystemColors.ControlDark; + dataGridViewCellStyle32.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle32.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle32.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle32.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle32.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.List_Book.RowHeadersDefaultCellStyle = dataGridViewCellStyle32; + this.List_Book.RowTemplate.Height = 23; + this.List_Book.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.List_Book.Size = new System.Drawing.Size(543, 822); + this.List_Book.TabIndex = 217; + this.List_Book.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.List_Book_RowPostPaint); + this.List_Book.SelectionChanged += new System.EventHandler(this.List_Book_SelectionChanged); + this.List_Book.DragDrop += new System.Windows.Forms.DragEventHandler(this.List_Book_DragDrop); + this.List_Book.DragOver += new System.Windows.Forms.DragEventHandler(this.List_Book_DragOver); + this.List_Book.KeyDown += new System.Windows.Forms.KeyEventHandler(this.List_Book_KeyDown); + this.List_Book.MouseDown += new System.Windows.Forms.MouseEventHandler(this.List_Book_MouseDown); + this.List_Book.MouseMove += new System.Windows.Forms.MouseEventHandler(this.List_Book_MouseMove); + // + // list_idx + // + this.list_idx.HeaderText = "list_idx"; + this.list_idx.Name = "list_idx"; + this.list_idx.ReadOnly = true; + this.list_idx.Visible = false; + this.list_idx.Width = 30; + // + // ISBN13 + // + this.ISBN13.FillWeight = 136.2398F; + this.ISBN13.HeaderText = "ISBN13"; + this.ISBN13.Name = "ISBN13"; + this.ISBN13.ReadOnly = true; + this.ISBN13.Visible = false; + // + // num + // + this.num.HeaderText = "연번"; + this.num.Name = "num"; + this.num.ReadOnly = true; + this.num.Width = 50; + // + // book_name + // + this.book_name.FillWeight = 135.5107F; + this.book_name.HeaderText = "도서명"; + this.book_name.Name = "book_name"; + this.book_name.ReadOnly = true; + this.book_name.Width = 150; + // + // author + // + this.author.FillWeight = 67.49011F; + this.author.HeaderText = "저자"; + this.author.Name = "author"; + this.author.ReadOnly = true; + this.author.Width = 80; + // + // book_comp + // + this.book_comp.FillWeight = 76.49199F; + this.book_comp.HeaderText = "출판사"; + this.book_comp.Name = "book_comp"; + this.book_comp.ReadOnly = true; + this.book_comp.Width = 80; + // + // count + // + this.count.HeaderText = "C"; + this.count.Name = "count"; + this.count.ReadOnly = true; + this.count.Width = 30; + // + // pay + // + this.pay.FillWeight = 84.26746F; + this.pay.HeaderText = "정가"; + this.pay.Name = "pay"; + this.pay.ReadOnly = true; + this.pay.Width = 62; + // + // url + // + this.url.HeaderText = "url"; + this.url.Name = "url"; + this.url.ReadOnly = true; + this.url.Visible = false; + // + // marc_idx + // + this.marc_idx.HeaderText = "marc_idx"; + this.marc_idx.Name = "marc_idx"; + this.marc_idx.ReadOnly = true; + this.marc_idx.Visible = false; + this.marc_idx.Width = 30; + // + // db_marc + // + this.db_marc.HeaderText = "marc"; + this.db_marc.Name = "db_marc"; + this.db_marc.ReadOnly = true; + this.db_marc.Visible = false; + // + // grade + // + dataGridViewCellStyle30.Format = "N0"; + dataGridViewCellStyle30.NullValue = null; + this.grade.DefaultCellStyle = dataGridViewCellStyle30; + this.grade.HeaderText = "등급"; + this.grade.Name = "grade"; + this.grade.ReadOnly = true; + this.grade.Visible = false; + this.grade.Width = 50; + // + // colCheck + // + dataGridViewCellStyle31.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.colCheck.DefaultCellStyle = dataGridViewCellStyle31; + this.colCheck.HeaderText = "V"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.Width = 30; + // + // user + // + this.user.HeaderText = "작업자"; + this.user.Name = "user"; + this.user.ReadOnly = true; + this.user.Visible = false; + // + // SaveDate + // + this.SaveDate.HeaderText = "저장시각"; + this.SaveDate.Name = "SaveDate"; + this.SaveDate.ReadOnly = true; + this.SaveDate.Visible = false; + // + // rb_Sort + // + this.rb_Sort.Location = new System.Drawing.Point(68, 4); + this.rb_Sort.Name = "rb_Sort"; + this.rb_Sort.Size = new System.Drawing.Size(48, 24); + this.rb_Sort.TabIndex = 320; + this.rb_Sort.Text = "정렬"; + // + // rb_Filter + // + this.rb_Filter.Location = new System.Drawing.Point(122, 4); + this.rb_Filter.Name = "rb_Filter"; + this.rb_Filter.Size = new System.Drawing.Size(48, 24); + this.rb_Filter.TabIndex = 322; + this.rb_Filter.Text = "필터"; + // + // comboBox8 + // + this.comboBox8.Location = new System.Drawing.Point(176, 6); + this.comboBox8.Name = "comboBox8"; + this.comboBox8.Size = new System.Drawing.Size(107, 20); + this.comboBox8.TabIndex = 323; + // + // comboBox9 + // + this.comboBox9.Location = new System.Drawing.Point(286, 6); + this.comboBox9.Name = "comboBox9"; + this.comboBox9.Size = new System.Drawing.Size(52, 20); + this.comboBox9.TabIndex = 321; + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.Silver; + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.btn_mk_marcList); + this.panel1.Controls.Add(this.btn_CopySelect); + this.panel1.Controls.Add(this.btn_FilterReturn); + this.panel1.Controls.Add(this.btn_Search); + this.panel1.Controls.Add(this.rb_Sort); + this.panel1.Controls.Add(this.comboBox9); + this.panel1.Controls.Add(this.rb_Filter); + this.panel1.Controls.Add(this.comboBox8); + this.panel1.Location = new System.Drawing.Point(12, 36); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(524, 35); + this.panel1.TabIndex = 226; + // + // btn_mk_marcList + // + this.btn_mk_marcList.Location = new System.Drawing.Point(433, 5); + this.btn_mk_marcList.Name = "btn_mk_marcList"; + this.btn_mk_marcList.Size = new System.Drawing.Size(85, 23); + this.btn_mk_marcList.TabIndex = 227; + this.btn_mk_marcList.Text = "마크목록생성"; + this.btn_mk_marcList.UseVisualStyleBackColor = true; + this.btn_mk_marcList.Click += new System.EventHandler(this.btn_mk_marcList_Click); + // + // btn_CopySelect + // + this.btn_CopySelect.BackColor = System.Drawing.Color.Khaki; + this.btn_CopySelect.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btn_CopySelect.Location = new System.Drawing.Point(400, 5); + this.btn_CopySelect.Name = "btn_CopySelect"; + this.btn_CopySelect.Size = new System.Drawing.Size(30, 23); + this.btn_CopySelect.TabIndex = 319; + this.btn_CopySelect.Text = "0"; + this.btn_CopySelect.UseVisualStyleBackColor = false; + this.btn_CopySelect.Click += new System.EventHandler(this.btn_CopySelect_Click); + // + // btn_FilterReturn + // + this.btn_FilterReturn.Location = new System.Drawing.Point(3, 4); + this.btn_FilterReturn.Name = "btn_FilterReturn"; + this.btn_FilterReturn.Size = new System.Drawing.Size(63, 23); + this.btn_FilterReturn.TabIndex = 229; + this.btn_FilterReturn.Text = "원래대로"; + this.btn_FilterReturn.UseVisualStyleBackColor = true; + this.btn_FilterReturn.Click += new System.EventHandler(this.btn_FilterReturn_Click); + // + // btn_Search + // + this.btn_Search.Location = new System.Drawing.Point(339, 5); + this.btn_Search.Name = "btn_Search"; + this.btn_Search.Size = new System.Drawing.Size(57, 23); + this.btn_Search.TabIndex = 227; + this.btn_Search.Text = "검 색"; + this.btn_Search.UseVisualStyleBackColor = true; + this.btn_Search.Click += new System.EventHandler(this.btn_Search_Click); + // + // checkBox3 + // + this.checkBox3.AutoSize = true; + this.checkBox3.BackColor = System.Drawing.Color.White; + this.checkBox3.Checked = true; + this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox3.Location = new System.Drawing.Point(514, 79); + this.checkBox3.Name = "checkBox3"; + this.checkBox3.Size = new System.Drawing.Size(15, 14); + this.checkBox3.TabIndex = 227; + this.checkBox3.UseVisualStyleBackColor = false; + this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged); + // + // tbCustName + // + this.tbCustName.BackColor = System.Drawing.Color.LightGray; + this.tbCustName.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold); + this.tbCustName.Location = new System.Drawing.Point(309, 7); + this.tbCustName.Name = "tbCustName"; + this.tbCustName.Size = new System.Drawing.Size(161, 26); + this.tbCustName.TabIndex = 33; + this.tbCustName.Text = " "; + this.tbCustName.UseVisualStyleBackColor = false; + this.tbCustName.Click += new System.EventHandler(this.lbl_BookList_Click); + // + // lbCustIDX + // + this.lbCustIDX.BackColor = System.Drawing.Color.LightGray; + this.lbCustIDX.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lbCustIDX.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold); + this.lbCustIDX.Location = new System.Drawing.Point(476, 7); + this.lbCustIDX.Name = "lbCustIDX"; + this.lbCustIDX.Size = new System.Drawing.Size(60, 26); + this.lbCustIDX.TabIndex = 319; + this.lbCustIDX.Text = " "; + this.lbCustIDX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // lbl_BookList + // + this.lbl_BookList.BackColor = System.Drawing.Color.LightGray; + this.lbl_BookList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.lbl_BookList.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold); + this.lbl_BookList.Location = new System.Drawing.Point(12, 7); + this.lbl_BookList.Name = "lbl_BookList"; + this.lbl_BookList.Size = new System.Drawing.Size(293, 26); + this.lbl_BookList.TabIndex = 320; + this.lbl_BookList.Text = " "; + this.lbl_BookList.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // btCopy + // + this.btCopy.ForeColor = System.Drawing.Color.Red; + this.btCopy.Location = new System.Drawing.Point(1512, 255); + this.btCopy.Name = "btCopy"; + this.btCopy.Size = new System.Drawing.Size(77, 23); + this.btCopy.TabIndex = 321; + this.btCopy.Text = "복 사"; + this.btCopy.UseVisualStyleBackColor = true; + this.btCopy.Click += new System.EventHandler(this.button1_Click); + // + // Marc2 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.SkyBlue; + this.ClientSize = new System.Drawing.Size(1808, 908); + this.Controls.Add(this.marcEditorControl1); + this.Controls.Add(this.btCopy); + this.Controls.Add(this.lbl_BookList); + this.Controls.Add(this.lbCustIDX); + this.Controls.Add(this.checkBox3); + this.Controls.Add(this.List_Book); + this.Controls.Add(this.tbCustName); + this.Controls.Add(this.panel1); + this.KeyPreview = true; + this.Name = "Marc2"; + this.Text = "마크 작성(1)"; + this.Load += new System.EventHandler(this.Marc_Load); + this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Marc_KeyDown); + ((System.ComponentModel.ISupportInitialize)(this.List_Book)).EndInit(); + this.panel1.ResumeLayout(false); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.RadioButton rb_Sort; + private System.Windows.Forms.RadioButton rb_Filter; + private System.Windows.Forms.ComboBox comboBox8; + private System.Windows.Forms.ComboBox comboBox9; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Button btn_Search; + private System.Windows.Forms.Button btn_mk_marcList; + public System.Windows.Forms.DataGridView List_Book; + private System.Windows.Forms.CheckBox checkBox3; + + + + private System.Windows.Forms.Button btn_FilterReturn; + private System.Windows.Forms.DataGridViewTextBoxColumn list_idx; + private System.Windows.Forms.DataGridViewTextBoxColumn ISBN13; + private System.Windows.Forms.DataGridViewTextBoxColumn num; + private System.Windows.Forms.DataGridViewTextBoxColumn book_name; + private System.Windows.Forms.DataGridViewTextBoxColumn author; + private System.Windows.Forms.DataGridViewTextBoxColumn book_comp; + private System.Windows.Forms.DataGridViewTextBoxColumn count; + private System.Windows.Forms.DataGridViewTextBoxColumn pay; + private System.Windows.Forms.DataGridViewTextBoxColumn url; + private System.Windows.Forms.DataGridViewTextBoxColumn marc_idx; + private System.Windows.Forms.DataGridViewTextBoxColumn db_marc; + private System.Windows.Forms.DataGridViewTextBoxColumn grade; + private System.Windows.Forms.DataGridViewTextBoxColumn colCheck; + private System.Windows.Forms.DataGridViewTextBoxColumn user; + private System.Windows.Forms.DataGridViewTextBoxColumn SaveDate; + private System.Windows.Forms.Button btn_CopySelect; + public System.Windows.Forms.Button tbCustName; + public System.Windows.Forms.Label lbCustIDX; + public System.Windows.Forms.Label lbl_BookList; + private System.Windows.Forms.Button btCopy; + private ExcelTest.MarcEditorControl marcEditorControl1; + } +} \ No newline at end of file diff --git a/unimarc/unimarc/마크/MarcEditor.resx b/unimarc/unimarc/마크/Marc2.resx similarity index 58% rename from unimarc/unimarc/마크/MarcEditor.resx rename to unimarc/unimarc/마크/Marc2.resx index c138f35..04aa89d 100644 --- a/unimarc/unimarc/마크/MarcEditor.resx +++ b/unimarc/unimarc/마크/Marc2.resx @@ -192,110 +192,4 @@ True - - - - iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAABGdBTUEAALGPC/xhBQAAAIFQTFRF//// - AAAAlJSU4ODgU1NT6enp+Pj4w8PDxMTEkpKS/Pz81tbW5eXlRERE3NzcmZmZzMzMZGRkTU1Nb29vg4OD - urq6KioqW1tb8vLyf39/sbGxEhISPz8/i4uL0NDQZmZmIyMjoqKiNTU1tLS0GRkZp6end3d3Li4uOjo6 - Dg4OJSUlLUB5vgAABzdJREFUeF7tne12ojAQhosuIqBiRa212q7dult7/xe4R6wKwwRCMhMoZ56fPSnj - K8l8BeLDgyAIgiAIgiAIgiAIgiAIgiAIgiAIgiAIQt/Y+JNZsD0ekkFyOG6D2cTfwCGNGcI/tMQoDvaP - iy8Psl687YN4BIfrs9/Dv7TAKAinL1BagZddGETw37QIvQH8k2OiWbKDehTskhn871oGXssK4/0/qKOS - z30zkQOvVYWbwydUoMHuqO98zgLbUxg/ws+uTap5IzOBbSkMFvBjN2IxhhdEuAhsR+FK17moqdf4LbAN - hWOT5Vdm8QovXOAq0L3Cya/iB7XgzYcXv3MT6FrhaF/4jLYkqjTgLtCxwnmz8FfPZwxNZOQEulX4N2eY - CiztzAt0qTA+5Q2TsS4VDwWBDhUmBbuUbIuGigKdKYzMU5h6/uYtAYGuFE5+A7u0fN5zVSjQkcI5NEvN - 6ZqqlgS6UbiFVpVM02WyDebxLJ4Hx8Ey1U/vLllcWaAThQdoFOU9XPmlbkU0mvzZv8OhKCtcoAuFmFnA - elmZSEerVGMdH3FL/ApDaBLytccTkyLztLqV43ke7q7ZFaLfa46noDQ1FWy2etMVwK2wZg2mpYSkkvEU - XqAeZoV/oL0CaUX5o2DeWCOvwldoLs+TZrsFsGpYn7Aq9KG1HKdK71lFVOu7CnAqjMpN+hvPqtpVh6F+ - IsCrMIXGbnzM4diG1HnoHIwK1W70Ub+pq2JeGx2v8CmcQVM3QjjUhI2uU+VTqMyzjF0MQLMnwqbwGVr6 - 5kUnRdNDz6dyKVRFwo8JHGmBeqXnYFIYKVLID3sfk6c6ZbrApFDhzYkFanW3eBQqkpkXyimq/h6L8Ch8 - g2Yu0DmZDC2BPAoVbiaA4+zQE8ijEN/+JDalKZDabAbeO3yEw+zQFciiEL2FxG5UWyCHQvwW2lYTRfQF - cih8gjbOPMNRVjQQyKBwCE2cOdkUvCWaCGRQiKb8VPVERiOB9ApH0MKZJzjKhmYC6RWiuzBmXTWchgLp - FWKhIoWDLGgqkFwh6meaN36V6FW9eagVYvUM4S1sfAfpFWL9oWZ7E1UYCKRWiBWGdI7URCC1wiO8PmXR - ZCSQWiGSsa119wfrMBNIrRBeXvFYlgmGAokVYsU9UevCVCCxQmQZ/oNjzDAWSKwQWYZLOMYIc4HECpG9 - CpKqonkmc4dU4QRe3fM8OMYEG4G0ChFHs4NjDLCYotQKEUdDsFdoJ5BWIVLen582s8NqilIrRFypdeFk - K5BiFt1BCgvblC2aDS2h7NNuPqA+bwrH/GyQ0omw+O0CSDikyWg6A9KjSeCYnw2yYQFehfjprKA+wvq+ - GyAKaXecWgdpdxOVv10BSUsp2/kdoP/3sP/rEFHYM1/a/3jY/5ym/3lp/2uL/teHHDV+x+Do03QLll5b - p0ASU9JOV/sw9bw7BBIQSfYtOgTX3lN3QJxpz7IaxNWs4ZifDeJq+lYEQ3lOp2m4+FUCjrEGeemf7Hma - OjbICT+Fc11IQBaiszofe82LPqVCCijC59qqQfJ+jsQfe4CW7tnEKmJolv4tlgzm50srQGIxS5sI6dW4 - KaHcGcamqYubiHhx7w0OIgFpfLto7mO5BlNOzP++BQp23uQJDiICKfT5YyLSbudr1mJFIvF7TyXQieNR - PmdSAHPbxO+uQdB5Q5+xXUG2L5h3ocbQWAZjooEFDOp3SPNgKTdXqLiA30SODOoCuix4IxR6E9kai/jB - vZy3UBF+uUIGGig8j/j4BoibMxUyFN8md2cBKxPPUZH+i0UTbp7CsIjiyWVyh+orjoviKJuKRIpz14kl - KuaKt4ADGVAsD9oDXIblLdkLjMH+joNzopTHZ3Ol3ABkD+MCVdAI4IWvuNrvUp/XRvN+gPohfpbeBYb6 - JC6CM/c2eKp2hr5HqkR9buKLbaUxV/kY7joNsIbW71idfRmp3Jjz51tU4erMydzhBCofeg647MlMEVVU - zDA8g3amXoHcNRMGtltyx+AcYR9tWNzg6R9WonaoGQ3Pgh6qnVeGQzd6R5GD39A/zzsKKudndip7K6gj - 8zdfS51ELl7WngF9gP/jirq7WH+u/sN4WRF4rrR0B8/UrMVvPrHfRngY+atQ7+Rn/pKwAnS3BmWaLgfH - 7PctXoNtskyxfV0c8/BKQmVcJEFnKbPiVxxeTsC7fSpvTaRov5HgYgdWA2yHn4YWnWiRWF3x2PDbeSpa - QXVOaYbTcrAe8t/Oe7ctpckh/v3D0KaO5mJSlz7r80TZe6VkrJeF1THt3ATNQfBbstNWSsEGBPoJJ8a0 - 5SxUC5vfdG49CdXEP5hM1l3SvLnTIrHm7+JdWWu1A7pFNEt0l+R7Muti+NNhFIRTxV7uNx+7ULth1VVG - cbB/XJS7MV+Lt/0q/unq7mz8yWy8PR6SQXI4bIN44negtBUEQRAEQRAEQRAEQRAEQRAEQRAEQRAEQSDm - P87mU+ZvyRQDAAAAAElFTkSuQmCC - - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - - - True - \ No newline at end of file diff --git a/unimarc/unimarc/마크/MarcCopySelect.cs b/unimarc/unimarc/마크/MarcCopySelect.cs index 731618f..c131e06 100644 --- a/unimarc/unimarc/마크/MarcCopySelect.cs +++ b/unimarc/unimarc/마크/MarcCopySelect.cs @@ -17,27 +17,27 @@ namespace UniMarc.마크 { Helper_DB db = new Helper_DB(); Marc m; + Marc2 m2; AddMarc am; CD_LP cp; - MarcEditor mae; public int MarcFormRowIndex; public MarcCopySelect() { InitializeComponent(); } - public MarcCopySelect(MarcEditor _mae) - { - InitializeComponent(); - mae = _mae; - db.DBcon(); - } public MarcCopySelect(CD_LP cD) { InitializeComponent(); cp = cD; db.DBcon(); } + public MarcCopySelect(Marc2 _m) + { + InitializeComponent(); + m2 = _m; + db.DBcon(); + } public MarcCopySelect(Marc _m) { diff --git a/unimarc/unimarc/마크/MarcEditor.designer.cs b/unimarc/unimarc/마크/MarcEditorControl.Designer.cs similarity index 85% rename from unimarc/unimarc/마크/MarcEditor.designer.cs rename to unimarc/unimarc/마크/MarcEditorControl.Designer.cs index f5af014..485a029 100644 --- a/unimarc/unimarc/마크/MarcEditor.designer.cs +++ b/unimarc/unimarc/마크/MarcEditorControl.Designer.cs @@ -1,13 +1,13 @@ namespace ExcelTest { - partial class MarcEditor + partial class MarcEditorControl { - /// + /// /// Required designer variable. /// private System.ComponentModel.IContainer components = null; - /// + /// /// Clean up any resources being used. /// /// true if managed resources should be disposed; otherwise, false. @@ -20,10 +20,10 @@ base.Dispose(disposing); } - #region Windows Form Designer generated code + #region Component Designer generated code - /// - /// Required method for Designer support - do not modify + /// + /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() @@ -42,7 +42,6 @@ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc)); 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(); @@ -51,6 +50,7 @@ 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc)); this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.etc1 = new System.Windows.Forms.RichTextBox(); this.etc2 = new System.Windows.Forms.RichTextBox(); @@ -77,43 +77,15 @@ this.checkBox2 = new System.Windows.Forms.CheckBox(); this.comboBox7 = new System.Windows.Forms.ComboBox(); this.Btn_Memo = new System.Windows.Forms.Button(); - this.List_Book = new System.Windows.Forms.DataGridView(); - this.list_idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ISBN13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.num = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.pay = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.url = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.marc_idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.db_marc = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.grade = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colCheck = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.user = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.SaveDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.btn_Save = new System.Windows.Forms.Button(); this.label4 = new System.Windows.Forms.Label(); this.text008 = new System.Windows.Forms.TextBox(); this.panel3 = new System.Windows.Forms.Panel(); - this.btn_Reflesh008 = new System.Windows.Forms.Button(); this.btn_close = new System.Windows.Forms.Button(); this.input_date = new System.Windows.Forms.DateTimePicker(); - this.pictureBox1 = new System.Windows.Forms.PictureBox(); this.btn_preview = new System.Windows.Forms.Button(); this.cb_grade = new System.Windows.Forms.ComboBox(); this.label6 = new System.Windows.Forms.Label(); - this.rb_Sort = new System.Windows.Forms.RadioButton(); - this.rb_Filter = new System.Windows.Forms.RadioButton(); - this.comboBox8 = new System.Windows.Forms.ComboBox(); - this.comboBox9 = new System.Windows.Forms.ComboBox(); - this.panel1 = new System.Windows.Forms.Panel(); - this.btn_mk_marcList = new System.Windows.Forms.Button(); - this.btn_CopySelect = new System.Windows.Forms.Button(); - this.btn_FilterReturn = new System.Windows.Forms.Button(); - this.btn_Search = new System.Windows.Forms.Button(); - this.checkBox3 = new System.Windows.Forms.CheckBox(); this.btn_FillBlank = new System.Windows.Forms.Button(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); @@ -248,10 +220,9 @@ this.text507a = new System.Windows.Forms.TextBox(); this.lbl_SaveData = new System.Windows.Forms.Label(); this.lbl_ISBN = new System.Windows.Forms.Label(); - this.tbCustName = new System.Windows.Forms.Button(); this.checkBox4 = new System.Windows.Forms.CheckBox(); - this.lbCustIDX = new System.Windows.Forms.Label(); - this.lbl_BookList = new System.Windows.Forms.Label(); + this.pictureBox1 = new System.Windows.Forms.PictureBox(); + this.btn_Reflesh008 = new System.Windows.Forms.Button(); label31 = new System.Windows.Forms.Label(); label30 = new System.Windows.Forms.Label(); label33 = new System.Windows.Forms.Label(); @@ -262,10 +233,7 @@ label25 = new System.Windows.Forms.Label(); label26 = new System.Windows.Forms.Label(); label27 = new System.Windows.Forms.Label(); - ((System.ComponentModel.ISupportInitialize)(this.List_Book)).BeginInit(); this.panel3.SuspendLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); - this.panel1.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.tabPage2.SuspendLayout(); @@ -285,6 +253,7 @@ this.groupBox3.SuspendLayout(); this.groupBox2.SuspendLayout(); this.grp245.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); this.SuspendLayout(); // // label31 @@ -655,182 +624,6 @@ this.Btn_Memo.UseVisualStyleBackColor = true; this.Btn_Memo.Click += new System.EventHandler(this.Btn_Memo_Click); // - // List_Book - // - this.List_Book.AllowDrop = true; - this.List_Book.AllowUserToAddRows = false; - this.List_Book.AllowUserToDeleteRows = false; - this.List_Book.AllowUserToResizeColumns = false; - this.List_Book.BackgroundColor = System.Drawing.Color.Gray; - this.List_Book.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.List_Book.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; - this.List_Book.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { - this.list_idx, - this.ISBN13, - this.num, - this.book_name, - this.author, - this.book_comp, - this.count, - this.pay, - this.url, - this.marc_idx, - this.db_marc, - this.grade, - this.colCheck, - this.user, - this.SaveDate}); - this.List_Book.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; - this.List_Book.Location = new System.Drawing.Point(12, 74); - this.List_Book.MultiSelect = false; - this.List_Book.Name = "List_Book"; - this.List_Book.ReadOnly = true; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.ControlDark; - dataGridViewCellStyle4.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.List_Book.RowHeadersDefaultCellStyle = dataGridViewCellStyle4; - this.List_Book.RowTemplate.Height = 23; - this.List_Book.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.List_Book.Size = new System.Drawing.Size(543, 822); - this.List_Book.TabIndex = 217; - this.List_Book.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.List_Book_RowPostPaint); - this.List_Book.SelectionChanged += new System.EventHandler(this.List_Book_SelectionChanged); - this.List_Book.DragDrop += new System.Windows.Forms.DragEventHandler(this.List_Book_DragDrop); - this.List_Book.DragOver += new System.Windows.Forms.DragEventHandler(this.List_Book_DragOver); - this.List_Book.KeyDown += new System.Windows.Forms.KeyEventHandler(this.List_Book_KeyDown); - this.List_Book.MouseDown += new System.Windows.Forms.MouseEventHandler(this.List_Book_MouseDown); - this.List_Book.MouseMove += new System.Windows.Forms.MouseEventHandler(this.List_Book_MouseMove); - // - // list_idx - // - this.list_idx.HeaderText = "list_idx"; - this.list_idx.Name = "list_idx"; - this.list_idx.ReadOnly = true; - this.list_idx.Visible = false; - this.list_idx.Width = 30; - // - // ISBN13 - // - this.ISBN13.FillWeight = 136.2398F; - this.ISBN13.HeaderText = "ISBN13"; - this.ISBN13.Name = "ISBN13"; - this.ISBN13.ReadOnly = true; - this.ISBN13.Visible = false; - // - // num - // - this.num.HeaderText = "연번"; - this.num.Name = "num"; - this.num.ReadOnly = true; - this.num.Width = 50; - // - // book_name - // - this.book_name.FillWeight = 135.5107F; - this.book_name.HeaderText = "도서명"; - this.book_name.Name = "book_name"; - this.book_name.ReadOnly = true; - this.book_name.Width = 150; - // - // author - // - this.author.FillWeight = 67.49011F; - this.author.HeaderText = "저자"; - this.author.Name = "author"; - this.author.ReadOnly = true; - this.author.Width = 80; - // - // book_comp - // - this.book_comp.FillWeight = 76.49199F; - this.book_comp.HeaderText = "출판사"; - this.book_comp.Name = "book_comp"; - this.book_comp.ReadOnly = true; - this.book_comp.Width = 80; - // - // count - // - this.count.HeaderText = "C"; - this.count.Name = "count"; - this.count.ReadOnly = true; - this.count.Width = 30; - // - // pay - // - this.pay.FillWeight = 84.26746F; - this.pay.HeaderText = "정가"; - this.pay.Name = "pay"; - this.pay.ReadOnly = true; - this.pay.Width = 62; - // - // url - // - this.url.HeaderText = "url"; - this.url.Name = "url"; - this.url.ReadOnly = true; - this.url.Visible = false; - // - // marc_idx - // - this.marc_idx.HeaderText = "marc_idx"; - this.marc_idx.Name = "marc_idx"; - this.marc_idx.ReadOnly = true; - this.marc_idx.Visible = false; - this.marc_idx.Width = 30; - // - // db_marc - // - this.db_marc.HeaderText = "marc"; - this.db_marc.Name = "db_marc"; - this.db_marc.ReadOnly = true; - this.db_marc.Visible = false; - // - // grade - // - dataGridViewCellStyle2.Format = "N0"; - dataGridViewCellStyle2.NullValue = null; - this.grade.DefaultCellStyle = dataGridViewCellStyle2; - this.grade.HeaderText = "등급"; - this.grade.Name = "grade"; - this.grade.ReadOnly = true; - this.grade.Visible = false; - this.grade.Width = 50; - // - // colCheck - // - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.colCheck.DefaultCellStyle = dataGridViewCellStyle3; - this.colCheck.HeaderText = "V"; - this.colCheck.Name = "colCheck"; - this.colCheck.ReadOnly = true; - this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colCheck.Width = 30; - // - // user - // - this.user.HeaderText = "작업자"; - this.user.Name = "user"; - this.user.ReadOnly = true; - this.user.Visible = false; - // - // SaveDate - // - this.SaveDate.HeaderText = "저장시각"; - this.SaveDate.Name = "SaveDate"; - this.SaveDate.ReadOnly = true; - this.SaveDate.Visible = false; - // // btn_Save // this.btn_Save.Location = new System.Drawing.Point(1512, 197); @@ -872,22 +665,9 @@ this.panel3.Size = new System.Drawing.Size(364, 30); this.panel3.TabIndex = 219; // - // btn_Reflesh008 - // - this.btn_Reflesh008.BackColor = System.Drawing.SystemColors.WindowText; - this.btn_Reflesh008.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btn_Reflesh008.BackgroundImage"))); - this.btn_Reflesh008.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; - this.btn_Reflesh008.Dock = System.Windows.Forms.DockStyle.Right; - this.btn_Reflesh008.Location = new System.Drawing.Point(334, 0); - this.btn_Reflesh008.Name = "btn_Reflesh008"; - this.btn_Reflesh008.Size = new System.Drawing.Size(28, 28); - this.btn_Reflesh008.TabIndex = 207; - this.btn_Reflesh008.UseVisualStyleBackColor = false; - this.btn_Reflesh008.Click += new System.EventHandler(this.btn_Reflesh008_Click); - // // btn_close // - this.btn_close.Location = new System.Drawing.Point(1512, 255); + this.btn_close.Location = new System.Drawing.Point(1512, 289); this.btn_close.Name = "btn_close"; this.btn_close.Size = new System.Drawing.Size(77, 23); this.btn_close.TabIndex = 215; @@ -909,18 +689,6 @@ this.input_date.TabIndex = 220; this.input_date.ValueChanged += new System.EventHandler(this.input_date_ValueChanged); // - // pictureBox1 - // - this.pictureBox1.BackColor = System.Drawing.SystemColors.ControlLight; - this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; - this.pictureBox1.Location = new System.Drawing.Point(1591, 53); - this.pictureBox1.Name = "pictureBox1"; - this.pictureBox1.Size = new System.Drawing.Size(208, 289); - this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; - this.pictureBox1.TabIndex = 221; - this.pictureBox1.TabStop = false; - this.pictureBox1.DoubleClick += new System.EventHandler(this.pictureBox1_DoubleClick); - // // btn_preview // this.btn_preview.Location = new System.Drawing.Point(1512, 226); @@ -955,121 +723,6 @@ this.label6.TabIndex = 223; this.label6.Text = "마크 등급"; // - // rb_Sort - // - this.rb_Sort.AutoSize = true; - this.rb_Sort.Location = new System.Drawing.Point(76, 8); - this.rb_Sort.Name = "rb_Sort"; - this.rb_Sort.Size = new System.Drawing.Size(47, 16); - this.rb_Sort.TabIndex = 224; - this.rb_Sort.TabStop = true; - this.rb_Sort.Text = "정렬"; - this.rb_Sort.UseVisualStyleBackColor = true; - this.rb_Sort.CheckedChanged += new System.EventHandler(this.Radio_Sort_CheckedChanged); - // - // rb_Filter - // - this.rb_Filter.AutoSize = true; - this.rb_Filter.Location = new System.Drawing.Point(123, 8); - this.rb_Filter.Name = "rb_Filter"; - this.rb_Filter.Size = new System.Drawing.Size(47, 16); - this.rb_Filter.TabIndex = 224; - this.rb_Filter.TabStop = true; - this.rb_Filter.Text = "필터"; - this.rb_Filter.UseVisualStyleBackColor = true; - this.rb_Filter.CheckedChanged += new System.EventHandler(this.Radio_Sort_CheckedChanged); - // - // comboBox8 - // - this.comboBox8.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox8.FormattingEnabled = true; - this.comboBox8.Location = new System.Drawing.Point(175, 6); - this.comboBox8.Name = "comboBox8"; - this.comboBox8.Size = new System.Drawing.Size(79, 20); - this.comboBox8.TabIndex = 225; - this.comboBox8.SelectedIndexChanged += new System.EventHandler(this.comboBox8_SelectedIndexChanged); - // - // comboBox9 - // - this.comboBox9.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.comboBox9.FormattingEnabled = true; - this.comboBox9.Location = new System.Drawing.Point(256, 6); - this.comboBox9.Name = "comboBox9"; - this.comboBox9.Size = new System.Drawing.Size(52, 20); - this.comboBox9.TabIndex = 225; - // - // panel1 - // - this.panel1.BackColor = System.Drawing.Color.Silver; - this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.Controls.Add(this.btn_mk_marcList); - this.panel1.Controls.Add(this.btn_CopySelect); - this.panel1.Controls.Add(this.btn_FilterReturn); - this.panel1.Controls.Add(this.btn_Search); - this.panel1.Controls.Add(this.rb_Sort); - this.panel1.Controls.Add(this.comboBox9); - this.panel1.Controls.Add(this.rb_Filter); - this.panel1.Controls.Add(this.comboBox8); - this.panel1.Location = new System.Drawing.Point(12, 36); - this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(524, 35); - this.panel1.TabIndex = 226; - // - // btn_mk_marcList - // - this.btn_mk_marcList.Location = new System.Drawing.Point(433, 5); - this.btn_mk_marcList.Name = "btn_mk_marcList"; - this.btn_mk_marcList.Size = new System.Drawing.Size(85, 23); - this.btn_mk_marcList.TabIndex = 227; - this.btn_mk_marcList.Text = "마크목록생성"; - this.btn_mk_marcList.UseVisualStyleBackColor = true; - this.btn_mk_marcList.Click += new System.EventHandler(this.btn_mk_marcList_Click); - // - // btn_CopySelect - // - this.btn_CopySelect.BackColor = System.Drawing.Color.Khaki; - this.btn_CopySelect.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - this.btn_CopySelect.Location = new System.Drawing.Point(387, 5); - this.btn_CopySelect.Name = "btn_CopySelect"; - this.btn_CopySelect.Size = new System.Drawing.Size(30, 23); - this.btn_CopySelect.TabIndex = 319; - this.btn_CopySelect.Text = "0"; - this.btn_CopySelect.UseVisualStyleBackColor = false; - this.btn_CopySelect.Click += new System.EventHandler(this.btn_CopySelect_Click); - // - // btn_FilterReturn - // - this.btn_FilterReturn.Location = new System.Drawing.Point(8, 5); - this.btn_FilterReturn.Name = "btn_FilterReturn"; - this.btn_FilterReturn.Size = new System.Drawing.Size(63, 23); - this.btn_FilterReturn.TabIndex = 229; - this.btn_FilterReturn.Text = "원래대로"; - this.btn_FilterReturn.UseVisualStyleBackColor = true; - this.btn_FilterReturn.Click += new System.EventHandler(this.btn_FilterReturn_Click); - // - // btn_Search - // - this.btn_Search.Location = new System.Drawing.Point(314, 5); - this.btn_Search.Name = "btn_Search"; - this.btn_Search.Size = new System.Drawing.Size(57, 23); - this.btn_Search.TabIndex = 227; - this.btn_Search.Text = "검 색"; - this.btn_Search.UseVisualStyleBackColor = true; - this.btn_Search.Click += new System.EventHandler(this.btn_Search_Click); - // - // checkBox3 - // - this.checkBox3.AutoSize = true; - this.checkBox3.BackColor = System.Drawing.Color.White; - this.checkBox3.Checked = true; - this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox3.Location = new System.Drawing.Point(514, 79); - this.checkBox3.Name = "checkBox3"; - this.checkBox3.Size = new System.Drawing.Size(15, 14); - this.checkBox3.TabIndex = 227; - this.checkBox3.UseVisualStyleBackColor = false; - this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged); - // // btn_FillBlank // this.btn_FillBlank.Location = new System.Drawing.Point(1512, 119); @@ -2529,18 +2182,6 @@ this.lbl_ISBN.TabIndex = 33; this.lbl_ISBN.Text = "[]"; // - // tbCustName - // - this.tbCustName.BackColor = System.Drawing.Color.LightGray; - this.tbCustName.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold); - this.tbCustName.Location = new System.Drawing.Point(309, 7); - this.tbCustName.Name = "tbCustName"; - this.tbCustName.Size = new System.Drawing.Size(161, 26); - this.tbCustName.TabIndex = 33; - this.tbCustName.Text = " "; - this.tbCustName.UseVisualStyleBackColor = false; - this.tbCustName.Click += new System.EventHandler(this.lbl_BookList_Click); - // // checkBox4 // this.checkBox4.AutoSize = true; @@ -2552,91 +2193,36 @@ this.checkBox4.UseVisualStyleBackColor = true; this.checkBox4.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // - // lbCustIDX + // pictureBox1 // - this.lbCustIDX.BackColor = System.Drawing.Color.LightGray; - this.lbCustIDX.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.lbCustIDX.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold); - this.lbCustIDX.Location = new System.Drawing.Point(476, 7); - this.lbCustIDX.Name = "lbCustIDX"; - this.lbCustIDX.Size = new System.Drawing.Size(60, 26); - this.lbCustIDX.TabIndex = 319; - this.lbCustIDX.Text = " "; - this.lbCustIDX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.pictureBox1.BackColor = System.Drawing.SystemColors.ControlLight; + this.pictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; + this.pictureBox1.Location = new System.Drawing.Point(1591, 53); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(208, 289); + this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage; + this.pictureBox1.TabIndex = 221; + this.pictureBox1.TabStop = false; + this.pictureBox1.DoubleClick += new System.EventHandler(this.pictureBox1_DoubleClick); // - // lbl_BookList + // btn_Reflesh008 // - this.lbl_BookList.BackColor = System.Drawing.Color.LightGray; - this.lbl_BookList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.lbl_BookList.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold); - this.lbl_BookList.Location = new System.Drawing.Point(12, 7); - this.lbl_BookList.Name = "lbl_BookList"; - this.lbl_BookList.Size = new System.Drawing.Size(293, 26); - this.lbl_BookList.TabIndex = 320; - this.lbl_BookList.Text = " "; - this.lbl_BookList.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + this.btn_Reflesh008.BackColor = System.Drawing.SystemColors.WindowText; + this.btn_Reflesh008.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("btn_Reflesh008.BackgroundImage"))); + this.btn_Reflesh008.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; + this.btn_Reflesh008.Dock = System.Windows.Forms.DockStyle.Right; + this.btn_Reflesh008.Location = new System.Drawing.Point(334, 0); + this.btn_Reflesh008.Name = "btn_Reflesh008"; + this.btn_Reflesh008.Size = new System.Drawing.Size(28, 28); + this.btn_Reflesh008.TabIndex = 207; + this.btn_Reflesh008.UseVisualStyleBackColor = false; + this.btn_Reflesh008.Click += new System.EventHandler(this.btn_Reflesh008_Click); // // Marc // - this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.Gray; - this.ClientSize = new System.Drawing.Size(1808, 908); - this.Controls.Add(this.lbl_BookList); - this.Controls.Add(this.lbCustIDX); - this.Controls.Add(this.checkBox3); - this.Controls.Add(this.List_Book); - this.Controls.Add(this.tbCustName); - this.Controls.Add(this.lbl_ISBN); - this.Controls.Add(this.lbl_SaveData); - this.Controls.Add(this.checkBox1); - this.Controls.Add(this.tabControl1); - this.Controls.Add(this.btn_FillBlank); - this.Controls.Add(this.panel1); - this.Controls.Add(this.label6); - this.Controls.Add(this.cb_grade); - this.Controls.Add(this.pictureBox1); - this.Controls.Add(this.input_date); - this.Controls.Add(this.panel3); - this.Controls.Add(this.btn_close); - this.Controls.Add(this.btn_Save); - this.Controls.Add(this.btn_preview); - this.Controls.Add(this.Btn_Memo); - this.Controls.Add(this.checkBox4); - this.Controls.Add(this.checkBox2); - this.Controls.Add(this.comboBox6); - this.Controls.Add(this.comboBox5); - this.Controls.Add(this.comboBox4); - this.Controls.Add(this.comboBox2); - this.Controls.Add(this.label102); - this.Controls.Add(this.comboBox7); - this.Controls.Add(this.comboBox3); - this.Controls.Add(this.label101); - this.Controls.Add(this.comboBox1); - this.Controls.Add(this.label100); - this.Controls.Add(this.label3); - this.Controls.Add(this.col008res); - this.Controls.Add(this.label99); - this.Controls.Add(this.gov008res); - this.Controls.Add(this.label103); - this.Controls.Add(this.label2); - this.Controls.Add(this.text008col); - this.Controls.Add(this.text008gov); - this.Controls.Add(this.etc2); - this.Controls.Add(this.etc1); - this.Controls.Add(this.label98); - this.Controls.Add(this.label1); - this.KeyPreview = true; - this.Name = "Marc"; - this.Text = "마크 작성(1)"; + this.Name = "MarcEditorControl"; + this.Size = new System.Drawing.Size(950, 850); this.Load += new System.EventHandler(this.Marc_Load); - this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Marc_KeyDown); - ((System.ComponentModel.ISupportInitialize)(this.List_Book)).EndInit(); - this.panel3.ResumeLayout(false); - this.panel3.PerformLayout(); - ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); - this.panel1.ResumeLayout(false); - this.panel1.PerformLayout(); this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage2.ResumeLayout(false); @@ -2666,9 +2252,9 @@ this.groupBox2.PerformLayout(); this.grp245.ResumeLayout(false); this.grp245.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); - } #endregion @@ -2713,15 +2299,6 @@ private System.Windows.Forms.Button btn_preview; private System.Windows.Forms.ComboBox cb_grade; private System.Windows.Forms.Label label6; - private System.Windows.Forms.RadioButton rb_Sort; - private System.Windows.Forms.RadioButton rb_Filter; - private System.Windows.Forms.ComboBox comboBox8; - private System.Windows.Forms.ComboBox comboBox9; - private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button btn_Search; - private System.Windows.Forms.Button btn_mk_marcList; - public System.Windows.Forms.DataGridView List_Book; - private System.Windows.Forms.CheckBox checkBox3; private System.Windows.Forms.Button btn_Reflesh008; private System.Windows.Forms.Button btn_FillBlank; private System.Windows.Forms.TabControl tabControl1; @@ -2853,30 +2430,10 @@ private System.Windows.Forms.Label lbl_SaveData; private System.Windows.Forms.Button Btn_interlock; private System.Windows.Forms.Label lbl_ISBN; - private System.Windows.Forms.Button btn_FilterReturn; - private System.Windows.Forms.DataGridViewTextBoxColumn list_idx; - private System.Windows.Forms.DataGridViewTextBoxColumn ISBN13; - private System.Windows.Forms.DataGridViewTextBoxColumn num; - private System.Windows.Forms.DataGridViewTextBoxColumn book_name; - private System.Windows.Forms.DataGridViewTextBoxColumn author; - private System.Windows.Forms.DataGridViewTextBoxColumn book_comp; - private System.Windows.Forms.DataGridViewTextBoxColumn count; - private System.Windows.Forms.DataGridViewTextBoxColumn pay; - private System.Windows.Forms.DataGridViewTextBoxColumn url; - private System.Windows.Forms.DataGridViewTextBoxColumn marc_idx; - private System.Windows.Forms.DataGridViewTextBoxColumn db_marc; - private System.Windows.Forms.DataGridViewTextBoxColumn grade; - private System.Windows.Forms.DataGridViewTextBoxColumn colCheck; - private System.Windows.Forms.DataGridViewTextBoxColumn user; - private System.Windows.Forms.DataGridViewTextBoxColumn SaveDate; - private System.Windows.Forms.Button btn_CopySelect; - public System.Windows.Forms.Button tbCustName; private System.Windows.Forms.DataGridViewTextBoxColumn text505n; private System.Windows.Forms.DataGridViewTextBoxColumn text505t; private System.Windows.Forms.DataGridViewTextBoxColumn text505d; private System.Windows.Forms.DataGridViewTextBoxColumn text505e; private System.Windows.Forms.CheckBox checkBox4; - public System.Windows.Forms.Label lbCustIDX; - public System.Windows.Forms.Label lbl_BookList; } } \ No newline at end of file diff --git a/unimarc/unimarc/마크/MarcEditor.cs b/unimarc/unimarc/마크/MarcEditorControl.cs similarity index 80% rename from unimarc/unimarc/마크/MarcEditor.cs rename to unimarc/unimarc/마크/MarcEditorControl.cs index f62072f..3550415 100644 --- a/unimarc/unimarc/마크/MarcEditor.cs +++ b/unimarc/unimarc/마크/MarcEditorControl.cs @@ -1,33 +1,25 @@ //using Microsoft.Office.Interop.Excel; using AR; -using OpenQA.Selenium.DevTools.V136.Animation; using System; using System.Collections.Generic; using System.Drawing; -using System.Drawing.Drawing2D; -using System.IO; using System.Linq; -using System.Net; -using System.Text; using System.Text.RegularExpressions; -using System.Web.UI; using System.Windows.Forms; using UniMarc; using UniMarc.ListOfValue; using UniMarc.마크; using WindowsFormsApp1; -using WindowsFormsApp1.Mac; -using static System.Net.WebRequestMethods; namespace ExcelTest { - public partial class MarcEditor : Form + public partial class MarcEditorControl : System.Windows.Forms.UserControl { /// /// isbn / 도서명 / 저자 / 출판사 / 가격 /// string[] data_book = { "", "", "", "", "" }; - int SaveRowIdx = -1; + int SaveRowIdx = -1; // Keep for now but might be unused if we rely on properties public string mUserName; string mCompidx = UniMarc.Properties.Settings.Default.compidx; string mListIdx = ""; @@ -38,24 +30,36 @@ namespace ExcelTest private bool mLoadCompleted = false; string tbName = ""; public int checkCout = 0; - public bool gridViewChk = false; // True / False - Helper_DB db = new Helper_DB(); + // public bool gridViewChk = false; // Removed + public Helper_DB db;// = new Helper_DB(); Help008Tag tag008 = new Help008Tag(); Skill_Search_Text search_Text = new Skill_Search_Text(); String_Text st = new String_Text(); - Mac_List ml; + // Mac_List ml; // Removed - public MarcEditor() + // Properties to replace List_Book row access + public string CurrentISBN13 { get; set; } + public string CurrentBookName { get; set; } + public string CurrentAuthor { get; set; } + public string CurrentPublisher { get; set; } + public string CurrentPrice { get; set; } // pay + public string CurrentURL { get; set; } // image_url? + public string CurrentMarcIdx { get; set; } + public string CurrentDBMarc { get; set; } // db_marc + public string CurrentGrade { get; set; } + public string CurrentUser { get; set; } + public string CurrentSaveDate { get; set; } + public string CurrentListIdx { get; set; } + + public MarcEditorControl() { InitializeComponent(); - this.ml = null; mUserName = string.Empty; } - public MarcEditor(Mac_List _ml) + + public void SetUser(string userName) { - InitializeComponent(); - ml = _ml; - mUserName = ml.user_name; + mUserName = userName; } string l_idx = string.Empty; @@ -83,8 +87,8 @@ namespace ExcelTest comboBox6.Items.AddRange(tag008.combo6); // 콤보박스 정렬및 필터 - string[] combo8 = { "등급", "복본" }; - comboBox8.Items.AddRange(combo8); + // string[] combo8 = { "등급", "복본" }; + // comboBox8.Items.AddRange(combo8); comboBox1.SelectedIndex = 0; comboBox2.SelectedIndex = 0; @@ -93,7 +97,6 @@ namespace ExcelTest comboBox5.SelectedIndex = 0; comboBox6.SelectedIndex = 0; comboBox7.SelectedIndex = 0; - comboBox8.SelectedIndex = 0; #endregion } @@ -184,6 +187,7 @@ namespace ExcelTest // SaveDateCheck(SaveDate, a); // } + //} private string RealMarc(string[] MarcData) @@ -201,141 +205,58 @@ namespace ExcelTest return result; } - /// - /// 가져온 목록을 책목록과 연동하여 Grid에 집어넣음. - /// - /// 목록일자 - /// 목록명 - public void input_list(string l_idx, string value, string C_idx, string custidx, string custname) + public void LoadBookData(string isbn13, string bookName, string author, string publisher, string price, string url, string marcIdx, string dbMarc, string grade, string user, string saveDate, string listIdx) { - db.DBcon(); - this.l_idx = l_idx; - this.c_idx = C_idx; - string Area = "`idx`, `isbn_marc`, `header`, `num`, `book_name`, `author`, `book_comp`, `count`, `pay`, `image_url`, `m_idx`"; - string[] sear_tbl = { "l_idx", "compidx" }; - string[] sear_col = { l_idx, C_idx }; + CurrentISBN13 = isbn13; + CurrentBookName = bookName; + CurrentAuthor = author; + CurrentPublisher = publisher; + CurrentPrice = price; + CurrentURL = url; + CurrentMarcIdx = marcIdx; + CurrentDBMarc = dbMarc; + CurrentGrade = grade; + CurrentUser = user; + CurrentSaveDate = saveDate; + CurrentListIdx = listIdx; - lbl_BookList.Text = value; - tbCustName.Text = custname; - lbCustIDX.Text = custidx; + lbl_ISBN.Text = $"[{CurrentISBN13}]"; + + // Update data_book for Create_008 or Empty logic + data_book[0] = CurrentISBN13; + data_book[1] = CurrentBookName; + data_book[2] = CurrentAuthor; + data_book[3] = CurrentPublisher; + data_book[4] = CurrentPrice; - string cmd = - string.Format("SELECT {0} " + - "FROM {1} " + - "WHERE `{2}` = \"{4}\" AND `{3}` = \"{5}\"" + - "ORDER BY `idx` ASC;", Area, "Obj_List_Book", sear_tbl[0], sear_tbl[1], sear_col[0], sear_col[1]); - string db_res = db.DB_Send_CMD_Search(cmd); - string[] db_data = db_res.Split('|'); - string[] grid = { - "", "", "", "", "", - "", "", "", "", "", - "", "", "V", "", "" }; + LoadMarc(CurrentDBMarc); + input_picture(); + + // Set 008 text if present + // LoadMarc does this via text008.Text assignment + + Create_008(); + + // Check Ownership + if (string.IsNullOrEmpty(CurrentMarcIdx) || CurrentMarcIdx == "0") + IsMyData = true; // New record is mine + else + IsMyData = CheckOwner(CurrentMarcIdx); - - mLoadCompleted = false; - for (int a = 0; a < db_data.Length - 1; a += 11) - { - - grid[0] = db_data[a]; // 0: idx - grid[1] = db_data[a + 1]; // 1: isbn - grid[2] = db_data[a + 2]; // 2: header - grid[2] += db_data[a + 3]; // 2: num - grid[3] = db_data[a + 4]; // 3: book_num - grid[4] = db_data[a + 5]; // 4: author - grid[5] = db_data[a + 6]; // 5: book_comp - grid[6] = db_data[a + 7]; // 6: count - grid[7] = db_data[a + 8]; // 7: pay - grid[8] = db_data[a + 9]; // 8: image_url - grid[9] = db_data[a + 10]; // 9: m_idx - - List_Book.Rows.Add(grid); - //if (a % 11 == 0) { grid[0] = db_data[a]; } // 0: idx - //if (a % 11 == 1) { grid[1] = db_data[a+1]; } // 1: isbn - //if (a % 11 == 2) { grid[2] = db_data[a+2]; } // 2: header - //if (a % 11 == 3) { grid[2] += db_data[a+3]; } // 2: num - //if (a % 11 == 4) { grid[3] = db_data[a+4]; } // 3: book_num - //if (a % 11 == 5) { grid[4] = db_data[a+5]; } // 4: author - //if (a % 11 == 6) { grid[5] = db_data[a+6]; } // 5: book_comp - //if (a % 11 == 7) { grid[6] = db_data[a+7]; } // 6: count - //if (a % 11 == 8) { grid[7] = db_data[a+8]; } // 7: pay - //if (a % 11 == 9) { grid[8] = db_data[a+9]; } // 8: image_url - //if (a % 11 == 10) { grid[9] = db_data[a+10]; // 9: m_idx - // List_Book.Rows.Add(grid); - //} - } - chk_Marc(); - mLoadCompleted = true; - - List_Book.ClearSelection(); - if(this.List_Book.RowCount > 0) - List_Book.Rows[0].Selected = true; + ReadRemark(); } + private bool CheckOwner(string marcIdx) + { + string query = $"SELECT `compidx` FROM `Marc` WHERE `idx` = '{marcIdx}'"; + string res = db.DB_Send_CMD_Search(query).Replace("|", ""); + return res == mCompidx; + } /// /// 마크 유무 확인하는 함수 /// - void chk_Marc() - { - for (int a = 0; a < List_Book.Rows.Count; a++) - { - string Area = - // 0 1 - "`idx`, `compidx`, " + - // 2 3 4 5 6 7 - "`marc`, `marc_chk`, `marc1`, `marc_chk1`, `marc2`, `marc_chk2`, " + - // 8 9 10 11 - "`grade`, `008tag`, `user`, `date`"; - string Table = "Marc"; - - string[] sear_tbl = { "ISBN" }; - string[] sear_col = { List_Book.Rows[a].Cells["ISBN13"].Value.ToString() }; - - //if (List_Book.Rows[a].Cells["marc_idx"].Value.ToString() != "0") {//여기 조건이 이상함.. 여기 조건때문에 순서가 잘 못 뜨는 경우 발생.. - // sear_tbl[0] = "idx"; - // sear_col[0] = List_Book.Rows[a].Cells["marc_idx"].Value.ToString(); - //} - - string Chk_Cmd = string.Format("SELECT {0} FROM {1} WHERE `{2}` = \"{3}\" ORDER BY FIELD(`compidx`, {4}) DESC;", - Area, Table, sear_tbl[0], sear_col[0], mCompidx); - - string Chk_Res = db.DB_Send_CMD_Search(Chk_Cmd); - string[] Chk_Arr = Chk_Res.Split('|'); - - bool isMyData = true; - if (Chk_Arr.Length < 2) - { - List_Book.Rows[a].Cells["grade"].Value = "3"; - List_Book.Rows[a].DefaultCellStyle.ForeColor = Color.Red; - continue; - } - - if (Chk_Arr[1] != mCompidx) - isMyData = false; - - string[] MarcData = { Chk_Arr[2], Chk_Arr[4], Chk_Arr[6] }; - string[] CheckData = { Chk_Arr[3], Chk_Arr[5], Chk_Arr[7] }; - - List_Book.Rows[a].DefaultCellStyle.ForeColor = SetGradeColor(Chk_Arr[8], isMyData); - List_Book.Rows[a].Cells["marc_idx"].Value = Chk_Arr[0]; - List_Book.Rows[a].Cells["db_marc"].Value = MarcData[0];//NewestMarc(MarcData, CheckData); - List_Book.Rows[a].Cells["grade"].Value = Chk_Arr[8]; - text008.Text = Chk_Arr[9]; - List_Book.Rows[a].Cells["user"].Value = Chk_Arr[10]; - List_Book.Rows[a].Cells["SaveDate"].Value = Chk_Arr[11]; - - if (isMyData) - SaveDateCheck(Chk_Arr[11], a); - - else - { - string FindCompCmd = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", Chk_Arr[1]); - List_Book.Rows[a].Cells["user"].Value = db.DB_Send_CMD_Search(FindCompCmd).Replace("|", ""); - List_Book.Rows[a].DefaultCellStyle.BackColor = Color.LightGray; - } - } - } private string NewestMarc(string[] marc, string[] marc_chk) { @@ -375,26 +296,7 @@ namespace ExcelTest } } - /// - /// 마지막 저장시각 14일이전일 경우 배경 색 변경 - /// - /// 마지막 저장시각 - /// 해당 행 - private void SaveDateCheck(string Date, int row) - { - DateTime SaveDate = DateTime.ParseExact(Date, "yyyy-MM-dd HH:mm:ss", - System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None); - DateTime TargetDate = DateTime.Today.AddDays(-14); - int result = DateTime.Compare(SaveDate, TargetDate); - - if (result >= 0) // SaveDate가 같거나 큼 - List_Book.Rows[row].DefaultCellStyle.BackColor = Color.Yellow; - - else // TargetDate가 큼 - List_Book.Rows[row].DefaultCellStyle.BackColor = Color.White; - - } private void richTextBox1_KeyDown(object sender, KeyEventArgs e) { @@ -501,9 +403,22 @@ namespace ExcelTest mp.richTextBox1.Text = richTextBox1.Text; mp.Show(); } + public class BookSavedEventArgs : EventArgs + { + public string ListIdx { get; set; } + public string Grade { get; set; } + public string SaveDate { get; set; } + public string User { get; set; } + public string DBMarc { get; set; } + public string MarcIdx { get; set; } + } + + public event EventHandler BookSaved; + public bool IsMyData = false; + private void Btn_Save_Click(object sender, EventArgs e) { - if (SaveRowIdx < 0) + if (string.IsNullOrEmpty(CurrentISBN13)) { MessageBox.Show("마크가 선택되지않았습니다."); return; @@ -522,7 +437,7 @@ namespace ExcelTest } string table_name = "Marc"; string BaseText = richTextBox1.Text; - string lblisbn = lbl_ISBN.Text.Replace("[", "").Replace("]", ""); + string lblisbn = CurrentISBN13; // lbl_ISBN.Text.Replace("[", "").Replace("]", ""); if (!BaseText.EndsWith("\n")) BaseText += "\n"; @@ -540,15 +455,15 @@ namespace ExcelTest } string tag056 = Tag056(); string[] grid_data = { - List_Book.Rows[SaveRowIdx].Cells["ISBN13"].Value.ToString(), - List_Book.Rows[SaveRowIdx].Cells["book_name"].Value.ToString(), - List_Book.Rows[SaveRowIdx].Cells["author"].Value.ToString(), - List_Book.Rows[SaveRowIdx].Cells["book_comp"].Value.ToString(), - List_Book.Rows[SaveRowIdx].Cells["pay"].Value.ToString(), - List_Book.Rows[SaveRowIdx].Cells["url"].Value.ToString() }; + CurrentISBN13, + CurrentBookName, + CurrentAuthor, + CurrentPublisher, + CurrentPrice, + CurrentURL }; string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string orimarc = st.made_Ori_marc(richTextBox1).Replace(@"\", "₩"); - string Midx = List_Book.Rows[SaveRowIdx].Cells["marc_idx"].Value.ToString(); + string Midx = CurrentMarcIdx; // 필수태그 확인 if (!isMustTag(orimarc)) { @@ -556,8 +471,8 @@ namespace ExcelTest return; } - string SaveDate = List_Book.Rows[SaveRowIdx].Cells["SaveDate"].Value.ToString(); - string SaveUser = List_Book.Rows[SaveRowIdx].Cells["user"].Value.ToString(); + string SaveDate = CurrentSaveDate; + string SaveUser = CurrentUser; bool IsCoverDate = false; if (SaveDate != "") @@ -565,18 +480,7 @@ namespace ExcelTest // 마지막 수정일로부터 2일이 지났는지, 마지막 저장자가 사용자인지 확인 TimeSpan sp = spspsp(SaveDate, date); IsCoverDate = IsCoverData(sp.Days, SaveUser); - - // if (IsCoverDate) { - // etc2.Text = etc2.Text.Replace(SaveDate, date); - // } - // else { - // etc2.Text += string.Format("{0}\t{1}\n", date, mUserName); - // } } - //else - //{ - // etc2.Text += string.Format("{0}\t{1}\n", date, mUserName); - //} // true일 경우 INSERT, false일 경우 UPDATE bool isNewData = true; @@ -584,8 +488,8 @@ namespace ExcelTest if (Midx != "") isNewData = false; - if (List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor == Color.Orange || - List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor == Color.Red) + // If not my data, or no data (implied by Midx check but explicit check helps), force Insert (Copy) + if (!IsMyData) { string[] Insert_tbl = { "ISBN", "서명", "저자", "출판사", @@ -599,7 +503,7 @@ namespace ExcelTest date, mCompidx }; string Incmd = db.DB_INSERT(table_name, Insert_tbl, Insert_col); - PUB.log.Add("INSERT", string.Format("{0}({1},{2}) : {3}", mUserName, mCompidx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, Incmd)); + PUB.log.Add("INSERT", string.Format("{0}({1}) : {2}", mUserName, mCompidx, Incmd)); db.DB_Send_CMD_reVoid(Incmd); isNewData = true; } @@ -610,7 +514,7 @@ namespace ExcelTest "비고2", "url", "division", "008tag", "date", "user", "grade" }; string[] Edit_col = { - mCompidx, orimarc, "1", mOldMarc , "0", etc1.Text, + mCompidx, orimarc, "1", CurrentDBMarc , "0", etc1.Text, etc2.Text, grid_data[5], tag056, text008.Text, date, mUserName, grade.ToString() }; string[] Sear_tbl = { "idx", "compidx" }; @@ -620,61 +524,37 @@ namespace ExcelTest MessageBox.Show("ISBN 데이터가 없습니다."); return; } - //if (grid_data[0] != null && grid_data[0] != "") - //{ - // int marcChk = Sub_marc_chk(grid_data[0]); - // if (IsCoverDate) - // marcChk--; - - // switch (marcChk) - // { - // case 0: - // Edit_tbl[1] = "marc1"; - // Edit_tbl[2] = "marc_chk1"; - // Edit_tbl[3] = "marc_chk"; - // break; - // case 1: - // Edit_tbl[1] = "marc2"; - // Edit_tbl[2] = "marc_chk2"; - // Edit_tbl[3] = "marc_chk1"; - // break; - // case 2: - // Edit_tbl[1] = "marc"; - // Edit_tbl[2] = "marc_chk"; - // Edit_tbl[3] = "marc_chk2"; - // break; - // default: - // Edit_tbl[1] = "marc"; - // Edit_tbl[2] = "marc_chk"; - // Edit_tbl[3] = "marc_chk2"; - // break; - // } - //} + string U_cmd = db.More_Update(table_name, Edit_tbl, Edit_col, Sear_tbl, Sear_col); - PUB.log.Add("Update", string.Format("{0}({1},{2}) : {3}", mUserName, mCompidx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, U_cmd.Replace("\r", " ").Replace("\n", " "))); + PUB.log.Add("Update", string.Format("{0}({1}) : {2}", mUserName, mCompidx, U_cmd.Replace("\r", " ").Replace("\n", " "))); db.DB_Send_CMD_reVoid(U_cmd); isNewData = false; } - List_Book.Rows[SaveRowIdx].Cells["grade"].Value = grade.ToString(); - List_Book.Rows[SaveRowIdx].Cells["SaveDate"].Value = date; - List_Book.Rows[SaveRowIdx].Cells["user"].Value = mUserName; - List_Book.Rows[SaveRowIdx].Cells["db_marc"].Value = orimarc; - - List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor = SetGradeColor(grade.ToString()); - if (isNewData) { string MidxQuery = string.Format("SELECT `idx` FROM Marc WHERE isbn = {0} AND `compidx` = {1};", grid_data[0], mCompidx); PUB.log.Add("MarcInsert", string.Format("{0}({1}) : {2}", mUserName, mCompidx, MidxQuery)); Midx = db.DB_Send_CMD_Search(MidxQuery).Replace("|", ""); - List_Book.Rows[SaveRowIdx].Cells["marc_idx"].Value = Midx; + CurrentMarcIdx = Midx; // Update local } string UpdateListIndex = string.Format("UPDATE `Obj_List_Book` SET `m_idx` = {0} WHERE `idx` = {1} AND 'compidx' ={2};", - Midx, List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value.ToString(), mCompidx); + Midx, CurrentListIdx, mCompidx); PUB.log.Add("MarcUpdate", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpdateListIndex)); db.DB_Send_CMD_reVoid(UpdateListIndex); + + // Raise Event to Update List_Book in Parent + BookSaved?.Invoke(this, new BookSavedEventArgs + { + ListIdx = CurrentListIdx, + Grade = grade.ToString(), + SaveDate = date, + User = mUserName, + DBMarc = orimarc, + MarcIdx = Midx + }); + MessageBox.Show("저장되었습니다!"); } @@ -864,67 +744,7 @@ namespace ExcelTest return 0; } #endregion - private string mOldMarc = string.Empty; - private void List_Book_SelectionChanged(object sender, EventArgs e) - { - if (!mLoadCompleted) return; - int row_idx = List_Book.CurrentCell.RowIndex; - int col_idx = List_Book.CurrentCell.ColumnIndex; - if (row_idx == -1 || col_idx == -1) { return; } - SaveRowIdx = row_idx; - mOldMarc = List_Book.Rows[row_idx].Cells["db_marc"].Value.ToString(); - string isbn = List_Book.Rows[row_idx].Cells["ISBN13"].Value.ToString(); - if (isbn != "") - { - string CountQuery = string.Format("SELECT Count(isbn) FROM Marc WHERE isbn = {0} GROUP BY isbn;", isbn); - string CountResult = db.self_Made_Cmd(CountQuery).Replace("|", ""); - - if (CountResult == "") - btn_CopySelect.Text = "0"; - - if (CountResult == "0") - { - btn_CopySelect.Enabled = false; - btn_CopySelect.BackColor = Color.Silver; - } - else - { - btn_CopySelect.Enabled = true; - btn_CopySelect.BackColor = Color.Khaki; - } - - btn_CopySelect.Text = CountResult; - } - - tabControl1.SelectedIndex = 0; - - if (check_V(row_idx, col_idx)) - return; - - Save_data(row_idx); - richTextBox1.Text = ""; - - bool check_Marc = click_Marc(row_idx); - - if (!check_Marc) - richTextBox1.Text = Make_Empty(); - else - ReadRemark(row_idx); - - input_picture(row_idx); - Create_008(); - st.Color_change("▼", richTextBox1); - st.Color_change("▲", richTextBox1); - - int grade = 2; - if (List_Book.Rows[row_idx].Cells["grade"].Value != null || List_Book.Rows[row_idx].Cells["grade"].Value.ToString() != "") - { - grade = Convert.ToInt32(List_Book.Rows[row_idx].Cells["grade"].Value.ToString()); - } - cb_grade.SelectedIndex = grade; - OnSaveData(row_idx); - } //private void List_Book_CellClick(object sender, DataGridViewCellEventArgs e) //{ // //if (e.RowIndex == -1) { return; } @@ -983,16 +803,19 @@ namespace ExcelTest void OnSaveData(int row) { - string User = List_Book.Rows[row].Cells["user"].Value.ToString(); - string Date = List_Book.Rows[row].Cells["SaveDate"].Value.ToString(); - - lbl_SaveData.Text = string.Format("[{0}] [{1}]", User, Date); - lbl_ISBN.Text = "[" + List_Book.Rows[row].Cells["ISBN13"].Value.ToString() + "]"; + } - void ReadRemark(int row) + void ReadRemark() { + if (string.IsNullOrEmpty(CurrentMarcIdx) || CurrentMarcIdx == "0") + { + etc1.Text = ""; + etc2.Text = ""; + return; + } + string[] sear_tbl = { "idx" }; - string[] sear_col = { List_Book.Rows[row].Cells["marc_idx"].Value.ToString() }; + string[] sear_col = { CurrentMarcIdx }; string cmd = db.More_DB_Search("Marc", sear_tbl, sear_col, "`비고1`, `비고2`"); string res = db.DB_Send_CMD_Search(cmd); @@ -1006,32 +829,15 @@ namespace ExcelTest etc1.Text = ary[0]; etc2.Text = ary[1]; } - - bool check_V(int row, int col) - { - string name = List_Book.Columns[col].Name; - if (name == "colCheck") - { - if (List_Book.Rows[row].Cells[col].Value.ToString() == "V") - List_Book.Rows[row].Cells[col].Value = ""; - - else - List_Book.Rows[row].Cells["colCheck"].Value = "V"; - - return true; - } - else - return false; - } /// /// 마크데이터가 있는지 확인하고 메모장으로 출력 /// /// 해당 데이터의 row값 /// - bool click_Marc(int row) + bool LoadMarc(string Marc_data) { - // 마크 데이터 - string Marc_data = List_Book.Rows[row].Cells["db_marc"].Value.ToString(); + // Removed accessing List_Book + // string Marc_data = List_Book.Rows[row].Cells["db_marc"].Value.ToString(); if (Marc_data.Length < 3) return false; @@ -1085,20 +891,19 @@ namespace ExcelTest /// /// 데이터 임시저장 /// - /// 저장할 데이터가 있는 표의 Row값 - void Save_data(int row) + void Save_data() { - data_book[0] = List_Book.Rows[row].Cells["ISBN13"].Value.ToString(); - data_book[1] = List_Book.Rows[row].Cells["book_name"].Value.ToString(); - data_book[2] = List_Book.Rows[row].Cells["author"].Value.ToString(); - data_book[3] = List_Book.Rows[row].Cells["book_comp"].Value.ToString(); - data_book[4] = List_Book.Rows[row].Cells["pay"].Value.ToString(); + data_book[0] = CurrentISBN13; + data_book[1] = CurrentBookName; + data_book[2] = CurrentAuthor; + data_book[3] = CurrentPublisher; + data_book[4] = CurrentPrice; } - void input_picture(int row) + void input_picture() { try { - string isbn = List_Book.Rows[row].Cells["ISBN13"].Value.ToString(); + string isbn = CurrentISBN13; string isbn3 = isbn.Substring(isbn.Length - 3, 3); string tFilePath = string.Format("https://contents.kyobobook.co.kr/sih/fit-in/458x0/pdt/{0}.jpg", isbn); pictureBox1.ImageLocation = tFilePath; @@ -1467,210 +1272,19 @@ namespace ExcelTest private void Btn_Close_Click(object sender, EventArgs e) { - this.Close(); + } private void pictureBox1_DoubleClick(object sender, EventArgs e) { - int row = List_Book.CurrentCell.RowIndex; - Zoom_Picture zp = new Zoom_Picture(); - zp.url = pictureBox1.ImageLocation; - zp.ISBN = List_Book.Rows[row].Cells["ISBN13"].Value.ToString(); + zp.url = pictureBox1.ImageLocation ?? CurrentURL; + zp.ISBN = CurrentISBN13; zp.Show(); } - private void btn_Search_Click(object sender, EventArgs e) - { - if (List_Book.RowCount < 0) return; - Search_ReSet(); - - bool isSort = rb_Sort.Checked; - int combo = comboBox8.SelectedIndex; // 0: 등급 / 1: 복본 - - if (isSort) - { - if (combo == 0) - { - List_Book.Sort(List_Book.Columns["grade"], System.ComponentModel.ListSortDirection.Ascending); - } - else - { - List_Book.Sort(List_Book.Columns["ISBN13"], System.ComponentModel.ListSortDirection.Ascending); - } - } - else - { - int comboIdx; - if (combo == 0) - { - comboIdx = comboBox9.SelectedIndex; - Search_Filter("grade", comboIdx); - } - else - { // 수정필요 - - } - } - } - #region Search_Click_Sub - private void Search_ReSet() - { - DataGridViewBand reSet; - for (int a = 0; a < List_Book.RowCount; a++) - { - reSet = List_Book.Rows[a]; - reSet.Visible = true; - } - } - - private void Search_Filter(string target, int comboIdx) - { - int count = List_Book.Rows.Count; - DataGridViewBand band; - if (comboIdx == 0) - { - for (int a = 0; a < count; a++) - { - band = List_Book.Rows[a]; - band.Visible = true; - } - return; - } - - comboIdx--; - for (int a = 0; a < count; a++) - { - if (List_Book.Rows[a].Cells[target].Value.ToString() != comboIdx.ToString()) - { - band = List_Book.Rows[a]; - band.Visible = false; - } - } - } - #endregion - - private void btn_CopySelect_Click(object sender, EventArgs e) - { - //TODO: 마크 물리는쪽 - int row = List_Book.CurrentCell.RowIndex; - string isbn = List_Book.Rows[row].Cells["ISBN13"].Value.ToString(); - - MarcCopySelect copySelect = new MarcCopySelect(this); - copySelect.MarcFormRowIndex = row; - copySelect.Init("isbn", isbn); - copySelect.Show(); - } - - /// - /// 선택된 마크에 대한 정보를 그리드뷰에 저장. - /// - /// - /// [0] idx, [1] compidx, [2] user, [3] date, [4] grade, [5] tag008, [6] marc - public void SelectMarc_Sub(int row, string[] GridData) - { - List_Book.Rows[row].Cells["marc_idx"].Value = GridData[0]; - List_Book.Rows[row].Cells["user"].Value = GridData[2]; - List_Book.Rows[row].Cells["SaveDate"].Value = GridData[4]; - List_Book.Rows[row].Cells["grade"].Value = GridData[3]; - text008.Text = GridData[5]; - List_Book.Rows[row].Cells["db_marc"].Value = GridData[6]; - mOldMarc = GridData[6]; - List_Book.Rows[row].DefaultCellStyle.ForeColor = SetGradeColor(GridData[4]); - List_Book.Rows[row].DefaultCellStyle.BackColor = Color.Yellow; - - - bool checkMarc = click_Marc(row); - if (checkMarc) - { - ReadRemark(row); - OnSaveData(row); - st.Color_change("▼", richTextBox1); - st.Color_change("▲", richTextBox1); - } - } - - private void comboBox8_SelectedIndexChanged(object sender, EventArgs e) - { - comboBox9.Items.Clear(); - - ComboBox cb = sender as ComboBox; - if (cb.SelectedIndex == 0) - { - comboBox9.Enabled = true; - string[] grade = { "전체", "A", "B", "C", "D" }; - comboBox9.Items.AddRange(grade); - comboBox9.SelectedIndex = 0; - } - else - comboBox9.Enabled = false; - } - - private void Radio_Sort_CheckedChanged(object sender, EventArgs e) - { - RadioButton rb = sender as RadioButton; - string text = rb.Text; - if (text == "정렬") - comboBox9.Enabled = false; - - else - comboBox9.Enabled = true; - } - - - private void btn_mk_marcList_Click(object sender, EventArgs e) - { - - } - #region 마크생성목록_Sub - public bool Check_BackColor(int row) - { - if (List_Book.Rows[row].DefaultCellStyle.ForeColor != Color.Red) - return true; - - return false; - } - public bool Check_List_V(int row) - { - if (List_Book.Rows[row].Cells["colCheck"].Value.ToString() == "V") - return true; - - return false; - } - #endregion - - private void checkBox3_CheckedChanged(object sender, EventArgs e) - { - bool isCheck = checkBox3.Checked; - if (isCheck) - { - for (int a = 0; a < List_Book.Rows.Count; a++) - { - List_Book.Rows[a].Cells["colCheck"].Value = "V"; - } - } - else - { - for (int a = 0; a < List_Book.Rows.Count; a++) - { - List_Book.Rows[a].Cells["colCheck"].Value = ""; - } - } - } - - private void List_Book_KeyDown(object sender, KeyEventArgs e) - { - int row = List_Book.CurrentCell.RowIndex; - if (e.KeyCode == Keys.Space) - { - if (List_Book.Rows[row].Cells["colCheck"].Value.ToString() == "V") - List_Book.Rows[row].Cells["colCheck"].Value = ""; - - else - List_Book.Rows[row].Cells["colCheck"].Value = "V"; - } - } + public event EventHandler FillBlankClicked; private void FillTextBox_KeyDown(object sender, KeyEventArgs e) { @@ -1698,66 +1312,14 @@ namespace ExcelTest } - #region DataGridView 드래그 행이동 이벤트 함수 - Skill_Grid sg = new Skill_Grid(); - - private void List_Book_MouseMove(object sender, MouseEventArgs e) - { - sg.MouseMove(sender, e); - } - - private void List_Book_MouseDown(object sender, MouseEventArgs e) - { - sg.MouseDown(sender, e); - } - - private void List_Book_DragOver(object sender, DragEventArgs e) - { - sg.DragOver(sender, e); - } - - private void List_Book_DragDrop(object sender, DragEventArgs e) - { - sg.DragDrop(sender, e); - } - - #endregion private void btn_FillBlank_Click(object sender, EventArgs e) { - // tabControl1.SelectedIndex = 1; - int row = List_Book.CurrentRow.Index; - string ISBN = List_Book.Rows[row].Cells["ISBN13"].Value.ToString(); - - if (ISBN == "" || ISBN == null) - { - MessageBox.Show("ISBN이 존재하지않습니다!"); - return; - } - - UniMarc.Marc_FillBlank fb = new UniMarc.Marc_FillBlank(this); - for (int a = 0; a < List_Book.Rows.Count; a++) - { - if (List_Book.Rows[a].DefaultCellStyle.ForeColor == Color.Red) - { - string[] GridData = - { - a.ToString(), - List_Book.Rows[a].Cells["ISBN13"].Value.ToString(), - List_Book.Rows[a].Cells["book_name"].Value.ToString(), - List_Book.Rows[a].Cells["author"].Value.ToString(), - List_Book.Rows[a].Cells["book_comp"].Value.ToString(), - List_Book.Rows[a].Cells["pay"].Value.ToString(), - "" - }; - fb.InitFillBlank(GridData); - } - } - fb.ISBN = ISBN; - fb.Show(); + FillBlankClicked?.Invoke(this, EventArgs.Empty); } + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) { int TabIndex = tabControl1.SelectedIndex; @@ -3684,64 +3246,5 @@ namespace ExcelTest sg.DataGrid_to_Delete(sender, e); } - private void btn_FilterReturn_Click(object sender, EventArgs e) - { - rb_Filter.Checked = false; - rb_Sort.Checked = false; - - comboBox8.SelectedIndex = 0; - comboBox9.SelectedIndex = 0; - - List_Book.Sort(list_idx, System.ComponentModel.ListSortDirection.Ascending); - } - - private void List_Book_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) - { - Skill_Grid sg = new Skill_Grid(); - sg.Print_Grid_Num(sender, e); - } - - private void lbl_BookList_Click(object sender, EventArgs e) - { - LovCustom(); - - } - - void LovCustom() - { - var inputsearch = "";// tbCustName.Text.Trim(); - var where = ""; - if (inputsearch.isEmpty() == false) - { - where = $"c_sangho like '%{inputsearch.Replace("'", "''")}%'"; - } - var dt = DB2.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where); - using (var f = new fSelectDT(dt)) - if (f.ShowDialog() == DialogResult.OK) - { - var dr = f.SelectedRow; - if (dr == null) return; - lbCustIDX.Text = dr["idx"]?.ToString() ?? string.Empty; - tbCustName.Text = dr["c_sangho"]?.ToString() ?? string.Empty; - - if (int.TryParse(lbCustIDX.Text, out int custidx) && custidx >= 0) - { - var sql = $"update Obj_List set customer={custidx} where idx = {l_idx} and comp_num={c_idx}"; - var cnt = DB2.ExcuteNonQuery(sql); - if (cnt != 1) - UTIL.MsgE($"데이터 저장시 오류가 발생했습니다. 영향을 받은 행 수 = {cnt}"); - } - - } - } - - private void Marc_KeyDown(object sender, KeyEventArgs e) - { - if (e.KeyCode == Keys.Escape) - { - if (UTIL.MsgQ("현재 화면을 닫을까요?") != DialogResult.Yes) return; - this.Close(); - } - } } } \ No newline at end of file diff --git a/unimarc/unimarc/마크/Marc_FillBlank.cs b/unimarc/unimarc/마크/Marc_FillBlank.cs index 2724062..b83518b 100644 --- a/unimarc/unimarc/마크/Marc_FillBlank.cs +++ b/unimarc/unimarc/마크/Marc_FillBlank.cs @@ -18,8 +18,8 @@ namespace UniMarc bool isAll; bool isBreak; ExcelTest.Marc marc; - MarcEditor mae; - public Marc_FillBlank(MarcEditor _mae) + Marc2 mae; + public Marc_FillBlank(Marc2 _mae) { InitializeComponent(); mae = _mae; diff --git a/unimarc/unimarc/마크/Marc_memo.cs b/unimarc/unimarc/마크/Marc_memo.cs index be04343..b8bcde1 100644 --- a/unimarc/unimarc/마크/Marc_memo.cs +++ b/unimarc/unimarc/마크/Marc_memo.cs @@ -15,9 +15,15 @@ namespace UniMarc.마크 { Marc marc; AddMarc am; - MarcEditor mae; - - public Marc_memo(MarcEditor _mae) + Marc2 mae; + MarcEditorControl mae2; + + public Marc_memo(MarcEditorControl _mae) + { + InitializeComponent(); + mae2 = _mae; + } + public Marc_memo(Marc2 _mae) { InitializeComponent(); mae = _mae; diff --git a/unimarc/unimarc/마크/Marc_mkList.cs b/unimarc/unimarc/마크/Marc_mkList.cs index cbc22fa..fc12cf8 100644 --- a/unimarc/unimarc/마크/Marc_mkList.cs +++ b/unimarc/unimarc/마크/Marc_mkList.cs @@ -21,9 +21,9 @@ namespace UniMarc.마크 Marc marc; CD_LP cp; Helper_DB db = new Helper_DB(); - MarcEditor mae; + Marc2 mae; string compidx = Settings.Default.compidx; - public Marc_mkList(MarcEditor _mae) + public Marc_mkList(Marc2 _mae) { InitializeComponent(); mae = _mae; diff --git a/unimarc/unimarc/마크/findNchange.cs b/unimarc/unimarc/마크/findNchange.cs index 28acc76..df20268 100644 --- a/unimarc/unimarc/마크/findNchange.cs +++ b/unimarc/unimarc/마크/findNchange.cs @@ -23,8 +23,16 @@ namespace ExcelTest AddMarc am; Marc mac; Marc_memo mmm; - MarcEditor mae; - public findNchange(MarcEditor _mae) + Marc2 mae; + MarcEditorControl mec; + public findNchange(MarcEditorControl _mac) + { + InitializeComponent(); + mec = _mac; + } + + + public findNchange(Marc2 _mae) { InitializeComponent(); mae = _mae;