편집기 통합작업 중, 등급 미적용 데이터 수정
This commit is contained in:
@@ -385,12 +385,6 @@
|
||||
<DependentUpon>Check_ISBN_Yes242.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\FillBlankItem.cs" />
|
||||
<Compile Include="마크\fMarc_Editor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="마크\fMarc_Editor.Designer.cs">
|
||||
<DependentUpon>fMarc_Editor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\Help_007.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -594,11 +588,11 @@
|
||||
<Compile Include="마크\Marc_Plan_PrintLabel.Designer.cs">
|
||||
<DependentUpon>Marc_Plan_PrintLabel.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\fMarc_Editor_Spec.cs">
|
||||
<Compile Include="마크\fMarc_Editor.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="마크\fMarc_Editor_Spec.Designer.cs">
|
||||
<DependentUpon>fMarc_Editor_Spec.cs</DependentUpon>
|
||||
<Compile Include="마크\fMarc_Editor.Designer.cs">
|
||||
<DependentUpon>fMarc_Editor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\Marc_Plan_Sub_MarcEdit.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -1166,9 +1160,6 @@
|
||||
<EmbeddedResource Include="마크\Check_ISBN_Yes242.resx">
|
||||
<DependentUpon>Check_ISBN_Yes242.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="마크\fMarc_Editor.resx">
|
||||
<DependentUpon>fMarc_Editor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="마크\Help_007.resx">
|
||||
<DependentUpon>Help_007.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -1268,8 +1259,8 @@
|
||||
<EmbeddedResource Include="마크\Marc_Plan_PrintLabel.resx">
|
||||
<DependentUpon>Marc_Plan_PrintLabel.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="마크\fMarc_Editor_Spec.resx">
|
||||
<DependentUpon>fMarc_Editor_Spec.cs</DependentUpon>
|
||||
<EmbeddedResource Include="마크\fMarc_Editor.resx">
|
||||
<DependentUpon>fMarc_Editor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="마크\Marc_Plan_Sub_MarcEdit.resx">
|
||||
<DependentUpon>Marc_Plan_Sub_MarcEdit.cs</DependentUpon>
|
||||
|
||||
@@ -35,5 +35,8 @@ namespace UniMarc
|
||||
public string ListName { get; set; }
|
||||
public string Date { get; set; }
|
||||
public string User { get; set; }
|
||||
public string etc1 { get; set; }
|
||||
public string etc2 { get; set; }
|
||||
public int grade { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using AR;
|
||||
using Org.BouncyCastle.Bcpg.OpenPgp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -141,7 +142,7 @@ namespace UniMarc
|
||||
string Area = "`idx`, "
|
||||
+ "`num`, `r_num`, `class_symbol`, `author_symbol`, `ISBN`, "
|
||||
+ "`book_name`, `s_book_name1`, `s_book_num1`, `s_book_name2`, `s_book_num2`, "
|
||||
+ "`author`, `book_comp`, `price`, `midx`, `marc`";
|
||||
+ "`author`, `book_comp`, `price`, `midx`, `marc`, `etc1`, `etc2`, `grade`";
|
||||
|
||||
string[] Search_col = { "work_list", "date" };
|
||||
string[] Search_data = { ListName, date };
|
||||
@@ -174,7 +175,10 @@ namespace UniMarc
|
||||
item.BookComp = dr["book_comp"].ToString();
|
||||
item.Price = dr["price"].ToString();
|
||||
item.Midx = dr["midx"].ToString();
|
||||
|
||||
item.etc1 = dr["etc1"]?.ToString() ?? string.Empty;
|
||||
item.etc2 = dr["etc2"]?.ToString() ?? string.Empty;
|
||||
item.grade = dr["grade"] != DBNull.Value ? Convert.ToInt32(dr["grade"]) : -1;
|
||||
|
||||
string rawMarc = dr["marc"].ToString();
|
||||
|
||||
// Logic for MARC tag processing
|
||||
@@ -229,6 +233,8 @@ namespace UniMarc
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||
{
|
||||
Skill_Grid sg = new Skill_Grid();
|
||||
@@ -318,14 +324,13 @@ namespace UniMarc
|
||||
// Sync BindingSource position
|
||||
bs1.Position = row;
|
||||
|
||||
var currentItem = (MarcPlanItem)bs1.Current;
|
||||
string isbn = currentItem.Isbn;
|
||||
string marcData = currentItem.Marc;
|
||||
var dr = (MarcPlanItem)bs1.Current;
|
||||
string isbn = dr.Isbn;
|
||||
string marcData = dr.Marc;
|
||||
|
||||
var f = new fMarc_Editor_Spec(isbn, marcData);
|
||||
var data = GetBookData(currentItem);
|
||||
var f = new fMarc_Editor(isbn, marcData, SaveTarget.SpecsMarc,dr.etc1, dr.etc2,dr.grade);
|
||||
var data = GetBookData(dr);
|
||||
f.LoadBook(data.marc, data.p);
|
||||
|
||||
f.RequestNext += (s, args) =>
|
||||
{
|
||||
if (bs1.Position < bs1.Count - 1)
|
||||
@@ -336,8 +341,8 @@ namespace UniMarc
|
||||
f.LoadBook(nextData.marc, nextData.p);
|
||||
|
||||
// Optional: Ensure visible
|
||||
if (dataGridView1.CurrentRow != null)
|
||||
dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.CurrentRow.Index;
|
||||
//if (dataGridView1.CurrentRow != null)
|
||||
//dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.CurrentRow.Index;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -351,8 +356,8 @@ namespace UniMarc
|
||||
f.LoadBook(prevData.marc, prevData.p);
|
||||
|
||||
// Optional: Ensure visible
|
||||
if (dataGridView1.CurrentRow != null)
|
||||
dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.CurrentRow.Index;
|
||||
//if (dataGridView1.CurrentRow != null)
|
||||
// dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.CurrentRow.Index;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1669,9 +1674,9 @@ namespace UniMarc
|
||||
|
||||
private void btn_FillBlank_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (List_Book.CurrentRow == null) return;
|
||||
int row = List_Book.CurrentRow.Index;
|
||||
string ISBN = List_Book.Rows[row].Cells["ISBN13"].Value?.ToString();
|
||||
if (dataGridView1.CurrentRow == null) return;
|
||||
int row = dataGridView1.CurrentRow.Index;
|
||||
string ISBN = dataGridView1.Rows[row].Cells["ISBN"].Value?.ToString();
|
||||
|
||||
if (string.IsNullOrEmpty(ISBN))
|
||||
{
|
||||
@@ -1682,17 +1687,17 @@ namespace UniMarc
|
||||
var fb = new Marc_FillBlank();
|
||||
for (int a = 0; a < bs1.Count; a++)
|
||||
{
|
||||
var item = bs1.List[a] as MarcBookItem;
|
||||
if (item != null && item.Status == MarcRecordStatus.None)
|
||||
var item = bs1.List[a] as MarcPlanItem;
|
||||
if (item != null && (string.IsNullOrEmpty(item.Marc) || item.Marc.Length < 10))
|
||||
{
|
||||
var fbItem = new FillBlankItem
|
||||
{
|
||||
Idx = item.ListIdx,
|
||||
Isbn = item.ISBN13 ?? "",
|
||||
Idx = a.ToString(), // 그리드 순서를 인덱스로 사용
|
||||
Isbn = item.Isbn ?? "",
|
||||
BookName = item.BookName ?? "",
|
||||
Author = item.Author ?? "",
|
||||
Publisher = item.BookComp ?? "",
|
||||
Price = item.Pay ?? ""
|
||||
Price = item.Price ?? ""
|
||||
};
|
||||
fb.InitFillBlank(fbItem);
|
||||
}
|
||||
@@ -1700,29 +1705,32 @@ namespace UniMarc
|
||||
fb.ISBN = ISBN;
|
||||
if (fb.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
String_Text st = new String_Text();
|
||||
if (fb.FillBlankItems.Any(t => !string.IsNullOrEmpty(t.BookMarc)))
|
||||
{
|
||||
foreach (var fbItem in fb.FillBlankItems)
|
||||
{
|
||||
if (string.IsNullOrEmpty(fbItem.BookMarc)) continue;
|
||||
|
||||
int targetListIdx = int.Parse(fbItem.Idx);
|
||||
foreach (MarcBookItem item in this.dataList)
|
||||
int targetIdx = int.Parse(fbItem.Idx);
|
||||
if (targetIdx >= 0 && targetIdx < bs1.Count)
|
||||
{
|
||||
if (item.ListIdx != null && Convert.ToInt32(item.ListIdx) == targetListIdx)
|
||||
var item = bs1.List[targetIdx] as MarcPlanItem;
|
||||
if (item != null)
|
||||
{
|
||||
item.DbMarc = fbItem.BookMarc;
|
||||
item.Status = MarcRecordStatus.NewFetched;
|
||||
break;
|
||||
item.Marc = fbItem.BookMarc;
|
||||
}
|
||||
}
|
||||
}
|
||||
bs1.ResetBindings(false);
|
||||
}
|
||||
else if (!string.IsNullOrEmpty(fb.SingleMarcResult))
|
||||
{
|
||||
// Update current Editor
|
||||
marcEditorControl1.SetMarcString(fb.SingleMarcResult);
|
||||
var item = bs1.Current as MarcPlanItem;
|
||||
if (item != null)
|
||||
{
|
||||
item.Marc = fb.SingleMarcResult;
|
||||
bs1.ResetCurrentItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -260,6 +260,7 @@ namespace UniMarc
|
||||
MessageBox.Show(ex.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
#region OpenFileSub
|
||||
|
||||
/// <summary>
|
||||
@@ -270,7 +271,7 @@ namespace UniMarc
|
||||
{
|
||||
String_Text st = new String_Text();
|
||||
|
||||
string[] grid = text.Split('');
|
||||
string[] grid = text.Split(' ');
|
||||
for (int a = 0; a < grid.Length - 1; a++)
|
||||
{
|
||||
string[] Search = {
|
||||
|
||||
18
unimarc/unimarc/마크/Search_Infor.Designer.cs
generated
18
unimarc/unimarc/마크/Search_Infor.Designer.cs
generated
@@ -28,7 +28,7 @@
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -102,14 +102,14 @@
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.AllowUserToDeleteRows = false;
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle6.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle6;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.idx,
|
||||
|
||||
@@ -78,7 +78,7 @@ namespace UniMarc
|
||||
|
||||
label3.Text = string.Format("검색결과 {0:0,0}건", dataGridView1.Rows.Count.ToString());
|
||||
}
|
||||
#region search_Click_Sub
|
||||
|
||||
|
||||
string MakeWHEREQurey(string target, string searchText)
|
||||
{
|
||||
@@ -358,7 +358,6 @@ namespace UniMarc
|
||||
return (res, search);
|
||||
}
|
||||
|
||||
#endregion
|
||||
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
int row = e.RowIndex;
|
||||
|
||||
18
unimarc/unimarc/마크/Search_Infor2.Designer.cs
generated
18
unimarc/unimarc/마크/Search_Infor2.Designer.cs
generated
@@ -29,7 +29,7 @@
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.components = new System.ComponentModel.Container();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Search_Infor2));
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.dataGridView1 = new System.Windows.Forms.DataGridView();
|
||||
@@ -118,14 +118,14 @@
|
||||
//
|
||||
this.dataGridView1.AllowUserToAddRows = false;
|
||||
this.dataGridView1.AllowUserToDeleteRows = false;
|
||||
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.False;
|
||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
|
||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle5.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
|
||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.idx,
|
||||
|
||||
@@ -343,9 +343,11 @@ namespace UniMarc
|
||||
SearchInforItem item = (SearchInforItem)bs1[e.RowIndex];
|
||||
if (item == null) return;
|
||||
|
||||
var me = new fMarc_Editor_Spec(item.ISBN, item.Marc);
|
||||
var v_grade = 2;
|
||||
int.TryParse(item.grade, out v_grade);
|
||||
|
||||
var me = new fMarc_Editor(item.ISBN, item.Marc, SaveTarget.MasterMarc, item.etc1, item.etc2, v_grade);
|
||||
me.row = e.RowIndex;
|
||||
me.UserName = main.botUserLabel.Text;
|
||||
|
||||
// Helper to load data at specific binding source position
|
||||
Action<int> loadAt = (pos) =>
|
||||
@@ -390,6 +392,9 @@ namespace UniMarc
|
||||
{
|
||||
var currentItem = (SearchInforItem)bs1.Current;
|
||||
currentItem.book_name = args.BookName;
|
||||
|
||||
//원본마크값을 marc2에 저장한다.
|
||||
if (string.IsNullOrEmpty(currentItem.marc2)) currentItem.marc2 = currentItem.Marc;
|
||||
currentItem.Marc = args.Marc;
|
||||
currentItem.ISBN = args.ISBN;
|
||||
currentItem.author = args.Author;
|
||||
@@ -428,7 +433,8 @@ namespace UniMarc
|
||||
}
|
||||
if (dataList.Any() == false)
|
||||
{
|
||||
UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
|
||||
// UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
|
||||
MessageBox.Show("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
|
||||
}
|
||||
else me.OpenFillBlank(dataList, currentBoundItem.ISBN);
|
||||
};
|
||||
@@ -443,6 +449,7 @@ namespace UniMarc
|
||||
if (rowIdx >= 0 && rowIdx < bs1.Count)
|
||||
{
|
||||
var mItem = (SearchInforItem)bs1.List[rowIdx];
|
||||
if (string.IsNullOrEmpty(mItem.marc2)) mItem.marc2 = mItem.Marc;
|
||||
mItem.Marc = fbItem.BookMarc;
|
||||
}
|
||||
}
|
||||
@@ -576,10 +583,10 @@ namespace UniMarc
|
||||
return;
|
||||
}
|
||||
|
||||
var me = new fMarc_Editor_Spec(item.ISBN, item.marc2);
|
||||
|
||||
var v_grade = 2;
|
||||
int.TryParse(item.grade, out v_grade);
|
||||
var me = new fMarc_Editor(item.ISBN, item.marc2, SaveTarget.MasterMarc, item.etc1, item.etc2, v_grade);
|
||||
me.row = row;
|
||||
me.UserName = main.botUserLabel.Text;
|
||||
|
||||
// Helper to load data at specific binding source position (using marc2 for old data)
|
||||
Action<int> loadAt = (pos) =>
|
||||
@@ -624,7 +631,7 @@ namespace UniMarc
|
||||
{
|
||||
var currentItem = (SearchInforItem)bs1.Current;
|
||||
currentItem.book_name = args.BookName;
|
||||
currentItem.marc2 = args.Marc;
|
||||
currentItem.Marc = args.Marc; //이전데이터보기에서 저장했다면 실제마크데이터를 업데이트한다.
|
||||
currentItem.ISBN = args.ISBN;
|
||||
currentItem.author = args.Author;
|
||||
currentItem.book_comp = args.Publisher;
|
||||
@@ -662,7 +669,8 @@ namespace UniMarc
|
||||
}
|
||||
if (dataList.Any() == false)
|
||||
{
|
||||
UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
|
||||
// UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
|
||||
MessageBox.Show("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
|
||||
}
|
||||
else me.OpenFillBlank(dataList, currentBoundItem.ISBN);
|
||||
};
|
||||
|
||||
@@ -165,6 +165,9 @@
|
||||
<metadata name="bindingNavigator1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="bindingNavigator1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="bs1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>171, 17</value>
|
||||
</metadata>
|
||||
@@ -172,7 +175,7 @@
|
||||
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wAAADsABataJCQAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+
|
||||
vgAADr4B6kKxwAAAATFJREFUOE9jYBg0oHDW8/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/
|
||||
@@ -183,7 +186,7 @@
|
||||
<data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wAAADsABataJCQAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/8EN18gzIL7n4f+l+///96++QLoBEe33
|
||||
vgAADr4B6kKxwAAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/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=
|
||||
@@ -192,7 +195,7 @@
|
||||
<data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wAAADsABataJCQAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5
|
||||
vgAADr4B6kKxwAAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5
|
||||
8n/2vl//O7f+/e9Wepl0QyK7Hv2fsu3X/5Klf/8nTP/73yb3LGmGBDY//N+69j1Ys3HJl//S0df+G0cu
|
||||
I94Qj6r7/0vmvoNrVnTpIV4zCNiX3v0f2PKMPM0gYJF3579NwRXyNIOAYdZt8jWDgE7aDfI1D00AAKB+
|
||||
X6Bjq5qXAAAAAElFTkSuQmCC
|
||||
@@ -201,7 +204,7 @@
|
||||
<data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wAAADsABataJCQAAAStJREFUOE9jYBhUoHDW8//oYjAAkmta8Px/5sTHONUw5M589j+h+x5WBSC5VUfe
|
||||
vgAADr4B6kKxwAAAAStJREFUOE9jYBhUoHDW8//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
|
||||
|
||||
146
unimarc/unimarc/마크/fMarc_Editor.Designer.cs
generated
146
unimarc/unimarc/마크/fMarc_Editor.Designer.cs
generated
@@ -34,14 +34,16 @@ namespace UniMarc
|
||||
this.etc1 = new System.Windows.Forms.RichTextBox();
|
||||
this.etc2 = new System.Windows.Forms.RichTextBox();
|
||||
this.panel6 = new System.Windows.Forms.Panel();
|
||||
this.lbl_SaveData = new System.Windows.Forms.Label();
|
||||
this.radD = new System.Windows.Forms.RadioButton();
|
||||
this.radC = new System.Windows.Forms.RadioButton();
|
||||
this.radB = new System.Windows.Forms.RadioButton();
|
||||
this.radA = new System.Windows.Forms.RadioButton();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.lbl_SaveData = new System.Windows.Forms.TextBox();
|
||||
this.btNext = new System.Windows.Forms.Button();
|
||||
this.btPrev = new System.Windows.Forms.Button();
|
||||
this.btn_Save = new System.Windows.Forms.Button();
|
||||
this.btn_close = new System.Windows.Forms.Button();
|
||||
this.cb_grade = new System.Windows.Forms.ComboBox();
|
||||
this.btn_FillBlank = new System.Windows.Forms.Button();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.panel5.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.panel6.SuspendLayout();
|
||||
@@ -55,7 +57,7 @@ namespace UniMarc
|
||||
this.panel5.Location = new System.Drawing.Point(1071, 0);
|
||||
this.panel5.Name = "panel5";
|
||||
this.panel5.Size = new System.Drawing.Size(266, 768);
|
||||
this.panel5.TabIndex = 328;
|
||||
this.panel5.TabIndex = 327;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
@@ -96,34 +98,94 @@ namespace UniMarc
|
||||
//
|
||||
// panel6
|
||||
//
|
||||
this.panel6.Controls.Add(this.btn_FillBlank);
|
||||
this.panel6.Controls.Add(this.radD);
|
||||
this.panel6.Controls.Add(this.radC);
|
||||
this.panel6.Controls.Add(this.radB);
|
||||
this.panel6.Controls.Add(this.radA);
|
||||
this.panel6.Controls.Add(this.label6);
|
||||
this.panel6.Controls.Add(this.lbl_SaveData);
|
||||
this.panel6.Controls.Add(this.btNext);
|
||||
this.panel6.Controls.Add(this.btPrev);
|
||||
this.panel6.Controls.Add(this.btn_Save);
|
||||
this.panel6.Controls.Add(this.btn_close);
|
||||
this.panel6.Controls.Add(this.cb_grade);
|
||||
this.panel6.Controls.Add(this.btn_FillBlank);
|
||||
this.panel6.Controls.Add(this.label6);
|
||||
this.panel6.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel6.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel6.Name = "panel6";
|
||||
this.panel6.Size = new System.Drawing.Size(266, 308);
|
||||
this.panel6.TabIndex = 1;
|
||||
//
|
||||
// radD
|
||||
//
|
||||
this.radD.AutoSize = true;
|
||||
this.radD.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.radD.Location = new System.Drawing.Point(210, 12);
|
||||
this.radD.Name = "radD";
|
||||
this.radD.Size = new System.Drawing.Size(42, 27);
|
||||
this.radD.TabIndex = 328;
|
||||
this.radD.TabStop = true;
|
||||
this.radD.Text = "D";
|
||||
this.radD.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radC
|
||||
//
|
||||
this.radC.AutoSize = true;
|
||||
this.radC.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.radC.Location = new System.Drawing.Point(163, 12);
|
||||
this.radC.Name = "radC";
|
||||
this.radC.Size = new System.Drawing.Size(41, 27);
|
||||
this.radC.TabIndex = 327;
|
||||
this.radC.TabStop = true;
|
||||
this.radC.Text = "C";
|
||||
this.radC.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radB
|
||||
//
|
||||
this.radB.AutoSize = true;
|
||||
this.radB.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.radB.Location = new System.Drawing.Point(116, 12);
|
||||
this.radB.Name = "radB";
|
||||
this.radB.Size = new System.Drawing.Size(41, 27);
|
||||
this.radB.TabIndex = 326;
|
||||
this.radB.TabStop = true;
|
||||
this.radB.Text = "B";
|
||||
this.radB.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radA
|
||||
//
|
||||
this.radA.AutoSize = true;
|
||||
this.radA.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.radA.Location = new System.Drawing.Point(69, 12);
|
||||
this.radA.Name = "radA";
|
||||
this.radA.Size = new System.Drawing.Size(41, 27);
|
||||
this.radA.TabIndex = 325;
|
||||
this.radA.TabStop = true;
|
||||
this.radA.Text = "A";
|
||||
this.radA.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.label6.Location = new System.Drawing.Point(28, 22);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(31, 12);
|
||||
this.label6.TabIndex = 324;
|
||||
this.label6.Text = "등급";
|
||||
//
|
||||
// lbl_SaveData
|
||||
//
|
||||
this.lbl_SaveData.AutoSize = true;
|
||||
this.lbl_SaveData.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.lbl_SaveData.ForeColor = System.Drawing.Color.PaleTurquoise;
|
||||
this.lbl_SaveData.Location = new System.Drawing.Point(45, 109);
|
||||
this.lbl_SaveData.Location = new System.Drawing.Point(9, 45);
|
||||
this.lbl_SaveData.Multiline = true;
|
||||
this.lbl_SaveData.Name = "lbl_SaveData";
|
||||
this.lbl_SaveData.Size = new System.Drawing.Size(64, 19);
|
||||
this.lbl_SaveData.Size = new System.Drawing.Size(245, 127);
|
||||
this.lbl_SaveData.TabIndex = 319;
|
||||
this.lbl_SaveData.Text = "[] []";
|
||||
//
|
||||
// btNext
|
||||
//
|
||||
this.btNext.Location = new System.Drawing.Point(147, 219);
|
||||
this.btNext.Location = new System.Drawing.Point(147, 269);
|
||||
this.btNext.Name = "btNext";
|
||||
this.btNext.Size = new System.Drawing.Size(107, 33);
|
||||
this.btNext.TabIndex = 230;
|
||||
@@ -133,7 +195,7 @@ namespace UniMarc
|
||||
//
|
||||
// btPrev
|
||||
//
|
||||
this.btPrev.Location = new System.Drawing.Point(98, 258);
|
||||
this.btPrev.Location = new System.Drawing.Point(14, 269);
|
||||
this.btPrev.Name = "btPrev";
|
||||
this.btPrev.Size = new System.Drawing.Size(107, 33);
|
||||
this.btPrev.TabIndex = 229;
|
||||
@@ -143,58 +205,24 @@ namespace UniMarc
|
||||
//
|
||||
// btn_Save
|
||||
//
|
||||
this.btn_Save.Location = new System.Drawing.Point(32, 180);
|
||||
this.btn_Save.Location = new System.Drawing.Point(147, 230);
|
||||
this.btn_Save.Name = "btn_Save";
|
||||
this.btn_Save.Size = new System.Drawing.Size(77, 33);
|
||||
this.btn_Save.Size = new System.Drawing.Size(107, 33);
|
||||
this.btn_Save.TabIndex = 215;
|
||||
this.btn_Save.Text = "저장(F9)";
|
||||
this.btn_Save.UseVisualStyleBackColor = true;
|
||||
this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click_1);
|
||||
//
|
||||
// btn_close
|
||||
//
|
||||
this.btn_close.Location = new System.Drawing.Point(21, 258);
|
||||
this.btn_close.Name = "btn_close";
|
||||
this.btn_close.Size = new System.Drawing.Size(77, 33);
|
||||
this.btn_close.TabIndex = 215;
|
||||
this.btn_close.Text = "닫 기";
|
||||
this.btn_close.UseVisualStyleBackColor = true;
|
||||
this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
|
||||
//
|
||||
// cb_grade
|
||||
//
|
||||
this.cb_grade.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cb_grade.FormattingEnabled = true;
|
||||
this.cb_grade.Items.AddRange(new object[] {
|
||||
"A (F9)",
|
||||
"B (F10)",
|
||||
"C (F11)",
|
||||
"D (F12)"});
|
||||
this.cb_grade.Location = new System.Drawing.Point(15, 33);
|
||||
this.cb_grade.Name = "cb_grade";
|
||||
this.cb_grade.Size = new System.Drawing.Size(75, 20);
|
||||
this.cb_grade.TabIndex = 222;
|
||||
this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
|
||||
//
|
||||
// btn_FillBlank
|
||||
//
|
||||
this.btn_FillBlank.Location = new System.Drawing.Point(115, 153);
|
||||
this.btn_FillBlank.Location = new System.Drawing.Point(11, 178);
|
||||
this.btn_FillBlank.Name = "btn_FillBlank";
|
||||
this.btn_FillBlank.Size = new System.Drawing.Size(77, 60);
|
||||
this.btn_FillBlank.TabIndex = 228;
|
||||
this.btn_FillBlank.Size = new System.Drawing.Size(243, 46);
|
||||
this.btn_FillBlank.TabIndex = 329;
|
||||
this.btn_FillBlank.Text = "미소장 마크 코리스\r\n칸채우기";
|
||||
this.btn_FillBlank.UseVisualStyleBackColor = true;
|
||||
this.btn_FillBlank.Click += new System.EventHandler(this.btn_FillBlank_Click);
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.label6.Location = new System.Drawing.Point(12, 15);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(62, 12);
|
||||
this.label6.TabIndex = 223;
|
||||
this.label6.Text = "마크 등급";
|
||||
//
|
||||
// fMarc_Editor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
@@ -219,13 +247,15 @@ namespace UniMarc
|
||||
public System.Windows.Forms.RichTextBox etc1;
|
||||
public System.Windows.Forms.RichTextBox etc2;
|
||||
private System.Windows.Forms.Panel panel6;
|
||||
private System.Windows.Forms.Label lbl_SaveData;
|
||||
private System.Windows.Forms.TextBox lbl_SaveData;
|
||||
private System.Windows.Forms.Button btNext;
|
||||
private System.Windows.Forms.Button btPrev;
|
||||
private System.Windows.Forms.Button btn_Save;
|
||||
private System.Windows.Forms.Button btn_close;
|
||||
private System.Windows.Forms.ComboBox cb_grade;
|
||||
private System.Windows.Forms.Button btn_FillBlank;
|
||||
private System.Windows.Forms.RadioButton radD;
|
||||
private System.Windows.Forms.RadioButton radC;
|
||||
private System.Windows.Forms.RadioButton radB;
|
||||
private System.Windows.Forms.RadioButton radA;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.Button btn_FillBlank;
|
||||
}
|
||||
}
|
||||
@@ -8,61 +8,57 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.Drawing.Drawing2D;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using AR;
|
||||
using Org.BouncyCastle.Pkcs;
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
public enum SaveTarget
|
||||
{
|
||||
SpecsMarc,
|
||||
MasterMarc
|
||||
}
|
||||
|
||||
public partial class fMarc_Editor : Form
|
||||
{
|
||||
string idx;
|
||||
public int row;
|
||||
public string UserName = "";
|
||||
Marc_Plan mp;
|
||||
Helper_DB db = new Helper_DB();
|
||||
String_Text st = new String_Text();
|
||||
Search_Infor si;
|
||||
Help008Tag tag008 = new Help008Tag();
|
||||
MarcEditorControl marcEditorControl1;
|
||||
private MacEditorParameter _param;
|
||||
string mCompidx = PUB.user.CompanyIdx;
|
||||
public fMarc_Editor(string isbn,string marcstring)
|
||||
|
||||
SaveTarget Target;
|
||||
|
||||
public fMarc_Editor(string isbn, string marcstring, SaveTarget _target,string etc1, string etc2,int grade)
|
||||
{
|
||||
InitializeComponent();
|
||||
db.DBcon();
|
||||
this.etc1.Text = etc1;
|
||||
this.etc2.Text = etc2;
|
||||
|
||||
//update grade radio button
|
||||
if (grade == 0) radA.Checked = true;
|
||||
else if(grade == 1) radB.Checked = true;
|
||||
else if(grade == 2) radC.Checked = true;
|
||||
else if(grade == 3) radD.Checked = true;
|
||||
|
||||
Target = _target;
|
||||
marcEditorControl1 = new MarcEditorControl();
|
||||
marcEditorControl1.db = this.db;
|
||||
marcEditorControl1.Dock = DockStyle.Fill;
|
||||
this.StartPosition = FormStartPosition.CenterScreen;
|
||||
this.Controls.Add(marcEditorControl1);
|
||||
|
||||
// Add Save Button programmatically (alternatively, could be done in Designer)
|
||||
Button btn_Save = new Button();
|
||||
btn_Save.Text = "저장(F9)";
|
||||
btn_Save.Dock = DockStyle.Bottom;
|
||||
btn_Save.Height = 40;
|
||||
btn_Save.Click += btn_Save_Click;
|
||||
this.Controls.Add(btn_Save);
|
||||
|
||||
this.KeyPreview = true;
|
||||
}
|
||||
|
||||
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||
{
|
||||
if (keyData == Keys.F9)
|
||||
this.KeyDown += (s1, e1) =>
|
||||
{
|
||||
btn_Save_Click(this, EventArgs.Empty);
|
||||
return true;
|
||||
}
|
||||
if (keyData == Keys.Escape)
|
||||
{
|
||||
this.Close();
|
||||
return true;
|
||||
}
|
||||
return base.ProcessCmdKey(ref msg, keyData);
|
||||
}
|
||||
|
||||
private void btn_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (e1.KeyCode == Keys.Escape)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public event EventHandler RequestNext;
|
||||
@@ -76,7 +72,7 @@ namespace UniMarc
|
||||
public string Author { get; set; }
|
||||
public string Publisher { get; set; }
|
||||
public string Price { get; set; }
|
||||
public int Grade { get; set; }
|
||||
public string Grade { get; set; }
|
||||
public string Etc1 { get; set; }
|
||||
public string Etc2 { get; set; }
|
||||
public string SaveDate { get; set; }
|
||||
@@ -93,33 +89,24 @@ namespace UniMarc
|
||||
fb.InitFillBlank(item);
|
||||
}
|
||||
fb.ISBN = currentIsbn;
|
||||
|
||||
|
||||
if (fb.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
BulkBooksUpdated?.Invoke(this, new BulkBookUpdatedEventArgs { Updates = fb.FillBlankItems });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class BulkBookUpdatedEventArgs : EventArgs
|
||||
{
|
||||
public List<FillBlankItem> Updates { get; set; }
|
||||
}
|
||||
|
||||
public event EventHandler<BulkBookUpdatedEventArgs> BulkBooksUpdated;
|
||||
|
||||
private void MarcEditorControl_FillBlankClicked(object sender, EventArgs e)
|
||||
{
|
||||
RequestFillBlankData?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
public event EventHandler<BulkBookUpdatedEventArgs> BulkBooksUpdated;
|
||||
|
||||
|
||||
|
||||
public event EventHandler<BookUpdatedEventArgs> BookUpdated;
|
||||
|
||||
private void MarcEditorControl_BookSaved(object sender, EventArgs e)
|
||||
{
|
||||
// Removed - Logic moved to btn_Save_Click
|
||||
}
|
||||
|
||||
private string mk_BookName(string[] book_name)
|
||||
{
|
||||
@@ -138,20 +125,11 @@ namespace UniMarc
|
||||
return result;
|
||||
}
|
||||
|
||||
private void MarcEditorControl1_PrevButton(object sender, EventArgs e)
|
||||
{
|
||||
RequestPrev?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void MarcEditorControl1_NextButton(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void LoadBook(string dbMarc, MacEditorParameter p)
|
||||
{
|
||||
this._param = p;
|
||||
this.Text = $"마크편집({p.ISBN13})-{p.BookName}";
|
||||
this._param.OriginalMarc = dbMarc; // 원본 마크 저장 (MasterMarc 저장 시 필요)
|
||||
this.Text = $"마크편집({p.ISBN13})-{p.BookName} Database:{Target}";
|
||||
marcEditorControl1.LoadBookData(dbMarc, p.ISBN13);
|
||||
}
|
||||
|
||||
@@ -161,15 +139,14 @@ namespace UniMarc
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
private void btn_close_Click(object sender, EventArgs e)
|
||||
private void btn_FillBlank_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
RequestFillBlankData?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void btPrev_Click(object sender, EventArgs e)
|
||||
{
|
||||
RequestPrev?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
}
|
||||
|
||||
private void btNext_Click(object sender, EventArgs e)
|
||||
@@ -177,20 +154,28 @@ namespace UniMarc
|
||||
RequestNext?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void btn_Save_Click_1(object sender, EventArgs e)
|
||||
private void btn_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (marcEditorControl1.CheckValidation() == false) return;
|
||||
|
||||
// Update Specs_Marc table
|
||||
string oriMarc = marcEditorControl1.MakeMarcString();
|
||||
string etc1 = this.etc1.Text.Trim();
|
||||
string etc2 = this.etc2.Text.Trim();
|
||||
string tag008 = marcEditorControl1.text008.Text;
|
||||
var v_grade = cb_grade.SelectedIndex.ToString();
|
||||
string etc1Value = "";
|
||||
string etc2Value = "";
|
||||
|
||||
// 등록번호 분류기호 저자기호 볼륨 복본
|
||||
// 별치 총서명 총서번호 저자 출판사
|
||||
// 정가 ISBN
|
||||
// Use TryGet to avoid issues if controls don't exist in all contexts,
|
||||
// but assuming inherited/designer has them for now as per user snippet.
|
||||
try { etc1Value = etc1.Text.Trim(); } catch { }
|
||||
try { etc2Value = etc2.Text.Trim(); } catch { }
|
||||
|
||||
string tag008Value = marcEditorControl1.text008.Text;
|
||||
|
||||
var v_grade = "";
|
||||
if (radA.Checked) v_grade = "0";
|
||||
else if (radB.Checked) v_grade = "1";
|
||||
else if (radC.Checked) v_grade = "2";
|
||||
else if (radD.Checked) v_grade = "3";
|
||||
|
||||
// Extract tags for metadata
|
||||
string[] Search_Tag = {
|
||||
"049l", "090a", "090b", "049v", "049c",
|
||||
"049f", "440a", "440v", "245d", "260b",
|
||||
@@ -203,51 +188,86 @@ namespace UniMarc
|
||||
string[] BookNameTag = st.Take_Tag(oriMarc, BookTag);
|
||||
string BookName = mk_BookName(BookNameTag);
|
||||
|
||||
string Table = "Specs_Marc";
|
||||
string Table = "";
|
||||
string[] Update_Col;
|
||||
string[] Update_data;
|
||||
string[] Search_Col = { "idx" };
|
||||
string[] Search_data;
|
||||
|
||||
// Current ListIdx (Wait, idx in Marc_Plan corresponds to ListIdx in Parameter?)
|
||||
// In Marc_Plan: ListIdx = idx.
|
||||
string listIdx = _param.ListIdx;
|
||||
string[] Search_data = { listIdx };
|
||||
if (Target == SaveTarget.SpecsMarc)
|
||||
{
|
||||
Table = "Specs_Marc";
|
||||
Search_data = new string[] { _param.ListIdx };
|
||||
Update_Col = new string[] {
|
||||
"marc", "book_name", "etc1", "etc2",
|
||||
"r_num", "class_symbol", "author_symbol", "prefix", "s_book_name1",
|
||||
"s_book_num1", "author", "book_comp", "price", "ISBN", "tag008","grade"
|
||||
};
|
||||
if (v_grade.isEmpty())
|
||||
Array.Resize(ref Update_Col, Update_Col.Length - 1);
|
||||
|
||||
string[] Update_Col = {
|
||||
"marc", "book_name", "etc1", "etc2",
|
||||
"r_num", "class_symbol", "author_symbol", "prefix", "s_book_name1",
|
||||
"s_book_num1", "author", "book_comp", "price", "ISBN", "tag008","grade"
|
||||
};
|
||||
|
||||
string[] Update_data = {
|
||||
oriMarc, BookName, etc1, etc2,
|
||||
SearchBookTag[0], SearchBookTag[1], SearchBookTag[2], SearchBookTag[5], SearchBookTag[6],
|
||||
SearchBookTag[7], SearchBookTag[8], SearchBookTag[9], SearchBookTag[10], SearchBookTag[11], tag008,v_grade
|
||||
};
|
||||
Update_data = new string[] {
|
||||
oriMarc, BookName, etc1Value, etc2Value,
|
||||
SearchBookTag[0], SearchBookTag[1], SearchBookTag[2], SearchBookTag[5], SearchBookTag[6],
|
||||
SearchBookTag[7], SearchBookTag[8], SearchBookTag[9], SearchBookTag[10], SearchBookTag[11], tag008Value, v_grade
|
||||
};
|
||||
if (v_grade.isEmpty())
|
||||
Array.Resize(ref Update_data, Update_data.Length - 1);
|
||||
}
|
||||
else // MasterMarc
|
||||
{
|
||||
Table = "Marc";
|
||||
Search_data = new string[] { _param.MarcIdx };
|
||||
// Using bits of logic from Marc_Plan_Sub_MarcEdit.Save_si
|
||||
string today = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
Update_Col = new string[] {
|
||||
"marc", "marc_chk", "marc1", "marc_chk2", "date", "user",
|
||||
"비고1", "비고2", "grade"//, "ISBN", "book_name", "author", "book_comp", "price"
|
||||
};
|
||||
if (v_grade.isEmpty())
|
||||
Array.Resize(ref Update_Col, Update_Col.Length - 1);
|
||||
Update_data = new string[] {
|
||||
oriMarc, "1", _param.OriginalMarc, "0", today, PUB.user.UserName,
|
||||
etc1Value, etc2Value, v_grade//, SearchBookTag[11], BookName, SearchBookTag[8], SearchBookTag[9], SearchBookTag[10]
|
||||
};
|
||||
if (v_grade.isEmpty())
|
||||
Array.Resize(ref Update_data, Update_data.Length - 1);
|
||||
}
|
||||
|
||||
string cmd = db.More_Update(Table, Update_Col, Update_data, Search_Col, Search_data);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
|
||||
// Notify Parent
|
||||
BookUpdated?.Invoke(this, new BookUpdatedEventArgs
|
||||
var rlt = Helper_DB.ExcuteNonQuery(cmd);
|
||||
if(rlt.applyCount == 1)
|
||||
{
|
||||
BookName = BookName,
|
||||
Marc = oriMarc,
|
||||
ISBN = SearchBookTag[11],
|
||||
Author = SearchBookTag[8],
|
||||
Publisher = SearchBookTag[9],
|
||||
Price = SearchBookTag[10],
|
||||
Grade = cb_grade.SelectedIndex,
|
||||
Etc1 = etc1,
|
||||
Etc2 = etc2,
|
||||
SaveDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
User = UserName
|
||||
});
|
||||
// Notify Parent
|
||||
BookUpdated?.Invoke(this, new BookUpdatedEventArgs
|
||||
{
|
||||
BookName = BookName,
|
||||
Marc = oriMarc,
|
||||
ISBN = SearchBookTag[11],
|
||||
Author = SearchBookTag[8],
|
||||
Publisher = SearchBookTag[9],
|
||||
Price = SearchBookTag[10],
|
||||
Grade = v_grade,
|
||||
Etc1 = etc1Value,
|
||||
Etc2 = etc2Value,
|
||||
SaveDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
User = PUB.user.UserName
|
||||
});
|
||||
|
||||
MessageBox.Show("저장되었습니다!");
|
||||
UTIL.MsgI($"저장되었습니다!\nDatabase = {this.Target}");
|
||||
}
|
||||
else if(rlt.applyCount == 0){
|
||||
UTIL.MsgE($"저장된 자료가 없습니다\nIDX:{Search_data[0]}\n\n개발자 문의 하세요");
|
||||
}
|
||||
else if(rlt.applyCount > 1)
|
||||
{
|
||||
UTIL.MsgE($"복수({rlt.applyCount})의 자료가 업데이트 되었습니다\nIDX:{Search_data[0]}\n\n개발자 문의 하세요");
|
||||
}
|
||||
}
|
||||
|
||||
private void btn_FillBlank_Click(object sender, EventArgs e)
|
||||
private void btn_close_Click(object sender, EventArgs e)
|
||||
{
|
||||
RequestFillBlankData?.Invoke(this, EventArgs.Empty);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
248
unimarc/unimarc/마크/fMarc_Editor_Spec.Designer.cs
generated
248
unimarc/unimarc/마크/fMarc_Editor_Spec.Designer.cs
generated
@@ -1,248 +0,0 @@
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class fMarc_Editor_Spec
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.panel5 = new System.Windows.Forms.Panel();
|
||||
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.etc1 = new System.Windows.Forms.RichTextBox();
|
||||
this.etc2 = new System.Windows.Forms.RichTextBox();
|
||||
this.panel6 = new System.Windows.Forms.Panel();
|
||||
this.radD = new System.Windows.Forms.RadioButton();
|
||||
this.radC = new System.Windows.Forms.RadioButton();
|
||||
this.radB = new System.Windows.Forms.RadioButton();
|
||||
this.radA = new System.Windows.Forms.RadioButton();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.lbl_SaveData = new System.Windows.Forms.TextBox();
|
||||
this.btNext = new System.Windows.Forms.Button();
|
||||
this.btPrev = new System.Windows.Forms.Button();
|
||||
this.btn_Save = new System.Windows.Forms.Button();
|
||||
this.panel5.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.panel6.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// panel5
|
||||
//
|
||||
this.panel5.Controls.Add(this.tableLayoutPanel1);
|
||||
this.panel5.Controls.Add(this.panel6);
|
||||
this.panel5.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.panel5.Location = new System.Drawing.Point(1071, 0);
|
||||
this.panel5.Name = "panel5";
|
||||
this.panel5.Size = new System.Drawing.Size(266, 768);
|
||||
this.panel5.TabIndex = 327;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
//
|
||||
this.tableLayoutPanel1.ColumnCount = 1;
|
||||
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Controls.Add(this.etc1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.etc2, 0, 1);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 308);
|
||||
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
|
||||
this.tableLayoutPanel1.RowCount = 2;
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(266, 460);
|
||||
this.tableLayoutPanel1.TabIndex = 0;
|
||||
//
|
||||
// etc1
|
||||
//
|
||||
this.etc1.BackColor = System.Drawing.SystemColors.ScrollBar;
|
||||
this.etc1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.etc1.Font = new System.Drawing.Font("굴림체", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.etc1.Location = new System.Drawing.Point(3, 3);
|
||||
this.etc1.Name = "etc1";
|
||||
this.etc1.Size = new System.Drawing.Size(260, 224);
|
||||
this.etc1.TabIndex = 32;
|
||||
this.etc1.Text = "Remark1";
|
||||
//
|
||||
// etc2
|
||||
//
|
||||
this.etc2.BackColor = System.Drawing.SystemColors.ScrollBar;
|
||||
this.etc2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.etc2.Font = new System.Drawing.Font("굴림체", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.etc2.Location = new System.Drawing.Point(3, 233);
|
||||
this.etc2.Name = "etc2";
|
||||
this.etc2.Size = new System.Drawing.Size(260, 224);
|
||||
this.etc2.TabIndex = 32;
|
||||
this.etc2.Text = "Remark2";
|
||||
//
|
||||
// panel6
|
||||
//
|
||||
this.panel6.Controls.Add(this.radD);
|
||||
this.panel6.Controls.Add(this.radC);
|
||||
this.panel6.Controls.Add(this.radB);
|
||||
this.panel6.Controls.Add(this.radA);
|
||||
this.panel6.Controls.Add(this.label6);
|
||||
this.panel6.Controls.Add(this.lbl_SaveData);
|
||||
this.panel6.Controls.Add(this.btNext);
|
||||
this.panel6.Controls.Add(this.btPrev);
|
||||
this.panel6.Controls.Add(this.btn_Save);
|
||||
this.panel6.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel6.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel6.Name = "panel6";
|
||||
this.panel6.Size = new System.Drawing.Size(266, 308);
|
||||
this.panel6.TabIndex = 1;
|
||||
//
|
||||
// radD
|
||||
//
|
||||
this.radD.AutoSize = true;
|
||||
this.radD.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.radD.Location = new System.Drawing.Point(210, 12);
|
||||
this.radD.Name = "radD";
|
||||
this.radD.Size = new System.Drawing.Size(42, 27);
|
||||
this.radD.TabIndex = 328;
|
||||
this.radD.TabStop = true;
|
||||
this.radD.Text = "D";
|
||||
this.radD.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radC
|
||||
//
|
||||
this.radC.AutoSize = true;
|
||||
this.radC.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.radC.Location = new System.Drawing.Point(163, 12);
|
||||
this.radC.Name = "radC";
|
||||
this.radC.Size = new System.Drawing.Size(41, 27);
|
||||
this.radC.TabIndex = 327;
|
||||
this.radC.TabStop = true;
|
||||
this.radC.Text = "C";
|
||||
this.radC.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radB
|
||||
//
|
||||
this.radB.AutoSize = true;
|
||||
this.radB.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.radB.Location = new System.Drawing.Point(116, 12);
|
||||
this.radB.Name = "radB";
|
||||
this.radB.Size = new System.Drawing.Size(41, 27);
|
||||
this.radB.TabIndex = 326;
|
||||
this.radB.TabStop = true;
|
||||
this.radB.Text = "B";
|
||||
this.radB.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// radA
|
||||
//
|
||||
this.radA.AutoSize = true;
|
||||
this.radA.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.radA.Location = new System.Drawing.Point(69, 12);
|
||||
this.radA.Name = "radA";
|
||||
this.radA.Size = new System.Drawing.Size(41, 27);
|
||||
this.radA.TabIndex = 325;
|
||||
this.radA.TabStop = true;
|
||||
this.radA.Text = "A";
|
||||
this.radA.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// label6
|
||||
//
|
||||
this.label6.AutoSize = true;
|
||||
this.label6.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.label6.Location = new System.Drawing.Point(28, 22);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(31, 12);
|
||||
this.label6.TabIndex = 324;
|
||||
this.label6.Text = "등급";
|
||||
//
|
||||
// lbl_SaveData
|
||||
//
|
||||
this.lbl_SaveData.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.lbl_SaveData.ForeColor = System.Drawing.Color.PaleTurquoise;
|
||||
this.lbl_SaveData.Location = new System.Drawing.Point(9, 45);
|
||||
this.lbl_SaveData.Multiline = true;
|
||||
this.lbl_SaveData.Name = "lbl_SaveData";
|
||||
this.lbl_SaveData.Size = new System.Drawing.Size(245, 179);
|
||||
this.lbl_SaveData.TabIndex = 319;
|
||||
this.lbl_SaveData.Text = "[] []";
|
||||
//
|
||||
// btNext
|
||||
//
|
||||
this.btNext.Location = new System.Drawing.Point(147, 269);
|
||||
this.btNext.Name = "btNext";
|
||||
this.btNext.Size = new System.Drawing.Size(107, 33);
|
||||
this.btNext.TabIndex = 230;
|
||||
this.btNext.Text = "다 음(F8)";
|
||||
this.btNext.UseVisualStyleBackColor = true;
|
||||
this.btNext.Click += new System.EventHandler(this.btNext_Click);
|
||||
//
|
||||
// btPrev
|
||||
//
|
||||
this.btPrev.Location = new System.Drawing.Point(14, 269);
|
||||
this.btPrev.Name = "btPrev";
|
||||
this.btPrev.Size = new System.Drawing.Size(107, 33);
|
||||
this.btPrev.TabIndex = 229;
|
||||
this.btPrev.Text = "이 전(F7)";
|
||||
this.btPrev.UseVisualStyleBackColor = true;
|
||||
this.btPrev.Click += new System.EventHandler(this.btPrev_Click);
|
||||
//
|
||||
// btn_Save
|
||||
//
|
||||
this.btn_Save.Location = new System.Drawing.Point(147, 230);
|
||||
this.btn_Save.Name = "btn_Save";
|
||||
this.btn_Save.Size = new System.Drawing.Size(107, 33);
|
||||
this.btn_Save.TabIndex = 215;
|
||||
this.btn_Save.Text = "저장(F9)";
|
||||
this.btn_Save.UseVisualStyleBackColor = true;
|
||||
this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
|
||||
//
|
||||
// fMarc_Editor_Spec
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1337, 768);
|
||||
this.Controls.Add(this.panel5);
|
||||
this.Name = "fMarc_Editor_Spec";
|
||||
this.Text = "마크편집";
|
||||
this.Load += new System.EventHandler(this.Marc_Plan_Sub_MarcEdit2_Load);
|
||||
this.panel5.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.panel6.ResumeLayout(false);
|
||||
this.panel6.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel panel5;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
public System.Windows.Forms.RichTextBox etc1;
|
||||
public System.Windows.Forms.RichTextBox etc2;
|
||||
private System.Windows.Forms.Panel panel6;
|
||||
private System.Windows.Forms.TextBox lbl_SaveData;
|
||||
private System.Windows.Forms.Button btNext;
|
||||
private System.Windows.Forms.Button btPrev;
|
||||
private System.Windows.Forms.Button btn_Save;
|
||||
private System.Windows.Forms.RadioButton radD;
|
||||
private System.Windows.Forms.RadioButton radC;
|
||||
private System.Windows.Forms.RadioButton radB;
|
||||
private System.Windows.Forms.RadioButton radA;
|
||||
private System.Windows.Forms.Label label6;
|
||||
}
|
||||
}
|
||||
@@ -1,211 +0,0 @@
|
||||
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 System.Drawing.Drawing2D;
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class fMarc_Editor_Spec : Form
|
||||
{
|
||||
string idx;
|
||||
public int row;
|
||||
public string UserName = "";
|
||||
Marc_Plan mp;
|
||||
Helper_DB db = new Helper_DB();
|
||||
String_Text st = new String_Text();
|
||||
Search_Infor si;
|
||||
Help008Tag tag008 = new Help008Tag();
|
||||
MarcEditorControl marcEditorControl1;
|
||||
private MacEditorParameter _param;
|
||||
|
||||
public fMarc_Editor_Spec(string isbn, string marcstring)
|
||||
{
|
||||
InitializeComponent();
|
||||
db.DBcon();
|
||||
marcEditorControl1 = new MarcEditorControl();
|
||||
marcEditorControl1.db = this.db;
|
||||
marcEditorControl1.Dock = DockStyle.Fill;
|
||||
this.StartPosition = FormStartPosition.CenterScreen;
|
||||
this.Controls.Add(marcEditorControl1);
|
||||
this.KeyPreview = true;
|
||||
this.KeyDown += (s1, e1) =>
|
||||
{
|
||||
if (e1.KeyCode == Keys.Escape)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
public event EventHandler RequestNext;
|
||||
public event EventHandler RequestPrev;
|
||||
|
||||
public class BookUpdatedEventArgs : EventArgs
|
||||
{
|
||||
public string BookName { get; set; }
|
||||
public string Marc { get; set; }
|
||||
public string ISBN { get; set; }
|
||||
public string Author { get; set; }
|
||||
public string Publisher { get; set; }
|
||||
public string Price { get; set; }
|
||||
public string Grade { get; set; }
|
||||
public string Etc1 { get; set; }
|
||||
public string Etc2 { get; set; }
|
||||
public string SaveDate { get; set; }
|
||||
public string User { get; set; }
|
||||
}
|
||||
|
||||
public event EventHandler RequestFillBlankData;
|
||||
|
||||
public void OpenFillBlank(List<FillBlankItem> gridData, string currentIsbn)
|
||||
{
|
||||
var fb = new UniMarc.Marc_FillBlank();
|
||||
foreach (var item in gridData)
|
||||
{
|
||||
fb.InitFillBlank(item);
|
||||
}
|
||||
fb.ISBN = currentIsbn;
|
||||
|
||||
if (fb.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
BulkBooksUpdated?.Invoke(this, new BulkBookUpdatedEventArgs { Updates = fb.FillBlankItems });
|
||||
}
|
||||
}
|
||||
|
||||
public class BulkBookUpdatedEventArgs : EventArgs
|
||||
{
|
||||
public List<FillBlankItem> Updates { get; set; }
|
||||
}
|
||||
|
||||
public event EventHandler<BulkBookUpdatedEventArgs> BulkBooksUpdated;
|
||||
|
||||
|
||||
|
||||
public event EventHandler<BookUpdatedEventArgs> BookUpdated;
|
||||
|
||||
|
||||
private string mk_BookName(string[] book_name)
|
||||
{
|
||||
string a245 = book_name[0]; // 도서명
|
||||
string x245 = book_name[1]; // 대동서명
|
||||
string b245 = book_name[2]; // 부서명
|
||||
|
||||
string result = a245;
|
||||
|
||||
if (x245 != "")
|
||||
result += " = " + x245;
|
||||
|
||||
if (b245 != "")
|
||||
result += " : " + b245;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public void LoadBook(string dbMarc, MacEditorParameter p)
|
||||
{
|
||||
this._param = p;
|
||||
this.Text = $"마크편집({p.ISBN13})-{p.BookName}";
|
||||
marcEditorControl1.LoadBookData(dbMarc, p.ISBN13);
|
||||
}
|
||||
|
||||
private void Marc_Plan_Sub_MarcEdit2_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
}
|
||||
|
||||
private void btn_FillBlank_Click(object sender, EventArgs e)
|
||||
{
|
||||
RequestFillBlankData?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void btPrev_Click(object sender, EventArgs e)
|
||||
{
|
||||
RequestPrev?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void btNext_Click(object sender, EventArgs e)
|
||||
{
|
||||
RequestNext?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
private void btn_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (marcEditorControl1.CheckValidation() == false) return;
|
||||
|
||||
// Update Specs_Marc table
|
||||
string oriMarc = marcEditorControl1.MakeMarcString();
|
||||
string etc1 = this.etc1.Text.Trim();
|
||||
string etc2 = this.etc2.Text.Trim();
|
||||
string tag008 = marcEditorControl1.text008.Text;
|
||||
var v_grade = cb_grade.SelectedIndex.ToString();
|
||||
|
||||
// 등록번호 분류기호 저자기호 볼륨 복본
|
||||
// 별치 총서명 총서번호 저자 출판사
|
||||
// 정가 ISBN
|
||||
string[] Search_Tag = {
|
||||
"049l", "090a", "090b", "049v", "049c",
|
||||
"049f", "440a", "440v", "245d", "260b",
|
||||
"950b", "020a"
|
||||
};
|
||||
string[] SearchBookTag = st.Take_Tag(oriMarc, Search_Tag);
|
||||
|
||||
// 도서명 (본서명 = 대등서명 : 부서명)
|
||||
string[] BookTag = { "245a", "245x", "245b" };
|
||||
string[] BookNameTag = st.Take_Tag(oriMarc, BookTag);
|
||||
string BookName = mk_BookName(BookNameTag);
|
||||
|
||||
string Table = "Specs_Marc";
|
||||
string[] Search_Col = { "idx" };
|
||||
|
||||
// Current ListIdx (Wait, idx in Marc_Plan corresponds to ListIdx in Parameter?)
|
||||
// In Marc_Plan: ListIdx = idx.
|
||||
string listIdx = _param.ListIdx;
|
||||
string[] Search_data = { listIdx };
|
||||
|
||||
string[] Update_Col = {
|
||||
"marc", "book_name", "etc1", "etc2",
|
||||
"r_num", "class_symbol", "author_symbol", "prefix", "s_book_name1",
|
||||
"s_book_num1", "author", "book_comp", "price", "ISBN", "tag008","grade"
|
||||
};
|
||||
|
||||
string[] Update_data = {
|
||||
oriMarc, BookName, etc1, etc2,
|
||||
SearchBookTag[0], SearchBookTag[1], SearchBookTag[2], SearchBookTag[5], SearchBookTag[6],
|
||||
SearchBookTag[7], SearchBookTag[8], SearchBookTag[9], SearchBookTag[10], SearchBookTag[11], tag008,v_grade
|
||||
};
|
||||
|
||||
string cmd = db.More_Update(Table, Update_Col, Update_data, Search_Col, Search_data);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
|
||||
// Notify Parent
|
||||
BookUpdated?.Invoke(this, new BookUpdatedEventArgs
|
||||
{
|
||||
BookName = BookName,
|
||||
Marc = oriMarc,
|
||||
ISBN = SearchBookTag[11],
|
||||
Author = SearchBookTag[8],
|
||||
Publisher = SearchBookTag[9],
|
||||
Price = SearchBookTag[10],
|
||||
Grade = v_grade,
|
||||
Etc1 = etc1,
|
||||
Etc2 = etc2,
|
||||
SaveDate = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
|
||||
User = UserName
|
||||
});
|
||||
|
||||
MessageBox.Show("저장되었습니다!");
|
||||
}
|
||||
|
||||
private void btn_close_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
Reference in New Issue
Block a user