인덱스 컬럼의 포맷변경 string -> int

This commit is contained in:
2026-02-28 15:55:20 +09:00
parent b13f01a3dd
commit a226c370b2
17 changed files with 87 additions and 87 deletions

View File

@@ -46,7 +46,7 @@ namespace UniMarc
/// <param name="Publisher"></param>
/// <param name="Price"></param>
/// <returns></returns>
public static string MakeEmptyMarc(string ISBN13, string BookName, string Author, string Publisher, string Price)
public static string MakeEmptyMarc(string ISBN13, string BookName, string Author, string Publisher, int Price)
{
string yyMMdd = DateTime.Now.ToString("yyMMdd");
string yyyy = DateTime.Now.ToString("yyyy");

View File

@@ -80,7 +80,7 @@ namespace UniMarc
/// 5:tag008 <br></br>
/// 6:LineMarc</param>
var selected = mcs.SelectedItem;
var defMarc = PUB.MakeEmptyMarc(selected.ISBN, "BookName", "Author", "Publisher", "Price");
var defMarc = PUB.MakeEmptyMarc(selected.ISBN, "BookName", "Author", "Publisher", 0);
this.marcEditorControl1.LoadBookData(selected.marc_db, selected.ISBN, defMarc);
mOldMarc = selected.marc_db;
@@ -93,7 +93,7 @@ namespace UniMarc
}
else
{
this.lbl_Midx.Text = selected.idx;
this.lbl_Midx.Text = selected.idx.ToString();
this.lbl_Midx.Tag = selected.idx;
this.lbl_Midx.BackColor = Color.Lime;
@@ -131,7 +131,7 @@ namespace UniMarc
if (isDelete)
{
var isbn = $"※{DateTime.Now.ToString("yyMMddhhmmss")}";
var emptryMarc = PUB.MakeEmptyMarc(isbn, "title", "author", "publisher", "price");
var emptryMarc = PUB.MakeEmptyMarc(isbn, "title", "author", "publisher", 0);
var emptymarc = TextResetSub();
marcEditorControl1.LoadBookData(string.Empty, isbn, defaultMarc: emptryMarc);

View File

@@ -8,12 +8,12 @@ namespace UniMarc
{
public class FillBlankItem
{
public string Idx { get; set; }
public int Idx { get; set; }
public string Isbn { get; set; }
public string BookName { get; set; }
public string Author { get; set; }
public string Publisher { get; set; }
public string Price { get; set; }
public int Price { get; set; }
public string BookMarc { get; set; } = ""; // Hidden column likely
}
}

View File

@@ -6,15 +6,15 @@ namespace UniMarc
{
public string ISBN13 { get; set; }
public string URL { get; set; }
public string MarcIdx { get; set; }
public int MarcIdx { get; set; }
public string User { get; set; }
public string SaveDate { get; set; }
public string ListIdx { get; set; }
public int ListIdx { get; set; }
public string BookName { get; set; }
public string Author { get; set; }
public string Publisher { get; set; }
public string Price { get; set; }
public int Price { get; set; }
public string text008 { get; set; }

View File

@@ -274,8 +274,7 @@ namespace UniMarc
{
if (chkEditorTest.Checked == false)
{
var marc = this.main.OpenFormInTab(() => new Marc2(this), allowMultiple: true);
marc.input_list(item);
var marc = this.main.OpenFormInTab(() => new Marc2(item), allowMultiple: true);
}
else
{

View File

@@ -1571,12 +1571,12 @@ namespace UniMarc
{
var item = new FillBlankItem
{
Idx = a.ToString(),
Idx = a,
Isbn = List_Book.Rows[a].Cells["ISBN13"].Value.ToString(),
BookName = List_Book.Rows[a].Cells["book_name"].Value.ToString(),
Author = List_Book.Rows[a].Cells["author"].Value.ToString(),
Publisher = List_Book.Rows[a].Cells["book_comp"].Value.ToString(),
Price = List_Book.Rows[a].Cells["pay"].Value.ToString()
Price = Convert.ToInt32( List_Book.Rows[a].Cells["pay"].Value?.ToString() ?? "0")
};
fb.InitFillBlank(item);
}
@@ -1591,7 +1591,7 @@ namespace UniMarc
{
if (string.IsNullOrEmpty(fbItem.BookMarc)) continue;
int targetListIdx = int.Parse(fbItem.Idx);
int targetListIdx = (fbItem.Idx);
if (targetListIdx >= 0 && targetListIdx < List_Book.Rows.Count)
{
List_Book.Rows[targetListIdx].Cells["db_marc"].Value = fbItem.BookMarc;

View File

@@ -40,7 +40,7 @@ namespace UniMarc
Help008Tag tag008 = new Help008Tag();
Skill_Search_Text search_Text = new Skill_Search_Text();
String_Text st = new String_Text();
Mac_List ml;
MacListItem ml;
public SortableBindingList<MarcBookItem> dataList = new SortableBindingList<MarcBookItem>();
public MacEditorParameter Param;
MacListItem pItem = null;
@@ -64,12 +64,13 @@ namespace UniMarc
bs1.MovePrevious();
}
public Marc2(Mac_List _ml)
public Marc2(MacListItem _ml)
{
InitializeComponent();
ml = _ml;
mUserName = PUB.user.UserName;
marcEditorControl1.db = this.db;
this.input_list(ml);
}
@@ -108,7 +109,7 @@ namespace UniMarc
/// </summary>
/// <param name="date">목록일자</param>
/// <param name="value">목록명</param>
public void input_list(MacListItem item)// )
private void input_list(MacListItem item)// )
{
this.pItem = item;
//string l_idx, string value, string C_idx, string custidx, string custname
@@ -156,11 +157,6 @@ namespace UniMarc
"WHERE `{2}` = \"{4}\" AND `{3}` = \"{5}\"" +
"ORDER BY `idx` ASC;", Area, "Obj_List_Book", sear_tbl[0], sear_tbl[1], sear_col[0], sear_col[1]);
var db_res = Helper_DB.ExecuteDataTable(cmd);// db.DB_Send_CMD_Search(cmd);
//string[] db_data = db_res.Split('|');
string[] grid = {
"", "", "", "", "",
"", "", "", "", "",
"", "", "V", "", "" };
mLoadCompleted = false;
@@ -168,7 +164,7 @@ namespace UniMarc
foreach (DataRow dr in db_res.Rows)// (int a = 0; a < db_data.Length - 1; a += 11)
{
MarcBookItem bitem = new MarcBookItem();
bitem.ListIdx = dr["idx"]?.ToString() ?? string.Empty; // db_data[a]; // 0: idx
bitem.ListIdx = dr["idx"] != DBNull.Value ? Convert.ToInt32(dr["idx"]) : 0; // db_data[a]; // 0: idx
bitem.ISBN13 = dr["isbn_marc"]?.ToString() ?? string.Empty; // db_data[a + 1]; // 1: isbn
bitem.Num = (dr["header"]?.ToString() ?? string.Empty) +( dr["num"]?.ToString() ?? string.Empty);
//; //db_data[a + 2] + db_data[a + 3]; // 2: header + num
@@ -176,9 +172,9 @@ namespace UniMarc
bitem.Author = dr["author"]?.ToString() ?? string.Empty; // db_data[a + 5]; // 4: author
bitem.BookComp = dr["book_comp"]?.ToString() ?? string.Empty; //db_data[a + 6]; // 5: book_comp
bitem.Count = dr["count"]?.ToString() ?? string.Empty; // db_data[a + 7]; // 6: count
bitem.Pay = dr["pay"]?.ToString() ?? string.Empty; //db_data[a + 8]; // 7: pay
bitem.Pay = dr["pay"] != DBNull.Value ? Convert.ToInt32(dr["pay"]) : 0; //db_data[a + 8]; // 7: pay
bitem.Url = dr["image_url"]?.ToString() ?? string.Empty; //db_data[a + 9]; // 8: image_url
bitem.MarcIdx = dr["m_idx"]?.ToString() ?? string.Empty; //db_data[a + 10]; // 9: m_idx
bitem.MarcIdx = dr["m_idx"] != DBNull.Value ? Convert.ToInt32(dr["m_idx"]) : 0; //db_data[a + 10]; // 9: m_idx
bitem.search_book_name = dr["search_book_name"]?.ToString() ?? string.Empty; //db_data[a + 11]; // 9: m_idx
bitem.search_author = dr["search_author"]?.ToString() ?? string.Empty; //db_data[a + 12]; // 9: m_idx
@@ -202,7 +198,7 @@ namespace UniMarc
}
/// <summary>
/// 마크 유무 확인하는 함수
/// 모든 데이터의 마크 유무 확인하는 함수
/// </summary>
void chk_Marc()
{
@@ -256,7 +252,7 @@ namespace UniMarc
string[] MarcData = { Chk_Arr[2], Chk_Arr[4], Chk_Arr[6] };
string[] CheckData = { Chk_Arr[3], Chk_Arr[5], Chk_Arr[7] };
dr.MarcIdx = Chk_Arr[0]; //List_Book.Rows[a].Cells["marc_idx"].Value = Chk_Arr[0];
dr.MarcIdx = int.TryParse(Chk_Arr[0], out int midx) ? midx : 0; //List_Book.Rows[a].Cells["marc_idx"].Value = Chk_Arr[0];
dr.DbMarc = MarcData[0];// List_Book.Rows[a].Cells["db_marc"].Value = MarcData[0];//NewestMarc(MarcData, CheckData);
dr.Grade = Chk_Arr[8];// List_Book.Rows[a].Cells["grade"].Value = Chk_Arr[8];
// text008.Text = Chk_Arr[9];
@@ -455,10 +451,12 @@ namespace UniMarc
var dr = this.bs1.Current as MarcBookItem;
//isbn으로 검색을 하게한다.
using (var copySelect = new MarcCopySelect2("isbn", dr.ISBN13))
{
if (copySelect.ShowDialog() == DialogResult.OK)
{
//사용자가 마크를 선택하면 해당 마크인덱스를 셋팅해준다
var selected = copySelect.SelectedItem;
dr.MarcIdx = selected.idx;
dr.User = selected.User;
@@ -474,9 +472,7 @@ namespace UniMarc
var currentitem = this.bs1.Current as MarcBookItem;
if (currentitem != null && currentitem == dr)
{
//List_Book_SelectionChanged(null, null);
bs1_CurrentChanged(null, null);
//bs1.ResetBindings(false);
}
}
}
@@ -910,7 +906,7 @@ namespace UniMarc
if (item.Status == MarcRecordStatus.OtherCompany || item.Status == MarcRecordStatus.None)
{
string[] Insert_tbl = { "ISBN", "서명", "저자", "출판사", "가격", "marc", "비고1", "비고2", "url", "grade", "marc_chk", "user", "division", "008tag", "date", "compidx" };
string[] Insert_col = { this.Param.ISBN13, this.Param.BookName, this.Param.Author, this.Param.Publisher, this.Param.Price, newsavedMarc, this.etc1.Text, this.etc2.Text, this.Param.URL, v_grade, "1", mUserName, this.Param.tag056, this.Param.text008, date, mCompidx };
string[] Insert_col = { this.Param.ISBN13, this.Param.BookName, this.Param.Author, this.Param.Publisher, this.Param.Price.ToString(), newsavedMarc, this.etc1.Text, this.etc2.Text, this.Param.URL, v_grade, "1", mUserName, this.Param.tag056, this.Param.text008, date, mCompidx };
string Incmd = db.DB_INSERT(table_name, Insert_tbl, Insert_col);
PUB.log.Add("INSERT", string.Format("{0}({1},{2}) : {3}", mUserName, mCompidx, item.Status, Incmd));
@@ -918,7 +914,7 @@ namespace UniMarc
long newIdx = db.DB_Send_CMD_Insert_GetIdx(Incmd);
if (newIdx > 0)
{
item.MarcIdx = newIdx.ToString();
item.MarcIdx = (int)newIdx;
}
}
else
@@ -926,7 +922,7 @@ namespace UniMarc
string[] Edit_tbl = { "compidx", "marc", "marc_chk", "marc1", "marc_chk1", "비고1", "비고2", "url", "division", "008tag", "date", "user", "grade" };
string[] Edit_col = { mCompidx, newsavedMarc, "1", this.Param.OriginalMarc, "0", v_etc1, v_etc2, this.Param.URL, this.Param.tag056, this.Param.text008, date, mUserName, v_grade };
string[] Sear_tbl = { "idx", "compidx" };
string[] Sear_col = { item.MarcIdx, mCompidx };
string[] Sear_col = { item.MarcIdx.ToString(), mCompidx };
if (string.IsNullOrEmpty(this.Param.ISBN13)) { UTIL.MsgE("ISBN 데이터가 없습니다."); return; }
@@ -975,7 +971,7 @@ namespace UniMarc
BookName = item.BookName ?? "",
Author = item.Author ?? "",
Publisher = item.BookComp ?? "",
Price = item.Pay ?? ""
Price = item.Pay
};
fb.InitFillBlank(fbItem);
}
@@ -990,10 +986,10 @@ namespace UniMarc
{
if (string.IsNullOrEmpty(fbItem.BookMarc)) continue;
int targetListIdx = int.Parse(fbItem.Idx);
int targetListIdx = fbItem.Idx;
foreach (MarcBookItem item in this.dataList)
{
if (item.ListIdx != null && Convert.ToInt32(item.ListIdx) == targetListIdx)
if (item.ListIdx == targetListIdx)
{
item.DbMarc = fbItem.BookMarc;
item.Status = MarcRecordStatus.NewFetched;
@@ -1079,16 +1075,16 @@ namespace UniMarc
string bookName = dr.BookName;// List_Book.Rows[row_idx].Cells["book_name"].Value?.ToString() ?? "";
string author = dr.Author;// List_Book.Rows[row_idx].Cells["author"].Value?.ToString() ?? "";
string publisher = dr.BookComp;// List_Book.Rows[row_idx].Cells["book_comp"].Value?.ToString() ?? "";
string price = dr.Pay;// List_Book.Rows[row_idx].Cells["pay"].Value?.ToString() ?? "";
var price = dr.Pay;// List_Book.Rows[row_idx].Cells["pay"].Value?.ToString() ?? "";
string url = dr.Url;// List_Book.Rows[row_idx].Cells["url"].Value?.ToString() ?? ""; // or image_url?
string marcIdx = dr.MarcIdx;// List_Book.Rows[row_idx].Cells["marc_idx"].Value?.ToString() ?? "";
var marcIdx = dr.MarcIdx;// List_Book.Rows[row_idx].Cells["marc_idx"].Value?.ToString() ?? "";
string dbMarc = dr.DbMarc;// List_Book.Rows[row_idx].Cells["db_marc"].Value?.ToString() ?? "";
string grade = dr.Grade;// List_Book.Rows[row_idx].Cells["grade"].Value?.ToString() ?? "";
string user = dr.User;// List_Book.Rows[row_idx].Cells["user"].Value?.ToString() ?? "";
string saveDate = dr.SaveDate;// List_Book.Rows[row_idx].Cells["SaveDate"].Value?.ToString() ?? "";
string listIdx = dr.ListIdx;// List_Book.Rows[row_idx].Cells["list_idx"].Value?.ToString() ?? ""; // verify this column name in input_list
var listIdx = dr.ListIdx;// List_Book.Rows[row_idx].Cells["list_idx"].Value?.ToString() ?? ""; // verify this column name in input_list
this.lbListIdx.Text = $"Row:{SaveRowIdx},List:{listIdx}";
var remark = ReadRemark(dr.MarcIdx);
var remark = ReadRemark(dr.MarcIdx.ToString());
this.Param = new MacEditorParameter
{
ISBN13 = isbn13,

View File

@@ -15,16 +15,20 @@ namespace UniMarc
public class MarcBookItem
{
public string ListIdx { get; set; }
public int ListIdx { get; set; }
public string ISBN13 { get; set; }
public string Num { get; set; }
public string BookName { get; set; }
public string Author { get; set; }
public string BookComp { get; set; }
public string Count { get; set; }
public string Pay { get; set; }
/// <summary>
/// ´Ü°¡(Á¤°¡´Â price¿¡ ÀÖ´Ù)
/// </summary>
public int Pay { get; set; }
public string Url { get; set; }
public string MarcIdx { get; set; }
public int MarcIdx { get; set; }
public string DbMarc { get; set; }
private MarcRecordStatus _status = MarcRecordStatus.None;
public MarcRecordStatus Status

View File

@@ -4,7 +4,7 @@ namespace UniMarc
{
public class MarcCopyItem
{
public string idx { get; set; }
public int idx { get; set; }
public string compidx { get; set; }
public string ISBN { get; set; }
public string Title { get; set; }

View File

@@ -1,4 +1,5 @@
using AR;
using Microsoft.Office.Interop.Excel;
using System;
using System.Collections.Generic;
using System.ComponentModel;
@@ -69,7 +70,7 @@ namespace UniMarc
string Table = "Marc";
string Query = string.Format("SELECT {0} FROM {1} WHERE `{2}` like \"%{3}%\";", Area, Table, search_col, search_Target);
DataTable dt = db.DB_Send_CMD_Search_DataTable(Query);
var dt = db.DB_Send_CMD_Search_DataTable(Query);
InputGrid(dt);
}
@@ -93,7 +94,7 @@ namespace UniMarc
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "Marc", HeaderText = "Marc", Name = "marc", Width = 200 });
}
private void InputGrid(DataTable dt)
private void InputGrid(System.Data.DataTable dt)
{
_list.Clear();
if (dt == null || dt.Rows.Count == 0) return;
@@ -105,7 +106,7 @@ namespace UniMarc
{
var item = new MarcCopyItem
{
idx = row["idx"].ToString(),
idx = Convert.ToInt32( row["idx"]),
compidx = row["compidx"].ToString(),
ISBN = row["ISBN"].ToString(),
Title = row["Title"].ToString(),
@@ -306,7 +307,7 @@ namespace UniMarc
var item = (MarcCopyItem)dataGridView1.Rows[row].DataBoundItem;
if (item == null) return;
string idx = item.idx;
var idx = item.idx;
string compidx = item.compidx;
if (compidx != PUB.user.CompanyIdx)

View File

@@ -8,7 +8,7 @@ namespace UniMarc
{
public class MarcPlanItem
{
public string Idx { get; set; }
public int Idx { get; set; }
public string Num { get; set; }
public string RegNum { get; set; }
public string ClassCode { get; set; }
@@ -25,8 +25,8 @@ namespace UniMarc
public string SBookNum2 { get; set; }
public string Author { get; set; }
public string BookComp { get; set; }
public string Price { get; set; }
public string Midx { get; set; }
public int Price { get; set; }
public int Midx { get; set; }
public string Marc { get; set; }
public string SearchTag2 { get; set; }
public string ColCheck { get; set; } = "F";

View File

@@ -289,7 +289,7 @@ namespace UniMarc
isBreak = false;
var item = (FillBlankItem)bs1.List[a];
int idx = int.Parse(item.Idx);
int idx = item.Idx;
string isbn = item.Isbn;
if (string.IsNullOrEmpty(isbn))

View File

@@ -106,7 +106,7 @@ namespace UniMarc
{
bs1.DataSource = sub.ResultItems;
}
else if (!string.IsNullOrEmpty(sub.ResultIdx))
else if (sub.ResultIdx >= 0)
{
mk_Grid(sub.ResultListName, sub.ResultDate);
mk_Panel(sub.ResultIdx, sub.ResultListName, sub.ResultDate);
@@ -154,7 +154,7 @@ namespace UniMarc
foreach (DataRow dr in res.Rows)
{
MarcPlanItem item = new MarcPlanItem();
item.Idx = dr["idx"].ToString();
item.Idx = dr["idx"] != DBNull.Value ? Convert.ToInt32(dr["idx"]) : 0;
item.Num = dr["num"].ToString();
if (string.IsNullOrEmpty(item.Num))
{
@@ -173,8 +173,8 @@ namespace UniMarc
item.SBookNum2 = dr["s_book_num2"].ToString();
item.Author = dr["author"].ToString();
item.BookComp = dr["book_comp"].ToString();
item.Price = dr["price"].ToString();
item.Midx = dr["midx"].ToString();
item.Price = dr["price"] != DBNull.Value ? Convert.ToInt32(dr["price"]) : 0;
item.Midx = dr["midx"] != DBNull.Value ? Convert.ToInt32(dr["midx"]) : 0;
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;
@@ -212,12 +212,12 @@ namespace UniMarc
}
public void mk_Panel(string idx, string ListName, string date)
public void mk_Panel(int idx, string ListName, string date)
{
string Table = "Specs_List";
string Area = "`first_Author`, `symbol_Author`,`symbol_AuthorE`, `book_Author`, `divType`, `divNum`";
string[] Search_col = { "idx", "work_list", "date" };
string[] Search_data = { idx, ListName, date };
string[] Search_data = { idx.ToString(), ListName, date };
string cmd = db.More_DB_Search(Table, Search_col, Search_data, Area);
string res = db.DB_Send_CMD_Search(cmd);
@@ -257,10 +257,10 @@ namespace UniMarc
string bookName = item.BookName;
string author = item.Author;
string publisher = item.BookComp;
string price = item.Price;
var price = item.Price;
string isbn = item.Isbn;
string idx = item.Idx;
string midx = item.Midx;
var idx = item.Idx;
var midx = item.Midx;
string marc = item.Marc;
string cmd = string.Format("SELECT `user`, `editDate`, `etc1`, `etc2` FROM `Specs_Marc` WHERE `idx` = \"{0}\"", midx);
@@ -384,12 +384,12 @@ namespace UniMarc
{
var item = new FillBlankItem
{
Idx = a.ToString(),
Idx = a,
Isbn = mItem.Isbn ?? "",
BookName = mItem.BookName ?? "",
Author = mItem.Author ?? "",
Publisher = mItem.BookComp ?? "",
Price = mItem.Price ?? ""
Price = mItem.Price
};
dataList.Add(item);
}
@@ -407,7 +407,7 @@ namespace UniMarc
{
if (string.IsNullOrEmpty(fbItem.BookMarc)) continue;
int rowIdx = int.Parse(fbItem.Idx);
int rowIdx = fbItem.Idx;
if (rowIdx >= 0 && rowIdx < bs1.Count)
{
var mItem = (MarcPlanItem)bs1.List[rowIdx];
@@ -1692,12 +1692,12 @@ namespace UniMarc
{
var fbItem = new FillBlankItem
{
Idx = a.ToString(), // 그리드 순서를 인덱스로 사용
Idx = a, // 그리드 순서를 인덱스로 사용
Isbn = item.Isbn ?? "",
BookName = item.BookName ?? "",
Author = item.Author ?? "",
Publisher = item.BookComp ?? "",
Price = item.Price ?? ""
Price = item.Price
};
fb.InitFillBlank(fbItem);
}
@@ -1711,7 +1711,7 @@ namespace UniMarc
{
if (string.IsNullOrEmpty(fbItem.BookMarc)) continue;
int targetIdx = int.Parse(fbItem.Idx);
int targetIdx = fbItem.Idx;
if (targetIdx >= 0 && targetIdx < bs1.Count)
{
var item = bs1.List[targetIdx] as MarcPlanItem;

View File

@@ -16,7 +16,7 @@ namespace UniMarc
Helper_DB db = new Helper_DB();
//string compidx;
public string ResultIdx { get; private set; }
public int ResultIdx { get; private set; }
public string ResultListName { get; private set; }
public string ResultDate { get; private set; }
public List<MarcPlanItem> ResultItems { get; private set; }
@@ -89,7 +89,7 @@ namespace UniMarc
MarcPlanItem item = new MarcPlanItem
{
Idx = grid[0],
Idx = int.Parse(grid[0]),
ListName = grid[1],
Date = grid[2],
User = grid[3],
@@ -249,7 +249,7 @@ namespace UniMarc
if (OpenFileDialog.ShowDialog() != DialogResult.OK) return;
var filePath = OpenFileDialog.FileName;
try
{
var filedata = System.IO.File.ReadAllText(filePath, System.Text.Encoding.Default);
@@ -292,17 +292,17 @@ namespace UniMarc
continue;
}
// string[] Search_Res = st.Take_Tag(grid[a], Search);
// string[] Search_Res = st.Take_Tag(grid[a], Search);
//저자기호목록 마지막것을 우선시한다 ("100a", "110a", "111a")
// string[] Author_Search = { "100a", "110a", "111a" };
// string[] Author_Search = { "100a", "110a", "111a" };
//저자기호확인
var v_author = string.Empty;
var v_111a = fullparser.GetTag("111a").FirstOrDefault();
var v_110a = fullparser.GetTag("110a").FirstOrDefault();
var v_110a = fullparser.GetTag("110a").FirstOrDefault();
var v_100a = fullparser.GetTag("100a").FirstOrDefault();
if (v_111a.isEmpty() == false) v_author = v_111a;
else if (v_110a.isEmpty() == false) v_author = v_110a;
else if (v_100a.isEmpty() == false) v_author = v_100a;
@@ -324,7 +324,7 @@ namespace UniMarc
SBookNum2 = fullparser.GetTag("490v").FirstOrDefault(),//Search_Res[11],총서번호2
Author = v_author,
BookComp = fullparser.GetTag("260b").FirstOrDefault(),//Search_Res[12],출판사
Price = fullparser.GetTag("950b").FirstOrDefault(),//Search_Res[13],정가
Price = Convert.ToInt32(fullparser.GetTag("950b").FirstOrDefault()),//Search_Res[13],정가
Marc = fullmarc,
ColCheck = "T"
};

View File

@@ -278,7 +278,7 @@ namespace UniMarc
else
insert_marc_data[17] = num.ToString();
insert_marc_data[18] = outnum;
insert_marc_data[19] = dr.MarcIdx;// Convert.ToString(marc.List_Book.Rows[row[a]].Cells["marc_idx"].Value);
insert_marc_data[19] = dr.MarcIdx.ToString();// Convert.ToString(marc.List_Book.Rows[row[a]].Cells["marc_idx"].Value);
insert_marc_data[20] = dr.SaveDate;// Convert.ToString(marc.List_Book.Rows[row[a]].Cells["SaveDate"].Value);
insert_marc_data[21] = dr.User;// Convert.ToString(marc.List_Book.Rows[row[a]].Cells["user"].Value);

View File

@@ -365,11 +365,11 @@ namespace UniMarc
Author = currentItem.author,
BookName = currentItem.book_name,
ISBN13 = currentItem.ISBN,
MarcIdx = currentItem.idx,
MarcIdx = int.TryParse(currentItem.idx, out int midx) ? midx : 0,
User = currentItem.User,
SaveDate = currentItem.date,
Publisher = currentItem.book_comp,
Price = currentItem.price,
Price = int.TryParse(currentItem.price, out int pr) ? pr : 0,
text008 = "",
tag056 = "",
NewMake = false,
@@ -426,12 +426,12 @@ namespace UniMarc
{
var itemfb = new FillBlankItem
{
Idx = a.ToString(),
Idx = a,
Isbn = mItem.ISBN ?? "",
BookName = mItem.book_name ?? "",
Author = mItem.author ?? "",
Publisher = mItem.book_comp ?? "",
Price = mItem.price ?? ""
Price = int.TryParse(mItem.price, out int prfb) ? prfb : 0
};
dataList.Add(itemfb);
}
@@ -450,7 +450,7 @@ namespace UniMarc
{
if (string.IsNullOrEmpty(fbItem.BookMarc)) continue;
int rowIdx = int.Parse(fbItem.Idx);
int rowIdx = fbItem.Idx;
if (rowIdx >= 0 && rowIdx < bs1.Count)
{
var mItem = (SearchInforItem)bs1.List[rowIdx];
@@ -604,11 +604,11 @@ namespace UniMarc
Author = currentItem.author,
BookName = currentItem.book_name,
ISBN13 = currentItem.ISBN,
MarcIdx = currentItem.idx,
MarcIdx = int.TryParse(currentItem.idx, out int midx) ? midx : 0,
User = currentItem.User,
SaveDate = currentItem.date,
Publisher = currentItem.book_comp,
Price = currentItem.price,
Price = int.TryParse(currentItem.price, out int pr) ? pr : 0,
text008 = "",
tag056 = "",
NewMake = false,
@@ -662,12 +662,12 @@ namespace UniMarc
{
var itemfb = new FillBlankItem
{
Idx = a.ToString(),
Idx = a,
Isbn = mItem.ISBN ?? "",
BookName = mItem.book_name ?? "",
Author = mItem.author ?? "",
Publisher = mItem.book_comp ?? "",
Price = mItem.price ?? ""
Price = int.TryParse(mItem.price, out int prfb) ? prfb : 0
};
dataList.Add(itemfb);
}
@@ -686,7 +686,7 @@ namespace UniMarc
{
if (string.IsNullOrEmpty(fbItem.BookMarc)) continue;
int rowIdx = int.Parse(fbItem.Idx);
int rowIdx = fbItem.Idx;
if (rowIdx >= 0 && rowIdx < bs1.Count)
{
var mItem = (SearchInforItem)bs1.List[rowIdx];

View File

@@ -199,7 +199,7 @@ namespace UniMarc
if (Target == SaveTarget.SpecsMarc)
{
Table = "Specs_Marc";
Search_data = new string[] { _param.ListIdx };
Search_data = new string[] { _param.ListIdx.ToString() };
Update_Col = new string[] {
"marc", "book_name", "etc1", "etc2",
"r_num", "class_symbol", "author_symbol", "prefix", "s_book_name1",
@@ -219,7 +219,7 @@ namespace UniMarc
else // MasterMarc
{
Table = "Marc";
Search_data = new string[] { _param.MarcIdx };
Search_data = new string[] { _param.MarcIdx.ToString() };
// 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[] {