diff --git a/unimarc/unimarc/Helper_DB.cs b/unimarc/unimarc/Helper_DB.cs
index 3fabcb2..9531ad8 100644
--- a/unimarc/unimarc/Helper_DB.cs
+++ b/unimarc/unimarc/Helper_DB.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Data;
using System.IO.Ports;
using System.Linq;
using System.Text;
@@ -14,7 +15,7 @@ namespace WindowsFormsApp1
///
/// DB접속을 도와주는 클래스
///
- public class Helper_DB
+ public class Helper_DB
{
// 접속
MySqlConnection conn;
@@ -51,10 +52,11 @@ namespace WindowsFormsApp1
connectionInfo.Timeout = TimeSpan.FromSeconds(30);
using (var client = new SshClient(connectionInfo))
{
- if (conn != null) {
+ if (conn != null)
+ {
conn.Close();
conn.Dispose();
- }
+ }
client.Connect();
if (client.IsConnected)
{
@@ -123,8 +125,33 @@ namespace WindowsFormsApp1
}
}
}
+ public DataTable ExecuteQueryData(string cmd)
+ {
+ DataTable dt = new DataTable();
+ try
+ {
+ conn.Open();
+ sqlcmd.CommandText = cmd;
+ sqlcmd.Connection = conn;
+
+ using (MySqlDataAdapter adapter = new MySqlDataAdapter(sqlcmd))
+ {
+ adapter.Fill(dt);
+ }
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.ToString(), "ExecuteQueryData Error");
+ }
+ finally
+ {
+ if (conn.State == ConnectionState.Open) conn.Close();
+ }
+ return dt;
+ }
public string DB_Send_CMD_Search(string cmd)
{
+
// DB 연결
conn.Open();
// 쿼리 맵핑
@@ -157,7 +184,7 @@ namespace WindowsFormsApp1
sqlcmd.Connection = conn;
// 쿼리 날리기, sqlDataReader에 결과값 저장
sd = sqlcmd.ExecuteReader();
-
+
int colCount = dgv.ColumnCount;
string[] grid = new string[colCount];
int AddCol = 0;
@@ -184,7 +211,7 @@ namespace WindowsFormsApp1
conn.Close();
}
- public void DB_Send_CMD_Search_GetGridData(string cmd,DataGridView pDgv)
+ public void DB_Send_CMD_Search_GetGridData(string cmd, DataGridView pDgv)
{
// DB 연결
conn.Open();
@@ -209,7 +236,7 @@ namespace WindowsFormsApp1
if (colCount - 1 == AddCol)
{
AddCol = 0;
- grid[colCount]="추가";
+ grid[colCount] = "추가";
pDgv.Rows.Add(grid);
}
else
@@ -222,8 +249,8 @@ namespace WindowsFormsApp1
}
public void DB_Send_CMD_reVoid(string cmd)
{
-
-
+
+
//using (conn)
{
conn.Open();
@@ -257,10 +284,10 @@ namespace WindowsFormsApp1
/// 검색할 테이블
/// 검색할 텍스트
/// 검색된 결과값이 반환됨.
- public string DB_Contains(string DB_Table_Name, string compidx,
+ public string DB_Contains(string DB_Table_Name, string compidx,
string DB_Where_Table = "", string DB_Search_Data = "",
- string Search_col = "",
- string DB_Where_Table1 = "", string DB_Search_Data1 = "" )
+ string Search_col = "",
+ string DB_Where_Table1 = "", string DB_Search_Data1 = "")
{
string cmd = "SELECT ";
if (Search_col == "") { cmd += "*"; }
@@ -270,16 +297,16 @@ namespace WindowsFormsApp1
if (DB_Table_Name == "Obj_List") { cmd += " WHERE `comp_num` = \"" + compidx + "\""; }
else if (DB_Table_Name == "Client") { cmd += " WHERE `campanyidx` = \"" + compidx + "\""; }
else if (DB_Table_Name == "Purchase") { cmd += " WHERE `comparyidx` = \"" + compidx + "\""; }
- else if(compidx == "none") { cmd += " WHERE `grade` = \"2\""; }
+ else if (compidx == "none") { cmd += " WHERE `grade` = \"2\""; }
else { cmd += " WHERE `compidx` = \"" + compidx + "\""; }
-
- if(DB_Search_Data != "")
- {
- cmd += " AND `"+ DB_Where_Table + "` LIKE \"%" + DB_Search_Data + "%\"";
+
+ if (DB_Search_Data != "")
+ {
+ cmd += " AND `" + DB_Where_Table + "` LIKE \"%" + DB_Search_Data + "%\"";
}
- if(DB_Search_Data1 != "")
- {
- cmd += " AND `"+ DB_Where_Table1 + "` LIKE \"%" + DB_Search_Data1 + "%\"";
+ if (DB_Search_Data1 != "")
+ {
+ cmd += " AND `" + DB_Where_Table1 + "` LIKE \"%" + DB_Search_Data1 + "%\"";
}
cmd += ";";
return cmd;
@@ -292,17 +319,17 @@ namespace WindowsFormsApp1
/// 검색할 테이블
/// 검색할 텍스트
/// 검색된 결과값이 반환됨.
- public string DB_Select_Search(string Search_Area, string DB_Table_Name,
+ public string DB_Select_Search(string Search_Area, string DB_Table_Name,
string DB_Where_Table = "", string DB_Search_Data = "",
string DB_Where_Table1 = "", string DB_Search_Data1 = "")
{
string cmd = string.Format("SELECT {0} FROM ", Search_Area);
cmd += DB_Table_Name;
- if(DB_Where_Table != "" && DB_Search_Data != "")
+ if (DB_Where_Table != "" && DB_Search_Data != "")
{
cmd += string.Format(" WHERE `{0}` = \"{1}\"", DB_Where_Table, DB_Search_Data);
}
- if(DB_Where_Table1 != "" && DB_Search_Data1 != "")
+ if (DB_Where_Table1 != "" && DB_Search_Data1 != "")
{
cmd += string.Format(" AND `{0}` = \"{1}\"", DB_Where_Table1, DB_Search_Data1);
}
@@ -316,15 +343,15 @@ namespace WindowsFormsApp1
/// 검색할 테이블
/// 검색할 텍스트
/// 검색된 결과값이 반환됨.
- public string DB_Search(string DB_Table_Name,
+ public string DB_Search(string DB_Table_Name,
string DB_Where_Table = "", string DB_Search_Data = "",
string DB_Where_Table1 = "", string DB_Search_Data1 = "")
{
string cmd = "SELECT * FROM ";
cmd += DB_Table_Name;// + " where id=\"id\"";
- if(DB_Search_Data != "")
- {
- cmd += " WHERE "+ DB_Where_Table + "=\"" + DB_Search_Data +"\"";
+ if (DB_Search_Data != "")
+ {
+ cmd += " WHERE " + DB_Where_Table + "=\"" + DB_Search_Data + "\"";
}
if (DB_Where_Table1 != "" && DB_Search_Data1 != "")
{
@@ -341,18 +368,18 @@ namespace WindowsFormsApp1
///
/// 추출할 열의 이름."`num1`, `num2`" 이런식으로
///
- public string More_DB_Search(String DB_Table_Name, String[] DB_Where_Table,
+ public string More_DB_Search(String DB_Table_Name, String[] DB_Where_Table,
String[] DB_Search_Data, String Search_Table = "")
{
- if(DB_Where_Table.Length != DB_Search_Data.Length) { return "오류발생"; }
+ if (DB_Where_Table.Length != DB_Search_Data.Length) { return "오류발생"; }
string cmd = "SELECT ";
- if(Search_Table == "") { cmd += "*"; }
+ if (Search_Table == "") { cmd += "*"; }
else { cmd += Search_Table; }
cmd += " FROM " + DB_Table_Name + " WHERE ";
- for(int a = 0; a < DB_Where_Table.Length; a++)
+ for (int a = 0; a < DB_Where_Table.Length; a++)
{
cmd += "`" + DB_Where_Table[a] + "` = \"" + DB_Search_Data[a] + "\" ";
- if(a == DB_Where_Table.Length - 1) { cmd += ";"; }
+ if (a == DB_Where_Table.Length - 1) { cmd += ";"; }
else { cmd += " AND "; }
}
return cmd;
@@ -367,7 +394,7 @@ namespace WindowsFormsApp1
/// 끝낼 날짜 0000-00-00
/// 회사 인덱스 main.com_idx
///
- public string Search_Date(string Table_name, string Search_Table, string Search_date,
+ public string Search_Date(string Table_name, string Search_Table, string Search_date,
string start_date, string end_date, string compidx)
{
if (Search_Table == "") { Search_Table = "*"; }
@@ -375,7 +402,7 @@ namespace WindowsFormsApp1
string cmd = "SELECT " + Search_Table + " FROM `" + Table_name + "` " +
"WHERE `comp_num` = '" + compidx + "' AND `" +
Search_date + "` >= '" + start_date + "'";
- if(Table_name != "Obj_List") { cmd = cmd.Replace("`comp_num`", "`compidx`"); }
+ if (Table_name != "Obj_List") { cmd = cmd.Replace("`comp_num`", "`compidx`"); }
if (end_date != "") { cmd += " AND `" + Search_date + "` <= '" + end_date + "';"; }
else { cmd += ";"; }
return cmd;
@@ -383,13 +410,13 @@ namespace WindowsFormsApp1
public string DB_INSERT(String DB_Table_name, String[] DB_col_name, String[] setData)
{
string cmd = "INSERT INTO " + DB_Table_name + "(";
- for(int a = 0; a < DB_col_name.Length; a++)
+ for (int a = 0; a < DB_col_name.Length; a++)
{
if (a == DB_col_name.Length - 1) { cmd += "`" + DB_col_name[a] + "`) "; }
else { cmd += "`" + DB_col_name[a] + "`, "; }
}
cmd += "values(";
- for(int a = 0; a < setData.Length; a++)
+ for (int a = 0; a < setData.Length; a++)
{
setData[a] = setData[a].Replace("\"", "\"\"");
if (a == setData.Length - 1) { cmd += "\"" + setData[a] + "\")"; }
@@ -427,8 +454,8 @@ namespace WindowsFormsApp1
/// 삭제할 대상의 인덱스
/// 삭제할 대상이 있는 열명
/// 삭제할 대상
- public string DB_Delete(string DB_Table_Name,
- string target_idx, string comp_idx,
+ public string DB_Delete(string DB_Table_Name,
+ string target_idx, string comp_idx,
string target_area, string target)
{
string cmd = "DELETE FROM " + DB_Table_Name + " WHERE " +
@@ -444,12 +471,12 @@ namespace WindowsFormsApp1
/// 회사 인덱스
/// 삭제 대상의 컬럼명
/// 삭제 대상
- public string DB_Delete_No_Limit(string DB_Table,
- string target_idx, string comp_idx,
+ public string DB_Delete_No_Limit(string DB_Table,
+ string target_idx, string comp_idx,
string[] target_area, string[] target)
{
string cmd = string.Format("DELETE FROM {0} WHERE `{1}`= \"{2}\" AND", DB_Table, target_idx, comp_idx);
- for(int a= 0; a < target_area.Length; a++)
+ for (int a = 0; a < target_area.Length; a++)
{
cmd += string.Format("`{0}`=\"{1}\"", target_area[a], target[a]);
if (a != target_area.Length - 1) { cmd += " AND"; }
@@ -460,13 +487,13 @@ namespace WindowsFormsApp1
///
/// 대상 컬럼 삭제 / DELETE FROM "DB_Table_Name" WHERE "target_idx"="comp_idx" AND "target_area"="target";
///
- public string DB_Delete_More_term(string DB_Table_Name,
- string target_idx, string comp_idx,
+ public string DB_Delete_More_term(string DB_Table_Name,
+ string target_idx, string comp_idx,
string[] target_area, string[] target)
{
string cmd = "DELETE FROM " + DB_Table_Name + " WHERE " +
"`" + target_idx + "`=\"" + comp_idx + "\" AND";
- for(int a = 0; a < target_area.Length; a++)
+ for (int a = 0; a < target_area.Length; a++)
{
cmd += " `" + target_area[a] + "`=\"" + target[a] + "\" ";
if (a == target_area.Length - 1) { cmd += "LIMIT 1;"; }
@@ -484,7 +511,7 @@ namespace WindowsFormsApp1
/// 검색할 데이터
public string DB_Update(string DB_Tabel_Name, string Edit_colum, string Edit_Name, string Search_Name, string Search_Data)
{
- string cmd = "UPDATE `" + DB_Tabel_Name + "` SET `" + Edit_colum + "`=\"" + Edit_Name + "\" WHERE `"+Search_Name+"`=\"" + Search_Data + "\";";
+ string cmd = "UPDATE `" + DB_Tabel_Name + "` SET `" + Edit_colum + "`=\"" + Edit_Name + "\" WHERE `" + Search_Name + "`=\"" + Search_Data + "\";";
cmd = cmd.Replace("|", "");
return cmd;
}
@@ -496,12 +523,12 @@ namespace WindowsFormsApp1
/// 바꿀 데이터값
/// 대상 테이블명
/// 대상 데이터값
- public string More_Update(String DB_Table_Name,
- String[] Edit_col, String[] Edit_name,
+ public string More_Update(String DB_Table_Name,
+ String[] Edit_col, String[] Edit_name,
String[] Search_col, String[] Search_Name, int limit = 0)
{
string cmd = "UPDATE `" + DB_Table_Name + "` SET ";
- for(int a = 0; a < Edit_col.Length; a++)
+ for (int a = 0; a < Edit_col.Length; a++)
{
Edit_name[a] = Edit_name[a].Replace("\"", "\"\"");
cmd += "`" + Edit_col[a] + "` = \"" + Edit_name[a] + "\"";
@@ -509,14 +536,14 @@ namespace WindowsFormsApp1
else { cmd += " "; }
}
cmd += "WHERE ";
- for(int a = 0; a < Search_col.Length; a++)
+ for (int a = 0; a < Search_col.Length; a++)
{
cmd += "`" + Search_col[a] + "` = \"" + Search_Name[a] + "\" ";
if (a != Search_col.Length - 1) { cmd += "AND "; }
}
- if(limit != 0) { cmd += string.Format("LIMIT {0}", limit); }
+ if (limit != 0) { cmd += string.Format("LIMIT {0}", limit); }
cmd += ";";
- cmd = cmd.Replace("|", "");
+ cmd = cmd.Replace("|", "");
return cmd;
}
///
@@ -572,9 +599,9 @@ namespace WindowsFormsApp1
}
}
}
- catch(Exception e)
+ catch (Exception e)
{
- MessageBox.Show("{0} Exception caught.\n"+ e.ToString());
+ MessageBox.Show("{0} Exception caught.\n" + e.ToString());
MessageBox.Show(cmd);
}
conn.Close();
diff --git a/unimarc/unimarc/UniMarc.csproj b/unimarc/unimarc/UniMarc.csproj
index 49409b9..51abe60 100644
--- a/unimarc/unimarc/UniMarc.csproj
+++ b/unimarc/unimarc/UniMarc.csproj
@@ -340,6 +340,7 @@
Check_Copy_Sub_Selector.cs
+
Form
diff --git a/unimarc/unimarc/UniMarc.csproj.user b/unimarc/unimarc/UniMarc.csproj.user
index f0d6d75..a66c462 100644
--- a/unimarc/unimarc/UniMarc.csproj.user
+++ b/unimarc/unimarc/UniMarc.csproj.user
@@ -9,7 +9,7 @@
ko-KR
false
- ShowAllFiles
+ ProjectFiles
false
diff --git a/unimarc/unimarc/마크/AddMarc.cs b/unimarc/unimarc/마크/AddMarc.cs
index 6bffb25..530f545 100644
--- a/unimarc/unimarc/마크/AddMarc.cs
+++ b/unimarc/unimarc/마크/AddMarc.cs
@@ -30,11 +30,7 @@ namespace UniMarc.마크
mUserName = m.User;
mCompidx = m.com_idx;
}
- public AddMarc()
- {
- InitializeComponent();
- }
-
+
private void AddMarc_Load(object sender, EventArgs e)
{
cb_SearchCol.SelectedIndex = 0;
diff --git a/unimarc/unimarc/마크/FillBlankItem.cs b/unimarc/unimarc/마크/FillBlankItem.cs
new file mode 100644
index 0000000..b6f1e21
--- /dev/null
+++ b/unimarc/unimarc/마크/FillBlankItem.cs
@@ -0,0 +1,19 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace ExcelTest
+{
+ public class FillBlankItem
+ {
+ public string Idx { get; set; }
+ public string Isbn { get; set; }
+ public string BookName { get; set; }
+ public string Author { get; set; }
+ public string Publisher { get; set; }
+ public string Price { get; set; }
+ public string BookMarc { get; set; } = ""; // Hidden column likely
+ }
+}
diff --git a/unimarc/unimarc/마크/Marc.cs b/unimarc/unimarc/마크/Marc.cs
index 3724c1d..be863d8 100644
--- a/unimarc/unimarc/마크/Marc.cs
+++ b/unimarc/unimarc/마크/Marc.cs
@@ -1574,17 +1574,16 @@ namespace ExcelTest
{
if (List_Book.Rows[a].DefaultCellStyle.ForeColor == Color.Red)
{
- string[] GridData =
+ var item = new ExcelTest.FillBlankItem
{
- 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(),
- ""
+ Idx = a.ToString(),
+ Isbn = List_Book.Rows[a].Cells["ISBN13"].Value.ToString(),
+ BookName = List_Book.Rows[a].Cells["book_name"].Value.ToString(),
+ Author = List_Book.Rows[a].Cells["author"].Value.ToString(),
+ Publisher = List_Book.Rows[a].Cells["book_comp"].Value.ToString(),
+ Price = List_Book.Rows[a].Cells["pay"].Value.ToString()
};
- fb.InitFillBlank(GridData);
+ fb.InitFillBlank(item);
}
}
fb.ISBN = ISBN;
diff --git a/unimarc/unimarc/마크/Marc2.cs b/unimarc/unimarc/마크/Marc2.cs
index 45c1562..2e05f21 100644
--- a/unimarc/unimarc/마크/Marc2.cs
+++ b/unimarc/unimarc/마크/Marc2.cs
@@ -52,17 +52,7 @@ namespace ExcelTest
string p_cust = "";
string p_name = "";
- public Marc2()
- {
- InitializeComponent();
- this.ml = null;
- mUserName = string.Empty;
- 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)
{
@@ -84,6 +74,7 @@ namespace ExcelTest
marcEditorControl1.FillBlankClicked += MarcEditorControl_FillBlankClicked;
marcEditorControl1.PrevButton += MarcEditorControl1_PrevButton;
marcEditorControl1.NextButton += MarcEditorControl1_NextButton;
+ marcEditorControl1.CloseButton += (s1, e1) => { this.Close(); };
}
string l_idx = string.Empty;
@@ -168,10 +159,10 @@ namespace ExcelTest
for (int a = 0; a < db_data.Length - 1; a += 11)
{
- MarcBookItem item = new MarcBookItem();
+ MarcBookItem item = new MarcBookItem();
item.ListIdx = db_data[a]; // 0: idx
item.ISBN13 = db_data[a + 1]; // 1: isbn
- item.Num= db_data[a + 2] + db_data[a + 3]; // 2: header + num
+ item.Num = db_data[a + 2] + db_data[a + 3]; // 2: header + num
item.BookName = db_data[a + 4]; // 3: book_num
item.Author = db_data[a + 5]; // 4: author
item.BookComp = db_data[a + 6]; // 5: book_comp
@@ -253,7 +244,8 @@ namespace ExcelTest
if (item != null) item.ForeColor = gradeColor;
List_Book.Rows[a].DefaultCellStyle.ForeColor = gradeColor;
- if (isMyData) {
+ if (isMyData)
+ {
Color saveColor = GetSaveDateColor(Chk_Arr[11]);
if (item != null) item.BackColor = saveColor;
List_Book.Rows[a].DefaultCellStyle.BackColor = saveColor;
@@ -263,7 +255,7 @@ namespace ExcelTest
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;
- if (item != null) item.BackColor = Color.LightGray;
+ if (item != null) item.BackColor = Color.LightGray;
}
}
}
@@ -697,17 +689,16 @@ namespace ExcelTest
{
if (List_Book.Rows[a].DefaultCellStyle.ForeColor == Color.Red)
{
- string[] GridData =
+ var item = new ExcelTest.FillBlankItem
{
- 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() ?? "",
- ""
+ Idx = a.ToString(),
+ Isbn = List_Book.Rows[a].Cells["ISBN13"].Value?.ToString() ?? "",
+ BookName = List_Book.Rows[a].Cells["book_name"].Value?.ToString() ?? "",
+ Author = List_Book.Rows[a].Cells["author"].Value?.ToString() ?? "",
+ Publisher = List_Book.Rows[a].Cells["book_comp"].Value?.ToString() ?? "",
+ Price = List_Book.Rows[a].Cells["pay"].Value?.ToString() ?? ""
};
- fb.InitFillBlank(GridData);
+ fb.InitFillBlank(item);
}
}
fb.ISBN = ISBN;
@@ -716,7 +707,7 @@ namespace ExcelTest
String_Text st = new String_Text();
if (fb.BulkMarcResults.Count > 0)
{
- foreach(var kvp in fb.BulkMarcResults)
+ foreach (var kvp in fb.BulkMarcResults)
{
// Use list_idx to find row? Or assume key matches?
// Marc_FillBlank used 'idx' from 'List_idx' column.
@@ -725,16 +716,16 @@ namespace ExcelTest
// Key = List_idx.
int targetListIdx = kvp.Key;
// Find row with this list_idx
- foreach(DataGridViewRow r in List_Book.Rows)
+ foreach (DataGridViewRow r in List_Book.Rows)
{
- if(r.Cells["List_idx"].Value != null && Convert.ToInt32(r.Cells["List_idx"].Value) == targetListIdx)
+ if (r.Cells["List_idx"].Value != null && Convert.ToInt32(r.Cells["List_idx"].Value) == targetListIdx)
{
r.Cells["db_marc"].Value = kvp.Value;
// Update color etc?
r.DefaultCellStyle.ForeColor = Color.Blue;
// Need to update 'item' too if bound
var item = r.DataBoundItem as MarcBookItem;
- if(item != null) item.ForeColor = Color.Blue;
+ if (item != null) item.ForeColor = Color.Blue;
break;
}
}
@@ -743,7 +734,7 @@ namespace ExcelTest
else if (!string.IsNullOrEmpty(fb.SingleMarcResult))
{
// Update current Editor
- marcEditorControl1.SetMarcString(fb.SingleMarcResult);
+ marcEditorControl1.SetMarcString(fb.SingleMarcResult);
}
}
}
diff --git a/unimarc/unimarc/마크/MarcEditorControl.cs b/unimarc/unimarc/마크/MarcEditorControl.cs
index 25d84af..fd21b79 100644
--- a/unimarc/unimarc/마크/MarcEditorControl.cs
+++ b/unimarc/unimarc/마크/MarcEditorControl.cs
@@ -40,22 +40,12 @@ namespace ExcelTest
string l_idx = string.Empty;
string c_idx = string.Empty;
MacEditorParameter Param = null;
- //public string CurrentISBN13 { get; set; }
-
-
-
- //public string CurrentMarcIdx { get; set; }
-
- //public string CurrentUser { get; set; }
- //public string CurrentSaveDate { get; set; }
- //public string CurrentListIdx { get; set; }
-
public event EventHandler FillBlankClicked;
-
public event EventHandler PrevButton;
public event EventHandler NextButton;
-
+ public event EventHandler CloseButton;
+
public MarcEditorControl()
{
InitializeComponent();
@@ -274,11 +264,24 @@ namespace ExcelTest
memo.Location = new Point(1018, 8);
memo.Show();
}
+ public void SetMarcString(string text)
+ {
+ richTextBox1.Text = text;
+ // Sync with internal data structures (008, etc)
+ //string orimarc = st.made_Ori_marc(richTextBox1).Replace(@"\", "₩");
+ //LoadMarc(orimarc);
+ }
+
private void Btn_preview_Click(object sender, EventArgs e)
{
- Marc_Preview mp = new Marc_Preview();
+ var mp = new Marc_Preview();
mp.isbn = Param.ISBN13;
mp.richTextBox1.Text = richTextBox1.Text;
+ mp.ButtonSave += (s, ev) =>
+ {
+ SetMarcString(ev);
+ btn_Reflesh008_Click(this, null);
+ };
mp.Show();
}
public class BookSavedEventArgs : EventArgs
@@ -659,7 +662,7 @@ namespace ExcelTest
///
/// 해당 데이터의 row값
///
- bool LoadMarc(string Marc_data)
+ public bool LoadMarc(string Marc_data)
{
// Removed accessing List_Book
// string Marc_data = List_Book.Rows[row].Cells["db_marc"].Value.ToString();
@@ -1069,15 +1072,15 @@ namespace ExcelTest
richTextBox1.Text = richTextBox1.Text.Replace(data008, text);
data008 = text;
}
- public void SetMarcString(string marcstr)
- {
- this.richTextBox1.Text = marcstr;
- }
+ //public void SetMarcString(string marcstr)
+ //{
+ // this.richTextBox1.Text = marcstr;
+ //}
#endregion
private void Btn_Close_Click(object sender, EventArgs e)
{
-
+ CloseButton?.Invoke(this, EventArgs.Empty);
}
private void pictureBox1_DoubleClick(object sender, EventArgs e)
diff --git a/unimarc/unimarc/마크/MarcPlanItem.cs b/unimarc/unimarc/마크/MarcPlanItem.cs
index 0ff3016..ea2f6d3 100644
--- a/unimarc/unimarc/마크/MarcPlanItem.cs
+++ b/unimarc/unimarc/마크/MarcPlanItem.cs
@@ -2,15 +2,38 @@ using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
+using System.Threading.Tasks;
-namespace UniMarc.마크
+namespace WindowsFormsApp1.Mac
{
public class MarcPlanItem
{
public string Idx { get; set; }
+ public string Num { get; set; }
+ public string RegNum { get; set; }
+ public string ClassCode { get; set; }
+ public string AuthorCode { get; set; }
+ public string Volume { get; set; }
+ public string Copy { get; set; }
+ public string Prefix { get; set; }
+ public string Gu { get; set; }
+ public string Isbn { get; set; }
+ public string BookName { get; set; }
+ public string SBookName1 { get; set; }
+ public string SBookNum1 { get; set; }
+ public string SBookName2 { get; set; }
+ public string SBookNum2 { get; set; }
+ public string Author { get; set; }
+ public string BookComp { get; set; }
+ public string Price { get; set; }
+ public string Midx { get; set; }
+ public string Marc { get; set; }
+ public string SearchTag2 { get; set; }
+ public string ColCheck { get; set; } = "F";
+
+ // Properties used in SelectList specific loading (if needed, or mapped to above)
public string ListName { get; set; }
public string Date { get; set; }
public string User { get; set; }
- public string ColCheck { get; set; } = "F";
}
}
diff --git a/unimarc/unimarc/마크/Marc_FillBlank.Designer.cs b/unimarc/unimarc/마크/Marc_FillBlank.Designer.cs
index 9efa10f..0392fbe 100644
--- a/unimarc/unimarc/마크/Marc_FillBlank.Designer.cs
+++ b/unimarc/unimarc/마크/Marc_FillBlank.Designer.cs
@@ -29,6 +29,8 @@ namespace UniMarc
///
private void InitializeComponent()
{
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc_FillBlank));
this.panel6 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
@@ -53,6 +55,19 @@ namespace UniMarc
this.Price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.BookMarc = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel2 = new System.Windows.Forms.Panel();
+ this.bs1 = new System.Windows.Forms.BindingSource(this.components);
+ this.bn1 = new System.Windows.Forms.BindingNavigator(this.components);
+ this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
+ this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
+ this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
+ this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.panel6.SuspendLayout();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
@@ -60,6 +75,9 @@ namespace UniMarc
this.panel5.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel2.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.bs1)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.bn1)).BeginInit();
+ this.bn1.SuspendLayout();
this.SuspendLayout();
//
// panel6
@@ -206,6 +224,7 @@ namespace UniMarc
// panel5
//
this.panel5.Controls.Add(this.dataGridView1);
+ this.panel5.Controls.Add(this.bn1);
this.panel5.Dock = System.Windows.Forms.DockStyle.Left;
this.panel5.Location = new System.Drawing.Point(0, 0);
this.panel5.Name = "panel5";
@@ -230,7 +249,7 @@ namespace UniMarc
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
this.dataGridView1.RowTemplate.Height = 23;
- this.dataGridView1.Size = new System.Drawing.Size(531, 702);
+ this.dataGridView1.Size = new System.Drawing.Size(531, 677);
this.dataGridView1.TabIndex = 0;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
//
@@ -293,6 +312,122 @@ namespace UniMarc
this.panel2.Size = new System.Drawing.Size(1316, 733);
this.panel2.TabIndex = 311;
//
+ // bn1
+ //
+ this.bn1.AddNewItem = this.bindingNavigatorAddNewItem;
+ this.bn1.BindingSource = this.bs1;
+ this.bn1.CountItem = this.bindingNavigatorCountItem;
+ this.bn1.DeleteItem = this.bindingNavigatorDeleteItem;
+ this.bn1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bn1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.bindingNavigatorMoveFirstItem,
+ this.bindingNavigatorMovePreviousItem,
+ this.bindingNavigatorSeparator,
+ this.bindingNavigatorPositionItem,
+ this.bindingNavigatorCountItem,
+ this.bindingNavigatorSeparator1,
+ this.bindingNavigatorMoveNextItem,
+ this.bindingNavigatorMoveLastItem,
+ this.bindingNavigatorSeparator2,
+ this.bindingNavigatorAddNewItem,
+ this.bindingNavigatorDeleteItem});
+ this.bn1.Location = new System.Drawing.Point(0, 677);
+ this.bn1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
+ this.bn1.MoveLastItem = this.bindingNavigatorMoveLastItem;
+ this.bn1.MoveNextItem = this.bindingNavigatorMoveNextItem;
+ this.bn1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
+ this.bn1.Name = "bn1";
+ this.bn1.PositionItem = this.bindingNavigatorPositionItem;
+ this.bn1.Size = new System.Drawing.Size(531, 25);
+ this.bn1.TabIndex = 312;
+ this.bn1.Text = "bindingNavigator1";
+ //
+ // bindingNavigatorAddNewItem
+ //
+ this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
+ this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
+ this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
+ this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22);
+ this.bindingNavigatorAddNewItem.Text = "새로 추가";
+ //
+ // bindingNavigatorCountItem
+ //
+ this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
+ this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
+ this.bindingNavigatorCountItem.Text = "/{0}";
+ this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
+ //
+ // bindingNavigatorDeleteItem
+ //
+ this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
+ this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
+ this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
+ this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22);
+ this.bindingNavigatorDeleteItem.Text = "삭제";
+ //
+ // bindingNavigatorMoveFirstItem
+ //
+ this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
+ this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
+ this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
+ this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 22);
+ this.bindingNavigatorMoveFirstItem.Text = "처음으로 이동";
+ //
+ // bindingNavigatorMovePreviousItem
+ //
+ this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
+ this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
+ this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
+ this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22);
+ this.bindingNavigatorMovePreviousItem.Text = "이전으로 이동";
+ //
+ // bindingNavigatorSeparator
+ //
+ this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
+ this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25);
+ //
+ // bindingNavigatorPositionItem
+ //
+ this.bindingNavigatorPositionItem.AccessibleName = "위치";
+ this.bindingNavigatorPositionItem.AutoSize = false;
+ this.bindingNavigatorPositionItem.Font = new System.Drawing.Font("맑은 고딕", 9F);
+ this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
+ this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
+ this.bindingNavigatorPositionItem.Text = "0";
+ this.bindingNavigatorPositionItem.ToolTipText = "현재 위치";
+ //
+ // bindingNavigatorSeparator1
+ //
+ this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
+ this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25);
+ //
+ // bindingNavigatorMoveNextItem
+ //
+ this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
+ this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
+ this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
+ this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 22);
+ this.bindingNavigatorMoveNextItem.Text = "다음으로 이동";
+ //
+ // bindingNavigatorMoveLastItem
+ //
+ this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
+ this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
+ this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
+ this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22);
+ this.bindingNavigatorMoveLastItem.Text = "마지막으로 이동";
+ //
+ // bindingNavigatorSeparator2
+ //
+ this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
+ this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
+ //
// Marc_FillBlank
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -309,8 +444,13 @@ namespace UniMarc
this.panel4.ResumeLayout(false);
this.panel7.ResumeLayout(false);
this.panel5.ResumeLayout(false);
+ this.panel5.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel2.ResumeLayout(false);
+ ((System.ComponentModel.ISupportInitialize)(this.bs1)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.bn1)).EndInit();
+ this.bn1.ResumeLayout(false);
+ this.bn1.PerformLayout();
this.ResumeLayout(false);
}
@@ -341,5 +481,18 @@ namespace UniMarc
private System.Windows.Forms.DataGridViewTextBoxColumn BookComp;
private System.Windows.Forms.DataGridViewTextBoxColumn Price;
private System.Windows.Forms.DataGridViewTextBoxColumn BookMarc;
+ private System.Windows.Forms.BindingNavigator bn1;
+ private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
+ private System.Windows.Forms.BindingSource bs1;
+ private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
+ private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem;
+ private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
+ private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
+ private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
+ private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem;
+ private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1;
+ private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
+ private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
+ private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
}
}
\ No newline at end of file
diff --git a/unimarc/unimarc/마크/Marc_FillBlank.cs b/unimarc/unimarc/마크/Marc_FillBlank.cs
index 185c4b4..92ffc70 100644
--- a/unimarc/unimarc/마크/Marc_FillBlank.cs
+++ b/unimarc/unimarc/마크/Marc_FillBlank.cs
@@ -20,10 +20,30 @@ namespace UniMarc
public Dictionary BulkMarcResults { get; private set; } = new Dictionary();
bool isAll;
bool isBreak;
+ List _items = new List();
public Marc_FillBlank()
{
InitializeComponent();
+ bs1.DataSource = _items;
+ dataGridView1.AutoGenerateColumns = false;
+ dataGridView1.DataSource = bs1;
+
+ // Map columns manually if not done in designer, but assuming designer has columns
+ // We need to map DataPropertyName.
+ if (dataGridView1.Columns["List_idx"] != null) dataGridView1.Columns["List_idx"].DataPropertyName = "Idx";
+ if (dataGridView1.Columns["ISBN13"] != null) dataGridView1.Columns["ISBN13"].DataPropertyName = "Isbn";
+ if (dataGridView1.Columns["BookName"] != null) dataGridView1.Columns["BookName"].DataPropertyName = "BookName";
+ // Check other column names?
+ // "BookMarc" was accessed by name.
+ if (dataGridView1.Columns["BookMarc"] != null) dataGridView1.Columns["BookMarc"].DataPropertyName = "BookMarc";
+ // Author, Publisher, Price?
+ // InitFillBlank accepts: [3]저자 [4]출판사 [5]가격
+ // We should guess column names if not visible or just assume they are bound if user set them up or I set them.
+ // Let's assume standard names or index binding is replaced by name binding.
+ // But wait, user said "bs1 is pre-made" (meaning in designer possibly?). If so, I shouldn't 'new' it if it's protected?
+ // "bs1은 미리 만들어뒀어" implies I might access it.
+ // In my previous step I saw NO bs1 in the file. So I adding it is safe if I make it matching.
}
private void Marc_FillBlank_Load(object sender, EventArgs e)
@@ -55,10 +75,11 @@ namespace UniMarc
///
/// 옆 그리드에 채울 정보를 입력
///
- /// [0]idx [1]ISBN [2]도서명 [3]저자 [4]출판사 [5]가격
- public void InitFillBlank(string[] GridData)
+ /// FillBlankItem 객체
+ public void InitFillBlank(FillBlankItem item)
{
- dataGridView1.Rows.Add(GridData);
+ _items.Add(item);
+ bs1.ResetBindings(false);
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
@@ -181,13 +202,15 @@ namespace UniMarc
else
{
String_Text st = new String_Text();
- for (int a = 0; a < dataGridView1.Rows.Count; a++)
+ for (int a = 0; a < bs1.Count; a++)
{
- string isbn = dataGridView1.Rows[a].Cells["ISBN13"].Value.ToString();
+ var item = (FillBlankItem)bs1.List[a];
+ string isbn = item.Isbn;
if (tb_URL.Text.Contains(isbn))
{
- dataGridView1.Rows[a].Cells["BookMarc"].Value = SplitText(Text);
+ item.BookMarc = SplitText(Text);
+ bs1.ResetBindings(false); // Update grid view
isBreak = true;
}
}
@@ -260,28 +283,22 @@ namespace UniMarc
isAll = true;
BulkMarcResults.Clear();
- for (int a = 0; a < dataGridView1.Rows.Count; a++)
+ for (int a = 0; a < bs1.Count; a++)
{
- for (int b = 0; b < dataGridView1.RowCount; b++)
- {
- dataGridView1.Rows[b].DefaultCellStyle.BackColor = Color.White;
- }
- isBreak = false;
+ // Highlight row logic - might need direct grid access for style
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Yellow;
- // Assuming List_idx is stored as a cell value? Or should we trust the 'a' index?
- // The original code used "List_idx" cell.
- int idx = -1;
- if (dataGridView1.Rows[a].Cells["List_idx"].Value != null)
- idx = Convert.ToInt32(dataGridView1.Rows[a].Cells["List_idx"].Value.ToString());
- else
- idx = Convert.ToInt32(dataGridView1.Rows[a].Cells[0].Value.ToString()); // Fallback to column 0 if List_idx not guaranteed
+
+ isBreak = false;
+
+ var item = (FillBlankItem)bs1.List[a];
+ int idx = int.Parse(item.Idx);
+ string isbn = item.Isbn;
- string isbn = dataGridView1.Rows[a].Cells["ISBN13"].Value.ToString();
-
- if (isbn == "")
+ if (string.IsNullOrEmpty(isbn))
{
dataGridView1.Rows[a].DefaultCellStyle.ForeColor = Color.Red;
progressBar1.Value += 1;
+ dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.White; // Reset bg
continue;
}
@@ -294,8 +311,8 @@ namespace UniMarc
Delay(300);
}
- string marc = dataGridView1.Rows[a].Cells["BookMarc"].Value.ToString();
- if (marc == "")
+ string marc = item.BookMarc;
+ if (string.IsNullOrEmpty(marc))
dataGridView1.Rows[a].DefaultCellStyle.ForeColor = Color.Red;
else
{
@@ -304,7 +321,8 @@ namespace UniMarc
if (!BulkMarcResults.ContainsKey(idx))
BulkMarcResults.Add(idx, processedMarc);
}
-
+
+ dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.White;
progressBar1.Value += 1;
}
@@ -316,7 +334,6 @@ namespace UniMarc
string MakeMarc(string text)
{
string[] SplitLine = text.Split('\n');
-
string result = "";
foreach (string line in SplitLine)
{
@@ -358,7 +375,8 @@ namespace UniMarc
int row = e.RowIndex;
- richTextBox1.Text = dataGridView1.Rows[row].Cells["BookMarc"].Value.ToString();
+ var item = (FillBlankItem)bs1.Current;
+ richTextBox1.Text = item.BookMarc;
}
}
}
diff --git a/unimarc/unimarc/마크/Marc_FillBlank.resx b/unimarc/unimarc/마크/Marc_FillBlank.resx
index bcdea96..331cc7c 100644
--- a/unimarc/unimarc/마크/Marc_FillBlank.resx
+++ b/unimarc/unimarc/마크/Marc_FillBlank.resx
@@ -138,4 +138,75 @@
True
+
+ 663, 10
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wAAADsABataJCQAAAVdJREFUOE/Nz0tLAmEUBmB3kWRoCUVEISFUJGb1OywiKrDsIpZdkJAkDUvDQkij
+ UKSbVIvatKhNi9oERRAGEQXhjJdp7Hd83/eGs2jhLGQ20QtndTgP71Gp/m0KZ1XInlTjM6XG+4EG5fuK
+ yaTUIN8bIMUQ0gmtcuBtX/MLPMT0yoHnuA6kuA4iruI20lAZ+DiswWuyFum4Dk+7dbiP6kHEFVDBg+tQ
+ My4DLbjwG3DqbcORxygHXxJakGIQRFwDEf0gwjKI4AYtzIHmHaA5Oxg/CsYPIb7YIQced+qluvTLCyIs
+ gRYWQPNO0NwkWNYGxg+DcYNgGSu2Z0xy4C7SiJtwE66kuq049xlAs2Ng/AiS7nbszXci6jIh4jQjPGWR
+ A+U59hiluowbQMzVVfmgPKU/GdcPxlmx5TArB6KzJunf0gTtPcqBzeluhCYsCIz3wm/rUw78WX4AJCPY
+ nlwVm9EAAAAASUVORK5CYII=
+
+
+
+ 590, 10
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wAAADsABataJCQAAAWtJREFUOE+1kE0ow2Ecx/9X5a2UiwtKOSCTmJBMhuQlMo3IvCUHDouEXHZwIOVC
+ DrhIDiQl5USy07zNa2tKf2laaRf84/J8xBCetab4XL/f76fn+SnKX4DrGLqrwbHDzywkWJlHdJYjLEbY
+ Wg8q4eYKlma+d1hbgF4TotWIaC+FuYmAktcXCksx2HrknBOHX1KbiTDngrXhW0kMdSBM2TA5Io+/wuI0
+ oiz5TcRwB7hPYazfLx3rDz7+gCsXNBb4v1SdgajTQ19TaOMP2NtFmPSIilSo0v1y7FHBnAdZMWi6aO51
+ kVCTGZoEzzWYciA/Dl9bBZwfvh3XmxIJy7PBJdx5odnAQ2E87qJUfPbtzwGjVpxJEWjH+4ElPD/BYBsY
+ EjhKicW3sSoVb0vSUFsq0W6upUxhdxMtOxZnYhhqVz1oj3JJUZSdpCg0p0POmLKhJofjNqaDeikX3tFG
+ uuHsQM65cML4ABzY5fA/eQGKIwMcVjm2bAAAAABJRU5ErkJggg==
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wAAADsABataJCQAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+
+ +8H/4IZrWOXAIGPK0/8L933Aqii+5+H/pfv///evvoAhBwcJPU/+T9vyHkNRRPt9sObMWf//e5WewG1A
+ ZNej/72rP6AoCm29B9bcuu7/f//Ov/9d8g/gNiCw+eH/uvnv4IqCW+7+X7T3//+Odf//Z8z5+d+u7ud/
+ +4ztuA3wqLr/P3/aGxRFdsW3/6fP+f3fv+vbf53Cd/8tEtbjNsC+9O7/7MmvMRTpp5z/b1L04r9K1qf/
+ xpHLcBtgkXfnf2r/a6yKDJJO/JdN+/pfN3gehhwcGGbd/h/W8hKnIv3Uy/81fKdhlQMDnbQb//2qH+JV
+ pOIxAaccg1Pulf8gBXgVDUoAAPB2wKtYlLYeAAAAAElFTkSuQmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wAAADsABataJCQAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/8EN18gzIL7n4f+l+///96++QLoBEe33
+ wZozZ/3/71V6gjQDQlvvgTW3rvv/37/z73+X/APEGxDccvf/or3//3es+/8/Y87P/3Z1P//bZ2wn3gAQ
+ sCu+/T99zu///l3f/usUvvtvkbCeNANAQD/l/H+Tohf/VbI+/TeOXEa6ASBgkHTiv2za1/+6wfPIMwAE
+ 9FMv/9fwnUa+ASCg4jGBMgMGLwAA0BRgmCws/7cAAAAASUVORK5CYII=
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wAAADsABataJCQAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5
+ 8n/2vl//O7f+/e9Wepl0QyK7Hv2fsu3X/5Klf/8nTP/73yb3LGmGBDY//N+69j1Ys3HJl//S0df+G0cu
+ I94Qj6r7/0vmvoNrVnTpIV4zCNiX3v0f2PKMPM0gYJF3579NwRXyNIOAYdZt8jWDgE7aDfI1D00AAKB+
+ X6Bjq5qXAAAAAElFTkSuQmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wAAADsABataJCQAAAStJREFUOE9jYBhUoHDW8//oYjAAkmta8Px/5sTHONUw5M589j+h+x5WBSC5VUfe
+ /w9vf4BVHgwypjz9P2//7/8JXXcwFIHkFu778D+44RqGHBwk9Dz5P3vfr/+dW//+dyu9jKIQJDdty/v/
+ /tUXcBsQ2fXo/5Rtv/6XLP37P2H63/82uWfhikFyvas//PcqPYHbgMDmh/9b174HazYu+fJfOvraf+PI
+ ZWANILm6+e/+u+QfwG2AR9X9/yVz38E1K7r0wBWD5PKnvflvn7EdtwH2pXf/B7Y8w9AMk8ue/Pq/RcJ6
+ 3AZY5N35b1NwBUMzTC61/zXcS1iBYdZtrJpBACQX1vLyv27wPKzyYKCTdgOnJEjOr/rhfw3faTjV4AVO
+ uVf+q3hMAGN0uYEFAL7Rv7NmXVYYAAAAAElFTkSuQmCC
+
+
\ No newline at end of file
diff --git a/unimarc/unimarc/마크/Marc_Plan.Designer.cs b/unimarc/unimarc/마크/Marc_Plan.Designer.cs
index 672ccc6..9deeb98 100644
--- a/unimarc/unimarc/마크/Marc_Plan.Designer.cs
+++ b/unimarc/unimarc/마크/Marc_Plan.Designer.cs
@@ -28,14 +28,15 @@
///
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();
+ this.components = new System.ComponentModel.Container();
+ 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();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc_Plan));
this.panel1 = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
@@ -71,6 +72,7 @@
this.btn_ChangeColor = new System.Windows.Forms.Button();
this.tb_SearchChangeColor = new System.Windows.Forms.TextBox();
this.panel5 = new System.Windows.Forms.Panel();
+ this.chkEditorTest = new System.Windows.Forms.CheckBox();
this.cbTag008_32 = new System.Windows.Forms.ComboBox();
this.btnTag008 = new System.Windows.Forms.Button();
this.btnTag040 = new System.Windows.Forms.Button();
@@ -141,11 +143,20 @@
this.marc = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.search_tag2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.colCheck = new System.Windows.Forms.DataGridViewCheckBoxColumn();
- this.toolStrip1 = new System.Windows.Forms.ToolStrip();
+ this.bn1 = new System.Windows.Forms.BindingNavigator(this.components);
+ this.bs1 = new System.Windows.Forms.BindingSource(this.components);
+ this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
+ this.btDelete = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
+ this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
+ this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
+ this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
+ this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
- this.chkEditorTest = new System.Windows.Forms.CheckBox();
- this.toolStripButton1 = new System.Windows.Forms.ToolStripButton();
this.panel1.SuspendLayout();
this.panel4.SuspendLayout();
this.panel3.SuspendLayout();
@@ -154,7 +165,9 @@
this.panel6.SuspendLayout();
this.panel7.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
- this.toolStrip1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.bn1)).BeginInit();
+ this.bn1.SuspendLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.bs1)).BeginInit();
this.SuspendLayout();
//
// panel1
@@ -522,6 +535,18 @@
this.panel5.Size = new System.Drawing.Size(1730, 55);
this.panel5.TabIndex = 9;
//
+ // chkEditorTest
+ //
+ this.chkEditorTest.BackColor = System.Drawing.SystemColors.Control;
+ this.chkEditorTest.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
+ this.chkEditorTest.ForeColor = System.Drawing.Color.Blue;
+ this.chkEditorTest.Location = new System.Drawing.Point(596, 32);
+ this.chkEditorTest.Name = "chkEditorTest";
+ this.chkEditorTest.Size = new System.Drawing.Size(159, 27);
+ this.chkEditorTest.TabIndex = 53;
+ this.chkEditorTest.Text = "Editor (Old)";
+ this.chkEditorTest.UseVisualStyleBackColor = false;
+ //
// cbTag008_32
//
this.cbTag008_32.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -1012,7 +1037,7 @@
// panel7
//
this.panel7.Controls.Add(this.dataGridView1);
- this.panel7.Controls.Add(this.toolStrip1);
+ this.panel7.Controls.Add(this.bn1);
this.panel7.Controls.Add(this.checkBox1);
this.panel7.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel7.Location = new System.Drawing.Point(0, 90);
@@ -1027,14 +1052,14 @@
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
- dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
- dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.AppWorkspace;
- 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.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+ dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+ dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.AppWorkspace;
+ dataGridViewCellStyle9.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
+ dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
+ dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+ dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+ dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+ this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9;
this.dataGridView1.ColumnHeadersHeight = 25;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -1090,8 +1115,8 @@
//
// reg_num
//
- dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
- this.reg_num.DefaultCellStyle = dataGridViewCellStyle2;
+ dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+ this.reg_num.DefaultCellStyle = dataGridViewCellStyle10;
this.reg_num.FillWeight = 130.9363F;
this.reg_num.HeaderText = "등록번호";
this.reg_num.Name = "reg_num";
@@ -1099,8 +1124,8 @@
//
// class_code
//
- dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
- this.class_code.DefaultCellStyle = dataGridViewCellStyle3;
+ dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+ this.class_code.DefaultCellStyle = dataGridViewCellStyle11;
this.class_code.FillWeight = 76.41504F;
this.class_code.HeaderText = "분류";
this.class_code.Name = "class_code";
@@ -1108,8 +1133,8 @@
//
// author_code
//
- dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
- this.author_code.DefaultCellStyle = dataGridViewCellStyle4;
+ dataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+ this.author_code.DefaultCellStyle = dataGridViewCellStyle12;
this.author_code.FillWeight = 77.02635F;
this.author_code.HeaderText = "저자기호";
this.author_code.Name = "author_code";
@@ -1117,8 +1142,8 @@
//
// volume
//
- dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
- this.volume.DefaultCellStyle = dataGridViewCellStyle5;
+ dataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+ this.volume.DefaultCellStyle = dataGridViewCellStyle13;
this.volume.FillWeight = 38.80909F;
this.volume.HeaderText = "V";
this.volume.Name = "volume";
@@ -1127,8 +1152,8 @@
//
// copy
//
- dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
- this.copy.DefaultCellStyle = dataGridViewCellStyle6;
+ dataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+ this.copy.DefaultCellStyle = dataGridViewCellStyle14;
this.copy.FillWeight = 40.14827F;
this.copy.HeaderText = "C";
this.copy.Name = "copy";
@@ -1137,8 +1162,8 @@
//
// prefix
//
- dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
- this.prefix.DefaultCellStyle = dataGridViewCellStyle7;
+ dataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+ this.prefix.DefaultCellStyle = dataGridViewCellStyle15;
this.prefix.FillWeight = 41.51828F;
this.prefix.HeaderText = "F";
this.prefix.Name = "prefix";
@@ -1210,8 +1235,8 @@
//
// price
//
- dataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
- this.price.DefaultCellStyle = dataGridViewCellStyle8;
+ dataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(255)))));
+ this.price.DefaultCellStyle = dataGridViewCellStyle16;
this.price.FillWeight = 86.15041F;
this.price.HeaderText = "정가";
this.price.Name = "price";
@@ -1247,16 +1272,112 @@
this.colCheck.TrueValue = "T";
this.colCheck.Width = 27;
//
- // toolStrip1
+ // bn1
//
- this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom;
- this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
- this.toolStripButton1});
- this.toolStrip1.Location = new System.Drawing.Point(0, 738);
- this.toolStrip1.Name = "toolStrip1";
- this.toolStrip1.Size = new System.Drawing.Size(1730, 25);
- this.toolStrip1.TabIndex = 3;
- this.toolStrip1.Text = "toolStrip1";
+ this.bn1.AddNewItem = null;
+ this.bn1.BindingSource = this.bs1;
+ this.bn1.CountItem = this.bindingNavigatorCountItem;
+ this.bn1.DeleteItem = null;
+ this.bn1.Dock = System.Windows.Forms.DockStyle.Bottom;
+ this.bn1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
+ this.bindingNavigatorMoveFirstItem,
+ this.bindingNavigatorMovePreviousItem,
+ this.bindingNavigatorSeparator,
+ this.bindingNavigatorPositionItem,
+ this.bindingNavigatorCountItem,
+ this.bindingNavigatorSeparator1,
+ this.bindingNavigatorMoveNextItem,
+ this.bindingNavigatorMoveLastItem,
+ this.bindingNavigatorSeparator2,
+ this.btDelete});
+ this.bn1.Location = new System.Drawing.Point(0, 738);
+ this.bn1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
+ this.bn1.MoveLastItem = this.bindingNavigatorMoveLastItem;
+ this.bn1.MoveNextItem = this.bindingNavigatorMoveNextItem;
+ this.bn1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
+ this.bn1.Name = "bn1";
+ this.bn1.PositionItem = this.bindingNavigatorPositionItem;
+ this.bn1.Size = new System.Drawing.Size(1730, 25);
+ this.bn1.TabIndex = 12;
+ this.bn1.Text = "bindingNavigator1";
+ //
+ // bindingNavigatorCountItem
+ //
+ this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
+ this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
+ this.bindingNavigatorCountItem.Text = "/{0}";
+ this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
+ //
+ // btDelete
+ //
+ this.btDelete.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.btDelete.Image = ((System.Drawing.Image)(resources.GetObject("btDelete.Image")));
+ this.btDelete.Name = "btDelete";
+ this.btDelete.RightToLeftAutoMirrorImage = true;
+ this.btDelete.Size = new System.Drawing.Size(23, 22);
+ this.btDelete.Text = "삭제";
+ this.btDelete.Click += new System.EventHandler(this.bindingNavigatorDeleteItem_Click);
+ //
+ // bindingNavigatorMoveFirstItem
+ //
+ this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
+ this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
+ this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
+ this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 22);
+ this.bindingNavigatorMoveFirstItem.Text = "처음으로 이동";
+ //
+ // bindingNavigatorMovePreviousItem
+ //
+ this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
+ this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
+ this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
+ this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22);
+ this.bindingNavigatorMovePreviousItem.Text = "이전으로 이동";
+ //
+ // bindingNavigatorSeparator
+ //
+ this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
+ this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25);
+ //
+ // bindingNavigatorPositionItem
+ //
+ this.bindingNavigatorPositionItem.AccessibleName = "위치";
+ this.bindingNavigatorPositionItem.AutoSize = false;
+ this.bindingNavigatorPositionItem.Font = new System.Drawing.Font("맑은 고딕", 9F);
+ this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
+ this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
+ this.bindingNavigatorPositionItem.Text = "0";
+ this.bindingNavigatorPositionItem.ToolTipText = "현재 위치";
+ //
+ // bindingNavigatorSeparator1
+ //
+ this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
+ this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25);
+ //
+ // bindingNavigatorMoveNextItem
+ //
+ this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
+ this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
+ this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
+ this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 22);
+ this.bindingNavigatorMoveNextItem.Text = "다음으로 이동";
+ //
+ // bindingNavigatorMoveLastItem
+ //
+ this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
+ this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
+ this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
+ this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
+ this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22);
+ this.bindingNavigatorMoveLastItem.Text = "마지막으로 이동";
+ //
+ // bindingNavigatorSeparator2
+ //
+ this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
+ this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
//
// printDocument1
//
@@ -1273,29 +1394,6 @@
this.printPreviewDialog1.Name = "printPreviewDialog1";
this.printPreviewDialog1.Visible = false;
//
- // chkEditorTest
- //
- this.chkEditorTest.BackColor = System.Drawing.SystemColors.Control;
- this.chkEditorTest.Checked = true;
- this.chkEditorTest.CheckState = System.Windows.Forms.CheckState.Checked;
- this.chkEditorTest.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
- this.chkEditorTest.ForeColor = System.Drawing.Color.Blue;
- this.chkEditorTest.Location = new System.Drawing.Point(596, 32);
- this.chkEditorTest.Name = "chkEditorTest";
- this.chkEditorTest.Size = new System.Drawing.Size(106, 27);
- this.chkEditorTest.TabIndex = 53;
- this.chkEditorTest.Text = "Editor (OLD)";
- this.chkEditorTest.UseVisualStyleBackColor = false;
- //
- // toolStripButton1
- //
- this.toolStripButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripButton1.Image")));
- this.toolStripButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
- this.toolStripButton1.Name = "toolStripButton1";
- this.toolStripButton1.Size = new System.Drawing.Size(59, 22);
- this.toolStripButton1.Text = "delete";
- this.toolStripButton1.Click += new System.EventHandler(this.toolStripButton1_Click);
- //
// Marc_Plan
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -1322,8 +1420,10 @@
this.panel7.ResumeLayout(false);
this.panel7.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
- this.toolStrip1.ResumeLayout(false);
- this.toolStrip1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.bn1)).EndInit();
+ this.bn1.ResumeLayout(false);
+ this.bn1.PerformLayout();
+ ((System.ComponentModel.ISupportInitialize)(this.bs1)).EndInit();
this.ResumeLayout(false);
}
@@ -1437,9 +1537,19 @@
private System.Windows.Forms.DataGridViewTextBoxColumn marc;
private System.Windows.Forms.DataGridViewTextBoxColumn search_tag2;
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
- private System.Windows.Forms.ToolStrip toolStrip1;
- private System.Windows.Forms.ToolStripButton toolStripButton1;
private System.Windows.Forms.ComboBox cb_authorTypeE;
private System.Windows.Forms.CheckBox chkEditorTest;
+ private System.Windows.Forms.BindingNavigator bn1;
+ private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
+ private System.Windows.Forms.ToolStripButton btDelete;
+ private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
+ private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
+ private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
+ private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem;
+ private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1;
+ private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
+ private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
+ private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
+ private System.Windows.Forms.BindingSource bs1;
}
}
\ No newline at end of file
diff --git a/unimarc/unimarc/마크/Marc_Plan.cs b/unimarc/unimarc/마크/Marc_Plan.cs
index 9121a9f..2156211 100644
--- a/unimarc/unimarc/마크/Marc_Plan.cs
+++ b/unimarc/unimarc/마크/Marc_Plan.cs
@@ -29,7 +29,43 @@ namespace WindowsFormsApp1.Mac
{
InitializeComponent();
main = _main;
- this.toolStrip1.Visible = System.Diagnostics.Debugger.IsAttached;
+ this.btDelete.Visible = System.Diagnostics.Debugger.IsAttached;
+
+ // Configure Binding
+ dataGridView1.AutoGenerateColumns = false;
+ // Map columns
+ dataGridView1.Columns["idx"].DataPropertyName = "Idx";
+ dataGridView1.Columns["num"].DataPropertyName = "Num";
+ dataGridView1.Columns["reg_num"].DataPropertyName = "RegNum";
+ dataGridView1.Columns["class_code"].DataPropertyName = "ClassCode";
+ dataGridView1.Columns["author_code"].DataPropertyName = "AuthorCode";
+ dataGridView1.Columns["volume"].DataPropertyName = "Volume";
+ dataGridView1.Columns["copy"].DataPropertyName = "Copy";
+ dataGridView1.Columns["prefix"].DataPropertyName = "Prefix";
+ dataGridView1.Columns["gu"].DataPropertyName = "Gu";
+ dataGridView1.Columns["ISBN"].DataPropertyName = "Isbn";
+ dataGridView1.Columns["book_name"].DataPropertyName = "BookName";
+ dataGridView1.Columns["s_book_name1"].DataPropertyName = "SBookName1";
+ dataGridView1.Columns["s_book_num1"].DataPropertyName = "SBookNum1";
+ dataGridView1.Columns["s_book_name2"].DataPropertyName = "SBookName2";
+ dataGridView1.Columns["s_book_num2"].DataPropertyName = "SBookNum2";
+ dataGridView1.Columns["author"].DataPropertyName = "Author";
+ dataGridView1.Columns["book_comp"].DataPropertyName = "BookComp";
+ dataGridView1.Columns["price"].DataPropertyName = "Price";
+ dataGridView1.Columns["midx"].DataPropertyName = "Midx";
+ dataGridView1.Columns["marc"].DataPropertyName = "Marc";
+ dataGridView1.Columns["search_tag2"].DataPropertyName = "SearchTag2";
+ dataGridView1.Columns["colCheck"].DataPropertyName = "ColCheck";
+ // CheckBox column value mapping is usually handled automatically for True/False value types if configured,
+ // but since we using string "T"/"F", we might need cell formatting or just stick to using a helper property if grid supports it.
+ // The existing code uses "T"/"F". The DataGridViewCheckBoxColumn TrueValue/FalseValue defaults are usually bool.
+ // I should set TrueValue/FalseValue for the column to "T"/"F" in Designer or code.
+ // Assuming default is bool, let's try to stick to logic.
+ ((DataGridViewCheckBoxColumn)dataGridView1.Columns["colCheck"]).TrueValue = "T";
+ ((DataGridViewCheckBoxColumn)dataGridView1.Columns["colCheck"]).FalseValue = "F";
+
+ this.bs1.DataSource = typeof(MarcPlanItem);
+ this.dataGridView1.DataSource = this.bs1;
}
private void Marc_Plan_Load(object sender, EventArgs e)
@@ -66,13 +102,10 @@ namespace WindowsFormsApp1.Mac
sub.TopMost = true;
if (sub.ShowDialog() == DialogResult.OK)
{
- if (sub.ResultFileRows != null && sub.ResultFileRows.Count > 0)
+ //데이터가 있다면?
+ if (sub.ResultItems != null && sub.ResultItems.Any())
{
- this.dataGridView1.Rows.Clear();
- foreach (var row in sub.ResultFileRows)
- {
- this.dataGridView1.Rows.Add(row);
- }
+ bs1.DataSource = sub.ResultItems;
}
else if (!string.IsNullOrEmpty(sub.ResultIdx))
{
@@ -85,7 +118,7 @@ namespace WindowsFormsApp1.Mac
#region SelectList_Sub
- public void mk_Grid(string ListName, string date, string[] Grid)
+ public void mk_Grid(string ListName, string date)
{
btn_Select_List.Text = ListName;
this.date = date;
@@ -114,74 +147,69 @@ namespace WindowsFormsApp1.Mac
string[] Search_col = { "work_list", "date" };
string[] Search_data = { ListName, date };
-
string cmd = db.More_DB_Search(Table, Search_col, Search_data, Area);
- string res = db.DB_Send_CMD_Search(cmd);
-
- string[] ary = res.Split('|');
+ var res = db.ExecuteQueryData(cmd); // Assumed called above
+ var list = new List();
int tCnt = 1;
- for (int a = 0; a < ary.Length; a++)
+
+ foreach (DataRow dr in res.Rows)
{
- if (a % 16 == 00) { Grid[00] = ary[a]; } // idx
- if (a % 16 == 01)
+ MarcPlanItem item = new MarcPlanItem();
+ item.Idx = dr["idx"].ToString();
+ item.Num = dr["num"].ToString();
+ if (string.IsNullOrEmpty(item.Num))
{
- Grid[01] = ary[a];
- if (ary[a] == "") Grid[02] = tCnt.ToString();
- tCnt++;
- } // num
- if (a % 16 == 02) { Grid[02] = ary[a]; } // r_num
- if (a % 16 == 03) { Grid[03] = ary[a]; } // class_symbol
- if (a % 16 == 04) { Grid[04] = ary[a]; } // author_symbol
- if (a % 16 == 05) { Grid[09] = ary[a]; } // ISBN
- if (a % 16 == 06) { Grid[10] = ary[a]; } // book_name
- if (a % 16 == 07) { Grid[11] = ary[a]; } // s_book_name1
- if (a % 16 == 08) { Grid[12] = ary[a]; } // s_book_num1
- if (a % 16 == 09) { Grid[13] = ary[a]; } // s_book_name2
- if (a % 16 == 10) { Grid[14] = ary[a]; } // s_book_num2
- if (a % 16 == 11) { Grid[15] = ary[a]; } // author
- if (a % 16 == 12) { Grid[16] = ary[a]; } // book_comp
- if (a % 16 == 13) { Grid[17] = ary[a]; } // price
- if (a % 16 == 14) { Grid[18] = ary[a]; } // midx
- if (a % 16 == 15)
- {
- Grid[19] = ary[a]; // marc
-
- string[] vcf = st.Take_Tag(ary[a], GetTag);
- Grid[5] = vcf[0];
- Grid[6] = vcf[1];
- Grid[7] = vcf[2];
-
- string[] ab = st.Take_Tag(ary[a], GetTag2);
- if (ab[0] != "")
- Grid[19] = Grid[19].Replace(ab[0], Grid[3]);
- if (ab[1] != "")
- Grid[19] = Grid[19].Replace(ab[1], Grid[4]);
-
- vcf = new string[] { "", "", "" };
- vcf[0] = string.Format("▼a{0}", Grid[3]);
- vcf[1] = string.Format("▼b{0}", Grid[4]);
- if (Grid[5] != "")
- vcf[2] = string.Format("▼c{0}", Grid[5]);
- string AddTag = string.Format("090\t \t{0}{1}{2}▲", vcf[0], vcf[1], vcf[2]);
- string TypeView = ConvertMarcType(Grid[19]);
- Grid[19] = st.made_Ori_marc(AddTagInMarc(AddTag, TypeView));
-
- dataGridView1.Rows.Add(Grid);
+ item.Num = tCnt.ToString();
}
- }
- }
- public void mk_Grid(string ListName, string date)
- {
- string[] grid = {
- "", "", "", "", "",
- "", "", "", "", "",
- "", "", "", "", "",
- "", "", "", "", "",
- "", "T", "", ""
- };
+ tCnt++;
- mk_Grid(ListName, date, grid);
+ item.RegNum = dr["r_num"].ToString();
+ item.ClassCode = dr["class_symbol"].ToString();
+ item.AuthorCode = dr["author_symbol"].ToString();
+ item.Isbn = dr["ISBN"].ToString();
+ item.BookName = dr["book_name"].ToString();
+ item.SBookName1 = dr["s_book_name1"].ToString();
+ item.SBookNum1 = dr["s_book_num1"].ToString();
+ item.SBookName2 = dr["s_book_name2"].ToString();
+ item.SBookNum2 = dr["s_book_num2"].ToString();
+ item.Author = dr["author"].ToString();
+ item.BookComp = dr["book_comp"].ToString();
+ item.Price = dr["price"].ToString();
+ item.Midx = dr["midx"].ToString();
+
+ string rawMarc = dr["marc"].ToString();
+
+ // Logic for MARC tag processing
+ string[] vcf = st.Take_Tag(rawMarc, GetTag);
+ item.Volume = vcf[0];
+ item.Copy = vcf[1];
+ item.Prefix = vcf[2];
+
+ string[] ab = st.Take_Tag(rawMarc, GetTag2);
+ if (ab[0] != "")
+ rawMarc = rawMarc.Replace(ab[0], item.ClassCode);
+ if (ab[1] != "")
+ rawMarc = rawMarc.Replace(ab[1], item.AuthorCode);
+
+ string[] vcf_marc = new string[] { "", "", "" };
+ vcf_marc[0] = string.Format("▼a{0}", item.ClassCode);
+ vcf_marc[1] = string.Format("▼b{0}", item.AuthorCode);
+ if (!string.IsNullOrEmpty(item.Volume))
+ vcf_marc[2] = string.Format("▼c{0}", item.Volume);
+
+ string AddTag = string.Format("090\t \t{0}{1}{2}▲", vcf_marc[0], vcf_marc[1], vcf_marc[2]);
+ string TypeView = ConvertMarcType(rawMarc);
+ item.Marc = st.made_Ori_marc(AddTagInMarc(AddTag, TypeView));
+
+ item.ColCheck = "F";
+
+ list.Add(item);
+ }
+ bs1.DataSource = list;
+
}
+
+
public void mk_Panel(string idx, string ListName, string date)
{
string Table = "Specs_List";
@@ -222,14 +250,26 @@ namespace WindowsFormsApp1.Mac
private (string marc, MacEditorParameter p) GetBookData(int row)
{
- string bookName = dataGridView1.Rows[row].Cells["book_name"].Value.ToString();
- string author = dataGridView1.Rows[row].Cells["author"].Value.ToString();
- string publisher = dataGridView1.Rows[row].Cells["book_comp"].Value.ToString();
- string price = dataGridView1.Rows[row].Cells["price"].Value.ToString();
- string isbn = dataGridView1.Rows[row].Cells["ISBN"].Value.ToString();
- string idx = dataGridView1.Rows[row].Cells["idx"].Value.ToString();
- string midx = dataGridView1.Rows[row].Cells["midx"].Value.ToString();
- string marc = dataGridView1.Rows[row].Cells["marc"].Value.ToString();
+ // Fallback or deprecated, ideally redirect to item based or remove if possible.
+ // BUT existing non-bound usage calls might exist? No, this is private and used in editor opening.
+ // Let's keep for safety but implement new one.
+ if (row >= 0 && row < bs1.Count)
+ {
+ return GetBookData((MarcPlanItem)bs1.List[row]);
+ }
+ return ("", new MacEditorParameter());
+ }
+
+ private (string marc, MacEditorParameter p) GetBookData(MarcPlanItem item)
+ {
+ string bookName = item.BookName;
+ string author = item.Author;
+ string publisher = item.BookComp;
+ string price = item.Price;
+ string isbn = item.Isbn;
+ string idx = item.Idx;
+ string midx = item.Midx;
+ string marc = item.Marc;
string cmd = string.Format("SELECT `user`, `editDate`, `etc1`, `etc2` FROM `Specs_Marc` WHERE `idx` = \"{0}\"", midx);
string res = db.DB_Send_CMD_Search(cmd);
@@ -270,7 +310,7 @@ namespace WindowsFormsApp1.Mac
if (dataGridView1.Rows[row].Cells[col].ReadOnly)
{
- if (chkEditorTest.Checked == false)
+ if (chkEditorTest.Checked == true)
{
string[] Marc = {
dataGridView1.Rows[row].Cells["marc"].Value.ToString(),
@@ -292,77 +332,85 @@ namespace WindowsFormsApp1.Mac
}
else
{
- int currentEditorRow = row;
- string isbn = dataGridView1.Rows[row].Cells["ISBN"].Value.ToString();
- string marcData = dataGridView1.Rows[row].Cells["marc"].Value.ToString();
+ // Sync BindingSource position
+ bs1.Position = row;
+
+ var currentItem = (MarcPlanItem)bs1.Current;
+ string isbn = currentItem.Isbn;
+ string marcData = currentItem.Marc;
var f = new Marc_Plan_Sub_MarcEdit2(isbn, marcData);
- var data = GetBookData(currentEditorRow);
+ var data = GetBookData(currentItem);
f.LoadBook(data.marc, data.p);
f.RequestNext += (s, args) =>
{
- if (currentEditorRow < dataGridView1.RowCount - 1)
+ if (bs1.Position < bs1.Count - 1)
{
- currentEditorRow++;
- var nextData = GetBookData(currentEditorRow);
+ bs1.MoveNext();
+ var nextItem = (MarcPlanItem)bs1.Current;
+ var nextData = GetBookData(nextItem);
f.LoadBook(nextData.marc, nextData.p);
- // Optional: Sync grid selection
- dataGridView1.ClearSelection();
- dataGridView1.Rows[currentEditorRow].Selected = true;
- // Ensure visible
- dataGridView1.FirstDisplayedScrollingRowIndex = currentEditorRow;
+ // Optional: Ensure visible
+ if (dataGridView1.CurrentRow != null)
+ dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.CurrentRow.Index;
}
};
f.RequestPrev += (s, args) =>
{
- if (currentEditorRow > 0)
+ if (bs1.Position > 0)
{
- currentEditorRow--;
- var prevData = GetBookData(currentEditorRow);
+ bs1.MovePrevious();
+ var prevItem = (MarcPlanItem)bs1.Current;
+ var prevData = GetBookData(prevItem);
f.LoadBook(prevData.marc, prevData.p);
- // Optional: Sync grid selection
- dataGridView1.ClearSelection();
- dataGridView1.Rows[currentEditorRow].Selected = true;
- // Ensure visible
- dataGridView1.FirstDisplayedScrollingRowIndex = currentEditorRow;
+ // Optional: Ensure visible
+ if (dataGridView1.CurrentRow != null)
+ dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.CurrentRow.Index;
}
};
f.BookUpdated += (s, args) =>
{
- dataGridView1.Rows[currentEditorRow].Cells["book_name"].Value = args.BookName;
- dataGridView1.Rows[currentEditorRow].Cells["marc"].Value = args.Marc;
+ var item = (MarcPlanItem)bs1.Current;
+ item.BookName = args.BookName;
+ item.Marc = args.Marc;
+ bs1.ResetCurrentItem(); // Refresh grid
};
f.RequestFillBlankData += (s, args) =>
{
- var dataList = new List();
- string currentIsbn = dataGridView1.Rows[currentEditorRow].Cells["ISBN"].Value.ToString();
+ var dataList = new List();
+ var currentBoundItem = (MarcPlanItem)bs1.Current;
- for (int a = 0; a < dataGridView1.Rows.Count; a++)
+ for (int a = 0; a < bs1.Count; a++)
{
// Criteria for "Fill Blank" candidates.
- // Original legacy logic used Red color. Here we check if db_marc (marc column) is empty or too short.
- string mData = dataGridView1.Rows[a].Cells["marc"].Value?.ToString() ?? "";
- if (mData.Length < 10) // Assuming usage of "Red" roughly equates to invalid/missing MARC
+ // Check if MARC is empty or short
+ var mItem = (MarcPlanItem)bs1.List[a];
+ string mData = mItem.Marc ?? "";
+ if (mData.Length < 10)
{
- string[] rowData = {
- a.ToString(),
- dataGridView1.Rows[a].Cells["ISBN"].Value?.ToString() ?? "",
- dataGridView1.Rows[a].Cells["book_name"].Value?.ToString() ?? "",
- dataGridView1.Rows[a].Cells["author"].Value?.ToString() ?? "",
- dataGridView1.Rows[a].Cells["book_comp"].Value?.ToString() ?? "",
- dataGridView1.Rows[a].Cells["price"].Value?.ToString() ?? "", // 'pay' in Marc2 might be 'price' here? Checked GetBookData: yes, price.
- ""
+ var item = new FillBlankItem
+ {
+ Idx = a.ToString(),
+ Isbn = mItem.Isbn ?? "",
+ BookName = mItem.BookName ?? "",
+ Author = mItem.Author ?? "",
+ Publisher = mItem.BookComp ?? "",
+ Price = mItem.Price ?? ""
};
- dataList.Add(rowData);
+ dataList.Add(item);
}
}
- f.OpenFillBlank(dataList, currentIsbn);
+ if(dataList.Any()==false)
+ {
+ UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
+ }
+ else f.OpenFillBlank(dataList, currentBoundItem.Isbn);
};
f.BulkBooksUpdated += (s, args) =>
@@ -372,14 +420,15 @@ namespace WindowsFormsApp1.Mac
int rowIdx = kvp.Key;
string newMarc = kvp.Value;
- // Ensure rowIdx is valid (it should be, as it came from 'a' loop index)
- if (rowIdx >= 0 && rowIdx < dataGridView1.Rows.Count)
+ // Ensure rowIdx is valid
+ if (rowIdx >= 0 && rowIdx < bs1.Count)
{
- dataGridView1.Rows[rowIdx].Cells["marc"].Value = newMarc;
- // Optional: Update color or status to indicate filled?
- // Legacy code updated color. Marc_Plan might not enforce color rules yet, but setting value is key.
+ var mItem = (MarcPlanItem)bs1.List[rowIdx];
+ mItem.Marc = newMarc;
+ // We might want to refresh specific rows or all, simpler to reset item or all
}
}
+ bs1.ResetBindings(false); // Refresh all to reflect changes
};
f.Show();
@@ -1556,6 +1605,11 @@ namespace WindowsFormsApp1.Mac
}
private void toolStripButton1_Click(object sender, EventArgs e)
+ {
+
+ }
+
+ private void bindingNavigatorDeleteItem_Click(object sender, EventArgs e)
{
// 범위 입력받기
string input = Microsoft.VisualBasic.Interaction.InputBox(
@@ -1598,10 +1652,10 @@ namespace WindowsFormsApp1.Mac
int startIndex = startRow - 1;
int endIndex = endRow - 1;
- // 범위가 그리드 범위를 벗어나는지 확인
- if (endIndex >= dataGridView1.Rows.Count)
+ // 범위가 데이터 범위를 벗어나는지 확인
+ if (endIndex >= bs1.Count)
{
- MessageBox.Show($"입력한 범위가 전체 행 수({dataGridView1.Rows.Count})를 초과합니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning);
+ MessageBox.Show($"입력한 범위가 전체 데이터 수({bs1.Count})를 초과합니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
@@ -1614,9 +1668,9 @@ namespace WindowsFormsApp1.Mac
// 뒤에서부터 삭제 (인덱스가 꼬이지 않도록)
for (int i = endIndex; i >= startIndex; i--)
{
- if (i < dataGridView1.Rows.Count && !dataGridView1.Rows[i].IsNewRow)
+ if (i < bs1.Count)
{
- dataGridView1.Rows.RemoveAt(i);
+ bs1.RemoveAt(i);
}
}
diff --git a/unimarc/unimarc/마크/Marc_Plan.resx b/unimarc/unimarc/마크/Marc_Plan.resx
index 3b86c08..73c0064 100644
--- a/unimarc/unimarc/마크/Marc_Plan.resx
+++ b/unimarc/unimarc/마크/Marc_Plan.resx
@@ -117,33 +117,76 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ 437, 11
+
True
-
- 300, 6
+
+ 437, 11
+
+
+ 517, 10
-
+
- iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
- YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
- YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
- /aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
- I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
- cX79DFKrHHD5d9D26hvicx4pABt2lpg10zYzU0zr7+e3xXGcrkEB2O2TNec9nJFwB3alZn5jZorfeDZh
- 6Q3g8s06BeCoKF4MRURoH1+BY2oNCbeb0TIclIYxOhzf8frTOuo7FxCbbVIAzpni0iceEc8vhzEwGkJD
- lx83ymxifejdKjRNk/8PWnyIyTQqAJek0jqHwfEVscu31baIu8+90sTE4nY025dQ2/5FIPpnXlzKuK8A
- HBUzHot52djqQ6HZhfR7IwK4mKpHtvEDMqvfCiQ6zaAAXM8x94aIWTNrLLG4kVUzgaTSPlzLtyJOZxbb
- 1wtfyg4Q+AfA3aZlButjSfxGcUJBk4g5tuP3haQKRKXcUQDOmbvNTpPOJeFFjordZmbWTNvMTHFUcpUC
- nOccAdABIDXXE1nzAAAAAElFTkSuQmCC
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wQAADsEBuJFr7QAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+
+ +8H/4IZrWOXAIGPK0/8L933Aqii+5+H/pfv///evvoAhBwcJPU/+T9vyHkNRRPt9sObMWf//e5WewG1A
+ ZNej/72rP6AoCm29B9bcuu7/f//Ov/9d8g/gNiCw+eH/uvnv4IqCW+7+X7T3//+Odf//Z8z5+d+u7ud/
+ +4ztuA3wqLr/P3/aGxRFdsW3/6fP+f3fv+vbf53Cd/8tEtbjNsC+9O7/7MmvMRTpp5z/b1L04r9K1qf/
+ xpHLcBtgkXfnf2r/a6yKDJJO/JdN+/pfN3gehhwcGGbd/h/W8hKnIv3Uy/81fKdhlQMDnbQb//2qH+JV
+ pOIxAaccg1Pulf8gBXgVDUoAAPB2wKtYlLYeAAAAAElFTkSuQmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wQAADsEBuJFr7QAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/8EN18gzIL7n4f+l+///96++QLoBEe33
+ wZozZ/3/71V6gjQDQlvvgTW3rvv/37/z73+X/APEGxDccvf/or3//3es+/8/Y87P/3Z1P//bZ2wn3gAQ
+ sCu+/T99zu///l3f/usUvvtvkbCeNANAQD/l/H+Tohf/VbI+/TeOXEa6ASBgkHTiv2za1/+6wfPIMwAE
+ 9FMv/9fwnUa+ASCg4jGBMgMGLwAA0BRgmCws/7cAAAAASUVORK5CYII=
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wQAADsEBuJFr7QAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5
+ 8n/2vl//O7f+/e9Wepl0QyK7Hv2fsu3X/5Klf/8nTP/73yb3LGmGBDY//N+69j1Ys3HJl//S0df+G0cu
+ I94Qj6r7/0vmvoNrVnTpIV4zCNiX3v0f2PKMPM0gYJF3579NwRXyNIOAYdZt8jWDgE7aDfI1D00AAKB+
+ X6Bjq5qXAAAAAElFTkSuQmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wQAADsEBuJFr7QAAAStJREFUOE9jYBhUoHDW8//oYjAAkmta8Px/5sTHONUw5M589j+h+x5WBSC5VUfe
+ /w9vf4BVHgwypjz9P2//7/8JXXcwFIHkFu778D+44RqGHBwk9Dz5P3vfr/+dW//+dyu9jKIQJDdty/v/
+ /tUXcBsQ2fXo/5Rtv/6XLP37P2H63/82uWfhikFyvas//PcqPYHbgMDmh/9b174HazYu+fJfOvraf+PI
+ ZWANILm6+e/+u+QfwG2AR9X9/yVz38E1K7r0wBWD5PKnvflvn7EdtwH2pXf/B7Y8w9AMk8ue/Pq/RcJ6
+ 3AZY5N35b1NwBUMzTC61/zXcS1iBYdZtrJpBACQX1vLyv27wPKzyYKCTdgOnJEjOr/rhfw3faTjV4AVO
+ uVf+q3hMAGN0uYEFAL7Rv7NmXVYYAAAAAElFTkSuQmCC
+
+
+
+
+ iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
+ wQAADsEBuJFr7QAAAWtJREFUOE+1kE0ow2Ecx/9X5a2UiwtKOSCTmJBMhuQlMo3IvCUHDouEXHZwIOVC
+ DrhIDiQl5USy07zNa2tKf2laaRf84/J8xBCetab4XL/f76fn+SnKX4DrGLqrwbHDzywkWJlHdJYjLEbY
+ Wg8q4eYKlma+d1hbgF4TotWIaC+FuYmAktcXCksx2HrknBOHX1KbiTDngrXhW0kMdSBM2TA5Io+/wuI0
+ oiz5TcRwB7hPYazfLx3rDz7+gCsXNBb4v1SdgajTQ19TaOMP2NtFmPSIilSo0v1y7FHBnAdZMWi6aO51
+ kVCTGZoEzzWYciA/Dl9bBZwfvh3XmxIJy7PBJdx5odnAQ2E87qJUfPbtzwGjVpxJEWjH+4ElPD/BYBsY
+ EjhKicW3sSoVb0vSUFsq0W6upUxhdxMtOxZnYhhqVz1oj3JJUZSdpCg0p0POmLKhJofjNqaDeikX3tFG
+ uuHsQM65cML4ABzY5fA/eQGKIwMcVjm2bAAAAABJRU5ErkJggg==
- 6, 7
+ 18, 17
- 138, 6
+ 193, 17
@@ -319,6 +362,6 @@
- 40
+ 84
\ No newline at end of file
diff --git a/unimarc/unimarc/마크/Marc_Plan_Sub_MarcEdit2.cs b/unimarc/unimarc/마크/Marc_Plan_Sub_MarcEdit2.cs
index bbf02a8..5134cfe 100644
--- a/unimarc/unimarc/마크/Marc_Plan_Sub_MarcEdit2.cs
+++ b/unimarc/unimarc/마크/Marc_Plan_Sub_MarcEdit2.cs
@@ -35,6 +35,7 @@ namespace UniMarc.마크
marcEditorControl1.BookSaved += MarcEditorControl_BookSaved;
marcEditorControl1.NextButton += MarcEditorControl1_NextButton;
marcEditorControl1.PrevButton += MarcEditorControl1_PrevButton;
+ marcEditorControl1.CloseButton += (s1, e1) => { this.Close(); };
marcEditorControl1.Dock = DockStyle.Fill;
this.StartPosition = FormStartPosition.CenterScreen;
this.Controls.Add(marcEditorControl1);
@@ -58,12 +59,12 @@ namespace UniMarc.마크
public event EventHandler RequestFillBlankData;
- public void OpenFillBlank(List gridData, string currentIsbn)
+ public void OpenFillBlank(List gridData, string currentIsbn)
{
var fb = new UniMarc.Marc_FillBlank();
- foreach (var rowData in gridData)
+ foreach (var item in gridData)
{
- fb.InitFillBlank(rowData);
+ fb.InitFillBlank(item);
}
fb.ISBN = currentIsbn;
diff --git a/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList.cs b/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList.cs
index 7b6cb47..67578ff 100644
--- a/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList.cs
+++ b/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList.cs
@@ -20,7 +20,7 @@ namespace UniMarc.마크
public string ResultIdx { get; private set; }
public string ResultListName { get; private set; }
public string ResultDate { get; private set; }
- public List ResultFileRows { get; private set; }
+ public List ResultItems { get; private set; }
public Marc_Plan_Sub_SelectList()
{
@@ -247,27 +247,27 @@ namespace UniMarc.마크
private void btn_OpenFile_Click(object sender, EventArgs e)
{
OpenFileDialog OpenFileDialog = new OpenFileDialog();
- if (OpenFileDialog.ShowDialog() == DialogResult.OK)
+ if (OpenFileDialog.ShowDialog() != DialogResult.OK) return;
+
+ var filePath = OpenFileDialog.FileName;
+
+ try
{
- if (OpenFileDialog.ShowDialog() == DialogResult.OK)
- {
- //mp.dataGridView1.Rows.Clear(); // Decoupled
- string filePath = OpenFileDialog.FileName;
- try
- {
- System.IO.StreamReader r = new System.IO.StreamReader(filePath, Encoding.Default);
- InputGridByFileData(r.ReadToEnd());
- r.Close();
- }
- catch (Exception ex)
- {
- MessageBox.Show(ex.ToString());
- }
- }
+ var filedata = System.IO.File.ReadAllText(filePath, System.Text.Encoding.Default);
+ InputGridByFileData(filedata);
+ DialogResult = DialogResult.OK;
+ }
+ catch (Exception ex)
+ {
+ MessageBox.Show(ex.ToString());
}
}
#region OpenFileSub
+ ///
+ /// 파일로부터 목록을 가져온다
+ ///
+ ///
void InputGridByFileData(string text)
{
String_Text st = new String_Text();
@@ -280,9 +280,8 @@ namespace UniMarc.마크
"049l", "090a", "090b", "049v", "049c", "049f",
// ISBN, 도서명, 총서명1, 총서번호1, 총서명2, 총서번호2, 출판사, 정가, 저자
"020a", "245a", "440a", "440v", "490a", "490v", "260b", "950b", "245d" };
+
string[] Search_Res = st.Take_Tag(grid[a], Search);
-
-
string[] Author_Search = { "100a", "110a", "111a" };
string[] Author_Res = st.Take_Tag(grid[a], Author_Search);
string author_Fin = Search_Res[14];
@@ -295,22 +294,41 @@ namespace UniMarc.마크
}
}
- string[] AddGrid = {
// idx, 연번, 등록번호, 분류, 저자기호
- "", "", Search_Res[0], Search_Res[1], Search_Res[2],
+ // "", "", Search_Res[0], Search_Res[1], Search_Res[2],
// 볼륨v, 복본c, 별치f, 구분, isbn
- Search_Res[3], Search_Res[4], Search_Res[5], "", Search_Res[6],
+ // Search_Res[3], Search_Res[4], Search_Res[5], "", Search_Res[6],
// 도서명, 총서명1, 총서번호1, 총서명1, 총서번호2
- Search_Res[7], Search_Res[8], Search_Res[9], Search_Res[10], Search_Res[11],
+ // Search_Res[7], Search_Res[8], Search_Res[9], Search_Res[10], Search_Res[11],
// 저자, 출판사, 정가, midx, 마크
- author_Fin, Search_Res[12], Search_Res[13], "", grid[a],
+ // author_Fin, Search_Res[12], Search_Res[13], "", grid[a],
// 검색태그
- "", "T" };
- if (ResultFileRows == null) ResultFileRows = new List();
- ResultFileRows.Add(AddGrid);
- //mp.dataGridView1.Rows.Add(AddGrid);
+ // "", "T"
+
+ var item = new MarcPlanItem
+ {
+ RegNum = Search_Res[0],
+ ClassCode = Search_Res[1],
+ AuthorCode = Search_Res[2],
+ Volume = Search_Res[3],
+ Copy = Search_Res[4],
+ Prefix = Search_Res[5],
+ Isbn = Search_Res[6],
+ BookName = Search_Res[7],
+ SBookName1 = Search_Res[8],
+ SBookNum1 = Search_Res[9],
+ SBookName2 = Search_Res[10],
+ SBookNum2 = Search_Res[11],
+ Author = author_Fin,
+ BookComp = Search_Res[12],
+ Price = Search_Res[13],
+ Marc = grid[a],
+ ColCheck = "T"
+ };
+
+ if (ResultItems == null) ResultItems = new List();
+ ResultItems.Add(item);
}
- this.DialogResult = DialogResult.OK;
}
#endregion
@@ -344,18 +362,11 @@ namespace UniMarc.마크
if (dataGridView1.Columns[col].Name == "colCheck")
return;
- string idx = dataGridView1.Rows[row].Cells["idx"].Value.ToString();
- string list_name = dataGridView1.Rows[row].Cells["list_name"].Value.ToString();
- string date = dataGridView1.Rows[row].Cells["date"].Value.ToString();
-
- ResultIdx = idx;
- ResultListName = list_name;
- ResultDate = date;
+ var drow = dataGridView1.Rows[row].DataBoundItem as MarcPlanItem;
+ ResultIdx = drow.Idx;//idx;
+ ResultListName = drow.ListName;// list_name;
+ ResultDate = drow.Date;//date;
this.DialogResult = DialogResult.OK;
-
- //mp.mk_Grid(list_name, date);
- //mp.mk_Panel(idx, list_name, date);
-
this.Close();
}
diff --git a/unimarc/unimarc/마크/Marc_Preview.Designer.cs b/unimarc/unimarc/마크/Marc_Preview.Designer.cs
index d55dd2d..f41636f 100644
--- a/unimarc/unimarc/마크/Marc_Preview.Designer.cs
+++ b/unimarc/unimarc/마크/Marc_Preview.Designer.cs
@@ -103,9 +103,9 @@ namespace UniMarc.마크
//
// btn_Search
//
- this.btn_Search.Location = new System.Drawing.Point(172, 12);
+ this.btn_Search.Location = new System.Drawing.Point(270, 7);
this.btn_Search.Name = "btn_Search";
- this.btn_Search.Size = new System.Drawing.Size(75, 23);
+ this.btn_Search.Size = new System.Drawing.Size(75, 31);
this.btn_Search.TabIndex = 0;
this.btn_Search.Text = "검 색";
this.btn_Search.UseVisualStyleBackColor = true;
@@ -113,9 +113,9 @@ namespace UniMarc.마크
//
// btn_Save
//
- this.btn_Save.Location = new System.Drawing.Point(253, 12);
+ this.btn_Save.Location = new System.Drawing.Point(351, 7);
this.btn_Save.Name = "btn_Save";
- this.btn_Save.Size = new System.Drawing.Size(75, 23);
+ this.btn_Save.Size = new System.Drawing.Size(75, 31);
this.btn_Save.TabIndex = 0;
this.btn_Save.Text = "마크 저장";
this.btn_Save.UseVisualStyleBackColor = true;
diff --git a/unimarc/unimarc/마크/Marc_Preview.cs b/unimarc/unimarc/마크/Marc_Preview.cs
index 0529755..d379b5e 100644
--- a/unimarc/unimarc/마크/Marc_Preview.cs
+++ b/unimarc/unimarc/마크/Marc_Preview.cs
@@ -14,9 +14,11 @@ namespace UniMarc.마크
public partial class Marc_Preview : Form
{
public string isbn;
- AddMarc am;
- Marc mac;
+ //AddMarc am;
+ //Marc mac;
+
+ public EventHandler ButtonSave;
public Marc_Preview()
{
InitializeComponent();
@@ -103,10 +105,11 @@ namespace UniMarc.마크
private void btn_Save_Click(object sender, EventArgs e)
{
- if (mac != null)
- mac.richTextBox1.Text = richTextBox1.Text;
- else if (am != null)
- am.richTextBox1.Text = richTextBox1.Text;
+ //if (mac != null)
+ // mac.richTextBox1.Text = richTextBox1.Text;
+ //else if (am != null)
+ // am.richTextBox1.Text = richTextBox1.Text;
+ ButtonSave?.Invoke(this, richTextBox1.Text);
}
///