diff --git a/unimarc/unimarc/마크/MacEditorParameter.cs b/unimarc/unimarc/마크/MacEditorParameter.cs
index 2b4efd0..2a13ce4 100644
--- a/unimarc/unimarc/마크/MacEditorParameter.cs
+++ b/unimarc/unimarc/마크/MacEditorParameter.cs
@@ -17,6 +17,9 @@ namespace ExcelTest
public string Publisher { get; set; }
public string Price { get; set; }
- }
+ public string Remark1 { get; set; }
+ public string Remark2 { get; set; }
+
+ }
}
\ No newline at end of file
diff --git a/unimarc/unimarc/마크/Marc2.cs b/unimarc/unimarc/마크/Marc2.cs
index d1e2142..7bf407e 100644
--- a/unimarc/unimarc/마크/Marc2.cs
+++ b/unimarc/unimarc/마크/Marc2.cs
@@ -60,7 +60,35 @@ namespace ExcelTest
marcEditorControl1.db = this.db;
marcEditorControl1.BookSaved += MarcEditorControl_BookSaved;
marcEditorControl1.FillBlankClicked += MarcEditorControl_FillBlankClicked;
+ marcEditorControl1.PrevButton += MarcEditorControl1_PrevButton;
+ marcEditorControl1.NextButton += MarcEditorControl1_NextButton;
}
+
+ private void MarcEditorControl1_NextButton(object sender, EventArgs e)
+ {
+ int row_idx = List_Book.CurrentCell.RowIndex;
+ int col_idx = List_Book.CurrentCell.ColumnIndex;
+ if (row_idx == -1 || col_idx == -1) { return; }
+
+ //다음데이터가 존재한다
+ if(row_idx < List_Book.RowCount-1)
+ {
+ List_Book.CurrentCell = List_Book.Rows[row_idx + 1].Cells[col_idx];
+ }
+ }
+
+ private void MarcEditorControl1_PrevButton(object sender, EventArgs e)
+ {
+ int row_idx = List_Book.CurrentCell.RowIndex;
+ int col_idx = List_Book.CurrentCell.ColumnIndex;
+ if (row_idx == -1 || col_idx == -1) { return; }
+
+ if (row_idx > 0)
+ {
+ List_Book.CurrentCell = List_Book.Rows[row_idx - 1].Cells[col_idx];
+ }
+ }
+
public Marc2(Mac_List _ml)
{
InitializeComponent();
@@ -69,6 +97,8 @@ namespace ExcelTest
marcEditorControl1.db = this.db;
marcEditorControl1.BookSaved += MarcEditorControl_BookSaved;
marcEditorControl1.FillBlankClicked += MarcEditorControl_FillBlankClicked;
+ marcEditorControl1.PrevButton += MarcEditorControl1_PrevButton;
+ marcEditorControl1.NextButton += MarcEditorControl1_NextButton;
}
string l_idx = string.Empty;
@@ -89,6 +119,24 @@ namespace ExcelTest
input_list(p_lidx, p_value, p_cidx, p_cust, p_name);
}
+ (string remark1, string remark2) ReadRemark(int row)
+ {
+ string[] sear_tbl = { "idx" };
+ string[] sear_col = { List_Book.Rows[row].Cells["marc_idx"].Value.ToString() };
+ string cmd = db.More_DB_Search("Marc", sear_tbl, sear_col, "`비고1`, `비고2`");
+ string res = db.DB_Send_CMD_Search(cmd);
+
+ string[] ary = res.Split('|');
+ if (res.Length < 1)
+ {
+ //etc1.Text = res;
+ //etc2.Text = "";
+ return (res, "");
+ }
+ //etc1.Text = ary[0];
+ //etc2.Text = ary[1];
+ return (ary[0], ary[1]);
+ }
///
@@ -307,8 +355,16 @@ namespace ExcelTest
private void List_Book_SelectionChanged(object sender, EventArgs e)
{
if (!mLoadCompleted) return;
+ if (List_Book.CurrentCell == null) return;
int row_idx = List_Book.CurrentCell.RowIndex;
int col_idx = List_Book.CurrentCell.ColumnIndex;
+
+ if (List_Book.SelectedCells.Count > 0)
+ {
+ row_idx = List_Book.SelectedCells[0].RowIndex;
+ col_idx = List_Book.SelectedCells[0].ColumnIndex;
+ }
+
if (row_idx == -1 || col_idx == -1) { return; }
SaveRowIdx = row_idx;
@@ -351,7 +407,7 @@ namespace ExcelTest
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
-
+ var remark = ReadRemark(row_idx);
var p = new MacEditorParameter
{
ISBN13 = isbn13,
@@ -364,7 +420,9 @@ namespace ExcelTest
BookName = bookName,
Author = author,
Publisher = publisher,
- Price = price
+ Price = price,
+ Remark1 = remark.remark1,
+ Remark2 = remark.remark2
};
marcEditorControl1.LoadBookData(dbMarc, p);
}
@@ -536,7 +594,7 @@ namespace ExcelTest
"date", "compidx" };
string[] Insert_col = {
e.griddata.ISBN13, e.griddata.BookName, e.griddata.Author, e.griddata.Publisher,
- e.griddata.Price, orimarc, e.etc1, e.etc2, e.griddata.URL,
+ e.griddata.Price, orimarc, e.griddata.Remark1, e.griddata.Remark2, e.griddata.URL,
e.griddata.Grade, "1", mUserName, e.tag056, e.text008,
date, mCompidx };
@@ -552,8 +610,8 @@ namespace ExcelTest
"비고2", "url", "division", "008tag", "date",
"user", "grade" };
string[] Edit_col = {
- mCompidx, orimarc, "1", mOldMarc , "0", e.etc1,
- e.etc2, e.griddata.URL, e.tag056,e.text008, date,
+ mCompidx, orimarc, "1", mOldMarc , "0", e.griddata.Remark1,
+ e.griddata.Remark2, e.griddata.URL, e.tag056,e.text008, date,
mUserName, e.griddata.Grade };
string[] Sear_tbl = { "idx", "compidx" };
string[] Sear_col = { Midx, mCompidx };
diff --git a/unimarc/unimarc/마크/MarcEditorControl.Designer.cs b/unimarc/unimarc/마크/MarcEditorControl.Designer.cs
index d407179..c093068 100644
--- a/unimarc/unimarc/마크/MarcEditorControl.Designer.cs
+++ b/unimarc/unimarc/마크/MarcEditorControl.Designer.cs
@@ -28,14 +28,14 @@
///
private void InitializeComponent()
{
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
- System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
+ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
this.label31 = new System.Windows.Forms.Label();
this.label30 = new System.Windows.Forms.Label();
this.label33 = new System.Windows.Forms.Label();
@@ -877,8 +877,8 @@
this.GridView020.Name = "GridView020";
this.GridView020.RowHeadersVisible = false;
this.GridView020.RowHeadersWidth = 30;
- dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
- this.GridView020.RowsDefaultCellStyle = dataGridViewCellStyle1;
+ dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
+ this.GridView020.RowsDefaultCellStyle = dataGridViewCellStyle9;
this.GridView020.RowTemplate.Height = 23;
this.GridView020.Size = new System.Drawing.Size(408, 80);
this.GridView020.TabIndex = 0;
@@ -952,8 +952,8 @@
this.GridView505.Name = "GridView505";
this.GridView505.RowHeadersVisible = false;
this.GridView505.RowHeadersWidth = 30;
- dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
- this.GridView505.RowsDefaultCellStyle = dataGridViewCellStyle2;
+ dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
+ this.GridView505.RowsDefaultCellStyle = dataGridViewCellStyle10;
this.GridView505.RowTemplate.Height = 23;
this.GridView505.Size = new System.Drawing.Size(401, 71);
this.GridView505.TabIndex = 2;
@@ -1092,14 +1092,14 @@
this.GridView246.AllowDrop = true;
this.GridView246.AllowUserToAddRows = false;
this.GridView246.AllowUserToResizeRows = false;
- dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
- dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle3.Font = new System.Drawing.Font("돋움", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
- dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.GridView246.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
+ dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+ dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
+ dataGridViewCellStyle11.Font = new System.Drawing.Font("돋움", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
+ dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.GridView246.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
this.GridView246.ColumnHeadersHeight = 29;
this.GridView246.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Text246Jisi,
@@ -1112,8 +1112,8 @@
this.GridView246.Name = "GridView246";
this.GridView246.RowHeadersVisible = false;
this.GridView246.RowHeadersWidth = 30;
- dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
- this.GridView246.RowsDefaultCellStyle = dataGridViewCellStyle4;
+ dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
+ this.GridView246.RowsDefaultCellStyle = dataGridViewCellStyle12;
this.GridView246.RowTemplate.Height = 23;
this.GridView246.Size = new System.Drawing.Size(493, 138);
this.GridView246.TabIndex = 31;
@@ -1272,14 +1272,14 @@
this.GridView440.AllowDrop = true;
this.GridView440.AllowUserToAddRows = false;
this.GridView440.AllowUserToResizeRows = false;
- dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
- dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle5.Font = new System.Drawing.Font("돋움", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
- dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.GridView440.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
+ dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+ dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control;
+ dataGridViewCellStyle13.Font = new System.Drawing.Font("돋움", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
+ dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.GridView440.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13;
this.GridView440.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.GridView440.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.text440a,
@@ -1292,8 +1292,8 @@
this.GridView440.Name = "GridView440";
this.GridView440.RowHeadersVisible = false;
this.GridView440.RowHeadersWidth = 30;
- dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
- this.GridView440.RowsDefaultCellStyle = dataGridViewCellStyle6;
+ dataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
+ this.GridView440.RowsDefaultCellStyle = dataGridViewCellStyle14;
this.GridView440.RowTemplate.Height = 23;
this.GridView440.Size = new System.Drawing.Size(597, 71);
this.GridView440.TabIndex = 18;
@@ -1401,14 +1401,14 @@
this.GridView490.AllowDrop = true;
this.GridView490.AllowUserToAddRows = false;
this.GridView490.AllowUserToResizeRows = false;
- dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
- dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
- dataGridViewCellStyle7.Font = new System.Drawing.Font("돋움", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
- dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
- dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
- dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
- dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
- this.GridView490.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
+ dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+ dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control;
+ dataGridViewCellStyle15.Font = new System.Drawing.Font("돋움", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
+ dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.GridView490.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle15;
this.GridView490.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.GridView490.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.text490a,
@@ -1417,8 +1417,8 @@
this.GridView490.Name = "GridView490";
this.GridView490.RowHeadersVisible = false;
this.GridView490.RowHeadersWidth = 30;
- dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
- this.GridView490.RowsDefaultCellStyle = dataGridViewCellStyle8;
+ dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(224)))), ((int)(((byte)(224)))), ((int)(((byte)(224)))));
+ this.GridView490.RowsDefaultCellStyle = dataGridViewCellStyle16;
this.GridView490.RowTemplate.Height = 23;
this.GridView490.Size = new System.Drawing.Size(321, 71);
this.GridView490.TabIndex = 19;
@@ -2305,23 +2305,21 @@
//
// btNext
//
- this.btNext.Enabled = false;
this.btNext.Location = new System.Drawing.Point(274, 266);
this.btNext.Name = "btNext";
this.btNext.Size = new System.Drawing.Size(107, 33);
this.btNext.TabIndex = 230;
- this.btNext.Text = "다 음(F12)";
+ this.btNext.Text = "다 음(F8)";
this.btNext.UseVisualStyleBackColor = true;
this.btNext.Click += new System.EventHandler(this.btNext_Click);
//
// btPrev
//
- this.btPrev.Enabled = false;
this.btPrev.Location = new System.Drawing.Point(98, 266);
this.btPrev.Name = "btPrev";
this.btPrev.Size = new System.Drawing.Size(107, 33);
this.btPrev.TabIndex = 229;
- this.btPrev.Text = "이 전(F11)";
+ this.btPrev.Text = "이 전(F7)";
this.btPrev.UseVisualStyleBackColor = true;
this.btPrev.Click += new System.EventHandler(this.btPrev_Click);
//
diff --git a/unimarc/unimarc/마크/MarcEditorControl.cs b/unimarc/unimarc/마크/MarcEditorControl.cs
index 49629be..42e752d 100644
--- a/unimarc/unimarc/마크/MarcEditorControl.cs
+++ b/unimarc/unimarc/마크/MarcEditorControl.cs
@@ -1,6 +1,8 @@
//using Microsoft.Office.Interop.Excel;
using AR;
using Microsoft.VisualBasic.ApplicationServices;
+using Org.BouncyCastle.Pkcs;
+using Org.BouncyCastle.Tls.Crypto;
using System;
using System.Collections.Generic;
using System.Drawing;
@@ -144,7 +146,12 @@ namespace ExcelTest
if (!check_Marc)
richTextBox1.Text = Make_Empty();
else
- ReadRemark();
+ {
+ etc1.Text = Param.Remark1;
+ etc2.Text = Param.Remark2;
+ //ReadRemark();
+ }
+
Create_008();
st.Color_change("▼", richTextBox1);
@@ -195,6 +202,10 @@ namespace ExcelTest
richTextBox1.SelectedText = "▼";
else if (e.KeyCode == Keys.F4)
richTextBox1.SelectedText = "▲";
+ else if (e.KeyCode == Keys.F8) //next
+ btNext.PerformClick();
+ else if (e.KeyCode == Keys.F7) //prev
+ btPrev.PerformClick();
}
///
@@ -267,8 +278,6 @@ namespace ExcelTest
{
public string SaveDate { get; set; }
public string DBMarc { get; set; }
- public string etc1 { get; set; } //remark1
- public string etc2 { get; set; } //remark2
public string tag056 { get; set; }
public string text008 { get; set; }
public MacEditorParameter griddata { get; set; }
@@ -284,7 +293,7 @@ namespace ExcelTest
return;
}
int TabIndex = tabControl1.SelectedIndex;
- Param.Grade = cb_grade.SelectedIndex.ToString();
+
if (TabIndex == 1)
{
MessageBox.Show("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!");
@@ -310,13 +319,6 @@ namespace ExcelTest
return;
}
string tag056 = Tag056();
- //string[] grid_data = {
- // Param.ISBN13,
- // "",//CurrentBookName,
- // "",// CurrentAuthor,
- // "",// CurrentPublisher,
- // "",// CurrentPrice,
- // "" };// CurrentURL"" };
string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
string orimarc = st.made_Ori_marc(richTextBox1).Replace(@"\", "₩");
@@ -327,14 +329,14 @@ namespace ExcelTest
return;
}
-
+ this.Param.Grade = cb_grade.SelectedIndex.ToString();
+ this.Param.Remark1 = etc1.Text;
+ this.Param.Remark2 = etc2.Text;
// Raise Event to Update List_Book in Parent
BookSaved?.Invoke(this, new BookSavedEventArgs
{
SaveDate = date,
DBMarc = orimarc,
- etc1 = etc1.Text,
- etc2 = etc2.Text,
tag056 = tag056,
text008 = text008.Text,
griddata = this.Param