diff --git a/unimarc/.vs/unimarc/v16/.suo b/unimarc/.vs/unimarc/v16/.suo index faa30a6..2567bf0 100644 Binary files a/unimarc/.vs/unimarc/v16/.suo and b/unimarc/.vs/unimarc/v16/.suo differ diff --git a/unimarc/unimarc/UniMarc.csproj b/unimarc/unimarc/UniMarc.csproj index 457481e..902cc11 100644 --- a/unimarc/unimarc/UniMarc.csproj +++ b/unimarc/unimarc/UniMarc.csproj @@ -96,6 +96,12 @@ True Reference.svcmap + + Form + + + MarcCopySelect.cs + Form @@ -188,11 +194,11 @@ Job_Order.cs - + Form - - Mac_Chack_Up.cs + + Mac_Check_Up.cs Form @@ -711,6 +717,9 @@ Work_Log.cs + + MarcCopySelect.cs + Marc_FillBlank.cs @@ -756,8 +765,8 @@ Job_Order.cs - - Mac_Chack_Up.cs + + Mac_Check_Up.cs Mac_List_Merge.cs diff --git a/unimarc/unimarc/bin/Debug/UniMarc.exe b/unimarc/unimarc/bin/Debug/UniMarc.exe index f184959..3abb17a 100644 Binary files a/unimarc/unimarc/bin/Debug/UniMarc.exe and b/unimarc/unimarc/bin/Debug/UniMarc.exe differ diff --git a/unimarc/unimarc/bin/Debug/UniMarc.pdb b/unimarc/unimarc/bin/Debug/UniMarc.pdb index d78ed51..391650b 100644 Binary files a/unimarc/unimarc/bin/Debug/UniMarc.pdb and b/unimarc/unimarc/bin/Debug/UniMarc.pdb differ diff --git a/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll b/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll index ea98989..6366dac 100644 Binary files a/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll and b/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll differ diff --git a/unimarc/unimarc/obj/Debug/Interop.SHDocVw.dll b/unimarc/unimarc/obj/Debug/Interop.SHDocVw.dll index 9559932..829324a 100644 Binary files a/unimarc/unimarc/obj/Debug/Interop.SHDocVw.dll and b/unimarc/unimarc/obj/Debug/Interop.SHDocVw.dll differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csproj.AssemblyReference.cache b/unimarc/unimarc/obj/Debug/UniMarc.csproj.AssemblyReference.cache index 83b6e0f..f5e894a 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.csproj.AssemblyReference.cache and b/unimarc/unimarc/obj/Debug/UniMarc.csproj.AssemblyReference.cache differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csproj.CoreCompileInputs.cache b/unimarc/unimarc/obj/Debug/UniMarc.csproj.CoreCompileInputs.cache index c7de5e7..06f4348 100644 --- a/unimarc/unimarc/obj/Debug/UniMarc.csproj.CoreCompileInputs.cache +++ b/unimarc/unimarc/obj/Debug/UniMarc.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -b7eebfc1802ee64e77975fa6be9507e86387e8be +c9a37397ce81171a999be7f243aae70c43742cd9 diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csproj.FileListAbsolute.txt b/unimarc/unimarc/obj/Debug/UniMarc.csproj.FileListAbsolute.txt index a6190a2..5cd8b57 100644 --- a/unimarc/unimarc/obj/Debug/UniMarc.csproj.FileListAbsolute.txt +++ b/unimarc/unimarc/obj/Debug/UniMarc.csproj.FileListAbsolute.txt @@ -131,3 +131,4 @@ C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\Interop.SHDocVw C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\UniMarc.마크.DLS_Manage.resources C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\UniMarc.Marc_FillBlank.resources C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\UniMarc.마크.Marc_Plan_Sub_SelectList_Morge.resources +C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\UniMarc.마크.MarcCopySelect.resources diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache b/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache index 4478408..b450fe9 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache and b/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csproj.ResolveComReference.cache b/unimarc/unimarc/obj/Debug/UniMarc.csproj.ResolveComReference.cache index 6ae33f9..2ba98c0 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.csproj.ResolveComReference.cache and b/unimarc/unimarc/obj/Debug/UniMarc.csproj.ResolveComReference.cache differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.exe b/unimarc/unimarc/obj/Debug/UniMarc.exe index f184959..3abb17a 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.exe and b/unimarc/unimarc/obj/Debug/UniMarc.exe differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.pdb b/unimarc/unimarc/obj/Debug/UniMarc.pdb index d78ed51..391650b 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.pdb and b/unimarc/unimarc/obj/Debug/UniMarc.pdb differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.마크.MarcCopySelect.resources b/unimarc/unimarc/obj/Debug/UniMarc.마크.MarcCopySelect.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/unimarc/unimarc/obj/Debug/UniMarc.마크.MarcCopySelect.resources differ diff --git a/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll b/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll index ea98989..6366dac 100644 Binary files a/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll and b/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll differ diff --git a/unimarc/unimarc/마크/Mac_Chack_Up.Designer.cs b/unimarc/unimarc/마크/Mac_Check_Up.Designer.cs similarity index 100% rename from unimarc/unimarc/마크/Mac_Chack_Up.Designer.cs rename to unimarc/unimarc/마크/Mac_Check_Up.Designer.cs diff --git a/unimarc/unimarc/마크/Mac_Chack_Up.cs b/unimarc/unimarc/마크/Mac_Check_Up.cs similarity index 100% rename from unimarc/unimarc/마크/Mac_Chack_Up.cs rename to unimarc/unimarc/마크/Mac_Check_Up.cs diff --git a/unimarc/unimarc/마크/Mac_Chack_Up.resx b/unimarc/unimarc/마크/Mac_Check_Up.resx similarity index 100% rename from unimarc/unimarc/마크/Mac_Chack_Up.resx rename to unimarc/unimarc/마크/Mac_Check_Up.resx diff --git a/unimarc/unimarc/마크/Marc.cs b/unimarc/unimarc/마크/Marc.cs index 5f1d3a5..b444de4 100644 --- a/unimarc/unimarc/마크/Marc.cs +++ b/unimarc/unimarc/마크/Marc.cs @@ -89,7 +89,7 @@ namespace ExcelTest public void input_list(string date, string value) { db.DBcon(); - string Area = "`idx`, `isbn_marc`, `header`, `num`, `book_name`, `author`, `book_comp`, `count`, `pay`, `image_url`"; + string Area = "`idx`, `isbn_marc`, `header`, `num`, `book_name`, `author`, `book_comp`, `count`, `pay`, `image_url`, `m_idx`"; string[] sear_tbl = { "date", "list_name" }; string[] sear_col = { date, value }; @@ -106,16 +106,17 @@ namespace ExcelTest for (int a = 0; a < db_data.Length; a++) { - if (a % 10 == 0) { grid[0] = db_data[a]; } // 0: idx - if (a % 10 == 1) { grid[1] = db_data[a]; } // 1: isbn - if (a % 10 == 2) { grid[2] = db_data[a]; } // 2: header - if (a % 10 == 3) { grid[2] += db_data[a]; } // 2: num - if (a % 10 == 4) { grid[3] = db_data[a]; } // 3: book_num - if (a % 10 == 5) { grid[4] = db_data[a]; } // 4: author - if (a % 10 == 6) { grid[5] = db_data[a]; } // 5: book_comp - if (a % 10 == 7) { grid[6] = db_data[a]; } // 6: count - if (a % 10 == 8) { grid[7] = db_data[a]; } // 7: pay - if (a % 10 == 9) { grid[8] = db_data[a]; // 8: image_url + if (a % 11 == 0) { grid[0] = db_data[a]; } // 0: idx + if (a % 11 == 1) { grid[1] = db_data[a]; } // 1: isbn + if (a % 11 == 2) { grid[2] = db_data[a]; } // 2: header + if (a % 11 == 3) { grid[2] += db_data[a]; } // 2: num + if (a % 11 == 4) { grid[3] = db_data[a]; } // 3: book_num + if (a % 11 == 5) { grid[4] = db_data[a]; } // 4: author + if (a % 11 == 6) { grid[5] = db_data[a]; } // 5: book_comp + if (a % 11 == 7) { grid[6] = db_data[a]; } // 6: count + if (a % 11 == 8) { grid[7] = db_data[a]; } // 7: pay + if (a % 11 == 9) { grid[8] = db_data[a]; } // 8: image_url + if (a % 11 == 10) { grid[9] = db_data[a]; // 9: m_idx List_Book.Rows.Add(grid); } } @@ -129,79 +130,76 @@ namespace ExcelTest { for (int a = 0; a < List_Book.Rows.Count; a++) { - string Area = "`idx`, `marc`, `grade`, `008tag`, `user`, `date`, `compidx`"; + string Area = + // 0 1 + "`idx`, `compidx`, " + + // 2 3 4 5 6 7 + "`marc`, `marc_chk`, `marc1`, `marc_chk1`, `marc2`, `marc_chk2`, " + + // 8 9 10 11 + "`grade`, `008tag`, `user`, `date`"; + string Table = "Marc"; + + string[] sear_tbl = { "ISBN" }; + string[] sear_col = { List_Book.Rows[a].Cells["ISBN13"].Value.ToString() }; - string ChkMarcArea = "`marc_chk`, `marc_chk1`, `marc_chk2`"; + if (List_Book.Rows[a].Cells["marc_idx"].Value.ToString() != "0") { + sear_tbl[0] = "idx"; + sear_col[0] = List_Book.Rows[a].Cells["marc_idx"].Value.ToString(); + } - string[] sear_tbl = { "compidx", "ISBN" }; - string[] sear_col = { compidx, List_Book.Rows[a].Cells["ISBN13"].Value.ToString() }; - - string Chk_Cmd = db.More_DB_Search(Table, sear_tbl, sear_col, ChkMarcArea); + string Chk_Cmd = db.More_DB_Search(Table, sear_tbl, sear_col, Area); string Chk_Res = db.DB_Send_CMD_Search(Chk_Cmd); string[] Chk_Arr = Chk_Res.Split('|'); - - bool isMyData; - string cmd; - if (Chk_Arr.Length <= 1) { - int count = 0; - foreach (string chk in Chk_Arr) - { - if (count > 0 && chk == "1") - Area = Area.Replace("`marc`", string.Format("`marc{0}`", count)); - count++; - } - cmd = string.Format( - "SELECT {0} FROM {1} WHERE `{2}` = \"{3}\" " + - "AND (`marc_chk` = 1 OR `marc_chk1` = 1 OR `marc_chk2` = 1);", - Area, Table, sear_tbl[1], sear_col[1]); - isMyData = false; - } - else { - - int count = 0; - foreach (string chk in Chk_Arr) - { - if (count > 0 && chk == "1") - Area = Area.Replace("`marc`", string.Format("`marc{0}`", count)); - count++; - } - cmd = string.Format( - "SELECT {0} FROM {1} WHERE `{2}` = \"{3}\" AND `{4}` = \"{5}\" " + - "AND (`marc_chk` = 1 OR `marc_chk1` = 1 OR `marc_chk2` = 1);", - Area, Table, sear_tbl[0], sear_col[0], sear_tbl[1], sear_col[1]); - isMyData = true; - } - string db_res = db.DB_Send_CMD_Search(cmd); - string[] db_data = db_res.Split('|'); - if (db_data.Length < 2) { + bool isMyData; + if (Chk_Arr.Length < 2) { List_Book.Rows[a].Cells["grade"].Value = "3"; List_Book.Rows[a].DefaultCellStyle.ForeColor = Color.Red; + continue; } + + if (Chk_Arr[1] != compidx) + isMyData = false; else - { - List_Book.Rows[a].DefaultCellStyle.ForeColor = SetGradeColor(db_data[2], isMyData); - - List_Book.Rows[a].Cells["marc_idx"].Value = db_data[0]; - List_Book.Rows[a].Cells["db_marc"].Value = db_data[1]; - List_Book.Rows[a].Cells["grade"].Value = db_data[2]; - text008.Text = db_data[3]; - List_Book.Rows[a].Cells["user"].Value = db_data[4]; - List_Book.Rows[a].Cells["SaveDate"].Value = db_data[5]; - - if (isMyData) - SaveDateCheck(db_data[5], a); - - else { - string FindCompCmd = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", db_data[6]); - List_Book.Rows[a].Cells["user"].Value = db.DB_Send_CMD_Search(FindCompCmd).Replace("|", ""); - List_Book.Rows[a].DefaultCellStyle.BackColor = Color.LightGray; - } + isMyData = true; + + string[] MarcData = { Chk_Arr[2], Chk_Arr[4], Chk_Arr[6] }; + string[] CheckData = { Chk_Arr[3], Chk_Arr[5], Chk_Arr[7] }; + + List_Book.Rows[a].DefaultCellStyle.ForeColor = SetGradeColor(Chk_Arr[8], isMyData); + List_Book.Rows[a].Cells["marc_idx"].Value = Chk_Arr[0]; + List_Book.Rows[a].Cells["db_marc"].Value = NewestMarc(MarcData, CheckData); + List_Book.Rows[a].Cells["grade"].Value = Chk_Arr[8]; + text008.Text = Chk_Arr[9]; + List_Book.Rows[a].Cells["user"].Value = Chk_Arr[10]; + List_Book.Rows[a].Cells["SaveDate"].Value = Chk_Arr[11]; + + if (isMyData) + SaveDateCheck(Chk_Arr[11], a); + + else { + string FindCompCmd = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", Chk_Arr[1]); + List_Book.Rows[a].Cells["user"].Value = db.DB_Send_CMD_Search(FindCompCmd).Replace("|", ""); + List_Book.Rows[a].DefaultCellStyle.BackColor = Color.LightGray; } } } + private string NewestMarc(string[] marc, string[] marc_chk ) + { + string result = ""; + int count = 0; + foreach (string chk in marc_chk) + { + if (chk == "1") + result = marc[count]; + + count++; + } + return result; + } + private Color SetGradeColor(string Grade, bool isMyData = true) { if (!isMyData) @@ -580,6 +578,15 @@ namespace ExcelTest List_Book.Rows[row_idx].Cells["url"].Value.ToString() }; string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); string orimarc = st.made_Ori_marc(richTextBox1).Replace(@"\", "₩"); + string Midx = List_Book.Rows[row_idx].Cells["marc_idx"].Value.ToString(); + + // true일 경우 INSERT, false일 경우 UPDATE + bool isNewData = true; + + if (Midx != "") { + isNewData = false; + + } // 필수태그 확인 if (!isMustTag(orimarc)) { @@ -596,8 +603,8 @@ namespace ExcelTest compidx, orimarc, "1", "0", etc1.Text, etc2.Text, grid_data[5], tag056, text008.Text, date, user_name, grade.ToString() }; - string[] Sear_tbl = { "ISBN" }; - string[] Sear_col = { List_Book.Rows[row_idx].Cells["ISBN13"].Value.ToString() }; + string[] Sear_tbl = { "idx" }; + string[] Sear_col = { Midx }; string res = Sub_marc_chk(grid_data[0]); switch (res) @@ -641,7 +648,6 @@ namespace ExcelTest db.DB_Send_CMD_reVoid(Incmd); } - List_Book.Rows[row_idx].Cells["grade"].Value = grade.ToString(); List_Book.Rows[row_idx].Cells["SaveDate"].Value = date; List_Book.Rows[row_idx].Cells["user"].Value = user_name; @@ -649,6 +655,16 @@ namespace ExcelTest List_Book.Rows[row_idx].DefaultCellStyle.ForeColor = SetGradeColor(grade.ToString()); + + if (isNewData) { + string MidxQuery = string.Format("SELECT `idx` FROM Marc WHERE isbn = {0};", grid_data[0]); + Midx = db.DB_Send_CMD_Search(MidxQuery).Replace("|", ""); + } + + string UpdateListIndex = string.Format("UPDATE `Obj_List_Book` SET `m_idx` = {0} WHERE `idx` = {1};", + Midx, List_Book.Rows[row_idx].Cells["list_idx"].Value.ToString()); + db.DB_Send_CMD_reVoid(UpdateListIndex); + MessageBox.Show("저장되었습니다!"); } #region Save_Click_Sub @@ -765,6 +781,26 @@ namespace ExcelTest int row_idx = e.RowIndex; int col_idx = e.ColumnIndex; + string isbn = List_Book.Rows[row_idx].Cells["ISBN13"].Value.ToString(); + if (isbn != "") { + string CountQuery = string.Format("SELECT Count(isbn) FROM Marc WHERE isbn = {0} GROUP BY isbn;", isbn); + string CountResult = db.self_Made_Cmd(CountQuery).Replace("|", ""); + + if (CountResult == "") + btn_CopySelect.Text = "0"; + + if (CountResult == "0" || CountResult == "1") { + btn_CopySelect.Enabled = false; + btn_CopySelect.BackColor = Color.Silver; + } + else { + btn_CopySelect.Enabled = true; + btn_CopySelect.BackColor = Color.Khaki; + } + + btn_CopySelect.Text = CountResult; + } + tabControl1.SelectedIndex = 0; if (check_V(row_idx, col_idx)) @@ -774,8 +810,12 @@ namespace ExcelTest richTextBox1.Text = ""; bool check_Marc = click_Marc(row_idx); - if (!check_Marc) { richTextBox1.Text = Make_Empty(); } - else { ReadRemark(row_idx); } + + if (!check_Marc) + richTextBox1.Text = Make_Empty(); + else + ReadRemark(row_idx); + input_picture(row_idx); Create_008(); st.Color_change("▼", richTextBox1); @@ -1328,6 +1368,40 @@ namespace ExcelTest } #endregion + private void btn_CopySelect_Click(object sender, EventArgs e) + { + int row = List_Book.CurrentCell.RowIndex; + string isbn = List_Book.Rows[row].Cells["ISBN13"].Value.ToString(); + + MarcCopySelect copySelect = new MarcCopySelect(this); + copySelect.MarcFormRowIndex = row; + copySelect.Init(isbn); + copySelect.Show(); + } + + /// + /// 선택된 마크에 대한 정보를 그리드뷰에 저장. + /// + /// + /// [0] idx, [1] compidx, [2] user, [3] date, [4] grade, [5] tag008, [6] marc + public void SelectMarc_Sub(int row, string[] GridData) + { + List_Book.Rows[row].Cells["marc_idx"].Value = GridData[0]; + List_Book.Rows[row].Cells["user"].Value = GridData[2]; + List_Book.Rows[row].Cells["SaveDate"].Value = GridData[3]; + List_Book.Rows[row].Cells["grade"].Value = GridData[4]; + text008.Text = GridData[5]; + List_Book.Rows[row].Cells["db_marc"].Value = GridData[6]; + + bool checkMarc = click_Marc(row); + if (checkMarc) + { + ReadRemark(row); + st.Color_change("▼", richTextBox1); + st.Color_change("▲", richTextBox1); + } + } + private void comboBox8_SelectedIndexChanged(object sender, EventArgs e) { comboBox9.Items.Clear(); diff --git a/unimarc/unimarc/마크/Marc.designer.cs b/unimarc/unimarc/마크/Marc.designer.cs index aa2904b..2aa14e1 100644 --- a/unimarc/unimarc/마크/Marc.designer.cs +++ b/unimarc/unimarc/마크/Marc.designer.cs @@ -29,6 +29,8 @@ 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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Marc)); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); @@ -38,8 +40,6 @@ 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 dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); this.richTextBox1 = new System.Windows.Forms.RichTextBox(); this.etc1 = new System.Windows.Forms.RichTextBox(); this.etc2 = new System.Windows.Forms.RichTextBox(); @@ -67,6 +67,21 @@ this.comboBox7 = new System.Windows.Forms.ComboBox(); this.Btn_Memo = new System.Windows.Forms.Button(); this.List_Book = new System.Windows.Forms.DataGridView(); + this.list_idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.ISBN13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.num = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.pay = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.url = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.marc_idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.db_marc = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.grade = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.colCheck = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.user = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.SaveDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.btn_Save = new System.Windows.Forms.Button(); this.label4 = new System.Windows.Forms.Label(); this.text008 = new System.Windows.Forms.TextBox(); @@ -83,6 +98,7 @@ this.comboBox8 = new System.Windows.Forms.ComboBox(); this.comboBox9 = new System.Windows.Forms.ComboBox(); this.panel1 = new System.Windows.Forms.Panel(); + this.btn_CopySelect = new System.Windows.Forms.Button(); this.btn_FilterReturn = new System.Windows.Forms.Button(); this.panel2 = new System.Windows.Forms.Panel(); this.btn_mk_marcList = new System.Windows.Forms.Button(); @@ -238,21 +254,6 @@ this.lbl_SaveData = new System.Windows.Forms.Label(); this.lbl_ISBN = new System.Windows.Forms.Label(); this.lbl_BookList = new System.Windows.Forms.Label(); - this.list_idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.ISBN13 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.num = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.pay = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.url = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.marc_idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.db_marc = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.grade = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.colCheck = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.user = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.SaveDate = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.List_Book)).BeginInit(); this.panel3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); @@ -579,7 +580,7 @@ this.user, this.SaveDate}); this.List_Book.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; - this.List_Book.Location = new System.Drawing.Point(12, 78); + this.List_Book.Location = new System.Drawing.Point(12, 77); this.List_Book.MultiSelect = false; this.List_Book.Name = "List_Book"; this.List_Book.ReadOnly = true; @@ -587,7 +588,7 @@ this.List_Book.RowHeadersWidth = 10; this.List_Book.RowTemplate.Height = 23; this.List_Book.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.List_Book.Size = new System.Drawing.Size(502, 821); + this.List_Book.Size = new System.Drawing.Size(502, 822); this.List_Book.TabIndex = 217; this.List_Book.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.List_Book_CellClick); this.List_Book.DragDrop += new System.Windows.Forms.DragEventHandler(this.List_Book_DragDrop); @@ -596,6 +597,125 @@ this.List_Book.MouseDown += new System.Windows.Forms.MouseEventHandler(this.List_Book_MouseDown); this.List_Book.MouseMove += new System.Windows.Forms.MouseEventHandler(this.List_Book_MouseMove); // + // list_idx + // + this.list_idx.HeaderText = "list_idx"; + this.list_idx.Name = "list_idx"; + this.list_idx.ReadOnly = true; + this.list_idx.Visible = false; + this.list_idx.Width = 30; + // + // ISBN13 + // + this.ISBN13.FillWeight = 136.2398F; + this.ISBN13.HeaderText = "ISBN13"; + this.ISBN13.Name = "ISBN13"; + this.ISBN13.ReadOnly = true; + this.ISBN13.Visible = false; + // + // num + // + this.num.HeaderText = "연번"; + this.num.Name = "num"; + this.num.ReadOnly = true; + this.num.Width = 50; + // + // book_name + // + this.book_name.FillWeight = 135.5107F; + this.book_name.HeaderText = "도서명"; + this.book_name.Name = "book_name"; + this.book_name.ReadOnly = true; + this.book_name.Width = 150; + // + // author + // + this.author.FillWeight = 67.49011F; + this.author.HeaderText = "저자"; + this.author.Name = "author"; + this.author.ReadOnly = true; + this.author.Width = 80; + // + // book_comp + // + this.book_comp.FillWeight = 76.49199F; + this.book_comp.HeaderText = "출판사"; + this.book_comp.Name = "book_comp"; + this.book_comp.ReadOnly = true; + this.book_comp.Width = 80; + // + // count + // + this.count.HeaderText = "C"; + this.count.Name = "count"; + this.count.ReadOnly = true; + this.count.Width = 30; + // + // pay + // + this.pay.FillWeight = 84.26746F; + this.pay.HeaderText = "정가"; + this.pay.Name = "pay"; + this.pay.ReadOnly = true; + this.pay.Width = 62; + // + // url + // + this.url.HeaderText = "url"; + this.url.Name = "url"; + this.url.ReadOnly = true; + this.url.Visible = false; + // + // marc_idx + // + this.marc_idx.HeaderText = "marc_idx"; + this.marc_idx.Name = "marc_idx"; + this.marc_idx.ReadOnly = true; + this.marc_idx.Visible = false; + this.marc_idx.Width = 30; + // + // db_marc + // + this.db_marc.HeaderText = "marc"; + this.db_marc.Name = "db_marc"; + this.db_marc.ReadOnly = true; + this.db_marc.Visible = false; + // + // grade + // + dataGridViewCellStyle2.Format = "N0"; + dataGridViewCellStyle2.NullValue = null; + this.grade.DefaultCellStyle = dataGridViewCellStyle2; + this.grade.HeaderText = "등급"; + this.grade.Name = "grade"; + this.grade.ReadOnly = true; + this.grade.Visible = false; + this.grade.Width = 50; + // + // colCheck + // + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.colCheck.DefaultCellStyle = dataGridViewCellStyle3; + this.colCheck.HeaderText = "V"; + this.colCheck.Name = "colCheck"; + this.colCheck.ReadOnly = true; + this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.colCheck.Width = 30; + // + // user + // + this.user.HeaderText = "작업자"; + this.user.Name = "user"; + this.user.ReadOnly = true; + this.user.Visible = false; + // + // SaveDate + // + this.SaveDate.HeaderText = "저장시각"; + this.SaveDate.Name = "SaveDate"; + this.SaveDate.ReadOnly = true; + this.SaveDate.Visible = false; + // // btn_Save // this.btn_Save.Location = new System.Drawing.Point(1470, 186); @@ -609,7 +729,7 @@ // label4 // this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(8, 7); + this.label4.Location = new System.Drawing.Point(6, 7); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(49, 12); this.label4.TabIndex = 206; @@ -632,7 +752,7 @@ this.panel3.Controls.Add(this.btn_Reflesh008); this.panel3.Controls.Add(this.text008); this.panel3.Controls.Add(this.label4); - this.panel3.Location = new System.Drawing.Point(519, 12); + this.panel3.Location = new System.Drawing.Point(519, 13); this.panel3.Name = "panel3"; this.panel3.Size = new System.Drawing.Size(364, 30); this.panel3.TabIndex = 219; @@ -767,6 +887,7 @@ // this.panel1.BackColor = System.Drawing.Color.Silver; this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.btn_CopySelect); this.panel1.Controls.Add(this.btn_FilterReturn); this.panel1.Controls.Add(this.panel2); this.panel1.Controls.Add(this.btn_Search); @@ -774,11 +895,23 @@ this.panel1.Controls.Add(this.comboBox9); this.panel1.Controls.Add(this.rb_Filter); this.panel1.Controls.Add(this.comboBox8); - this.panel1.Location = new System.Drawing.Point(12, 37); + this.panel1.Location = new System.Drawing.Point(12, 36); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(502, 35); this.panel1.TabIndex = 226; // + // btn_CopySelect + // + this.btn_CopySelect.BackColor = System.Drawing.Color.Khaki; + this.btn_CopySelect.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.btn_CopySelect.Location = new System.Drawing.Point(373, 5); + this.btn_CopySelect.Name = "btn_CopySelect"; + this.btn_CopySelect.Size = new System.Drawing.Size(30, 23); + this.btn_CopySelect.TabIndex = 319; + this.btn_CopySelect.Text = "0"; + this.btn_CopySelect.UseVisualStyleBackColor = false; + this.btn_CopySelect.Click += new System.EventHandler(this.btn_CopySelect_Click); + // // btn_FilterReturn // this.btn_FilterReturn.Location = new System.Drawing.Point(8, 5); @@ -810,9 +943,9 @@ // // btn_Search // - this.btn_Search.Location = new System.Drawing.Point(319, 5); + this.btn_Search.Location = new System.Drawing.Point(315, 5); this.btn_Search.Name = "btn_Search"; - this.btn_Search.Size = new System.Drawing.Size(79, 23); + this.btn_Search.Size = new System.Drawing.Size(57, 23); this.btn_Search.TabIndex = 227; this.btn_Search.Text = "검 색"; this.btn_Search.UseVisualStyleBackColor = true; @@ -824,7 +957,7 @@ this.checkBox3.BackColor = System.Drawing.Color.White; this.checkBox3.Checked = true; this.checkBox3.CheckState = System.Windows.Forms.CheckState.Checked; - this.checkBox3.Location = new System.Drawing.Point(474, 83); + this.checkBox3.Location = new System.Drawing.Point(475, 82); this.checkBox3.Name = "checkBox3"; this.checkBox3.Size = new System.Drawing.Size(15, 14); this.checkBox3.TabIndex = 227; @@ -2391,132 +2524,14 @@ // this.lbl_BookList.AutoSize = true; this.lbl_BookList.BackColor = System.Drawing.Color.LightGray; + this.lbl_BookList.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.lbl_BookList.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold); - this.lbl_BookList.Location = new System.Drawing.Point(13, 12); + this.lbl_BookList.Location = new System.Drawing.Point(12, 12); this.lbl_BookList.Name = "lbl_BookList"; - this.lbl_BookList.Size = new System.Drawing.Size(64, 19); + this.lbl_BookList.Size = new System.Drawing.Size(66, 21); this.lbl_BookList.TabIndex = 33; this.lbl_BookList.Text = " "; // - // list_idx - // - this.list_idx.HeaderText = "list_idx"; - this.list_idx.Name = "list_idx"; - this.list_idx.ReadOnly = true; - this.list_idx.Visible = false; - this.list_idx.Width = 30; - // - // ISBN13 - // - this.ISBN13.FillWeight = 136.2398F; - this.ISBN13.HeaderText = "ISBN13"; - this.ISBN13.Name = "ISBN13"; - this.ISBN13.ReadOnly = true; - this.ISBN13.Visible = false; - // - // num - // - this.num.HeaderText = "연번"; - this.num.Name = "num"; - this.num.ReadOnly = true; - this.num.Width = 50; - // - // book_name - // - this.book_name.FillWeight = 135.5107F; - this.book_name.HeaderText = "도서명"; - this.book_name.Name = "book_name"; - this.book_name.ReadOnly = true; - this.book_name.Width = 150; - // - // author - // - this.author.FillWeight = 67.49011F; - this.author.HeaderText = "저자"; - this.author.Name = "author"; - this.author.ReadOnly = true; - this.author.Width = 80; - // - // book_comp - // - this.book_comp.FillWeight = 76.49199F; - this.book_comp.HeaderText = "출판사"; - this.book_comp.Name = "book_comp"; - this.book_comp.ReadOnly = true; - this.book_comp.Width = 80; - // - // count - // - this.count.HeaderText = "C"; - this.count.Name = "count"; - this.count.ReadOnly = true; - this.count.Width = 30; - // - // pay - // - this.pay.FillWeight = 84.26746F; - this.pay.HeaderText = "정가"; - this.pay.Name = "pay"; - this.pay.ReadOnly = true; - this.pay.Width = 62; - // - // url - // - this.url.HeaderText = "url"; - this.url.Name = "url"; - this.url.ReadOnly = true; - this.url.Visible = false; - // - // marc_idx - // - this.marc_idx.HeaderText = "marc_idx"; - this.marc_idx.Name = "marc_idx"; - this.marc_idx.ReadOnly = true; - this.marc_idx.Visible = false; - this.marc_idx.Width = 30; - // - // db_marc - // - this.db_marc.HeaderText = "marc"; - this.db_marc.Name = "db_marc"; - this.db_marc.ReadOnly = true; - this.db_marc.Visible = false; - // - // grade - // - dataGridViewCellStyle2.Format = "N0"; - dataGridViewCellStyle2.NullValue = null; - this.grade.DefaultCellStyle = dataGridViewCellStyle2; - this.grade.HeaderText = "등급"; - this.grade.Name = "grade"; - this.grade.ReadOnly = true; - this.grade.Visible = false; - this.grade.Width = 50; - // - // colCheck - // - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.colCheck.DefaultCellStyle = dataGridViewCellStyle3; - this.colCheck.HeaderText = "V"; - this.colCheck.Name = "colCheck"; - this.colCheck.ReadOnly = true; - this.colCheck.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.colCheck.Width = 30; - // - // user - // - this.user.HeaderText = "작업자"; - this.user.Name = "user"; - this.user.ReadOnly = true; - this.user.Visible = false; - // - // SaveDate - // - this.SaveDate.HeaderText = "저장시각"; - this.SaveDate.Name = "SaveDate"; - this.SaveDate.ReadOnly = true; - this.SaveDate.Visible = false; - // // Marc // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); @@ -2808,7 +2823,6 @@ private System.Windows.Forms.Label lbl_SaveData; private System.Windows.Forms.Button Btn_interlock; private System.Windows.Forms.Label lbl_ISBN; - private System.Windows.Forms.Label lbl_BookList; private System.Windows.Forms.Button btn_FilterReturn; private System.Windows.Forms.DataGridViewTextBoxColumn turnNum; private System.Windows.Forms.DataGridViewTextBoxColumn tag; @@ -2829,5 +2843,7 @@ private System.Windows.Forms.DataGridViewTextBoxColumn colCheck; private System.Windows.Forms.DataGridViewTextBoxColumn user; private System.Windows.Forms.DataGridViewTextBoxColumn SaveDate; + private System.Windows.Forms.Button btn_CopySelect; + public System.Windows.Forms.Label lbl_BookList; } } \ No newline at end of file diff --git a/unimarc/unimarc/마크/MarcCopySelect.Designer.cs b/unimarc/unimarc/마크/MarcCopySelect.Designer.cs new file mode 100644 index 0000000..f1b1476 --- /dev/null +++ b/unimarc/unimarc/마크/MarcCopySelect.Designer.cs @@ -0,0 +1,193 @@ + +namespace UniMarc.마크 +{ + partial class MarcCopySelect + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.compidx = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.user = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.date = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.grade = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tag008 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.marc = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.panel1 = new System.Windows.Forms.Panel(); + this.panel2 = new System.Windows.Forms.Panel(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // dataGridView1 + // + this.dataGridView1.AllowUserToAddRows = false; + this.dataGridView1.AllowUserToDeleteRows = false; + this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.idx, + this.compidx, + this.user, + this.date, + this.grade, + this.tag008, + this.marc}); + this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; + this.dataGridView1.Location = new System.Drawing.Point(0, 0); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.ReadOnly = true; + this.dataGridView1.RowTemplate.Height = 23; + this.dataGridView1.Size = new System.Drawing.Size(718, 135); + this.dataGridView1.TabIndex = 0; + this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick); + this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick); + // + // idx + // + this.idx.HeaderText = "idx"; + this.idx.Name = "idx"; + this.idx.ReadOnly = true; + this.idx.Visible = false; + this.idx.Width = 40; + // + // compidx + // + this.compidx.HeaderText = "compidx"; + this.compidx.Name = "compidx"; + this.compidx.ReadOnly = true; + this.compidx.Visible = false; + this.compidx.Width = 40; + // + // user + // + this.user.HeaderText = "수정자"; + this.user.Name = "user"; + this.user.ReadOnly = true; + this.user.Width = 120; + // + // date + // + this.date.HeaderText = "수정시각"; + this.date.Name = "date"; + this.date.ReadOnly = true; + this.date.Width = 120; + // + // grade + // + this.grade.HeaderText = "등급"; + this.grade.Name = "grade"; + this.grade.ReadOnly = true; + this.grade.Width = 60; + // + // tag008 + // + this.tag008.HeaderText = "008Tag"; + this.tag008.Name = "tag008"; + this.tag008.ReadOnly = true; + this.tag008.Width = 150; + // + // marc + // + this.marc.HeaderText = "Marc"; + this.marc.Name = "marc"; + this.marc.ReadOnly = true; + this.marc.Width = 200; + // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.dataGridView1); + this.panel1.Dock = System.Windows.Forms.DockStyle.Top; + this.panel1.Location = new System.Drawing.Point(0, 0); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(720, 137); + this.panel1.TabIndex = 1; + // + // panel2 + // + this.panel2.Controls.Add(this.richTextBox1); + this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; + this.panel2.Location = new System.Drawing.Point(0, 137); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(720, 542); + this.panel2.TabIndex = 2; + // + // richTextBox1 + // + this.richTextBox1.BackColor = System.Drawing.Color.LightGray; + this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None; + this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill; + this.richTextBox1.Font = new System.Drawing.Font("굴림체", 11.25F); + this.richTextBox1.Location = new System.Drawing.Point(0, 0); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.Size = new System.Drawing.Size(720, 542); + this.richTextBox1.TabIndex = 0; + this.richTextBox1.Text = ""; + // + // MarcCopySelect + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(720, 679); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.Name = "MarcCopySelect"; + this.Text = "마크 선택"; + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.panel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.RichTextBox richTextBox1; + private System.Windows.Forms.DataGridViewTextBoxColumn idx; + private System.Windows.Forms.DataGridViewTextBoxColumn compidx; + private System.Windows.Forms.DataGridViewTextBoxColumn user; + private System.Windows.Forms.DataGridViewTextBoxColumn date; + private System.Windows.Forms.DataGridViewTextBoxColumn grade; + private System.Windows.Forms.DataGridViewTextBoxColumn tag008; + private System.Windows.Forms.DataGridViewTextBoxColumn marc; + } +} \ No newline at end of file diff --git a/unimarc/unimarc/마크/MarcCopySelect.cs b/unimarc/unimarc/마크/MarcCopySelect.cs new file mode 100644 index 0000000..5abc93c --- /dev/null +++ b/unimarc/unimarc/마크/MarcCopySelect.cs @@ -0,0 +1,260 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using WindowsFormsApp1; +using ExcelTest; + +namespace UniMarc.마크 +{ + public partial class MarcCopySelect : Form + { + Helper_DB db = new Helper_DB(); + Marc m; + public int MarcFormRowIndex; + + public MarcCopySelect() + { + InitializeComponent(); + } + + public MarcCopySelect(Marc _m) + { + InitializeComponent(); + m = _m; + } + + public void Init(string isbn) + { + db.DBcon(); + // 0 1 2 3 4 5 + string Area = "`idx`, `compidx`, `user`, `date`, `grade`, `008tag`, " + + // 6 7 8 9 10 11 + "`marc`, `marc_chk`, `marc1`, `marc_chk1`, `marc2`, `marc_chk2`"; + string Table = "Marc"; + + string Query = string.Format("SELECT {0} FROM {1} WHERE isbn = \"{2}\";", Area, Table, isbn); + string Result = db.DB_Send_CMD_Search(Query); + string[] GridData = Result.Split('|'); + + InputGrid(GridData); + } + + private void InputGrid(string[] Value) + { + string[] Grid = { + "", "", "", "", "", "", "" + }; + + string[] MarcData = { "", "", "", "", "", "" }; + + for (int a = 0; a < Value.Length; a++) + { + if (a % 12 == 0) Grid[0] = Value[a]; // idx + if (a % 12 == 1) Grid[1] = Value[a]; // compidx + if (a % 12 == 2) Grid[2] = Value[a]; // user + if (a % 12 == 3) Grid[3] = Value[a]; // date + if (a % 12 == 4) Grid[4] = ChangeGrade(Value[a]); // grade + if (a % 12 == 5) Grid[5] = Value[a]; // 008tag + if (a % 12 == 6) MarcData[0] = Value[a]; // marc + if (a % 12 == 7) MarcData[1] = Value[a]; // marc_chk + if (a % 12 == 8) MarcData[2] = Value[a]; // marc1 + if (a % 12 == 9) MarcData[3] = Value[a]; // marc_chk1 + if (a % 12 == 10) MarcData[4] = Value[a]; // marc2 + if (a % 12 == 11) { MarcData[5] = Value[a]; // marc_chk2 + Grid[6] = RealMarc(MarcData); + dataGridView1.Rows.Add(Grid); + } + } + + for (int a = 0; a < dataGridView1.Rows.Count; a++) + { + string compidx = dataGridView1.Rows[a].Cells["compidx"].Value.ToString(); + string grade = dataGridView1.Rows[a].Cells["grade"].Value.ToString(); + string savedate = dataGridView1.Rows[a].Cells["date"].Value.ToString(); + + bool isMyData = true; + + if (compidx != Properties.Settings.Default.compidx) { + isMyData = false; + string FindCompCmd = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", compidx); + dataGridView1.Rows[a].Cells["user"].Value = db.DB_Send_CMD_Search(FindCompCmd).Replace("|", ""); + dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.LightGray; + } + + dataGridView1.Rows[a].DefaultCellStyle.ForeColor = SetGradeColor(grade, isMyData); + SaveDataCheck(savedate, a); + } + + } + + private string ChangeGrade(string Grade) + { + switch (Grade) + { + case "0": + return "A"; + case "1": + return "B"; + case "2": + return "C"; + case "3": + return "D"; + + case "A": + return "0"; + case "B": + return "1"; + case "C": + return "2"; + case "D": + return "3"; + + default: + return "D"; + } + } + + private Color SetGradeColor(string Grade, bool isMyData = true) + { + if (!isMyData) + return Color.Orange; + + switch (Grade) + { + case "A": + return Color.Blue; + + case "B": + return Color.Black; + + case "C": + return Color.Gray; + + case "D": + return Color.Red; + + default: + return Color.Black; + } + } + + private void SaveDataCheck(string Date, int row) + { + DateTime SaveDate = DateTime.ParseExact(Date, "yyyy-MM-dd HH:mm:ss", + System.Globalization.CultureInfo.InvariantCulture, System.Globalization.DateTimeStyles.None); + DateTime TargetDate = DateTime.Today.AddDays(-14); + + int result = DateTime.Compare(SaveDate, TargetDate); + + if (result >= 0) // SaveDate가 같거나 큼 + dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.Yellow; + + else // TargetDate가 큼 + dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.White; + } + + private string RealMarc(string[] MarcData) + { + string result = ""; + if (MarcData[1] == "1") + result = MarcData[0]; + + if (MarcData[3] == "1") + result = MarcData[2]; + + if (MarcData[5] == "1") + result = MarcData[4]; + + return result; + } + + private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) + { + String_Text st = new String_Text(); + int row = e.RowIndex; + + view_Marc(row); + + st.Color_change("▼", richTextBox1); + st.Color_change("▲", richTextBox1); + } + + /// + /// 마크데이터가 있는지 확인하고 메모장으로 출력 + /// + /// 해당 데이터의 row값 + /// + void view_Marc(int row) + { + // 마크 데이터 + string Marc_data = dataGridView1.Rows[row].Cells["marc"].Value.ToString(); + + if (Marc_data.Length < 3) return; + + string result = string.Empty; + + List TagNum = new List(); // 태그번호 + List field = new List(); // 가변길이필드 저장 + + // 특수기호 육안으로 확인하기 쉽게 변환 + Marc_data = Marc_data.Replace("", "▼"); + Marc_data = Marc_data.Replace("", "▲"); + Marc_data = Marc_data.Replace("₩", "\\"); + // string leader = Marc_data.Substring(0, 24); + + int startidx = 0; + string[] data = Marc_data.Substring(24).Split('▲'); // 리더부를 제외한 디렉터리, 가변길이필드 저장 + + // List에 필요한 데이터 집어넣는 작업. + for (int a = 1; a < data.Length - 1; a++) + { + TagNum.Add(data[0].Substring(startidx, 3)); + startidx += 12; + field.Add(data[a] + "▲"); + } + + // List에 들어간 데이터를 메모장에 출력시키는 작업. + for (int a = 0; a < TagNum.Count; a++) + { + string res = TagNum[a]; + if (field[a].IndexOf("▼") == -1) + { + res += "\t \t" + field[a]; + } + else + { + string temp = field[a].Insert(2, "\t"); + res += "\t" + temp; + } + result += res + "\n"; + } + richTextBox1.Text = result; + return; + } + + private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + int row = e.RowIndex; + + string[] GridData = { + dataGridView1.Rows[row].Cells["idx"].Value.ToString(), + dataGridView1.Rows[row].Cells["compidx"].Value.ToString(), + dataGridView1.Rows[row].Cells["user"].Value.ToString(), + dataGridView1.Rows[row].Cells["date"].Value.ToString(), + ChangeGrade(dataGridView1.Rows[row].Cells["grade"].Value.ToString()), + dataGridView1.Rows[row].Cells["tag008"].Value.ToString(), + dataGridView1.Rows[row].Cells["marc"].Value.ToString() + }; + + m.SelectMarc_Sub(MarcFormRowIndex, GridData); + + this.Close(); + } + } +} diff --git a/unimarc/unimarc/마크/MarcCopySelect.resx b/unimarc/unimarc/마크/MarcCopySelect.resx new file mode 100644 index 0000000..c48a13a --- /dev/null +++ b/unimarc/unimarc/마크/MarcCopySelect.resx @@ -0,0 +1,141 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file