Compare commits
8 Commits
3a503dda6d
...
marc2listu
| Author | SHA1 | Date | |
|---|---|---|---|
| 00e736d668 | |||
| e75400cdc4 | |||
| 7288d8c95c | |||
| 054e1c9c10 | |||
| 90ed6e285f | |||
| a226c370b2 | |||
| b13f01a3dd | |||
| 5978d45af6 |
402
unimarc/unimarc/Helper/Database.cs
Normal file
402
unimarc/unimarc/Helper/Database.cs
Normal file
@@ -0,0 +1,402 @@
|
||||
using AR;
|
||||
using MySql.Data.MySqlClient;
|
||||
using OpenQA.Selenium;
|
||||
using Renci.SshNet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Security.Policy;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web.UI;
|
||||
using System.Windows.Forms;
|
||||
using UniMarc.BaroService_TI;
|
||||
using UniMarc.Properties;
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
|
||||
public partial class Helper_DB
|
||||
{
|
||||
//static string cs = "";
|
||||
public enum eDbType
|
||||
{
|
||||
unimarc,
|
||||
cl_marc
|
||||
}
|
||||
public static MySqlConnection CreateConnection(eDbType dbtype)
|
||||
{
|
||||
var dbname = dbtype.ToString();
|
||||
string strConnection = string.Format(
|
||||
"Server={0};" +
|
||||
"Port={1};" +
|
||||
$"Database={dbname};" +
|
||||
"uid={2};" +
|
||||
"pwd={3};", ServerData[0], DBData[0], DBData[1], DBData[2]);
|
||||
return new MySqlConnection(strConnection);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 입력한 쿼리의 결과를 데이터테이블로 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cn"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable ExecuteDataTable(string query, MySqlConnection cn = null)
|
||||
{
|
||||
var bLocalCN = cn == null;
|
||||
DataTable dt = new DataTable();
|
||||
try
|
||||
{
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);// new MySqlConnection(cs);
|
||||
var cmd = new MySqlCommand(query, cn);
|
||||
cn.Open();
|
||||
using (MySqlDataAdapter adapter = new MySqlDataAdapter(cmd))
|
||||
{
|
||||
adapter.Fill(dt);
|
||||
}
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
if (bLocalCN) cn.Dispose();
|
||||
return dt;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
UTIL.MsgE(ex.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 오류발생시 null을 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="tableName"></param>
|
||||
/// <param name="columns"></param>
|
||||
/// <param name="wheres"></param>
|
||||
/// <param name="orders"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable ExecuteQueryData(string tableName, string columns = "*", string wheres = "", string orders = "", MySqlConnection cn = null)
|
||||
{
|
||||
var sql = $"select {columns} from {tableName}";
|
||||
if (wheres.isEmpty() == false) sql += " where " + wheres;
|
||||
if (orders.isEmpty() == false) sql += " order by " + orders;
|
||||
return ExecuteDataTable(sql, cn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 오류발생시 -1을 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
public static (int applyCount, string errorMessage) ExcuteNonQuery(string query, MySqlConnection cn = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var bLocalCN = cn == null;
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);//new MySqlConnection(cs);
|
||||
var cmd = new MySqlCommand(query, cn);
|
||||
cn.Open();
|
||||
var cnt = cmd.ExecuteNonQuery();
|
||||
cmd.Dispose();
|
||||
if (bLocalCN) cn.Dispose();
|
||||
return (cnt, string.Empty);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return (-1, ex.Message);
|
||||
}
|
||||
}
|
||||
public static (long value, string errorMessage) ExcuteInsertGetIndex(string cmd, MySqlConnection cn = null)
|
||||
{
|
||||
long lastId = -1;
|
||||
var bLocalCN = cn == null;
|
||||
string message;
|
||||
try
|
||||
{
|
||||
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);//new MySqlConnection(cs);
|
||||
using (var sqlcmd = new MySqlCommand(cmd, cn))
|
||||
{
|
||||
cn.Open();
|
||||
sqlcmd.ExecuteNonQuery();
|
||||
lastId = sqlcmd.LastInsertedId;
|
||||
}
|
||||
if (bLocalCN) cn.Dispose();
|
||||
message = "";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
lastId = -1;
|
||||
message = ex.Message;
|
||||
}
|
||||
return (lastId, message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 단일항목값을 반환 합니다
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
public static (object value, string errorMessage) ExcuteScalar(string query, MySqlConnection cn = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var bLocalCN = cn == null;
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);//new MySqlConnection(cs);
|
||||
var cmd = new MySqlCommand(query, cn);
|
||||
cn.Open();
|
||||
var val = cmd.ExecuteScalar();
|
||||
cmd.Dispose();
|
||||
if (bLocalCN) cn.Dispose();
|
||||
return (val, string.Empty);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return (null, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Insert 명령을 수행한 후 자동 생성된 index값을 반환합니다.
|
||||
/// 오류발생시에는 -1을 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="cmd"></param>
|
||||
/// <param name="cn"></param>
|
||||
/// <returns></returns>
|
||||
public static long DB_Send_CMD_Insert_GetIdx(string cmd, MySqlConnection cn = null)
|
||||
{
|
||||
long lastId = -1;
|
||||
var bLocalCN = cn == null;
|
||||
try
|
||||
{
|
||||
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);//new MySqlConnection(cs);
|
||||
using (var sqlcmd = new MySqlCommand(cmd, cn))
|
||||
{
|
||||
cn.Open();
|
||||
sqlcmd.ExecuteNonQuery();
|
||||
lastId = sqlcmd.LastInsertedId;
|
||||
}
|
||||
if (bLocalCN) cn.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
UTIL.MsgE($"데이터베이스 실행오류\n{ex.Message}");
|
||||
}
|
||||
return lastId;
|
||||
}
|
||||
|
||||
|
||||
public static MarcBasicInfo GetBasicMarcInfo(string FullMarc)
|
||||
{
|
||||
MarcBasicInfo retval = new MarcBasicInfo();
|
||||
|
||||
|
||||
//상황에 맞게 업데이트 명령을 처리한다.
|
||||
var parser = new MarcParser();
|
||||
var ret = parser.ParseFullMarc(FullMarc);
|
||||
if (ret.success == false)
|
||||
{
|
||||
retval.Success = false;
|
||||
retval.Message = ret.message;
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
||||
//ISBN와 가격 (처음나오는 020태그의 값을 적용)
|
||||
var tag_020 = parser.GetTag<MarcField>("020").FirstOrDefault();
|
||||
if (tag_020 != null)
|
||||
{
|
||||
retval.ISBN = tag_020.GetSubfieldValue('a');
|
||||
retval.Price = tag_020.GetSubfieldValue('c');
|
||||
}
|
||||
|
||||
//저자(100 -> 110 -> 111 순으로 적용)
|
||||
var tag_100 = parser.GetTag<MarcField>("100").FirstOrDefault();
|
||||
var tag_110 = parser.GetTag<MarcField>("110").FirstOrDefault();
|
||||
var tag_111 = parser.GetTag<MarcField>("111").FirstOrDefault();
|
||||
if (tag_111 != null)
|
||||
retval.Author = tag_111.GetSubfieldValue('a');
|
||||
else if (tag_110 != null)
|
||||
retval.Author = tag_110.GetSubfieldValue('a');
|
||||
else if (tag_100 != null)
|
||||
retval.Author = tag_100.GetSubfieldValue('a');
|
||||
|
||||
//서명
|
||||
retval.Title = parser.GetTag<MarcSubfield>("245a").FirstOrDefault()?.Value ?? string.Empty;
|
||||
//string x245 = parser.GetTag<MarcSubfield>("245x").FirstOrDefault()?.Value ?? string.Empty;
|
||||
//string b245 = parser.GetTag<MarcSubfield>("245b").FirstOrDefault()?.Value ?? string.Empty;
|
||||
//if (x245 != "") retval.Title += " = " + x245;
|
||||
//if (b245 != "") retval.Title += " : " + b245;
|
||||
|
||||
|
||||
//출판사
|
||||
var tag_264b = parser.GetTag<MarcSubfield>("264b").FirstOrDefault();
|
||||
var tag_260b = parser.GetTag<MarcSubfield>("260b").FirstOrDefault();
|
||||
if (tag_264b != null)
|
||||
retval.Publisher = tag_264b?.Value ?? string.Empty;
|
||||
else if (tag_260b != null)
|
||||
retval.Publisher = tag_260b?.Value ?? string.Empty;
|
||||
|
||||
//056a
|
||||
retval.Tag056 = parser.GetTag("056a").FirstOrDefault() ?? string.Empty;
|
||||
retval.Tag008 = parser.GetTag("008").FirstOrDefault() ?? string.Empty;
|
||||
|
||||
//총서명(440a)
|
||||
retval.fulltitle = parser.GetTag("440a").FirstOrDefault() ?? string.Empty;
|
||||
|
||||
//총서번호(440v)
|
||||
retval.fulltitleno = parser.GetTag("440v").FirstOrDefault() ?? string.Empty;
|
||||
|
||||
//권차(245n)
|
||||
retval.kwoncha = parser.GetTag("245n").FirstOrDefault() ?? string.Empty;
|
||||
|
||||
//권차서명(245p)
|
||||
retval.kwoncha_title = parser.GetTag("245p").FirstOrDefault() ?? string.Empty;
|
||||
|
||||
//판차(250a)
|
||||
retval.pancha = parser.GetTag("250a").FirstOrDefault() ?? string.Empty;
|
||||
|
||||
retval.Success = true;
|
||||
return retval;
|
||||
}
|
||||
|
||||
public static string Make_InsertQuery(string tableName, Dictionary<string, object> column_and_values)
|
||||
{
|
||||
string columns = string.Join(", ", column_and_values.Keys.Select(k => $"`{k}`"));
|
||||
string values = string.Join(", ", column_and_values.Values.Select(v =>
|
||||
{
|
||||
string s = v?.ToString() ?? "";
|
||||
return $"\"{s.Replace("\"", "\"\"")}\"";
|
||||
}));
|
||||
|
||||
return $"INSERT INTO `{tableName}` ({columns}) VALUES ({values});";
|
||||
}
|
||||
|
||||
public static string Make_UpdateQuery(string tableName, Dictionary<string, object> column_and_values, Dictionary<string, object> where_column_and_values)
|
||||
{
|
||||
string setClause = string.Join(", ", column_and_values.Select(kv =>
|
||||
{
|
||||
string s = kv.Value?.ToString() ?? "";
|
||||
return $"`{kv.Key}` = \"{s.Replace("\"", "\"\"")}\"";
|
||||
}));
|
||||
|
||||
string whereClause = string.Join(" AND ", where_column_and_values.Select(kv =>
|
||||
{
|
||||
string s = kv.Value?.ToString() ?? "";
|
||||
return $"`{kv.Key}` = \"{s.Replace("\"", "\"\"")}\"";
|
||||
}));
|
||||
|
||||
return $"UPDATE `{tableName}` SET {setClause} WHERE {whereClause};";
|
||||
}
|
||||
|
||||
|
||||
public static (bool result, int newidx, string message,string date) UpdateMarc(int midx, string FullMarc, int v_grade,
|
||||
string etc1, string etc2, string url, string v_orgmarc)
|
||||
{
|
||||
var isUpdate = midx > 0;
|
||||
|
||||
var v_username = PUB.user.UserName;
|
||||
var v_compidx = PUB.user.CompanyIdx;
|
||||
string v_date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
|
||||
//상황에 맞게 업데이트 명령을 처리한다.
|
||||
var basicinfo = GetBasicMarcInfo(FullMarc);
|
||||
if (basicinfo.Success == false) return (false, 0, basicinfo.Message,v_date);
|
||||
|
||||
|
||||
|
||||
|
||||
// 1. DB 작업 (저장 전략 결정: Status 기준)
|
||||
if (isUpdate == false)
|
||||
{
|
||||
var insertData = new Dictionary<string, object>
|
||||
{
|
||||
{ "compidx", v_compidx },
|
||||
{ "ISBN", basicinfo.ISBN },
|
||||
{ "서명", basicinfo.Title },
|
||||
{ "저자", basicinfo.Author },
|
||||
{ "출판사", basicinfo.Publisher },
|
||||
{ "가격", basicinfo.Price },
|
||||
{ "총서명", basicinfo.fulltitle },
|
||||
{ "총서번호", basicinfo.fulltitleno },
|
||||
|
||||
{ "권차", basicinfo.kwoncha },
|
||||
{ "권차서명", basicinfo.kwoncha_title },
|
||||
{ "판차", basicinfo.pancha },
|
||||
|
||||
{ "marc", FullMarc },
|
||||
{ "marc_chk", "1" },
|
||||
{ "비고1", etc1 },
|
||||
{ "비고2", etc2 },
|
||||
{ "url", url },
|
||||
{ "division", basicinfo.Tag056 },
|
||||
{ "008tag", basicinfo.Tag008 },
|
||||
{ "date", v_date },
|
||||
{ "user", v_username },
|
||||
{ "grade", v_grade.ToString() }
|
||||
};
|
||||
|
||||
string Incmd = Make_InsertQuery("Marc", insertData);
|
||||
PUB.log.Add("INSERT", string.Format("{0}({1}) : {2}", v_username, v_compidx, Incmd));
|
||||
|
||||
var newIdx = Helper_DB.DB_Send_CMD_Insert_GetIdx(Incmd);
|
||||
if (newIdx > 0)
|
||||
{
|
||||
midx = (int)newIdx;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var updateData = new Dictionary<string, object>
|
||||
{
|
||||
{ "ISBN", basicinfo.ISBN },
|
||||
{ "서명", basicinfo.Title },
|
||||
{ "저자", basicinfo.Author },
|
||||
{ "출판사", basicinfo.Publisher },
|
||||
{ "가격", basicinfo.Price },
|
||||
{ "총서명", basicinfo.fulltitle },
|
||||
{ "총서번호", basicinfo.fulltitleno },
|
||||
|
||||
{ "권차", basicinfo.kwoncha },
|
||||
{ "권차서명", basicinfo.kwoncha_title },
|
||||
{ "판차", basicinfo.pancha },
|
||||
|
||||
{ "marc", FullMarc },
|
||||
{ "marc1", v_orgmarc },
|
||||
{ "marc_chk", "1" },
|
||||
{ "marc_chk1", "0" },
|
||||
{ "비고1", etc1 },
|
||||
{ "비고2", etc2 },
|
||||
{ "url", url },
|
||||
{ "division", basicinfo.Tag056 },
|
||||
{ "008tag", basicinfo.Tag008 },
|
||||
{ "date", v_date },
|
||||
{ "user", v_username },
|
||||
{ "grade", v_grade.ToString() }
|
||||
};
|
||||
|
||||
var whereClause = new Dictionary<string, object>
|
||||
{
|
||||
{ "idx", midx },
|
||||
{ "compidx", v_compidx }
|
||||
};
|
||||
|
||||
string U_cmd = Make_UpdateQuery("Marc", updateData, whereClause);
|
||||
PUB.log.Add("Update", string.Format("{0}({1}) : {2}", v_username, v_compidx, U_cmd.Replace("\r", " ").Replace("\n", " ")));
|
||||
var ret = Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
if (ret.applyCount != 1)
|
||||
{
|
||||
return (false, midx, $"업데이트된 행의 수가 1이 아닙니다. 적용된 행 수: {ret.applyCount}, 오류 메시지: {ret.errorMessage}", v_date);
|
||||
}
|
||||
}
|
||||
return (true, midx, string.Empty, v_date);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,184 +14,6 @@ using UniMarc.Properties;
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
|
||||
public partial class Helper_DB
|
||||
{
|
||||
//static string cs = "";
|
||||
public enum eDbType
|
||||
{
|
||||
unimarc,
|
||||
cl_marc
|
||||
}
|
||||
public static MySqlConnection CreateConnection(eDbType dbtype)
|
||||
{
|
||||
var dbname = dbtype.ToString();
|
||||
string strConnection = string.Format(
|
||||
"Server={0};" +
|
||||
"Port={1};" +
|
||||
$"Database={dbname};" +
|
||||
"uid={2};" +
|
||||
"pwd={3};", ServerData[0], DBData[0], DBData[1], DBData[2]);
|
||||
return new MySqlConnection(strConnection);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 입력한 쿼리의 결과를 데이터테이블로 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <param name="cn"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable ExecuteDataTable(string query, MySqlConnection cn=null)
|
||||
{
|
||||
var bLocalCN = cn == null;
|
||||
DataTable dt = new DataTable();
|
||||
try
|
||||
{
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);// new MySqlConnection(cs);
|
||||
var cmd = new MySqlCommand(query, cn);
|
||||
cn.Open();
|
||||
using (MySqlDataAdapter adapter = new MySqlDataAdapter(cmd))
|
||||
{
|
||||
adapter.Fill(dt);
|
||||
}
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
if (bLocalCN) cn.Dispose();
|
||||
return dt;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
UTIL.MsgE(ex.ToString());
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 오류발생시 null을 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="tableName"></param>
|
||||
/// <param name="columns"></param>
|
||||
/// <param name="wheres"></param>
|
||||
/// <param name="orders"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable ExecuteQueryData(string tableName, string columns = "*", string wheres = "", string orders = "", MySqlConnection cn = null)
|
||||
{
|
||||
var sql = $"select {columns} from {tableName}";
|
||||
if (wheres.isEmpty() == false) sql += " where " + wheres;
|
||||
if (orders.isEmpty() == false) sql += " order by " + orders;
|
||||
return ExecuteDataTable(sql, cn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 오류발생시 -1을 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
public static (int applyCount, string errorMessage) ExcuteNonQuery(string query, MySqlConnection cn = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var bLocalCN = cn == null;
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);//new MySqlConnection(cs);
|
||||
var cmd = new MySqlCommand(query, cn);
|
||||
cn.Open();
|
||||
var cnt = cmd.ExecuteNonQuery();
|
||||
cmd.Dispose();
|
||||
if (bLocalCN) cn.Dispose();
|
||||
return (cnt, string.Empty);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return (-1, ex.Message);
|
||||
}
|
||||
}
|
||||
public static (long value, string errorMessage) ExcuteInsertGetIndex(string cmd, MySqlConnection cn = null)
|
||||
{
|
||||
long lastId = -1;
|
||||
var bLocalCN = cn == null;
|
||||
string message;
|
||||
try
|
||||
{
|
||||
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);//new MySqlConnection(cs);
|
||||
using (var sqlcmd = new MySqlCommand(cmd, cn))
|
||||
{
|
||||
cn.Open();
|
||||
sqlcmd.ExecuteNonQuery();
|
||||
lastId = sqlcmd.LastInsertedId;
|
||||
}
|
||||
if (bLocalCN) cn.Dispose();
|
||||
message = "";
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
lastId = -1;
|
||||
message = ex.Message;
|
||||
}
|
||||
return (lastId, message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 단일항목값을 반환 합니다
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
public static (object value, string errorMessage) ExcuteScalar(string query, MySqlConnection cn = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var bLocalCN = cn == null;
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);//new MySqlConnection(cs);
|
||||
var cmd = new MySqlCommand(query, cn);
|
||||
cn.Open();
|
||||
var val = cmd.ExecuteScalar();
|
||||
cmd.Dispose();
|
||||
if (bLocalCN) cn.Dispose();
|
||||
return (val, string.Empty);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return (null, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Insert 명령을 수행한 후 자동 생성된 index값을 반환합니다.
|
||||
/// 오류발생시에는 -1을 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="cmd"></param>
|
||||
/// <param name="cn"></param>
|
||||
/// <returns></returns>
|
||||
public long DB_Send_CMD_Insert_GetIdx(string cmd, MySqlConnection cn = null)
|
||||
{
|
||||
long lastId = -1;
|
||||
var bLocalCN = cn == null;
|
||||
try
|
||||
{
|
||||
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);//new MySqlConnection(cs);
|
||||
using (var sqlcmd = new MySqlCommand(cmd, cn))
|
||||
{
|
||||
cn.Open();
|
||||
sqlcmd.ExecuteNonQuery();
|
||||
lastId = sqlcmd.LastInsertedId;
|
||||
}
|
||||
if (bLocalCN) cn.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
UTIL.MsgE($"데이터베이스 실행오류\n{ex.Message}");
|
||||
}
|
||||
return lastId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// DB접속을 도와주는 클래스
|
||||
/// </summary>
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@ namespace UniMarc
|
||||
public string image { get; set; }
|
||||
public string api_data { get; set; }
|
||||
public string search_description { get; set; }
|
||||
public string search_link { get; set; }
|
||||
public string search_url { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -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; }
|
||||
40
unimarc/unimarc/Models/MarcBasicInfo.cs
Normal file
40
unimarc/unimarc/Models/MarcBasicInfo.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
namespace UniMarc
|
||||
{
|
||||
|
||||
public partial class Helper_DB
|
||||
{
|
||||
public class MarcBasicInfo
|
||||
{
|
||||
public string ISBN { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Author { get; set; }
|
||||
public string Publisher { get; set; }
|
||||
public string Price { get; set; }
|
||||
public string Tag056 { get; set; }
|
||||
public string Tag008 { get; set; }
|
||||
public string kwoncha { get; set; }
|
||||
public string kwoncha_title { get; set; }
|
||||
public string pancha { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 총서명(440a)
|
||||
/// </summary>
|
||||
public string fulltitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 총서번호(440v)
|
||||
/// </summary>
|
||||
public string fulltitleno { get; set; }
|
||||
|
||||
public bool Success { get; set; }
|
||||
public string Message { get; set; }
|
||||
|
||||
public MarcBasicInfo()
|
||||
{
|
||||
Success = false;
|
||||
Message = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
@@ -44,6 +48,14 @@ namespace UniMarc
|
||||
public string User { get; set; }
|
||||
public string SaveDate { get; set; }
|
||||
|
||||
public string search_book_name { get; set; }
|
||||
public string search_author { get; set; }
|
||||
public string search_book_comp { get; set; }
|
||||
public string search_description { get; set; }
|
||||
public string search_url { get; set; }
|
||||
|
||||
public string category { get; set; }
|
||||
|
||||
public System.Drawing.Color ForeColor { get; set; } = System.Drawing.Color.Black;
|
||||
public System.Drawing.Color BackColor { get; set; } = System.Drawing.Color.White;
|
||||
|
||||
@@ -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; }
|
||||
@@ -24,6 +24,12 @@ namespace UniMarc
|
||||
public string marc2 { get; set; }
|
||||
public string marc_chk2 { get; set; }
|
||||
|
||||
public string kwoncha { get; set; }
|
||||
public string kwoncha_title { get; set; }
|
||||
public string KwonchaFull { get; set; } // Combined kwoncha + kwoncha_title
|
||||
public string TotalTitleFull { get; set; } // Combined 총서명 + 총서번호
|
||||
public string pancha { get; set; }
|
||||
public string publishdate { get; set; }
|
||||
public string remark1 { get; set; }
|
||||
public string remark2 { get; set; }
|
||||
public string DisplayGrade
|
||||
@@ -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";
|
||||
@@ -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");
|
||||
@@ -55,7 +55,7 @@ namespace UniMarc
|
||||
string Empty_text = string.Format(
|
||||
"020\t \t▼a{1}▼c\\{5}▲\n" +
|
||||
"056\t \t▼a▼25▲\n" +
|
||||
"100\t \t▼a{2}▲\n" +
|
||||
"100\t \t▼a{3}▲\n" +
|
||||
"245\t \t▼a{2}▼d{3}▲\n" +
|
||||
"260\t \t▼b{4}▲\n" +
|
||||
"300\t \t▼a▼c▲\n" +
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2026.02.23.2400")]
|
||||
[assembly: AssemblyFileVersion("2026.02.23.2400")]
|
||||
[assembly: AssemblyVersion("2026.03.26.2350")]
|
||||
[assembly: AssemblyFileVersion("2026.03.26.2350")]
|
||||
|
||||
136
unimarc/unimarc/UC_SelectGrade.Designer.cs
generated
Normal file
136
unimarc/unimarc/UC_SelectGrade.Designer.cs
generated
Normal file
@@ -0,0 +1,136 @@
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class UC_SelectGrade
|
||||
{
|
||||
/// <summary>
|
||||
/// 필수 디자이너 변수입니다.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// 사용 중인 모든 리소스를 정리합니다.
|
||||
/// </summary>
|
||||
/// <param name="disposing">관리되는 리소스를 삭제해야 하면 true이고, 그렇지 않으면 false입니다.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region 구성 요소 디자이너에서 생성한 코드
|
||||
|
||||
/// <summary>
|
||||
/// 디자이너 지원에 필요한 메서드입니다.
|
||||
/// 이 메서드의 내용을 코드 편집기로 수정하지 마세요.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
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.radE = new System.Windows.Forms.RadioButton();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// radD
|
||||
//
|
||||
this.radD.AutoSize = true;
|
||||
this.radD.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.radD.Location = new System.Drawing.Point(147, 4);
|
||||
this.radD.Name = "radD";
|
||||
this.radD.Size = new System.Drawing.Size(34, 20);
|
||||
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", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.radC.Location = new System.Drawing.Point(112, 4);
|
||||
this.radC.Name = "radC";
|
||||
this.radC.Size = new System.Drawing.Size(33, 20);
|
||||
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", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.radB.Location = new System.Drawing.Point(77, 4);
|
||||
this.radB.Name = "radB";
|
||||
this.radB.Size = new System.Drawing.Size(33, 20);
|
||||
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", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.radA.Location = new System.Drawing.Point(40, 4);
|
||||
this.radA.Name = "radA";
|
||||
this.radA.Size = new System.Drawing.Size(35, 20);
|
||||
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(7, 8);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(31, 12);
|
||||
this.label6.TabIndex = 324;
|
||||
this.label6.Text = "등급";
|
||||
//
|
||||
// radE
|
||||
//
|
||||
this.radE.AutoSize = true;
|
||||
this.radE.Font = new System.Drawing.Font("Tahoma", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.radE.Location = new System.Drawing.Point(183, 4);
|
||||
this.radE.Name = "radE";
|
||||
this.radE.Size = new System.Drawing.Size(32, 20);
|
||||
this.radE.TabIndex = 329;
|
||||
this.radE.TabStop = true;
|
||||
this.radE.Text = "E";
|
||||
this.radE.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// UC_SelectGrade
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.Controls.Add(this.radE);
|
||||
this.Controls.Add(this.radD);
|
||||
this.Controls.Add(this.radC);
|
||||
this.Controls.Add(this.radB);
|
||||
this.Controls.Add(this.radA);
|
||||
this.Controls.Add(this.label6);
|
||||
this.Name = "UC_SelectGrade";
|
||||
this.Size = new System.Drawing.Size(221, 29);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
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.RadioButton radE;
|
||||
}
|
||||
}
|
||||
70
unimarc/unimarc/UC_SelectGrade.cs
Normal file
70
unimarc/unimarc/UC_SelectGrade.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
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;
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class UC_SelectGrade : UserControl
|
||||
{
|
||||
public UC_SelectGrade()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
public string GradeName
|
||||
{
|
||||
get
|
||||
{
|
||||
if(Grade == 0) return "A";
|
||||
else if (Grade == 1) return "B";
|
||||
else if (Grade == 2) return "C";
|
||||
else if (Grade == 3) return "D";
|
||||
else if (Grade == 4) return "E";
|
||||
else return "";
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == "A") Grade = 0;
|
||||
else if (value == "B") Grade = 1;
|
||||
else if (value == "C") Grade = 2;
|
||||
else if (value == "D") Grade = 3;
|
||||
else if (value == "E") Grade = 4;
|
||||
else Grade = -1;
|
||||
}
|
||||
}
|
||||
public int Grade
|
||||
{
|
||||
get
|
||||
{
|
||||
if (radA.Checked) return 0;
|
||||
else if (radB.Checked) return 1;
|
||||
else if (radC.Checked) return 2;
|
||||
else if (radD.Checked) return 3;
|
||||
else if (radE.Checked) return 4;
|
||||
else return -1;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (value == -1)
|
||||
{
|
||||
radA.Checked = false;
|
||||
radB.Checked = false;
|
||||
radC.Checked = false;
|
||||
radD.Checked = false;
|
||||
radE.Checked = false;
|
||||
}
|
||||
else if (value == 0) radA.Checked = true;
|
||||
else if (value == 1) radB.Checked = true;
|
||||
else if (value == 2) radC.Checked = true;
|
||||
else if (value == 3) radD.Checked = true;
|
||||
else if (value == 4) radE.Checked = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
120
unimarc/unimarc/UC_SelectGrade.resx
Normal file
120
unimarc/unimarc/UC_SelectGrade.resx
Normal file
@@ -0,0 +1,120 @@
|
||||
<?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>
|
||||
@@ -225,6 +225,8 @@
|
||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="DB_Utils.cs" />
|
||||
<Compile Include="Helper\Database.cs" />
|
||||
<Compile Include="Models\MarcBasicInfo.cs" />
|
||||
<Compile Include="Helper\MarcParser.cs" />
|
||||
<Compile Include="Helper_LibraryDelaySettings.cs" />
|
||||
<Compile Include="ListOfValue\fSelectDT.cs">
|
||||
@@ -270,6 +272,12 @@
|
||||
<Compile Include="SearchModel\NamguLibrarySearcher.cs" />
|
||||
<Compile Include="SearchModel\SeleniumHelper.cs" />
|
||||
<Compile Include="SortableBindingList.cs" />
|
||||
<Compile Include="UC_SelectGrade.cs">
|
||||
<SubType>UserControl</SubType>
|
||||
</Compile>
|
||||
<Compile Include="UC_SelectGrade.Designer.cs">
|
||||
<DependentUpon>UC_SelectGrade.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="개발자용\fDevDB.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -312,7 +320,7 @@
|
||||
<Compile Include="마크\AddMarc_FillBlank.Designer.cs">
|
||||
<DependentUpon>AddMarc_FillBlank.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\BookGridItem.cs" />
|
||||
<Compile Include="Models\BookGridItem.cs" />
|
||||
<Compile Include="마크\CD_LP.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -385,7 +393,7 @@
|
||||
<Compile Include="마크\Check_ISBN_Yes242.Designer.cs">
|
||||
<DependentUpon>Check_ISBN_Yes242.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\FillBlankItem.cs" />
|
||||
<Compile Include="Models\FillBlankItem.cs" />
|
||||
<Compile Include="마크\Help_007.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -398,9 +406,9 @@
|
||||
<Compile Include="마크\Help_008.Designer.cs">
|
||||
<DependentUpon>Help_008.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\IsbnGridItem.cs" />
|
||||
<Compile Include="마크\MacEditorParameter.cs" />
|
||||
<Compile Include="마크\MacListItem.cs" />
|
||||
<Compile Include="Models\IsbnGridItem.cs" />
|
||||
<Compile Include="Models\MacEditorParameter.cs" />
|
||||
<Compile Include="Models\MacListItem.cs" />
|
||||
<Compile Include="마크\Mac_List_Add2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -419,8 +427,8 @@
|
||||
<Compile Include="마크\Mac_List_Edit.Designer.cs">
|
||||
<DependentUpon>Mac_List_Edit.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\MarcBookItem.cs" />
|
||||
<Compile Include="마크\MarcCopyItem.cs" />
|
||||
<Compile Include="Models\MarcBookItem.cs" />
|
||||
<Compile Include="Models\MarcCopyItem.cs" />
|
||||
<Compile Include="마크\MarcCopySelect2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -445,7 +453,7 @@
|
||||
<Compile Include="마크\Marc.designer.cs">
|
||||
<DependentUpon>Marc.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\MarcPlanItem.cs" />
|
||||
<Compile Include="Models\MarcPlanItem.cs" />
|
||||
<Compile Include="마크\Marc_CopyForm.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -644,7 +652,7 @@
|
||||
<Compile Include="마크\Marc_memo.Designer.cs">
|
||||
<DependentUpon>Marc_memo.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\SearchInforItem.cs" />
|
||||
<Compile Include="Models\SearchInforItem.cs" />
|
||||
<Compile Include="마크\Search_Infor2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -1105,6 +1113,9 @@
|
||||
<EmbeddedResource Include="ListOfValue\fSelectDT.resx">
|
||||
<DependentUpon>fSelectDT.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="UC_SelectGrade.resx">
|
||||
<DependentUpon>UC_SelectGrade.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="개발자용\fDevDB.resx">
|
||||
<DependentUpon>fDevDB.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
this.dataGridView1.RowHeadersWidth = 20;
|
||||
this.dataGridView1.RowTemplate.Height = 23;
|
||||
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(563, 242);
|
||||
this.dataGridView1.Size = new System.Drawing.Size(984, 661);
|
||||
this.dataGridView1.TabIndex = 0;
|
||||
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
||||
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
||||
@@ -126,9 +126,10 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(563, 242);
|
||||
this.ClientSize = new System.Drawing.Size(984, 661);
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.Name = "Commodity_Search";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "Commodity_Sub";
|
||||
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Commodity_Search_FormClosed);
|
||||
this.Load += new System.EventHandler(this.Commodity_Sub_Load);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using AR;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
@@ -107,7 +108,13 @@ namespace UniMarc
|
||||
}
|
||||
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
string value = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
|
||||
if (e.RowIndex < 0 || e.ColumnIndex < 0) return;
|
||||
string value = dataGridView1.Rows[e.RowIndex].Cells[0].Value?.ToString() ?? string.Empty;
|
||||
if(value.isEmpty())
|
||||
{
|
||||
UTIL.MsgE("값이 없습니다.\n잠시 후 다시 시도하세요");
|
||||
return;
|
||||
}
|
||||
|
||||
Set_data(value, e.RowIndex);
|
||||
|
||||
@@ -176,7 +183,7 @@ namespace UniMarc
|
||||
if (com != null) { com.tb_clt1.Text = value; }
|
||||
if (pur != null) { pur.tb_clt.Text = value; }
|
||||
if (la != null) { la.tb_clt.Text = value; la.btn_lookup_Click(null, null); }
|
||||
if (si != null) { si.tb_clt.Text = value; si.lbl_tel.Text = dataGridView1.Rows[idx].Cells[2].Value.ToString(); }
|
||||
if (si != null) { si.tb_clt.Text = value; si.lbl_tel.Text = dataGridView1.Rows[idx].Cells[2].Value?.ToString() ?? string.Empty; }
|
||||
if (sb != null) { sb.tb_clt.Text = value; sb.btn_Lookup_Click(null, null); }
|
||||
if (sip != null) { sip.tb_clt.Text = value; }
|
||||
if (ll != null) { ll.tb_clt.Text = value; }
|
||||
@@ -184,17 +191,17 @@ namespace UniMarc
|
||||
dc.tb_SearchClient.Text = value;
|
||||
dc.lbl_Client.Text = value;
|
||||
dc.lbl_ID.Text = dataGridView1.Rows[idx].Cells["DLS_ID"].Value.ToString();
|
||||
dc.lbl_PW.Text = dataGridView1.Rows[idx].Cells["DLS_PW"].Value.ToString();
|
||||
dc.lbl_Area.Text = dataGridView1.Rows[idx].Cells["DLS_Area"].Value.ToString();
|
||||
dc.lbl_PW.Text = dataGridView1.Rows[idx].Cells["DLS_PW"].Value?.ToString() ?? string.Empty;
|
||||
dc.lbl_Area.Text = dataGridView1.Rows[idx].Cells["DLS_Area"].Value?.ToString() ?? string.Empty;
|
||||
dc.btn_Connect.PerformClick();
|
||||
//dc.SetArea(dataGridView1.Rows[idx].Cells["DLS_Area"].Value.ToString(), true);
|
||||
}
|
||||
if (sl != null) {
|
||||
sl.tb_SearchClient.Text = value;
|
||||
sl.lbl_Client.Text = value;
|
||||
sl.lbl_ID.Text = dataGridView1.Rows[idx].Cells["DLS_ID"].Value.ToString();
|
||||
sl.lbl_PW.Text = dataGridView1.Rows[idx].Cells["DLS_PW"].Value.ToString();
|
||||
sl.lbl_Area.Text = dataGridView1.Rows[idx].Cells["DLS_Area"].Value.ToString();
|
||||
sl.lbl_ID.Text = dataGridView1.Rows[idx].Cells["DLS_ID"].Value?.ToString() ?? string.Empty;
|
||||
sl.lbl_PW.Text = dataGridView1.Rows[idx].Cells["DLS_PW"].Value?.ToString() ?? string.Empty;
|
||||
sl.lbl_Area.Text = dataGridView1.Rows[idx].Cells["DLS_Area"].Value?.ToString() ?? string.Empty;
|
||||
sl.SetArea(dataGridView1.Rows[idx].Cells["DLS_Area"].Value.ToString(), true);
|
||||
}
|
||||
}
|
||||
|
||||
85
unimarc/unimarc/마크/AddMarc2.Designer.cs
generated
85
unimarc/unimarc/마크/AddMarc2.Designer.cs
generated
@@ -48,13 +48,9 @@ namespace UniMarc
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.button1 = new System.Windows.Forms.Button();
|
||||
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.marcEditorControl1 = new UniMarc.MarcEditorControl();
|
||||
this.uC_SelectGrade1 = new UniMarc.UC_SelectGrade();
|
||||
this.panel2.SuspendLayout();
|
||||
this.groupBox1.SuspendLayout();
|
||||
this.panel5.SuspendLayout();
|
||||
@@ -202,15 +198,11 @@ namespace UniMarc
|
||||
//
|
||||
// panel6
|
||||
//
|
||||
this.panel6.Controls.Add(this.uC_SelectGrade1);
|
||||
this.panel6.Controls.Add(this.btSave);
|
||||
this.panel6.Controls.Add(this.panel1);
|
||||
this.panel6.Controls.Add(this.tableLayoutPanel2);
|
||||
this.panel6.Controls.Add(this.button1);
|
||||
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.btSaveNew);
|
||||
this.panel6.Controls.Add(this.lbl_SaveData);
|
||||
this.panel6.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
@@ -287,64 +279,6 @@ namespace UniMarc
|
||||
this.button1.UseVisualStyleBackColor = true;
|
||||
this.button1.Click += new System.EventHandler(this.button1_Click);
|
||||
//
|
||||
// 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(211, 121);
|
||||
this.radD.Name = "radD";
|
||||
this.radD.Size = new System.Drawing.Size(42, 27);
|
||||
this.radD.TabIndex = 403;
|
||||
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(164, 121);
|
||||
this.radC.Name = "radC";
|
||||
this.radC.Size = new System.Drawing.Size(41, 27);
|
||||
this.radC.TabIndex = 402;
|
||||
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(117, 121);
|
||||
this.radB.Name = "radB";
|
||||
this.radB.Size = new System.Drawing.Size(41, 27);
|
||||
this.radB.TabIndex = 401;
|
||||
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(70, 121);
|
||||
this.radA.Name = "radA";
|
||||
this.radA.Size = new System.Drawing.Size(41, 27);
|
||||
this.radA.TabIndex = 400;
|
||||
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(29, 131);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(31, 12);
|
||||
this.label6.TabIndex = 399;
|
||||
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)));
|
||||
@@ -365,6 +299,15 @@ namespace UniMarc
|
||||
this.marcEditorControl1.Size = new System.Drawing.Size(1029, 939);
|
||||
this.marcEditorControl1.TabIndex = 394;
|
||||
//
|
||||
// uC_SelectGrade1
|
||||
//
|
||||
this.uC_SelectGrade1.Grade = -1;
|
||||
this.uC_SelectGrade1.GradeName = "";
|
||||
this.uC_SelectGrade1.Location = new System.Drawing.Point(11, 121);
|
||||
this.uC_SelectGrade1.Name = "uC_SelectGrade1";
|
||||
this.uC_SelectGrade1.Size = new System.Drawing.Size(245, 29);
|
||||
this.uC_SelectGrade1.TabIndex = 412;
|
||||
//
|
||||
// AddMarc2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
@@ -405,11 +348,6 @@ namespace UniMarc
|
||||
public System.Windows.Forms.RichTextBox rtEtc2;
|
||||
private System.Windows.Forms.Panel panel6;
|
||||
private System.Windows.Forms.TextBox lbl_SaveData;
|
||||
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 button1;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
private System.Windows.Forms.GroupBox groupBox1;
|
||||
@@ -418,5 +356,6 @@ namespace UniMarc
|
||||
private System.Windows.Forms.Label lbl_Midx;
|
||||
private System.Windows.Forms.Label label1;
|
||||
private System.Windows.Forms.Button btSave;
|
||||
private UC_SelectGrade uC_SelectGrade1;
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,7 @@ namespace UniMarc
|
||||
|
||||
|
||||
this.KeyPreview = true;
|
||||
this.radD.Checked = true; //등급기본
|
||||
uC_SelectGrade1.GradeName = "D";
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -101,12 +101,16 @@ namespace UniMarc
|
||||
|
||||
|
||||
//가져온 등급으로 변경해준다.
|
||||
if (selected.Grade == "0") radA.Checked = true;
|
||||
else if (selected.Grade == "1") radB.Checked = true;
|
||||
else if (selected.Grade == "2") radC.Checked = true;
|
||||
else if (selected.Grade == "3") radD.Checked = true;
|
||||
//if (selected.Grade == "0") radA.Checked = true;
|
||||
//else if (selected.Grade == "1") radB.Checked = true;
|
||||
//else if (selected.Grade == "2") radC.Checked = true;
|
||||
//else if (selected.Grade == "3") radD.Checked = true;
|
||||
if (int.TryParse(selected.Grade, out int vgrade))
|
||||
uC_SelectGrade1.Grade = vgrade;
|
||||
else
|
||||
uC_SelectGrade1.Grade = -1;
|
||||
|
||||
rtEtc1.Text = selected.remark1;
|
||||
rtEtc1.Text = selected.remark1;
|
||||
rtEtc2.Text = selected.remark2;
|
||||
}
|
||||
}
|
||||
@@ -127,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);
|
||||
|
||||
@@ -197,135 +201,31 @@ namespace UniMarc
|
||||
/// <param name="v_date">저장시각 yyyy-MM-dd HH:mm:ss</param>
|
||||
void UpdateMarc(string MarcIndex, string FullMarc, string grade)
|
||||
{
|
||||
//도서정보추출
|
||||
var v_isbn = "";
|
||||
var v_price = "";
|
||||
var v_author = "";
|
||||
var v_title = "";
|
||||
var v_publisher = "";
|
||||
var v_date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
int targetMarcIdx = 0;
|
||||
int.TryParse(MarcIndex, out targetMarcIdx);
|
||||
int targetGrade = 2;
|
||||
if (int.TryParse(grade, out int parsedGrade)) targetGrade = parsedGrade;
|
||||
|
||||
//파서를 사용해서 변경한다
|
||||
var parser = new UniMarc.MarcParser();
|
||||
parser.ParseFullMarc(FullMarc);
|
||||
// 3. 공통 저장 메서드 호출
|
||||
var saveResult = Helper_DB.UpdateMarc(targetMarcIdx, FullMarc, targetGrade, rtEtc1.Text.Trim(), rtEtc2.Text.Trim(), "", mOldMarc);
|
||||
|
||||
//ISBN와 가격 (처음나오는 020태그의 값을 적용)
|
||||
var tag_020 = parser.GetTag<MarcField>("020").FirstOrDefault();
|
||||
if (tag_020 != null)
|
||||
if (saveResult.result == false)
|
||||
{
|
||||
v_isbn = tag_020.GetSubfieldValue('a');
|
||||
v_price = tag_020.GetSubfieldValue('c');
|
||||
}
|
||||
|
||||
//저자(100 -> 110 -> 111 순으로 적용)
|
||||
var tag_100 = parser.GetTag<MarcField>("100").FirstOrDefault();
|
||||
var tag_110 = parser.GetTag<MarcField>("110").FirstOrDefault();
|
||||
var tag_111 = parser.GetTag<MarcField>("111").FirstOrDefault();
|
||||
if (tag_111 != null)
|
||||
v_author = tag_111.GetSubfieldValue('a');
|
||||
else if (tag_110 != null)
|
||||
v_author = tag_110.GetSubfieldValue('a');
|
||||
else if (tag_100 != null)
|
||||
v_author = tag_100.GetSubfieldValue('a');
|
||||
|
||||
//서명
|
||||
var tag_245 = parser.GetTag<MarcSubfield>("245a").FirstOrDefault();
|
||||
v_title = tag_245?.Value ?? string.Empty;
|
||||
|
||||
//출판사
|
||||
var tag_264b = parser.GetTag<MarcSubfield>("264b").FirstOrDefault();
|
||||
var tag_260b = parser.GetTag<MarcSubfield>("260b").FirstOrDefault();
|
||||
if(tag_264b != null)
|
||||
v_publisher = tag_264b?.Value ?? string.Empty;
|
||||
else if (tag_260b != null)
|
||||
v_publisher = tag_260b?.Value ?? string.Empty;
|
||||
|
||||
//056a
|
||||
var v_056 = parser.GetTag("056a").FirstOrDefault() ?? string.Empty;
|
||||
var v_008 = parser.GetTag("008").FirstOrDefault() ?? string.Empty;
|
||||
|
||||
if (v_056.isEmpty() || v_008.isEmpty())
|
||||
{
|
||||
UTIL.MsgE("056a | 008 태그의 값을 확인할 수 없습니다\n1.마크데이터를 확인 해주세요\n2.개발자에 해당 내용을 문의하세요");
|
||||
UTIL.MsgE(saveResult.message);
|
||||
return;
|
||||
}
|
||||
|
||||
if (v_isbn.isEmpty() || v_title.isEmpty())
|
||||
{
|
||||
UTIL.MsgE("ISBN과 서명을 추출하지 못했습니다\n1.마크데이터를 확인 해주세요\n2.개발자에 해당 내용을 문의하세요");
|
||||
return;
|
||||
}
|
||||
|
||||
var etc1 = rtEtc1.Text.Trim();
|
||||
var etc2 = rtEtc2.Text.Trim();
|
||||
|
||||
if (grade.isEmpty()) grade = "2";
|
||||
|
||||
|
||||
// 4. UI 결과 반영
|
||||
if (MarcIndex.isEmpty())
|
||||
{
|
||||
//insert
|
||||
string[] InsertTable =
|
||||
{
|
||||
"ISBN", "서명", "저자", "출판사", "가격",
|
||||
"marc", "비고1", "비고2", "grade", "marc_chk",
|
||||
"user", "division", "008tag", "date", "compidx"
|
||||
};
|
||||
|
||||
//데이터중복검사필요
|
||||
//동일 isbnd있다면 그래도 저장할건지 한번 더 물어봐야 함
|
||||
if (DB_Utils.ExistISBN(v_isbn))
|
||||
{
|
||||
if (UTIL.MsgQ("동일한 ISBN이 이미 존재합니다. 그래도 저장하시겠습니까?") == DialogResult.No)
|
||||
return;
|
||||
}
|
||||
|
||||
string[] InsertColumn =
|
||||
{
|
||||
v_isbn, v_title, v_author, v_publisher, v_price,
|
||||
FullMarc, etc1, etc2, grade.ToString(), "1",
|
||||
PUB.user.UserName, v_056, v_008, v_date, PUB.user.CompanyIdx
|
||||
};
|
||||
|
||||
string InCMD = db.DB_INSERT("Marc", InsertTable, InsertColumn);
|
||||
PUB.log.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, InCMD.Replace("\r", " ").Replace("\n", " ")));
|
||||
var rlt = Helper_DB.ExcuteInsertGetIndex(InCMD);
|
||||
if (rlt.errorMessage.isEmpty() == false)
|
||||
UTIL.MsgE(rlt.errorMessage);
|
||||
else
|
||||
{
|
||||
lbl_Midx.Tag = rlt.value.ToString();
|
||||
lbl_Midx.Text = rlt.value.ToString();
|
||||
UTIL.MsgI($"저장 완료\n\nIDX:{rlt.value}");
|
||||
}
|
||||
lbl_Midx.Tag = saveResult.newidx.ToString();
|
||||
lbl_Midx.Text = saveResult.newidx.ToString();
|
||||
lbl_Midx.BackColor = Color.Lime; // 저장 성공 후 색상 변경 (AddMarc2 특화)
|
||||
UTIL.MsgI($"저장 완료\n\nIDX:{saveResult.newidx}");
|
||||
}
|
||||
else
|
||||
{
|
||||
//update
|
||||
|
||||
string[] EditTable =
|
||||
{
|
||||
"compidx", "marc", "marc_chk","marc1", "marc_chk1", "비고1",
|
||||
"비고2", "division", "008tag", "date", "user",
|
||||
"grade"
|
||||
};
|
||||
string[] EditColumn =
|
||||
{
|
||||
PUB.user.CompanyIdx, FullMarc, "1",mOldMarc, "0", etc1,
|
||||
etc2, v_056, v_008, v_date, PUB.user.UserName,
|
||||
grade.ToString()
|
||||
};
|
||||
|
||||
string[] SearchTable = { "idx", "compidx" };
|
||||
string[] SearchColumn = { MarcIndex, PUB.user.CompanyIdx };
|
||||
|
||||
string UpCMD = db.More_Update("Marc", EditTable, EditColumn, SearchTable, SearchColumn);
|
||||
PUB.log.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, UpCMD.Replace("\r", " ").Replace("\n", " ")));
|
||||
var rlt = Helper_DB.ExcuteNonQuery(UpCMD);
|
||||
if (rlt.applyCount != 1)
|
||||
UTIL.MsgE(rlt.errorMessage);
|
||||
else
|
||||
UTIL.MsgI("변경 완료");
|
||||
UTIL.MsgI("변경 완료");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -396,11 +296,22 @@ namespace UniMarc
|
||||
string midx = this.lbl_Midx.Tag?.ToString() ?? string.Empty;
|
||||
if (isUpdate == false) midx = string.Empty;
|
||||
|
||||
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";
|
||||
// ISBN 추출 및 중복 체크 추가
|
||||
var tag_020 = parserF.GetTag<MarcField>("020").FirstOrDefault();
|
||||
var v_isbn = tag_020?.GetSubfieldValue('a') ?? string.Empty;
|
||||
|
||||
// 신규 저장 시 중복 ISBN 체크
|
||||
if (midx.isEmpty() && !v_isbn.isEmpty())
|
||||
{
|
||||
if (DB_Utils.ExistISBN(v_isbn))
|
||||
{
|
||||
if (UTIL.MsgQ("동일한 ISBN이 이미 존재합니다. 그래도 저장하시겠습니까?") == DialogResult.No)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var v_grade = uC_SelectGrade1.Grade == -1 ? string.Empty : uC_SelectGrade1.Grade.ToString();
|
||||
|
||||
|
||||
//midx 값이 emptry 라면 insert , 아니라면 update
|
||||
UpdateMarc(midx, fullMarc, v_grade);
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace UniMarc
|
||||
db.DBcon();
|
||||
string[] search_tbl = { "compidx", "l_idx" };
|
||||
string[] search_col = { compidx, l_idx };
|
||||
string search_data = "`idx`, `header`, `num`, `isbn_marc`, `book_name`, `author`, `book_comp`, " +
|
||||
string search_data = "`idx`, `header`, `num`, `isbn_marc`, `book_name`, `author`, `book_comp`, sold_out," +
|
||||
"`count`, `pay`, `total`, `import`, `price`, " +
|
||||
"`etc`, `pubDate`, `persent`, `category`, `image_url`, `set_book_name`,`search_book_name`,`search_author`,`search_book_comp`,`search_description`,`search_url`";
|
||||
|
||||
@@ -101,12 +101,12 @@ namespace UniMarc
|
||||
item.persent = row["persent"]?.ToString() ?? string.Empty;
|
||||
item.category = row["category"]?.ToString() ?? string.Empty;
|
||||
item.image = row["image_url"]?.ToString() ?? string.Empty;
|
||||
|
||||
item.sold_out = row["sold_out"]?.ToString() ?? string.Empty;
|
||||
item.search_book_name = row["search_book_name"]?.ToString() ?? string.Empty;
|
||||
item.search_author = row["search_author"]?.ToString() ?? string.Empty;
|
||||
item.search_book_comp = row["search_book_comp"]?.ToString() ?? string.Empty;
|
||||
item.search_description = row["search_description"]?.ToString() ?? string.Empty;
|
||||
item.search_link = row["search_url"]?.ToString() ?? string.Empty;
|
||||
item.search_url = row["search_url"]?.ToString() ?? string.Empty;
|
||||
|
||||
string setBookName = row["set_book_name"]?.ToString() ?? string.Empty;
|
||||
if (!string.IsNullOrEmpty(setBookName))
|
||||
@@ -734,9 +734,9 @@ namespace UniMarc
|
||||
item.search_description = string.Empty;
|
||||
|
||||
if (value.Length > 10)
|
||||
item.search_link = value[10];
|
||||
item.search_url = value[10];
|
||||
else
|
||||
item.search_link = string.Empty;
|
||||
item.search_url = string.Empty;
|
||||
|
||||
|
||||
dataGridView1.Rows[idx].DefaultCellStyle.BackColor = Color.Yellow;
|
||||
@@ -745,46 +745,56 @@ namespace UniMarc
|
||||
|
||||
private void btn_Save_Click(object sender, EventArgs e)
|
||||
{
|
||||
string[] Edit_tbl = { "isbn", "book_name", "author", "book_comp", "pay", "price", "pubDate", "category", "image_url", "sold_out", "etc",
|
||||
"search_book_name","search_author","search_book_comp"};
|
||||
|
||||
|
||||
for (int a = 0; a < bookList.Count; a++)
|
||||
{
|
||||
var item = bookList[a];
|
||||
if (string.IsNullOrEmpty(item.isbn)) continue;
|
||||
|
||||
string[] Edit_Col = {
|
||||
item.isbn,
|
||||
item.book_name,
|
||||
item.author,
|
||||
item.book_comp,
|
||||
item.unit,
|
||||
item.price,
|
||||
item.pubDate,
|
||||
item.category,
|
||||
item.image,
|
||||
item.sold_out,
|
||||
item.etc,
|
||||
item.search_book_name,
|
||||
item.search_author,
|
||||
item.search_book_comp
|
||||
var updateData = new Dictionary<string, object>
|
||||
{
|
||||
{ "isbn", item.isbn },
|
||||
{ "book_name", item.book_name },
|
||||
{ "author", item.author },
|
||||
{ "book_comp", item.book_comp },
|
||||
{ "pay", item.unit },
|
||||
{ "price", item.price },
|
||||
{ "pubDate", item.pubDate },
|
||||
{ "category", item.category },
|
||||
{ "image_url", item.image },
|
||||
{ "sold_out", item.sold_out },
|
||||
{ "etc", item.etc },
|
||||
{ "search_book_name", item.search_book_name },
|
||||
{ "search_author", item.search_author },
|
||||
{ "search_book_comp", item.search_book_comp },
|
||||
{ "search_description", item.search_description },
|
||||
{ "search_url", item.search_url }
|
||||
};
|
||||
|
||||
string[] Search_tbl = { "idx", "list_name", "compidx" };
|
||||
string[] Search_col = { item.idx, list_name, compidx };
|
||||
var whereClause = new Dictionary<string, object>
|
||||
{
|
||||
{ item.etc.Contains("세트분할") ? "set_book_name" : "idx", item.idx },
|
||||
{ "list_name", list_name },
|
||||
{ "compidx", compidx }
|
||||
};
|
||||
|
||||
if (item.etc.Contains("세트분할"))
|
||||
Search_tbl[0] = "set_book_name";
|
||||
|
||||
string U_cmd = db.More_Update("Obj_List_Book", Edit_tbl, Edit_Col, Search_tbl, Search_col, 1);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
string U_cmd = Helper_DB.Make_UpdateQuery("Obj_List_Book", updateData, whereClause);
|
||||
var ret = Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
if(ret.applyCount != 1)
|
||||
{
|
||||
UTIL.MsgE($"{ret.applyCount} 건의 자료가 업데이트 되었습니다\n개발자 문의 하세요\n\n{ret.errorMessage}");
|
||||
return;
|
||||
}
|
||||
|
||||
if (Check_Marc.Checked)
|
||||
{
|
||||
string CMcmd = string.Format("UPDATE `Obj_List_Book` SET `isbn_marc` = \"{0}\" WHERE `idx` = \"{1}\"",
|
||||
Edit_Col[0], Search_col[0]);
|
||||
Helper_DB.ExcuteNonQuery(CMcmd);
|
||||
item.isbn, item.idx);
|
||||
ret = Helper_DB.ExcuteNonQuery(CMcmd);
|
||||
if (ret.applyCount != 1)
|
||||
{
|
||||
UTIL.MsgE($"{ret.applyCount} 건의 자료가 업데이트 되었습니다\n개발자 문의 하세요\n\n{ret.errorMessage}");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
UTIL.MsgI("저장되었습니다!");
|
||||
@@ -952,7 +962,7 @@ namespace UniMarc
|
||||
}
|
||||
else
|
||||
{
|
||||
link_url.Text = item.search_link;
|
||||
link_url.Text = item.search_url;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -258,6 +258,7 @@ namespace UniMarc
|
||||
_searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "124003", "무등도서관"));
|
||||
_searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "124004", "사직도서관"));
|
||||
_searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "124008", "산수도서관"));
|
||||
_searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "129232", "하남도서관"));
|
||||
_searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "129228", "디지털정보도서관"));
|
||||
|
||||
// 완도군립도서관
|
||||
|
||||
56
unimarc/unimarc/마크/DLS_Copy.Designer.cs
generated
56
unimarc/unimarc/마크/DLS_Copy.Designer.cs
generated
@@ -52,6 +52,7 @@
|
||||
this.btn_Search = new System.Windows.Forms.Button();
|
||||
this.rBtn_BookName = new System.Windows.Forms.RadioButton();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.btn_Close = new System.Windows.Forms.Button();
|
||||
this.btn_SiteDenote = new System.Windows.Forms.Button();
|
||||
this.btn_Connect = new System.Windows.Forms.Button();
|
||||
this.lbl_PW = new System.Windows.Forms.Label();
|
||||
@@ -61,7 +62,6 @@
|
||||
this.tb_SearchClient = new System.Windows.Forms.TextBox();
|
||||
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
|
||||
this.lblStatus = new System.Windows.Forms.ToolStripLabel();
|
||||
this.btn_Close = new System.Windows.Forms.Button();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel8.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit();
|
||||
@@ -92,7 +92,7 @@
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(640, 699);
|
||||
this.panel1.Size = new System.Drawing.Size(649, 699);
|
||||
this.panel1.TabIndex = 1;
|
||||
//
|
||||
// panel8
|
||||
@@ -101,7 +101,7 @@
|
||||
this.panel8.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel8.Location = new System.Drawing.Point(0, 103);
|
||||
this.panel8.Name = "panel8";
|
||||
this.panel8.Size = new System.Drawing.Size(638, 594);
|
||||
this.panel8.Size = new System.Drawing.Size(647, 594);
|
||||
this.panel8.TabIndex = 5;
|
||||
//
|
||||
// dv1
|
||||
@@ -119,7 +119,7 @@
|
||||
this.dv1.Name = "dv1";
|
||||
this.dv1.RowHeadersWidth = 31;
|
||||
this.dv1.RowTemplate.Height = 23;
|
||||
this.dv1.Size = new System.Drawing.Size(638, 594);
|
||||
this.dv1.Size = new System.Drawing.Size(647, 594);
|
||||
this.dv1.TabIndex = 0;
|
||||
this.dv1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
||||
this.dv1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
||||
@@ -164,7 +164,7 @@
|
||||
this.panel5.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel5.Location = new System.Drawing.Point(0, 68);
|
||||
this.panel5.Name = "panel5";
|
||||
this.panel5.Size = new System.Drawing.Size(638, 35);
|
||||
this.panel5.Size = new System.Drawing.Size(647, 35);
|
||||
this.panel5.TabIndex = 4;
|
||||
//
|
||||
// btn_ResultEmpty
|
||||
@@ -209,8 +209,7 @@
|
||||
//
|
||||
// btn_ApplyFilter
|
||||
//
|
||||
this.btn_ApplyFilter.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn_ApplyFilter.Location = new System.Drawing.Point(258, 4);
|
||||
this.btn_ApplyFilter.Location = new System.Drawing.Point(259, 4);
|
||||
this.btn_ApplyFilter.Name = "btn_ApplyFilter";
|
||||
this.btn_ApplyFilter.Size = new System.Drawing.Size(75, 24);
|
||||
this.btn_ApplyFilter.TabIndex = 5;
|
||||
@@ -232,7 +231,7 @@
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel3.Location = new System.Drawing.Point(0, 33);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(638, 35);
|
||||
this.panel3.Size = new System.Drawing.Size(647, 35);
|
||||
this.panel3.TabIndex = 4;
|
||||
//
|
||||
// label3
|
||||
@@ -254,11 +253,10 @@
|
||||
//
|
||||
// chkShowBrowser
|
||||
//
|
||||
this.chkShowBrowser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.chkShowBrowser.AutoSize = true;
|
||||
this.chkShowBrowser.Checked = true;
|
||||
this.chkShowBrowser.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.chkShowBrowser.Location = new System.Drawing.Point(354, 9);
|
||||
this.chkShowBrowser.Location = new System.Drawing.Point(355, 9);
|
||||
this.chkShowBrowser.Name = "chkShowBrowser";
|
||||
this.chkShowBrowser.Size = new System.Drawing.Size(96, 16);
|
||||
this.chkShowBrowser.TabIndex = 209;
|
||||
@@ -331,13 +329,22 @@
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(638, 33);
|
||||
this.panel2.Size = new System.Drawing.Size(647, 33);
|
||||
this.panel2.TabIndex = 3;
|
||||
//
|
||||
// btn_Close
|
||||
//
|
||||
this.btn_Close.Location = new System.Drawing.Point(559, 4);
|
||||
this.btn_Close.Name = "btn_Close";
|
||||
this.btn_Close.Size = new System.Drawing.Size(75, 24);
|
||||
this.btn_Close.TabIndex = 7;
|
||||
this.btn_Close.Text = "닫 기";
|
||||
this.btn_Close.UseVisualStyleBackColor = true;
|
||||
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
|
||||
//
|
||||
// btn_SiteDenote
|
||||
//
|
||||
this.btn_SiteDenote.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn_SiteDenote.Location = new System.Drawing.Point(479, 5);
|
||||
this.btn_SiteDenote.Location = new System.Drawing.Point(480, 5);
|
||||
this.btn_SiteDenote.Name = "btn_SiteDenote";
|
||||
this.btn_SiteDenote.Size = new System.Drawing.Size(77, 23);
|
||||
this.btn_SiteDenote.TabIndex = 6;
|
||||
@@ -347,8 +354,7 @@
|
||||
//
|
||||
// btn_Connect
|
||||
//
|
||||
this.btn_Connect.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.btn_Connect.Location = new System.Drawing.Point(406, 5);
|
||||
this.btn_Connect.Location = new System.Drawing.Point(407, 5);
|
||||
this.btn_Connect.Name = "btn_Connect";
|
||||
this.btn_Connect.Size = new System.Drawing.Size(70, 23);
|
||||
this.btn_Connect.TabIndex = 5;
|
||||
@@ -394,12 +400,10 @@
|
||||
//
|
||||
// tb_SearchClient
|
||||
//
|
||||
this.tb_SearchClient.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
|
||||
| System.Windows.Forms.AnchorStyles.Right)));
|
||||
this.tb_SearchClient.ImeMode = System.Windows.Forms.ImeMode.Hangul;
|
||||
this.tb_SearchClient.Location = new System.Drawing.Point(76, 6);
|
||||
this.tb_SearchClient.Location = new System.Drawing.Point(90, 6);
|
||||
this.tb_SearchClient.Name = "tb_SearchClient";
|
||||
this.tb_SearchClient.Size = new System.Drawing.Size(326, 21);
|
||||
this.tb_SearchClient.Size = new System.Drawing.Size(312, 21);
|
||||
this.tb_SearchClient.TabIndex = 1;
|
||||
this.tb_SearchClient.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_SearchClient_KeyDown);
|
||||
//
|
||||
@@ -410,7 +414,7 @@
|
||||
this.lblStatus});
|
||||
this.statusStrip1.Location = new System.Drawing.Point(0, 699);
|
||||
this.statusStrip1.Name = "statusStrip1";
|
||||
this.statusStrip1.Size = new System.Drawing.Size(640, 22);
|
||||
this.statusStrip1.Size = new System.Drawing.Size(649, 22);
|
||||
this.statusStrip1.TabIndex = 3;
|
||||
this.statusStrip1.Text = "statusStrip1";
|
||||
//
|
||||
@@ -421,21 +425,11 @@
|
||||
this.lblStatus.Text = "WD";
|
||||
this.lblStatus.Click += new System.EventHandler(this.lblStatus_Click);
|
||||
//
|
||||
// btn_Close
|
||||
//
|
||||
this.btn_Close.Location = new System.Drawing.Point(559, 4);
|
||||
this.btn_Close.Name = "btn_Close";
|
||||
this.btn_Close.Size = new System.Drawing.Size(75, 24);
|
||||
this.btn_Close.TabIndex = 7;
|
||||
this.btn_Close.Text = "닫 기";
|
||||
this.btn_Close.UseVisualStyleBackColor = true;
|
||||
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
|
||||
//
|
||||
// DLS_Copy
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(640, 721);
|
||||
this.ClientSize = new System.Drawing.Size(649, 721);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.statusStrip1);
|
||||
this.Name = "DLS_Copy";
|
||||
|
||||
@@ -157,6 +157,7 @@ namespace UniMarc
|
||||
private void ClientSearch()
|
||||
{
|
||||
Commodity_Search cs = new Commodity_Search(this);
|
||||
cs.StartPosition = FormStartPosition.CenterScreen;
|
||||
cs.Clinet_name = tb_SearchClient.Text;
|
||||
cs.Show();
|
||||
}
|
||||
|
||||
@@ -129,18 +129,6 @@
|
||||
<metadata name="dvc_Remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="Book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="ISBN.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dvc_count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="dvc_Remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
|
||||
@@ -153,7 +153,21 @@ namespace UniMarc
|
||||
}
|
||||
|
||||
if (move)
|
||||
webBrowser1.Navigate(webBrowser1.Document.GetElementById(Code[idx]).GetAttribute("value"));
|
||||
{
|
||||
var areacode = Code[idx];
|
||||
if(webBrowser1.Document == null)
|
||||
{
|
||||
UTIL.MsgE("웹브라우저가 준비되지 않아 URL을 이동할 수 없습니다");
|
||||
}
|
||||
else
|
||||
{
|
||||
var elm = webBrowser1.Document.GetElementById(areacode);
|
||||
var val = elm.GetAttribute("value");
|
||||
webBrowser1.Navigate(val);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
return Code[idx];
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace UniMarc
|
||||
InList_Col[5] = TotalCount.ToString();
|
||||
string InList_Cmd = db.DB_INSERT("Obj_List", InList_Tbl, InList_Col);
|
||||
|
||||
long listIdxLong = db.DB_Send_CMD_Insert_GetIdx(InList_Cmd);
|
||||
long listIdxLong = Helper_DB.DB_Send_CMD_Insert_GetIdx(InList_Cmd);
|
||||
if (listIdxLong == -1)
|
||||
{
|
||||
UTIL.MsgE("목록 저장에 실패했습니다.");
|
||||
|
||||
@@ -508,7 +508,7 @@ namespace UniMarc
|
||||
|
||||
string Incmd = db.DB_INSERT(table_name, Insert_tbl, Insert_col);
|
||||
PUB.log.Add("INSERT", string.Format("{0}({1},{2}) : {3}", PUB.user.UserName, PUB.user.CompanyIdx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, Incmd));
|
||||
long newIdx = db.DB_Send_CMD_Insert_GetIdx(Incmd);
|
||||
long newIdx = Helper_DB.DB_Send_CMD_Insert_GetIdx(Incmd);
|
||||
if (newIdx > 0)
|
||||
{
|
||||
Midx = newIdx.ToString();
|
||||
@@ -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;
|
||||
|
||||
@@ -3,6 +3,7 @@ using arCtl.TinyListview;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Drawing2D;
|
||||
using System.IO;
|
||||
@@ -14,7 +15,6 @@ using System.Web.UI;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Windows.Forms;
|
||||
using UniMarc.ListOfValue;
|
||||
using static UniMarc.MarcEditorControl;
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
@@ -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;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +81,16 @@ namespace UniMarc
|
||||
comboBox8.Items.AddRange(combo8);
|
||||
|
||||
comboBox8.SelectedIndex = 0;
|
||||
|
||||
this.Show();
|
||||
Application.DoEvents();
|
||||
|
||||
//refresh data
|
||||
this.input_list(ml);
|
||||
|
||||
List_Book.RowPrePaint += List_Book_RowPrePaint;
|
||||
|
||||
|
||||
}
|
||||
|
||||
public void input_list()
|
||||
@@ -90,10 +100,10 @@ namespace UniMarc
|
||||
input_list(pItem);
|
||||
}
|
||||
|
||||
(string remark1, string remark2) ReadRemark(int row)
|
||||
(string remark1, string remark2) ReadRemark(string marcidx)
|
||||
{
|
||||
string[] sear_tbl = { "idx" };
|
||||
string[] sear_col = { List_Book.Rows[row].Cells["marc_idx"].Value.ToString() };
|
||||
string[] sear_col = { marcidx };// List_Book.Rows[row].Cells["marc_idx"].Value.ToString() };
|
||||
string cmd = db.More_DB_Search("Marc", sear_tbl, sear_col, "`비고1`, `비고2`");
|
||||
string res = db.DB_Send_CMD_Search(cmd);
|
||||
|
||||
@@ -108,7 +118,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
|
||||
@@ -140,8 +150,10 @@ namespace UniMarc
|
||||
}
|
||||
|
||||
|
||||
string Area = "`idx`, `isbn_marc`, `header`, `num`, `book_name`, `author`, `book_comp`, `count`, `pay`, `image_url`, `m_idx`";
|
||||
string[] sear_tbl = { "l_idx", "compidx" };
|
||||
string Area = "LB.`idx`, LB.`isbn_marc`, LB.`header`, LB.`num`, LB.`book_name`, LB.`author`, LB.`book_comp`, LB.`count`, LB.`pay`, LB.`image_url`, LB.`m_idx`, LB.category " +
|
||||
", LB.`search_book_name`, LB.`search_author`, LB.`search_book_comp`, LB.`search_description`, LB.`search_url` " +
|
||||
", M.`compidx` AS m_compidx, M.`marc`, M.`grade`, M.`user` AS m_user, M.`date` AS m_date, C.`comp_name` ";
|
||||
string[] sear_tbl = { "LB.l_idx", "LB.compidx" };
|
||||
string[] sear_col = { item.idx, PUB.user.CompanyIdx };
|
||||
|
||||
lbl_BookDate.Text = $"{item.start_date}";
|
||||
@@ -151,121 +163,176 @@ namespace UniMarc
|
||||
|
||||
string cmd =
|
||||
string.Format("SELECT {0} " +
|
||||
"FROM {1} " +
|
||||
"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]);
|
||||
string db_res = db.DB_Send_CMD_Search(cmd);
|
||||
string[] db_data = db_res.Split('|');
|
||||
string[] grid = {
|
||||
"", "", "", "", "",
|
||||
"", "", "", "", "",
|
||||
"", "", "V", "", "" };
|
||||
"FROM {1} AS LB " +
|
||||
"LEFT JOIN `Marc` AS M ON LB.`m_idx` = M.`idx` " +
|
||||
"LEFT JOIN `Comp` AS C ON M.`compidx` = C.`idx` " +
|
||||
"WHERE {2} = \"{4}\" AND {3} = \"{5}\"" +
|
||||
"ORDER BY LB.`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);
|
||||
|
||||
mLoadCompleted = false;
|
||||
|
||||
dataList = new SortableBindingList<MarcBookItem>();
|
||||
for (int a = 0; a < db_data.Length - 1; a += 11)
|
||||
foreach (DataRow dr in db_res.Rows)// (int a = 0; a < db_data.Length - 1; a += 11)
|
||||
{
|
||||
MarcBookItem bitem = new MarcBookItem();
|
||||
bitem.ListIdx = db_data[a]; // 0: idx
|
||||
bitem.ISBN13 = db_data[a + 1]; // 1: isbn
|
||||
bitem.Num = db_data[a + 2] + db_data[a + 3]; // 2: header + num
|
||||
bitem.BookName = db_data[a + 4]; // 3: book_num
|
||||
bitem.Author = db_data[a + 5]; // 4: author
|
||||
bitem.BookComp = db_data[a + 6]; // 5: book_comp
|
||||
bitem.Count = db_data[a + 7]; // 6: count
|
||||
bitem.Pay = db_data[a + 8]; // 7: pay
|
||||
bitem.Url = db_data[a + 9]; // 8: image_url
|
||||
bitem.MarcIdx = db_data[a + 10]; // 9: m_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
|
||||
bitem.BookName = dr["book_name"]?.ToString() ?? string.Empty; // db_data[a + 4]; // 3: book_num
|
||||
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"] != 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"] != DBNull.Value ? Convert.ToInt32(dr["m_idx"]) : 0; //db_data[a + 10]; // 9: m_idx
|
||||
bitem.category = dr["category"]?.ToString() ?? string.Empty;
|
||||
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
|
||||
bitem.search_book_comp = dr["search_book_comp"]?.ToString() ?? string.Empty; //db_data[a + 13]; // 9: m_idx
|
||||
bitem.search_description = dr["search_description"]?.ToString() ?? string.Empty; // db_data[a + 14]; // 9: m_idx
|
||||
bitem.search_url = dr["search_url"]?.ToString() ?? string.Empty;
|
||||
|
||||
// Joined MARC data
|
||||
if (bitem.MarcIdx > 0 && dr["marc"] != DBNull.Value)
|
||||
{
|
||||
SetMarcItemInfo(bitem,
|
||||
bitem.MarcIdx,
|
||||
dr["m_compidx"]?.ToString() ?? string.Empty,
|
||||
dr["marc"]?.ToString() ?? string.Empty,
|
||||
dr["grade"]?.ToString() ?? string.Empty,
|
||||
dr["m_user"]?.ToString() ?? string.Empty,
|
||||
dr["m_date"]?.ToString() ?? string.Empty,
|
||||
dr["comp_name"]?.ToString() ?? string.Empty);
|
||||
}
|
||||
else
|
||||
{
|
||||
bitem.Grade = "3";
|
||||
bitem.Status = MarcRecordStatus.None;
|
||||
}
|
||||
|
||||
dataList.Add(bitem);
|
||||
}
|
||||
bs1.DataSource = dataList;
|
||||
List_Book.AutoGenerateColumns = false;
|
||||
List_Book.DataSource = bs1;
|
||||
|
||||
chk_Marc();
|
||||
|
||||
List_Book.ClearSelection();
|
||||
mLoadCompleted = true;
|
||||
|
||||
if (this.List_Book.RowCount > 0)
|
||||
List_Book.Rows[0].Selected = true;
|
||||
bs1.DataSource = dataList;
|
||||
List_Book.AutoGenerateColumns = false;
|
||||
List_Book.DataSource = bs1;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 마크 유무 확인하는 함수
|
||||
/// 모든 데이터의 마크 유무 확인하는 함수
|
||||
/// </summary>
|
||||
void chk_Marc()
|
||||
{
|
||||
// 1. 자사 마크 ISBN 매칭 (m_idx가 0인 항목들 대상)
|
||||
string qMy = string.Format(
|
||||
"SELECT LB.`idx` as list_idx, M.`idx` as m_idx, M.`marc`, M.`grade`, M.`user` as m_user, M.`date` as m_date " +
|
||||
"FROM `Obj_List_Book` LB " +
|
||||
"JOIN `Marc` M ON LB.`isbn_marc` = M.`ISBN` " +
|
||||
"WHERE LB.`l_idx` = \"{0}\" AND LB.`compidx` = \"{1}\" AND LB.`m_idx` = 0 " +
|
||||
"AND M.`compidx` = \"{1}\" " +
|
||||
"GROUP BY LB.`idx`", ml.idx, mCompidx);
|
||||
|
||||
foreach (var dr in this.dataList) // (int a = 0; a < this.dataList.Count; a++)
|
||||
DataTable dtMy = Helper_DB.ExecuteDataTable(qMy);
|
||||
UpdateFromMatchedTable(dtMy, true);
|
||||
|
||||
// 2. 타사 마크 ISBN 매칭 (여전히 m_idx가 0인 항목들 대상)
|
||||
string qOther = string.Format(
|
||||
"SELECT LB.`idx` as list_idx, M.`idx` as m_idx, M.`compidx` as m_compidx, M.`marc`, M.`grade`, M.`user` as m_user, M.`date` as m_date, C.`comp_name` " +
|
||||
"FROM `Obj_List_Book` LB " +
|
||||
"JOIN `Marc` M ON LB.`isbn_marc` = M.`ISBN` " +
|
||||
"JOIN `Comp` C ON M.`compidx` = C.`idx` " +
|
||||
"WHERE LB.`l_idx` = \"{0}\" AND LB.`compidx` = \"{1}\" AND LB.`m_idx` = 0 " +
|
||||
"AND M.`compidx` != \"{1}\" " +
|
||||
"GROUP BY LB.`idx`", ml.idx, mCompidx);
|
||||
|
||||
DataTable dtOther = Helper_DB.ExecuteDataTable(qOther);
|
||||
UpdateFromMatchedTable(dtOther, false);
|
||||
|
||||
// 3. 최종 정리 (매칭되지 않은 항목들)
|
||||
foreach (var item in dataList)
|
||||
{
|
||||
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" };
|
||||
|
||||
var isbn = dr.ISBN13;//.isbn List_Book.Rows[a].Cells["ISBN13"].Value?.ToString() ?? string.Empty;
|
||||
string[] sear_col = { isbn };
|
||||
|
||||
//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 Chk_Cmd = string.Format("SELECT {0} FROM {1} WHERE `{2}` = \"{3}\" ORDER BY FIELD(`compidx`, {4}) DESC;",
|
||||
Area, Table, sear_tbl[0], sear_col[0], mCompidx);
|
||||
|
||||
string Chk_Res = db.DB_Send_CMD_Search(Chk_Cmd);
|
||||
string[] Chk_Arr = Chk_Res.Split('|');
|
||||
|
||||
bool isMyData = true;
|
||||
if (Chk_Arr.Length < 2) //마크DB에서 데이터가 없다면?
|
||||
if (item.MarcIdx <= 0)
|
||||
{
|
||||
dr.Grade = "3"; //D등급으로 조정List_Book.Rows[a].Cells["grade"].Value = "3";
|
||||
dr.Status = MarcRecordStatus.None;
|
||||
continue;
|
||||
item.Grade = "3";
|
||||
item.Status = MarcRecordStatus.None;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Chk_Arr[1] != mCompidx)
|
||||
/// <summary>
|
||||
/// 조인 결과 테이블을 바탕으로 dataList와 DB를 업데이트합니다.
|
||||
/// </summary>
|
||||
private void UpdateFromMatchedTable(DataTable dt, bool isMyData)
|
||||
{
|
||||
if (dt == null) return;
|
||||
foreach (DataRow row in dt.Rows)
|
||||
{
|
||||
int listIdx = Convert.ToInt32(row["list_idx"]);
|
||||
var item = dataList.FirstOrDefault(x => x.ListIdx == listIdx);
|
||||
// 이미 매칭된 경우(MarcIdx > 0)는 건너뜀 (자사 우선순위 보장)
|
||||
if (item != null && item.MarcIdx <= 0)
|
||||
{
|
||||
isMyData = false;
|
||||
dr.Status = MarcRecordStatus.OtherCompany;
|
||||
int midx = Convert.ToInt32(row["m_idx"]);
|
||||
string compIdx = isMyData ? mCompidx : (row["m_compidx"]?.ToString() ?? string.Empty);
|
||||
string user = row["m_user"]?.ToString() ?? string.Empty;
|
||||
string compName = isMyData ? "" : (row["comp_name"]?.ToString() ?? string.Empty);
|
||||
|
||||
SetMarcItemInfo(item,
|
||||
midx,
|
||||
compIdx,
|
||||
row["marc"]?.ToString() ?? string.Empty,
|
||||
row["grade"]?.ToString() ?? string.Empty,
|
||||
user,
|
||||
row["m_date"]?.ToString() ?? string.Empty,
|
||||
compName);
|
||||
|
||||
// DB에 m_idx 영구 저장
|
||||
string updCmd = string.Format("UPDATE `Obj_List_Book` SET `m_idx` = {0} WHERE `idx` = {1};", midx, listIdx);
|
||||
Helper_DB.ExcuteNonQuery(updCmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 마크 아이템의 상태, 등급, 배경색 등을 설정하는 공용 함수
|
||||
/// </summary>
|
||||
private void SetMarcItemInfo(MarcBookItem item, int marcIdx, string compIdx, string dbMarc, string grade, string user, string saveDate, string compName = "")
|
||||
{
|
||||
bool isMyData = (compIdx == mCompidx);
|
||||
item.MarcIdx = marcIdx;
|
||||
item.DbMarc = dbMarc;
|
||||
item.Grade = grade;
|
||||
item.SaveDate = saveDate;
|
||||
item.Status = isMyData ? MarcRecordStatus.MyCompany : MarcRecordStatus.OtherCompany;
|
||||
|
||||
if (isMyData)
|
||||
{
|
||||
item.User = user;
|
||||
if (!string.IsNullOrEmpty(saveDate))
|
||||
{
|
||||
item.BackColor = GetSaveDateColor(saveDate);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (string.IsNullOrEmpty(compName))
|
||||
{
|
||||
string FindCompCmd = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = \"{0}\"", compIdx);
|
||||
item.User = db.DB_Send_CMD_Search(FindCompCmd).Replace("|", "");
|
||||
}
|
||||
else
|
||||
{
|
||||
dr.Status = MarcRecordStatus.MyCompany;
|
||||
}
|
||||
|
||||
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.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];
|
||||
dr.User = Chk_Arr[10];// List_Book.Rows[a].Cells["user"].Value = Chk_Arr[10];
|
||||
dr.SaveDate = Chk_Arr[11];// List_Book.Rows[a].Cells["SaveDate"].Value = Chk_Arr[11];
|
||||
|
||||
if (isMyData)
|
||||
{
|
||||
Color saveColor = GetSaveDateColor(Chk_Arr[11]);
|
||||
dr.BackColor = saveColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
string FindCompCmd = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", Chk_Arr[1]);
|
||||
dr.User = db.DB_Send_CMD_Search(FindCompCmd).Replace("|", "");
|
||||
dr.BackColor = Color.LightGray;
|
||||
item.User = compName;
|
||||
}
|
||||
item.BackColor = Color.LightGray;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,9 +388,11 @@ namespace UniMarc
|
||||
|
||||
|
||||
private string mOldMarc = string.Empty;
|
||||
private int mOldMarIdx = -1;
|
||||
private void List_Book_SelectionChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!mLoadCompleted) return;
|
||||
|
||||
if (List_Book.CurrentCell == null) return;
|
||||
int row_idx = List_Book.CurrentCell.RowIndex;
|
||||
int col_idx = List_Book.CurrentCell.ColumnIndex;
|
||||
@@ -335,95 +404,10 @@ namespace UniMarc
|
||||
}
|
||||
|
||||
if (row_idx == -1 || col_idx == -1) { return; }
|
||||
SaveRowIdx = row_idx;
|
||||
|
||||
mOldMarc = List_Book.Rows[row_idx].Cells["db_marc"].Value?.ToString() ?? string.Empty;
|
||||
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")
|
||||
{
|
||||
btn_CopySelect.Enabled = false;
|
||||
btn_CopySelect.BackColor = Color.Silver;
|
||||
}
|
||||
else
|
||||
{
|
||||
btn_CopySelect.Enabled = true;
|
||||
btn_CopySelect.BackColor = Color.Khaki;
|
||||
}
|
||||
|
||||
btn_CopySelect.Text = CountResult;
|
||||
}
|
||||
|
||||
if (check_V(row_idx, col_idx))
|
||||
return;
|
||||
|
||||
string isbn13 = List_Book.Rows[row_idx].Cells["ISBN13"].Value?.ToString() ?? "";
|
||||
string bookName = List_Book.Rows[row_idx].Cells["book_name"].Value?.ToString() ?? "";
|
||||
string author = List_Book.Rows[row_idx].Cells["author"].Value?.ToString() ?? "";
|
||||
string publisher = List_Book.Rows[row_idx].Cells["book_comp"].Value?.ToString() ?? "";
|
||||
string price = List_Book.Rows[row_idx].Cells["pay"].Value?.ToString() ?? "";
|
||||
string url = List_Book.Rows[row_idx].Cells["url"].Value?.ToString() ?? ""; // or image_url?
|
||||
string marcIdx = List_Book.Rows[row_idx].Cells["marc_idx"].Value?.ToString() ?? "";
|
||||
string dbMarc = List_Book.Rows[row_idx].Cells["db_marc"].Value?.ToString() ?? "";
|
||||
string grade = List_Book.Rows[row_idx].Cells["grade"].Value?.ToString() ?? "";
|
||||
string user = List_Book.Rows[row_idx].Cells["user"].Value?.ToString() ?? "";
|
||||
string saveDate = List_Book.Rows[row_idx].Cells["SaveDate"].Value?.ToString() ?? "";
|
||||
string listIdx = List_Book.Rows[row_idx].Cells["list_idx"].Value?.ToString() ?? ""; // verify this column name in input_list
|
||||
this.lbListIdx.Text = $"Row:{SaveRowIdx},List:{listIdx}";
|
||||
var remark = ReadRemark(row_idx);
|
||||
this.Param = new MacEditorParameter
|
||||
{
|
||||
ISBN13 = isbn13,
|
||||
URL = url,
|
||||
ListIdx = listIdx,
|
||||
MarcIdx = marcIdx,
|
||||
SaveDate = saveDate,
|
||||
User = user,
|
||||
BookName = bookName,
|
||||
Author = author,
|
||||
Publisher = publisher,
|
||||
Price = price,
|
||||
OriginalMarc = dbMarc,
|
||||
};
|
||||
var defMarc = PUB.MakeEmptyMarc(isbn13, bookName, author, publisher, price);
|
||||
marcEditorControl1.LoadBookData(dbMarc, isbn13, defMarc);
|
||||
|
||||
//등급선택 (dbMarc 데이터를 확인하여. 등급을 결정한다)
|
||||
int gradeNo;
|
||||
bool check_Marc = dbMarc.Length >= 3;
|
||||
if (!check_Marc)
|
||||
{
|
||||
//richTextBox1.Text = Make_Empty();
|
||||
gradeNo = 3; //마크가 없는것은 D등급으로 한다
|
||||
}
|
||||
else
|
||||
{
|
||||
etc1.Text = remark.remark1;
|
||||
etc2.Text = remark.remark2;
|
||||
|
||||
//자료의 등급 다시 선택
|
||||
if (int.TryParse(grade, out gradeNo) == false)
|
||||
gradeNo = 2;
|
||||
}
|
||||
|
||||
if (gradeNo == 0)
|
||||
radA.Checked = true;
|
||||
else if (gradeNo == 1)
|
||||
radB.Checked = true;
|
||||
else if (gradeNo == 3)
|
||||
radD.Checked = true;
|
||||
else
|
||||
radC.Checked = true;
|
||||
|
||||
lbl_SaveData.Text = $"[{user}] [{saveDate}]";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -531,10 +515,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;
|
||||
@@ -542,6 +528,7 @@ namespace UniMarc
|
||||
dr.Grade = selected.Grade;
|
||||
// text008.Text = selected.Tag008;
|
||||
dr.DbMarc = selected.marc_db;
|
||||
dr.Status = PUB.user.CompanyIdx == selected.compidx ? MarcRecordStatus.MyCompany : MarcRecordStatus.OtherCompany;
|
||||
mOldMarc = selected.marc_db;
|
||||
|
||||
// row.ForeColor = SetGradeColor(row.Grade); // Handled by MarcBookItem automatically
|
||||
@@ -550,7 +537,7 @@ namespace UniMarc
|
||||
var currentitem = this.bs1.Current as MarcBookItem;
|
||||
if (currentitem != null && currentitem == dr)
|
||||
{
|
||||
List_Book_SelectionChanged(null, null);
|
||||
bs1_CurrentChanged(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -821,18 +808,22 @@ namespace UniMarc
|
||||
switch (key)
|
||||
{
|
||||
case Keys.F9:
|
||||
radA.Checked = true;// cb_grade.SelectedIndex = 0;// = "A (F9)";
|
||||
uC_SelectGrade1.GradeName = "A";
|
||||
//radA.Checked = true;// cb_grade.SelectedIndex = 0;// = "A (F9)";
|
||||
break;
|
||||
case Keys.F10:
|
||||
radB.Checked = true;// cb_grade.SelectedIndex = 1;// = "B (F10)";
|
||||
uC_SelectGrade1.GradeName = "B";
|
||||
//radB.Checked = true;// cb_grade.SelectedIndex = 1;// = "B (F10)";
|
||||
//Btn_Save_Click(null, null);
|
||||
break;
|
||||
case Keys.F11:
|
||||
radC.Checked = true;// cb_grade.SelectedIndex = 2;// = "C (F11)";
|
||||
uC_SelectGrade1.GradeName = "C";
|
||||
//radC.Checked = true;// cb_grade.SelectedIndex = 2;// = "C (F11)";
|
||||
//Btn_Save_Click(null, null);
|
||||
break;
|
||||
case Keys.F12:
|
||||
radD.Checked = true;// cb_grade.SelectedIndex = 3;//.SelectedItem = "D (F12)";
|
||||
uC_SelectGrade1.GradeName = "D";
|
||||
//radD.Checked = true;// cb_grade.SelectedIndex = 3;//.SelectedItem = "D (F12)";
|
||||
//Btn_Save_Click(null, null);
|
||||
break;
|
||||
}
|
||||
@@ -957,63 +948,62 @@ namespace UniMarc
|
||||
string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
string orimarc = marcEditorControl1.MakeMarcString();
|
||||
|
||||
|
||||
//아래는 실제 폼에서의 저장코드
|
||||
// [신규 방식: 데이터 객체(Item) 중심 로직]
|
||||
var item = this.dataList.Where(t => t.ListIdx == this.Param.ListIdx).FirstOrDefault();
|
||||
if (item == null) return;
|
||||
|
||||
string table_name = "Marc";
|
||||
//string table_name = "Marc";
|
||||
string newsavedMarc = orimarc;
|
||||
var v_grade = "";// cb_grade.SelectedIndex.ToString(); // 등급은 0~3의 숫자로 저장된다고 가정
|
||||
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";
|
||||
|
||||
// cb_grade.SelectedIndex.ToString(); // 등급은 0~3의 숫자로 저장된다고 가정
|
||||
var v_grade = uC_SelectGrade1.Grade == -1 ? "" : uC_SelectGrade1.Grade.ToString();
|
||||
var v_etc1 = this.etc1.Text.Trim();
|
||||
var v_etc2 = this.etc2.Text.Trim();
|
||||
|
||||
// 1. DB 작업 (저장 전략 결정: Status 기준)
|
||||
if (item.Status == MarcRecordStatus.OtherCompany || item.Status == MarcRecordStatus.None)
|
||||
// 1. DB 작업 (공용 메서드로 통합 관리)
|
||||
int targetMarcIdx = (item.Status == MarcRecordStatus.MyCompany) ? item.MarcIdx : 0;
|
||||
var saveResult = Helper_DB.UpdateMarc(targetMarcIdx, orimarc, uC_SelectGrade1.Grade, v_etc1, v_etc2, this.Param.URL, this.Param.OriginalMarc);
|
||||
if (saveResult.result == false)
|
||||
{
|
||||
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 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));
|
||||
|
||||
long newIdx = db.DB_Send_CMD_Insert_GetIdx(Incmd);
|
||||
if (newIdx > 0)
|
||||
{
|
||||
item.MarcIdx = newIdx.ToString();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
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 };
|
||||
|
||||
if (string.IsNullOrEmpty(this.Param.ISBN13)) { UTIL.MsgE("ISBN 데이터가 없습니다."); return; }
|
||||
|
||||
string U_cmd = db.More_Update(table_name, Edit_tbl, Edit_col, Sear_tbl, Sear_col);
|
||||
PUB.log.Add("Update", string.Format("{0}({1},{2}) : {3}", mUserName, mCompidx, item.Status, U_cmd.Replace("\r", " ").Replace("\n", " ")));
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
UTIL.MsgE(saveResult.message);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// 새로 생성된 인덱스 반영
|
||||
if(saveResult.newidx != item.MarcIdx)
|
||||
{
|
||||
Console.WriteLine($"new marc index set : {item.MarcIdx} to {saveResult.newidx}");
|
||||
item.MarcIdx = saveResult.newidx;
|
||||
}
|
||||
|
||||
// 2. 객체 데이터 업데이트 및 시각적 상태 계산
|
||||
item.Status = MarcRecordStatus.MyCompany;
|
||||
item.BackColor = GetSaveDateColor(date);
|
||||
item.Grade = v_grade; //등급업데이트추가
|
||||
item.DbMarc = orimarc;
|
||||
|
||||
SetMarcItemInfo(item,
|
||||
saveResult.newidx,
|
||||
PUB.user.CompanyIdx,
|
||||
orimarc,
|
||||
v_grade,
|
||||
PUB.user.UserName,
|
||||
saveResult.date,
|
||||
string.Empty);
|
||||
|
||||
|
||||
|
||||
// 3. 목록 인덱스 연동 업데이트 (Obj_List_Book)
|
||||
string UpdateListIndex = string.Format("UPDATE `Obj_List_Book` SET `m_idx` = {0} WHERE `idx` = {1} AND `compidx` ={2};", item.MarcIdx, item.ListIdx, mCompidx);
|
||||
string UpdateListIndex = string.Format("UPDATE `Obj_List_Book` SET `m_idx` = {0} WHERE `idx` = {1} AND `compidx` = \"{2}\";", item.MarcIdx, item.ListIdx, mCompidx);
|
||||
Helper_DB.ExcuteNonQuery(UpdateListIndex);
|
||||
|
||||
//업데이트되도록 원래데이터를 초기화한다 260308
|
||||
mOldMarc = string.Empty;
|
||||
mOldMarIdx = -1;
|
||||
|
||||
// 4. BindingSource 갱신으로 UI 자동 업데이트
|
||||
bs1.ResetCurrentItem();
|
||||
bs1_CurrentChanged(null, null);
|
||||
UTIL.MsgI("저장되었습니다!");
|
||||
}
|
||||
|
||||
@@ -1042,7 +1032,7 @@ namespace UniMarc
|
||||
BookName = item.BookName ?? "",
|
||||
Author = item.Author ?? "",
|
||||
Publisher = item.BookComp ?? "",
|
||||
Price = item.Pay ?? ""
|
||||
Price = item.Pay
|
||||
};
|
||||
fb.InitFillBlank(fbItem);
|
||||
}
|
||||
@@ -1057,10 +1047,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;
|
||||
@@ -1096,5 +1086,133 @@ namespace UniMarc
|
||||
rt.AppendText("[" + DateTime.Now.ToString("yy-MM-dd") + "]");
|
||||
}
|
||||
}
|
||||
|
||||
private void bs1_CurrentChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!mLoadCompleted) return;
|
||||
var dr = bs1.Current as MarcBookItem;
|
||||
if (dr == null)
|
||||
{
|
||||
mOldMarIdx = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mOldMarc == null) mOldMarc = string.Empty;
|
||||
|
||||
//if (List_Book.CurrentCell == null) return;
|
||||
//int row_idx = List_Book.CurrentCell.RowIndex;
|
||||
//int col_idx = List_Book.CurrentCell.ColumnIndex;
|
||||
|
||||
//if (List_Book.SelectedCells.Count > 0)
|
||||
//{
|
||||
// row_idx = List_Book.SelectedCells[0].RowIndex;
|
||||
// col_idx = List_Book.SelectedCells[0].ColumnIndex;
|
||||
//}
|
||||
|
||||
//if (row_idx == -1 || col_idx == -1) { return; }
|
||||
//SaveRowIdx = row_idx;
|
||||
if (dr.DbMarc != null && dr.DbMarc.Equals(mOldMarc) && dr.MarcIdx.Equals(this.mOldMarIdx)) return;
|
||||
|
||||
mOldMarc = dr.DbMarc ?? string.Empty;// List_Book.Rows[row_idx].Cells["db_marc"].Value?.ToString() ?? string.Empty;
|
||||
mOldMarIdx = dr.MarcIdx;
|
||||
|
||||
string isbn = dr.ISBN13;// 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")
|
||||
{
|
||||
btn_CopySelect.Enabled = false;
|
||||
btn_CopySelect.BackColor = Color.Silver;
|
||||
}
|
||||
else
|
||||
{
|
||||
btn_CopySelect.Enabled = true;
|
||||
btn_CopySelect.BackColor = Color.Khaki;
|
||||
}
|
||||
|
||||
btn_CopySelect.Text = CountResult;
|
||||
}
|
||||
|
||||
|
||||
string isbn13 = dr.ISBN13;// List_Book.Rows[row_idx].Cells["ISBN13"].Value?.ToString() ?? "";
|
||||
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() ?? "";
|
||||
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?
|
||||
var marcIdx = dr.MarcIdx;// List_Book.Rows[row_idx].Cells["marc_idx"].Value?.ToString() ?? "";
|
||||
string dbMarc = dr.DbMarc ?? string.Empty;// 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() ?? "";
|
||||
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:{bs1.Position},List:{listIdx},Marc:{marcIdx}";
|
||||
var remark = ReadRemark(dr.MarcIdx.ToString());
|
||||
this.Param = new MacEditorParameter
|
||||
{
|
||||
ISBN13 = isbn13,
|
||||
URL = url,
|
||||
ListIdx = listIdx,
|
||||
MarcIdx = marcIdx,
|
||||
SaveDate = saveDate,
|
||||
User = user,
|
||||
BookName = bookName,
|
||||
Author = author,
|
||||
Publisher = publisher,
|
||||
Price = price,
|
||||
OriginalMarc = dbMarc,
|
||||
};
|
||||
var defMarc = PUB.MakeEmptyMarc(isbn13, bookName, author, publisher, price);
|
||||
var load_ret = marcEditorControl1.LoadBookData(dbMarc, isbn13, defMarc);
|
||||
|
||||
//등급선택 (dbMarc 데이터를 확인하여. 등급을 결정한다)
|
||||
int gradeNo;
|
||||
if (load_ret ==false)
|
||||
{
|
||||
//richTextBox1.Text = Make_Empty();
|
||||
gradeNo = 3; //마크가 없는것은 D등급으로 한다
|
||||
remark.remark1 = string.Empty;
|
||||
remark.remark2 = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
//자료의 등급 다시 선택
|
||||
if (int.TryParse(grade, out gradeNo) == false)
|
||||
gradeNo = 2;
|
||||
}
|
||||
|
||||
etc1.Text = remark.remark1;
|
||||
etc2.Text = remark.remark2;
|
||||
|
||||
uC_SelectGrade1.Grade = gradeNo;
|
||||
|
||||
lbl_SaveData.Multiline = true;
|
||||
lbl_SaveData.Text = $"[{user}-{saveDate}]\r\n{dr.search_book_name}\r\n{dr.search_author}\r\n{dr.search_book_comp}\r\n{dr.category}";
|
||||
if (dr.search_url.isEmpty())
|
||||
{
|
||||
linkLabel1.Enabled = false;
|
||||
linkLabel1.Text = "ISBN 검색 URL이 존재하지않습니다.";
|
||||
linkLabel1.Tag = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
linkLabel1.Text = dr.search_url;
|
||||
linkLabel1.Tag = dr.search_url;
|
||||
linkLabel1.Enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
|
||||
{
|
||||
if (linkLabel1.Tag == null) return;
|
||||
var ulr = linkLabel1.Tag.ToString();
|
||||
System.Diagnostics.Process.Start(ulr);
|
||||
}
|
||||
}
|
||||
}
|
||||
111
unimarc/unimarc/마크/Marc2.designer.cs
generated
111
unimarc/unimarc/마크/Marc2.designer.cs
generated
@@ -96,20 +96,17 @@
|
||||
this.etc1 = new System.Windows.Forms.RichTextBox();
|
||||
this.etc2 = new System.Windows.Forms.RichTextBox();
|
||||
this.panel6 = new System.Windows.Forms.Panel();
|
||||
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
|
||||
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
this.btCopy = new System.Windows.Forms.Button();
|
||||
this.btn_FillBlank = new System.Windows.Forms.Button();
|
||||
this.btPrev = new System.Windows.Forms.Button();
|
||||
this.btNext = new System.Windows.Forms.Button();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
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.lbl_SaveData = new System.Windows.Forms.TextBox();
|
||||
this.btn_Save = new System.Windows.Forms.Button();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.marcEditorControl1 = new UniMarc.MarcEditorControl();
|
||||
this.uC_SelectGrade1 = new UniMarc.UC_SelectGrade();
|
||||
label31 = new System.Windows.Forms.Label();
|
||||
label30 = new System.Windows.Forms.Label();
|
||||
label33 = new System.Windows.Forms.Label();
|
||||
@@ -649,6 +646,10 @@
|
||||
this.bn1.TabIndex = 326;
|
||||
this.bn1.Text = "bindingNavigator1";
|
||||
//
|
||||
// bs1
|
||||
//
|
||||
this.bs1.CurrentChanged += new System.EventHandler(this.bs1_CurrentChanged);
|
||||
//
|
||||
// bindingNavigatorCountItem
|
||||
//
|
||||
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
|
||||
@@ -683,7 +684,6 @@
|
||||
//
|
||||
this.bindingNavigatorPositionItem.AccessibleName = "위치";
|
||||
this.bindingNavigatorPositionItem.AutoSize = false;
|
||||
this.bindingNavigatorPositionItem.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||
this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
|
||||
this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
|
||||
this.bindingNavigatorPositionItem.Text = "0";
|
||||
@@ -781,15 +781,12 @@
|
||||
//
|
||||
// panel6
|
||||
//
|
||||
this.panel6.Controls.Add(this.linkLabel1);
|
||||
this.panel6.Controls.Add(this.uC_SelectGrade1);
|
||||
this.panel6.Controls.Add(this.tableLayoutPanel2);
|
||||
this.panel6.Controls.Add(this.button3);
|
||||
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.lbl_SaveData);
|
||||
this.panel6.Controls.Add(this.btn_Save);
|
||||
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";
|
||||
@@ -797,6 +794,17 @@
|
||||
this.panel6.TabIndex = 1;
|
||||
this.panel6.Paint += new System.Windows.Forms.PaintEventHandler(this.panel6_Paint);
|
||||
//
|
||||
// linkLabel1
|
||||
//
|
||||
this.linkLabel1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.linkLabel1.Location = new System.Drawing.Point(0, 201);
|
||||
this.linkLabel1.Name = "linkLabel1";
|
||||
this.linkLabel1.Size = new System.Drawing.Size(266, 14);
|
||||
this.linkLabel1.TabIndex = 408;
|
||||
this.linkLabel1.TabStop = true;
|
||||
this.linkLabel1.Text = "search url";
|
||||
this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
this.tableLayoutPanel2.ColumnCount = 2;
|
||||
@@ -869,63 +877,15 @@
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||
//
|
||||
// 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(196, 46);
|
||||
this.radD.Name = "radD";
|
||||
this.radD.Size = new System.Drawing.Size(42, 27);
|
||||
this.radD.TabIndex = 323;
|
||||
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(149, 46);
|
||||
this.radC.Name = "radC";
|
||||
this.radC.Size = new System.Drawing.Size(41, 27);
|
||||
this.radC.TabIndex = 322;
|
||||
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(102, 46);
|
||||
this.radB.Name = "radB";
|
||||
this.radB.Size = new System.Drawing.Size(41, 27);
|
||||
this.radB.TabIndex = 321;
|
||||
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(55, 46);
|
||||
this.radA.Name = "radA";
|
||||
this.radA.Size = new System.Drawing.Size(41, 27);
|
||||
this.radA.TabIndex = 320;
|
||||
this.radA.TabStop = true;
|
||||
this.radA.Text = "A";
|
||||
this.radA.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// lbl_SaveData
|
||||
//
|
||||
this.lbl_SaveData.BackColor = System.Drawing.Color.SkyBlue;
|
||||
this.lbl_SaveData.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.lbl_SaveData.Font = new System.Drawing.Font("굴림체", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.lbl_SaveData.ForeColor = System.Drawing.Color.Black;
|
||||
this.lbl_SaveData.Location = new System.Drawing.Point(13, 78);
|
||||
this.lbl_SaveData.Location = new System.Drawing.Point(5, 78);
|
||||
this.lbl_SaveData.Multiline = true;
|
||||
this.lbl_SaveData.Name = "lbl_SaveData";
|
||||
this.lbl_SaveData.Size = new System.Drawing.Size(241, 131);
|
||||
this.lbl_SaveData.Size = new System.Drawing.Size(255, 119);
|
||||
this.lbl_SaveData.TabIndex = 319;
|
||||
this.lbl_SaveData.Text = "[] []";
|
||||
//
|
||||
@@ -939,16 +899,6 @@
|
||||
this.btn_Save.UseVisualStyleBackColor = true;
|
||||
this.btn_Save.Click += new System.EventHandler(this.btn_Save_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(14, 56);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(31, 12);
|
||||
this.label6.TabIndex = 223;
|
||||
this.label6.Text = "등급";
|
||||
//
|
||||
// marcEditorControl1
|
||||
//
|
||||
this.marcEditorControl1.BackColor = System.Drawing.Color.Gray;
|
||||
@@ -959,6 +909,16 @@
|
||||
this.marcEditorControl1.Size = new System.Drawing.Size(1030, 658);
|
||||
this.marcEditorControl1.TabIndex = 0;
|
||||
//
|
||||
// uC_SelectGrade1
|
||||
//
|
||||
this.uC_SelectGrade1.BackColor = System.Drawing.Color.White;
|
||||
this.uC_SelectGrade1.Grade = -1;
|
||||
this.uC_SelectGrade1.GradeName = "";
|
||||
this.uC_SelectGrade1.Location = new System.Drawing.Point(13, 45);
|
||||
this.uC_SelectGrade1.Name = "uC_SelectGrade1";
|
||||
this.uC_SelectGrade1.Size = new System.Drawing.Size(241, 28);
|
||||
this.uC_SelectGrade1.TabIndex = 407;
|
||||
//
|
||||
// Marc2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
@@ -1055,13 +1015,10 @@
|
||||
private System.Windows.Forms.Button btPrev;
|
||||
private System.Windows.Forms.Button btn_Save;
|
||||
private System.Windows.Forms.Button btn_FillBlank;
|
||||
private System.Windows.Forms.Label label6;
|
||||
private System.Windows.Forms.TextBox lbl_SaveData;
|
||||
private System.Windows.Forms.RadioButton radA;
|
||||
private System.Windows.Forms.RadioButton radC;
|
||||
private System.Windows.Forms.RadioButton radB;
|
||||
private System.Windows.Forms.RadioButton radD;
|
||||
private System.Windows.Forms.Button button3;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
private UC_SelectGrade uC_SelectGrade1;
|
||||
private System.Windows.Forms.LinkLabel linkLabel1;
|
||||
}
|
||||
}
|
||||
25
unimarc/unimarc/마크/MarcCopySelect2.Designer.cs
generated
25
unimarc/unimarc/마크/MarcCopySelect2.Designer.cs
generated
@@ -87,7 +87,7 @@ namespace UniMarc
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.ReadOnly = true;
|
||||
this.dataGridView1.RowTemplate.Height = 23;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(1293, 210);
|
||||
this.dataGridView1.Size = new System.Drawing.Size(1571, 210);
|
||||
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);
|
||||
@@ -106,7 +106,7 @@ namespace UniMarc
|
||||
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(1293, 33);
|
||||
this.panel1.Size = new System.Drawing.Size(1571, 33);
|
||||
this.panel1.TabIndex = 1;
|
||||
//
|
||||
// progressBar1
|
||||
@@ -185,7 +185,7 @@ namespace UniMarc
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 33);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(1293, 237);
|
||||
this.panel2.Size = new System.Drawing.Size(1571, 237);
|
||||
this.panel2.TabIndex = 2;
|
||||
//
|
||||
// bindingNavigator1
|
||||
@@ -213,7 +213,7 @@ namespace UniMarc
|
||||
this.bindingNavigator1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
|
||||
this.bindingNavigator1.Name = "bindingNavigator1";
|
||||
this.bindingNavigator1.PositionItem = this.bindingNavigatorPositionItem;
|
||||
this.bindingNavigator1.Size = new System.Drawing.Size(1293, 27);
|
||||
this.bindingNavigator1.Size = new System.Drawing.Size(1571, 27);
|
||||
this.bindingNavigator1.TabIndex = 4;
|
||||
this.bindingNavigator1.Text = "bindingNavigator1";
|
||||
//
|
||||
@@ -251,7 +251,6 @@ namespace UniMarc
|
||||
//
|
||||
this.bindingNavigatorPositionItem.AccessibleName = "위치";
|
||||
this.bindingNavigatorPositionItem.AutoSize = false;
|
||||
this.bindingNavigatorPositionItem.Font = new System.Drawing.Font("맑은 고딕", 9F);
|
||||
this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
|
||||
this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
|
||||
this.bindingNavigatorPositionItem.Text = "0";
|
||||
@@ -293,7 +292,7 @@ namespace UniMarc
|
||||
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(1050, 528);
|
||||
this.richTextBox1.Size = new System.Drawing.Size(1328, 611);
|
||||
this.richTextBox1.TabIndex = 0;
|
||||
this.richTextBox1.Text = "";
|
||||
//
|
||||
@@ -304,7 +303,7 @@ namespace UniMarc
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel3.Location = new System.Drawing.Point(0, 270);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(1293, 528);
|
||||
this.panel3.Size = new System.Drawing.Size(1571, 611);
|
||||
this.panel3.TabIndex = 3;
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
@@ -314,12 +313,12 @@ namespace UniMarc
|
||||
this.tableLayoutPanel1.Controls.Add(this.rtEtc1, 0, 0);
|
||||
this.tableLayoutPanel1.Controls.Add(this.rtEtc2, 0, 1);
|
||||
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(1050, 0);
|
||||
this.tableLayoutPanel1.Location = new System.Drawing.Point(1328, 0);
|
||||
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(243, 528);
|
||||
this.tableLayoutPanel1.Size = new System.Drawing.Size(243, 611);
|
||||
this.tableLayoutPanel1.TabIndex = 1;
|
||||
//
|
||||
// rtEtc1
|
||||
@@ -329,7 +328,7 @@ namespace UniMarc
|
||||
this.rtEtc1.Font = new System.Drawing.Font("굴림체", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.rtEtc1.Location = new System.Drawing.Point(3, 3);
|
||||
this.rtEtc1.Name = "rtEtc1";
|
||||
this.rtEtc1.Size = new System.Drawing.Size(237, 258);
|
||||
this.rtEtc1.Size = new System.Drawing.Size(237, 299);
|
||||
this.rtEtc1.TabIndex = 32;
|
||||
this.rtEtc1.Text = "Remark1";
|
||||
//
|
||||
@@ -338,9 +337,9 @@ namespace UniMarc
|
||||
this.rtEtc2.BackColor = System.Drawing.SystemColors.ScrollBar;
|
||||
this.rtEtc2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.rtEtc2.Font = new System.Drawing.Font("굴림체", 11.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.rtEtc2.Location = new System.Drawing.Point(3, 267);
|
||||
this.rtEtc2.Location = new System.Drawing.Point(3, 308);
|
||||
this.rtEtc2.Name = "rtEtc2";
|
||||
this.rtEtc2.Size = new System.Drawing.Size(237, 258);
|
||||
this.rtEtc2.Size = new System.Drawing.Size(237, 300);
|
||||
this.rtEtc2.TabIndex = 32;
|
||||
this.rtEtc2.Text = "Remark2";
|
||||
//
|
||||
@@ -348,7 +347,7 @@ namespace UniMarc
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1293, 798);
|
||||
this.ClientSize = new System.Drawing.Size(1571, 881);
|
||||
this.Controls.Add(this.panel3);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using AR;
|
||||
using Microsoft.Office.Interop.Excel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -65,11 +66,14 @@ namespace UniMarc
|
||||
// 5 6 7 8 9
|
||||
"`출판사` AS Comp, `user`, `date`, `grade`, `008tag`, " +
|
||||
// 10 11 12 13 14 15
|
||||
"`marc` AS marc_db, `marc_chk`, `marc1`, `marc_chk1`, `marc2`, `marc_chk2`, `비고1` as remark1, `비고2` as remark2";
|
||||
"`marc` AS marc_db, `marc_chk`, `marc1`, `marc_chk1`, `marc2`, `marc_chk2`, `비고1` as remark1, `비고2` as remark2," +
|
||||
"권차,권차서명, `총서명`, `총서번호`, `출판년월`, `판차` as pancha, " +
|
||||
"TRIM(CONCAT(IFNULL(권차, ''), ' ', IFNULL(권차서명, ''))) AS KwonchaFull, " +
|
||||
"TRIM(CONCAT(IFNULL(`총서명`, ''), ' ', IFNULL(`총서번호`, ''))) AS TotalTitleFull";
|
||||
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);
|
||||
}
|
||||
@@ -85,7 +89,11 @@ namespace UniMarc
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "ISBN", HeaderText = "ISBN", Name = "isbn", Width = 100 });
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "Title", HeaderText = "서명", Name = "Title", Width = 200 });
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "Author", HeaderText = "저자", Name = "Author", Width = 150 });
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "KwonchaFull", HeaderText = "권차", Name = "KwonchaFull", Width = 150 });
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "TotalTitleFull", HeaderText = "총서명", Name = "TotalTitleFull", Width = 180 });
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "Comp", HeaderText = "출판사", Name = "Comp", Width = 150 });
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "pancha", HeaderText = "판차", Name = "pancha", Width = 100 });
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "publishdate", HeaderText = "출판년월", Name = "publishdate", Width = 150 });
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "User", HeaderText = "수정자", Name = "user", Width = 120 });
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "Date", HeaderText = "수정시각", Name = "date", Width = 150 });
|
||||
dgv.Columns.Add(new DataGridViewTextBoxColumn { DataPropertyName = "DisplayGrade", HeaderText = "등급", Name = "grade", Width = 60 });
|
||||
@@ -93,7 +101,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,11 +113,17 @@ 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(),
|
||||
Author = row["Author"].ToString(),
|
||||
|
||||
KwonchaFull = row["KwonchaFull"].ToString(),
|
||||
TotalTitleFull = row["TotalTitleFull"].ToString(),
|
||||
pancha = row["pancha"].ToString(),
|
||||
publishdate = row["출판년월"].ToString(),
|
||||
|
||||
Comp = row["Comp"].ToString(),
|
||||
User = row["user"].ToString(),
|
||||
Date = row["date"].ToString(),
|
||||
@@ -306,7 +320,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)
|
||||
@@ -315,7 +329,7 @@ namespace UniMarc
|
||||
return;
|
||||
}
|
||||
|
||||
if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.Cancel)
|
||||
if (UTIL.MsgQ($"삭제하시겠습니까?\nIDX:{item.idx}") == DialogResult.Cancel)
|
||||
return;
|
||||
|
||||
string User = PUB.user.UserName;
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wQAADsEBuJFr7QAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+
|
||||
wAAADsABataJCQAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+
|
||||
+8H/4IZrWOXAIGPK0/8L933Aqii+5+H/pfv///evvoAhBwcJPU/+T9vyHkNRRPt9sObMWf//e5WewG1A
|
||||
ZNej/72rP6AoCm29B9bcuu7/f//Ov/9d8g/gNiCw+eH/uvnv4IqCW+7+X7T3//+Odf//Z8z5+d+u7ud/
|
||||
+4ztuA3wqLr/P3/aGxRFdsW3/6fP+f3fv+vbf53Cd/8tEtbjNsC+9O7/7MmvMRTpp5z/b1L04r9K1qf/
|
||||
@@ -138,7 +138,7 @@
|
||||
<data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wQAADsEBuJFr7QAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/8EN18gzIL7n4f+l+///96++QLoBEe33
|
||||
wAAADsABataJCQAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/8EN18gzIL7n4f+l+///96++QLoBEe33
|
||||
wZozZ/3/71V6gjQDQlvvgTW3rvv/37/z73+X/APEGxDccvf/or3//3es+/8/Y87P/3Z1P//bZ2wn3gAQ
|
||||
sCu+/T99zu///l3f/usUvvtvkbCeNANAQD/l/H+Tohf/VbI+/TeOXEa6ASBgkHTiv2za1/+6wfPIMwAE
|
||||
9FMv/9fwnUa+ASCg4jGBMgMGLwAA0BRgmCws/7cAAAAASUVORK5CYII=
|
||||
@@ -147,7 +147,7 @@
|
||||
<data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wQAADsEBuJFr7QAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5
|
||||
wAAADsABataJCQAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5
|
||||
8n/2vl//O7f+/e9Wepl0QyK7Hv2fsu3X/5Klf/8nTP/73yb3LGmGBDY//N+69j1Ys3HJl//S0df+G0cu
|
||||
I94Qj6r7/0vmvoNrVnTpIV4zCNiX3v0f2PKMPM0gYJF3579NwRXyNIOAYdZt8jWDgE7aDfI1D00AAKB+
|
||||
X6Bjq5qXAAAAAElFTkSuQmCC
|
||||
@@ -156,7 +156,7 @@
|
||||
<data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
wQAADsEBuJFr7QAAAStJREFUOE9jYBhUoHDW8//oYjAAkmta8Px/5sTHONUw5M589j+h+x5WBSC5VUfe
|
||||
wAAADsABataJCQAAAStJREFUOE9jYBhUoHDW8//oYjAAkmta8Px/5sTHONUw5M589j+h+x5WBSC5VUfe
|
||||
/w9vf4BVHgwypjz9P2//7/8JXXcwFIHkFu778D+44RqGHBwk9Dz5P3vfr/+dW//+dyu9jKIQJDdty/v/
|
||||
/tUXcBsQ2fXo/5Rtv/6XLP37P2H63/82uWfhikFyvas//PcqPYHbgMDmh/9b174HazYu+fJfOvraf+PI
|
||||
ZWANILm6+e/+u+QfwG2AR9X9/yVz38E1K7r0wBWD5PKnvflvn7EdtwH2pXf/B7Y8w9AMk8ue/Pq/RcJ6
|
||||
|
||||
@@ -122,7 +122,7 @@ namespace UniMarc
|
||||
/// <param name="user"></param>
|
||||
/// <param name="saveDate"></param>
|
||||
/// <param name="listIdx"></param>
|
||||
public void LoadBookData(string dbMarc, string isbn = "", string defaultMarc = "")
|
||||
public bool LoadBookData(string dbMarc, string isbn = "", string defaultMarc = "")
|
||||
{
|
||||
mLoadCompleted = false;
|
||||
richTextBox1.Text = "";
|
||||
@@ -182,6 +182,8 @@ namespace UniMarc
|
||||
UpdateTextColor();
|
||||
|
||||
mLoadCompleted = true;
|
||||
|
||||
return check_Marc;
|
||||
}
|
||||
|
||||
|
||||
@@ -569,8 +571,8 @@ namespace UniMarc
|
||||
{
|
||||
// 마크 데이터
|
||||
//string Marc_data = List_Book.Rows[row].Cells["db_marc"].Value.ToString();
|
||||
|
||||
if (Marc_data.Length < 3) return false;
|
||||
var marclen = Marc_data?.Length ?? 0;
|
||||
if (marclen < 3) return false;
|
||||
|
||||
string result = string.Empty;
|
||||
|
||||
|
||||
@@ -23,12 +23,8 @@ namespace UniMarc
|
||||
public RichTextBox etc2;
|
||||
private Panel panel6;
|
||||
private Button button3;
|
||||
private RadioButton radD;
|
||||
private RadioButton radC;
|
||||
private RadioButton radB;
|
||||
private RadioButton radA;
|
||||
private Button btn_Save;
|
||||
private Label label6;
|
||||
private UC_SelectGrade uC_SelectGrade1;
|
||||
string base_midx = "";
|
||||
|
||||
public Marc_CopyForm(string marcstring, string m_idx = "0")
|
||||
@@ -53,7 +49,7 @@ namespace UniMarc
|
||||
var BookName = tags.Length > 0 ? tags[0] : "";
|
||||
this.Text = $"마크 복제 - {BookName}";
|
||||
|
||||
this.radC.Checked = true;
|
||||
this.uC_SelectGrade1.GradeName = "C";
|
||||
this.etc1.Text = string.Empty;
|
||||
this.etc2.Text = string.Empty;
|
||||
}
|
||||
@@ -67,12 +63,8 @@ namespace UniMarc
|
||||
this.etc2 = new System.Windows.Forms.RichTextBox();
|
||||
this.panel6 = new System.Windows.Forms.Panel();
|
||||
this.button3 = new System.Windows.Forms.Button();
|
||||
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.btn_Save = new System.Windows.Forms.Button();
|
||||
this.label6 = new System.Windows.Forms.Label();
|
||||
this.uC_SelectGrade1 = new UniMarc.UC_SelectGrade();
|
||||
this.panel5.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.panel6.SuspendLayout();
|
||||
@@ -138,13 +130,9 @@ namespace UniMarc
|
||||
//
|
||||
// panel6
|
||||
//
|
||||
this.panel6.Controls.Add(this.uC_SelectGrade1);
|
||||
this.panel6.Controls.Add(this.button3);
|
||||
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.btn_Save);
|
||||
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";
|
||||
@@ -161,54 +149,6 @@ namespace UniMarc
|
||||
this.button3.UseVisualStyleBackColor = true;
|
||||
this.button3.Click += new System.EventHandler(this.button3_Click);
|
||||
//
|
||||
// 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(196, 46);
|
||||
this.radD.Name = "radD";
|
||||
this.radD.Size = new System.Drawing.Size(42, 27);
|
||||
this.radD.TabIndex = 323;
|
||||
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(149, 46);
|
||||
this.radC.Name = "radC";
|
||||
this.radC.Size = new System.Drawing.Size(41, 27);
|
||||
this.radC.TabIndex = 322;
|
||||
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(102, 46);
|
||||
this.radB.Name = "radB";
|
||||
this.radB.Size = new System.Drawing.Size(41, 27);
|
||||
this.radB.TabIndex = 321;
|
||||
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(55, 46);
|
||||
this.radA.Name = "radA";
|
||||
this.radA.Size = new System.Drawing.Size(41, 27);
|
||||
this.radA.TabIndex = 320;
|
||||
this.radA.TabStop = true;
|
||||
this.radA.Text = "A";
|
||||
this.radA.UseVisualStyleBackColor = true;
|
||||
//
|
||||
// btn_Save
|
||||
//
|
||||
this.btn_Save.Location = new System.Drawing.Point(11, 6);
|
||||
@@ -219,15 +159,15 @@ namespace UniMarc
|
||||
this.btn_Save.UseVisualStyleBackColor = true;
|
||||
this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
|
||||
//
|
||||
// label6
|
||||
// uC_SelectGrade1
|
||||
//
|
||||
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(14, 56);
|
||||
this.label6.Name = "label6";
|
||||
this.label6.Size = new System.Drawing.Size(31, 12);
|
||||
this.label6.TabIndex = 223;
|
||||
this.label6.Text = "등급";
|
||||
this.uC_SelectGrade1.BackColor = System.Drawing.Color.White;
|
||||
this.uC_SelectGrade1.Grade = -1;
|
||||
this.uC_SelectGrade1.GradeName = "";
|
||||
this.uC_SelectGrade1.Location = new System.Drawing.Point(11, 47);
|
||||
this.uC_SelectGrade1.Name = "uC_SelectGrade1";
|
||||
this.uC_SelectGrade1.Size = new System.Drawing.Size(243, 29);
|
||||
this.uC_SelectGrade1.TabIndex = 406;
|
||||
//
|
||||
// Marc_CopyForm
|
||||
//
|
||||
@@ -240,7 +180,6 @@ namespace UniMarc
|
||||
this.panel5.ResumeLayout(false);
|
||||
this.tableLayoutPanel1.ResumeLayout(false);
|
||||
this.panel6.ResumeLayout(false);
|
||||
this.panel6.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
@@ -286,11 +225,11 @@ namespace UniMarc
|
||||
}
|
||||
|
||||
//등급추가
|
||||
string v_grade = "2";
|
||||
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";
|
||||
string v_grade = uC_SelectGrade1.Grade == -1 ? "2" : uC_SelectGrade1.Grade.ToString();
|
||||
//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";
|
||||
|
||||
var v_remark1 = this.etc1.Text.Trim();
|
||||
var v_remark2 = this.etc2.Text.Trim();
|
||||
@@ -362,10 +301,10 @@ namespace UniMarc
|
||||
var rlt = Helper_DB.ExcuteNonQuery(cmd);
|
||||
if (rlt.applyCount == 1)
|
||||
{
|
||||
UTIL.MsgI("저장되었습니다.");
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
UTIL.MsgI("저장되었습니다.");
|
||||
this.DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
UTIL.MsgE(rlt.errorMessage);
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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,20 @@ 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();
|
||||
if(dr["price"] ==DBNull.Value)
|
||||
{
|
||||
item.Price = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var str_price = dr["price"].ToString();
|
||||
if (int.TryParse(str_price, out int v_price))
|
||||
item.Price = v_price;
|
||||
else
|
||||
item.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 +224,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 +269,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 +396,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 +419,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 +1704,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 +1723,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;
|
||||
|
||||
@@ -54,10 +54,8 @@ namespace UniMarc
|
||||
this.btn_OpenFile = new System.Windows.Forms.Button();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.bn1 = new System.Windows.Forms.BindingNavigator(this.components);
|
||||
this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton();
|
||||
this.bs1 = new System.Windows.Forms.BindingSource(this.components);
|
||||
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
|
||||
this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
|
||||
this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
|
||||
this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
|
||||
this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
|
||||
@@ -212,7 +210,7 @@ namespace UniMarc
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
this.dataGridView1.RowTemplate.Height = 23;
|
||||
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(805, 299);
|
||||
this.dataGridView1.Size = new System.Drawing.Size(902, 500);
|
||||
this.dataGridView1.TabIndex = 2;
|
||||
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
||||
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
||||
@@ -272,7 +270,7 @@ namespace UniMarc
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(805, 33);
|
||||
this.panel2.Size = new System.Drawing.Size(902, 33);
|
||||
this.panel2.TabIndex = 3;
|
||||
//
|
||||
// btn_Morge
|
||||
@@ -301,15 +299,15 @@ namespace UniMarc
|
||||
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel3.Location = new System.Drawing.Point(0, 33);
|
||||
this.panel3.Name = "panel3";
|
||||
this.panel3.Size = new System.Drawing.Size(805, 299);
|
||||
this.panel3.Size = new System.Drawing.Size(902, 500);
|
||||
this.panel3.TabIndex = 4;
|
||||
//
|
||||
// bn1
|
||||
//
|
||||
this.bn1.AddNewItem = this.bindingNavigatorAddNewItem;
|
||||
this.bn1.AddNewItem = null;
|
||||
this.bn1.BindingSource = this.bs1;
|
||||
this.bn1.CountItem = this.bindingNavigatorCountItem;
|
||||
this.bn1.DeleteItem = this.bindingNavigatorDeleteItem;
|
||||
this.bn1.DeleteItem = null;
|
||||
this.bn1.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.bn1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
this.bindingNavigatorMoveFirstItem,
|
||||
@@ -320,29 +318,18 @@ namespace UniMarc
|
||||
this.bindingNavigatorSeparator1,
|
||||
this.bindingNavigatorMoveNextItem,
|
||||
this.bindingNavigatorMoveLastItem,
|
||||
this.bindingNavigatorSeparator2,
|
||||
this.bindingNavigatorAddNewItem,
|
||||
this.bindingNavigatorDeleteItem});
|
||||
this.bn1.Location = new System.Drawing.Point(0, 332);
|
||||
this.bindingNavigatorSeparator2});
|
||||
this.bn1.Location = new System.Drawing.Point(0, 533);
|
||||
this.bn1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
|
||||
this.bn1.MoveLastItem = this.bindingNavigatorMoveLastItem;
|
||||
this.bn1.MoveNextItem = this.bindingNavigatorMoveNextItem;
|
||||
this.bn1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
|
||||
this.bn1.Name = "bn1";
|
||||
this.bn1.PositionItem = this.bindingNavigatorPositionItem;
|
||||
this.bn1.Size = new System.Drawing.Size(805, 25);
|
||||
this.bn1.Size = new System.Drawing.Size(902, 25);
|
||||
this.bn1.TabIndex = 327;
|
||||
this.bn1.Text = "bindingNavigator1";
|
||||
//
|
||||
// bindingNavigatorAddNewItem
|
||||
//
|
||||
this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image")));
|
||||
this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem";
|
||||
this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true;
|
||||
this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22);
|
||||
this.bindingNavigatorAddNewItem.Text = "새로 추가";
|
||||
//
|
||||
// bindingNavigatorCountItem
|
||||
//
|
||||
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
|
||||
@@ -350,15 +337,6 @@ namespace UniMarc
|
||||
this.bindingNavigatorCountItem.Text = "/{0}";
|
||||
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
|
||||
//
|
||||
// bindingNavigatorDeleteItem
|
||||
//
|
||||
this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image")));
|
||||
this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem";
|
||||
this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true;
|
||||
this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22);
|
||||
this.bindingNavigatorDeleteItem.Text = "삭제";
|
||||
//
|
||||
// bindingNavigatorMoveFirstItem
|
||||
//
|
||||
this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
@@ -424,7 +402,7 @@ namespace UniMarc
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(805, 357);
|
||||
this.ClientSize = new System.Drawing.Size(902, 558);
|
||||
this.Controls.Add(this.panel3);
|
||||
this.Controls.Add(this.bn1);
|
||||
this.Controls.Add(this.panel2);
|
||||
@@ -472,10 +450,8 @@ namespace UniMarc
|
||||
private System.Windows.Forms.DataGridViewCheckBoxColumn colCheck;
|
||||
private System.Windows.Forms.Button btn_OpenFile;
|
||||
private System.Windows.Forms.BindingNavigator bn1;
|
||||
private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
|
||||
private System.Windows.Forms.BindingSource bs1;
|
||||
private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
|
||||
private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem;
|
||||
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
|
||||
private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
|
||||
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
|
||||
|
||||
@@ -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);
|
||||
@@ -272,28 +272,64 @@ namespace UniMarc
|
||||
{
|
||||
String_Text st = new String_Text();
|
||||
|
||||
string[] grid = text.Split(' ');
|
||||
for (int a = 0; a < grid.Length - 1; a++)
|
||||
{
|
||||
string[] Search = {
|
||||
// 등록번호, 분류기호, 저자기호, 볼륨v, 복본c, 별치f
|
||||
"049l", "090a", "090b", "049v", "049c", "049f",
|
||||
// ISBN, 도서명, 총서명1, 총서번호1, 총서명2, 총서번호2, 출판사, 정가, 저자
|
||||
"020a", "245a", "440a", "440v", "490a", "490v", "260b", "950b", "245d" };
|
||||
string[] grid = text.Split(new char[] { (char)0x1D }, StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
string[] Search_Res = st.Take_Tag(grid[a], Search);
|
||||
string[] Author_Search = { "100a", "110a", "111a" };
|
||||
string[] Author_Res = st.Take_Tag(grid[a], Author_Search);
|
||||
string author_Fin = Search_Res[14];
|
||||
foreach (string author in Author_Res)
|
||||
var fullparser = new MarcParser();
|
||||
var warnmessage = new System.Text.StringBuilder();
|
||||
for (int a = 0; a < grid.Length ; a++)
|
||||
{
|
||||
//string[] Search = {
|
||||
//// 등록번호, 분류기호, 저자기호, 볼륨v, 복본c, 별치f
|
||||
// "049l", "090a", "090b", "049v", "049c", "049f",
|
||||
//// ISBN, 도서명, 총서명1, 총서번호1, 총서명2, 총서번호2, 출판사, 정가, 저자
|
||||
// "020a", "245a", "440a", "440v", "490a", "490v", "260b", "950b", "245d" };
|
||||
|
||||
var fullmarc = grid[a] + (char)0x1D;
|
||||
var rlt = fullparser.ParseFullMarc(fullmarc);
|
||||
if (rlt.success == false)
|
||||
{
|
||||
if (author != "")
|
||||
{
|
||||
author_Fin = author;
|
||||
break;
|
||||
}
|
||||
warnmessage.AppendLine($"[{a + 1}] 번 줄 마크 인식 실패 : {rlt.message}");
|
||||
continue;
|
||||
}
|
||||
|
||||
// string[] Search_Res = st.Take_Tag(grid[a], 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_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;
|
||||
|
||||
var str_price = fullparser.GetTag("950b").FirstOrDefault() ?? string.Empty;
|
||||
int.TryParse(str_price, out int v_price);
|
||||
var item = new MarcPlanItem
|
||||
{
|
||||
RegNum = fullparser.GetTag("049l").FirstOrDefault(),// Search_Res[0], 등록번호
|
||||
ClassCode = fullparser.GetTag("090a").FirstOrDefault(),//Search_Res[1], 분류기호
|
||||
AuthorCode = fullparser.GetTag("090b").FirstOrDefault(),//Search_Res[2], 저자기호
|
||||
Volume = fullparser.GetTag("049v").FirstOrDefault(),//Search_Res[3], 볼륨v
|
||||
Copy = fullparser.GetTag("049c").FirstOrDefault(),//Search_Res[4], 복본c
|
||||
Prefix = fullparser.GetTag("049f").FirstOrDefault(),//Search_Res[5], 별치f
|
||||
Isbn = fullparser.GetTag("020a").FirstOrDefault(),//Search_Res[6], ISBN
|
||||
BookName = fullparser.GetTag("245a").FirstOrDefault(),// Search_Res[7], 도서명
|
||||
SBookName1 = fullparser.GetTag("440a").FirstOrDefault(),// Search_Res[8],총서명1
|
||||
SBookNum1 = fullparser.GetTag("440v").FirstOrDefault(),//Search_Res[9],총서번호1
|
||||
SBookName2 = fullparser.GetTag("490a").FirstOrDefault(),//Search_Res[10],총서명2
|
||||
SBookNum2 = fullparser.GetTag("490v").FirstOrDefault(),//Search_Res[11],총서번호2
|
||||
Author = v_author,
|
||||
BookComp = fullparser.GetTag("260b").FirstOrDefault(),//Search_Res[12],출판사
|
||||
Price = v_price,//Convert.ToInt32(fullparser.GetTag("950b").FirstOrDefault()),//Search_Res[13],정가
|
||||
Marc = fullmarc,
|
||||
ColCheck = "T"
|
||||
};
|
||||
|
||||
// idx, 연번, 등록번호, 분류, 저자기호
|
||||
// "", "", Search_Res[0], Search_Res[1], Search_Res[2],
|
||||
// 볼륨v, 복본c, 별치f, 구분, isbn
|
||||
@@ -305,30 +341,12 @@ namespace UniMarc
|
||||
// 검색태그
|
||||
// "", "T"
|
||||
|
||||
var item = new MarcPlanItem
|
||||
{
|
||||
RegNum = Search_Res[0],
|
||||
ClassCode = Search_Res[1],
|
||||
AuthorCode = Search_Res[2],
|
||||
Volume = Search_Res[3],
|
||||
Copy = Search_Res[4],
|
||||
Prefix = Search_Res[5],
|
||||
Isbn = Search_Res[6],
|
||||
BookName = Search_Res[7],
|
||||
SBookName1 = Search_Res[8],
|
||||
SBookNum1 = Search_Res[9],
|
||||
SBookName2 = Search_Res[10],
|
||||
SBookNum2 = Search_Res[11],
|
||||
Author = author_Fin,
|
||||
BookComp = Search_Res[12],
|
||||
Price = Search_Res[13],
|
||||
Marc = grid[a],
|
||||
ColCheck = "T"
|
||||
};
|
||||
|
||||
if (ResultItems == null) ResultItems = new List<MarcPlanItem>();
|
||||
ResultItems.Add(item);
|
||||
}
|
||||
if (warnmessage.Length > 0)
|
||||
UTIL.MsgI(warnmessage.ToString());
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -135,34 +135,10 @@
|
||||
<metadata name="bn1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="bindingNavigatorAddNewItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vAAADrwBlbxySQAAAVdJREFUOE/Nz0tLAmEUBmB3kWRoCUVEISFUJGb1OywiKrDsIpZdkJAkDUvDQkij
|
||||
UKSbVIvatKhNi9oERRAGEQXhjJdp7Hd83/eGs2jhLGQ20QtndTgP71Gp/m0KZ1XInlTjM6XG+4EG5fuK
|
||||
yaTUIN8bIMUQ0gmtcuBtX/MLPMT0yoHnuA6kuA4iruI20lAZ+DiswWuyFum4Dk+7dbiP6kHEFVDBg+tQ
|
||||
My4DLbjwG3DqbcORxygHXxJakGIQRFwDEf0gwjKI4AYtzIHmHaA5Oxg/CsYPIb7YIQced+qluvTLCyIs
|
||||
gRYWQPNO0NwkWNYGxg+DcYNgGSu2Z0xy4C7SiJtwE66kuq049xlAs2Ng/AiS7nbszXci6jIh4jQjPGWR
|
||||
A+U59hiluowbQMzVVfmgPKU/GdcPxlmx5TArB6KzJunf0gTtPcqBzeluhCYsCIz3wm/rUw78WX4AJCPY
|
||||
nlwVm9EAAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="bs1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>92, 17</value>
|
||||
</metadata>
|
||||
<data name="bindingNavigatorDeleteItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vAAADrwBlbxySQAAAWtJREFUOE+1kE0ow2Ecx/9X5a2UiwtKOSCTmJBMhuQlMo3IvCUHDouEXHZwIOVC
|
||||
DrhIDiQl5USy07zNa2tKf2laaRf84/J8xBCetab4XL/f76fn+SnKX4DrGLqrwbHDzywkWJlHdJYjLEbY
|
||||
Wg8q4eYKlma+d1hbgF4TotWIaC+FuYmAktcXCksx2HrknBOHX1KbiTDngrXhW0kMdSBM2TA5Io+/wuI0
|
||||
oiz5TcRwB7hPYazfLx3rDz7+gCsXNBb4v1SdgajTQ19TaOMP2NtFmPSIilSo0v1y7FHBnAdZMWi6aO51
|
||||
kVCTGZoEzzWYciA/Dl9bBZwfvh3XmxIJy7PBJdx5odnAQ2E87qJUfPbtzwGjVpxJEWjH+4ElPD/BYBsY
|
||||
EjhKicW3sSoVb0vSUFsq0W6upUxhdxMtOxZnYhhqVz1oj3JJUZSdpCg0p0POmLKhJofjNqaDeikX3tFG
|
||||
uuHsQM65cML4ABzY5fA/eQGKIwMcVjm2bAAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
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 dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = 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;
|
||||
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;
|
||||
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;
|
||||
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
|
||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.idx,
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -165,9 +165,6 @@
|
||||
<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>
|
||||
@@ -175,7 +172,7 @@
|
||||
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vgAADr4B6kKxwAAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+
|
||||
vQAADr0BR/uQrQAAATFJREFUOE9jYBg0oHDW8/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/
|
||||
@@ -186,7 +183,7 @@
|
||||
<data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vgAADr4B6kKxwAAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/8EN18gzIL7n4f+l+///96++QLoBEe33
|
||||
vQAADr0BR/uQrQAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/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=
|
||||
@@ -195,7 +192,7 @@
|
||||
<data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vgAADr4B6kKxwAAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5
|
||||
vQAADr0BR/uQrQAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5
|
||||
8n/2vl//O7f+/e9Wepl0QyK7Hv2fsu3X/5Klf/8nTP/73yb3LGmGBDY//N+69j1Ys3HJl//S0df+G0cu
|
||||
I94Qj6r7/0vmvoNrVnTpIV4zCNiX3v0f2PKMPM0gYJF3579NwRXyNIOAYdZt8jWDgE7aDfI1D00AAKB+
|
||||
X6Bjq5qXAAAAAElFTkSuQmCC
|
||||
@@ -204,7 +201,7 @@
|
||||
<data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||
vgAADr4B6kKxwAAAAStJREFUOE9jYBhUoHDW8//oYjAAkmta8Px/5sTHONUw5M589j+h+x5WBSC5VUfe
|
||||
vQAADr0BR/uQrQAAAStJREFUOE9jYBhUoHDW8//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
|
||||
|
||||
86
unimarc/unimarc/마크/fMarc_Editor.Designer.cs
generated
86
unimarc/unimarc/마크/fMarc_Editor.Designer.cs
generated
@@ -35,15 +35,11 @@ namespace UniMarc
|
||||
this.etc2 = new System.Windows.Forms.RichTextBox();
|
||||
this.panel6 = new System.Windows.Forms.Panel();
|
||||
this.btn_FillBlank = new System.Windows.Forms.Button();
|
||||
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.uC_SelectGrade1 = new UniMarc.UC_SelectGrade();
|
||||
this.panel5.SuspendLayout();
|
||||
this.tableLayoutPanel1.SuspendLayout();
|
||||
this.panel6.SuspendLayout();
|
||||
@@ -100,12 +96,8 @@ namespace UniMarc
|
||||
//
|
||||
// panel6
|
||||
//
|
||||
this.panel6.Controls.Add(this.uC_SelectGrade1);
|
||||
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);
|
||||
@@ -126,64 +118,6 @@ namespace UniMarc
|
||||
this.btn_FillBlank.UseVisualStyleBackColor = true;
|
||||
this.btn_FillBlank.Click += new System.EventHandler(this.btn_FillBlank_Click);
|
||||
//
|
||||
// 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)));
|
||||
@@ -225,6 +159,16 @@ namespace UniMarc
|
||||
this.btn_Save.UseVisualStyleBackColor = true;
|
||||
this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
|
||||
//
|
||||
// uC_SelectGrade1
|
||||
//
|
||||
this.uC_SelectGrade1.BackColor = System.Drawing.Color.White;
|
||||
this.uC_SelectGrade1.Grade = -1;
|
||||
this.uC_SelectGrade1.GradeName = "";
|
||||
this.uC_SelectGrade1.Location = new System.Drawing.Point(11, 10);
|
||||
this.uC_SelectGrade1.Name = "uC_SelectGrade1";
|
||||
this.uC_SelectGrade1.Size = new System.Drawing.Size(243, 29);
|
||||
this.uC_SelectGrade1.TabIndex = 330;
|
||||
//
|
||||
// fMarc_Editor
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
@@ -253,11 +197,7 @@ namespace UniMarc
|
||||
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;
|
||||
private System.Windows.Forms.Button btn_FillBlank;
|
||||
private UC_SelectGrade uC_SelectGrade1;
|
||||
}
|
||||
}
|
||||
@@ -39,12 +39,12 @@ namespace UniMarc
|
||||
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;
|
||||
else radC.Checked = true;
|
||||
this.uC_SelectGrade1.Grade = grade;
|
||||
//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;
|
||||
//else radC.Checked = true;
|
||||
|
||||
Target = _target;
|
||||
marcEditorControl1 = new MarcEditorControl();
|
||||
@@ -161,21 +161,11 @@ namespace UniMarc
|
||||
if (marcEditorControl1.CheckValidation() == false) return;
|
||||
|
||||
string oriMarc = marcEditorControl1.MakeMarcString();
|
||||
string etc1Value = "";
|
||||
string etc2Value = "";
|
||||
|
||||
// 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 etc1Value = etc1.Text.Trim();
|
||||
string etc2Value = etc2.Text.Trim();
|
||||
string tag008Value = marcEditorControl1.text008.Text;
|
||||
|
||||
var v_grade = "2";
|
||||
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";
|
||||
var v_grade = uC_SelectGrade1.Grade < 0 ? "2" : uC_SelectGrade1.Grade.ToString() ;
|
||||
|
||||
// Extract tags for metadata
|
||||
string[] Search_Tag = {
|
||||
@@ -190,53 +180,56 @@ namespace UniMarc
|
||||
string[] BookNameTag = st.Take_Tag(oriMarc, BookTag);
|
||||
string BookName = mk_BookName(BookNameTag);
|
||||
|
||||
var updateData = new Dictionary<string, object>();
|
||||
var whereClause = new Dictionary<string, object>();
|
||||
string Table = "";
|
||||
string[] Update_Col;
|
||||
string[] Update_data;
|
||||
string[] Search_Col = { "idx" };
|
||||
string[] Search_data;
|
||||
|
||||
var idx = (Target == SaveTarget.SpecsMarc ? _param.ListIdx : _param.MarcIdx);
|
||||
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);
|
||||
whereClause.Add("idx", idx);
|
||||
|
||||
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);
|
||||
updateData.Add("marc", oriMarc);
|
||||
updateData.Add("book_name", BookName);
|
||||
updateData.Add("etc1", etc1Value);
|
||||
updateData.Add("etc2", etc2Value);
|
||||
updateData.Add("r_num", SearchBookTag[0]);
|
||||
updateData.Add("class_symbol", SearchBookTag[1]);
|
||||
updateData.Add("author_symbol", SearchBookTag[2]);
|
||||
updateData.Add("prefix", SearchBookTag[5]);
|
||||
updateData.Add("s_book_name1", SearchBookTag[6]);
|
||||
updateData.Add("s_book_num1", SearchBookTag[7]);
|
||||
updateData.Add("author", SearchBookTag[8]);
|
||||
updateData.Add("book_comp", SearchBookTag[9]);
|
||||
updateData.Add("price", SearchBookTag[10]);
|
||||
updateData.Add("ISBN", SearchBookTag[11]);
|
||||
updateData.Add("tag008", tag008Value);
|
||||
|
||||
if (!v_grade.isEmpty())
|
||||
updateData.Add("grade", v_grade);
|
||||
}
|
||||
else // MasterMarc
|
||||
{
|
||||
Table = "Marc";
|
||||
Search_data = new string[] { _param.MarcIdx };
|
||||
// Using bits of logic from Marc_Plan_Sub_MarcEdit.Save_si
|
||||
whereClause.Add("idx", idx);
|
||||
whereClause.Add("compidx", PUB.user.CompanyIdx);
|
||||
|
||||
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);
|
||||
updateData.Add("marc", oriMarc);
|
||||
updateData.Add("marc_chk", "1");
|
||||
updateData.Add("marc1", _param.OriginalMarc);
|
||||
updateData.Add("marc_chk2", "0");
|
||||
updateData.Add("date", today);
|
||||
updateData.Add("user", PUB.user.UserName);
|
||||
updateData.Add("비고1", etc1Value);
|
||||
updateData.Add("비고2", etc2Value);
|
||||
|
||||
if (!v_grade.isEmpty())
|
||||
updateData.Add("grade", v_grade);
|
||||
}
|
||||
|
||||
string cmd = db.More_Update(Table, Update_Col, Update_data, Search_Col, Search_data);
|
||||
string cmd = Helper_DB.Make_UpdateQuery(Table, updateData, whereClause);
|
||||
var rlt = Helper_DB.ExcuteNonQuery(cmd);
|
||||
if (rlt.applyCount == 1)
|
||||
{
|
||||
@@ -260,11 +253,11 @@ namespace UniMarc
|
||||
}
|
||||
else if (rlt.applyCount == 0)
|
||||
{
|
||||
UTIL.MsgE($"저장된 자료가 없습니다\nIDX:{Search_data[0]}\n\n개발자 문의 하세요");
|
||||
UTIL.MsgE($"저장된 자료가 없습니다\nTable:{Table}, IDX:{idx}\n\n개발자 문의 하세요");
|
||||
}
|
||||
else if (rlt.applyCount > 1)
|
||||
{
|
||||
UTIL.MsgE($"복수({rlt.applyCount})의 자료가 업데이트 되었습니다\nIDX:{Search_data[0]}\n\n개발자 문의 하세요");
|
||||
UTIL.MsgE($"복수개({rlt.applyCount})의 자료가 업데이트 되었습니다\nTable:{Table}, IDX:{idx}\n\n개발자 문의 하세요");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user