Compare commits

26 Commits

Author SHA1 Message Date
00e736d668 .. 2026-04-08 19:43:38 +09:00
e75400cdc4 광주시립도서관 - 하남 추가 (최영진) 2026-03-26 23:41:43 +09:00
7288d8c95c 마크정리에서. 파일불러올때 마지막 줄이 불러오지 않는 현상 수 2026-03-12 19:28:21 +09:00
054e1c9c10 마크목록화면에서 신규마크인 경우에 비고란이 초기화되지 않는 현상 수정(비고란업데이트 코드 추가)
마크목록에서 신규 마크저장 후 바로 화면이 업데이트 되지 않는 현상 수정(데이터정보불일치로 업데이트 SKIP)
마크정리에서 일부 마크파일 불러오기에서 오류가 발생하는 현상 수정(원인 : 가격정보없음)
마크목록에서 적색데이터의 기본 마크 100a 에 서명이 입력되는 현상 수정(기본마크로직오류)
2026-03-08 17:37:39 +09:00
90ed6e285f 마크목록에서 개별 마크데이터 지정시 해당 값이 자동업데이트되지 않는 현상 수정
권차, 권차서명, 판차 정보 추출하여 저장하게 함
마크선태고하면에서 마크삭제시 삭제할 인덱스값 표시
obj_list_book 에  품절컬럼 추가,
2026-03-02 16:35:37 +09:00
a226c370b2 인덱스 컬럼의 포맷변경 string -> int 2026-02-28 15:55:20 +09:00
b13f01a3dd 마크정리->마크파일불러오기(fullparser 를 적용하여 데이터를 추출 함)
DLS 조회입력 화면 null 개체오류 분석 : 해당 화면은 고친적 없는 원본화면  https://reading.jnei.go.kr  페이지를 열어서 작업하는 것을 추정되나 해당 사이트가 접속이 되지 않은 것이 원인이됨 (프로그램이 멈추지 않고 오류 메세지가 나오도록 수정 함)
마크등급용 전용컨트롤 생성 및 공유
Grade - E 추가
마크목록 데이터 조회시 (ISBN검색결과 서명,저자,출판사,설명,URL 추가 )
2026-02-25 23:42:49 +09:00
5978d45af6 마크정리->마크파일불러오기(fullparser 를 적용하여 데이터를 추출 함) 2026-02-25 22:20:45 +09:00
3a503dda6d ISBN검색시 지연시간 추가 (설정에 저장됨)
ISBN검색중 알라딘의 경우 도서정보(html),URL 가 추가됨
ISBN검색결과  도서명, 저자, 출판사, 도서정보,URL이  DB에 저장되도록 함
2026-02-24 22:57:34 +09:00
c813ffe9e6 등급저장기능 추가, 비고기능 추가 2026-02-23 23:49:30 +09:00
c5571a98ab 유사본 저장시 마크외 정보도 저장되도록 함 2026-02-23 23:37:21 +09:00
3cfd7ff12c Messagebox 모두 변경 2026-02-23 23:11:54 +09:00
1b77fd02b0 마크작성기능 완료, fullmarc 해석기 1차완료 2026-02-23 22:29:01 +09:00
5271f9f1c3 마크파서 추가,, 신규 마크 추가 테스트 중. 2026-02-23 00:31:59 +09:00
6add9a00bc 마크편집창 및 신규생성 수정 중 2026-02-22 13:33:12 +09:00
c2c9122c55 편집기 통합작업 중, 등급 미적용 데이터 수정 2026-02-22 01:04:35 +09:00
ad866c1384 마크편집기를 공용으로 분리작업(90%) 2026-02-21 23:22:03 +09:00
86dbda1d21 ¸¶ũ º¹Á¦ ±â´É ±¸Çö ¹× Dµî±Þ »ö»ó ¼öÁ¤ (Grade E Ã߰¡ Ãë¼Ò) 2026-02-21 11:21:52 +09:00
82aa5a21d9 미소장 전체가져오기 기능 정상화 2026-02-20 16:17:17 +09:00
ed60319978 마크목록등록 ctrl+v 기능 오류 수정
목록창에서 isbn 조회 창으로 바로 진입할 수 있는 버튼이 필요(ppt15)
마크편집창 저장시 ISBN중복여부 확인
마크편집창 서브필드 정렬수정(245,440)- PPT21
2026-02-20 14:39:19 +09:00
35792b0a72 마크목록(new), 정렬,필터 기능 업데이트 2026-02-19 18:42:25 +09:00
77ef720197 .. 2026-02-19 18:28:22 +09:00
c0782ea5c1 마크편집창에서 isbn 을 복사할 수있도록 텍스트박스로 변경 2026-02-14 22:49:17 +09:00
6e25a3d4e9 일부 폼. .신규파일이름 2로 추가 2026-02-14 22:10:32 +09:00
f6dcd5630a 목록 생성 이후 수정 할 수 있는 기능이 필요
Ex) 목록일, 완료일, 목록명, 납품처, 담당자 등
2026-02-14 21:58:29 +09:00
9108993612 현재 마크목록 -> 목록생성(추후 목록 등록으로 수정요망) 버튼을 누르면
마크 목록 생성(추후 목록 등록으로 수정요망) 창이 뜨는 데 항목 순서 변경이 필요기존 가격 수량 합계 순서를 수량 가격 합계 순서로 변경요망
(북엔피에 적용된 순서와 동일하게 하려고 함)
2026-02-14 21:38:57 +09:00
155 changed files with 15032 additions and 3706 deletions

View File

@@ -121,5 +121,4 @@ namespace UniMarc
catch { } catch { }
} }
} }
} }

View File

@@ -0,0 +1,34 @@
using AR;
namespace UniMarc
{
public static class DB_Utils
{
public static bool ExistISBN(string value)
{
if (value.isEmpty())
{
UTIL.MsgE("중복검사할 ISBN값이 입력되지 않았습니다");
return false;
}
// ISBN 중복체크
string checkSql = string.Format("SELECT COUNT(*) FROM Marc WHERE isbn = '{0}' AND compidx = '{1}'", value, PUB.user.CompanyIdx);
var ret = Helper_DB.ExcuteScalar(checkSql);
if (ret.value == null)
{
UTIL.MsgE($"Database error [ExistISBN]\n{ret.errorMessage}");
return false;
}
if (int.TryParse(ret.value.ToString(), out int cnt) == false)
return false;
else
{
if (cnt > 0)
{
return true;
}
return false;
}
}
}
}

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
@@ -74,12 +75,12 @@ namespace UniMarc
{ {
SmtpMail.SmtpServer = smtp_server; SmtpMail.SmtpServer = smtp_server;
SmtpMail.Send(msg); SmtpMail.Send(msg);
MessageBox.Show("다음 메일 전송 성공"); UTIL.MsgI("다음 메일 전송 성공");
return true; return true;
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show(e.ToString()); UTIL.MsgE(e.ToString());
return false; return false;
} }
} }
@@ -118,12 +119,12 @@ namespace UniMarc
try try
{ {
smtp.Send(mail); smtp.Send(mail);
MessageBox.Show("메일 전송 완료"); UTIL.MsgI("메일 전송 완료");
return true; return true;
} }
catch (SmtpException e) catch (SmtpException e)
{ {
MessageBox.Show(e.ToString()); UTIL.MsgE(e.ToString());
return false; return false;
} }
} }
@@ -156,7 +157,7 @@ namespace UniMarc
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show(e.ToString()); UTIL.MsgE(e.ToString());
} }
} }
else else
@@ -187,7 +188,7 @@ namespace UniMarc
} }
catch (SmtpException e) catch (SmtpException e)
{ {
MessageBox.Show(e.ToString()); UTIL.MsgE(e.ToString());
} }
} }
} }

View 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);
}
}
}

View File

@@ -0,0 +1,378 @@
using Org.BouncyCastle.Pkcs;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace UniMarc
{
public class MarcSubfield
{
public char Code { get; set; }
public string Value { get; set; }
public MarcSubfield(char code, string value)
{
Code = code;
Value = value;
}
public override string ToString()
{
return $"▼{Code}{Value}";
}
}
public class MarcField
{
public string Tag { get; set; }
public string Indicators { get; set; } = " ";
public string ControlValue { get; set; }
public List<MarcSubfield> Subfields { get; set; } = new List<MarcSubfield>();
public bool IsControlField => int.TryParse(Tag, out int tagNum) && tagNum < 10;
public MarcField(string tag)
{
Tag = tag;
}
public string GetSubfieldValue(char code)
{
var sub = Subfields.FirstOrDefault(s => s.Code == code);
return sub != null ? sub.Value : string.Empty;
}
public override string ToString()
{
if (IsControlField)
return $"{Tag}\t \t{ControlValue}▲";
StringBuilder sb = new StringBuilder();
sb.Append($"{Tag}\t{Indicators}\t");
foreach (var sub in Subfields)
{
sb.Append(sub.ToString());
}
sb.Append("▲");
return sb.ToString();
}
}
public class MarcParser
{
public string Leader { get; set; } = "00000nam 2200000 k 4500";
public List<MarcField> Fields { get; set; } = new List<MarcField>();
private const char SUBFIELD_MARKER = '▼';
private const char FIELD_TERMINATOR = '▲';
private const char RECORD_TERMINATOR = '\x1D';
public MarcParser() { }
public void ParseMnemonic(string data)
{
Fields.Clear();
if (string.IsNullOrEmpty(data)) return;
string[] lines = data.Split(new[] { '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries);
foreach (var line in lines)
{
string cleanLine = line.Trim();
if (cleanLine.Length < 3) continue;
string tag = cleanLine.Substring(0, 3);
MarcField field = new MarcField(tag);
string[] parts = cleanLine.Split('\t');
if (field.IsControlField)
{
if (parts.Length >= 3)
field.ControlValue = parts[2].TrimEnd(FIELD_TERMINATOR, ' ');
else
field.ControlValue = cleanLine.Substring(Math.Min(cleanLine.Length, 3)).Trim('\t', ' ', FIELD_TERMINATOR);
}
else
{
if (parts.Length >= 2)
field.Indicators = parts[1].PadRight(2).Substring(0, 2);
string dataPart = parts.Length >= 3 ? parts[2] : "";
if (parts.Length < 3 && cleanLine.Length > 5)
dataPart = cleanLine.Substring(5);
dataPart = dataPart.TrimEnd(FIELD_TERMINATOR);
ParseSubfields(field, dataPart);
}
Fields.Add(field);
}
}
private void ParseSubfields(MarcField field, string dataPart)
{
if (string.IsNullOrEmpty(dataPart)) return;
if (dataPart.Contains(SUBFIELD_MARKER))
{
string[] subfields = dataPart.Split(new[] { SUBFIELD_MARKER }, StringSplitOptions.RemoveEmptyEntries);
foreach (var s in subfields)
{
if (s.Length >= 1)
field.Subfields.Add(new MarcSubfield(s[0], s.Substring(1).TrimEnd(FIELD_TERMINATOR)));
}
}
else if (dataPart.Contains('\x1F'))
{
string[] subfields = dataPart.Split(new[] { '\x1F' }, StringSplitOptions.RemoveEmptyEntries);
foreach (var s in subfields)
{
if (s.Length >= 1)
field.Subfields.Add(new MarcSubfield(s[0], s.Substring(1)));
}
}
else
{
for (int k = 0; k < dataPart.Length; k++)
{
if (char.IsLetter(dataPart[k]) && (k == 0 || dataPart[k - 1] == ' ' || dataPart[k - 1] == '^' || dataPart[k - 1] == '\x1F'))
{
char code = dataPart[k];
int next = -1;
for (int m = k + 1; m < dataPart.Length - 1; m++)
{
if (dataPart[m] == ' ' && char.IsLetter(dataPart[m + 1]))
{
next = m;
break;
}
}
string val = next == -1 ? dataPart.Substring(k + 1) : dataPart.Substring(k + 1, next - k - 1);
field.Subfields.Add(new MarcSubfield(code, val.Trim()));
if (next != -1) k = next;
else break;
}
}
}
}
public (bool success, string message) ParseFullMarc(string data)
{
System.Text.StringBuilder AlertMessage = new StringBuilder();
Fields.Clear();
if (data.Length < 24) return (false, "마크데이터가 24보다 작습니다");
//리더부는 항상 24바이트이다. 0~23까지이다.
Leader = data.Substring(0, 24);
if (!int.TryParse(Leader.Substring(12, 5), out int baseAddress)) return (false, string.Empty);
//data Length
if (int.TryParse(Leader.Substring(0, 5), out int dataLength) == false)
{
return (false, "Leader 전체 데이터 길이를 확인할 수 없습니다");
}
bool isScaled = false;
int directoryLength = baseAddress - 24;
int entryCount = directoryLength / 12;
var directory = data.Substring(24, directoryLength);
var RealData = data.Substring(24 + directoryLength);
if (RealData.Contains((char)0x1D) == false)
{
AlertMessage.AppendLine($"레코드식별기호 0x1D 가 없습니다");
}
else RealData = RealData.Trim((char)0x1D);
//태그별식별기호로 분리한다.
if (RealData[RealData.Length - 1] == (char)0x1E)
RealData = RealData.Substring(0, RealData.Length - 1);
var Tags = RealData.Split((char)0x1E);
if(Tags.Length != entryCount)
{
AlertMessage.AppendLine($"디렉토리 카운트({entryCount})와 태그수량({Tags.Length})이 일치하지 않습니다");
}
for (int i = 0; i < Math.Min(entryCount,Tags.Length); i++)
{
int entryStart = (i * 12);
//TAG(3)+LENGTH(4)+OFFSET(5)=12
if (entryStart + 12 > directory.Length) break;
if (directory[entryStart] == '\x1E' || directory[entryStart] == '^' || directory[entryStart] == FIELD_TERMINATOR) break;
string tag = directory.Substring(entryStart, 3);
var tag_len = directory.Substring(entryStart + 3, 4);
var tag_off = directory.Substring(entryStart + 7, 5);
if (!int.TryParse(tag_len, out int length))
{
AlertMessage.AppendLine($"태그({tag}) 길이를 확인할 수 없습니다 값:{tag_len}");
}
if (!int.TryParse(tag_off, out int offset))
{
AlertMessage.AppendLine($"태그({tag}) 오프셋을 확인할 수 없습니다 값:{offset}");
}
string fieldData = Tags[i];
fieldData = fieldData.TrimEnd('\x1E', '\x1D', FIELD_TERMINATOR, '^', ' ');
MarcField field = new MarcField(tag);
if (field.IsControlField)
field.ControlValue = fieldData;
else
{
var subfieldIndex = fieldData.IndexOf((char)0x1f);
string fielddata = "";
if (subfieldIndex < 0)
{
//1f가 없는 것은 오류 처리한다.
continue;
}
else if (subfieldIndex < 1)
{
//지시기호없이 데이터가 시작되는경우이다.
field.Indicators = " ";
ParseSubfields(field, fieldData);
}
else if (subfieldIndex < 2)
{
//지시기호가1개이다 뒤에 공백을 넣자
field.Indicators = fieldData.Substring(0, subfieldIndex) + " ";
ParseSubfields(field, fieldData.Substring(1));
}
else if (subfieldIndex > 2)
{
//지시기호가 2자리보다 길다? 이건 오류처리하자.
field.Indicators = " ";
ParseSubfields(field, fieldData.Substring(subfieldIndex));
}
else
{
field.Indicators = fieldData.Substring(0, 2);
ParseSubfields(field, fieldData.Substring(2));
}
}
Fields.Add(field);
}
return (true, AlertMessage.ToString());
}
public List<T> GetTag<T>(string path)
{
if (string.IsNullOrEmpty(path)) return new List<T>();
string tag = path.Substring(0, 3);
char? subCode = path.Length > 3 ? (char?)path[3] : null;
var fields = Fields.Where(f => f.Tag == tag).ToList();
if (fields.Count == 0) return new List<T>();
if (typeof(T) == typeof(MarcField))
return fields.Cast<T>().ToList();
if (typeof(T) == typeof(MarcSubfield))
{
if (!subCode.HasValue) return new List<T>();
var subResults = new List<MarcSubfield>();
foreach (var f in fields)
subResults.AddRange(f.Subfields.Where(s => s.Code == subCode.Value));
return subResults.Cast<T>().ToList();
}
if (typeof(T) == typeof(string))
{
var stringResults = new List<string>();
foreach (var f in fields)
{
if (f.IsControlField)
stringResults.Add(f.ControlValue);
else
{
if (subCode.HasValue)
stringResults.AddRange(f.Subfields.Where(s => s.Code == subCode.Value).Select(s => s.Value));
else
stringResults.AddRange(f.Subfields.Select(s => s.Value));
}
}
return stringResults.Cast<T>().ToList();
}
return new List<T>();
}
public List<string> GetTag(string path)
{
return GetTag<string>(path);
}
public void SetTag(string path, string value, string indicators = " ")
{
if (string.IsNullOrEmpty(path) || path.Length < 3) return;
string tag = path.Substring(0, 3);
bool isControl = int.TryParse(tag, out int tagNum) && tagNum < 10;
var field = Fields.FirstOrDefault(f => f.Tag == tag);
if (field == null)
{
field = new MarcField(tag) { Indicators = indicators };
Fields.Add(field);
Fields = Fields.OrderBy(f => f.Tag).ToList();
}
if (isControl)
field.ControlValue = value;
else
{
if (path.Length < 4) throw new ArgumentException("Subfield code required for data fields");
char subCode = path[3];
var sub = field.Subfields.FirstOrDefault(s => s.Code == subCode);
if (sub != null) sub.Value = value;
else field.Subfields.Add(new MarcSubfield(subCode, value));
}
}
public string Get008Segment(int offset, int length)
{
var valLine = GetTag("008").FirstOrDefault();
if (string.IsNullOrEmpty(valLine) || valLine.Length < offset + length) return string.Empty;
return valLine.Substring(offset, length);
}
public void Set008Segment(int offset, int length, string value)
{
var valLine = GetTag("008").FirstOrDefault() ?? new string(' ', 40);
if (valLine.Length < 40) valLine = valLine.PadRight(40);
StringBuilder sb = new StringBuilder(valLine);
for (int i = 0; i < length; i++)
{
char c = (i < value.Length) ? value[i] : ' ';
if (offset + i < sb.Length)
sb[offset + i] = c;
}
SetTag("008", sb.ToString());
}
public string ToMnemonicString()
{
StringBuilder sb = new StringBuilder();
foreach (var field in Fields)
sb.AppendLine(field.ToString());
return sb.ToString();
}
}
}

View File

@@ -0,0 +1 @@
00559nam 2200229 k 4500008004100000020003300041020002400074041000800098049000600106056001300112082001200125090001800137100001100155245004500166260002500211300001600236520000500252653003900257700001100296740001100307950001100318200306s2011 ggk 000 f kor  a9788954615860g04810c^158001 a9788954615853(세트)1 akor v1 a813.6240 a895.734 a813.6b이67퇴1 a이우혁00a퇴마록x退魔錄n1b국내편d이우혁 [지음] a파주b엘릭시르c2011 a663p.c20cm a a퇴마록a한국현대소설a한국장편소설1 a이우혁 0a국내편0 b^15800

View File

@@ -0,0 +1,15 @@
020 ▼a9788954615877▼g04810▼c\15800▲
020 1 ▼a9788954615853(세트)▲
049 ▼v2▲
056 ▼a813.6▼24▲
082 0 ▼a895.734▲
090 ▼a813.6▼b이67퇴▲
100 1 ▼a이우혁▲
245 00 ▼a퇴마록▼x退魔錄▼n2▼b국내편▼d이우혁 [지음]▲
260 ▼a파주▼b엘릭시르▼c2011▲
300 ▼a600p.▼c20cm▲
520 ▼a▲
653 ▼a퇴마록▼a한국현대소설▼a한국장편소설▲
700 1 ▼a이우혁▲
740 0 ▼a국내편▲
950 0 ▼b\15800▲

View File

@@ -14,126 +14,6 @@ using UniMarc.Properties;
namespace UniMarc 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);
}
public static DataTable ExecuteQueryData(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)
{
MessageBox.Show(ex.ToString(), "ExecuteQueryData Error");
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 GetDT(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 ExecuteQueryData(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);
}
}
/// <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> /// <summary>
/// DB접속을 도와주는 클래스 /// DB접속을 도와주는 클래스
/// </summary> /// </summary>
@@ -269,6 +149,32 @@ namespace UniMarc
conn.Close(); conn.Close();
return result; return result;
} }
public DataTable DB_Send_CMD_Search_DataTable(string cmd)
{
DataTable dt = new DataTable();
try
{
if (conn.State == ConnectionState.Closed)
conn.Open();
using (MySqlDataAdapter adapter = new MySqlDataAdapter(cmd, conn))
{
adapter.Fill(dt);
}
}
catch (Exception ex)
{
UTIL.MsgE($"데이터베이스 실행오류\n{ex.Message}");
return null;
}
finally
{
if (conn.State == ConnectionState.Open)
conn.Close();
}
return dt;
}
public void DB_Send_CMD_Search_ApplyGrid(string cmd, DataGridView dgv) public void DB_Send_CMD_Search_ApplyGrid(string cmd, DataGridView dgv)
{ {
// DB 연결 // DB 연결
@@ -670,8 +576,7 @@ namespace UniMarc
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show("{0} Exception caught.\n" + e.ToString()); UTIL.MsgE(e.ToString());
MessageBox.Show(cmd);
} }
conn.Close(); conn.Close();
return result; return result;

View File

@@ -123,7 +123,7 @@ namespace UniMarc.ListOfValue
{ {
if (this.bs.Current == null) if (this.bs.Current == null)
{ {
MessageBox.Show("선택된 데이터가 없습니다.", "알림", MessageBoxButtons.OK, MessageBoxIcon.Warning); UTIL.MsgE("선택된 데이터가 없습니다.");
return; return;
} }

View File

@@ -11,6 +11,7 @@ using System.IO;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using Application = System.Windows.Forms.Application; using Application = System.Windows.Forms.Application;
using AR;
namespace UniMarc namespace UniMarc
{ {
@@ -62,7 +63,7 @@ namespace UniMarc
((Main)(this.Owner)).User_Name = ID_text.Text; ((Main)(this.Owner)).User_Name = ID_text.Text;
if (db_res == "") if (db_res == "")
{ {
MessageBox.Show("아이디 혹은 비밀번호가 정확하지않습니다."); UTIL.MsgE("아이디 혹은 비밀번호가 정확하지않습니다.");
return; return;
} }
@@ -75,7 +76,7 @@ namespace UniMarc
WriteFile(); WriteFile();
if (!CheckIP(lbl_IP.Text, result[4])) if (!CheckIP(lbl_IP.Text, result[4]))
{ {
MessageBox.Show("허용된 아이피가 아닙니다!"); UTIL.MsgE("허용된 아이피가 아닙니다!");
return; return;
} }
((Main)(this.Owner)).IPText.Text = string.Format("접속 아이피 : {0}", lbl_IP.Text); ((Main)(this.Owner)).IPText.Text = string.Format("접속 아이피 : {0}", lbl_IP.Text);
@@ -88,12 +89,12 @@ namespace UniMarc
} }
else else
{ {
MessageBox.Show("아이디 혹은 비밀번호가 정확하지않습니다."); UTIL.MsgE("아이디 혹은 비밀번호가 정확하지않습니다.");
} }
} }
else else
{ {
MessageBox.Show("아이디 혹은 비밀번호가 정확하지않습니다."); UTIL.MsgE("아이디 혹은 비밀번호가 정확하지않습니다.");
} }
} }
#region CheckIP #region CheckIP

View File

@@ -140,6 +140,7 @@
this.mdiTabControl = new System.Windows.Forms.TabControl(); this.mdiTabControl = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage1 = new System.Windows.Forms.TabPage();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.NewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.toolStrip1.SuspendLayout(); this.toolStrip1.SuspendLayout();
@@ -307,14 +308,14 @@
// 송금내역조회 // 송금내역조회
// //
this..Name = "송금내역조회"; this..Name = "송금내역조회";
this..Size = new System.Drawing.Size(154, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "송금 내역 조회"; this..Text = "송금 내역 조회";
this..Click += new System.EventHandler(this.ToolStripMenuItem_Click); this..Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
// 송금등록 // 송금등록
// //
this..Name = "송금등록"; this..Name = "송금등록";
this..Size = new System.Drawing.Size(154, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "송금 등록"; this..Text = "송금 등록";
this..Click += new System.EventHandler(this.ToolStripMenuItem_Click); this..Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
@@ -325,7 +326,7 @@
this., this.,
this.ToolStripMenuItem}); this.ToolStripMenuItem});
this..Name = "매입"; this..Name = "매입";
this..Size = new System.Drawing.Size(154, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "매입"; this..Text = "매입";
// //
// 매입집계 // 매입집계
@@ -358,7 +359,7 @@
this., this.,
this.}); this.});
this..Name = "매출"; this..Name = "매출";
this..Size = new System.Drawing.Size(154, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "매출"; this..Text = "매출";
// //
// 매출입력 // 매출입력
@@ -392,7 +393,7 @@
// 파트타임관리 // 파트타임관리
// //
this..Name = "파트타임관리"; this..Name = "파트타임관리";
this..Size = new System.Drawing.Size(154, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "파트타임 관리"; this..Text = "파트타임 관리";
this..Click += new System.EventHandler(this.ToolStripMenuItem_Click); this..Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
@@ -418,13 +419,13 @@
this., this.,
this.}); this.});
this..Name = "마크설정"; this..Name = "마크설정";
this..Size = new System.Drawing.Size(156, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "설정"; this..Text = "설정";
// //
// 단축키설정 // 단축키설정
// //
this..Name = "단축키설정"; this..Name = "단축키설정";
this..Size = new System.Drawing.Size(138, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "단축키"; this..Text = "단축키";
this..Visible = false; this..Visible = false;
this..Click += new System.EventHandler(this.ToolStripMenuItem_Click); this..Click += new System.EventHandler(this.ToolStripMenuItem_Click);
@@ -432,14 +433,14 @@
// 매크로문구 // 매크로문구
// //
this..Name = "매크로문구"; this..Name = "매크로문구";
this..Size = new System.Drawing.Size(138, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "매크로 문구"; this..Text = "매크로 문구";
this..Click += new System.EventHandler(this.ToolStripMenuItem_Click); this..Click += new System.EventHandler(this.ToolStripMenuItem_Click);
// //
// 불용어 // 불용어
// //
this..Name = "불용어"; this..Name = "불용어";
this..Size = new System.Drawing.Size(138, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "불용어"; this..Text = "불용어";
this..Visible = false; this..Visible = false;
this..Click += new System.EventHandler(this.ToolStripMenuItem_Click); this..Click += new System.EventHandler(this.ToolStripMenuItem_Click);
@@ -447,7 +448,7 @@
// 작업지시서 // 작업지시서
// //
this..Name = "작업지시서"; this..Name = "작업지시서";
this..Size = new System.Drawing.Size(138, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "작업지시서"; this..Text = "작업지시서";
this..Visible = false; this..Visible = false;
this..Click += new System.EventHandler(this.ToolStripMenuItem_Click); this..Click += new System.EventHandler(this.ToolStripMenuItem_Click);
@@ -459,12 +460,13 @@
this.NewToolStripMenuItem, this.NewToolStripMenuItem,
this., this.,
this., this.,
this.NewToolStripMenuItem,
this., this.,
this.1, this.1,
this.2, this.2,
this.iSBN조회}); this.iSBN조회});
this..Name = "마크작업"; this..Name = "마크작업";
this..Size = new System.Drawing.Size(156, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "마크 작업"; this..Text = "마크 작업";
// //
// 마크작성 // 마크작성
@@ -530,7 +532,7 @@
this., this.,
this.}); this.});
this.dVDCDLPToolStripMenuItem.Name = "dVDCDLPToolStripMenuItem"; this.dVDCDLPToolStripMenuItem.Name = "dVDCDLPToolStripMenuItem";
this.dVDCDLPToolStripMenuItem.Size = new System.Drawing.Size(156, 22); this.dVDCDLPToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.dVDCDLPToolStripMenuItem.Text = "DVD / CD / LP"; this.dVDCDLPToolStripMenuItem.Text = "DVD / CD / LP";
// //
// 목록 // 목록
@@ -554,7 +556,7 @@
this., this.,
this.}); this.});
this..Name = "반입및반출"; this..Name = "반입및반출";
this..Size = new System.Drawing.Size(156, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "반입 및 반출"; this..Text = "반입 및 반출";
// //
// 마크반입 // 마크반입
@@ -579,7 +581,7 @@
this., this.,
this.}); this.});
this..Name = "부가기능"; this..Name = "부가기능";
this..Size = new System.Drawing.Size(156, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "부가기능"; this..Text = "부가기능";
// //
// 마크수집 // 마크수집
@@ -620,7 +622,7 @@
this.DLS조회, this.DLS조회,
this.dLS복본조사}); this.dLS복본조사});
this.DLS.Name = "DLS"; this.DLS.Name = "DLS";
this.DLS.Size = new System.Drawing.Size(156, 22); this.DLS.Size = new System.Drawing.Size(180, 22);
this.DLS.Text = "DLS"; this.DLS.Text = "DLS";
// //
// DLS조회 // DLS조회
@@ -644,7 +646,7 @@
this., this.,
this.}); this.});
this..Name = "마크기타"; this..Name = "마크기타";
this..Size = new System.Drawing.Size(156, 22); this..Size = new System.Drawing.Size(180, 22);
this..Text = "기타"; this..Text = "기타";
// //
// 서류작성 // 서류작성
@@ -1142,6 +1144,13 @@
this.tabPage2.Text = "tabPage2"; this.tabPage2.Text = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
// 소장자료검색NewToolStripMenuItem
//
this.NewToolStripMenuItem.Name = "소장자료검색NewToolStripMenuItem";
this.NewToolStripMenuItem.Size = new System.Drawing.Size(182, 22);
this.NewToolStripMenuItem.Text = "소장자료검색(New)";
this.NewToolStripMenuItem.Click += new System.EventHandler(this.NewToolStripMenuItem_Click);
//
// Main // Main
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -1283,5 +1292,6 @@
private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.ToolStripMenuItem menu_allclose; private System.Windows.Forms.ToolStripMenuItem menu_allclose;
private System.Windows.Forms.ToolStripMenuItem NewToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem NewToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem NewToolStripMenuItem;
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -97,7 +98,7 @@ namespace UniMarc
isAccess(); isAccess();
SetBtnName(); SetBtnName();
} }
catch (Exception ex) { MessageBox.Show(ex.ToString()); } catch (Exception ex) { UTIL.MsgE(ex.ToString()); }
UpdaterCheck(); UpdaterCheck();
@@ -298,7 +299,7 @@ namespace UniMarc
// 권한설정으로 인한 리턴 // 권한설정으로 인한 리턴
if (!MenuCheckT[count[0]][count[1]].Enabled) if (!MenuCheckT[count[0]][count[1]].Enabled)
{ {
MessageBox.Show("권한이 설정되지 않았습니다!"); UTIL.MsgE("권한이 설정되지 않았습니다!");
return; return;
} }
@@ -883,5 +884,10 @@ namespace UniMarc
{ {
OpenFormInTab<AddMarc2>(() => new AddMarc2(this)); OpenFormInTab<AddMarc2>(() => new AddMarc2(this));
} }
private void NewToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFormInTab(() => new Search_Infor2(this));
}
} }
} }

View File

@@ -0,0 +1,15 @@
namespace UniMarc
{
public class BookGridItem
{
public string header { 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; } = "1";
public string Price { get; set; } = "0";
public string Total { get; set; } = "0";
public string ISBN { get; set; }
}
}

View File

@@ -8,12 +8,12 @@ namespace UniMarc
{ {
public class FillBlankItem public class FillBlankItem
{ {
public string Idx { get; set; } public int Idx { get; set; }
public string Isbn { get; set; } public string Isbn { get; set; }
public string BookName { get; set; } public string BookName { get; set; }
public string Author { get; set; } public string Author { get; set; }
public string Publisher { 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 public string BookMarc { get; set; } = ""; // Hidden column likely
} }
} }

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UniMarc
{
public class IsbnGridItem
{
public string idx { get; set; }
public string num { get; set; }
public string isbn { get; set; }
public string book_name { get; set; }
public string search_book_name { get; set; }
public string author { get; set; }
public string search_author { get; set; }
public string book_comp { get; set; }
public string search_book_comp { get; set; }
public string count { get; set; }
public string unit { get; set; }
public string total { get; set; }
public string condition { get; set; }
public string price { get; set; }
public string etc { get; set; }
public string pubDate { get; set; }
public string persent { get; set; }
public string category { get; set; }
public string sold_out { get; set; }
public string image { get; set; }
public string api_data { get; set; }
public string search_description { get; set; }
public string search_url { get; set; }
}
}

View File

@@ -6,19 +6,16 @@ namespace UniMarc
{ {
public string ISBN13 { get; set; } public string ISBN13 { get; set; }
public string URL { get; set; } public string URL { get; set; }
public string MarcIdx { get; set; } public int MarcIdx { get; set; }
public string Grade { get; set; }
public string User { get; set; } public string User { get; set; }
public string SaveDate { get; set; } public string SaveDate { get; set; }
public string ListIdx { get; set; } public int ListIdx { get; set; }
public string BookName { get; set; } public string BookName { get; set; }
public string Author { get; set; } public string Author { get; set; }
public string Publisher { get; set; } public string Publisher { get; set; }
public string Price { get; set; } public int Price { get; set; }
public string Remark1 { get; set; }
public string Remark2 { get; set; }
public string text008 { get; set; } public string text008 { get; set; }
public string tag056 { get; set; } public string tag056 { get; set; }

View 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;
}
}
}
}

View File

@@ -0,0 +1,99 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace UniMarc
{
public enum MarcRecordStatus
{
None, // No record in DB (Red)
OtherCompany, // Found but not ours (Orange)
MyCompany, // Found and ours (Black/Blue etc.)
NewFetched // Temporary status after external search (Blue)
}
public class MarcBookItem
{
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; }
/// <summary>
/// ´Ü°¡(Á¤°¡´Â price¿¡ ÀÖ´Ù)
/// </summary>
public int Pay { get; set; }
public string Url { get; set; }
public int MarcIdx { get; set; }
public string DbMarc { get; set; }
private MarcRecordStatus _status = MarcRecordStatus.None;
public MarcRecordStatus Status
{
get => _status;
set { _status = value; ApplySyncColor(); }
}
private string _grade = "";
public string Grade
{
get => _grade;
set { _grade = value; ApplySyncColor(); }
}
public string ColCheck { get; set; } = "V";
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;
private void ApplySyncColor()
{
if (Status == MarcRecordStatus.None)
{
ForeColor = System.Drawing.Color.Red;
}
else if (Status == MarcRecordStatus.OtherCompany)
{
ForeColor = System.Drawing.Color.Orange;
}
else if (Status == MarcRecordStatus.NewFetched)
{
ForeColor = System.Drawing.Color.Blue;
}
else if (Status == MarcRecordStatus.MyCompany)
{
switch (Grade)
{
case "0": // A
ForeColor = System.Drawing.Color.Blue;
break;
case "1": // B
ForeColor = System.Drawing.Color.Black;
break;
case "2": // C
ForeColor = System.Drawing.Color.Gray;
break;
//case "3": // D
// ForeColor = System.Drawing.Color.DarkViolet;
// break;
default:
ForeColor = System.Drawing.Color.DarkViolet;
break;
}
}
}
}
}

View File

@@ -0,0 +1,50 @@
using System;
namespace UniMarc
{
public class MarcCopyItem
{
public int idx { get; set; }
public string compidx { get; set; }
public string ISBN { get; set; }
public string Title { get; set; }
public string Author { get; set; }
public string Comp { get; set; }
public string User { get; set; }
public string Date { get; set; }
public string Grade { get; set; }
public string Tag008 { get; set; }
public string Marc { get; set; } // Calculated real MARC
// Raw MARC segments from DB
public string marc_db { get; set; }
public string marc_chk { get; set; }
public string marc1 { get; set; }
public string marc_chk1 { get; set; }
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
{
get
{
switch (Grade)
{
case "0": return "A";
case "1": return "B";
case "2": return "C";
case "3": return "D";
default: return Grade;
}
}
}
}
}

View File

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

View File

@@ -0,0 +1,23 @@
using System;
namespace UniMarc
{
public class SearchInforItem
{
public string idx { get; set; }
public string grade { get; set; }
public string User { get; set; }
public string date { get; set; }
public string ISBN { get; set; }
public string book_name { get; set; }
public string sBookName { get; set; }
public string author { get; set; }
public string book_comp { get; set; }
public string price { get; set; }
public string pub_date { get; set; }
public string Marc { get; set; }
public string marc2 { get; set; }
public string etc1 { get; set; }
public string etc2 { get; set; }
}
}

View File

@@ -1,8 +1,10 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web.UI.WebControls.WebParts;
using System.Windows.Forms; using System.Windows.Forms;
using UniMarc.Properties; using UniMarc.Properties;
@@ -35,5 +37,35 @@ namespace UniMarc
user = new LoginInfo(); user = new LoginInfo();
} }
/// <summary>
/// 빈 MARC String 을 생성한다
/// </summary>
/// <param name="ISBN13"></param>
/// <param name="BookName"></param>
/// <param name="Author"></param>
/// <param name="Publisher"></param>
/// <param name="Price"></param>
/// <returns></returns>
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");
string Empty_008 = yyMMdd + "s" + yyyy + " 000 kor ▲";
var tag_008 = Empty_008.Replace("▲", "");
string Empty_text = string.Format(
"020\t \t▼a{1}▼c\\{5}▲\n" +
"056\t \t▼a▼25▲\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" +
"653\t \t▼a▲\n" +
"700\t \t▼a▲\n" +
"950\t \t▼b\\{5}▲\n",
Empty_008, ISBN13, BookName, Author, Publisher, Price);
return Empty_text;
} }
} }
}

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
@@ -16,6 +17,12 @@ namespace UniMarc
{ {
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
//var parserF = new UniMarc.MarcParser();
//var fullMarc = System.IO.File.ReadAllText(".\\Helper\\sample_fullmarc.txt");
//var rlt = parserF.ParseFullMarc(fullMarc);
//if(rlt.success==false)
//AR.UTIL.MsgE("unitmarc"); //AR.UTIL.MsgE("unitmarc");
try try
{ {
@@ -24,7 +31,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message); UTIL.MsgE(ex.Message);
} }
Application.Run(new Main()); Application.Run(new Main());

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를 // 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다. // 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2026.02.04.2230")] [assembly: AssemblyVersion("2026.03.26.2350")]
[assembly: AssemblyFileVersion("2026.02.04.2230")] [assembly: AssemblyFileVersion("2026.03.26.2350")]

View File

@@ -5,11 +5,12 @@ namespace UniMarc.Properties {
public class UserSetting : AR.Setting public class UserSetting : AR.Setting
{ {
public int ISBNSearchDelay { get; set; }
public string LastSearchTarget { get; set; } public string LastSearchTarget { get; set; }
public string LastSearchTargetDLS { get; set; } public string LastSearchTargetDLS { get; set; }
public override void AfterLoad() public override void AfterLoad()
{ {
if (ISBNSearchDelay == 0) ISBNSearchDelay = 500;
} }
public override void AfterSave() public override void AfterSave()

View File

@@ -24,6 +24,7 @@ using System.Globalization;
using System.Threading; using System.Threading;
using System.Data.SqlTypes; using System.Data.SqlTypes;
using AR; using AR;
using System.Runtime.InteropServices.WindowsRuntime;
namespace UniMarc namespace UniMarc
{ {
@@ -286,7 +287,7 @@ namespace UniMarc
Helper_DB db = new Helper_DB(); Helper_DB db = new Helper_DB();
db.DBcon(); db.DBcon();
if (Pur == "") { MessageBox.Show("입력된 주문처가 없습니다!"); return "False"; } if (Pur == "") { UTIL.MsgE("입력된 주문처가 없습니다!"); return "False"; }
string Area = "`comp_name`, `tel`, `fax`, `bubin`, `uptae`, " + string Area = "`comp_name`, `tel`, `fax`, `bubin`, `uptae`, " +
"`jongmok`, `addr`, `boss`, `email`, `barea`"; "`jongmok`, `addr`, `boss`, `email`, `barea`";
@@ -304,7 +305,7 @@ namespace UniMarc
if (db_res1.Length < 3) if (db_res1.Length < 3)
{ {
MessageBox.Show("DB호출 에러!", "Error"); UTIL.MsgE("DB호출 에러!");
return "False"; return "False";
} }
string tel = string.Empty; string tel = string.Empty;
@@ -377,7 +378,7 @@ namespace UniMarc
// 엑셀 파일 이름 설정 // 엑셀 파일 이름 설정
string now = DateTime.Now.ToString("yy-MM-dd-HH-mm"); string now = DateTime.Now.ToString("yy-MM-dd-HH-mm");
string FileName = string.Format("{0}_{1}_{2}_{3}.xlsx", now.Replace("-", ""), emchk, Pur, db_data[0]); string FileName = string.Format("{0}_{1}_{2}_{3}.xlsx", now.Replace("-", ""), emchk, Pur, db_data[0]);
MessageBox.Show(FileName); UTIL.MsgI(FileName);
// 엑셀 파일 저장 경로 // 엑셀 파일 저장 경로
string Savepath = Path.Combine(tempPath, FileName); string Savepath = Path.Combine(tempPath, FileName);
@@ -602,7 +603,7 @@ namespace UniMarc
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show(e.ToString()); UTIL.MsgE(e.ToString());
return "False"; return "False";
} }
} }
@@ -640,7 +641,7 @@ namespace UniMarc
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show(e.ToString()); UTIL.MsgE(e.ToString());
} }
} }
#region MK_Excel_Sub #region MK_Excel_Sub
@@ -824,9 +825,9 @@ namespace UniMarc
string ErrMsg = FAX_GetErrString(result); string ErrMsg = FAX_GetErrString(result);
if (ErrMsg != "") if (ErrMsg != "")
MessageBox.Show(msg, "전송완료"); UTIL.MsgI(msg);
else else
MessageBox.Show(ErrMsg, "Error"); UTIL.MsgE(ErrMsg);
return result; return result;
} }
@@ -1307,7 +1308,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.ToString()); UTIL.MsgE(ex.ToString());
this.LastException = ex; this.LastException = ex;
System.Reflection.MemberInfo info = System.Reflection.MethodInfo.GetCurrentMethod(); System.Reflection.MemberInfo info = System.Reflection.MethodInfo.GetCurrentMethod();
string id = string.Format("{0}.{1}", info.ReflectedType.Name, info.Name); string id = string.Format("{0}.{1}", info.ReflectedType.Name, info.Name);
@@ -1326,8 +1327,6 @@ namespace UniMarc
string url = string.Format(@"FTP://{0}:{1}/{2}", ipAddr, Port, serverFullPathFile); string url = string.Format(@"FTP://{0}:{1}/{2}", ipAddr, Port, serverFullPathFile);
FtpWebRequest ftp = (FtpWebRequest)WebRequest.Create(url); FtpWebRequest ftp = (FtpWebRequest)WebRequest.Create(url);
MessageBox.Show(url);
ftp.Credentials = new NetworkCredential(userId, Pwd); ftp.Credentials = new NetworkCredential(userId, Pwd);
ftp.KeepAlive = false; ftp.KeepAlive = false;
ftp.UseBinary = true; ftp.UseBinary = true;
@@ -1365,7 +1364,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.ToString()); UTIL.MsgE(ex.ToString());
this.LastException = ex; this.LastException = ex;
if (serverFullPathFile.Contains(@"\ZOOM\")) if (serverFullPathFile.Contains(@"\ZOOM\"))
@@ -1933,7 +1932,7 @@ namespace UniMarc
/// <returns></returns> /// <returns></returns>
public string[] Take_Tag(string marc, string[] search, bool pSearchTag = false) public string[] Take_Tag(string marc, string[] search, bool pSearchTag = false)
{ {
string[] ary = marc.Split(''); string[] ary = marc.Split(''); //0x1E
string[] tag = res_dir(ary[0].Substring(24)); string[] tag = res_dir(ary[0].Substring(24));
(string[] jisi, string[] mrc) = jisi_Symbol(tag, ary); (string[] jisi, string[] mrc) = jisi_Symbol(tag, ary);
@@ -2341,9 +2340,9 @@ namespace UniMarc
/// <param name="QueryType"></param> /// <param name="QueryType"></param>
/// <param name="Param"></param> /// <param name="Param"></param>
/// <returns></returns> /// <returns></returns>
public string Aladin(string Query, string QueryType, string[] Param) public List<string> Aladin(string Query, string QueryType, string[] Param)
{ {
string result = string.Empty; List<string> result = new List<string>();
// 쿼리 생성 // 쿼리 생성
string key = "ttbgloriabook1512001"; string key = "ttbgloriabook1512001";
string site = "http://www.aladin.co.kr/ttb/api/ItemSearch.aspx"; string site = "http://www.aladin.co.kr/ttb/api/ItemSearch.aspx";
@@ -2384,7 +2383,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
return ""; return result;
} }
var json = JsonConvert.SerializeXmlNode(doc); var json = JsonConvert.SerializeXmlNode(doc);
@@ -2402,7 +2401,7 @@ namespace UniMarc
} }
catch catch
{ {
return ""; return result;
} }
int length = 0; int length = 0;
int ID_length = Param.Length; int ID_length = Param.Length;
@@ -2419,6 +2418,7 @@ namespace UniMarc
object buf = docs; object buf = docs;
length = 1; length = 1;
} }
// List<string> retval = new List<string>();
for (int a = 0; a < length; a++) for (int a = 0; a < length; a++)
{ {
List<string> tmp_data = new List<string>(); List<string> tmp_data = new List<string>();
@@ -2432,9 +2432,10 @@ namespace UniMarc
{ {
tmp_data.Add(docs[a][Param[b]]); tmp_data.Add(docs[a][Param[b]]);
} }
result += tmp_data[b].Replace("|", "") + "|"; result.Add(tmp_data[b].Replace("|", ""));
//result += tmp_data[b].Replace("|", "") + "|";
} }
result += "\n"; //result += "\n";
} }
return result; return result;
} }
@@ -2459,7 +2460,7 @@ namespace UniMarc
} }
else else
{ {
MessageBox.Show(status, "Error"); UTIL.MsgE(status);
return "Error"; return "Error";
} }

View File

@@ -0,0 +1,169 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
namespace UniMarc
{
public class SortableBindingList<T> : BindingList<T>, IBindingListView
{
private bool _isSorted;
private ListSortDirection _sortDirection;
private PropertyDescriptor _sortProperty;
private string _filter;
private readonly List<T> _originalItems = new List<T>();
public SortableBindingList() : base() { }
public SortableBindingList(IList<T> list) : base(list)
{
foreach (var item in list)
_originalItems.Add(item);
}
protected override void OnListChanged(ListChangedEventArgs e)
{
if (e.ListChangedType == ListChangedType.ItemAdded)
{
_originalItems.Insert(e.NewIndex, this[e.NewIndex]);
}
else if (e.ListChangedType == ListChangedType.ItemDeleted)
{
// This is slightly tricky if filtered, but we assume basic usage for now
// Ideally we'd track IDs
}
base.OnListChanged(e);
}
#region Sorting
protected override bool SupportsSortingCore => true;
protected override bool IsSortedCore => _isSorted;
protected override ListSortDirection SortDirectionCore => _sortDirection;
protected override PropertyDescriptor SortPropertyCore => _sortProperty;
protected override void ApplySortCore(PropertyDescriptor prop, ListSortDirection direction)
{
var items = this.Items as List<T>;
if (items != null)
{
PropertyComparer<T> pc = new PropertyComparer<T>(prop, direction);
items.Sort(pc);
_isSorted = true;
_sortDirection = direction;
_sortProperty = prop;
}
else
{
_isSorted = false;
}
OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
}
protected override void RemoveSortCore()
{
_isSorted = false;
_sortProperty = null;
OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
}
#endregion
#region Filtering (IBindingListView)
public string Filter
{
get => _filter;
set
{
_filter = value;
if (string.IsNullOrEmpty(_filter))
RemoveFilter();
else
ApplyFilter(_filter);
}
}
public bool SupportsFiltering => true;
public void ApplyFilter(string filter)
{
_filter = filter;
if (_originalItems.Count == 0 && this.Count > 0)
{
foreach (var item in this) _originalItems.Add(item);
}
// Simple parser for "Property=Value" or "Property='Value'"
var parts = filter.Split('=');
if (parts.Length != 2) return;
string propName = parts[0].Trim();
string valStr = parts[1].Trim().Trim('\'');
var prop = TypeDescriptor.GetProperties(typeof(T))[propName];
if (prop == null) return;
this.RaiseListChangedEvents = false;
this.Clear();
foreach (var item in _originalItems)
{
var val = prop.GetValue(item);
if (val != null && val.ToString().Equals(valStr, StringComparison.OrdinalIgnoreCase))
{
this.Add(item);
}
}
this.RaiseListChangedEvents = true;
OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
}
public void RemoveFilter()
{
_filter = null;
if (_originalItems.Count > 0)
{
this.RaiseListChangedEvents = false;
this.Clear();
foreach (var item in _originalItems) this.Add(item);
this.RaiseListChangedEvents = true;
OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
}
}
public ListSortDescriptionCollection SortDescriptions => null;
public bool SupportsAdvancedSorting => false;
public void ApplySort(ListSortDescriptionCollection sorts) => throw new NotSupportedException();
#endregion
private class PropertyComparer<TItem> : IComparer<TItem>
{
private readonly PropertyDescriptor _prop;
private readonly ListSortDirection _direction;
public PropertyComparer(PropertyDescriptor prop, ListSortDirection direction)
{
_prop = prop;
_direction = direction;
}
public int Compare(TItem x, TItem y)
{
object xVal = _prop.GetValue(x);
object yVal = _prop.GetValue(y);
int result;
if (xVal == null && yVal == null) result = 0;
else if (xVal == null) result = -1;
else if (yVal == null) result = 1;
else if (xVal is IComparable comparable)
result = comparable.CompareTo(yVal);
else if (xVal.Equals(yVal))
result = 0;
else
result = xVal.ToString().CompareTo(yVal.ToString());
return _direction == ListSortDirection.Ascending ? result : -result;
}
}
}
}

136
unimarc/unimarc/UC_SelectGrade.Designer.cs generated Normal file
View 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;
}
}

View 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;
}
}
}
}

View File

@@ -224,6 +224,10 @@
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</Compile> </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="Helper_LibraryDelaySettings.cs" />
<Compile Include="ListOfValue\fSelectDT.cs"> <Compile Include="ListOfValue\fSelectDT.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
@@ -267,12 +271,31 @@
<Compile Include="SearchModel\JunnamEduSearcher.cs" /> <Compile Include="SearchModel\JunnamEduSearcher.cs" />
<Compile Include="SearchModel\NamguLibrarySearcher.cs" /> <Compile Include="SearchModel\NamguLibrarySearcher.cs" />
<Compile Include="SearchModel\SeleniumHelper.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"> <Compile Include="개발자용\fDevDB.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="개발자용\fDevDB.Designer.cs"> <Compile Include="개발자용\fDevDB.Designer.cs">
<DependentUpon>fDevDB.cs</DependentUpon> <DependentUpon>fDevDB.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="납품관리\Book_Lookup2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="납품관리\Book_Lookup2.Designer.cs">
<DependentUpon>Book_Lookup2.cs</DependentUpon>
</Compile>
<Compile Include="납품관리\Order_input_Search2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="납품관리\Order_input_Search2.Designer.cs">
<DependentUpon>Order_input_Search2.cs</DependentUpon>
</Compile>
<Compile Include="마스터\From_User_manage_List.cs"> <Compile Include="마스터\From_User_manage_List.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -297,6 +320,7 @@
<Compile Include="마크\AddMarc_FillBlank.Designer.cs"> <Compile Include="마크\AddMarc_FillBlank.Designer.cs">
<DependentUpon>AddMarc_FillBlank.cs</DependentUpon> <DependentUpon>AddMarc_FillBlank.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="Models\BookGridItem.cs" />
<Compile Include="마크\CD_LP.cs"> <Compile Include="마크\CD_LP.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -345,7 +369,31 @@
<Compile Include="마크\Check_Copy_Sub_Selector.Designer.cs"> <Compile Include="마크\Check_Copy_Sub_Selector.Designer.cs">
<DependentUpon>Check_Copy_Sub_Selector.cs</DependentUpon> <DependentUpon>Check_Copy_Sub_Selector.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="마크\FillBlankItem.cs" /> <Compile Include="마크\Check_ISBN2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="마크\Check_ISBN2.Designer.cs">
<DependentUpon>Check_ISBN2.cs</DependentUpon>
</Compile>
<Compile Include="마크\Check_ISBN_ItemEdit.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="마크\Check_ISBN_ItemEdit.Designer.cs">
<DependentUpon>Check_ISBN_ItemEdit.cs</DependentUpon>
</Compile>
<Compile Include="마크\Check_ISBN_Sub2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="마크\Check_ISBN_Sub2.Designer.cs">
<DependentUpon>Check_ISBN_Sub2.cs</DependentUpon>
</Compile>
<Compile Include="마크\Check_ISBN_Yes242.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="마크\Check_ISBN_Yes242.Designer.cs">
<DependentUpon>Check_ISBN_Yes242.cs</DependentUpon>
</Compile>
<Compile Include="Models\FillBlankItem.cs" />
<Compile Include="마크\Help_007.cs"> <Compile Include="마크\Help_007.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -358,15 +406,29 @@
<Compile Include="마크\Help_008.Designer.cs"> <Compile Include="마크\Help_008.Designer.cs">
<DependentUpon>Help_008.cs</DependentUpon> <DependentUpon>Help_008.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="마크\MacEditorParameter.cs" /> <Compile Include="Models\IsbnGridItem.cs" />
<Compile Include="마크\MacListItem.cs" /> <Compile Include="Models\MacEditorParameter.cs" />
<Compile Include="Models\MacListItem.cs" />
<Compile Include="마크\Mac_List_Add2.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="마크\Mac_List_Add2.Designer.cs">
<DependentUpon>Mac_List_Add2.cs</DependentUpon>
</Compile>
<Compile Include="마크\Mac_List_Add.cs"> <Compile Include="마크\Mac_List_Add.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="마크\Mac_List_Add.Designer.cs"> <Compile Include="마크\Mac_List_Add.Designer.cs">
<DependentUpon>Mac_List_Add.cs</DependentUpon> <DependentUpon>Mac_List_Add.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="마크\MarcBookItem.cs" /> <Compile Include="마크\Mac_List_Edit.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="마크\Mac_List_Edit.Designer.cs">
<DependentUpon>Mac_List_Edit.cs</DependentUpon>
</Compile>
<Compile Include="Models\MarcBookItem.cs" />
<Compile Include="Models\MarcCopyItem.cs" />
<Compile Include="마크\MarcCopySelect2.cs"> <Compile Include="마크\MarcCopySelect2.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -391,7 +453,10 @@
<Compile Include="마크\Marc.designer.cs"> <Compile Include="마크\Marc.designer.cs">
<DependentUpon>Marc.cs</DependentUpon> <DependentUpon>Marc.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="마크\MarcPlanItem.cs" /> <Compile Include="Models\MarcPlanItem.cs" />
<Compile Include="마크\Marc_CopyForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="마크\Marc_FillBlank.cs"> <Compile Include="마크\Marc_FillBlank.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -533,11 +598,11 @@
<Compile Include="마크\Marc_Plan_PrintLabel.Designer.cs"> <Compile Include="마크\Marc_Plan_PrintLabel.Designer.cs">
<DependentUpon>Marc_Plan_PrintLabel.cs</DependentUpon> <DependentUpon>Marc_Plan_PrintLabel.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="마크\Marc_Plan_Sub_MarcEdit2.cs"> <Compile Include="마크\fMarc_Editor.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="마크\Marc_Plan_Sub_MarcEdit2.Designer.cs"> <Compile Include="마크\fMarc_Editor.Designer.cs">
<DependentUpon>Marc_Plan_Sub_MarcEdit2.cs</DependentUpon> <DependentUpon>fMarc_Editor.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="마크\Marc_Plan_Sub_MarcEdit.cs"> <Compile Include="마크\Marc_Plan_Sub_MarcEdit.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
@@ -587,11 +652,12 @@
<Compile Include="마크\Marc_memo.Designer.cs"> <Compile Include="마크\Marc_memo.Designer.cs">
<DependentUpon>Marc_memo.cs</DependentUpon> <DependentUpon>Marc_memo.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="마크\Search_Infor_Sub.cs"> <Compile Include="Models\SearchInforItem.cs" />
<Compile Include="마크\Search_Infor2.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="마크\Search_Infor_Sub.Designer.cs"> <Compile Include="마크\Search_Infor2.Designer.cs">
<DependentUpon>Search_Infor_Sub.cs</DependentUpon> <DependentUpon>Search_Infor2.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="마크\SHDocVw.cs" /> <Compile Include="마크\SHDocVw.cs" />
<Compile Include="마크\ShowDeleteMarc.cs"> <Compile Include="마크\ShowDeleteMarc.cs">
@@ -1047,9 +1113,18 @@
<EmbeddedResource Include="ListOfValue\fSelectDT.resx"> <EmbeddedResource Include="ListOfValue\fSelectDT.resx">
<DependentUpon>fSelectDT.cs</DependentUpon> <DependentUpon>fSelectDT.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UC_SelectGrade.resx">
<DependentUpon>UC_SelectGrade.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="개발자용\fDevDB.resx"> <EmbeddedResource Include="개발자용\fDevDB.resx">
<DependentUpon>fDevDB.cs</DependentUpon> <DependentUpon>fDevDB.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="납품관리\Book_Lookup2.resx">
<DependentUpon>Book_Lookup2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="납품관리\Order_input_Search2.resx">
<DependentUpon>Order_input_Search2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="마스터\From_User_manage_List.resx"> <EmbeddedResource Include="마스터\From_User_manage_List.resx">
<DependentUpon>From_User_manage_List.cs</DependentUpon> <DependentUpon>From_User_manage_List.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -1086,15 +1161,33 @@
<EmbeddedResource Include="마크\Check_Copy_Sub_Selector.resx"> <EmbeddedResource Include="마크\Check_Copy_Sub_Selector.resx">
<DependentUpon>Check_Copy_Sub_Selector.cs</DependentUpon> <DependentUpon>Check_Copy_Sub_Selector.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="마크\Check_ISBN2.resx">
<DependentUpon>Check_ISBN2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="마크\Check_ISBN_ItemEdit.resx">
<DependentUpon>Check_ISBN_ItemEdit.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="마크\Check_ISBN_Sub2.resx">
<DependentUpon>Check_ISBN_Sub2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="마크\Check_ISBN_Yes242.resx">
<DependentUpon>Check_ISBN_Yes242.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="마크\Help_007.resx"> <EmbeddedResource Include="마크\Help_007.resx">
<DependentUpon>Help_007.cs</DependentUpon> <DependentUpon>Help_007.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="마크\Help_008.resx"> <EmbeddedResource Include="마크\Help_008.resx">
<DependentUpon>Help_008.cs</DependentUpon> <DependentUpon>Help_008.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="마크\Mac_List_Add2.resx">
<DependentUpon>Mac_List_Add2.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="마크\Mac_List_Add.resx"> <EmbeddedResource Include="마크\Mac_List_Add.resx">
<DependentUpon>Mac_List_Add.cs</DependentUpon> <DependentUpon>Mac_List_Add.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="마크\Mac_List_Edit.resx">
<DependentUpon>Mac_List_Edit.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="마크\MarcCopySelect2.resx"> <EmbeddedResource Include="마크\MarcCopySelect2.resx">
<DependentUpon>MarcCopySelect2.cs</DependentUpon> <DependentUpon>MarcCopySelect2.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -1107,6 +1200,9 @@
<EmbeddedResource Include="마크\MarcEditorControl.resx"> <EmbeddedResource Include="마크\MarcEditorControl.resx">
<DependentUpon>MarcEditorControl.cs</DependentUpon> <DependentUpon>MarcEditorControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="마크\Marc_CopyForm.resx">
<DependentUpon>Marc_CopyForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="마크\Marc_FillBlank.resx"> <EmbeddedResource Include="마크\Marc_FillBlank.resx">
<DependentUpon>Marc_FillBlank.cs</DependentUpon> <DependentUpon>Marc_FillBlank.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
@@ -1176,8 +1272,8 @@
<EmbeddedResource Include="마크\Marc_Plan_PrintLabel.resx"> <EmbeddedResource Include="마크\Marc_Plan_PrintLabel.resx">
<DependentUpon>Marc_Plan_PrintLabel.cs</DependentUpon> <DependentUpon>Marc_Plan_PrintLabel.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="마크\Marc_Plan_Sub_MarcEdit2.resx"> <EmbeddedResource Include="마크\fMarc_Editor.resx">
<DependentUpon>Marc_Plan_Sub_MarcEdit2.cs</DependentUpon> <DependentUpon>fMarc_Editor.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="마크\Marc_Plan_Sub_MarcEdit.resx"> <EmbeddedResource Include="마크\Marc_Plan_Sub_MarcEdit.resx">
<DependentUpon>Marc_Plan_Sub_MarcEdit.cs</DependentUpon> <DependentUpon>Marc_Plan_Sub_MarcEdit.cs</DependentUpon>
@@ -1203,8 +1299,8 @@
<EmbeddedResource Include="마크\Marc_memo.resx"> <EmbeddedResource Include="마크\Marc_memo.resx">
<DependentUpon>Marc_memo.cs</DependentUpon> <DependentUpon>Marc_memo.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="마크\Search_Infor_Sub.resx"> <EmbeddedResource Include="마크\Search_Infor2.resx">
<DependentUpon>Search_Infor_Sub.cs</DependentUpon> <DependentUpon>Search_Infor2.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="마크\ShowDeleteMarc.resx"> <EmbeddedResource Include="마크\ShowDeleteMarc.resx">
<DependentUpon>ShowDeleteMarc.cs</DependentUpon> <DependentUpon>ShowDeleteMarc.cs</DependentUpon>
@@ -1962,6 +2058,12 @@
<None Include="Connected Services\BaroService_TI\UniMarc.BaroService_TI.UpdateUserPWDResponse.datasource"> <None Include="Connected Services\BaroService_TI\UniMarc.BaroService_TI.UpdateUserPWDResponse.datasource">
<DependentUpon>Reference.svcmap</DependentUpon> <DependentUpon>Reference.svcmap</DependentUpon>
</None> </None>
<Content Include="Helper\sample_fullmarc.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Helper\sample_richtext.txt">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="Properties\app.manifest" /> <None Include="Properties\app.manifest" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
@@ -2099,6 +2201,7 @@
<Content Include="Resources\3_2_1_목록.png" /> <Content Include="Resources\3_2_1_목록.png" />
<Content Include="Resources\3_2_2_편목.png" /> <Content Include="Resources\3_2_2_편목.png" />
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\packages\Selenium.WebDriver.4.34.0\build\Selenium.WebDriver.targets" Condition="Exists('..\packages\Selenium.WebDriver.4.34.0\build\Selenium.WebDriver.targets')" /> <Import Project="..\packages\Selenium.WebDriver.4.34.0\build\Selenium.WebDriver.targets" Condition="Exists('..\packages\Selenium.WebDriver.4.34.0\build\Selenium.WebDriver.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

View File

@@ -1,23 +0,0 @@
$path = "s:\Source\Gloria\Unimarc\unimarc\unimarc\Helper_LibraryDelaySettings.cs"
$utf8 = [System.Text.Encoding]::GetEncoding(65001)
$cp949 = [System.Text.Encoding]::GetEncoding(949)
# Read the CURRENT mangled file as UTF-8
$mangledString = [System.IO.File]::ReadAllText($path, $utf8)
# Convert each character to its CP949 bytes
# Note: This is tricky because some "characters" might be multiple bytes in CP949
# but here each character in the string represents what CP949 read from the original UTF-8 bytes.
$byteList = New-Object System.Collections.Generic.List[byte]
foreach ($char in $mangledString.ToCharArray()) {
$cBytes = $cp949.GetBytes($char)
foreach ($b in $cBytes) {
$byteList.Add($b)
}
}
# Now interpret these bytes as UTF-8 (the original encoding)
$restored = $utf8.GetString($byteList.ToArray())
Write-Host "--- Attempted Restoration ---"
Write-Host ($restored -split "`r`n" | select -First 10)

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -211,7 +212,7 @@ namespace UniMarc
string U_cmd = db.More_Update("Obj_List_Book", Table, List_book, idx_table, idx_col); string U_cmd = db.More_Update("Obj_List_Book", Table, List_book, idx_table, idx_col);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
MessageBox.Show("저장되었습니다."); UTIL.MsgI("저장되었습니다.");
} }
private void btn_close_Click(object sender, EventArgs e) private void btn_close_Click(object sender, EventArgs e)
{ {
@@ -228,7 +229,7 @@ namespace UniMarc
tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text }; tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text };
string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col); string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
MessageBox.Show(tb_book_name.Text + "가 입고처리되었습니다."); UTIL.MsgI(tb_book_name.Text + "가 입고처리되었습니다.");
mk_Grid(); mk_Grid();
} }
@@ -245,7 +246,7 @@ namespace UniMarc
string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col); string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
MessageBox.Show(tb_book_name.Text + "가 미입고처리되었습니다."); UTIL.MsgI(tb_book_name.Text + "가 미입고처리되었습니다.");
mk_Grid(); mk_Grid();
} }
private void btn_order_ccl_Click(object sender, EventArgs e) private void btn_order_ccl_Click(object sender, EventArgs e)

View File

@@ -0,0 +1,679 @@
namespace UniMarc
{
partial class Book_Lookup2
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.lbl_idx = new System.Windows.Forms.Label();
this.tb_isbn = new System.Windows.Forms.TextBox();
this.tb_order_idx = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.tb_etc = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.tb_num = new System.Windows.Forms.TextBox();
this.label17 = new System.Windows.Forms.Label();
this.label20 = new System.Windows.Forms.Label();
this.tb_order1 = new System.Windows.Forms.TextBox();
this.tb_charge = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.tb_total = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.tb_pay = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.tb_stock = new System.Windows.Forms.TextBox();
this.tb_count = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.label22 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.tb_order_date = new System.Windows.Forms.TextBox();
this.tb_book_comp = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.tb_author = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.tb_book_name = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.tb_date = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.btn_stock = new System.Windows.Forms.Button();
this.btn_order_ccl = new System.Windows.Forms.Button();
this.btn_order = new System.Windows.Forms.Button();
this.btn_close = new System.Windows.Forms.Button();
this.btn_save = new System.Windows.Forms.Button();
this.btn_printLine = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.tb_List_name = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.tb_date_res = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.btn_unstock = new System.Windows.Forms.Button();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.lbl_idx);
this.panel1.Controls.Add(this.tb_isbn);
this.panel1.Controls.Add(this.tb_order_idx);
this.panel1.Controls.Add(this.label9);
this.panel1.Controls.Add(this.tb_etc);
this.panel1.Controls.Add(this.label10);
this.panel1.Controls.Add(this.tb_num);
this.panel1.Controls.Add(this.label17);
this.panel1.Controls.Add(this.label20);
this.panel1.Controls.Add(this.tb_order1);
this.panel1.Controls.Add(this.tb_charge);
this.panel1.Controls.Add(this.label12);
this.panel1.Controls.Add(this.tb_total);
this.panel1.Controls.Add(this.label6);
this.panel1.Controls.Add(this.tb_pay);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.tb_stock);
this.panel1.Controls.Add(this.tb_count);
this.panel1.Controls.Add(this.label13);
this.panel1.Controls.Add(this.label22);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.tb_order_date);
this.panel1.Controls.Add(this.tb_book_comp);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.tb_author);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.tb_book_name);
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(9, 106);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(648, 199);
this.panel1.TabIndex = 0;
//
// lbl_idx
//
this.lbl_idx.AutoSize = true;
this.lbl_idx.Location = new System.Drawing.Point(212, 10);
this.lbl_idx.Name = "lbl_idx";
this.lbl_idx.Size = new System.Drawing.Size(62, 12);
this.lbl_idx.TabIndex = 2;
this.lbl_idx.Text = "idx 들어감";
//
// tb_isbn
//
this.tb_isbn.Location = new System.Drawing.Point(414, 7);
this.tb_isbn.Name = "tb_isbn";
this.tb_isbn.Size = new System.Drawing.Size(215, 21);
this.tb_isbn.TabIndex = 1;
this.tb_isbn.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// tb_order_idx
//
this.tb_order_idx.BackColor = System.Drawing.SystemColors.Control;
this.tb_order_idx.Enabled = false;
this.tb_order_idx.Location = new System.Drawing.Point(214, 168);
this.tb_order_idx.Name = "tb_order_idx";
this.tb_order_idx.Size = new System.Drawing.Size(43, 21);
this.tb_order_idx.TabIndex = 1;
this.tb_order_idx.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label9
//
this.label9.AutoSize = true;
this.label9.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label9.Location = new System.Drawing.Point(374, 11);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(33, 12);
this.label9.TabIndex = 0;
this.label9.Text = "ISBN";
//
// tb_etc
//
this.tb_etc.Location = new System.Drawing.Point(69, 141);
this.tb_etc.Name = "tb_etc";
this.tb_etc.Size = new System.Drawing.Size(560, 21);
this.tb_etc.TabIndex = 1;
this.tb_etc.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label10
//
this.label10.AutoSize = true;
this.label10.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label10.Location = new System.Drawing.Point(22, 10);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(29, 12);
this.label10.TabIndex = 0;
this.label10.Text = "번호";
//
// tb_num
//
this.tb_num.BackColor = System.Drawing.SystemColors.Control;
this.tb_num.Enabled = false;
this.tb_num.Location = new System.Drawing.Point(69, 6);
this.tb_num.Name = "tb_num";
this.tb_num.Size = new System.Drawing.Size(124, 21);
this.tb_num.TabIndex = 1;
this.tb_num.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label17
//
this.label17.AutoSize = true;
this.label17.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label17.Location = new System.Drawing.Point(22, 145);
this.label17.Name = "label17";
this.label17.Size = new System.Drawing.Size(29, 12);
this.label17.TabIndex = 0;
this.label17.Text = "비고";
//
// label20
//
this.label20.AutoSize = true;
this.label20.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label20.Location = new System.Drawing.Point(14, 172);
this.label20.Name = "label20";
this.label20.Size = new System.Drawing.Size(41, 12);
this.label20.TabIndex = 0;
this.label20.Text = "주문처";
//
// tb_order1
//
this.tb_order1.Location = new System.Drawing.Point(69, 168);
this.tb_order1.Name = "tb_order1";
this.tb_order1.Size = new System.Drawing.Size(139, 21);
this.tb_order1.TabIndex = 1;
this.tb_order1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// tb_charge
//
this.tb_charge.BackColor = System.Drawing.SystemColors.Control;
this.tb_charge.Enabled = false;
this.tb_charge.Location = new System.Drawing.Point(487, 87);
this.tb_charge.Name = "tb_charge";
this.tb_charge.Size = new System.Drawing.Size(142, 21);
this.tb_charge.TabIndex = 1;
this.tb_charge.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label12
//
this.label12.AutoSize = true;
this.label12.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label12.Location = new System.Drawing.Point(430, 91);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(41, 12);
this.label12.TabIndex = 0;
this.label12.Text = "담당자";
//
// tb_total
//
this.tb_total.Location = new System.Drawing.Point(487, 114);
this.tb_total.Name = "tb_total";
this.tb_total.Size = new System.Drawing.Size(142, 21);
this.tb_total.TabIndex = 1;
this.tb_total.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label6
//
this.label6.AutoSize = true;
this.label6.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label6.Location = new System.Drawing.Point(424, 118);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(53, 12);
this.label6.TabIndex = 0;
this.label6.Text = "합계금액";
//
// tb_pay
//
this.tb_pay.Location = new System.Drawing.Point(69, 114);
this.tb_pay.Name = "tb_pay";
this.tb_pay.Size = new System.Drawing.Size(124, 21);
this.tb_pay.TabIndex = 1;
this.tb_pay.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label5
//
this.label5.AutoSize = true;
this.label5.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label5.Location = new System.Drawing.Point(22, 118);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 0;
this.label5.Text = "정가";
//
// tb_stock
//
this.tb_stock.Location = new System.Drawing.Point(357, 114);
this.tb_stock.Name = "tb_stock";
this.tb_stock.Size = new System.Drawing.Size(57, 21);
this.tb_stock.TabIndex = 1;
this.tb_stock.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// tb_count
//
this.tb_count.Location = new System.Drawing.Point(242, 114);
this.tb_count.Name = "tb_count";
this.tb_count.Size = new System.Drawing.Size(57, 21);
this.tb_count.TabIndex = 1;
this.tb_count.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label13
//
this.label13.AutoSize = true;
this.label13.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label13.Location = new System.Drawing.Point(314, 118);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(41, 12);
this.label13.TabIndex = 0;
this.label13.Text = "입고수";
//
// label22
//
this.label22.AutoSize = true;
this.label22.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label22.Location = new System.Drawing.Point(349, 172);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(53, 12);
this.label22.TabIndex = 0;
this.label22.Text = "주문일자";
//
// label4
//
this.label4.AutoSize = true;
this.label4.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label4.Location = new System.Drawing.Point(211, 118);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 0;
this.label4.Text = "수량";
//
// tb_order_date
//
this.tb_order_date.BackColor = System.Drawing.SystemColors.Control;
this.tb_order_date.Enabled = false;
this.tb_order_date.Location = new System.Drawing.Point(409, 168);
this.tb_order_date.Name = "tb_order_date";
this.tb_order_date.Size = new System.Drawing.Size(220, 21);
this.tb_order_date.TabIndex = 1;
this.tb_order_date.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// tb_book_comp
//
this.tb_book_comp.Location = new System.Drawing.Point(69, 87);
this.tb_book_comp.Name = "tb_book_comp";
this.tb_book_comp.Size = new System.Drawing.Size(345, 21);
this.tb_book_comp.TabIndex = 1;
this.tb_book_comp.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label3
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label3.Location = new System.Drawing.Point(16, 91);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 0;
this.label3.Text = "출판사";
//
// tb_author
//
this.tb_author.Location = new System.Drawing.Point(69, 60);
this.tb_author.Name = "tb_author";
this.tb_author.Size = new System.Drawing.Size(345, 21);
this.tb_author.TabIndex = 1;
this.tb_author.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label2.Location = new System.Drawing.Point(22, 64);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 0;
this.label2.Text = "저자";
//
// tb_book_name
//
this.tb_book_name.Location = new System.Drawing.Point(69, 33);
this.tb_book_name.Name = "tb_book_name";
this.tb_book_name.Size = new System.Drawing.Size(560, 21);
this.tb_book_name.TabIndex = 1;
this.tb_book_name.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label1.Location = new System.Drawing.Point(16, 37);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 0;
this.label1.Text = "도서명";
//
// tb_date
//
this.tb_date.Enabled = false;
this.tb_date.Location = new System.Drawing.Point(69, 34);
this.tb_date.Name = "tb_date";
this.tb_date.Size = new System.Drawing.Size(230, 21);
this.tb_date.TabIndex = 1;
this.tb_date.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label7
//
this.label7.AutoSize = true;
this.label7.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label7.Location = new System.Drawing.Point(10, 38);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(53, 12);
this.label7.TabIndex = 0;
this.label7.Text = "목록일자";
//
// btn_stock
//
this.btn_stock.Location = new System.Drawing.Point(90, 6);
this.btn_stock.Name = "btn_stock";
this.btn_stock.Size = new System.Drawing.Size(75, 23);
this.btn_stock.TabIndex = 3;
this.btn_stock.Text = "입고처리";
this.btn_stock.UseVisualStyleBackColor = true;
this.btn_stock.Click += new System.EventHandler(this.btn_stock_Click);
//
// btn_order_ccl
//
this.btn_order_ccl.Location = new System.Drawing.Point(171, 6);
this.btn_order_ccl.Name = "btn_order_ccl";
this.btn_order_ccl.Size = new System.Drawing.Size(75, 23);
this.btn_order_ccl.TabIndex = 3;
this.btn_order_ccl.Text = "주문취소";
this.btn_order_ccl.UseVisualStyleBackColor = true;
this.btn_order_ccl.Click += new System.EventHandler(this.btn_order_ccl_Click);
//
// btn_order
//
this.btn_order.Location = new System.Drawing.Point(252, 6);
this.btn_order.Name = "btn_order";
this.btn_order.Size = new System.Drawing.Size(75, 23);
this.btn_order.TabIndex = 3;
this.btn_order.Text = "주문처리";
this.btn_order.UseVisualStyleBackColor = true;
this.btn_order.Click += new System.EventHandler(this.btn_order_Click);
//
// btn_close
//
this.btn_close.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.btn_close.Location = new System.Drawing.Point(564, 6);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(75, 23);
this.btn_close.TabIndex = 3;
this.btn_close.Text = "닫 기";
this.btn_close.UseVisualStyleBackColor = true;
this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
//
// btn_save
//
this.btn_save.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.btn_save.Location = new System.Drawing.Point(483, 6);
this.btn_save.Name = "btn_save";
this.btn_save.Size = new System.Drawing.Size(75, 23);
this.btn_save.TabIndex = 3;
this.btn_save.Text = "저 장";
this.btn_save.UseVisualStyleBackColor = true;
this.btn_save.Click += new System.EventHandler(this.btn_save_Click);
//
// btn_printLine
//
this.btn_printLine.Location = new System.Drawing.Point(333, 6);
this.btn_printLine.Name = "btn_printLine";
this.btn_printLine.Size = new System.Drawing.Size(75, 23);
this.btn_printLine.TabIndex = 3;
this.btn_printLine.Text = "띠지출력";
this.btn_printLine.UseVisualStyleBackColor = true;
this.btn_printLine.Visible = false;
this.btn_printLine.Click += new System.EventHandler(this.btn_printLine_Click);
//
// panel2
//
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel2.Controls.Add(this.tb_List_name);
this.panel2.Controls.Add(this.label11);
this.panel2.Controls.Add(this.tb_date_res);
this.panel2.Controls.Add(this.label8);
this.panel2.Controls.Add(this.tb_date);
this.panel2.Controls.Add(this.label7);
this.panel2.Location = new System.Drawing.Point(9, 36);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(648, 64);
this.panel2.TabIndex = 4;
//
// tb_List_name
//
this.tb_List_name.Enabled = false;
this.tb_List_name.Location = new System.Drawing.Point(69, 7);
this.tb_List_name.Name = "tb_List_name";
this.tb_List_name.Size = new System.Drawing.Size(560, 21);
this.tb_List_name.TabIndex = 1;
this.tb_List_name.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label11
//
this.label11.AutoSize = true;
this.label11.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label11.Location = new System.Drawing.Point(16, 11);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(41, 12);
this.label11.TabIndex = 0;
this.label11.Text = "목록명";
//
// tb_date_res
//
this.tb_date_res.Enabled = false;
this.tb_date_res.Location = new System.Drawing.Point(399, 34);
this.tb_date_res.Name = "tb_date_res";
this.tb_date_res.Size = new System.Drawing.Size(230, 21);
this.tb_date_res.TabIndex = 1;
this.tb_date_res.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
//
// label8
//
this.label8.AutoSize = true;
this.label8.BackColor = System.Drawing.SystemColors.ActiveCaption;
this.label8.Location = new System.Drawing.Point(340, 38);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(53, 12);
this.label8.TabIndex = 0;
this.label8.Text = "완료일자";
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AllowUserToResizeColumns = false;
this.dataGridView1.AllowUserToResizeRows = false;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column3,
this.Column4,
this.Column5,
this.Column6});
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dataGridView1.Location = new System.Drawing.Point(9, 311);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 15;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(648, 190);
this.dataGridView1.TabIndex = 5;
//
// Column1
//
this.Column1.HeaderText = "처리일자";
this.Column1.Name = "Column1";
//
// Column2
//
this.Column2.HeaderText = "구분";
this.Column2.Name = "Column2";
//
// Column3
//
this.Column3.HeaderText = "거래처명";
this.Column3.Name = "Column3";
this.Column3.Width = 250;
//
// Column4
//
this.Column4.HeaderText = "단가";
this.Column4.Name = "Column4";
this.Column4.Width = 80;
//
// Column5
//
this.Column5.HeaderText = "수량";
this.Column5.Name = "Column5";
this.Column5.Width = 40;
//
// Column6
//
this.Column6.HeaderText = "%";
this.Column6.Name = "Column6";
this.Column6.Width = 40;
//
// btn_unstock
//
this.btn_unstock.Location = new System.Drawing.Point(9, 6);
this.btn_unstock.Name = "btn_unstock";
this.btn_unstock.Size = new System.Drawing.Size(75, 23);
this.btn_unstock.TabIndex = 6;
this.btn_unstock.Text = "미입고처리";
this.btn_unstock.UseVisualStyleBackColor = true;
this.btn_unstock.Click += new System.EventHandler(this.btn_unstock_Click);
//
// Book_Lookup
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(667, 510);
this.Controls.Add(this.btn_unstock);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.panel2);
this.Controls.Add(this.btn_save);
this.Controls.Add(this.btn_close);
this.Controls.Add(this.btn_printLine);
this.Controls.Add(this.btn_order);
this.Controls.Add(this.btn_order_ccl);
this.Controls.Add(this.btn_stock);
this.Controls.Add(this.panel1);
this.Name = "Book_Lookup";
this.Text = "도서 정보";
this.Load += new System.EventHandler(this.Book_Lookup_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Book_Lookup_KeyDown);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.TextBox tb_isbn;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox tb_etc;
private System.Windows.Forms.Label label17;
private System.Windows.Forms.TextBox tb_charge;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox tb_num;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox tb_date;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox tb_total;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox tb_pay;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox tb_count;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox tb_book_comp;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox tb_author;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tb_book_name;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tb_order_idx;
private System.Windows.Forms.Label label20;
private System.Windows.Forms.TextBox tb_order1;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox tb_order_date;
private System.Windows.Forms.Button btn_stock;
private System.Windows.Forms.Button btn_order_ccl;
private System.Windows.Forms.Button btn_order;
private System.Windows.Forms.Button btn_close;
private System.Windows.Forms.Button btn_save;
private System.Windows.Forms.Button btn_printLine;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox tb_date_res;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox tb_List_name;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
private System.Windows.Forms.TextBox tb_stock;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label lbl_idx;
private System.Windows.Forms.Button btn_unstock;
}
}

View File

@@ -0,0 +1,321 @@
using AR;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Drawing.Printing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace UniMarc
{
public partial class Book_Lookup2 : Form
{
Helper_DB db = new Helper_DB();
Order_input oin;
Purchase pur;
List_Lookup ll;
Bring_Back bb;
Check_ISBN2 cisbn;
string list_name;
int idx;
public Book_Lookup2(Order_input _oin)
{
InitializeComponent();
oin = _oin;
idx = oin.grididx;
}
public Book_Lookup2(Purchase _pur)
{
InitializeComponent();
pur = _pur;
idx = pur.grididx;
}
public Book_Lookup2(List_Lookup _ll)
{
InitializeComponent();
ll = _ll;
idx = ll.grididx;
}
public Book_Lookup2(Bring_Back _bb)
{
InitializeComponent();
bb = _bb;
idx = bb.grididx;
}
public Book_Lookup2(Check_ISBN2 _isbn)
{
InitializeComponent();
cisbn = _isbn;
idx = cisbn.rowidx;
}
private void Book_Lookup_Load(object sender, EventArgs e)
{
db.DBcon();
tb_isbn.Text = isbn();
list_db();
this.Text = "도서 정보 - 『" + tb_book_name.Text + "』";
mk_Grid();
/* Obj_List_Book
* idx 도서명 저자 출판사 isbn
* 정가 수량 입고수 합계금액 비고
* 주문처 주문일자 */
string[] List_book = { PUB.user.CompanyIdx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text,
tb_pay.Text, tb_count.Text, tb_stock.Text, tb_total.Text, tb_etc.Text,
tb_order1.Text, tb_order_date.Text, tb_List_name.Text };
}
private void mk_Grid()
{
string Area = "`order`, `pay`, `count`, `persent`, " + // 0-3
"`order_date`, `import_date`, `chk_date`, `export_date`"; // 4-7
string[] Search_col = { "compidx", "list_name", "book_name", "author", "book_comp" };
string[] Search_data = { PUB.user.CompanyIdx, tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text };
string cmd = db.More_DB_Search("Obj_List_Book", Search_col, Search_data, Area);
string db_res = db.DB_Send_CMD_Search(cmd);
string[] db_data = db_res.Split('|');
string[] add_grid = { "", "", db_data[0], db_data[1], db_data[2], db_data[3] };
// 처리일자 구분 거래처명 단가 수량 %
if (db_data[4] != "") {
add_grid[0] = db_data[4];
add_grid[1] = "주문";
dataGridView1.Rows.Add(add_grid);
}
if (db_data[5] != "") {
add_grid[0] = db_data[5];
add_grid[1] = "입고";
btn_printLine.Visible = true;
dataGridView1.Rows.Add(add_grid);
}
if (db_data[6] != "") {
add_grid[0] = db_data[6];
add_grid[1] = "검수";
dataGridView1.Rows.Add(add_grid);
}
if (db_data[7] != "") {
add_grid[0] = db_data[7];
add_grid[1] = "출고";
dataGridView1.Rows.Add(add_grid);
}
}
/// <summary>
/// 폼에 들어갈 데이터를 사전에 준비하여야함.
/// </summary>
/// <param name="book_name"></param>
/// <param name="author"></param>
/// <param name="book_comp"></param>
/// <param name="list_name"></param>
public void Lookup_Load(string book_name, string author, string book_comp, string list_name)
{
this.list_name = list_name;
db.DBcon();
string search = "`book_name`, `author`, `book_comp`, `count`, `pay`, " +
"`total`, `header`, `num`, `order`, `etc`, " +
"`input_count`, `order_date`, `list_name`, `idx`";
string[] data = { PUB.user.CompanyIdx, book_name, author, book_comp, list_name };
string[] table = { "compidx", "book_name", "author", "book_comp", "list_name" };
string cmd = db.More_DB_Search("Obj_List_Book", table, data, search);
string db_res = db.DB_Send_CMD_Search(cmd);
mk_Lookup(db_res);
}
public void Lookup_Load_tmp(string idx)
{
db.DBcon();
string search = "`book_name`, `author`, `book_comp`, `count`, `pay`, " +
"`total`, `header`, `num`, `order`, `etc`, " +
"`input_count`, `order_date`, `list_name`, `idx`";
string[] data = { PUB.user.CompanyIdx, idx };
string[] table = { "compidx", "idx" };
string cmd = db.More_DB_Search("Obj_List_Book", table, data, search);
string db_res = db.DB_Send_CMD_Search(cmd);
mk_Lookup(db_res);
}
private void mk_Lookup(string values)
{
string[] data = values.Split('|');
tb_book_name.Text = data[0];
tb_author.Text = data[1];
tb_book_comp.Text = data[2];
tb_count.Text = data[3];
tb_pay.Text = data[4];
tb_total.Text = data[5];
tb_num.Text = data[6] + " " + data[7];
tb_order1.Text = data[8];
tb_etc.Text = data[9];
tb_stock.Text = data[10];
if (data[11].Length < 3) { tb_order_date.Text = ""; }
else { tb_order_date.Text = data[11].Substring(0, 10); }
this.list_name = data[12];
lbl_idx.Text = data[13];
}
/// <summary>
/// 목록db에서 불러온 값을 적용시키는 함수
/// </summary>
private void list_db()
{
string[] where_table = { "comp_num", "list_name" };
string[] search_data = { PUB.user.CompanyIdx, list_name };
string cmd = db.More_DB_Search("Obj_List", where_table, search_data,
"`clt`, `dly`, `charge`, `date`, `date_res`");
cmd = db.DB_Send_CMD_Search(cmd);
string[] data = cmd.Split('|');
tb_List_name.Text = list_name;
tb_charge.Text = data[2];
tb_date.Text = data[3];
tb_date_res.Text = data[4];
}
/// <summary>
/// 목록도서DB에 저장된 isbn값을 가져오는 함수.
/// </summary>
/// <returns></returns>
private string isbn()
{
string[] where_table = { "compidx", "list_name", "book_name", "author", "book_comp" };
string[] search_data = { PUB.user.CompanyIdx,
list_name, tb_book_name.Text, tb_author.Text, tb_book_comp.Text };
string cmd = db.More_DB_Search("Obj_List_Book", where_table, search_data, "`isbn`");
string db_res = db.DB_Send_CMD_Search(cmd);
db_res = db_res.Replace("|", "");
return db_res;
}
private void Book_Lookup_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
btn_close_Click(null, null);
}
}
private void btn_save_Click(object sender, EventArgs e)
{
/* Obj_List_Book
* idx 도서명 저자 출판사 isbn
* 정가 수량 입고수 합계금액 비고
* 주문처 주문일자 */
string[] Table = {
"compidx", "book_name", "author", "book_comp", "isbn",
"pay", "count", "input_count", "total", "etc",
"order", "order_date", "list_name" };
string[] List_book = {
PUB.user.CompanyIdx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text,
tb_pay.Text, tb_count.Text, tb_stock.Text, tb_total.Text, tb_etc.Text,
tb_order1.Text, tb_order_date.Text, tb_List_name.Text };
string[] idx_table = { "idx" };
string[] idx_col = { lbl_idx.Text };
string U_cmd = db.More_Update("Obj_List_Book", Table, List_book, idx_table, idx_col);
Helper_DB.ExcuteNonQuery(U_cmd);
UTIL.MsgI("저장되었습니다.");
}
private void btn_close_Click(object sender, EventArgs e)
{
Close();
}
private void btn_stock_Click(object sender, EventArgs e)
{
tb_stock.Text = tb_count.Text;
string[] edit_tbl = { "input_count", "import", "import_date" };
string[] edit_col = { tb_stock.Text, "입고", DateTime.Today.ToString("yyyy-MM-dd") };
string[] search_tbl = { "compidx", "list_name", "book_name", "author", "book_comp", "isbn" };
string[] search_col = { PUB.user.CompanyIdx,
tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text };
string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col);
Helper_DB.ExcuteNonQuery(U_cmd);
UTIL.MsgI(tb_book_name.Text + "가 입고처리되었습니다.");
mk_Grid();
}
private void btn_unstock_Click(object sender, EventArgs e)
{
tb_stock.Text = "0";
string[] edit_tbl = { "input_count", "import", "import_date" };
string[] edit_col = { tb_stock.Text, "미입고", "" };
string[] search_tbl = { "compidx",
"list_name", "book_name", "author", "book_comp", "isbn" };
string[] search_col = { PUB.user.CompanyIdx,
tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text };
string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col);
Helper_DB.ExcuteNonQuery(U_cmd);
UTIL.MsgI(tb_book_name.Text + "가 미입고처리되었습니다.");
mk_Grid();
}
private void btn_order_ccl_Click(object sender, EventArgs e)
{
tb_order1.Text = "";
tb_order_date.Text = "";
tb_order_idx.Text = "";
}
private void btn_order_Click(object sender, EventArgs e)
{
tb_order_date.Text = DateTime.Now.ToString("G").Substring(0, 10);
}
private void btn_printLine_Click(object sender, EventArgs e)
{
PrintDocument pd = new PrintDocument();
pd.DocumentName = "띠지 출력";
pd.DefaultPageSettings.Landscape = true;
pd.PrintPage += new PrintPageEventHandler(this.pd_Print_Page);
pd.Print();
}
#region PrintLine_Sub
private void pd_Print_Page(object sender, PrintPageEventArgs e)
{
string list_name = tb_List_name.Text.Replace("[", "");
list_name = list_name.Replace("]", "-");
string book_name = tb_book_name.Text;
string price = tb_pay.Text.Replace(",", "");
price = string.Format("{0:#,###}", Convert.ToInt32(price));
tb_pay.Text = price;
string[] text = { tb_num.Text, tb_count.Text, list_name, book_name, price, tb_book_comp.Text, tb_isbn.Text };
Graphics g = e.Graphics;
int xPos = 0;
int yPos = 0;
int MaxX = 133;
Pen p = new Pen(Color.Black);
Font title = new Font("굴림", 22, FontStyle.Bold);
Font count = new Font("굴림", 16, FontStyle.Bold);
Font list = new Font("굴림", 14, FontStyle.Regular);
Font book = new Font("굴림", 18, FontStyle.Regular);
Font price_f = new Font("굴림", 14, FontStyle.Regular);
RectangleF title_Area = new RectangleF(xPos, yPos, MaxX, 35);
yPos += 30;
RectangleF count_Area = new RectangleF(xPos, yPos, MaxX, 35);
yPos += 25;
RectangleF list_Area = new RectangleF(xPos, yPos, MaxX, 70);
yPos += 65;
RectangleF book_Area1 = new RectangleF(xPos, yPos, MaxX, 120);
yPos += 115;
RectangleF price_Area = new RectangleF(xPos, yPos, MaxX, 70);
//g.DrawLine(p, MaxX, 0, MaxX, yPos);
using (SolidBrush drawBrush = new SolidBrush(Color.Black))
{
g.DrawString(text[0], title, drawBrush, title_Area);
g.DrawString(text[1], count, drawBrush, count_Area);
g.DrawString(text[2], list, drawBrush, list_Area);
g.DrawString(text[3], book, drawBrush, book_Area1);
g.DrawString(text[4], price_f, drawBrush, price_Area);
}
}
#endregion
}
}

View File

@@ -0,0 +1,138 @@
<?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>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -71,7 +71,7 @@
this.dataGridView1.RowHeadersWidth = 20; this.dataGridView1.RowHeadersWidth = 20;
this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; 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.TabIndex = 0;
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick); this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
@@ -126,9 +126,10 @@
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 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.Controls.Add(this.dataGridView1);
this.Name = "Commodity_Search"; this.Name = "Commodity_Search";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "Commodity_Sub"; this.Text = "Commodity_Sub";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Commodity_Search_FormClosed); this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Commodity_Search_FormClosed);
this.Load += new System.EventHandler(this.Commodity_Sub_Load); this.Load += new System.EventHandler(this.Commodity_Sub_Load);

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -107,7 +108,13 @@ namespace UniMarc
} }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) 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); Set_data(value, e.RowIndex);
@@ -176,7 +183,7 @@ namespace UniMarc
if (com != null) { com.tb_clt1.Text = value; } if (com != null) { com.tb_clt1.Text = value; }
if (pur != null) { pur.tb_clt.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 (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 (sb != null) { sb.tb_clt.Text = value; sb.btn_Lookup_Click(null, null); }
if (sip != null) { sip.tb_clt.Text = value; } if (sip != null) { sip.tb_clt.Text = value; }
if (ll != null) { ll.tb_clt.Text = value; } if (ll != null) { ll.tb_clt.Text = value; }
@@ -184,17 +191,17 @@ namespace UniMarc
dc.tb_SearchClient.Text = value; dc.tb_SearchClient.Text = value;
dc.lbl_Client.Text = value; dc.lbl_Client.Text = value;
dc.lbl_ID.Text = dataGridView1.Rows[idx].Cells["DLS_ID"].Value.ToString(); 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_PW.Text = dataGridView1.Rows[idx].Cells["DLS_PW"].Value?.ToString() ?? string.Empty;
dc.lbl_Area.Text = dataGridView1.Rows[idx].Cells["DLS_Area"].Value.ToString(); dc.lbl_Area.Text = dataGridView1.Rows[idx].Cells["DLS_Area"].Value?.ToString() ?? string.Empty;
dc.btn_Connect.PerformClick(); dc.btn_Connect.PerformClick();
//dc.SetArea(dataGridView1.Rows[idx].Cells["DLS_Area"].Value.ToString(), true); //dc.SetArea(dataGridView1.Rows[idx].Cells["DLS_Area"].Value.ToString(), true);
} }
if (sl != null) { if (sl != null) {
sl.tb_SearchClient.Text = value; sl.tb_SearchClient.Text = value;
sl.lbl_Client.Text = value; sl.lbl_Client.Text = value;
sl.lbl_ID.Text = dataGridView1.Rows[idx].Cells["DLS_ID"].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(); 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(); 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); sl.SetArea(dataGridView1.Rows[idx].Cells["DLS_Area"].Value.ToString(), true);
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -103,7 +104,7 @@ namespace UniMarc
} }
else else
{ {
MessageBox.Show("읽을 파일이 없습니다.", "에러", MessageBoxButtons.OK, MessageBoxIcon.Error); UTIL.MsgE("읽을 파일이 없습니다.");
} }
} }
/// <summary> /// <summary>
@@ -126,16 +127,16 @@ namespace UniMarc
/// <param name="e"></param> /// <param name="e"></param>
private void btn_Save_Click(object sender, EventArgs e) private void btn_Save_Click(object sender, EventArgs e)
{ {
if(cltchk == false || tb_clt1.Text=="") { MessageBox.Show("거래처를 확인해주세요."); return; } if(cltchk == false || tb_clt1.Text=="") { UTIL.MsgE("거래처를 확인해주세요."); return; }
if (chk_Save_DB() == -1) { MessageBox.Show("작업 대상을 선택해 주세요."); return; } if (chk_Save_DB() == -1) { UTIL.MsgE("작업 대상을 선택해 주세요."); return; }
string cmd = db.DB_Select_Search("name", "User_Data", "name", tb_UserName.Text); string cmd = db.DB_Select_Search("name", "User_Data", "name", tb_UserName.Text);
if (db.DB_Send_CMD_Search(cmd) == "") if (db.DB_Send_CMD_Search(cmd) == "")
{ MessageBox.Show("담당자를 확인해주세요."); return; } { UTIL.MsgE("담당자를 확인해주세요."); return; }
// TODO: 목록명, 목록일자로 구분 // TODO: 목록명, 목록일자로 구분
cmd = db.DB_Search("Obj_List", "list_name", "[" + tb_dvy1.Text + "]" + tb_clt1.Text, "comp_num", comp_idx); cmd = db.DB_Search("Obj_List", "list_name", "[" + tb_dvy1.Text + "]" + tb_clt1.Text, "comp_num", comp_idx);
if (db.DB_Send_CMD_Search(cmd) != "") if (db.DB_Send_CMD_Search(cmd) != "")
{ MessageBox.Show("DB의 납품목록과 중복됩니다."); return; } { UTIL.MsgE("DB의 납품목록과 중복됩니다."); return; }
bool MsgOk = false; bool MsgOk = false;
int Marc_ton = chk_Save_DB(); int Marc_ton = chk_Save_DB();
@@ -189,7 +190,7 @@ namespace UniMarc
} }
} }
if (MsgOk) { if (MsgOk) {
MessageBox.Show(Strmsg + "번째 행의 단가/수량/합계를 확인해 주세요."); UTIL.MsgE(Strmsg + "번째 행의 단가/수량/합계를 확인해 주세요.");
return; return;
} }
data[0] = start_date.Value.ToString().Substring(0,10); data[0] = start_date.Value.ToString().Substring(0,10);
@@ -222,6 +223,8 @@ namespace UniMarc
string Incmd = db.DB_INSERT("Obj_List", col_name, setData); string Incmd = db.DB_INSERT("Obj_List", col_name, setData);
Helper_DB.ExcuteNonQuery(Incmd); Helper_DB.ExcuteNonQuery(Incmd);
UTIL.MsgI("저장되었습니다.");
Grid1_total(); Grid1_total();
dataGridView2.Rows.Add(add_grid_data); dataGridView2.Rows.Add(add_grid_data);
GridColorChange(); GridColorChange();
@@ -269,7 +272,7 @@ namespace UniMarc
{ {
int cout = 0; int cout = 0;
int delcout = 0; int delcout = 0;
if (MessageBox.Show("정말 삭제하시겠습니까?\n삭제는 1개씩입니다.", "Danger!!!", MessageBoxButtons.YesNo) == DialogResult.Yes) if (UTIL.MsgQ("정말 삭제하시겠습니까?\n삭제는 1개씩입니다.") == DialogResult.Yes)
{ {
for (int a = 0; a < dataGridView2.Rows.Count; a++) for (int a = 0; a < dataGridView2.Rows.Count; a++)
{ {
@@ -277,10 +280,10 @@ namespace UniMarc
if (isChecked) if (isChecked)
{ {
if (cout == 0) { delcout = a; cout++; } if (cout == 0) { delcout = a; cout++; }
else { MessageBox.Show("체크가 2개이상 되어있습니다!"); cout++; break; } else { UTIL.MsgE("체크가 2개이상 되어있습니다!"); cout++; break; }
} }
} }
if (cout == 0) { MessageBox.Show("체크된 사항이 없습니다."); return; } if (cout == 0) { UTIL.MsgE("체크된 사항이 없습니다."); return; }
else if (cout == 1) else if (cout == 1)
{ {
string[] del_target = { dataGridView2.Rows[delcout].Cells["list_date"].Value.ToString(), string[] del_target = { dataGridView2.Rows[delcout].Cells["list_date"].Value.ToString(),
@@ -305,10 +308,10 @@ namespace UniMarc
if (isChecked) if (isChecked)
{ {
if (cout == 0) { EditNumber = a; cout++; } if (cout == 0) { EditNumber = a; cout++; }
else if (cout != 0) { MessageBox.Show("체크가 2개이상 되어있습니다!"); cout++; break; } else if (cout != 0) { UTIL.MsgE("체크가 2개이상 되어있습니다!"); cout++; break; }
} }
} }
if (cout == 0) { MessageBox.Show("체크된 사항이 없습니다."); return; } if (cout == 0) { UTIL.MsgE("체크된 사항이 없습니다."); return; }
if (cout == 1) if (cout == 1)
{ {
Commodity_Edit edit = new Commodity_Edit(this); Commodity_Edit edit = new Commodity_Edit(this);
@@ -417,10 +420,10 @@ namespace UniMarc
else if (cout != 0) { MorgeNum[1] = a; cout++; break; } else if (cout != 0) { MorgeNum[1] = a; cout++; break; }
} }
} }
if (cout == 0) { MessageBox.Show("체크된 사항이 없습니다."); return; } if (cout == 0) { UTIL.MsgE("체크된 사항이 없습니다."); return; }
else if (cout == 1) else if (cout == 1)
{ {
MessageBox.Show("체크가 1개밖에 되어있지않습니다."); UTIL.MsgE("체크가 1개밖에 되어있지않습니다.");
} }
else if (cout == 2) { else if (cout == 2) {
Commodity_Morge morge = new Commodity_Morge(this); Commodity_Morge morge = new Commodity_Morge(this);
@@ -428,12 +431,12 @@ namespace UniMarc
} }
else if (cout > 2) else if (cout > 2)
{ {
MessageBox.Show("체크된 사항이 너무 많습니다!"); UTIL.MsgE("체크된 사항이 너무 많습니다!");
} }
} }
private void btn_ing_Click(object sender, EventArgs e) private void btn_ing_Click(object sender, EventArgs e)
{ {
if(MessageBox.Show("진행처리 하시겠습니까?", "진행", MessageBoxButtons.YesNo) == DialogResult.Yes) if(UTIL.MsgQ("진행처리 하시겠습니까?") == DialogResult.Yes)
{ {
for(int a = 0; a < dataGridView2.Rows.Count; a++) for(int a = 0; a < dataGridView2.Rows.Count; a++)
{ {
@@ -455,7 +458,7 @@ namespace UniMarc
} }
private void btn_Complet_Click(object sender, EventArgs e) private void btn_Complet_Click(object sender, EventArgs e)
{ {
if (MessageBox.Show("완료처리 하시겠습니까?", "완료", MessageBoxButtons.YesNo) == DialogResult.Yes) if (UTIL.MsgQ("완료처리 하시겠습니까?") == DialogResult.Yes)
{ {
for (int a = 0; a < dataGridView2.Rows.Count; a++) for (int a = 0; a < dataGridView2.Rows.Count; a++)
{ {

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -48,7 +49,8 @@ namespace UniMarc
string[] data = db_data.Split('|'); string[] data = db_data.Split('|');
string[] input_grid = { "", "", "", "", "", string[] input_grid = { "", "", "", "", "",
"", "", "" }; "", "", "" };
for(int a = 0; a < data.Length; a++) { for (int a = 0; a < data.Length; a++)
{
if (a % 8 == 0) { input_grid[0] = data[a]; } if (a % 8 == 0) { input_grid[0] = data[a]; }
if (a % 8 == 1) { input_grid[1] = data[a]; } if (a % 8 == 1) { input_grid[1] = data[a]; }
if (a % 8 == 2) { input_grid[2] = data[a]; } if (a % 8 == 2) { input_grid[2] = data[a]; }
@@ -56,10 +58,12 @@ namespace UniMarc
if (a % 8 == 4) { input_grid[4] = data[a]; } if (a % 8 == 4) { input_grid[4] = data[a]; }
if (a % 8 == 5) { input_grid[5] = data[a]; } if (a % 8 == 5) { input_grid[5] = data[a]; }
if (a % 8 == 6) { input_grid[6] = data[a]; } if (a % 8 == 6) { input_grid[6] = data[a]; }
if (a % 8 == 7) { if (a % 8 == 7)
{
if (data[a].Length < 3) { input_grid[7] = data[a]; } if (data[a].Length < 3) { input_grid[7] = data[a]; }
else { input_grid[7] = data[a].Substring(0, 10); } else { input_grid[7] = data[a].Substring(0, 10); }
dataGridView1.Rows.Add(input_grid); } dataGridView1.Rows.Add(input_grid);
}
} }
} }
private void btn_Add_Click(object sender, EventArgs e) private void btn_Add_Click(object sender, EventArgs e)
@@ -70,13 +74,13 @@ namespace UniMarc
} }
private void btn_Save_Click(object sender, EventArgs e) private void btn_Save_Click(object sender, EventArgs e)
{ {
if (tb_book_name.Text == "") { MessageBox.Show("도서명을 작성해주세요."); return; } if (tb_book_name.Text == "") { UTIL.MsgE("도서명을 작성해주세요."); return; }
if (tb_isbn.Text == "") { MessageBox.Show("ISBN을 작성해주세요."); return; } if (tb_isbn.Text == "") { UTIL.MsgE("ISBN을 작성해주세요."); return; }
if (tb_book_comp.Text == "") { MessageBox.Show("출판사를 작성해주세요."); return; } if (tb_book_comp.Text == "") { UTIL.MsgE("출판사를 작성해주세요."); return; }
if (tb_author.Text == "") { MessageBox.Show("저자를 작성해주세요."); return; } if (tb_author.Text == "") { UTIL.MsgE("저자를 작성해주세요."); return; }
if (tb_pay.Text == "") { MessageBox.Show("정가를 작성해주세요."); return; } if (tb_pay.Text == "") { UTIL.MsgE("정가를 작성해주세요."); return; }
if (tb_order.Text == "") { MessageBox.Show("매입처를 작성해주세요."); return; } if (tb_order.Text == "") { UTIL.MsgE("매입처를 작성해주세요."); return; }
if (tb_count.Text == "") { MessageBox.Show("수량을 작성해주세요."); return; } if (tb_count.Text == "") { UTIL.MsgE("수량을 작성해주세요."); return; }
if (!ask_SaveChk(grid_text_savechk())) { return; } if (!ask_SaveChk(grid_text_savechk())) { return; }
@@ -86,7 +90,7 @@ namespace UniMarc
"order", "count", "import_date", "compidx" }; "order", "count", "import_date", "compidx" };
string Incmd = db.DB_INSERT(table_name, where, input); string Incmd = db.DB_INSERT(table_name, where, input);
Helper_DB.ExcuteNonQuery(Incmd); Helper_DB.ExcuteNonQuery(Incmd);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
} }
private bool grid_text_savechk() private bool grid_text_savechk()
{ {
@@ -106,10 +110,10 @@ namespace UniMarc
} }
private bool ask_SaveChk(bool ask) private bool ask_SaveChk(bool ask)
{ {
if (!ask) { if (!ask)
if (MessageBox.Show("저장하실 내용이 입고에 저장되어있습니다. 저장하시겠습니까?", "경고!", {
MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { if (UTIL.MsgQ("저장하실 내용이 입고에 저장되어있습니다. 저장하시겠습니까?") != DialogResult.Yes)
{
return false; return false;
} }
} }
@@ -144,10 +148,12 @@ namespace UniMarc
if (a % 8 == 4) { gird[4] = stock[a]; } if (a % 8 == 4) { gird[4] = stock[a]; }
if (a % 8 == 5) { gird[5] = stock[a]; } if (a % 8 == 5) { gird[5] = stock[a]; }
if (a % 8 == 6) { gird[6] = stock[a]; } if (a % 8 == 6) { gird[6] = stock[a]; }
if (a % 8 == 7) { if (a % 8 == 7)
{
if (stock[a].Length < 3) { gird[7] = stock[a]; } if (stock[a].Length < 3) { gird[7] = stock[a]; }
else { gird[7] = stock[a].Substring(0, 10); } else { gird[7] = stock[a].Substring(0, 10); }
if (chk_stock(gird[0]) == true) { if (chk_stock(gird[0]) == true)
{
dataGridView1.Rows.Add(gird); dataGridView1.Rows.Add(gird);
} }
} }

View File

@@ -9,6 +9,7 @@ using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Drawing.Printing; using System.Drawing.Printing;
using System.IO; using System.IO;
using AR;
namespace UniMarc namespace UniMarc
{ {
@@ -91,7 +92,7 @@ namespace UniMarc
private void btn_print_Click(object sender, EventArgs e) // 인쇄 기능 private void btn_print_Click(object sender, EventArgs e) // 인쇄 기능
{ {
if (dataGridView1.Rows.Count < 1) { if (dataGridView1.Rows.Count < 1) {
MessageBox.Show("인쇄할 목록이 없습니다!"); UTIL.MsgE("인쇄할 목록이 없습니다!");
return; return;
} }
// 여백 설정 // 여백 설정

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -246,7 +247,7 @@ namespace UniMarc
string U_cmd = db.More_Update(table, Edit_col, Edit_Data, Search_col, Search_Data); string U_cmd = db.More_Update(table, Edit_col, Edit_Data, Search_col, Search_Data);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
} }
MessageBox.Show("저장되었습니다."); UTIL.MsgI("저장되었습니다.");
} }
private void btn_process_Click(object sender, EventArgs e) // 완료처리 private void btn_process_Click(object sender, EventArgs e) // 완료처리
{ {
@@ -277,7 +278,7 @@ namespace UniMarc
U_cmd = db.More_Update("Obj_List", Edit_col, Edit_data, Search_col, Search_data); U_cmd = db.More_Update("Obj_List", Edit_col, Edit_data, Search_col, Search_data);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
MessageBox.Show("정상적으로 완료처리 되었습니다."); UTIL.MsgI("정상적으로 완료처리 되었습니다.");
} }
/// <summary> /// <summary>
/// 목록도서DB 내용을 들고와서 SalesDB에 출고율을 추가하여 집어넣는다. /// 목록도서DB 내용을 들고와서 SalesDB에 출고율을 추가하여 집어넣는다.

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -63,7 +64,7 @@ namespace UniMarc
Area, "날짜", start, end, gu, compidx ); Area, "날짜", start, end, gu, compidx );
//string cmd = db.Search_Date("Send_Order", Area, "날짜", set_date[0], set_date[1], compidx); //string cmd = db.Search_Date("Send_Order", Area, "날짜", set_date[0], set_date[1], compidx);
string Fax_Key_ary = db.DB_Send_CMD_Search(cmd); string Fax_Key_ary = db.DB_Send_CMD_Search(cmd);
MessageBox.Show(Fax_Key_ary); UTIL.MsgI(Fax_Key_ary);
string[] Fax_Key = Fax_Key_ary.Split('|'); string[] Fax_Key = Fax_Key_ary.Split('|');
input_Grid(Fax_Key); input_Grid(Fax_Key);
#endregion #endregion
@@ -212,10 +213,10 @@ namespace UniMarc
private static void DownloadFileCallBack(object sender, AsyncCompletedEventArgs e) private static void DownloadFileCallBack(object sender, AsyncCompletedEventArgs e)
{ {
if (e.Cancelled) if (e.Cancelled)
MessageBox.Show("File Download Cancelled"); UTIL.MsgE("File Download Cancelled");
if (e.Error != null) if (e.Error != null)
MessageBox.Show(e.Error.ToString()); UTIL.MsgE(e.Error.ToString());
} }
#endregion #endregion
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -281,7 +282,7 @@ namespace UniMarc
string U_cmd = db.More_Update("Obj_List_Book", edit_col, edit_data, sear_col, sear_data); string U_cmd = db.More_Update("Obj_List_Book", edit_col, edit_data, sear_col, sear_data);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
} }
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
} }
private void btn_close_Click(object sender, EventArgs e) private void btn_close_Click(object sender, EventArgs e)
{ {
@@ -406,7 +407,7 @@ namespace UniMarc
total[1] += Convert.ToInt32(dataGridView1.Rows[a].Cells["pay"].Value.ToString()); total[1] += Convert.ToInt32(dataGridView1.Rows[a].Cells["pay"].Value.ToString());
} }
} }
if (chkIdx.Count < 1) { MessageBox.Show("선택된 도서가 없습니다!"); return "false"; } if (chkIdx.Count < 1) { UTIL.MsgE("선택된 도서가 없습니다!"); return "false"; }
string[,] inputExcel = new string[chkIdx.Count, 7]; string[,] inputExcel = new string[chkIdx.Count, 7];
string pur = dataGridView1.Rows[chkIdx[0]].Cells["order"].Value.ToString(); string pur = dataGridView1.Rows[chkIdx[0]].Cells["order"].Value.ToString();
@@ -433,7 +434,7 @@ namespace UniMarc
} }
Excel_text ex = new Excel_text(); Excel_text ex = new Excel_text();
string filename = ex.mk_Excel_Order(inputExcel, total, compidx, pur, tb_PS.Text); string filename = ex.mk_Excel_Order(inputExcel, total, compidx, pur, tb_PS.Text);
MessageBox.Show("엑셀 반출 완료"); UTIL.MsgI("엑셀 반출 완료");
return filename; return filename;
} }
@@ -453,7 +454,7 @@ namespace UniMarc
{ {
if (dataGridView1.Rows[a].Cells["order"].Value.ToString() != over_lab) if (dataGridView1.Rows[a].Cells["order"].Value.ToString() != over_lab)
{ {
MessageBox.Show("주문처가 동일하지 않습니다!", "Error"); UTIL.MsgE("주문처가 동일하지 않습니다!");
return "false"; return "false";
} }
} }
@@ -592,7 +593,7 @@ namespace UniMarc
if (pur_data[1] == "") if (pur_data[1] == "")
{ {
MessageBox.Show("주문처의 팩스 번호가 비어있습니다!", "Error"); UTIL.MsgE("주문처의 팩스 번호가 비어있습니다!");
return false; return false;
} }
@@ -675,7 +676,7 @@ namespace UniMarc
if (st.isContainHangul(m_send)) if (st.isContainHangul(m_send))
{ {
MessageBox.Show("DB내 저장된 이메일이 사양과 다릅니다. 직접 입력해주세요."); UTIL.MsgE("DB내 저장된 이메일이 사양과 다릅니다. 직접 입력해주세요.");
Skill_Search_Text sst = new Skill_Search_Text(); Skill_Search_Text sst = new Skill_Search_Text();
string value = ""; string value = "";

View File

@@ -0,0 +1,123 @@
namespace UniMarc
{
partial class Order_input_Search2
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.charge = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.date = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.date_res = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.Disable;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.idx,
this.list_name,
this.charge,
this.date,
this.date_res});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 21;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(641, 215);
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);
//
// idx
//
this.idx.HeaderText = "idx";
this.idx.Name = "idx";
this.idx.Visible = false;
//
// list_name
//
this.list_name.HeaderText = "목록";
this.list_name.Name = "list_name";
this.list_name.Width = 300;
//
// charge
//
this.charge.HeaderText = "담당자";
this.charge.Name = "charge";
//
// date
//
this.date.HeaderText = "목록일자";
this.date.Name = "date";
//
// date_res
//
this.date_res.HeaderText = "완료일자";
this.date_res.Name = "date_res";
//
// Order_input_Search
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(641, 215);
this.Controls.Add(this.dataGridView1);
this.Name = "Order_input_Search";
this.Text = "Order_input_Search";
this.Load += new System.EventHandler(this.Order_input_Search_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn idx;
private System.Windows.Forms.DataGridViewTextBoxColumn list_name;
private System.Windows.Forms.DataGridViewTextBoxColumn charge;
private System.Windows.Forms.DataGridViewTextBoxColumn date;
private System.Windows.Forms.DataGridViewTextBoxColumn date_res;
}
}

View File

@@ -0,0 +1,202 @@
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 Order_input_Search2 : Form
{
Order_input oin;
Purchase_Book pb;
Remit_reg2 rem2;
Check_ISBN2 isbn;
Helper_DB db = new Helper_DB();
public int[] oin_grid_idx = { 0, 0 };
public string Where_Open;
public string searchText;
public bool OnlyMarc = false;
string compidx;
public Order_input_Search2(Order_input o_in)
{
InitializeComponent();
oin = o_in;
compidx = oin.compidx;
}
public Order_input_Search2(Remit_reg2 _rem2)
{
InitializeComponent();
rem2 = _rem2;
compidx = rem2.compidx;
searchText = rem2.tb_purchase.Text;
}
public Order_input_Search2(Purchase_Book _pb)
{
InitializeComponent();
pb = _pb;
compidx = pb.compidx;
searchText = pb.tb_purchase.Text;
}
public Order_input_Search2(Check_ISBN2 _isbn)
{
InitializeComponent();
isbn = _isbn;
compidx = isbn.compidx;
searchText = isbn.tb_list_name.Text;
}
public Order_input_Search2()
{
InitializeComponent();
}
private void Order_input_Search_Load(object sender, EventArgs e)
{
string cmd, db_res;
db.DBcon();
if (Where_Open == "book_list")
{
string table = "Obj_List";
string Area = "`idx`, `list_name`, `charge`, `date`, `date_res`";
cmd = string.Format("SELECT {0} FROM {1} WHERE `comp_num` = {2} AND `state` = \"진행\"", Area, table, compidx);
if (searchText != "")
{
cmd += " AND `list_name` like \"%" + searchText + "%\"";
// cmd = db.DB_Contains("Obj_List", compidx,
// "", "", "`list_name`, `charge`, `date`, `date_res`");
}
if (OnlyMarc)
{
cmd += " AND `chk_marc` > 0";
// cmd = db.DB_Contains("Obj_List", compidx,
// "list_name", searchText, "`list_name`, `charge`, `date`, `date_res`");
}
cmd += ";";
db_res = db.DB_Send_CMD_Search(cmd);
made_grid(db_res);
this.Text = "목록 검색";
}
else if (Where_Open.Contains("Order"))
{
list_name.HeaderText = "주문처";
charge.HeaderText = "대표자";
date.HeaderText = "종목";
date_res.HeaderText = "업태";
cmd = db.DB_Contains("Purchase", compidx,
"sangho", searchText, "`idx`, `sangho`, `boss`, `jongmok`, `uptae`");
db_res = db.DB_Send_CMD_Search(cmd);
made_grid(db_res);
this.Text = "주문처 검색";
}
}
private void made_grid(string strValue)
{
string[] data = strValue.Split('|');
dataGridView1.Rows.Clear();
string[] res = { "", "", "", "", "" };
for (int a = 0; a < data.Length; a++)
{
if (a % 5 == 0) { res[0] = data[a]; }
if (a % 5 == 1) { res[1] = data[a]; }
if (a % 5 == 2) { res[2] = data[a]; }
if (a % 5 == 3) { res[3] = data[a]; }
if (a % 5 == 4) { res[4] = data[a];
if (res[1].Contains(searchText))
dataGridView1.Rows.Add(res);
}
}
}
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter) {
if (dataGridView1.Rows.Count == 0)
return;
dataGridView1_CellDoubleClick(null, null);
}
if (e.KeyCode == Keys.Escape) { Close(); }
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
int row = 0;
if (Where_Open == "") { row = 0; }
else row = dataGridView1.CurrentCell.RowIndex;
if (e != null) { row = e.RowIndex; }
else row = dataGridView1.CurrentCell.RowIndex;
if (oin != null) {
oin_result(row);
}
else if (pb != null) {
pb_result(row);
}
else if (rem2 != null) {
rem2.tb_purchase.Text = dataGridView1.Rows[row].Cells["list_name"].Value.ToString();
rem2.mk_base(rem2.tb_purchase.Text);
}
else if (isbn != null) {
string listName = dataGridView1.Rows[row].Cells["list_name"].Value.ToString();
string l_idx = dataGridView1.Rows[row].Cells["idx"].Value.ToString();
isbn.tb_list_name.Text = listName;
isbn.DataLoad(listName, l_idx);
}
Close();
}
private void oin_result(int grididx)
{
if (Where_Open == "book_list")
{
string ListName = dataGridView1.Rows[grididx].Cells["list_name"].Value.ToString();
string DBdate = dataGridView1.Rows[grididx].Cells["date"].Value.ToString();
string[] tmp_col = { "compidx", "list_name", "date" };
string[] tmp_data = { compidx, ListName, DBdate };
string takedata = "`order`, `order_stat`, `isbn`, `book_name`, `author`, " +
"`book_comp`, `order_count`, `count`, `pay`, `total`, " +
"`etc`, `list_name`, `order_date`, `send_date`, `header`, " +
"`num`, `idx`";
string cmd = db.More_DB_Search("Obj_List_Book", tmp_col, tmp_data, takedata);
string db_res = db.DB_Send_CMD_Search(cmd);
oin.made_grid(db_res, false);
oin.tb_search_book_list.Text = ListName;
DateTime setDate = DateTime.ParseExact(DBdate, "yyyy-MM-dd", null);
oin.dtp_listBegin.Checked = true;
oin.dtp_listEnd.Checked = true;
oin.dtp_listBegin.Value = setDate;
oin.dtp_listEnd.Value = setDate;
}
else if (Where_Open.Contains("Order"))
{
if (Where_Open == "Order_Grid") {
oin.dataGridView1.Rows[oin_grid_idx[0]].Cells[oin_grid_idx[1]].Value =
dataGridView1.Rows[grididx].Cells["list_name"].Value.ToString();
}
else
{
try
{
oin.tb_orderText.Text = dataGridView1.Rows[grididx].Cells["list_name"].Value.ToString();
}
catch { }
}
}
}
private void pb_result(int grididx)
{
pb.tb_purchase.Text = dataGridView1.Rows[grididx].Cells["list_name"].Value.ToString();
pb.btn_Lookup_Click(null, null);
}
}
}

View File

@@ -0,0 +1,135 @@
<?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>
<metadata name="idx.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="list_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="charge.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="date_res.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -9,6 +9,7 @@ using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.IO; using System.IO;
using System.Windows.Forms.VisualStyles; using System.Windows.Forms.VisualStyles;
using AR;
namespace UniMarc namespace UniMarc
{ {
@@ -219,7 +220,7 @@ namespace UniMarc
} }
if (name == "dataGridView1" && col == 11) { if (name == "dataGridView1" && col == 11) {
if(tb_persent.Text == "") { if(tb_persent.Text == "") {
MessageBox.Show("매입율을 작성해주세요."); UTIL.MsgE("매입율을 작성해주세요.");
tb_persent.Focus(); tb_persent.Focus();
} }
else { else {
@@ -316,7 +317,7 @@ namespace UniMarc
} }
} }
} }
else { MessageBox.Show("임시 저장된 데이터가 없습니다.", "에러", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { UTIL.MsgE("임시 저장된 데이터가 없습니다."); }
} }
private void btn_lookup_Click(object sender, EventArgs e) private void btn_lookup_Click(object sender, EventArgs e)
{ {
@@ -429,7 +430,7 @@ namespace UniMarc
if (chk_stock.Checked == true) { if (chk_stock.Checked == true) {
if (stock_chk(isbn_chk) == true) { if (stock_chk(isbn_chk) == true) {
int inven_count = stock_count_chk(isbn_chk); int inven_count = stock_count_chk(isbn_chk);
MessageBox.Show(inven_count.ToString()); UTIL.MsgI(inven_count.ToString());
if (lbl_inven_count.Text == "0") { if (lbl_inven_count.Text == "0") {
lbl_inven_count.Text = "0"; lbl_inven_count.Text = "0";
inven_count = 0; inven_count = 0;
@@ -792,7 +793,7 @@ namespace UniMarc
{ {
string Incmd = db.DB_INSERT("Inven", input_col, input_data); string Incmd = db.DB_INSERT("Inven", input_col, input_data);
Helper_DB.ExcuteNonQuery(Incmd); Helper_DB.ExcuteNonQuery(Incmd);
MessageBox.Show("DB 새로 추가"); UTIL.MsgI("DB 새로 추가");
return; return;
} }
else else
@@ -802,7 +803,7 @@ namespace UniMarc
string[] cout = db_res.Split('|'); string[] cout = db_res.Split('|');
int count = Convert.ToInt32(cout[0]); int count = Convert.ToInt32(cout[0]);
count += data; count += data;
MessageBox.Show("DB 수정"); UTIL.MsgI("DB 수정");
string U_cmd = db.DB_Update("Inven", "count", count.ToString(), "idx", cout[0]); string U_cmd = db.DB_Update("Inven", "count", count.ToString(), "idx", cout[0]);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
} }
@@ -923,9 +924,9 @@ namespace UniMarc
{ {
string[] param = { "title", "publisher", "author", "priceStandard" }; string[] param = { "title", "publisher", "author", "priceStandard" };
API api = new API(); API api = new API();
string aladin = api.Aladin(isbn, "ISBN13", param); var aladinResult = api.Aladin(isbn, "ISBN13", param);
string[] insert = aladin.Split('|'); string[] insert = aladinResult.ToArray();// aladin.Split('|');
if (insert.Length < 2) { return; }; if (insert.Length < 2) { return; };
datagrid.Rows[row].Cells["book_name3"].Value = insert[0]; datagrid.Rows[row].Cells["book_name3"].Value = insert[0];
@@ -942,7 +943,7 @@ namespace UniMarc
} }
private void Purchase_FormClosing(object sender, FormClosingEventArgs e) private void Purchase_FormClosing(object sender, FormClosingEventArgs e)
{ {
if (MessageBox.Show("이대로 닫으시겠습니까?", "경고", MessageBoxButtons.YesNo) == DialogResult.No) if (UTIL.MsgQ("이대로 닫으시겠습니까?") != DialogResult.Yes)
{ {
// 로컬파일 생성. (C:\) // 로컬파일 생성. (C:\)
create_TempTxt(); create_TempTxt();

View File

@@ -29,7 +29,7 @@ namespace UniMarc
{ {
if (tCheckText == "") if (tCheckText == "")
{ {
MessageBox.Show("전화번호, 상호, 이메일, IP, 고유번호는 필수 입력 사항입니다."); UTIL.MsgE("전화번호, 상호, 이메일, IP, 고유번호는 필수 입력 사항입니다.");
return; return;
} }
} }
@@ -43,7 +43,7 @@ namespace UniMarc
string tResult = mDb.DB_Send_CMD_Search(tCmd); string tResult = mDb.DB_Send_CMD_Search(tCmd);
if (tResult != "") if (tResult != "")
{ {
MessageBox.Show("상호명이 중복되었습니다.\n다시 확인해주세요."); UTIL.MsgE("상호명이 중복되었습니다.\n다시 확인해주세요.");
return; return;
} }
@@ -52,7 +52,7 @@ namespace UniMarc
if (tResult != "") if (tResult != "")
{ {
MessageBox.Show("고유번호가 중복되었습니다.\n다시 확인해주세요."); UTIL.MsgE("고유번호가 중복되었습니다.\n다시 확인해주세요.");
return; return;
} }
@@ -86,7 +86,7 @@ namespace UniMarc
{ {
if (dgvList.CurrentCell == null || dgvList.CurrentCell.RowIndex < 0 || dgvList.SelectedRows.Count == 0) if (dgvList.CurrentCell == null || dgvList.CurrentCell.RowIndex < 0 || dgvList.SelectedRows.Count == 0)
{ {
MessageBox.Show("수정할 행을 선택해 주세요."); UTIL.MsgE("수정할 행을 선택해 주세요.");
return; return;
} }
string tText = string.Format("{0} 를 수정 하시겠습니까?", dgvList.SelectedRows[0].Cells["comp_name"].Value.ToString()); string tText = string.Format("{0} 를 수정 하시겠습니까?", dgvList.SelectedRows[0].Cells["comp_name"].Value.ToString());
@@ -116,7 +116,7 @@ namespace UniMarc
if (dgvList.CurrentCell == null || dgvList.CurrentCell.RowIndex < 0 || dgvList.SelectedRows.Count == 0) if (dgvList.CurrentCell == null || dgvList.CurrentCell.RowIndex < 0 || dgvList.SelectedRows.Count == 0)
{ {
MessageBox.Show("삭제할 행을 선택해 주세요."); UTIL.MsgE("삭제할 행을 선택해 주세요.");
return; return;
} }
string tText = string.Format("{0} 를 삭제 하시겠습니까?", dgvList.SelectedRows[0].Cells["comp_name"].Value.ToString()); string tText = string.Format("{0} 를 삭제 하시겠습니까?", dgvList.SelectedRows[0].Cells["comp_name"].Value.ToString());

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -32,10 +33,10 @@ namespace UniMarc
{ {
data = Doc.GetElementsByTagName("b")[a].InnerText; data = Doc.GetElementsByTagName("b")[a].InnerText;
richTextBox1.Text += data + "\n"; richTextBox1.Text += data + "\n";
MessageBox.Show(data); UTIL.MsgI(data);
} }
} }
MessageBox.Show(Doc.GetElementsByTagName("a").Count.ToString()); UTIL.MsgI(Doc.GetElementsByTagName("a").Count.ToString());
// < a href = "https://www.aladin.co.kr/shop/wproduct.aspx? // < a href = "https://www.aladin.co.kr/shop/wproduct.aspx?
// ItemId=248012843" class="bo3"> // ItemId=248012843" class="bo3">
// <b>무한도전 낱말퍼즐 : 과학</b> // <b>무한도전 낱말퍼즐 : 과학</b>

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -39,12 +40,12 @@ namespace UniMarc
if (ID == "") if (ID == "")
{ {
MessageBox.Show("ID칸이 비어있습니다!"); UTIL.MsgE("ID칸이 비어있습니다!");
return; return;
} }
if (!System.Text.RegularExpressions.Regex.IsMatch(ID, @"^[a-zA-Z0-9]")) if (!System.Text.RegularExpressions.Regex.IsMatch(ID, @"^[a-zA-Z0-9]"))
{ {
MessageBox.Show("영어와 숫자 조합으로 작성해주세요!"); UTIL.MsgE("영어와 숫자 조합으로 작성해주세요!");
isIDcheck = false; isIDcheck = false;
return; return;
} }
@@ -52,12 +53,12 @@ namespace UniMarc
string cmd = string.Format("SELECT * FROM `User_Data` WHERE `ID` = \"{0}\";", ID); string cmd = string.Format("SELECT * FROM `User_Data` WHERE `ID` = \"{0}\";", ID);
string res = db.DB_Send_CMD_Search(cmd); string res = db.DB_Send_CMD_Search(cmd);
if (res == "") { if (res == "") {
MessageBox.Show("사용가능한 이이디입니다. [" + ID + "]"); UTIL.MsgI("사용가능한 이이디입니다. [" + ID + "]");
isIDcheck = true; isIDcheck = true;
button1.ForeColor = Color.Blue; button1.ForeColor = Color.Blue;
} }
else { else {
MessageBox.Show("중복된 아이디입니다. [" + ID + "]"); UTIL.MsgE("중복된 아이디입니다. [" + ID + "]");
isIDcheck = false; isIDcheck = false;
} }
} }
@@ -77,7 +78,7 @@ namespace UniMarc
foreach (string CheckText in NeedText) foreach (string CheckText in NeedText)
{ {
if (CheckText == "") { if (CheckText == "") {
MessageBox.Show("노란 박스는 꼭 채워주세요!"); UTIL.MsgE("노란 박스는 꼭 채워주세요!");
return; return;
} }
} }
@@ -85,12 +86,12 @@ namespace UniMarc
string cmd_sanghoCheck = string.Format("SELECT * FROM `Comp` WHERE `comp_name` = \"{0}\"", tb_sangho.Text); string cmd_sanghoCheck = string.Format("SELECT * FROM `Comp` WHERE `comp_name` = \"{0}\"", tb_sangho.Text);
string res = db.DB_Send_CMD_Search(cmd_sanghoCheck); string res = db.DB_Send_CMD_Search(cmd_sanghoCheck);
if (res != "") { if (res != "") {
MessageBox.Show("상호명이 중복되었습니다.\n다시 확인해주세요."); UTIL.MsgE("상호명이 중복되었습니다.\n다시 확인해주세요.");
return; return;
} }
if (!isIDcheck) if (!isIDcheck)
{ {
MessageBox.Show("아이디 중복확인 먼저 진행해주세요."); UTIL.MsgE("아이디 중복확인 먼저 진행해주세요.");
return; return;
} }

View File

@@ -1,4 +1,5 @@
using SHDocVw; using AR;
using SHDocVw;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -101,10 +102,13 @@ namespace UniMarc
private void Btn_Memo_Click(object sender, EventArgs e) private void Btn_Memo_Click(object sender, EventArgs e)
{ {
Marc_memo memo = new Marc_memo(this); Marc_memo memo = new Marc_memo();
memo.StartPosition = FormStartPosition.Manual; memo.StartPosition = FormStartPosition.Manual;
memo.TopMost = true; memo.TopMost = true;
memo.Location = new Point(1018, 8); memo.Location = new Point(1018, 8);
memo.OnSave += (s1, e1) => {
this.richTextBox1.Text = e1.Data;
};
memo.Show(); memo.Show();
} }
@@ -217,12 +221,12 @@ namespace UniMarc
if (TagIndex == 1) if (TagIndex == 1)
{ {
MessageBox.Show("[칸채우기]가 아닌 [마크 작성] 탭에서 저장해주세요!"); UTIL.MsgE("[칸채우기]가 아닌 [마크 작성] 탭에서 저장해주세요!");
return; return;
} }
if (grade == 3 || grade == -1) if (grade == 3 || grade == -1)
{ {
MessageBox.Show("등급을 설정해주세요. (C 이상)"); UTIL.MsgE("등급을 설정해주세요. (C 이상)");
return; return;
} }
@@ -235,7 +239,7 @@ namespace UniMarc
if (!isPass(MarcText)) if (!isPass(MarcText))
{ {
MessageBox.Show("입력된 마크의 상태를 확인해주세요.", "isPass"); UTIL.MsgE("입력된 마크의 상태를 확인해주세요.");
return; return;
} }
@@ -274,7 +278,7 @@ namespace UniMarc
else else
InsertMarc(Table, BookData, orimarc, grade, tag056, date); InsertMarc(Table, BookData, orimarc, grade, tag056, date);
MessageBox.Show("저장되었습니다.", "저장"); UTIL.MsgI("저장되었습니다.");
} }
#region SaveSub #region SaveSub
@@ -428,7 +432,7 @@ namespace UniMarc
} }
if (!isTag) if (!isTag)
{ {
MessageBox.Show(msg + "태그가 없습니다."); UTIL.MsgE(msg + "태그가 없습니다.");
return false; return false;
} }
@@ -442,7 +446,7 @@ namespace UniMarc
} }
if (!is1XX) if (!is1XX)
{ {
MessageBox.Show("기본표목이 존재하지않습니다."); UTIL.MsgE("기본표목이 존재하지않습니다.");
return false; return false;
} }
@@ -460,7 +464,7 @@ namespace UniMarc
if (!is7XX) if (!is7XX)
{ {
MessageBox.Show("부출표목이 존재하지않습니다."); UTIL.MsgE("부출표목이 존재하지않습니다.");
return false; return false;
} }
@@ -569,13 +573,13 @@ namespace UniMarc
} }
else else
{ {
MessageBox.Show(string.Format("SplitError : {0}", string.Join("\t", DataSplit))); UTIL.MsgE(string.Format("SplitError : {0}", string.Join("\t", DataSplit)));
return false; return false;
} }
} }
else else
{ {
MessageBox.Show(string.Format("DataError : {0}", Data)); UTIL.MsgE(string.Format("DataError : {0}", Data));
return false; return false;
} }
} }
@@ -773,7 +777,7 @@ namespace UniMarc
if (pubDate.Length < 3) if (pubDate.Length < 3)
{ {
MessageBox.Show("260c가 인식되지않습니다."); UTIL.MsgE("260c가 인식되지않습니다.");
return "false"; return "false";
} }
else if (pubDate.Length < 5) else if (pubDate.Length < 5)
@@ -802,7 +806,7 @@ namespace UniMarc
if (res == "") if (res == "")
{ {
MessageBox.Show("260a가 인식되지않습니다."); UTIL.MsgE("260a가 인식되지않습니다.");
return "false"; return "false";
} }
else if (res.Length < 3) else if (res.Length < 3)
@@ -2677,7 +2681,7 @@ namespace UniMarc
} }
catch(Exception ex) catch(Exception ex)
{ {
MessageBox.Show("데이터가 올바르지않습니다.\n245d를 확인해주세요.\n" + ex.ToString()); UTIL.MsgE("데이터가 올바르지않습니다.\n245d를 확인해주세요.\n" + ex.ToString());
} }
} }
#region #region

View File

@@ -29,41 +29,57 @@ namespace UniMarc
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
this.btn_close = new System.Windows.Forms.Button(); this.btSaveNew = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel(); this.Btn_SearchKolis = new System.Windows.Forms.Button();
this.cb_SearchCol = new System.Windows.Forms.ComboBox(); this.cb_SearchCol = new System.Windows.Forms.ComboBox();
this.btn_Empty = new System.Windows.Forms.Button();
this.tb_Search = new System.Windows.Forms.TextBox(); this.tb_Search = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.Btn_SearchKolis = new System.Windows.Forms.Button(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.btn_Empty = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button();
this.marcEditorControl1 = new MarcEditorControl(); this.panel5 = new System.Windows.Forms.Panel();
this.panel1.SuspendLayout(); this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.rtEtc1 = new System.Windows.Forms.RichTextBox();
this.rtEtc2 = new System.Windows.Forms.RichTextBox();
this.panel6 = new System.Windows.Forms.Panel();
this.btSave = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel();
this.lbl_Midx = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.button1 = new System.Windows.Forms.Button();
this.lbl_SaveData = new System.Windows.Forms.TextBox();
this.marcEditorControl1 = new UniMarc.MarcEditorControl();
this.uC_SelectGrade1 = new UniMarc.UC_SelectGrade();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.panel5.SuspendLayout();
this.tableLayoutPanel1.SuspendLayout();
this.panel6.SuspendLayout();
this.panel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// btn_close // btSaveNew
// //
this.btn_close.Location = new System.Drawing.Point(1168, 3); this.btSaveNew.Location = new System.Drawing.Point(92, 8);
this.btn_close.Name = "btn_close"; this.btSaveNew.Name = "btSaveNew";
this.btn_close.Size = new System.Drawing.Size(77, 23); this.btSaveNew.Size = new System.Drawing.Size(84, 33);
this.btn_close.TabIndex = 381; this.btSaveNew.TabIndex = 398;
this.btn_close.Text = "닫 기"; this.btSaveNew.Text = "새로추가";
this.btn_close.UseVisualStyleBackColor = true; this.btSaveNew.UseVisualStyleBackColor = true;
this.btn_close.Click += new System.EventHandler(this.btn_close_Click); this.btSaveNew.Click += new System.EventHandler(this.btn_Save_Click);
// //
// panel1 // Btn_SearchKolis
// //
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.Btn_SearchKolis.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Controls.Add(this.Btn_SearchKolis); this.Btn_SearchKolis.Location = new System.Drawing.Point(132, 3);
this.panel1.Controls.Add(this.cb_SearchCol); this.Btn_SearchKolis.Name = "Btn_SearchKolis";
this.panel1.Controls.Add(this.btn_Empty); this.Btn_SearchKolis.Size = new System.Drawing.Size(123, 39);
this.panel1.Controls.Add(this.tb_Search); this.Btn_SearchKolis.TabIndex = 397;
this.panel1.Controls.Add(this.btn_close); this.Btn_SearchKolis.Text = "코리스 검색";
this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.Btn_SearchKolis.UseVisualStyleBackColor = true;
this.panel1.Location = new System.Drawing.Point(0, 0); this.Btn_SearchKolis.Click += new System.EventHandler(this.Btn_SearchKolis_Click);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1324, 32);
this.panel1.TabIndex = 393;
// //
// cb_SearchCol // cb_SearchCol
// //
@@ -74,84 +90,272 @@ namespace UniMarc
"서명", "서명",
"저자", "저자",
"출판사"}); "출판사"});
this.cb_SearchCol.Location = new System.Drawing.Point(8, 5); this.cb_SearchCol.Location = new System.Drawing.Point(11, 20);
this.cb_SearchCol.Name = "cb_SearchCol"; this.cb_SearchCol.Name = "cb_SearchCol";
this.cb_SearchCol.Size = new System.Drawing.Size(121, 20); this.cb_SearchCol.Size = new System.Drawing.Size(238, 20);
this.cb_SearchCol.TabIndex = 395; this.cb_SearchCol.TabIndex = 395;
// //
// tb_Search
//
this.tb_Search.Location = new System.Drawing.Point(135, 5);
this.tb_Search.Name = "tb_Search";
this.tb_Search.Size = new System.Drawing.Size(205, 21);
this.tb_Search.TabIndex = 0;
this.tb_Search.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_ISBN_KeyDown);
//
// panel2
//
this.panel2.Controls.Add(this.marcEditorControl1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 32);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1324, 907);
this.panel2.TabIndex = 394;
//
// Btn_SearchKolis
//
this.Btn_SearchKolis.Location = new System.Drawing.Point(1002, 3);
this.Btn_SearchKolis.Name = "Btn_SearchKolis";
this.Btn_SearchKolis.Size = new System.Drawing.Size(77, 23);
this.Btn_SearchKolis.TabIndex = 397;
this.Btn_SearchKolis.Text = "코리스 검색";
this.Btn_SearchKolis.UseVisualStyleBackColor = true;
this.Btn_SearchKolis.Click += new System.EventHandler(this.Btn_SearchKolis_Click);
//
// btn_Empty // btn_Empty
// //
this.btn_Empty.Location = new System.Drawing.Point(1085, 3); this.btn_Empty.Dock = System.Windows.Forms.DockStyle.Fill;
this.btn_Empty.Location = new System.Drawing.Point(3, 3);
this.btn_Empty.Name = "btn_Empty"; this.btn_Empty.Name = "btn_Empty";
this.btn_Empty.Size = new System.Drawing.Size(77, 23); this.btn_Empty.Size = new System.Drawing.Size(123, 39);
this.btn_Empty.TabIndex = 396; this.btn_Empty.TabIndex = 396;
this.btn_Empty.Text = "비 우 기"; this.btn_Empty.Text = "비 우 기";
this.btn_Empty.UseVisualStyleBackColor = true; this.btn_Empty.UseVisualStyleBackColor = true;
this.btn_Empty.Click += new System.EventHandler(this.btn_Empty_Click); this.btn_Empty.Click += new System.EventHandler(this.btn_Empty_Click);
// //
// tb_Search
//
this.tb_Search.Location = new System.Drawing.Point(11, 47);
this.tb_Search.Name = "tb_Search";
this.tb_Search.Size = new System.Drawing.Size(188, 21);
this.tb_Search.TabIndex = 0;
this.tb_Search.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_ISBN_KeyDown);
//
// panel2
//
this.panel2.Controls.Add(this.groupBox1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Left;
this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2";
this.panel2.Padding = new System.Windows.Forms.Padding(8);
this.panel2.Size = new System.Drawing.Size(277, 939);
this.panel2.TabIndex = 394;
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button2);
this.groupBox1.Controls.Add(this.cb_SearchCol);
this.groupBox1.Controls.Add(this.tb_Search);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Location = new System.Drawing.Point(8, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(261, 79);
this.groupBox1.TabIndex = 408;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "마크 검색";
//
// button2
//
this.button2.Location = new System.Drawing.Point(205, 46);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(45, 22);
this.button2.TabIndex = 405;
this.button2.Text = "검색";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// panel5
//
this.panel5.Controls.Add(this.tableLayoutPanel1);
this.panel5.Controls.Add(this.panel6);
this.panel5.Dock = System.Windows.Forms.DockStyle.Right;
this.panel5.Location = new System.Drawing.Point(1306, 0);
this.panel5.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(268, 939);
this.panel5.TabIndex = 395;
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel1.Controls.Add(this.rtEtc1, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.rtEtc2, 0, 1);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 455);
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(268, 484);
this.tableLayoutPanel1.TabIndex = 0;
//
// rtEtc1
//
this.rtEtc1.BackColor = System.Drawing.SystemColors.ScrollBar;
this.rtEtc1.Dock = System.Windows.Forms.DockStyle.Fill;
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(262, 236);
this.rtEtc1.TabIndex = 32;
this.rtEtc1.Text = "Remark1";
this.rtEtc1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.rtEtc1_KeyDown);
//
// rtEtc2
//
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, 245);
this.rtEtc2.Name = "rtEtc2";
this.rtEtc2.Size = new System.Drawing.Size(262, 236);
this.rtEtc2.TabIndex = 32;
this.rtEtc2.Text = "Remark2";
this.rtEtc2.KeyDown += new System.Windows.Forms.KeyEventHandler(this.rtEtc1_KeyDown);
//
// 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.btSaveNew);
this.panel6.Controls.Add(this.lbl_SaveData);
this.panel6.Dock = System.Windows.Forms.DockStyle.Top;
this.panel6.Location = new System.Drawing.Point(0, 0);
this.panel6.Name = "panel6";
this.panel6.Padding = new System.Windows.Forms.Padding(5);
this.panel6.Size = new System.Drawing.Size(268, 455);
this.panel6.TabIndex = 1;
//
// btSave
//
this.btSave.Location = new System.Drawing.Point(6, 8);
this.btSave.Name = "btSave";
this.btSave.Size = new System.Drawing.Size(84, 33);
this.btSave.TabIndex = 411;
this.btSave.Text = "수정";
this.btSave.UseVisualStyleBackColor = true;
this.btSave.Click += new System.EventHandler(this.btSave_Click);
//
// panel1
//
this.panel1.Controls.Add(this.lbl_Midx);
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(8, 50);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(250, 65);
this.panel1.TabIndex = 410;
//
// lbl_Midx
//
this.lbl_Midx.BackColor = System.Drawing.Color.Tomato;
this.lbl_Midx.Dock = System.Windows.Forms.DockStyle.Fill;
this.lbl_Midx.Font = new System.Drawing.Font("돋움체", 11.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.lbl_Midx.Location = new System.Drawing.Point(0, 27);
this.lbl_Midx.Name = "lbl_Midx";
this.lbl_Midx.Size = new System.Drawing.Size(250, 38);
this.lbl_Midx.TabIndex = 409;
this.lbl_Midx.Text = "신규 데이터";
this.lbl_Midx.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label1
//
this.label1.BackColor = System.Drawing.Color.White;
this.label1.Dock = System.Windows.Forms.DockStyle.Top;
this.label1.Location = new System.Drawing.Point(0, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(250, 27);
this.label1.TabIndex = 408;
this.label1.Text = "MARC INDEX";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Controls.Add(this.btn_Empty, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.Btn_SearchKolis, 1, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.tableLayoutPanel2.Location = new System.Drawing.Point(5, 405);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(258, 45);
this.tableLayoutPanel2.TabIndex = 407;
//
// button1
//
this.button1.Location = new System.Drawing.Point(179, 8);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(79, 33);
this.button1.TabIndex = 404;
this.button1.Text = "닫기";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// lbl_SaveData
//
this.lbl_SaveData.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.lbl_SaveData.ForeColor = System.Drawing.Color.Black;
this.lbl_SaveData.Location = new System.Drawing.Point(8, 154);
this.lbl_SaveData.Multiline = true;
this.lbl_SaveData.Name = "lbl_SaveData";
this.lbl_SaveData.Size = new System.Drawing.Size(255, 244);
this.lbl_SaveData.TabIndex = 319;
this.lbl_SaveData.Text = "[] []";
//
// marcEditorControl1 // marcEditorControl1
// //
this.marcEditorControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.marcEditorControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.marcEditorControl1.Font = new System.Drawing.Font("돋움", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); this.marcEditorControl1.Font = new System.Drawing.Font("돋움", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.marcEditorControl1.Location = new System.Drawing.Point(0, 0); this.marcEditorControl1.Location = new System.Drawing.Point(277, 0);
this.marcEditorControl1.Name = "marcEditorControl1"; this.marcEditorControl1.Name = "marcEditorControl1";
this.marcEditorControl1.Size = new System.Drawing.Size(1324, 907); this.marcEditorControl1.Size = new System.Drawing.Size(1029, 939);
this.marcEditorControl1.TabIndex = 394; 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 // AddMarc2
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.Gray; this.BackColor = System.Drawing.Color.Gray;
this.ClientSize = new System.Drawing.Size(1324, 939); this.ClientSize = new System.Drawing.Size(1574, 939);
this.Controls.Add(this.marcEditorControl1);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel5);
this.Name = "AddMarc2"; this.Name = "AddMarc2";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "마크 작성(2-New)"; this.Text = "마크 작성(2-New)";
this.Load += new System.EventHandler(this.AddMarc_Load); this.Load += new System.EventHandler(this.AddMarc_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false); this.panel2.ResumeLayout(false);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel5.ResumeLayout(false);
this.tableLayoutPanel1.ResumeLayout(false);
this.panel6.ResumeLayout(false);
this.panel6.PerformLayout();
this.panel1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
#endregion #endregion
private System.Windows.Forms.Button btn_close;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2; private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.TextBox tb_Search; private System.Windows.Forms.TextBox tb_Search;
private System.Windows.Forms.ComboBox cb_SearchCol; private System.Windows.Forms.ComboBox cb_SearchCol;
private System.Windows.Forms.Button btn_Empty; private System.Windows.Forms.Button btn_Empty;
private System.Windows.Forms.Button Btn_SearchKolis; private System.Windows.Forms.Button Btn_SearchKolis;
private MarcEditorControl marcEditorControl1; private MarcEditorControl marcEditorControl1;
private System.Windows.Forms.Button btSaveNew;
private System.Windows.Forms.Panel panel5;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
public System.Windows.Forms.RichTextBox rtEtc1;
public System.Windows.Forms.RichTextBox rtEtc2;
private System.Windows.Forms.Panel panel6;
private System.Windows.Forms.TextBox lbl_SaveData;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label lbl_Midx;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btSave;
private UC_SelectGrade uC_SelectGrade1;
} }
} }

View File

@@ -1,4 +1,5 @@
using SHDocVw; using AR;
using SHDocVw;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -22,90 +23,55 @@ namespace UniMarc
public AddMarc2(Main _m) public AddMarc2(Main _m)
{ {
InitializeComponent(); InitializeComponent();
db.DBcon();
marcEditorControl1.db = this.db;
m = _m; m = _m;
} }
private void AddMarc_Load(object sender, EventArgs e) private void AddMarc_Load(object sender, EventArgs e)
{ {
cb_SearchCol.SelectedIndex = 0; cb_SearchCol.SelectedIndex = 0;
db.DBcon();
TextReset(); TextReset();
marcEditorControl1.db = this.db;
marcEditorControl1.BookSaved += MarcEditorControl1_BookSaved; this.KeyPreview = true;
marcEditorControl1.CloseButton += (s1,e1)=> { this.Close(); }; uC_SelectGrade1.GradeName = "D";
marcEditorControl1.SetButtonKolist(false);
marcEditorControl1.SetButtonNext(false); }
marcEditorControl1.SetButtonPrev(false);
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.F9)
{
btn_Save_Click(this, EventArgs.Empty);
return true;
}
return base.ProcessCmdKey(ref msg, keyData);
} }
public void SetKolisValueApply(string marc) public void SetKolisValueApply(string marc)
{ {
this.marcEditorControl1.SetMarcString(marc); this.marcEditorControl1.SetMarcString(marc);
} }
private void MarcEditorControl1_BookSaved(object sender, MarcEditorControl.BookSavedEventArgs e)
{
string tag056 = Tag056(e.DBMarc, e.Param);
string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
string orimarc = st.made_Ori_marc(e.DBMarc).Replace(@"\", "₩");
if (!isMustTag(orimarc))
{
return;
}
var MarcText = e.DBMarc;
string midx = this.lbl_Midx;
string[] BookData = GetBookData(MarcText);
bool IsCoverDate = false;
if (e.Param.SaveDate != "")
{
// 마지막 수정일로부터 2일이 지났는지, 마지막 저장자가 사용자인지 확인
TimeSpan sp = CheckDate(e.Param.SaveDate, date);
IsCoverDate = IsCoverData(sp.Days, e.Param.User);
//if (IsCoverDate)
// etc2.Text = etc2.Text.Replace(SaveData[0], date);
}
//else
// etc2.Text += string.Format("{0}\t{1}\n", date, mUserName);
string Table = "Marc";
bool isUpdate;
if (lbl_Midx != "")
isUpdate = true;
else
isUpdate = false;
var grade = int.Parse(e.Param.Grade);
if (isUpdate)
UpdateMarc(Table, midx, orimarc, grade, tag056, date, IsCoverDate,e.Param);
else
InsertMarc(Table, BookData, orimarc, grade, tag056, date, e.Param);
MessageBox.Show("저장되었습니다.", "저장");
}
private void tb_ISBN_KeyDown(object sender, KeyEventArgs e) private void tb_ISBN_KeyDown(object sender, KeyEventArgs e)
{ {
if (e.KeyCode != Keys.Enter) if (e.KeyCode != Keys.Enter)
return; return;
searchMarc();
}
void searchMarc()
{
TextReset(); TextReset();
string SearchText = tb_Search.Text; string SearchText = tb_Search.Text;
string SearchCol = cb_SearchCol.SelectedItem.ToString(); string SearchCol = cb_SearchCol.SelectedItem.ToString();
var mcs = new MarcCopySelect2(this); using (var mcs = new MarcCopySelect2(SearchCol, SearchText))
mcs.Init(SearchCol, SearchText); if (mcs.ShowDialog() == DialogResult.OK)
mcs.Show(); {
}
/// <summary>
/// ISBN 검색후 특정 마크 선택시 현재폼에 적용시키는 폼
/// </summary>
/// <param name="Marc">뷰형태 마크데이터</param>
/// <param name="ISBN">ISBN</param>
/// <param name="GridData">
/// 0:idx <br></br> /// 0:idx <br></br>
/// 1:compidx <br></br> /// 1:compidx <br></br>
/// 2:user <br></br> /// 2:user <br></br>
@@ -113,27 +79,42 @@ namespace UniMarc
/// 4:grade <br></br> /// 4:grade <br></br>
/// 5:tag008 <br></br> /// 5:tag008 <br></br>
/// 6:LineMarc</param> /// 6:LineMarc</param>
public void SelectMarc_Sub(string Marc, string ISBN, string[] GridData) var selected = mcs.SelectedItem;
var defMarc = PUB.MakeEmptyMarc(selected.ISBN, "BookName", "Author", "Publisher", 0);
this.marcEditorControl1.LoadBookData(selected.marc_db, selected.ISBN, defMarc);
mOldMarc = selected.marc_db;
if (selected.compidx != PUB.user.CompanyIdx)
{ {
this.marcEditorControl1.LoadBookData(Marc, new MacEditorParameter UTIL.MsgI($"다른 기관의 데이터 입니다\n신규 등록모드로 실행됩니다.\n\n필요한 경우 입력일자를 업데이트하세요");
{ this.lbl_Midx.Text = "신규등록";// ".idx;
ISBN13 = ISBN, this.lbl_Midx.Tag = null;
SaveDate = string.Format("[{0}] [{1}]", GridData[2], GridData[3]), this.lbl_Midx.BackColor = Color.Tomato;
Grade = GridData[4], }
Remark1 = string.Empty, else
Remark2 = string.Empty, {
NewMake = true this.lbl_Midx.Text = selected.idx.ToString();
}); this.lbl_Midx.Tag = selected.idx;
mOldMarc = GridData[6]; this.lbl_Midx.BackColor = Color.Lime;
lbl_Midx = GridData[0];
} }
string lbl_Midx = "";
private void btn_close_Click(object sender, EventArgs e) //가져온 등급으로 변경해준다.
{ //if (selected.Grade == "0") radA.Checked = true;
this.Close(); //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;
rtEtc2.Text = selected.remark2;
} }
}
private void btn_Empty_Click(object sender, EventArgs e) private void btn_Empty_Click(object sender, EventArgs e)
{ {
@@ -149,17 +130,18 @@ namespace UniMarc
{ {
if (isDelete) if (isDelete)
{ {
marcEditorControl1.LoadBookData(string.Empty, new MacEditorParameter var isbn = $"※{DateTime.Now.ToString("yyMMddhhmmss")}";
{ var emptryMarc = PUB.MakeEmptyMarc(isbn, "title", "author", "publisher", 0);
ISBN13 = string.Empty, var emptymarc = TextResetSub();
SaveDate = string.Empty, marcEditorControl1.LoadBookData(string.Empty, isbn, defaultMarc: emptryMarc);
Remark1 = string.Empty,
Remark2 = string.Empty, this.rtEtc1.Text = string.Empty;
NewMake=true, this.rtEtc2.Text = string.Empty;
});
lbl_Midx.Tag = null;
lbl_Midx.Text = "신규작성";
lbl_Midx.BackColor = Color.Tomato;
} }
} }
string TextResetSub() string TextResetSub()
@@ -202,366 +184,149 @@ namespace UniMarc
"700\t \t▼a▲\n" + "700\t \t▼a▲\n" +
"950\t \t▼b▲\n"); "950\t \t▼b▲\n");
this.marcEditorControl1.SetRemark(string.Empty, string.Empty);
return Empty_text; return Empty_text;
} }
#region SaveSub
/// <summary> /// <summary>
/// 마크DB에 UPDATE해주는 함수 /// 마크DB에 UPDATE해주는 함수
/// </summary> /// </summary>
/// <param name="Table">테이블 이름</param> /// <param name="Table">테이블 이름</param>
/// <param name="MarcIndex">마크 인덱스 번호</param> /// <param name="MarcIndex">마크 인덱스 번호</param>
/// <param name="oriMarc">한줄짜리 마크</param> /// <param name="FullMarc">한줄짜리 마크</param>
/// <param name="grade">마크 등급</param> /// <param name="grade">마크 등급</param>
/// <param name="tag056">분류기호</param> /// <param name="tag056">분류기호</param>
/// <param name="date">저장시각 yyyy-MM-dd HH:mm:ss</param> /// <param name="v_date">저장시각 yyyy-MM-dd HH:mm:ss</param>
/// <param name="IsCovertDate">덮어씌울지 유무</param> void UpdateMarc(string MarcIndex, string FullMarc, string grade)
void UpdateMarc(string Table, string MarcIndex, string oriMarc, int grade, string tag056, string date, bool IsCovertDate, MacEditorParameter param)
{ {
string[] EditTable = int targetMarcIdx = 0;
{ int.TryParse(MarcIndex, out targetMarcIdx);
"compidx", "marc", "marc_chk","marc1", "marc_chk1", "비고1", int targetGrade = 2;
"비고2", "division", "008tag", "date", "user", if (int.TryParse(grade, out int parsedGrade)) targetGrade = parsedGrade;
"grade"
};
string[] EditColumn =
{
PUB.user.CompanyIdx, oriMarc, "1",mOldMarc, "0", param.Remark1,
param.Remark2, tag056, param.text008, date, PUB.user.UserName,
grade.ToString()
};
string[] SearchTable = { "idx", "compidx" };
string[] SearchColumn = { MarcIndex, PUB.user.CompanyIdx };
//int marcChk = subMarcChk(Table, MarcIndex); // 3. 공통 저장 메서드 호출
//if (IsCovertDate) var saveResult = Helper_DB.UpdateMarc(targetMarcIdx, FullMarc, targetGrade, rtEtc1.Text.Trim(), rtEtc2.Text.Trim(), "", mOldMarc);
// marcChk--;
//switch (marcChk) if (saveResult.result == false)
//{ {
// case 0: UTIL.MsgE(saveResult.message);
// EditTable[1] = "marc1"; return;
// EditTable[2] = "marc_chk1";
// EditTable[3] = "marc_chk";
// break;
// case 1:
// EditTable[1] = "marc2";
// EditTable[2] = "marc_chk2";
// EditTable[3] = "marc_chk1";
// break;
// case 2:
// EditTable[1] = "marc";
// EditTable[2] = "marc_chk";
// EditTable[3] = "marc_chk2";
// break;
// default:
// EditTable[1] = "marc";
// EditTable[2] = "marc_chk";
// EditTable[3] = "marc_chk2";
// break;
//}
string UpCMD = db.More_Update(Table, EditTable, EditColumn, SearchTable, SearchColumn);
PUB.log.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, UpCMD.Replace("\r", " ").Replace("\n", " ")));
Helper_DB.ExcuteNonQuery(UpCMD);
} }
/// <summary> // 4. UI 결과 반영
/// 마크DB에 INSERT해주는 함수 if (MarcIndex.isEmpty())
/// </summary>
/// <param name="Table">테이블 이름</param>
/// <param name="BookData">0:ISBN 1:서명 2:저자 3:출판사 4:정가</param>
/// <param name="oriMarc">한줄짜리 마크</param>
/// <param name="grade">마크 등급</param>
/// <param name="tag056">분류기호</param>
/// <param name="date">저장시각 yyyy-MM-dd HH:mm:ss</param>
void InsertMarc(string Table, string[] BookData, string oriMarc, int grade, string tag056, string date, MacEditorParameter param)
{ {
string[] InsertTable = lbl_Midx.Tag = saveResult.newidx.ToString();
{ lbl_Midx.Text = saveResult.newidx.ToString();
"ISBN", "서명", "저자", "출판사", "가격", lbl_Midx.BackColor = Color.Lime; // 저장 성공 후 색상 변경 (AddMarc2 특화)
"marc", "비고1", "비고2", "grade", "marc_chk", UTIL.MsgI($"저장 완료\n\nIDX:{saveResult.newidx}");
"user", "division", "008tag", "date", "compidx"
};
string[] InsertColumn =
{
BookData[0], BookData[1], BookData[2], BookData[3], BookData[4],
oriMarc, param.Remark1, param.Remark2, grade.ToString(), "1",
PUB.user.UserName, tag056, param.text008, date, PUB.user.CompanyIdx
};
string InCMD = db.DB_INSERT(Table, InsertTable, InsertColumn);
PUB.log.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, InCMD.Replace("\r", " ").Replace("\n", " ")));
Helper_DB.ExcuteNonQuery(InCMD);
}
/// <summary>
/// 마크 저장시 사용하며, 마지막 수정일과 수정자를 가져와 덮어씌울지 백업데이터를 만들지 구분
/// </summary>
/// <param name="TimeSpanDaysValue">저장할 마크의 마지막 수정일</param>
/// <param name="user">저장할 마크의 마지막 수정자</param>
/// <returns>마지막 수정일로부터 2일이 지나지 않고, 마지막 수정자와 해당 유저가 동일 할 경우 True 반환</returns>
private bool IsCoverData(int TimeSpanDaysValue, string user)
{
if (TimeSpanDaysValue < -1)
return false;
if (user != PUB.user.UserName)
return false;
return true;
}
private TimeSpan CheckDate(string LastDate, string SaveDate)
{
DateTime Last = Convert.ToDateTime(LastDate);
DateTime Save = Convert.ToDateTime(SaveDate);
return Last - Save;
}
/// <summary>
/// 필수태그 검사
/// </summary>
/// <param name="orimarc">한줄짜리 마크</param>
/// <returns>필수태그 없을시 false 반환</returns>
private bool isMustTag(string orimarc)
{
string[] SearchTag = { "056a", "0562", "245a", "245d", "260a", "260c", "300a", "300c", "653a" };
string[] Tag = st.Take_Tag(orimarc, SearchTag);
int count = 0;
string msg = "";
bool isTag = true;
foreach (string tag in Tag)
{
if (tag == "")
{
msg += SearchTag[count] + " ";
isTag = false;
}
count++;
}
if (!isTag)
{
MessageBox.Show(msg + "태그가 없습니다.");
return false;
}
bool is1XX = false;
string[] AuthorTag = { "100a", "110a", "111a" };
Tag = st.Take_Tag(orimarc, AuthorTag);
foreach (string author in Tag)
{
if (author != "")
is1XX = true;
}
if (!is1XX)
{
MessageBox.Show("기본표목이 존재하지않습니다.");
return false;
}
bool is7XX = false;
AuthorTag[0] = "700a";
AuthorTag[1] = "710a";
AuthorTag[2] = "711a";
Tag = st.Take_Tag(orimarc, AuthorTag);
foreach (string author in Tag)
{
if (author != "")
is7XX = true;
}
if (!is7XX)
{
MessageBox.Show("부출표목이 존재하지않습니다.");
return false;
}
return true;
}
/// <summary>
/// 관련 도서 정보를 가져옴
/// </summary>
/// <param name="ViewMarc">뷰형태의 마크</param>
/// <returns>0:ISBN 1:서명 2:저자 3:출판사 4:정가</returns>
string[] GetBookData(string ViewMarc)
{
// ISBN, BookName, Author, BookComp, Price
string[] result = { "", "", "", "", "" };
bool IsISBN = false;
string[] TargetArr = ViewMarc.Split('\n');
foreach (string Target in TargetArr)
{
string[] tmp = Target.Replace("▲", "").Split('\t');
// 0:ISBN 4:Price
if (tmp[0] == "020" && !IsISBN)
{
IsISBN = true;
result[0] = GetMiddelString(tmp[2], "▼a", "▼");
result[4] = GetMiddelString(tmp[2], "▼c", "▼");
}
// 2:Author
if (tmp[0] == "100")
result[2] = GetMiddelString(tmp[2], "▼a", "▼");
else if (tmp[0] == "110")
result[2] = GetMiddelString(tmp[2], "▼a", "▼");
else if (tmp[0] == "111")
result[2] = GetMiddelString(tmp[2], "▼a", "▼");
// 1:BookName
if (tmp[0] == "245")
result[1] = GetMiddelString(tmp[2], "▼a", "▼");
// 3:BookComp
if (tmp[0] == "300")
result[3] = GetMiddelString(tmp[2], "▼b", "▼");
}
return result;
}
string Tag056(string marc,MacEditorParameter param)
{
// string marc = richTextBox1.Text;
string[] temp = marc.Split('\n');
List<string> target = temp.ToList();
bool isEight = false;
bool eight_chk = false;
string tag056 = string.Empty;
int count = 0;
for (int a = 0; a < target.Count - 1; a++)
{
string[] tmp = target[a].Split('\t');
string tag = tmp[0];
if (tag == "") break;
int eight = Convert.ToInt32(tag.Substring(0, 3));
if (eight == 008)
{
count = a;
eight_chk = true;
isEight = true;
}
else if (eight > 008 && !eight_chk)
{
count = a;
eight_chk = true;
}
if (tag == "056")
tag056 = GetMiddelString(tmp[2], "▼a", "▼");
}
if (!isEight)
target.Insert(count, string.Format("{0}\t{1}\t{2}▲", "008", " ", param.text008));
//richTextBox1.Text = string.Join("\n", target.ToArray());
return tag056;
}
/// <summary>
/// 문자와 문자사이의 값 가져오기
/// </summary>
/// <param name="str">대상 문자열</param>
/// <param name="begin">시작 문자열</param>
/// <param name="end">마지막 문자열</param>
/// <param name="TagNum">불러올 태그 번호</param>
/// <returns>문자 사이값</returns>
public string GetMiddelString(string str, string begin, string end, string TagNum = "")
{
string result = "";
if (string.IsNullOrEmpty(str) || str == "")
return result;
int count = 0;
bool loop = false;
for (int a = count; a < str.Length; a++)
{
count = str.IndexOf(begin);
if (count > -1)
{
str = str.Substring(count + begin.Length);
if (loop)
// 여러 태그들 구분을 지어줌.
result += "▽";
if (str.IndexOf(end) > -1)
result += str.Substring(0, str.IndexOf(end));
else
result += str;
result = TrimEndGubun(result, TagNum);
} }
else else
break;
loop = true;
}
return result;
}
string TrimEndGubun(string str, string TagNum)
{ {
char[] gu = { '.', ',', ':', ';', '/', ' ' }; UTIL.MsgI("변경 완료");
if (TagNum == "300" || TagNum == "300a")
{
str = str.Trim();
if (TagNum == "300a")
{
gu = new char[] { '.', ',', '=', ':', ';', '/', '+', ' ' };
for (int i = 0; i < gu.Length; i++)
{
str = str.TrimEnd(gu[i]);
}
} }
if (str.Contains("ill."))
return str;
if (str.Contains("p."))
return str;
} }
if (TagNum == "710" || TagNum == "910")
return str;
if (TagNum == "245") gu = new char[] { '.', ':', ';', '/', ' ' };
if (TagNum == "245a") gu = new char[] { '.', ',', '=', ':', ';', '/', ' ' };
for (int i = 0; i < gu.Length; i++)
{
str = str.TrimEnd(gu[i]);
}
//foreach (char gubun in gu)
//{
// if (str.Length < 1) continue;
// if (str[str.Length - 1] == gubun)
// {
// str = str.Remove(str.Length - 1);
// str = str.Trim();
// }
//}
return str;
}
#endregion
private void Btn_SearchKolis_Click(object sender, EventArgs e) private void Btn_SearchKolis_Click(object sender, EventArgs e)
{ {
AddMarc_FillBlank af = new AddMarc_FillBlank(this); AddMarc_FillBlank af = new AddMarc_FillBlank(this);
af.Show(); af.Show();
} }
private void button1_Click(object sender, EventArgs e)
{
this.Close();
}
private void button2_Click(object sender, EventArgs e)
{
searchMarc();
}
private void btSave_Click(object sender, EventArgs e)
{
var midx = lbl_Midx.Tag?.ToString() ?? string.Empty;
if (midx.isEmpty())
{
UTIL.MsgE("저장할 마크를 불러오세요\n신규마크작성상태에서는 추가 버튼을 사용하세요");
return;
}
SaveData(true);
}
private void btn_Save_Click(object sender, EventArgs e)
{
SaveData(false);
}
void SaveData(bool isUpdate)
{
string tag008 = marcEditorControl1.text008.Text;
//입력일자를 업데이트할지 확인한다.
if (isUpdate == false)
{
var inputdate = tag008.Substring(0, 6);
if (inputdate == "000000")
inputdate = DateTime.Now.ToString("yyMMdd");
else if (inputdate != DateTime.Now.ToString("yyMMdd"))
{
if (UTIL.MsgQ($"입력일자({inputdate})를 오늘로 변경할까요?") == DialogResult.Yes)
{
tag008 = DateTime.Now.ToString("yyMMdd") + tag008.Substring(6);
marcEditorControl1.text008.Text = tag008;
}
}
}
if (marcEditorControl1.CheckValidation() == false) return;
string tag056 = marcEditorControl1.Tag056(out string with008TagOutput);// Tag056(dbMarc, _param);
//tag056을 호출해야 008이추가된다.그런후에 데이터를 처리해야함
string fullMarc = marcEditorControl1.MakeMarcString();
var marcString = marcEditorControl1.richTextBox1.Text;
var parserF = new UniMarc.MarcParser();
parserF.ParseFullMarc(fullMarc);
string midx = this.lbl_Midx.Tag?.ToString() ?? string.Empty;
if (isUpdate == false) midx = string.Empty;
// 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);
} }
private void rtEtc1_KeyDown(object sender, KeyEventArgs e)
{
var rt = sender as RichTextBox;
if (rt == null) return;
if (e.KeyCode == Keys.F5)
{
rt.AppendText("["+DateTime.Now.ToString("yy-MM-dd")+"]");
}
}
}
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -143,7 +144,7 @@ namespace UniMarc
{ {
if (V_idx != -1 && dataGridView1.Rows[a].Cells["chk_V"].Value.ToString() == "V") if (V_idx != -1 && dataGridView1.Rows[a].Cells["chk_V"].Value.ToString() == "V")
{ {
MessageBox.Show("체크사항이 1개인지 확인해주세요."); UTIL.MsgE("체크사항이 개인지 확인해주세요.");
return -1; return -1;
} }
if (dataGridView1.Rows[a].Cells["chk_V"].Value.ToString() == "V") if (dataGridView1.Rows[a].Cells["chk_V"].Value.ToString() == "V")
@@ -162,7 +163,7 @@ namespace UniMarc
return; return;
} }
if (MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.Yes) if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.Yes)
{ {
string[] delete_area = { "set_name", "set_isbn", "set_count", "set_price" }; string[] delete_area = { "set_name", "set_isbn", "set_count", "set_price" };
string[] delete_data = { string[] delete_data = {

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -62,7 +63,7 @@ namespace UniMarc
} }
} }
if (!grid_chk) { if (!grid_chk) {
MessageBox.Show("필수 입력사항이 비어있습니다!\n맨 앞에 \"*\"이 붙은 곳을 확인해주세요."); UTIL.MsgE("필수 입력사항이 비어있습니다!\n맨 앞에 \"*\"이 붙은 곳을 확인해주세요.");
return; return;
} }
@@ -88,7 +89,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(Incmd); Helper_DB.ExcuteNonQuery(Incmd);
} }
MessageBox.Show("저장완료"); UTIL.MsgI("저장완료");
// 부모폼 조회버튼 클릭 // 부모폼 조회버튼 클릭
manage.btn_Search_Click(null, null); manage.btn_Search_Click(null, null);

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -58,7 +59,7 @@ namespace UniMarc
string U_cmd = db.More_Update(table, edit_tbl, edit_col, sear_tbl, sear_col); string U_cmd = db.More_Update(table, edit_tbl, edit_col, sear_tbl, sear_col);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
MessageBox.Show("변경되었습니다!"); UTIL.MsgI("변경되었습니다!");
manage.btn_Search_Click(null, null); manage.btn_Search_Click(null, null);
this.Close(); this.Close();
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -155,7 +156,7 @@ namespace UniMarc
string orimarc = st.made_Ori_marc(marc, false); string orimarc = st.made_Ori_marc(marc, false);
if (!isSaveOK(orimarc, code)) { if (!isSaveOK(orimarc, code)) {
MessageBox.Show("상품코드를 확인해주세요."); UTIL.MsgE("상품코드를 확인해주세요.");
return; return;
} }
@@ -315,19 +316,19 @@ namespace UniMarc
// 상품코드 체크 // 상품코드 체크
if (!isSaveOK(orimarc, code)) { if (!isSaveOK(orimarc, code)) {
MessageBox.Show("상품코드를 확인해주세요."); UTIL.MsgE("상품코드를 확인해주세요.");
return; return;
} }
// 필수태그 확인 // 필수태그 확인
if (!isMustTag(orimarc)) { if (!isMustTag(orimarc)) {
MessageBox.Show("입력된 마크의 상태를 확인해주세요."); UTIL.MsgE("입력된 마크의 상태를 확인해주세요.");
return; return;
} }
// 마크 형식 체크 // 마크 형식 체크
if (!isPass(marc)) { if (!isPass(marc)) {
MessageBox.Show("입력된 마크의 상태를 확인해주세요."); UTIL.MsgE("입력된 마크의 상태를 확인해주세요.");
return; return;
} }
@@ -410,7 +411,7 @@ namespace UniMarc
if (!isTag) if (!isTag)
{ {
MessageBox.Show(msg + "태그가 없습니다."); UTIL.MsgE(msg + "태그가 없습니다.");
return false; return false;
} }
@@ -426,7 +427,7 @@ namespace UniMarc
if (!is1XX) if (!is1XX)
{ {
MessageBox.Show("기본표목이 존재하지않습니다."); UTIL.MsgE("기본표목이 존재하지않습니다.");
return false; return false;
} }
@@ -444,7 +445,7 @@ namespace UniMarc
if (!is7XX) if (!is7XX)
{ {
MessageBox.Show("부출표목이 존재하지않습니다."); UTIL.MsgE("부출표목이 존재하지않습니다.");
return false; return false;
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -52,7 +53,7 @@ namespace UniMarc
string user = PUB.user.UserName; string user = PUB.user.UserName;
if (listName == "") { if (listName == "") {
MessageBox.Show("목록명이 비어있습니다!"); UTIL.MsgE("목록명이 비어있습니다!");
return; return;
} }
@@ -87,7 +88,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(listCMD); Helper_DB.ExcuteNonQuery(listCMD);
Helper_DB.ExcuteNonQuery(ProductCMD); Helper_DB.ExcuteNonQuery(ProductCMD);
MessageBox.Show("저장되었습니다."); UTIL.MsgI("저장되었습니다.");
} }
private void btn_Close_Click(object sender, EventArgs e) private void btn_Close_Click(object sender, EventArgs e)

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -86,7 +87,7 @@ namespace UniMarc
if (dataGridView1.Rows[row].Cells["Marc"].Value.ToString() == "" && if (dataGridView1.Rows[row].Cells["Marc"].Value.ToString() == "" &&
dataGridView1.Rows[row].Cells["Marc"].Value == null) dataGridView1.Rows[row].Cells["Marc"].Value == null)
{ {
MessageBox.Show("저장된 마크가 없습니다!"); UTIL.MsgE("저장된 마크가 없습니다!");
return; return;
} }
@@ -342,7 +343,7 @@ namespace UniMarc
private void Btn_SelectRemove_Click(object sender, EventArgs e) private void Btn_SelectRemove_Click(object sender, EventArgs e)
{ {
if (MessageBox.Show("정말 삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.No) if (UTIL.MsgQ("정말 삭제하시겠습니까?") != DialogResult.Yes)
return; return;
List<int> SelectIndex = new List<int>(); List<int> SelectIndex = new List<int>();
@@ -356,7 +357,7 @@ namespace UniMarc
} }
if (SelectIndex.Count <= 0) { if (SelectIndex.Count <= 0) {
MessageBox.Show("선택 사항이 없습니다."); UTIL.MsgE("선택 사항이 없습니다.");
return; return;
} }
@@ -367,7 +368,7 @@ namespace UniMarc
db.DB_Delete("DVD_List_Product", "idx", dataGridView1.Rows[SelectIndex[a]].Cells["idx"].Value.ToString(), "compidx", compidx) db.DB_Delete("DVD_List_Product", "idx", dataGridView1.Rows[SelectIndex[a]].Cells["idx"].Value.ToString(), "compidx", compidx)
); );
} }
MessageBox.Show("삭제되었습니다"); UTIL.MsgI("삭제되었습니다");
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -100,7 +101,7 @@ namespace UniMarc
private void Btn_Delete_Click(object sender, EventArgs e) private void Btn_Delete_Click(object sender, EventArgs e)
{ {
if (dataGridView1.CurrentRow.Index < 0) return; if (dataGridView1.CurrentRow.Index < 0) return;
if (MessageBox.Show("정말 삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.Yes) if (UTIL.MsgQ("정말 삭제하시겠습니까?") == DialogResult.Yes)
{ {
string idx = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["idx"].Value.ToString(); string idx = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["idx"].Value.ToString();
//string compidx = Properties.Settings.Default.compidx; //string compidx = Properties.Settings.Default.compidx;
@@ -108,7 +109,7 @@ namespace UniMarc
string cmd = db.DB_Delete("DVD_List", "compidx", PUB.user.CompanyIdx, "idx", idx); string cmd = db.DB_Delete("DVD_List", "compidx", PUB.user.CompanyIdx, "idx", idx);
Helper_DB.ExcuteNonQuery(cmd); Helper_DB.ExcuteNonQuery(cmd);
MessageBox.Show("삭제되었습니다."); UTIL.MsgI("삭제되었습니다.");
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -31,7 +32,7 @@ namespace UniMarc
if (id == "" || pw == "") if (id == "" || pw == "")
{ {
MessageBox.Show("입력된 값이 없습니다."); UTIL.MsgE("입력된 값이 없습니다.");
return; return;
} }

View File

@@ -32,23 +32,6 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.btn_lookup = new System.Windows.Forms.Button();
this.cb_filter = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.tb_list_name = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btn_Save = new System.Windows.Forms.Button();
this.btn_Close = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.cb_api = new System.Windows.Forms.ComboBox();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.btn_yes24 = new System.Windows.Forms.Button();
this.Check_Marc = new System.Windows.Forms.CheckBox();
this.panel1 = new System.Windows.Forms.Panel();
this.btn_ComparePrice = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.num = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.num = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -70,6 +53,25 @@
this.sold_out = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.sold_out = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.image = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.image = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.api_data = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.api_data = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.btn_lookup = new System.Windows.Forms.Button();
this.cb_filter = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.tb_list_name = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btn_Save = new System.Windows.Forms.Button();
this.btn_Close = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.cb_api = new System.Windows.Forms.ComboBox();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.btn_yes24 = new System.Windows.Forms.Button();
this.Check_Marc = new System.Windows.Forms.CheckBox();
this.panel1 = new System.Windows.Forms.Panel();
this.btn_ComparePrice = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
this.tbDelayMs = new System.Windows.Forms.TextBox();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
@@ -128,187 +130,12 @@
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle3; this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(1630, 591); this.dataGridView1.Size = new System.Drawing.Size(1753, 591);
this.dataGridView1.TabIndex = 0; this.dataGridView1.TabIndex = 0;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick); this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick); this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
// //
// btn_lookup
//
this.btn_lookup.Location = new System.Drawing.Point(693, 4);
this.btn_lookup.Name = "btn_lookup";
this.btn_lookup.Size = new System.Drawing.Size(99, 23);
this.btn_lookup.TabIndex = 1;
this.btn_lookup.Text = "ISBN 자동 조회";
this.btn_lookup.UseVisualStyleBackColor = true;
this.btn_lookup.Click += new System.EventHandler(this.btn_lookup_Click);
//
// cb_filter
//
this.cb_filter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_filter.FormattingEnabled = true;
this.cb_filter.Location = new System.Drawing.Point(577, 5);
this.cb_filter.Name = "cb_filter";
this.cb_filter.Size = new System.Drawing.Size(100, 20);
this.cb_filter.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(45, 12);
this.label1.TabIndex = 3;
this.label1.Text = "목록 명";
//
// tb_list_name
//
this.tb_list_name.Enabled = false;
this.tb_list_name.Location = new System.Drawing.Point(54, 5);
this.tb_list_name.Name = "tb_list_name";
this.tb_list_name.Size = new System.Drawing.Size(213, 21);
this.tb_list_name.TabIndex = 4;
this.tb_list_name.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_list_name_KeyDown);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(518, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(57, 12);
this.label2.TabIndex = 3;
this.label2.Text = "검색 조건";
//
// btn_Save
//
this.btn_Save.Location = new System.Drawing.Point(796, 4);
this.btn_Save.Name = "btn_Save";
this.btn_Save.Size = new System.Drawing.Size(99, 23);
this.btn_Save.TabIndex = 1;
this.btn_Save.Text = "전 체 저 장";
this.btn_Save.UseVisualStyleBackColor = true;
this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
//
// btn_Close
//
this.btn_Close.Location = new System.Drawing.Point(1105, 4);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(99, 23);
this.btn_Close.TabIndex = 1;
this.btn_Close.Text = "닫 기";
this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(285, 9);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(57, 12);
this.label3.TabIndex = 5;
this.label3.Text = "검색 엔진";
//
// cb_api
//
this.cb_api.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_api.FormattingEnabled = true;
this.cb_api.Location = new System.Drawing.Point(344, 5);
this.cb_api.Name = "cb_api";
this.cb_api.Size = new System.Drawing.Size(160, 20);
this.cb_api.TabIndex = 6;
this.cb_api.SelectedIndexChanged += new System.EventHandler(this.cb_api_SelectedIndexChanged);
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(1241, 4);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(219, 23);
this.progressBar1.TabIndex = 7;
//
// richTextBox1
//
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(1632, 100);
this.richTextBox1.TabIndex = 8;
this.richTextBox1.Text = "";
//
// btn_yes24
//
this.btn_yes24.Location = new System.Drawing.Point(1002, 4);
this.btn_yes24.Name = "btn_yes24";
this.btn_yes24.Size = new System.Drawing.Size(99, 23);
this.btn_yes24.TabIndex = 1;
this.btn_yes24.Text = "예스 양식 반출";
this.btn_yes24.UseVisualStyleBackColor = true;
this.btn_yes24.Click += new System.EventHandler(this.btn_yes24_Click);
//
// Check_Marc
//
this.Check_Marc.AutoSize = true;
this.Check_Marc.Checked = true;
this.Check_Marc.CheckState = System.Windows.Forms.CheckState.Checked;
this.Check_Marc.Enabled = false;
this.Check_Marc.Location = new System.Drawing.Point(1488, 7);
this.Check_Marc.Name = "Check_Marc";
this.Check_Marc.Size = new System.Drawing.Size(132, 16);
this.Check_Marc.TabIndex = 9;
this.Check_Marc.Text = "마크ISBN 동시 저장";
this.Check_Marc.UseVisualStyleBackColor = true;
//
// panel1
//
this.panel1.Controls.Add(this.btn_ComparePrice);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.Check_Marc);
this.panel1.Controls.Add(this.btn_lookup);
this.panel1.Controls.Add(this.btn_Save);
this.panel1.Controls.Add(this.progressBar1);
this.panel1.Controls.Add(this.btn_Close);
this.panel1.Controls.Add(this.cb_api);
this.panel1.Controls.Add(this.btn_yes24);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.cb_filter);
this.panel1.Controls.Add(this.tb_list_name);
this.panel1.Controls.Add(this.label2);
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(1632, 31);
this.panel1.TabIndex = 10;
//
// btn_ComparePrice
//
this.btn_ComparePrice.Location = new System.Drawing.Point(899, 4);
this.btn_ComparePrice.Name = "btn_ComparePrice";
this.btn_ComparePrice.Size = new System.Drawing.Size(99, 23);
this.btn_ComparePrice.TabIndex = 10;
this.btn_ComparePrice.Text = "정 가 대 조";
this.btn_ComparePrice.UseVisualStyleBackColor = true;
this.btn_ComparePrice.Click += new System.EventHandler(this.btn_ComparePrice_Click);
//
// panel2
//
this.panel2.Controls.Add(this.richTextBox1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 624);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1632, 100);
this.panel2.TabIndex = 11;
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.dataGridView1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 31);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1632, 593);
this.panel3.TabIndex = 12;
//
// idx // idx
// //
this.idx.HeaderText = "idx"; this.idx.HeaderText = "idx";
@@ -428,11 +255,206 @@
this.api_data.Name = "api_data"; this.api_data.Name = "api_data";
this.api_data.Visible = false; this.api_data.Visible = false;
// //
// btn_lookup
//
this.btn_lookup.Location = new System.Drawing.Point(802, 4);
this.btn_lookup.Name = "btn_lookup";
this.btn_lookup.Size = new System.Drawing.Size(99, 23);
this.btn_lookup.TabIndex = 1;
this.btn_lookup.Text = "ISBN 자동 조회";
this.btn_lookup.UseVisualStyleBackColor = true;
this.btn_lookup.Click += new System.EventHandler(this.btn_lookup_Click);
//
// cb_filter
//
this.cb_filter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_filter.FormattingEnabled = true;
this.cb_filter.Location = new System.Drawing.Point(577, 5);
this.cb_filter.Name = "cb_filter";
this.cb_filter.Size = new System.Drawing.Size(100, 20);
this.cb_filter.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(45, 12);
this.label1.TabIndex = 3;
this.label1.Text = "목록 명";
//
// tb_list_name
//
this.tb_list_name.Enabled = false;
this.tb_list_name.Location = new System.Drawing.Point(54, 5);
this.tb_list_name.Name = "tb_list_name";
this.tb_list_name.Size = new System.Drawing.Size(213, 21);
this.tb_list_name.TabIndex = 4;
this.tb_list_name.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_list_name_KeyDown);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(518, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(57, 12);
this.label2.TabIndex = 3;
this.label2.Text = "검색 조건";
//
// btn_Save
//
this.btn_Save.Location = new System.Drawing.Point(906, 4);
this.btn_Save.Name = "btn_Save";
this.btn_Save.Size = new System.Drawing.Size(99, 23);
this.btn_Save.TabIndex = 1;
this.btn_Save.Text = "전 체 저 장";
this.btn_Save.UseVisualStyleBackColor = true;
this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
//
// btn_Close
//
this.btn_Close.Location = new System.Drawing.Point(1217, 4);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(97, 23);
this.btn_Close.TabIndex = 1;
this.btn_Close.Text = "닫 기";
this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(285, 9);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(57, 12);
this.label3.TabIndex = 5;
this.label3.Text = "검색 엔진";
//
// cb_api
//
this.cb_api.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_api.FormattingEnabled = true;
this.cb_api.Location = new System.Drawing.Point(344, 5);
this.cb_api.Name = "cb_api";
this.cb_api.Size = new System.Drawing.Size(160, 20);
this.cb_api.TabIndex = 6;
this.cb_api.SelectedIndexChanged += new System.EventHandler(this.cb_api_SelectedIndexChanged);
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(1318, 4);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(219, 23);
this.progressBar1.TabIndex = 7;
//
// richTextBox1
//
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(0, 0);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(1755, 100);
this.richTextBox1.TabIndex = 8;
this.richTextBox1.Text = "";
//
// btn_yes24
//
this.btn_yes24.Location = new System.Drawing.Point(1112, 4);
this.btn_yes24.Name = "btn_yes24";
this.btn_yes24.Size = new System.Drawing.Size(99, 23);
this.btn_yes24.TabIndex = 1;
this.btn_yes24.Text = "예스 양식 반출";
this.btn_yes24.UseVisualStyleBackColor = true;
this.btn_yes24.Click += new System.EventHandler(this.btn_yes24_Click);
//
// Check_Marc
//
this.Check_Marc.AutoSize = true;
this.Check_Marc.Checked = true;
this.Check_Marc.CheckState = System.Windows.Forms.CheckState.Checked;
this.Check_Marc.Enabled = false;
this.Check_Marc.Location = new System.Drawing.Point(1565, 7);
this.Check_Marc.Name = "Check_Marc";
this.Check_Marc.Size = new System.Drawing.Size(132, 16);
this.Check_Marc.TabIndex = 9;
this.Check_Marc.Text = "마크ISBN 동시 저장";
this.Check_Marc.UseVisualStyleBackColor = true;
//
// panel1
//
this.panel1.Controls.Add(this.tbDelayMs);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.btn_ComparePrice);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.Check_Marc);
this.panel1.Controls.Add(this.btn_lookup);
this.panel1.Controls.Add(this.btn_Save);
this.panel1.Controls.Add(this.progressBar1);
this.panel1.Controls.Add(this.btn_Close);
this.panel1.Controls.Add(this.cb_api);
this.panel1.Controls.Add(this.btn_yes24);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.cb_filter);
this.panel1.Controls.Add(this.tb_list_name);
this.panel1.Controls.Add(this.label2);
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(1755, 31);
this.panel1.TabIndex = 10;
//
// btn_ComparePrice
//
this.btn_ComparePrice.Location = new System.Drawing.Point(1009, 4);
this.btn_ComparePrice.Name = "btn_ComparePrice";
this.btn_ComparePrice.Size = new System.Drawing.Size(99, 23);
this.btn_ComparePrice.TabIndex = 10;
this.btn_ComparePrice.Text = "정 가 대 조";
this.btn_ComparePrice.UseVisualStyleBackColor = true;
this.btn_ComparePrice.Click += new System.EventHandler(this.btn_ComparePrice_Click);
//
// panel2
//
this.panel2.Controls.Add(this.richTextBox1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 624);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1755, 100);
this.panel2.TabIndex = 11;
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.dataGridView1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 31);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1755, 593);
this.panel3.TabIndex = 12;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(683, 10);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(81, 12);
this.label4.TabIndex = 11;
this.label4.Text = "검색지연(ms)";
//
// tbDelayMs
//
this.tbDelayMs.Location = new System.Drawing.Point(766, 5);
this.tbDelayMs.Name = "tbDelayMs";
this.tbDelayMs.Size = new System.Drawing.Size(33, 21);
this.tbDelayMs.TabIndex = 12;
this.tbDelayMs.Text = "100";
this.tbDelayMs.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// Check_ISBN // Check_ISBN
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1632, 724); this.ClientSize = new System.Drawing.Size(1755, 724);
this.Controls.Add(this.panel3); this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
@@ -489,5 +511,7 @@
private System.Windows.Forms.DataGridViewTextBoxColumn sold_out; private System.Windows.Forms.DataGridViewTextBoxColumn sold_out;
private System.Windows.Forms.DataGridViewTextBoxColumn image; private System.Windows.Forms.DataGridViewTextBoxColumn image;
private System.Windows.Forms.DataGridViewTextBoxColumn api_data; private System.Windows.Forms.DataGridViewTextBoxColumn api_data;
private System.Windows.Forms.TextBox tbDelayMs;
private System.Windows.Forms.Label label4;
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.CodeDom; using System.CodeDom;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -50,6 +51,7 @@ namespace UniMarc
private void Check_ISBN_Load(object sender, EventArgs e) private void Check_ISBN_Load(object sender, EventArgs e)
{ {
this.tbDelayMs.Text = PUB.setting.ISBNSearchDelay.ToString();
if (mSearchText != "") if (mSearchText != "")
{ {
tb_list_name.Text = mSearchText; tb_list_name.Text = mSearchText;
@@ -171,8 +173,24 @@ namespace UniMarc
private void btn_lookup_Click(object sender, EventArgs e) private void btn_lookup_Click(object sender, EventArgs e)
{ {
if (cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } if(int.TryParse(tbDelayMs.Text, out int delayMs)==false)
if (cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } {
UTIL.MsgE("지연시간은 숫자로 입력하세요");
tbDelayMs.Focus();
tbDelayMs.SelectAll();
return;
}
//지연시간저장
if(PUB.setting.ISBNSearchDelay != delayMs)
{
PUB.setting.ISBNSearchDelay = delayMs;
PUB.setting.Save();
}
if (cb_api.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; }
if (cb_filter.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; }
clear_api(); clear_api();
@@ -185,21 +203,21 @@ namespace UniMarc
switch (cb_api.SelectedIndex) switch (cb_api.SelectedIndex)
{ {
case 0: case 0:
Aladin_API(dataGridView1); Aladin_API(dataGridView1, delayMs);
break; break;
case 1: case 1:
NL_API(dataGridView1); NL_API(dataGridView1, delayMs);
break; break;
case 2: case 2:
Daum_API(dataGridView1); Daum_API(dataGridView1, delayMs);
break; break;
case 3: case 3:
Naver_API(dataGridView1); Naver_API(dataGridView1, delayMs);
break; break;
} }
// 총 검색 횟수, 일치, 중복 // 총 검색 횟수, 일치, 중복
MessageBox.Show("검색이 완료되었습니다!"); UTIL.MsgI("검색이 완료되었습니다!");
progressBar1.Value = dataGridView1.Rows.Count; progressBar1.Value = dataGridView1.Rows.Count;
dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells["num"]; dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells["num"];
@@ -217,7 +235,7 @@ namespace UniMarc
dataGridView1.Rows[a].Cells["api_data"].Value = ""; dataGridView1.Rows[a].Cells["api_data"].Value = "";
} }
} }
private void Aladin_API(DataGridView gridview) private void Aladin_API(DataGridView gridview,int delay_ms)
{ {
string temp = string.Empty; string temp = string.Empty;
string type = string.Empty; string type = string.Empty;
@@ -265,7 +283,11 @@ namespace UniMarc
} }
string query = Aladin_Set_query(type, a); string query = Aladin_Set_query(type, a);
insert_Aladin(api.Aladin(query, type, param), a); var apiresult = api.Aladin(query, type, param);
insert_Aladin(string.Join("|",apiresult), a);
if (delay_ms > 0)
System.Threading.Thread.Sleep(delay_ms);
} }
} }
string Aladin_Set_query(string type, int idx) string Aladin_Set_query(string type, int idx)
@@ -287,7 +309,7 @@ namespace UniMarc
return result; return result;
} }
private void NL_API(DataGridView gridView) private void NL_API(DataGridView gridView, int delay_ms)
{ {
// 도서명 / 저자 / 출판사 / isbn / 정가 // 도서명 / 저자 / 출판사 / isbn / 정가
// 발행일 / 도서분류 / // 발행일 / 도서분류 /
@@ -361,9 +383,11 @@ namespace UniMarc
} }
} }
if (delay_ms > 0)
System.Threading.Thread.Sleep(delay_ms);
} }
} }
private void Naver_API(DataGridView gridview) private void Naver_API(DataGridView gridview, int delay_ms)
{ {
// 도서명 / 저자 / 출판사 / isbn / 정가 // 도서명 / 저자 / 출판사 / isbn / 정가
// 발행일 / 도서분류 / 재고 // 발행일 / 도서분류 / 재고
@@ -404,10 +428,11 @@ namespace UniMarc
#endregion #endregion
string result = api.Naver(Target, "query", param); string result = api.Naver(Target, "query", param);
insert_Naver(result, a); insert_Naver(result, a);
Thread.Sleep(700); if (delay_ms > 0)
System.Threading.Thread.Sleep(delay_ms);
} }
} }
private void Daum_API(DataGridView gridview) private void Daum_API(DataGridView gridview, int delay_ms)
{ {
string[] param = { "title", "authors", "publisher", "isbn", "price", string[] param = { "title", "authors", "publisher", "isbn", "price",
"datetime", "status", "thumbnail" }; "datetime", "status", "thumbnail" };
@@ -446,6 +471,8 @@ namespace UniMarc
} }
string result = api.Daum(query, type, param); string result = api.Daum(query, type, param);
insert_Daum(result, a); insert_Daum(result, a);
if (delay_ms > 0)
System.Threading.Thread.Sleep(delay_ms);
} }
} }
@@ -503,7 +530,7 @@ namespace UniMarc
newstring = String.Format("{0:yyyy/MM/dd}", newstring = String.Format("{0:yyyy/MM/dd}",
DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G")))); DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G"))));
} }
catch (Exception ex) { MessageBox.Show(data); } catch (Exception ex) { UTIL.MsgE(data); }
for (int a = 0; a < insert.Length; a++) for (int a = 0; a < insert.Length; a++)
{ {
@@ -735,7 +762,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(CMcmd); Helper_DB.ExcuteNonQuery(CMcmd);
} }
} }
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
save = true; save = true;
} }
private void btn_Close_Click(object sender, EventArgs e) private void btn_Close_Click(object sender, EventArgs e)
@@ -836,7 +863,7 @@ namespace UniMarc
private void Check_ISBN_FormClosing(object sender, FormClosingEventArgs e) private void Check_ISBN_FormClosing(object sender, FormClosingEventArgs e)
{ {
if (!save) { if (!save) {
if (MessageBox.Show("데이터가 저장되지않았습니다!\n종료하시겠습니까?", "Warning!", MessageBoxButtons.YesNo) == DialogResult.No) { if (UTIL.MsgQ("데이터가 저장되지않았습니다!\n종료하시겠습니까?") == DialogResult.No) {
e.Cancel = true; e.Cancel = true;
} }
} }

View File

@@ -0,0 +1,694 @@
namespace UniMarc
{
partial class Check_ISBN2
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Check_ISBN2));
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.btn_lookup = new System.Windows.Forms.Button();
this.cb_filter = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.tb_list_name = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.btn_Save = new System.Windows.Forms.Button();
this.btn_Close = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.cb_api = new System.Windows.Forms.ComboBox();
this.progressBar1 = new System.Windows.Forms.ProgressBar();
this.richTextBox1 = new System.Windows.Forms.RichTextBox();
this.btn_yes24 = new System.Windows.Forms.Button();
this.Check_Marc = new System.Windows.Forms.CheckBox();
this.panel1 = new System.Windows.Forms.Panel();
this.tbDelayMs = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.btn_ComparePrice = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.bindingNavigator1 = new System.Windows.Forms.BindingNavigator(this.components);
this.bs1 = new System.Windows.Forms.BindingSource(this.components);
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox();
this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.link_url = new System.Windows.Forms.LinkLabel();
this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.num = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.search_book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.search_author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.search_book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.total = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.condition = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pubDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.persent = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.category = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.sold_out = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.image = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.api_data = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dvc_search_description = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bindingNavigator1)).BeginInit();
this.bindingNavigator1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.bs1)).BeginInit();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.idx,
this.num,
this.isbn,
this.book_name,
this.search_book_name,
this.author,
this.search_author,
this.book_comp,
this.search_book_comp,
this.count,
this.unit,
this.total,
this.condition,
this.price,
this.etc,
this.pubDate,
this.persent,
this.category,
this.sold_out,
this.image,
this.api_data,
this.dvc_search_description});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnF2;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Name = "dataGridView1";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView1.RowHeadersWidth = 20;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(1759, 566);
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);
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
//
// btn_lookup
//
this.btn_lookup.Location = new System.Drawing.Point(805, 4);
this.btn_lookup.Name = "btn_lookup";
this.btn_lookup.Size = new System.Drawing.Size(99, 23);
this.btn_lookup.TabIndex = 1;
this.btn_lookup.Text = "검색";
this.btn_lookup.UseVisualStyleBackColor = true;
this.btn_lookup.Click += new System.EventHandler(this.btn_lookup_Click);
//
// cb_filter
//
this.cb_filter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_filter.FormattingEnabled = true;
this.cb_filter.Location = new System.Drawing.Point(577, 5);
this.cb_filter.Name = "cb_filter";
this.cb_filter.Size = new System.Drawing.Size(100, 20);
this.cb_filter.TabIndex = 2;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(45, 12);
this.label1.TabIndex = 3;
this.label1.Text = "목록 명";
//
// tb_list_name
//
this.tb_list_name.Enabled = false;
this.tb_list_name.Location = new System.Drawing.Point(54, 5);
this.tb_list_name.Name = "tb_list_name";
this.tb_list_name.Size = new System.Drawing.Size(213, 21);
this.tb_list_name.TabIndex = 4;
this.tb_list_name.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_list_name_KeyDown);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(518, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(57, 12);
this.label2.TabIndex = 3;
this.label2.Text = "검색 조건";
//
// btn_Save
//
this.btn_Save.Location = new System.Drawing.Point(908, 4);
this.btn_Save.Name = "btn_Save";
this.btn_Save.Size = new System.Drawing.Size(99, 23);
this.btn_Save.TabIndex = 1;
this.btn_Save.Text = "전 체 저 장";
this.btn_Save.UseVisualStyleBackColor = true;
this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
//
// btn_Close
//
this.btn_Close.Location = new System.Drawing.Point(1215, 4);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(78, 23);
this.btn_Close.TabIndex = 1;
this.btn_Close.Text = "닫 기";
this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(285, 9);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(57, 12);
this.label3.TabIndex = 5;
this.label3.Text = "검색 엔진";
//
// cb_api
//
this.cb_api.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_api.FormattingEnabled = true;
this.cb_api.Location = new System.Drawing.Point(344, 5);
this.cb_api.Name = "cb_api";
this.cb_api.Size = new System.Drawing.Size(160, 20);
this.cb_api.TabIndex = 6;
this.cb_api.SelectedIndexChanged += new System.EventHandler(this.cb_api_SelectedIndexChanged);
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(1299, 4);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(179, 23);
this.progressBar1.TabIndex = 7;
//
// richTextBox1
//
this.richTextBox1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.richTextBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.richTextBox1.Location = new System.Drawing.Point(0, 23);
this.richTextBox1.Name = "richTextBox1";
this.richTextBox1.Size = new System.Drawing.Size(1761, 77);
this.richTextBox1.TabIndex = 8;
this.richTextBox1.Text = "";
//
// btn_yes24
//
this.btn_yes24.Location = new System.Drawing.Point(1114, 4);
this.btn_yes24.Name = "btn_yes24";
this.btn_yes24.Size = new System.Drawing.Size(99, 23);
this.btn_yes24.TabIndex = 1;
this.btn_yes24.Text = "예스 양식 반출";
this.btn_yes24.UseVisualStyleBackColor = true;
this.btn_yes24.Click += new System.EventHandler(this.btn_yes24_Click);
//
// Check_Marc
//
this.Check_Marc.AutoSize = true;
this.Check_Marc.Checked = true;
this.Check_Marc.CheckState = System.Windows.Forms.CheckState.Checked;
this.Check_Marc.Enabled = false;
this.Check_Marc.Location = new System.Drawing.Point(1488, 7);
this.Check_Marc.Name = "Check_Marc";
this.Check_Marc.Size = new System.Drawing.Size(132, 16);
this.Check_Marc.TabIndex = 9;
this.Check_Marc.Text = "마크ISBN 동시 저장";
this.Check_Marc.UseVisualStyleBackColor = true;
//
// panel1
//
this.panel1.Controls.Add(this.tbDelayMs);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.btn_ComparePrice);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.Check_Marc);
this.panel1.Controls.Add(this.btn_lookup);
this.panel1.Controls.Add(this.btn_Save);
this.panel1.Controls.Add(this.progressBar1);
this.panel1.Controls.Add(this.btn_Close);
this.panel1.Controls.Add(this.cb_api);
this.panel1.Controls.Add(this.btn_yes24);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.cb_filter);
this.panel1.Controls.Add(this.tb_list_name);
this.panel1.Controls.Add(this.label2);
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(1761, 31);
this.panel1.TabIndex = 10;
//
// tbDelayMs
//
this.tbDelayMs.Location = new System.Drawing.Point(766, 4);
this.tbDelayMs.Name = "tbDelayMs";
this.tbDelayMs.Size = new System.Drawing.Size(33, 21);
this.tbDelayMs.TabIndex = 14;
this.tbDelayMs.Text = "100";
this.tbDelayMs.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(683, 9);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(81, 12);
this.label4.TabIndex = 13;
this.label4.Text = "검색지연(ms)";
//
// btn_ComparePrice
//
this.btn_ComparePrice.Location = new System.Drawing.Point(1011, 4);
this.btn_ComparePrice.Name = "btn_ComparePrice";
this.btn_ComparePrice.Size = new System.Drawing.Size(99, 23);
this.btn_ComparePrice.TabIndex = 10;
this.btn_ComparePrice.Text = "정 가 대 조";
this.btn_ComparePrice.UseVisualStyleBackColor = true;
this.btn_ComparePrice.Click += new System.EventHandler(this.btn_ComparePrice_Click);
//
// panel2
//
this.panel2.Controls.Add(this.richTextBox1);
this.panel2.Controls.Add(this.link_url);
this.panel2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.panel2.Location = new System.Drawing.Point(0, 624);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1761, 100);
this.panel2.TabIndex = 11;
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel3.Controls.Add(this.dataGridView1);
this.panel3.Controls.Add(this.bindingNavigator1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel3.Location = new System.Drawing.Point(0, 31);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(1761, 593);
this.panel3.TabIndex = 12;
//
// bindingNavigator1
//
this.bindingNavigator1.AddNewItem = null;
this.bindingNavigator1.BindingSource = this.bs1;
this.bindingNavigator1.CountItem = this.bindingNavigatorCountItem;
this.bindingNavigator1.DeleteItem = null;
this.bindingNavigator1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.bindingNavigator1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.bindingNavigatorMoveFirstItem,
this.bindingNavigatorMovePreviousItem,
this.bindingNavigatorSeparator,
this.bindingNavigatorPositionItem,
this.bindingNavigatorCountItem,
this.bindingNavigatorSeparator1,
this.bindingNavigatorMoveNextItem,
this.bindingNavigatorMoveLastItem,
this.bindingNavigatorSeparator2});
this.bindingNavigator1.Location = new System.Drawing.Point(0, 566);
this.bindingNavigator1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bindingNavigator1.MoveLastItem = this.bindingNavigatorMoveLastItem;
this.bindingNavigator1.MoveNextItem = this.bindingNavigatorMoveNextItem;
this.bindingNavigator1.MovePreviousItem = this.bindingNavigatorMovePreviousItem;
this.bindingNavigator1.Name = "bindingNavigator1";
this.bindingNavigator1.PositionItem = this.bindingNavigatorPositionItem;
this.bindingNavigator1.Size = new System.Drawing.Size(1759, 25);
this.bindingNavigator1.TabIndex = 1;
this.bindingNavigator1.Text = "bindingNavigator1";
//
// bs1
//
this.bs1.CurrentChanged += new System.EventHandler(this.bs1_CurrentChanged);
//
// bindingNavigatorCountItem
//
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22);
this.bindingNavigatorCountItem.Text = "/{0}";
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수";
//
// bindingNavigatorMoveFirstItem
//
this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorMoveFirstItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveFirstItem.Image")));
this.bindingNavigatorMoveFirstItem.Name = "bindingNavigatorMoveFirstItem";
this.bindingNavigatorMoveFirstItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMoveFirstItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorMoveFirstItem.Text = "처음으로 이동";
//
// bindingNavigatorMovePreviousItem
//
this.bindingNavigatorMovePreviousItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorMovePreviousItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMovePreviousItem.Image")));
this.bindingNavigatorMovePreviousItem.Name = "bindingNavigatorMovePreviousItem";
this.bindingNavigatorMovePreviousItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMovePreviousItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorMovePreviousItem.Text = "이전으로 이동";
//
// bindingNavigatorSeparator
//
this.bindingNavigatorSeparator.Name = "bindingNavigatorSeparator";
this.bindingNavigatorSeparator.Size = new System.Drawing.Size(6, 25);
//
// bindingNavigatorPositionItem
//
this.bindingNavigatorPositionItem.AccessibleName = "위치";
this.bindingNavigatorPositionItem.AutoSize = false;
this.bindingNavigatorPositionItem.Name = "bindingNavigatorPositionItem";
this.bindingNavigatorPositionItem.Size = new System.Drawing.Size(50, 23);
this.bindingNavigatorPositionItem.Text = "0";
this.bindingNavigatorPositionItem.ToolTipText = "현재 위치";
//
// bindingNavigatorSeparator1
//
this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1";
this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25);
//
// bindingNavigatorMoveNextItem
//
this.bindingNavigatorMoveNextItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorMoveNextItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveNextItem.Image")));
this.bindingNavigatorMoveNextItem.Name = "bindingNavigatorMoveNextItem";
this.bindingNavigatorMoveNextItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMoveNextItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorMoveNextItem.Text = "다음으로 이동";
//
// bindingNavigatorMoveLastItem
//
this.bindingNavigatorMoveLastItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
this.bindingNavigatorMoveLastItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorMoveLastItem.Image")));
this.bindingNavigatorMoveLastItem.Name = "bindingNavigatorMoveLastItem";
this.bindingNavigatorMoveLastItem.RightToLeftAutoMirrorImage = true;
this.bindingNavigatorMoveLastItem.Size = new System.Drawing.Size(23, 22);
this.bindingNavigatorMoveLastItem.Text = "마지막으로 이동";
//
// bindingNavigatorSeparator2
//
this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25);
//
// link_url
//
this.link_url.Dock = System.Windows.Forms.DockStyle.Top;
this.link_url.Location = new System.Drawing.Point(0, 0);
this.link_url.Name = "link_url";
this.link_url.Size = new System.Drawing.Size(1761, 23);
this.link_url.TabIndex = 9;
this.link_url.TabStop = true;
this.link_url.Text = "linkLabel1";
this.link_url.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.link_url.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.link_url_LinkClicked);
//
// idx
//
this.idx.DataPropertyName = "idx";
this.idx.HeaderText = "idx";
this.idx.Name = "idx";
this.idx.Visible = false;
this.idx.Width = 50;
//
// num
//
this.num.DataPropertyName = "num";
this.num.HeaderText = "번호";
this.num.Name = "num";
this.num.Width = 50;
//
// isbn
//
this.isbn.DataPropertyName = "isbn";
this.isbn.HeaderText = "ISBN13";
this.isbn.Name = "isbn";
//
// book_name
//
this.book_name.DataPropertyName = "book_name";
this.book_name.HeaderText = "도서명";
this.book_name.Name = "book_name";
this.book_name.Width = 130;
//
// search_book_name
//
this.search_book_name.DataPropertyName = "search_book_name";
this.search_book_name.HeaderText = "검색 도서명";
this.search_book_name.Name = "search_book_name";
//
// author
//
this.author.DataPropertyName = "author";
this.author.HeaderText = "저자";
this.author.Name = "author";
//
// search_author
//
this.search_author.DataPropertyName = "search_author";
this.search_author.HeaderText = "검색 저자";
this.search_author.Name = "search_author";
//
// book_comp
//
this.book_comp.DataPropertyName = "book_comp";
this.book_comp.HeaderText = "출판사";
this.book_comp.Name = "book_comp";
//
// search_book_comp
//
this.search_book_comp.DataPropertyName = "search_book_comp";
this.search_book_comp.HeaderText = "검색 출판사";
this.search_book_comp.Name = "search_book_comp";
//
// count
//
this.count.DataPropertyName = "count";
this.count.HeaderText = "수량";
this.count.Name = "count";
this.count.Visible = false;
this.count.Width = 50;
//
// unit
//
this.unit.DataPropertyName = "unit";
this.unit.HeaderText = "단가";
this.unit.Name = "unit";
this.unit.Width = 70;
//
// total
//
this.total.DataPropertyName = "total";
this.total.HeaderText = "합계";
this.total.Name = "total";
this.total.Visible = false;
this.total.Width = 70;
//
// condition
//
this.condition.DataPropertyName = "condition";
this.condition.HeaderText = "상태";
this.condition.Name = "condition";
this.condition.Visible = false;
//
// price
//
this.price.DataPropertyName = "price";
this.price.HeaderText = "정가";
this.price.Name = "price";
this.price.Width = 50;
//
// etc
//
this.etc.DataPropertyName = "etc";
this.etc.HeaderText = "비고";
this.etc.Name = "etc";
//
// pubDate
//
this.pubDate.DataPropertyName = "pubDate";
this.pubDate.HeaderText = "발행일";
this.pubDate.Name = "pubDate";
//
// persent
//
this.persent.DataPropertyName = "persent";
this.persent.HeaderText = "%";
this.persent.Name = "persent";
this.persent.Width = 50;
//
// category
//
this.category.DataPropertyName = "category";
this.category.HeaderText = "도서분류";
this.category.Name = "category";
//
// sold_out
//
this.sold_out.DataPropertyName = "sold_out";
this.sold_out.HeaderText = "품절/절판";
this.sold_out.Name = "sold_out";
//
// image
//
this.image.DataPropertyName = "image";
this.image.HeaderText = "이미지";
this.image.Name = "image";
this.image.Visible = false;
//
// api_data
//
this.api_data.DataPropertyName = "api_data";
this.api_data.HeaderText = "api_data";
this.api_data.Name = "api_data";
this.api_data.Visible = false;
//
// dvc_search_description
//
this.dvc_search_description.DataPropertyName = "search_description";
this.dvc_search_description.HeaderText = "검색 설명";
this.dvc_search_description.Name = "dvc_search_description";
//
// Check_ISBN2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1761, 724);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Name = "Check_ISBN2";
this.Text = "ISBN 조회";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Check_ISBN_FormClosing);
this.Load += new System.EventHandler(this.Check_ISBN_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.bindingNavigator1)).EndInit();
this.bindingNavigator1.ResumeLayout(false);
this.bindingNavigator1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.bs1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btn_lookup;
private System.Windows.Forms.ComboBox cb_filter;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btn_Save;
private System.Windows.Forms.Button btn_Close;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cb_api;
private System.Windows.Forms.ProgressBar progressBar1;
public System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.RichTextBox richTextBox1;
private System.Windows.Forms.Button btn_yes24;
public System.Windows.Forms.TextBox tb_list_name;
private System.Windows.Forms.CheckBox Check_Marc;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Button btn_ComparePrice;
private System.Windows.Forms.BindingNavigator bindingNavigator1;
private System.Windows.Forms.BindingSource bs1;
private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
private System.Windows.Forms.ToolStripTextBox bindingNavigatorPositionItem;
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator1;
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
private System.Windows.Forms.TextBox tbDelayMs;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.LinkLabel link_url;
private System.Windows.Forms.DataGridViewTextBoxColumn idx;
private System.Windows.Forms.DataGridViewTextBoxColumn num;
private System.Windows.Forms.DataGridViewTextBoxColumn isbn;
private System.Windows.Forms.DataGridViewTextBoxColumn book_name;
private System.Windows.Forms.DataGridViewTextBoxColumn search_book_name;
private System.Windows.Forms.DataGridViewTextBoxColumn author;
private System.Windows.Forms.DataGridViewTextBoxColumn search_author;
private System.Windows.Forms.DataGridViewTextBoxColumn book_comp;
private System.Windows.Forms.DataGridViewTextBoxColumn search_book_comp;
private System.Windows.Forms.DataGridViewTextBoxColumn count;
private System.Windows.Forms.DataGridViewTextBoxColumn unit;
private System.Windows.Forms.DataGridViewTextBoxColumn total;
private System.Windows.Forms.DataGridViewTextBoxColumn condition;
private System.Windows.Forms.DataGridViewTextBoxColumn price;
private System.Windows.Forms.DataGridViewTextBoxColumn etc;
private System.Windows.Forms.DataGridViewTextBoxColumn pubDate;
private System.Windows.Forms.DataGridViewTextBoxColumn persent;
private System.Windows.Forms.DataGridViewTextBoxColumn category;
private System.Windows.Forms.DataGridViewTextBoxColumn sold_out;
private System.Windows.Forms.DataGridViewTextBoxColumn image;
private System.Windows.Forms.DataGridViewTextBoxColumn api_data;
private System.Windows.Forms.DataGridViewTextBoxColumn dvc_search_description;
}
}

View File

@@ -0,0 +1,978 @@
using AR;
using System;
using System.CodeDom;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace UniMarc
{
public partial class Check_ISBN2 : Form
{
Helper_DB db = new Helper_DB();
public string compidx;
public string list_name = string.Empty;
private string mListIDX = string.Empty;
private string mSearchText = string.Empty;
public int rowidx;
private bool save = true;
string[] list_combo = { "알라딘", "국립중앙도서관", "다음", "네이버" };
BindingList<IsbnGridItem> bookList = new BindingList<IsbnGridItem>();
public Check_ISBN2(string pSearchText = "", string pListIDX = "")
{
InitializeComponent();
compidx = PUB.user.CompanyIdx;
mSearchText = pSearchText;
mListIDX = pListIDX;
}
private void Check_ISBN_Load(object sender, EventArgs e)
{
bs1.DataSource = bookList;
dataGridView1.AutoGenerateColumns = false;
dataGridView1.DataSource = bs1;
dataGridView1.DataBindingComplete += DataGridView1_DataBindingComplete;
tbDelayMs.Text = PUB.setting.ISBNSearchDelay.ToString();
if (mSearchText != "")
{
tb_list_name.Text = mSearchText;
DataLoad(mSearchText, mListIDX);
}
}
public void DataLoad(string ListName, string l_idx)
{
bookList.Clear();
cb_api.Items.Clear();
list_name = ListName;
cb_api.Items.AddRange(list_combo);
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`, 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`";
string cmd = db.More_DB_Search("Obj_List_Book", search_tbl, search_col, search_data);
var dt = Helper_DB.ExecuteDataTable(cmd);
made_Grid(dt);
}
#region Load_Sub
void made_Grid(DataTable datas)
{
this.dataGridView1.AutoGenerateColumns = false;
if (datas == null)
{
UTIL.MsgE("자료가 없습니다");
return;
}
foreach (DataRow row in datas.Rows)
{
var item = new IsbnGridItem();
item.idx = row["idx"]?.ToString() ?? string.Empty;
item.num = (row["header"]?.ToString() ?? string.Empty) + " " + (row["num"]?.ToString() ?? string.Empty); // header + num
item.isbn = row["isbn_marc"]?.ToString() ?? string.Empty;
item.book_name = row["book_name"]?.ToString() ?? string.Empty;
item.author = row["author"]?.ToString() ?? string.Empty;
item.book_comp = row["book_comp"]?.ToString() ?? string.Empty;
item.count = row["count"]?.ToString() ?? string.Empty;
item.unit = row["pay"]?.ToString() ?? string.Empty;
item.total = row["total"]?.ToString() ?? string.Empty;
item.condition = row["import"]?.ToString() ?? string.Empty;
item.price = row["price"]?.ToString() ?? string.Empty;
item.etc = row["etc"]?.ToString() ?? string.Empty;
item.pubDate = row["pubDate"]?.ToString() ?? string.Empty;
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_url = row["search_url"]?.ToString() ?? string.Empty;
string setBookName = row["set_book_name"]?.ToString() ?? string.Empty;
if (!string.IsNullOrEmpty(setBookName))
{
item.book_name = setBookName;
}
bookList.Add(item);
}
Set_grid();
}
private void DataGridView1_DataBindingComplete(object sender, DataGridViewBindingCompleteEventArgs e)
{
ApplyRowColors();
}
private void ApplyRowColors()
{
for (int a = 0; a < dataGridView1.Rows.Count; a++)
{
var row = dataGridView1.Rows[a];
var item = row.DataBoundItem as IsbnGridItem;
if (item != null && !string.IsNullOrEmpty(item.isbn))
{
if (item.unit != item.price)
row.DefaultCellStyle.BackColor = Color.Orange;
else
row.DefaultCellStyle.BackColor = Color.Yellow;
}
}
}
void Set_grid()
{
for (int a = 0; a < dataGridView1.Columns.Count; a++)
{
if (dataGridView1.Columns[a].Name == "isbn" ||
dataGridView1.Columns[a].Name == "book_name" ||
dataGridView1.Columns[a].Name == "search_book_name" ||
dataGridView1.Columns[a].Name == "author" ||
dataGridView1.Columns[a].Name == "search_author" ||
dataGridView1.Columns[a].Name == "book_comp" ||
dataGridView1.Columns[a].Name == "search_book_comp" ||
dataGridView1.Columns[a].Name == "unit" ||
dataGridView1.Columns[a].Name == "price" ||
dataGridView1.Columns[a].Name == "pubDate" ||
dataGridView1.Columns[a].Name == "category" ||
dataGridView1.Columns[a].Name == "sold_out" ||
dataGridView1.Columns[a].Name == "etc")
{
dataGridView1.Columns[a].ReadOnly = false;
}
else { dataGridView1.Columns[a].ReadOnly = true; }
}
}
#endregion
private void btn_lookup_Click(object sender, EventArgs e)
{
if (int.TryParse(tbDelayMs.Text, out int delayMs) == false)
{
UTIL.MsgE("지연시간은 숫자로 입력하세요");
tbDelayMs.Focus();
tbDelayMs.SelectAll();
return;
}
//지연시간저장
if (PUB.setting.ISBNSearchDelay != delayMs)
{
PUB.setting.ISBNSearchDelay = delayMs;
PUB.setting.Save();
}
if (cb_api.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; }
if (cb_filter.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; }
clear_api();
progressBar1.Style = ProgressBarStyle.Continuous;
progressBar1.Minimum = 0;
progressBar1.Maximum = dataGridView1.Rows.Count;
progressBar1.Step = 1;
progressBar1.Value = 0;
switch (cb_api.SelectedIndex)
{
case 0:
Aladin_API(delayMs);
break;
case 1:
NL_API(delayMs);
break;
case 2:
Daum_API(delayMs);
break;
case 3:
Naver_API(delayMs);
break;
}
// 총 검색 횟수, 일치, 중복
UTIL.MsgI("검색이 완료되었습니다!");
progressBar1.Value = bookList.Count;
bs1.Position = 0;
this.ActiveControl = dataGridView1;
rowidx = 0;
save = false;
}
/// <summary>
/// 불러와서 저장한 api값 초기화
/// </summary>
void clear_api()
{
foreach (var item in bookList)
{
item.api_data = "";
}
}
private void Aladin_API(int delay_ms)
{
string temp = string.Empty;
string type = string.Empty;
// 도서명 / 저자 / 출판사 / isbn / 정가
// 발행일 / 도서분류 / 재고
string[] param = { "title", "author", "publisher", "isbn13", "priceStandard",
"pubDate", "categoryName", "stockStatus", "cover" ,"description","link"};
API api = new API();
switch (cb_filter.SelectedIndex)
{
case 0:
type = "Title";
break;
case 1:
type = "Author";
break;
case 2:
type = "Publisher";
break;
case 3:
type = "ISBN13";
break;
}
for (int a = 0; a < bookList.Count; a++)
{
progressBar1.PerformStep();
var item = bookList[a];
if (item.isbn == null)
item.isbn = "";
string isbn = item.isbn;
if (cb_filter.SelectedIndex == 3)
{
if (!CheckData(isbn))
continue;
else
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
}
else
{
if (CheckData(isbn))
continue;
else
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
}
string query = Aladin_Set_query(type, a);
var apireseult = api.Aladin(query, type, param);
insert_Aladin(apireseult, a);
if (delay_ms > 0)
System.Threading.Thread.Sleep(delay_ms);
}
}
string Aladin_Set_query(string type, int idx)
{
string result = string.Empty;
if (type == "Title")
result = bookList[idx].book_name;
if (type == "Author")
result = bookList[idx].author;
if (type == "Publisher")
result = bookList[idx].book_comp;
if (type == "ISBN13")
result = bookList[idx].isbn;
return result;
}
private void NL_API(int delay_ms)
{
// 도서명 / 저자 / 출판사 / isbn / 정가
// 발행일 / 도서분류 /
string[] param = { "TITLE", "AUTHOR", "PUBLISHER", "EA_ISBN", "PRE_PRICE",
"PUBLISH_PREDATE", "KDC", "TITLE_URL" };
API api = new API();
for (int a = 0; a < bookList.Count; a++)
{
string[] grid = { "", "", "", "", "",
"", "", "", "" };
string type = "";
string target = "";
progressBar1.PerformStep();
var item = bookList[a];
if (item.isbn == null)
item.isbn = "";
string isbn = item.isbn;
if (CheckData(isbn))
continue;
else
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
switch (cb_filter.SelectedIndex)
{
case 0:
type = "title";
target = item.book_name;
break;
case 1:
type = "author";
target = item.author;
break;
case 2:
type = "publisher";
target = item.book_comp;
break;
}
string result = api.NationalLibraryOfKorea(target, type, param);
if (result.Length < 4) continue;
string[] tmp_Array = result.Split('|');
int ArrayLength = tmp_Array.Length;
for (int b = 0; b < ArrayLength; b++)
{
if (b % 8 == 0) grid[0] = tmp_Array[b];
if (b % 8 == 1) grid[1] = tmp_Array[b];
if (b % 8 == 2) grid[2] = tmp_Array[b];
if (b % 8 == 3) grid[3] = tmp_Array[b];
if (b % 8 == 4) grid[4] = tmp_Array[b].Replace(",", "");
if (b % 8 == 5) grid[5] = tmp_Array[b];
if (b % 8 == 6) grid[6] = tmp_Array[b];
if (b % 8 == 7)
{
grid[8] = tmp_Array[b];
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.LightGray;
if (ArrayLength < 10)
{
input_api(grid, a, grid[5]);
break;
}
else
{
bookList[a].api_data += string.Join("|", grid) + "|";
}
}
}
if (delay_ms > 0)
System.Threading.Thread.Sleep(delay_ms);
}
}
private void Naver_API(int delay_ms)
{
// 도서명 / 저자 / 출판사 / isbn / 정가
// 발행일 / 도서분류 / 재고
string[] param = { "title", "author", "publisher", "isbn", "discount",
"pubdate", "discount", "image"};
API api = new API();
for (int a = 0; a < bookList.Count; a++)
{
progressBar1.PerformStep();
var item = bookList[a];
if (item.isbn == null)
item.isbn = "";
string isbn = item.isbn;
string Target = "";
if (CheckData(isbn))
continue;
else
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
#region
switch (cb_filter.SelectedIndex)
{
case 0:
Target = item.book_name;
break;
case 1:
Target = item.author;
break;
case 2:
Target = item.book_comp;
break;
}
#endregion
string result = api.Naver(Target, "query", param);
insert_Naver(result, a);
if (delay_ms > 0)
System.Threading.Thread.Sleep(delay_ms);
}
}
private void Daum_API(int delay_ms)
{
string[] param = { "title", "authors", "publisher", "isbn", "price",
"datetime", "status", "thumbnail" };
string type = string.Empty;
string query = string.Empty;
API api = new API();
for (int a = 0; a < bookList.Count; a++)
{
progressBar1.PerformStep();
var item = bookList[a];
if (item.isbn == null)
item.isbn = "";
string isbn = item.isbn;
if (CheckData(isbn))
continue;
else
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
switch (cb_filter.SelectedIndex)
{
case 0:
type = "title";
query = item.book_name;
break;
case 1:
type = "person";
query = item.author;
break;
case 2:
type = "publisher";
query = item.book_comp;
break;
}
string result = api.Daum(query, type, param);
insert_Daum(result, a);
if (delay_ms > 0)
System.Threading.Thread.Sleep(delay_ms);
}
}
bool CheckData(string isbn)
{
if (string.IsNullOrEmpty(isbn))
return false;
return true;
}
void insert_Aladin(List<string> data, int row)
{
if (row > 0) { dataGridView1.Rows[row - 1].Selected = false; }
dataGridView1.Rows[row].Selected = true;
if (data.Count > 0)
{
bookList[row].api_data = string.Join("|", data);
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
}
//string[] insert = data.Split('|');
if (data.Any() == false) { return; }
string newstring;
try
{
// pubDate형 보기편하게 DateTime형으로 재정리
newstring = String.Format("{0:yyyy/MM/dd HH:mm}",
DateTime.Parse(data[5].Remove(data[5].IndexOf(" G"))));
}
catch
{
newstring = data[5];
}
data[6] = Aladin_CategorySort(data[6]);
if (data.Count > 11)
{
return;
}
if (cb_filter.SelectedItem.ToString() == "별치조사")
input_api_aladin(data.ToArray(), row, newstring);
input_api(data.ToArray(), row, newstring);
/*
if (row > 0) { dataGridView1.Rows[row - 1].Selected = false; }
dataGridView1.Rows[row].Selected = true;
string[] insert = data.Split('|');
if (data == "") { return; }
// pubDate형 보기편하게 DateTime형으로 재정리
string newstring = "";
try
{
newstring = String.Format("{0:yyyy/MM/dd}",
DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G"))));
}
catch (Exception ex) { UTIL.MsgE(data); }
for (int a = 0; a < insert.Length; a++)
{
if (a % 8 == 6) { insert[a] = Aladin_CategorySort(insert[a]); }
}
dataGridView1.Rows[row].Cells["Column1"].Value += string.Join("|", insert) + "|";
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
if (cb_filter.SelectedItem.ToString() == "별치조사")
input_api_aladin(insert, row, newstring);
input_api(insert, row, newstring);
*/
}
public string Aladin_CategorySort(string insert)
{
// 도서 분류 필요한 데이터로 재정리
int top = insert.IndexOf('>');
int mid = insert.IndexOf('>', top + 1);
int bot = insert.IndexOf('>', mid + 1);
if (bot < 0) { insert = insert.Substring(top + 1); }
else { insert = insert.Substring(top + 1, bot - top - 1); }
return insert;
}
void input_api_aladin(string[] value, int idx, string date)
{
var item = bookList[idx];
item.search_book_name = value[0];
item.search_author = value[1];
item.search_book_comp = value[2];
item.price = value[4];
item.pubDate = date;
item.category = value[6];
}
void insert_Naver(string value, int row)
{
if (row > 0) dataGridView1.Rows[row - 1].Selected = false;
dataGridView1.Rows[row].Selected = true;
if (value == "") return;
value = value.Replace("<b>", "");
value = value.Replace("</b>", "");
string[] sp_data = value.Split('\t');
string[] grid = { "", "", "", "", "", "", "", "", "" };
#region
for (int a = 0; a < sp_data.Length - 1; a++)
{
string[] data = sp_data[a].Split('|');
int idx = data.Length - 2;
grid[0] = data[0];
grid[1] = data[1];
for (int b = 2; b < idx - 5; b++)
{
grid[1] += ", " + data[b];
}
grid[2] = data[idx - 5];
if (data[idx - 4].Contains(" ") == true)
{
string[] isbn = data[idx - 4].Split(' ');
grid[3] = isbn[1];
}
else
grid[3] = data[idx - 4];
grid[4] = data[idx - 3];
grid[5] = data[idx - 2];
if (data[idx - 1] == "")
grid[7] = "절판";
else
grid[7] = "";
grid[8] = data[idx];
bookList[row].api_data += string.Join("|", grid) + "|";
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
}
#endregion
if (sp_data.Length > 10) return;
if (row > 0) dataGridView1.Rows[row - 1].Selected = false;
dataGridView1.Rows[row].Selected = true;
string newstring = "";
try
{
newstring = DateTime.ParseExact(grid[5], "yyyyMMdd", null).ToString("yyyy-MM-dd");
}
catch (FormatException fe)
{
}
input_api(grid, row, newstring);
}
void insert_Daum(string value, int row)
{
if (row > 0) { dataGridView1.Rows[row - 1].Selected = false; }
dataGridView1.Rows[row].Selected = true;
if (value == "") return;
string[] sp_data = value.Split('\n');
string[] grid = { "", "", "", "", "", "", "", "", "" };
for (int a = 0; a < sp_data.Length - 1; a++)
{
string[] data = sp_data[a].Split('|');
grid[0] = data[0];
grid[1] = data[1];
grid[2] = data[2];
string[] tmp_isbn = data[3].Split(' ');
if (tmp_isbn.Length < 2)
grid[3] = data[3].Replace(" ", "");
else
grid[3] = tmp_isbn[1];
grid[4] = data[4];
if (data[5].Length < 10)
grid[5] = data[5];
else
grid[5] = data[5].Substring(0, 10);
grid[7] = data[6];
grid[8] = data[7];
bookList[row].api_data += string.Join("|", grid) + "|";
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
}
if (sp_data.Length > 10) return;
if (row > 0) dataGridView1.Rows[row - 1].Selected = false;
dataGridView1.Rows[row].Selected = true;
string newstring = grid[5];
input_api(grid, row, newstring);
}
/// <summary>
/// API에서 가져온 데이터가 요구한 데이터와 일치하는지 알아보는 함수
/// </summary>
/// <param name="value">데이터</param>
/// <param name="idx">Grid의 row인덱스 번호</param>
/// <param name="date">날짜</param>
void input_api(string[] value, int idx, string date)
{
bool[] chk = { false, false, false };
var item = bookList[idx];
string book_name = item.book_name;
string author = item.author;
string book_comp = item.book_comp;
if (value[0] == book_name) chk[0] = true;
else if (book_name.Contains(value[0])) chk[0] = true;
else if (value[0].Contains(book_name)) chk[0] = true;
if (value[1] == author) chk[1] = true;
else if (author.Contains(value[1])) chk[1] = true;
else if (value[1].Contains(author)) chk[1] = true;
if (value[2] == book_comp) chk[2] = true;
else if (book_comp.Contains(value[2])) chk[2] = true;
else if (value[2].Contains(book_comp)) chk[2] = true;
if (chk[0] && chk[1] && chk[2])
{
item.search_book_name = value[0];
item.search_author = value[1];
item.search_book_comp = value[2];
item.isbn = value[3];
item.price = value[4];
item.pubDate = date;
item.category = value[6];
item.sold_out = value[7];
item.image = value[8];
if (value.Length > 9)
item.search_description = value[9];
else
item.search_description = string.Empty;
if (value.Length > 10)
item.search_url = value[10];
else
item.search_url = string.Empty;
dataGridView1.Rows[idx].DefaultCellStyle.BackColor = Color.Yellow;
}
}
private void btn_Save_Click(object sender, EventArgs e)
{
for (int a = 0; a < bookList.Count; a++)
{
var item = bookList[a];
if (string.IsNullOrEmpty(item.isbn)) continue;
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 }
};
var whereClause = new Dictionary<string, object>
{
{ item.etc.Contains("세트분할") ? "set_book_name" : "idx", item.idx },
{ "list_name", list_name },
{ "compidx", compidx }
};
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}\"",
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("저장되었습니다!");
save = true;
}
private void btn_Close_Click(object sender, EventArgs e)
{
this.Close();
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0) return;
var row = dataGridView1.Rows[e.RowIndex];
var item = row.DataBoundItem as IsbnGridItem;
if (item == null) return;
using (var editForm = new Check_ISBN_ItemEdit(item))
{
if (editForm.ShowDialog() == DialogResult.OK)
{
bs1.ResetBindings(false);
row.DefaultCellStyle.BackColor = Color.Yellow;
save = false;
}
}
}
private void SHOW_ISBN()
{
int idx = bs1.Position;
if (idx < 0 || idx >= bookList.Count) return;
if (string.IsNullOrEmpty(bookList[idx].api_data))
{
return;
}
var sub = new Check_ISBN_Sub2(this);
sub.row = idx;
sub.Call_API = cb_api.Text;
sub.Show();
}
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{
Skill_Grid sg = new Skill_Grid();
sg.Excel_to_DataGridView(sender, e);
//if (e.KeyCode == Keys.Enter) { dataGridView1_CellDoubleClick(null, null); rowidx++; }
if (e.KeyCode == Keys.Enter) { SHOW_ISBN(); rowidx++; }
if (e.KeyCode == Keys.Insert)
{
// Check_ISBN_Split split = new Check_ISBN_Split(this);
// split.book_data[0] = dataGridView1.Rows[rowidx].Cells["num"].Value.ToString();
// split.book_data[1] = dataGridView1.Rows[rowidx].Cells["book_name"].Value.ToString();
// split.book_data[2] = dataGridView1.Rows[rowidx].Cells["author"].Value.ToString();
// split.book_data[3] = dataGridView1.Rows[rowidx].Cells["book_comp"].Value.ToString();
// split.book_data[4] = dataGridView1.Rows[rowidx].Cells["unit"].Value.ToString();
// split.book_data[5] = dataGridView1.Rows[rowidx].Cells["count"].Value.ToString();
// split.row_idx = rowidx;
// split.compidx = compidx;
// split.Show();
}
if (e.KeyCode == Keys.F12)
{
var bl = new Book_Lookup2(this);
bl.TopMost = true;
int idx = bs1.Position;
if (idx < 0) return;
var item = bookList[idx];
bl.Lookup_Load(item.book_name, item.author, item.book_comp, list_name);
bl.Show();
}
if (e.KeyCode == Keys.Up)
{
rowidx--;
if (rowidx < 0)
rowidx = 0;
}
if (e.KeyCode == Keys.Down)
{
rowidx++;
if (rowidx > dataGridView1.Rows.Count - 1)
rowidx = dataGridView1.Rows.Count - 1;
}
}
private void cb_api_SelectedIndexChanged(object sender, EventArgs e)
{
cb_filter.Items.Clear();
if (cb_api.SelectedIndex == 0)
{
string[] aladin = { "도서명", "저자", "출판사", "별치조사" };
cb_filter.Items.AddRange(aladin);
}
else
{
string[] sub = { "도서명", "저자", "출판사" };
cb_filter.Items.AddRange(sub);
}
}
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
rowidx = e.RowIndex;
if (rowidx < 0)
{
return;
}
richTextBox1.Text += dataGridView1.Rows[rowidx].Cells["etc"].Value.ToString().Contains("세트분할").ToString();
if (dataGridView1.Rows[rowidx].Cells["api_data"].Value == null)
{
return;
}
richTextBox1.Text = dataGridView1.Rows[rowidx].Cells["api_data"].Value.ToString();
}
private void Check_ISBN_FormClosing(object sender, FormClosingEventArgs e)
{
if (!save)
{
if (UTIL.MsgQ("데이터가 저장되지않았습니다!\n종료하시겠습니까?") == DialogResult.No)
{
e.Cancel = true;
}
}
}
private void btn_yes24_Click(object sender, EventArgs e)
{
var yes = new Check_ISBN_Yes242(this);
yes.Show();
}
private void tb_list_name_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
var search = new Order_input_Search2(this);
search.Where_Open = "book_list";
search.searchText = tb_list_name.Text;
search.OnlyMarc = true;
search.TopMost = true;
search.Show();
}
}
private void btn_ComparePrice_Click(object sender, EventArgs e)
{
int GridCount = dataGridView1.Rows.Count;
for (int a = 0; a < GridCount; a++)
{
string isbn = dataGridView1.Rows[a].Cells["isbn"].Value.ToString();
if (isbn == null || isbn == "") continue;
string unit = dataGridView1.Rows[a].Cells["unit"].Value.ToString();
string price = dataGridView1.Rows[a].Cells["price"].Value.ToString();
if (unit != price)
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Orange;
}
}
private void bs1_CurrentChanged(object sender, EventArgs e)
{
//
var item = bs1.Current as IsbnGridItem;
if (item == null)
{
link_url.Text = "";
}
else
{
link_url.Text = item.search_url;
}
}
private void link_url_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
var url = link_url.Text;
if (url.isEmpty()) return;
System.Diagnostics.Process.Start(url);
}
}
}

View File

@@ -0,0 +1,233 @@
<?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>
<metadata name="idx.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="num.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="book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="search_book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="search_author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="search_book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="unit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="condition.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="etc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="pubDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="persent.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="category.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="sold_out.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="image.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="api_data.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dvc_search_description.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</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>
<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
wQAADsEBuJFr7QAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+
+8H/4IZrWOXAIGPK0/8L933Aqii+5+H/pfv///evvoAhBwcJPU/+T9vyHkNRRPt9sObMWf//e5WewG1A
ZNej/72rP6AoCm29B9bcuu7/f//Ov/9d8g/gNiCw+eH/uvnv4IqCW+7+X7T3//+Odf//Z8z5+d+u7ud/
+4ztuA3wqLr/P3/aGxRFdsW3/6fP+f3fv+vbf53Cd/8tEtbjNsC+9O7/7MmvMRTpp5z/b1L04r9K1qf/
xpHLcBtgkXfnf2r/a6yKDJJO/JdN+/pfN3gehhwcGGbd/h/W8hKnIv3Uy/81fKdhlQMDnbQb//2qH+JV
pOIxAaccg1Pulf8gBXgVDUoAAPB2wKtYlLYeAAAAAElFTkSuQmCC
</value>
</data>
<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
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=
</value>
</data>
<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
8n/2vl//O7f+/e9Wepl0QyK7Hv2fsu3X/5Klf/8nTP/73yb3LGmGBDY//N+69j1Ys3HJl//S0df+G0cu
I94Qj6r7/0vmvoNrVnTpIV4zCNiX3v0f2PKMPM0gYJF3579NwRXyNIOAYdZt8jWDgE7aDfI1D00AAKB+
X6Bjq5qXAAAAAElFTkSuQmCC
</value>
</data>
<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
/w9vf4BVHgwypjz9P2//7/8JXXcwFIHkFu778D+44RqGHBwk9Dz5P3vfr/+dW//+dyu9jKIQJDdty/v/
/tUXcBsQ2fXo/5Rtv/6XLP37P2H63/82uWfhikFyvas//PcqPYHbgMDmh/9b174HazYu+fJfOvraf+PI
ZWANILm6+e/+u+QfwG2AR9X9/yVz38E1K7r0wBWD5PKnvflvn7EdtwH2pXf/B7Y8w9AMk8ue/Pq/RcJ6
3AZY5N35b1NwBUMzTC61/zXcS1iBYdZtrJpBACQX1vLyv27wPKzyYKCTdgOnJEjOr/rhfw3faTjV4AVO
uVf+q3hMAGN0uYEFAL7Rv7NmXVYYAAAAAElFTkSuQmCC
</value>
</data>
</root>

View File

@@ -0,0 +1,356 @@
namespace UniMarc
{
partial class Check_ISBN_ItemEdit
{
private System.ComponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.tb_ISBN = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.tb_BookName = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.tb_SearchBookName = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.tb_Author = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.tb_SearchAuthor = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.tb_BookComp = new System.Windows.Forms.TextBox();
this.label7 = new System.Windows.Forms.Label();
this.tb_SearchBookComp = new System.Windows.Forms.TextBox();
this.label8 = new System.Windows.Forms.Label();
this.tb_Unit = new System.Windows.Forms.TextBox();
this.label9 = new System.Windows.Forms.Label();
this.tb_Price = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.tb_Etc = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.tb_PubDate = new System.Windows.Forms.TextBox();
this.label12 = new System.Windows.Forms.Label();
this.tb_Category = new System.Windows.Forms.TextBox();
this.label13 = new System.Windows.Forms.Label();
this.tb_SoldOut = new System.Windows.Forms.TextBox();
this.btSave = new System.Windows.Forms.Button();
this.btClose = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(45, 12);
this.label1.TabIndex = 0;
this.label1.Text = "ISBN13";
//
// tb_ISBN
//
this.tb_ISBN.Location = new System.Drawing.Point(110, 12);
this.tb_ISBN.Name = "tb_ISBN";
this.tb_ISBN.Size = new System.Drawing.Size(270, 21);
this.tb_ISBN.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 42);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 2;
this.label2.Text = "도서명";
//
// tb_BookName
//
this.tb_BookName.Location = new System.Drawing.Point(110, 39);
this.tb_BookName.Name = "tb_BookName";
this.tb_BookName.Size = new System.Drawing.Size(270, 21);
this.tb_BookName.TabIndex = 3;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 69);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(69, 12);
this.label3.TabIndex = 4;
this.label3.Text = "검색 도서명";
//
// tb_SearchBookName
//
this.tb_SearchBookName.Location = new System.Drawing.Point(110, 66);
this.tb_SearchBookName.Name = "tb_SearchBookName";
this.tb_SearchBookName.Size = new System.Drawing.Size(270, 21);
this.tb_SearchBookName.TabIndex = 5;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 96);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 6;
this.label4.Text = "저자";
//
// tb_Author
//
this.tb_Author.Location = new System.Drawing.Point(110, 93);
this.tb_Author.Name = "tb_Author";
this.tb_Author.Size = new System.Drawing.Size(270, 21);
this.tb_Author.TabIndex = 7;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 123);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(57, 12);
this.label5.TabIndex = 8;
this.label5.Text = "검색 저자";
//
// tb_SearchAuthor
//
this.tb_SearchAuthor.Location = new System.Drawing.Point(110, 120);
this.tb_SearchAuthor.Name = "tb_SearchAuthor";
this.tb_SearchAuthor.Size = new System.Drawing.Size(270, 21);
this.tb_SearchAuthor.TabIndex = 9;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(12, 150);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(41, 12);
this.label6.TabIndex = 10;
this.label6.Text = "출판사";
//
// tb_BookComp
//
this.tb_BookComp.Location = new System.Drawing.Point(110, 147);
this.tb_BookComp.Name = "tb_BookComp";
this.tb_BookComp.Size = new System.Drawing.Size(270, 21);
this.tb_BookComp.TabIndex = 11;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(12, 177);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(69, 12);
this.label7.TabIndex = 12;
this.label7.Text = "검색 출판사";
//
// tb_SearchBookComp
//
this.tb_SearchBookComp.Location = new System.Drawing.Point(110, 174);
this.tb_SearchBookComp.Name = "tb_SearchBookComp";
this.tb_SearchBookComp.Size = new System.Drawing.Size(270, 21);
this.tb_SearchBookComp.TabIndex = 13;
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(12, 204);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(29, 12);
this.label8.TabIndex = 14;
this.label8.Text = "단가";
//
// tb_Unit
//
this.tb_Unit.Location = new System.Drawing.Point(110, 201);
this.tb_Unit.Name = "tb_Unit";
this.tb_Unit.Size = new System.Drawing.Size(270, 21);
this.tb_Unit.TabIndex = 15;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(12, 231);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(29, 12);
this.label9.TabIndex = 16;
this.label9.Text = "정가";
//
// tb_Price
//
this.tb_Price.Location = new System.Drawing.Point(110, 228);
this.tb_Price.Name = "tb_Price";
this.tb_Price.Size = new System.Drawing.Size(270, 21);
this.tb_Price.TabIndex = 17;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(12, 258);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(29, 12);
this.label10.TabIndex = 18;
this.label10.Text = "비고";
//
// tb_Etc
//
this.tb_Etc.Location = new System.Drawing.Point(110, 255);
this.tb_Etc.Name = "tb_Etc";
this.tb_Etc.Size = new System.Drawing.Size(270, 21);
this.tb_Etc.TabIndex = 19;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(12, 285);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(41, 12);
this.label11.TabIndex = 20;
this.label11.Text = "발행일";
//
// tb_PubDate
//
this.tb_PubDate.Location = new System.Drawing.Point(110, 282);
this.tb_PubDate.Name = "tb_PubDate";
this.tb_PubDate.Size = new System.Drawing.Size(270, 21);
this.tb_PubDate.TabIndex = 21;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(12, 312);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(53, 12);
this.label12.TabIndex = 22;
this.label12.Text = "도서분류";
//
// tb_Category
//
this.tb_Category.Location = new System.Drawing.Point(110, 309);
this.tb_Category.Name = "tb_Category";
this.tb_Category.Size = new System.Drawing.Size(270, 21);
this.tb_Category.TabIndex = 23;
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(12, 339);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(59, 12);
this.label13.TabIndex = 24;
this.label13.Text = "품절/절판";
//
// tb_SoldOut
//
this.tb_SoldOut.Location = new System.Drawing.Point(110, 336);
this.tb_SoldOut.Name = "tb_SoldOut";
this.tb_SoldOut.Size = new System.Drawing.Size(270, 21);
this.tb_SoldOut.TabIndex = 25;
//
// btSave
//
this.btSave.Location = new System.Drawing.Point(224, 366);
this.btSave.Name = "btSave";
this.btSave.Size = new System.Drawing.Size(75, 23);
this.btSave.TabIndex = 28;
this.btSave.Text = "저장";
this.btSave.UseVisualStyleBackColor = true;
this.btSave.Click += new System.EventHandler(this.btSave_Click);
//
// btClose
//
this.btClose.Location = new System.Drawing.Point(305, 366);
this.btClose.Name = "btClose";
this.btClose.Size = new System.Drawing.Size(75, 23);
this.btClose.TabIndex = 29;
this.btClose.Text = "닫기";
this.btClose.UseVisualStyleBackColor = true;
this.btClose.Click += new System.EventHandler(this.btClose_Click);
//
// Check_ISBN_ItemEdit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(400, 403);
this.Controls.Add(this.btClose);
this.Controls.Add(this.btSave);
this.Controls.Add(this.tb_SoldOut);
this.Controls.Add(this.label13);
this.Controls.Add(this.tb_Category);
this.Controls.Add(this.label12);
this.Controls.Add(this.tb_PubDate);
this.Controls.Add(this.label11);
this.Controls.Add(this.tb_Etc);
this.Controls.Add(this.label10);
this.Controls.Add(this.tb_Price);
this.Controls.Add(this.label9);
this.Controls.Add(this.tb_Unit);
this.Controls.Add(this.label8);
this.Controls.Add(this.tb_SearchBookComp);
this.Controls.Add(this.label7);
this.Controls.Add(this.tb_BookComp);
this.Controls.Add(this.label6);
this.Controls.Add(this.tb_SearchAuthor);
this.Controls.Add(this.label5);
this.Controls.Add(this.tb_Author);
this.Controls.Add(this.label4);
this.Controls.Add(this.tb_SearchBookName);
this.Controls.Add(this.label3);
this.Controls.Add(this.tb_BookName);
this.Controls.Add(this.label2);
this.Controls.Add(this.tb_ISBN);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.KeyPreview = true;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Check_ISBN_ItemEdit";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "도서 정보 상세 편집";
this.Load += new System.EventHandler(this.Check_ISBN_ItemEdit_Load);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Check_ISBN_ItemEdit_KeyDown);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tb_ISBN;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tb_BookName;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox tb_SearchBookName;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox tb_Author;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox tb_SearchAuthor;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox tb_BookComp;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox tb_SearchBookComp;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.TextBox tb_Unit;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox tb_Price;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox tb_Etc;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox tb_PubDate;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.TextBox tb_Category;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.TextBox tb_SoldOut;
private System.Windows.Forms.Button btSave;
private System.Windows.Forms.Button btClose;
}
}

View File

@@ -0,0 +1,85 @@
using AR;
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 Check_ISBN_ItemEdit : Form
{
private IsbnGridItem _item;
public Check_ISBN_ItemEdit(IsbnGridItem item)
{
InitializeComponent();
_item = item;
}
private void Check_ISBN_ItemEdit_Load(object sender, EventArgs e)
{
if (_item == null)
{
UTIL.MsgE("데이터가 없습니다.");
this.Close();
return;
}
tb_ISBN.Text = _item.isbn;
tb_BookName.Text = _item.book_name;
tb_SearchBookName.Text = _item.search_book_name;
tb_Author.Text = _item.author;
tb_SearchAuthor.Text = _item.search_author;
tb_BookComp.Text = _item.book_comp;
tb_SearchBookComp.Text = _item.search_book_comp;
tb_Unit.Text = _item.unit;
tb_Price.Text = _item.price;
tb_Etc.Text = _item.etc;
tb_PubDate.Text = _item.pubDate;
tb_Category.Text = _item.category;
tb_SoldOut.Text = _item.sold_out;
}
private void btSave_Click(object sender, EventArgs e)
{
_item.isbn = tb_ISBN.Text;
_item.book_name = tb_BookName.Text;
_item.search_book_name = tb_SearchBookName.Text;
_item.author = tb_Author.Text;
_item.search_author = tb_SearchAuthor.Text;
_item.book_comp = tb_BookComp.Text;
_item.search_book_comp = tb_SearchBookComp.Text;
_item.unit = tb_Unit.Text;
_item.price = tb_Price.Text;
_item.etc = tb_Etc.Text;
_item.pubDate = tb_PubDate.Text;
_item.category = tb_Category.Text;
_item.sold_out = tb_SoldOut.Text;
this.DialogResult = DialogResult.OK;
this.Close();
}
private void btClose_Click(object sender, EventArgs e)
{
this.Close();
}
private void Check_ISBN_ItemEdit_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Escape)
{
this.Close();
}
if (e.KeyCode == Keys.Enter)
{
btSave_Click(null, null);
}
}
}
}

View File

@@ -0,0 +1,321 @@
namespace UniMarc
{
partial class Check_ISBN_Sub2
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.btn_Close = new System.Windows.Forms.Button();
this.label5 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.tb_price = new System.Windows.Forms.TextBox();
this.tb_isbn = new System.Windows.Forms.TextBox();
this.tb_book_comp = new System.Windows.Forms.TextBox();
this.tb_author = new System.Windows.Forms.TextBox();
this.tb_book_name = new System.Windows.Forms.TextBox();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pubDate = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.category = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.sold_out = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.SuspendLayout();
//
// btn_Close
//
this.btn_Close.Location = new System.Drawing.Point(727, 24);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(75, 23);
this.btn_Close.TabIndex = 18;
this.btn_Close.Text = "닫 기";
this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(648, 12);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 13;
this.label5.Text = "정가";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(566, 12);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(33, 12);
this.label4.TabIndex = 14;
this.label4.Text = "ISBN";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(462, 12);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 15;
this.label3.Text = "출판사";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(368, 12);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 16;
this.label2.Text = "저자";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(162, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 17;
this.label1.Text = "도서명";
//
// tb_price
//
this.tb_price.Location = new System.Drawing.Point(640, 25);
this.tb_price.Name = "tb_price";
this.tb_price.Size = new System.Drawing.Size(61, 21);
this.tb_price.TabIndex = 8;
//
// tb_isbn
//
this.tb_isbn.Location = new System.Drawing.Point(540, 25);
this.tb_isbn.Name = "tb_isbn";
this.tb_isbn.Size = new System.Drawing.Size(101, 21);
this.tb_isbn.TabIndex = 9;
//
// tb_book_comp
//
this.tb_book_comp.Location = new System.Drawing.Point(440, 25);
this.tb_book_comp.Name = "tb_book_comp";
this.tb_book_comp.Size = new System.Drawing.Size(101, 21);
this.tb_book_comp.TabIndex = 10;
//
// tb_author
//
this.tb_author.Location = new System.Drawing.Point(340, 25);
this.tb_author.Name = "tb_author";
this.tb_author.Size = new System.Drawing.Size(101, 21);
this.tb_author.TabIndex = 11;
//
// tb_book_name
//
this.tb_book_name.Location = new System.Drawing.Point(41, 25);
this.tb_book_name.Name = "tb_book_name";
this.tb_book_name.Size = new System.Drawing.Size(300, 21);
this.tb_book_name.TabIndex = 12;
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.book_name,
this.author,
this.book_comp,
this.isbn,
this.price,
this.pubDate,
this.category,
this.sold_out,
this.Column1});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Name = "dataGridView1";
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
this.dataGridView1.Size = new System.Drawing.Size(964, 357);
this.dataGridView1.TabIndex = 19;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
//
// book_name
//
this.book_name.HeaderText = "도서명";
this.book_name.Name = "book_name";
this.book_name.Width = 300;
//
// author
//
this.author.HeaderText = "저자";
this.author.Name = "author";
//
// book_comp
//
this.book_comp.HeaderText = "출판사";
this.book_comp.Name = "book_comp";
//
// isbn
//
this.isbn.HeaderText = "ISBN";
this.isbn.Name = "isbn";
//
// price
//
this.price.HeaderText = "정가";
this.price.Name = "price";
this.price.Width = 60;
//
// pubDate
//
this.pubDate.HeaderText = "출간일";
this.pubDate.Name = "pubDate";
this.pubDate.Width = 70;
//
// category
//
this.category.HeaderText = "카테고리";
this.category.Name = "category";
//
// sold_out
//
this.sold_out.HeaderText = "품절여부";
this.sold_out.Name = "sold_out";
this.sold_out.Width = 70;
//
// Column1
//
this.Column1.HeaderText = "Column1";
this.Column1.Name = "Column1";
this.Column1.Visible = false;
//
// panel1
//
this.panel1.Controls.Add(this.tb_book_name);
this.panel1.Controls.Add(this.tb_author);
this.panel1.Controls.Add(this.btn_Close);
this.panel1.Controls.Add(this.tb_book_comp);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.tb_isbn);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.tb_price);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.label2);
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(964, 55);
this.panel1.TabIndex = 20;
//
// panel2
//
this.panel2.Controls.Add(this.dataGridView1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 55);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(964, 357);
this.panel2.TabIndex = 21;
//
// Check_ISBN_Sub
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(964, 412);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Name = "Check_ISBN_Sub";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "ISBN 상세 조회";
this.Load += new System.EventHandler(this.Check_ISBN_Sub_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btn_Close;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tb_price;
private System.Windows.Forms.TextBox tb_isbn;
private System.Windows.Forms.TextBox tb_book_comp;
private System.Windows.Forms.TextBox tb_author;
private System.Windows.Forms.TextBox tb_book_name;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn book_name;
private System.Windows.Forms.DataGridViewTextBoxColumn author;
private System.Windows.Forms.DataGridViewTextBoxColumn book_comp;
private System.Windows.Forms.DataGridViewTextBoxColumn isbn;
private System.Windows.Forms.DataGridViewTextBoxColumn price;
private System.Windows.Forms.DataGridViewTextBoxColumn pubDate;
private System.Windows.Forms.DataGridViewTextBoxColumn category;
private System.Windows.Forms.DataGridViewTextBoxColumn sold_out;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
}
}

View File

@@ -0,0 +1,195 @@
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 Check_ISBN_Sub2 : Form
{
Check_ISBN2 ci;
public int row;
public string Call_API = string.Empty;
int rowidx;
public Check_ISBN_Sub2(Check_ISBN2 _ci)
{
InitializeComponent();
ci = _ci;
}
private void btn_Close_Click(object sender, EventArgs e)
{
this.Close();
}
private void Check_ISBN_Sub_Load(object sender, EventArgs e)
{
Sort_data();
same_chk(); // 비슷한거 색깔표시
dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells[0];
this.ActiveControl = dataGridView1;
rowidx = 0;
}
private void Sort_data()
{
tb_book_name.Text = ci.dataGridView1.Rows[row].Cells["book_name"].Value.ToString();
tb_author.Text = ci.dataGridView1.Rows[row].Cells["author"].Value.ToString();
tb_book_comp.Text = ci.dataGridView1.Rows[row].Cells["book_comp"].Value.ToString();
if (ci.dataGridView1.Rows[row].Cells["unit"].Value != null)
tb_price.Text = ci.dataGridView1.Rows[row].Cells["unit"].Value.ToString();
else tb_price.Text = "";
string data = ci.dataGridView1.Rows[row].Cells["api_data"].Value.ToString();
// 도서명 / 저자 / 출판사 / isbn / 출간일 / 카테고리 / 품절여부
string[] tmp = data.Split('|');
string[] grid = { "", "", "", "", "", "", "", "", "" };
int idx = 9;
for(int a= 0; a < tmp.Length; a++)
{
if (a % idx == 0) grid[0] = tmp[a];
if (a % idx == 1) grid[1] = tmp[a];
if (a % idx == 2) grid[2] = tmp[a];
if (a % idx == 3) grid[3] = tmp[a];
if (a % idx == 4) grid[4] = tmp[a];
if (a % idx == 5) grid[5] = change_Date_type(tmp[a]);
if (a % idx == 6) grid[6] = tmp[a];
if (a % idx == 7) grid[7] = tmp[a];
if (a % idx == 8) { grid[8] = tmp[a]; dataGridView1.Rows.Add(grid); }
}
}
private string change_Date_type(string date)
{
if (Call_API == "알라딘")
{
try
{
return String.Format("{0:yyyy/MM/dd}",
DateTime.Parse(date.Remove(date.IndexOf(" G"))));
}
catch { return date; }
}
else if (Call_API == "네이버")
{
if (date.Length < 5)
return date;
return DateTime.ParseExact(date, "yyyyMMdd", null).ToString("yyyy-MM-dd");
}
else
return date;
}
private void same_chk()
{
// 도서명, 저자, 출판사, ISBN, 정가
string[] ori_data = { tb_book_name.Text,
tb_author.Text,
tb_book_comp.Text,
tb_isbn.Text,
tb_price.Text.Replace(",", "") };
for (int a = 0; a < dataGridView1.Rows.Count; a++)
{
int chk_idx = 0;
if (dataGridView1.Rows[a].Cells["book_name"].Value.ToString() == ori_data[0])
{
chk_idx++;
}
if (dataGridView1.Rows[a].Cells["author"].Value.ToString().Contains(ori_data[1]) == true)
{
chk_idx++;
}
if (dataGridView1.Rows[a].Cells["book_comp"].Value.ToString() == ori_data[2])
{
chk_idx++;
}
if (chk_idx >= 2)
{
int pay = Convert.ToInt32(dataGridView1.Rows[a].Cells["price"].Value.ToString());
int price = 0;
if (ori_data[4] != "")
price = Convert.ToInt32(ori_data[4]);
if (price == pay)
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Yellow;
else if (price - 500 < pay && pay < price + 500)
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Orange;
else
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.LightGray;
}
}
}
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
rowidx = e.RowIndex;
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e != null) { rowidx = e.RowIndex; }
string book_name = dataGridView1.Rows[rowidx].Cells["book_name"].Value.ToString();
string author = dataGridView1.Rows[rowidx].Cells["author"].Value.ToString();
string book_comp = dataGridView1.Rows[rowidx].Cells["book_comp"].Value.ToString();
string isbn = dataGridView1.Rows[rowidx].Cells["isbn"].Value.ToString();
string price = dataGridView1.Rows[rowidx].Cells["price"].Value.ToString();
string Date = dataGridView1.Rows[rowidx].Cells["pubDate"].Value.ToString();
string category = dataGridView1.Rows[rowidx].Cells["category"].Value.ToString();
string sold = dataGridView1.Rows[rowidx].Cells["sold_out"].Value.ToString();
string image = dataGridView1.Rows[rowidx].Cells["Column1"].Value.ToString();
ci.dataGridView1.Rows[row].Cells["search_book_name"].Value = book_name;
ci.dataGridView1.Rows[row].Cells["search_author"].Value = author;
ci.dataGridView1.Rows[row].Cells["search_book_comp"].Value = book_comp;
ci.dataGridView1.Rows[row].Cells["isbn"].Value = isbn;
ci.dataGridView1.Rows[row].Cells["price"].Value = price;
ci.dataGridView1.Rows[row].Cells["pubDate"].Value = Date;
ci.dataGridView1.Rows[row].Cells["category"].Value = ci.Aladin_CategorySort(category);
ci.dataGridView1.Rows[row].Cells["sold_out"].Value = sold;
ci.dataGridView1.Rows[row].Cells["image"].Value = image;
ci.dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.Yellow;
this.Close();
}
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter) { dataGridView1_CellDoubleClick(null, null); }
if (e.KeyCode == Keys.Up)
{
rowidx--;
if (rowidx < 0)
rowidx = 0;
}
if (e.KeyCode == Keys.Down)
{
rowidx++;
if (rowidx > dataGridView1.Rows.Count - 1)
rowidx = dataGridView1.Rows.Count - 1;
}
if (e.KeyCode == Keys.Escape)
{
this.Close();
}
}
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
Skill_Grid sg = new Skill_Grid();
sg.Print_Grid_Num(sender, e);
}
}
}

View File

@@ -0,0 +1,147 @@
<?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>
<metadata name="book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="book_comp.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="price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="pubDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="category.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="sold_out.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -11,6 +11,7 @@ using Excel = Microsoft.Office.Interop.Excel;
using System.Reflection; using System.Reflection;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.IO; using System.IO;
using AR;
namespace UniMarc namespace UniMarc
{ {
@@ -170,7 +171,7 @@ namespace UniMarc
application.Interactive = true; application.Interactive = true;
} }
catch (Exception e) { MessageBox.Show(e.Message); } catch (Exception e) { UTIL.MsgE(e.Message); }
} }
#endregion #endregion
@@ -260,7 +261,7 @@ namespace UniMarc
private void webBrowser1_FileDownload(object sender, EventArgs e) private void webBrowser1_FileDownload(object sender, EventArgs e)
{ {
MessageBox.Show("You are in the WebBrowser. FileDownload event."); UTIL.MsgI("You are in the WebBrowser. FileDownload event.");
} }
} }
} }

View File

@@ -0,0 +1,312 @@
namespace UniMarc
{
partial class Check_ISBN_Yes242
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
this.btn_change = new System.Windows.Forms.Button();
this.btn_Close = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.before_book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.after_book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.before_author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.after_author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.before_book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.after_book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1 = new System.Windows.Forms.Panel();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.tb_PW = new System.Windows.Forms.TextBox();
this.tb_ID = new System.Windows.Forms.TextBox();
this.btn_Yes24Connect = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.webBrowser1 = new System.Windows.Forms.WebBrowser();
this.panel3 = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel4.SuspendLayout();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// btn_change
//
this.btn_change.Location = new System.Drawing.Point(423, 11);
this.btn_change.Name = "btn_change";
this.btn_change.Size = new System.Drawing.Size(75, 23);
this.btn_change.TabIndex = 3;
this.btn_change.Text = "엑셀 변환";
this.btn_change.UseVisualStyleBackColor = true;
this.btn_change.Click += new System.EventHandler(this.btn_change_Click);
//
// btn_Close
//
this.btn_Close.Location = new System.Drawing.Point(504, 11);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(75, 23);
this.btn_Close.TabIndex = 4;
this.btn_Close.Text = "닫 기";
this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle3.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.before_book_name,
this.after_book_name,
this.before_author,
this.after_author,
this.before_book_comp,
this.after_book_comp,
this.price});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.ReadOnly = true;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dataGridView1.RowHeadersWidth = 30;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(579, 666);
this.dataGridView1.TabIndex = 0;
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
//
// before_book_name
//
this.before_book_name.HeaderText = "도서명 [전]";
this.before_book_name.Name = "before_book_name";
this.before_book_name.ReadOnly = true;
this.before_book_name.Visible = false;
this.before_book_name.Width = 200;
//
// after_book_name
//
this.after_book_name.HeaderText = "도서명";
this.after_book_name.Name = "after_book_name";
this.after_book_name.ReadOnly = true;
this.after_book_name.Width = 200;
//
// before_author
//
this.before_author.HeaderText = "저자 [전]";
this.before_author.Name = "before_author";
this.before_author.ReadOnly = true;
this.before_author.Visible = false;
//
// after_author
//
this.after_author.HeaderText = "저자";
this.after_author.Name = "after_author";
this.after_author.ReadOnly = true;
//
// before_book_comp
//
this.before_book_comp.HeaderText = "출판사 [전]";
this.before_book_comp.Name = "before_book_comp";
this.before_book_comp.ReadOnly = true;
this.before_book_comp.Visible = false;
this.before_book_comp.Width = 150;
//
// after_book_comp
//
this.after_book_comp.HeaderText = "출판사";
this.after_book_comp.Name = "after_book_comp";
this.after_book_comp.ReadOnly = true;
this.after_book_comp.Width = 150;
//
// price
//
this.price.HeaderText = "금액";
this.price.Name = "price";
this.price.ReadOnly = true;
this.price.Width = 80;
//
// panel1
//
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.tb_PW);
this.panel1.Controls.Add(this.tb_ID);
this.panel1.Controls.Add(this.btn_Yes24Connect);
this.panel1.Controls.Add(this.btn_Close);
this.panel1.Controls.Add(this.btn_change);
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(1316, 46);
this.panel1.TabIndex = 0;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(729, 16);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(23, 12);
this.label2.TabIndex = 7;
this.label2.Text = "PW";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(595, 16);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(16, 12);
this.label1.TabIndex = 7;
this.label1.Text = "ID";
//
// tb_PW
//
this.tb_PW.Location = new System.Drawing.Point(754, 12);
this.tb_PW.Name = "tb_PW";
this.tb_PW.Size = new System.Drawing.Size(100, 21);
this.tb_PW.TabIndex = 1;
//
// tb_ID
//
this.tb_ID.Location = new System.Drawing.Point(613, 12);
this.tb_ID.Name = "tb_ID";
this.tb_ID.Size = new System.Drawing.Size(100, 21);
this.tb_ID.TabIndex = 0;
//
// btn_Yes24Connect
//
this.btn_Yes24Connect.Location = new System.Drawing.Point(867, 5);
this.btn_Yes24Connect.Name = "btn_Yes24Connect";
this.btn_Yes24Connect.Size = new System.Drawing.Size(99, 35);
this.btn_Yes24Connect.TabIndex = 2;
this.btn_Yes24Connect.Text = "Yes24 다중검색\r\n접속";
this.btn_Yes24Connect.UseVisualStyleBackColor = true;
this.btn_Yes24Connect.Click += new System.EventHandler(this.btn_Yes24Connect_Click);
//
// panel2
//
this.panel2.Controls.Add(this.panel4);
this.panel2.Controls.Add(this.panel3);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 46);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1316, 666);
this.panel2.TabIndex = 5;
//
// panel4
//
this.panel4.Controls.Add(this.webBrowser1);
this.panel4.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel4.Location = new System.Drawing.Point(579, 0);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(737, 666);
this.panel4.TabIndex = 3;
//
// webBrowser1
//
this.webBrowser1.Dock = System.Windows.Forms.DockStyle.Fill;
this.webBrowser1.Location = new System.Drawing.Point(0, 0);
this.webBrowser1.MinimumSize = new System.Drawing.Size(20, 20);
this.webBrowser1.Name = "webBrowser1";
this.webBrowser1.ScriptErrorsSuppressed = true;
this.webBrowser1.Size = new System.Drawing.Size(737, 666);
this.webBrowser1.TabIndex = 0;
this.webBrowser1.DocumentCompleted += new System.Windows.Forms.WebBrowserDocumentCompletedEventHandler(this.webBrowser1_DocumentCompleted);
//
// panel3
//
this.panel3.Controls.Add(this.dataGridView1);
this.panel3.Dock = System.Windows.Forms.DockStyle.Left;
this.panel3.Location = new System.Drawing.Point(0, 0);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(579, 666);
this.panel3.TabIndex = 3;
//
// Check_ISBN_Yes24
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1316, 712);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Name = "Check_ISBN_Yes24";
this.Text = "Yes24양식";
this.Load += new System.EventHandler(this.Check_ISBN_Yes24_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
this.panel4.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Button btn_change;
private System.Windows.Forms.Button btn_Close;
public System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Panel panel4;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.DataGridViewTextBoxColumn before_book_name;
private System.Windows.Forms.DataGridViewTextBoxColumn after_book_name;
private System.Windows.Forms.DataGridViewTextBoxColumn before_author;
private System.Windows.Forms.DataGridViewTextBoxColumn after_author;
private System.Windows.Forms.DataGridViewTextBoxColumn before_book_comp;
private System.Windows.Forms.DataGridViewTextBoxColumn after_book_comp;
private System.Windows.Forms.DataGridViewTextBoxColumn price;
private System.Windows.Forms.WebBrowser webBrowser1;
private System.Windows.Forms.Button btn_Yes24Connect;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tb_PW;
private System.Windows.Forms.TextBox tb_ID;
}
}

View File

@@ -0,0 +1,267 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
using System.Reflection;
using System.Text.RegularExpressions;
using System.IO;
using AR;
namespace UniMarc
{
public partial class Check_ISBN_Yes242 : Form
{
Helper_DB db = new Helper_DB();
Check_ISBN2 isbn;
List<string> l_target = new List<string>();
List<string> l_before = new List<string>();
List<string> l_after = new List<string>();
public Check_ISBN_Yes242(Check_ISBN2 _isbn)
{
InitializeComponent();
isbn = _isbn;
}
private void Check_ISBN_Yes24_Load(object sender, EventArgs e)
{
db.DBcon();
Take_DataBase();
Base_Setting();
}
#region Load_Sub
private void Take_DataBase()
{
string area = "`target`, `before`, `after`";
string cmd = db.DB_Select_Search(area, "yes24");
string db_res = db.DB_Send_CMD_Search(cmd);
string[] ary_tmp = db_res.Split('|');
for(int a = 0; a < ary_tmp.Length; a++)
{
if (a % 3 == 0) { l_target.Add(ary_tmp[a]); }
if (a % 3 == 1) { l_before.Add(ary_tmp[a]); }
if (a % 3 == 2) { l_after.Add(ary_tmp[a]); }
}
}
private void Base_Setting()
{
int count = isbn.dataGridView1.Rows.Count;
for (int a = 0; a < count; a++)
{
string book_name = isbn.dataGridView1.Rows[a].Cells["book_name"].Value.ToString();
string author = isbn.dataGridView1.Rows[a].Cells["author"].Value.ToString();
string book_comp = isbn.dataGridView1.Rows[a].Cells["book_comp"].Value.ToString();
string unit = isbn.dataGridView1.Rows[a].Cells["unit"].Value.ToString();
string[] grid = {
book_name, Replace_target(book_name, "book_name"),
author, Replace_target(author, "author"),
book_comp, Replace_target(book_comp, "book_comp"),
unit
};
dataGridView1.Rows.Add(grid);
}
dataGridView1.Columns[0].DefaultCellStyle.BackColor = Color.Bisque;
dataGridView1.Columns[1].DefaultCellStyle.BackColor = Color.FromArgb(234, 226, 202);
dataGridView1.Columns[2].DefaultCellStyle.BackColor = Color.Bisque;
dataGridView1.Columns[3].DefaultCellStyle.BackColor = Color.FromArgb(234, 226, 202);
dataGridView1.Columns[4].DefaultCellStyle.BackColor = Color.Bisque;
dataGridView1.Columns[5].DefaultCellStyle.BackColor = Color.FromArgb(234, 226, 202);
}
private string Replace_target(string value, string sort)
{
try
{
int start = value.IndexOf('(');
int end = value.IndexOf(')');
value = value.Remove(start, end - start);
start = value.IndexOf('[');
end = value.IndexOf(']');
value = value.Remove(start, end - start);
start = value.IndexOf('<');
end = value.IndexOf('>');
value = value.Remove(start, end - start);
}
catch { }
string[] target = l_target.ToArray();
string[] before = l_before.ToArray();
string[] after = l_after.ToArray();
for (int a = 0; a < before.Length; a++)
{
if (target[a] == sort)
value = value.Replace(before[a], after[a]);
}
return value;
}
#endregion
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
Skill_Grid sg = new Skill_Grid();
sg.Print_Grid_Num(sender, e);
}
private void btn_change_Click(object sender, EventArgs e)
{
string[,] grid = new string[dataGridView1.Rows.Count, 6];
for(int a= 0; a < dataGridView1.Rows.Count; a++)
{
int count = a + 1;
string price = dataGridView1.Rows[a].Cells["price"].Value.ToString();
grid[a, 0] = count.ToString();
grid[a, 1] = dataGridView1.Rows[a].Cells["after_book_name"].Value.ToString();
grid[a, 2] = dataGridView1.Rows[a].Cells["after_author"].Value.ToString();
grid[a, 3] = dataGridView1.Rows[a].Cells["after_book_comp"].Value.ToString();
grid[a, 4] = Regex.Replace(price, @"[^0-9]", "");
grid[a, 5] = "1";
}
Excel_change(grid);
}
#region
private void Excel_change(string[,] grid)
{
string DesktopPath =
Environment.GetFolderPath(Environment.SpecialFolder.Desktop); // 바탕화면 경로
string FilePath =
Path.Combine(DesktopPath, "Excel.xlsx"); // 엑셀 파일 저장 경로
try
{
Excel.Application application = new Excel.Application();
application.Visible = true;
application.Interactive = false;
Excel._Workbook wb = application.Workbooks.Add(Missing.Value);
Excel._Worksheet ws = (Excel._Worksheet)application.ActiveSheet;
Excel.Range rng = null;
#region ( )
ws.Columns[1].ColumnWidth = 6.57;
ws.Columns[2].ColumnWidth = 43.86;
ws.Columns[3].ColumnWidth = 18.43;
ws.Columns[4].ColumnWidth = 22.57;
ws.Columns[5].ColumnWidth = 12.57;
#endregion
string[] title = { "번호", "도서명", "ISBN", "출판사", "정가", "수량" };
#region
rng = ws.Range["A1", "F1"];
rng.Value2 = title;
rng.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;
rng.Font.Bold = true;
int count = dataGridView1.Rows.Count + 1;
rng = ws.Range["A2", "F" + count.ToString()];
rng.Value2 = grid;
rng.HorizontalAlignment = Excel.XlHAlign.xlHAlignCenter;
#endregion
application.Interactive = true;
}
catch (Exception e) { UTIL.MsgE(e.Message); }
}
#endregion
private void btn_Close_Click(object sender, EventArgs e)
{
this.Close();
}
private void btn_Yes24Connect_Click(object sender, EventArgs e)
{
webBrowser1.Navigate("http://www.yes24.com/Mall/CorpLargeOrder/CorpMain");
}
private void webBrowser1_DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
string url = webBrowser1.Url.AbsoluteUri;
if (url.IndexOf("yes24.com/Main") > -1)
webBrowser1.Navigate("http://www.yes24.com/Mall/CorpLargeOrder/CorpMain");
if (url.IndexOf("CorpLargeOrder/CorpMain") > -1)
if (isLogin())
webBrowser1.Navigate("https://www.yes24.com/Templates/FTLogin.aspx");
else
ExcelUpLoadSearch();
if (url.IndexOf("FTLogin") > -1)
Login();
}
#region DocumentCompleted Sub
bool isLogin()
{
string InnerText = "";
foreach (HtmlElement li in webBrowser1.Document.GetElementsByTagName("li"))
{
if (li.Id == null)
continue;
if (li.Id.IndexOf("LoginText") > -1)
{
if (li.InnerText.IndexOf("로그") > -1)
{
InnerText = li.InnerText;
break;
}
}
}
if (InnerText.IndexOf("로그인") > -1)
return true;
return false;
}
void ExcelUpLoadSearch()
{
webBrowser1.Navigate("http://www.yes24.com/Mall/CorpLargeOrder/ExcelUploadSearch");
}
void Login()
{
foreach (HtmlElement input in webBrowser1.Document.GetElementsByTagName("input"))
{
if (input.Id == null)
continue;
if (input.Id == "SMemberID")
input.SetAttribute("value", tb_ID.Text);
if (input.Id == "SMemberPassword")
input.SetAttribute("value", tb_PW.Text);
}
foreach (HtmlElement btn in webBrowser1.Document.GetElementsByTagName("button"))
{
if (btn.Id == null)
continue;
if (btn.Id.IndexOf("btnLogin") > -1)
btn.InvokeMember("click");
}
}
#endregion
private void webBrowser1_FileDownload(object sender, EventArgs e)
{
UTIL.MsgI("You are in the WebBrowser. FileDownload event.");
}
}
}

View File

@@ -0,0 +1,141 @@
<?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>
<metadata name="before_book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="after_book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="before_author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="after_author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="before_book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="after_book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -139,7 +139,7 @@ namespace UniMarc
if (BookSearchCount == "false") if (BookSearchCount == "false")
{ {
MessageBox.Show("검색대상이 설정되지않았습니다!"); UTIL.MsgE("검색대상이 설정되지않았습니다!");
return; return;
} }
@@ -190,7 +190,7 @@ namespace UniMarc
if (RowCount == SearchCount.Value) if (RowCount == SearchCount.Value)
{ {
webBrowser1.DocumentCompleted -= this.webBrowser1_DocumentCompleted; webBrowser1.DocumentCompleted -= this.webBrowser1_DocumentCompleted;
MessageBox.Show("조사가 완료되었습니다!"); UTIL.MsgI("조사가 완료되었습니다!");
RowCount = 0; RowCount = 0;
return; return;
} }
@@ -1575,7 +1575,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.ToString()); UTIL.MsgE(ex.ToString());
} }
} }
} }

View File

@@ -258,6 +258,7 @@ namespace UniMarc
_searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "124003", "무등도서관")); _searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "124003", "무등도서관"));
_searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "124004", "사직도서관")); _searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "124004", "사직도서관"));
_searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "124008", "산수도서관")); _searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "124008", "산수도서관"));
_searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "129232", "하남도서관"));
_searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "129228", "디지털정보도서관")); _searchService.AddSearcher(new GwangjuCityLibSearcher(idx++, "129228", "디지털정보도서관"));
// 완도군립도서관 // 완도군립도서관
@@ -468,8 +469,7 @@ namespace UniMarc
// Chrome 설치 확인 // Chrome 설치 확인
if (!SeleniumHelper.IsBrowserInstalled()) if (!SeleniumHelper.IsBrowserInstalled())
{ {
MessageBox.Show("Google Chrome / Microsoft Edge 이(가) 설치되어 있지 않습니다. 브라우저를 설치한 후 프로그램을 다시 실행해주세요.", UTIL.MsgE("Google Chrome / Microsoft Edge 이(가) 설치되어 있지 않습니다. 브라우저를 설치한 후 프로그램을 다시 실행해주세요.");
"Chrome 필요", MessageBoxButtons.OK, MessageBoxIcon.Warning);
lblStatus.Text = "WebDriver: 브라우저가 설치되지 않음"; lblStatus.Text = "WebDriver: 브라우저가 설치되지 않음";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
return; return;
@@ -507,8 +507,7 @@ namespace UniMarc
{ {
lblStatus.Text = "WebDriver:드라이버 테스트 실패"; lblStatus.Text = "WebDriver:드라이버 테스트 실패";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
MessageBox.Show("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요.", UTIL.MsgE("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요.");
"드라이버 오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
catch (OperationCanceledException) catch (OperationCanceledException)
@@ -521,8 +520,7 @@ namespace UniMarc
{ {
lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
MessageBox.Show($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}", UTIL.MsgE($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}");
"설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
} }
@@ -534,8 +532,7 @@ namespace UniMarc
{ {
lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
MessageBox.Show($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}", UTIL.MsgE($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}");
"설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
#endregion #endregion
@@ -862,7 +859,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.ToString()); UTIL.MsgE(ex.ToString());
} }
} }
} }

View File

@@ -52,6 +52,7 @@
this.btn_Search = new System.Windows.Forms.Button(); this.btn_Search = new System.Windows.Forms.Button();
this.rBtn_BookName = new System.Windows.Forms.RadioButton(); this.rBtn_BookName = new System.Windows.Forms.RadioButton();
this.panel2 = new System.Windows.Forms.Panel(); 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_SiteDenote = new System.Windows.Forms.Button();
this.btn_Connect = new System.Windows.Forms.Button(); this.btn_Connect = new System.Windows.Forms.Button();
this.lbl_PW = new System.Windows.Forms.Label(); this.lbl_PW = new System.Windows.Forms.Label();
@@ -61,7 +62,6 @@
this.tb_SearchClient = new System.Windows.Forms.TextBox(); this.tb_SearchClient = new System.Windows.Forms.TextBox();
this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.lblStatus = new System.Windows.Forms.ToolStripLabel(); this.lblStatus = new System.Windows.Forms.ToolStripLabel();
this.btn_Close = new System.Windows.Forms.Button();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.panel8.SuspendLayout(); this.panel8.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dv1)).BeginInit();
@@ -92,7 +92,7 @@
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.panel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; 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; this.panel1.TabIndex = 1;
// //
// panel8 // panel8
@@ -101,7 +101,7 @@
this.panel8.Dock = System.Windows.Forms.DockStyle.Fill; this.panel8.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel8.Location = new System.Drawing.Point(0, 103); this.panel8.Location = new System.Drawing.Point(0, 103);
this.panel8.Name = "panel8"; 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; this.panel8.TabIndex = 5;
// //
// dv1 // dv1
@@ -119,7 +119,7 @@
this.dv1.Name = "dv1"; this.dv1.Name = "dv1";
this.dv1.RowHeadersWidth = 31; this.dv1.RowHeadersWidth = 31;
this.dv1.RowTemplate.Height = 23; 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.TabIndex = 0;
this.dv1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); this.dv1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
this.dv1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); 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.Dock = System.Windows.Forms.DockStyle.Top;
this.panel5.Location = new System.Drawing.Point(0, 68); this.panel5.Location = new System.Drawing.Point(0, 68);
this.panel5.Name = "panel5"; 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; this.panel5.TabIndex = 4;
// //
// btn_ResultEmpty // btn_ResultEmpty
@@ -209,8 +209,7 @@
// //
// btn_ApplyFilter // 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(259, 4);
this.btn_ApplyFilter.Location = new System.Drawing.Point(258, 4);
this.btn_ApplyFilter.Name = "btn_ApplyFilter"; this.btn_ApplyFilter.Name = "btn_ApplyFilter";
this.btn_ApplyFilter.Size = new System.Drawing.Size(75, 24); this.btn_ApplyFilter.Size = new System.Drawing.Size(75, 24);
this.btn_ApplyFilter.TabIndex = 5; this.btn_ApplyFilter.TabIndex = 5;
@@ -232,7 +231,7 @@
this.panel3.Dock = System.Windows.Forms.DockStyle.Top; this.panel3.Dock = System.Windows.Forms.DockStyle.Top;
this.panel3.Location = new System.Drawing.Point(0, 33); this.panel3.Location = new System.Drawing.Point(0, 33);
this.panel3.Name = "panel3"; 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; this.panel3.TabIndex = 4;
// //
// label3 // label3
@@ -254,11 +253,10 @@
// //
// chkShowBrowser // chkShowBrowser
// //
this.chkShowBrowser.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chkShowBrowser.AutoSize = true; this.chkShowBrowser.AutoSize = true;
this.chkShowBrowser.Checked = true; this.chkShowBrowser.Checked = true;
this.chkShowBrowser.CheckState = System.Windows.Forms.CheckState.Checked; 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.Name = "chkShowBrowser";
this.chkShowBrowser.Size = new System.Drawing.Size(96, 16); this.chkShowBrowser.Size = new System.Drawing.Size(96, 16);
this.chkShowBrowser.TabIndex = 209; this.chkShowBrowser.TabIndex = 209;
@@ -331,13 +329,22 @@
this.panel2.Dock = System.Windows.Forms.DockStyle.Top; this.panel2.Dock = System.Windows.Forms.DockStyle.Top;
this.panel2.Location = new System.Drawing.Point(0, 0); this.panel2.Location = new System.Drawing.Point(0, 0);
this.panel2.Name = "panel2"; 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; 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 // 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(480, 5);
this.btn_SiteDenote.Location = new System.Drawing.Point(479, 5);
this.btn_SiteDenote.Name = "btn_SiteDenote"; this.btn_SiteDenote.Name = "btn_SiteDenote";
this.btn_SiteDenote.Size = new System.Drawing.Size(77, 23); this.btn_SiteDenote.Size = new System.Drawing.Size(77, 23);
this.btn_SiteDenote.TabIndex = 6; this.btn_SiteDenote.TabIndex = 6;
@@ -347,8 +354,7 @@
// //
// btn_Connect // 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(407, 5);
this.btn_Connect.Location = new System.Drawing.Point(406, 5);
this.btn_Connect.Name = "btn_Connect"; this.btn_Connect.Name = "btn_Connect";
this.btn_Connect.Size = new System.Drawing.Size(70, 23); this.btn_Connect.Size = new System.Drawing.Size(70, 23);
this.btn_Connect.TabIndex = 5; this.btn_Connect.TabIndex = 5;
@@ -394,12 +400,10 @@
// //
// tb_SearchClient // 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.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.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.TabIndex = 1;
this.tb_SearchClient.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_SearchClient_KeyDown); this.tb_SearchClient.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_SearchClient_KeyDown);
// //
@@ -410,7 +414,7 @@
this.lblStatus}); this.lblStatus});
this.statusStrip1.Location = new System.Drawing.Point(0, 699); this.statusStrip1.Location = new System.Drawing.Point(0, 699);
this.statusStrip1.Name = "statusStrip1"; 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.TabIndex = 3;
this.statusStrip1.Text = "statusStrip1"; this.statusStrip1.Text = "statusStrip1";
// //
@@ -421,21 +425,11 @@
this.lblStatus.Text = "WD"; this.lblStatus.Text = "WD";
this.lblStatus.Click += new System.EventHandler(this.lblStatus_Click); 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 // DLS_Copy
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 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.panel1);
this.Controls.Add(this.statusStrip1); this.Controls.Add(this.statusStrip1);
this.Name = "DLS_Copy"; this.Name = "DLS_Copy";

View File

@@ -1,4 +1,5 @@
using BokBonCheck; using AR;
using BokBonCheck;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -67,8 +68,7 @@ namespace UniMarc
// Chrome 설치 확인 // Chrome 설치 확인
if (!SeleniumHelper.IsBrowserInstalled()) if (!SeleniumHelper.IsBrowserInstalled())
{ {
MessageBox.Show("Google Chrome / Microsoft Edge 이(가) 설치되어 있지 않습니다. 브라우저를 설치한 후 프로그램을 다시 실행해주세요.", UTIL.MsgE("Google Chrome / Microsoft Edge 이(가) 설치되어 있지 않습니다. 브라우저를 설치한 후 프로그램을 다시 실행해주세요.");
"Chrome 필요", MessageBoxButtons.OK, MessageBoxIcon.Warning);
lblStatus.Text = "WebDriver: 브라우저가 설치되지 않음"; lblStatus.Text = "WebDriver: 브라우저가 설치되지 않음";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
return; return;
@@ -103,8 +103,7 @@ namespace UniMarc
{ {
lblStatus.Text = "WebDriver:드라이버 테스트 실패"; lblStatus.Text = "WebDriver:드라이버 테스트 실패";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
MessageBox.Show("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요.", UTIL.MsgE("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요.");
"드라이버 오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
catch (OperationCanceledException) catch (OperationCanceledException)
@@ -117,8 +116,7 @@ namespace UniMarc
{ {
lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
MessageBox.Show($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}", UTIL.MsgE($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}");
"설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
} }
@@ -130,8 +128,7 @@ namespace UniMarc
{ {
lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
MessageBox.Show($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}", UTIL.MsgE($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}");
"설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
#endregion #endregion
@@ -160,6 +157,7 @@ namespace UniMarc
private void ClientSearch() private void ClientSearch()
{ {
Commodity_Search cs = new Commodity_Search(this); Commodity_Search cs = new Commodity_Search(this);
cs.StartPosition = FormStartPosition.CenterScreen;
cs.Clinet_name = tb_SearchClient.Text; cs.Clinet_name = tb_SearchClient.Text;
cs.Show(); cs.Show();
} }
@@ -169,12 +167,12 @@ namespace UniMarc
{ {
if (lbl_Client.Text == "Client") if (lbl_Client.Text == "Client")
{ {
MessageBox.Show("납품처명을 선택해주세요"); UTIL.MsgE("납품처명을 선택해주세요");
return; return;
} }
if (lbl_Area.Text == "") if (lbl_Area.Text == "")
{ {
MessageBox.Show("설정된 지역이 없습니다. 납품처 관리에서 확인해주세요."); UTIL.MsgE("설정된 지역이 없습니다. 납품처 관리에서 확인해주세요.");
return; return;
} }
@@ -196,12 +194,12 @@ namespace UniMarc
{ {
if (dv1.Rows[0].Cells["ISBN"].Value == null && rBtn_ISBN.Checked) if (dv1.Rows[0].Cells["ISBN"].Value == null && rBtn_ISBN.Checked)
{ {
MessageBox.Show("ISBN이 입력되지않았습니다!"); UTIL.MsgE("ISBN이 입력되지않았습니다!");
return; return;
} }
if (dv1.Rows[0].Cells["Book_name"].Value == null && rBtn_BookName.Checked) if (dv1.Rows[0].Cells["Book_name"].Value == null && rBtn_BookName.Checked)
{ {
MessageBox.Show("도서명이 입력되지않았습니다!"); UTIL.MsgE("도서명이 입력되지않았습니다!");
return; return;
} }
if (_searcher == null) if (_searcher == null)
@@ -240,7 +238,7 @@ namespace UniMarc
} }
MessageBox.Show("완료되었습니다."); UTIL.MsgI("완료되었습니다.");
} }

View File

@@ -129,18 +129,6 @@
<metadata name="dvc_Remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="dvc_Remark.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </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"> <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value> <value>17, 17</value>
</metadata> </metadata>

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -83,12 +84,12 @@ namespace UniMarc
{ {
if (lbl_Client.Text == "Client") if (lbl_Client.Text == "Client")
{ {
MessageBox.Show("납품처명을 선택해주세요"); UTIL.MsgE("납품처명을 선택해주세요");
return; return;
} }
if (lbl_Area.Text == "") if (lbl_Area.Text == "")
{ {
MessageBox.Show("설정된 지역이 없습니다. 납품처 관리에서 확인해주세요."); UTIL.MsgE("설정된 지역이 없습니다. 납품처 관리에서 확인해주세요.");
return; return;
} }
@@ -106,7 +107,7 @@ namespace UniMarc
{ {
if (lbl_ID.Text == "" || lbl_PW.Text == "") if (lbl_ID.Text == "" || lbl_PW.Text == "")
{ {
MessageBox.Show("ID 혹은 PW가 없습니다."); UTIL.MsgE("ID 혹은 PW가 없습니다.");
return; return;
} }
string ID = lbl_ID.Text, PW = lbl_PW.Text; string ID = lbl_ID.Text, PW = lbl_PW.Text;
@@ -152,7 +153,21 @@ namespace UniMarc
} }
if (move) 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]; return Code[idx];
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
@@ -179,7 +180,7 @@ namespace UniMarc
int result = combo1_res.ToList().FindIndex(x => x == value); int result = combo1_res.ToList().FindIndex(x => x == value);
if (result == -1) if (result == -1)
{ {
MessageBox.Show(String.Format("이용대상자수준을 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo1[0], combo1_res[0]), "경고"); UTIL.MsgE(String.Format("이용대상자수준을 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo1[0], combo1_res[0]));
result = 0; result = 0;
} }
return result; return result;
@@ -201,7 +202,7 @@ namespace UniMarc
int result = combo2_res.ToList().FindIndex(x=>x==value); int result = combo2_res.ToList().FindIndex(x=>x==value);
if (result == -1) if (result == -1)
{ {
MessageBox.Show(String.Format("개별자료형태를 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo2[0], combo2_res[0]), "경고"); UTIL.MsgE(String.Format("개별자료형태를 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo2[0], combo2_res[0]));
result = 0; result = 0;
} }
return result; return result;
@@ -227,7 +228,7 @@ namespace UniMarc
int result = combo3_res.ToList().FindIndex(x => x == value); int result = combo3_res.ToList().FindIndex(x => x == value);
if (result == -1) if (result == -1)
{ {
MessageBox.Show(String.Format("내용형식을 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo3[0], combo3_res[0]), "경고"); UTIL.MsgE(String.Format("내용형식을 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo3[0], combo3_res[0]));
result = 0; result = 0;
} }
return result; return result;
@@ -252,7 +253,7 @@ namespace UniMarc
int result = combo4_res.ToList().FindIndex(x => x == value); int result = combo4_res.ToList().FindIndex(x => x == value);
if (result == -1) if (result == -1)
{ {
MessageBox.Show(String.Format("문학형식을 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo4[0], combo4_res[0]), "경고"); UTIL.MsgE(String.Format("문학형식을 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo4[0], combo4_res[0]));
result = 0; result = 0;
} }
return result; return result;
@@ -274,7 +275,7 @@ namespace UniMarc
int result = combo5_res.ToList().FindIndex(x => x == value); int result = combo5_res.ToList().FindIndex(x => x == value);
if (result == -1) if (result == -1)
{ {
MessageBox.Show(String.Format("전기형식을 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo5[0], combo5_res[0]), "경고"); UTIL.MsgE(String.Format("전기형식을 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo5[0], combo5_res[0]));
result = 0; result = 0;
} }
return result; return result;
@@ -303,7 +304,7 @@ namespace UniMarc
int result = combo6_res.ToList().FindIndex(x => x == value); int result = combo6_res.ToList().FindIndex(x => x == value);
if (result == -1) if (result == -1)
{ {
MessageBox.Show(String.Format("언어형식을 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo6[0], combo6_res[0]), "경고"); UTIL.MsgE(String.Format("언어형식을 찾지 못했습니다.\r\n기본값 ={0}({1}) 으로 설정됩니다.\r\n올바른 데이터로 선택하시길 바랍니다.", combo6[0], combo6_res[0]));
result = 0; result = 0;
} }
return result; return result;

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -50,7 +51,7 @@ namespace UniMarc
catch(Exception ex) catch(Exception ex)
{ {
//  // 
MessageBox.Show(ex.ToString()); UTIL.MsgE(ex.ToString());
} }
} }
tb_filePath.Text = file_path; tb_filePath.Text = file_path;
@@ -167,9 +168,9 @@ namespace UniMarc
string Incmd = db.DB_INSERT(table, col, data); string Incmd = db.DB_INSERT(table, col, data);
Helper_DB.ExcuteNonQuery(Incmd); Helper_DB.ExcuteNonQuery(Incmd);
} }
catch (Exception ex) { MessageBox.Show(ex.Message); } catch (Exception ex) { UTIL.MsgE(ex.Message); }
} }
MessageBox.Show("DB 저장 완료!"); UTIL.MsgI("DB 저장 완료!");
} }
private void btn_close_Click(object sender, EventArgs e) private void btn_close_Click(object sender, EventArgs e)

View File

@@ -62,12 +62,14 @@
this.btn_Delete = new System.Windows.Forms.Button(); this.btn_Delete = new System.Windows.Forms.Button();
this.btn_AddList = new System.Windows.Forms.Button(); this.btn_AddList = new System.Windows.Forms.Button();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.panel11 = new System.Windows.Forms.Panel();
this.button2 = new System.Windows.Forms.Button();
this.btnSearchISBN = new System.Windows.Forms.Button();
this.panel10 = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
this.panel12 = new System.Windows.Forms.Panel(); this.panel12 = new System.Windows.Forms.Panel();
this.chkEditorTest = new System.Windows.Forms.CheckBox(); this.chkEditorTest = new System.Windows.Forms.CheckBox();
this.panel13 = new System.Windows.Forms.Panel(); this.panel13 = new System.Windows.Forms.Panel();
this.panel11 = new System.Windows.Forms.Panel();
this.btnSearchISBN = new System.Windows.Forms.Button();
this.panel10 = new System.Windows.Forms.Panel();
this.panel9 = new System.Windows.Forms.Panel(); this.panel9 = new System.Windows.Forms.Panel();
this.panel8 = new System.Windows.Forms.Panel(); this.panel8 = new System.Windows.Forms.Panel();
this.panel7 = new System.Windows.Forms.Panel(); this.panel7 = new System.Windows.Forms.Panel();
@@ -77,10 +79,8 @@
this.panel3 = new System.Windows.Forms.Panel(); this.panel3 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.bn1 = new System.Windows.Forms.BindingNavigator(this.components); 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.bs1 = new System.Windows.Forms.BindingSource(this.components);
this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel(); this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel();
this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator(); this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator();
@@ -89,6 +89,7 @@
this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton();
this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator(); this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator();
this.btEdit = new System.Windows.Forms.ToolStripButton();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
@@ -404,18 +405,24 @@
// //
// btn_AddList // btn_AddList
// //
this.btn_AddList.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.btn_AddList.Dock = System.Windows.Forms.DockStyle.Right; this.btn_AddList.Dock = System.Windows.Forms.DockStyle.Right;
this.btn_AddList.Location = new System.Drawing.Point(968, 5); this.btn_AddList.Location = new System.Drawing.Point(954, 5);
this.btn_AddList.Margin = new System.Windows.Forms.Padding(1); this.btn_AddList.Margin = new System.Windows.Forms.Padding(1);
this.btn_AddList.Name = "btn_AddList"; this.btn_AddList.Name = "btn_AddList";
this.btn_AddList.Size = new System.Drawing.Size(74, 27); this.btn_AddList.Size = new System.Drawing.Size(88, 27);
this.btn_AddList.TabIndex = 50; this.btn_AddList.TabIndex = 50;
this.btn_AddList.Text = "목록생성"; this.btn_AddList.Text = "목록등록(구)";
this.btn_AddList.UseVisualStyleBackColor = true; this.btn_AddList.UseVisualStyleBackColor = false;
this.btn_AddList.Click += new System.EventHandler(this.btn_AddList_Click); this.btn_AddList.Click += new System.EventHandler(this.btn_AddList_Click);
// //
// panel1 // panel1
// //
this.panel1.Controls.Add(this.panel11);
this.panel1.Controls.Add(this.button2);
this.panel1.Controls.Add(this.btnSearchISBN);
this.panel1.Controls.Add(this.panel10);
this.panel1.Controls.Add(this.button1);
this.panel1.Controls.Add(this.btn_Lookup); this.panel1.Controls.Add(this.btn_Lookup);
this.panel1.Controls.Add(this.panel12); this.panel1.Controls.Add(this.panel12);
this.panel1.Controls.Add(this.chkEditorTest); this.panel1.Controls.Add(this.chkEditorTest);
@@ -423,9 +430,6 @@
this.panel1.Controls.Add(this.cb_state); this.panel1.Controls.Add(this.cb_state);
this.panel1.Controls.Add(this.label2); this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.tb_Search); this.panel1.Controls.Add(this.tb_Search);
this.panel1.Controls.Add(this.panel11);
this.panel1.Controls.Add(this.btnSearchISBN);
this.panel1.Controls.Add(this.panel10);
this.panel1.Controls.Add(this.btn_AddList); this.panel1.Controls.Add(this.btn_AddList);
this.panel1.Controls.Add(this.panel9); this.panel1.Controls.Add(this.panel9);
this.panel1.Controls.Add(this.btn_Merge); this.panel1.Controls.Add(this.btn_Merge);
@@ -449,6 +453,61 @@
this.panel1.Size = new System.Drawing.Size(1638, 34); this.panel1.Size = new System.Drawing.Size(1638, 34);
this.panel1.TabIndex = 52; this.panel1.TabIndex = 52;
// //
// panel11
//
this.panel11.Dock = System.Windows.Forms.DockStyle.Right;
this.panel11.Location = new System.Drawing.Point(696, 5);
this.panel11.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel11.Name = "panel11";
this.panel11.Size = new System.Drawing.Size(8, 27);
this.panel11.TabIndex = 61;
//
// button2
//
this.button2.Dock = System.Windows.Forms.DockStyle.Right;
this.button2.Location = new System.Drawing.Point(704, 5);
this.button2.Margin = new System.Windows.Forms.Padding(1);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(74, 27);
this.button2.TabIndex = 65;
this.button2.Text = "ISBN조회";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// btnSearchISBN
//
this.btnSearchISBN.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
this.btnSearchISBN.Dock = System.Windows.Forms.DockStyle.Right;
this.btnSearchISBN.Location = new System.Drawing.Point(778, 5);
this.btnSearchISBN.Margin = new System.Windows.Forms.Padding(1);
this.btnSearchISBN.Name = "btnSearchISBN";
this.btnSearchISBN.Size = new System.Drawing.Size(94, 27);
this.btnSearchISBN.TabIndex = 50;
this.btnSearchISBN.Text = "ISBN조회(구)";
this.btnSearchISBN.UseVisualStyleBackColor = false;
this.btnSearchISBN.Click += new System.EventHandler(this.btnSearchISBN_Click);
//
// panel10
//
this.panel10.Dock = System.Windows.Forms.DockStyle.Right;
this.panel10.Location = new System.Drawing.Point(872, 5);
this.panel10.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel10.Name = "panel10";
this.panel10.Size = new System.Drawing.Size(8, 27);
this.panel10.TabIndex = 60;
//
// button1
//
this.button1.Dock = System.Windows.Forms.DockStyle.Right;
this.button1.Location = new System.Drawing.Point(880, 5);
this.button1.Margin = new System.Windows.Forms.Padding(1);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(74, 27);
this.button1.TabIndex = 64;
this.button1.Text = "목록등록";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// panel12 // panel12
// //
this.panel12.Dock = System.Windows.Forms.DockStyle.Left; this.panel12.Dock = System.Windows.Forms.DockStyle.Left;
@@ -481,36 +540,6 @@
this.panel13.Size = new System.Drawing.Size(8, 27); this.panel13.Size = new System.Drawing.Size(8, 27);
this.panel13.TabIndex = 63; this.panel13.TabIndex = 63;
// //
// panel11
//
this.panel11.Dock = System.Windows.Forms.DockStyle.Right;
this.panel11.Location = new System.Drawing.Point(878, 5);
this.panel11.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel11.Name = "panel11";
this.panel11.Size = new System.Drawing.Size(8, 27);
this.panel11.TabIndex = 61;
//
// btnSearchISBN
//
this.btnSearchISBN.Dock = System.Windows.Forms.DockStyle.Right;
this.btnSearchISBN.Location = new System.Drawing.Point(886, 5);
this.btnSearchISBN.Margin = new System.Windows.Forms.Padding(1);
this.btnSearchISBN.Name = "btnSearchISBN";
this.btnSearchISBN.Size = new System.Drawing.Size(74, 27);
this.btnSearchISBN.TabIndex = 50;
this.btnSearchISBN.Text = "ISBN조회";
this.btnSearchISBN.UseVisualStyleBackColor = true;
this.btnSearchISBN.Click += new System.EventHandler(this.btnSearchISBN_Click);
//
// panel10
//
this.panel10.Dock = System.Windows.Forms.DockStyle.Right;
this.panel10.Location = new System.Drawing.Point(960, 5);
this.panel10.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
this.panel10.Name = "panel10";
this.panel10.Size = new System.Drawing.Size(8, 27);
this.panel10.TabIndex = 60;
//
// panel9 // panel9
// //
this.panel9.Dock = System.Windows.Forms.DockStyle.Right; this.panel9.Dock = System.Windows.Forms.DockStyle.Right;
@@ -586,10 +615,10 @@
// //
// bn1 // bn1
// //
this.bn1.AddNewItem = this.bindingNavigatorAddNewItem; this.bn1.AddNewItem = null;
this.bn1.BindingSource = this.bs1; this.bn1.BindingSource = this.bs1;
this.bn1.CountItem = this.bindingNavigatorCountItem; this.bn1.CountItem = this.bindingNavigatorCountItem;
this.bn1.DeleteItem = this.bindingNavigatorDeleteItem; this.bn1.DeleteItem = null;
this.bn1.Dock = System.Windows.Forms.DockStyle.Bottom; this.bn1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.bn1.ImageScalingSize = new System.Drawing.Size(20, 20); this.bn1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.bn1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.bn1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -602,8 +631,7 @@
this.bindingNavigatorMoveNextItem, this.bindingNavigatorMoveNextItem,
this.bindingNavigatorMoveLastItem, this.bindingNavigatorMoveLastItem,
this.bindingNavigatorSeparator2, this.bindingNavigatorSeparator2,
this.bindingNavigatorAddNewItem, this.btEdit});
this.bindingNavigatorDeleteItem});
this.bn1.Location = new System.Drawing.Point(0, 597); this.bn1.Location = new System.Drawing.Point(0, 597);
this.bn1.MoveFirstItem = this.bindingNavigatorMoveFirstItem; this.bn1.MoveFirstItem = this.bindingNavigatorMoveFirstItem;
this.bn1.MoveLastItem = this.bindingNavigatorMoveLastItem; this.bn1.MoveLastItem = this.bindingNavigatorMoveLastItem;
@@ -615,15 +643,6 @@
this.bn1.TabIndex = 49; this.bn1.TabIndex = 49;
this.bn1.Text = "bindingNavigator1"; 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(24, 24);
this.bindingNavigatorAddNewItem.Text = "새로 추가";
//
// bindingNavigatorCountItem // bindingNavigatorCountItem
// //
this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem";
@@ -631,15 +650,6 @@
this.bindingNavigatorCountItem.Text = "/{0}"; this.bindingNavigatorCountItem.Text = "/{0}";
this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수"; 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(24, 24);
this.bindingNavigatorDeleteItem.Text = "삭제";
//
// bindingNavigatorMoveFirstItem // bindingNavigatorMoveFirstItem
// //
this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
@@ -701,6 +711,15 @@
this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2"; this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2";
this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 27); this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 27);
// //
// btEdit
//
this.btEdit.Image = ((System.Drawing.Image)(resources.GetObject("btEdit.Image")));
this.btEdit.ImageTransparentColor = System.Drawing.Color.Magenta;
this.btEdit.Name = "btEdit";
this.btEdit.Size = new System.Drawing.Size(93, 24);
this.btEdit.Text = "정보편집(&E)";
this.btEdit.Click += new System.EventHandler(this.btEdit_Click);
//
// Mac_List // Mac_List
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -772,10 +791,8 @@
private System.Windows.Forms.Panel panel3; private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Panel panel13; private System.Windows.Forms.Panel panel13;
private System.Windows.Forms.BindingNavigator bn1; private System.Windows.Forms.BindingNavigator bn1;
private System.Windows.Forms.ToolStripButton bindingNavigatorAddNewItem;
private System.Windows.Forms.BindingSource bs1; private System.Windows.Forms.BindingSource bs1;
private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem; private System.Windows.Forms.ToolStripLabel bindingNavigatorCountItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorDeleteItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem; private System.Windows.Forms.ToolStripButton bindingNavigatorMoveFirstItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem; private System.Windows.Forms.ToolStripButton bindingNavigatorMovePreviousItem;
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator; private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator;
@@ -784,5 +801,8 @@
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem; private System.Windows.Forms.ToolStripButton bindingNavigatorMoveNextItem;
private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem; private System.Windows.Forms.ToolStripButton bindingNavigatorMoveLastItem;
private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2; private System.Windows.Forms.ToolStripSeparator bindingNavigatorSeparator2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.ToolStripButton btEdit;
public System.Windows.Forms.Button button2;
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -72,7 +73,7 @@ namespace UniMarc
"AND `chk_marc` > 0;", "AND `chk_marc` > 0;",
Area, table, compidx, search, state); Area, table, compidx, search, state);
DataTable dt = Helper_DB.ExecuteQueryData(cmd); DataTable dt = Helper_DB.ExecuteDataTable(cmd);
List<MacListItem> items = new List<MacListItem>(); List<MacListItem> items = new List<MacListItem>();
if (dt == null || dt.Rows.Count == 0) if (dt == null || dt.Rows.Count == 0)
@@ -115,7 +116,7 @@ namespace UniMarc
private void btn_Save_Click(object sender, EventArgs e) private void btn_Save_Click(object sender, EventArgs e)
{ {
if (MessageBox.Show("선택사항을 저장하시겠습니까?", "저장", MessageBoxButtons.YesNo) == DialogResult.No) if (UTIL.MsgQ("선택사항을 저장하시겠습니까?") == DialogResult.No)
return; return;
string table = "Obj_List"; string table = "Obj_List";
@@ -138,7 +139,7 @@ namespace UniMarc
} }
} }
bs1.ResetBindings(false); bs1.ResetBindings(false);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
} }
private void btn_Excel_Click(object sender, EventArgs e) private void btn_Excel_Click(object sender, EventArgs e)
@@ -183,7 +184,7 @@ namespace UniMarc
bool hasProgress = items.Any(i => i.check == "V" && i.state == "진행"); bool hasProgress = items.Any(i => i.check == "V" && i.state == "진행");
if (hasProgress) if (hasProgress)
{ {
MessageBox.Show("체크된 목록이 현재 진행중입니다."); UTIL.MsgE("체크된 목록이 현재 진행중입니다.");
return; return;
} }
@@ -193,7 +194,7 @@ namespace UniMarc
state_Save_Object(item); state_Save_Object(item);
} }
MessageBox.Show("진행처리되었습니다.", "목록진행"); UTIL.MsgI("진행처리되었습니다.");
btn_Lookup_Click(null, null); btn_Lookup_Click(null, null);
} }
@@ -203,7 +204,7 @@ namespace UniMarc
bool hasCompletion = items.Any(i => i.check == "V" && i.state == "완료"); bool hasCompletion = items.Any(i => i.check == "V" && i.state == "완료");
if (hasCompletion) if (hasCompletion)
{ {
MessageBox.Show("체크된 목록은 현재 완료되어있습니다."); UTIL.MsgE("체크된 목록은 현재 완료되어있습니다.");
return; return;
} }
@@ -213,7 +214,7 @@ namespace UniMarc
state_Save_Object(item); state_Save_Object(item);
} }
MessageBox.Show("완료처리되었습니다.", "목록완료"); UTIL.MsgI("완료처리되었습니다.");
btn_Lookup_Click(null, null); btn_Lookup_Click(null, null);
} }
@@ -237,7 +238,7 @@ namespace UniMarc
private void btn_Delete_Click(object sender, EventArgs e) private void btn_Delete_Click(object sender, EventArgs e)
{ {
if (MessageBox.Show("정말로 삭제하시겠습니까?", "삭제경고", MessageBoxButtons.YesNo) == DialogResult.No) { return; } if (UTIL.MsgQ("정말로 삭제하시겠습니까?") == DialogResult.No) { return; }
List<MacListItem> items = bs1.List.Cast<MacListItem>().ToList(); List<MacListItem> items = bs1.List.Cast<MacListItem>().ToList();
foreach (var item in items.Where(i => i.check == "V")) foreach (var item in items.Where(i => i.check == "V"))
@@ -252,7 +253,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(D_cmd); Helper_DB.ExcuteNonQuery(D_cmd);
} }
MessageBox.Show("삭제되었습니다."); UTIL.MsgI("삭제되었습니다.");
btn_Lookup_Click(null, null); btn_Lookup_Click(null, null);
} }
@@ -273,8 +274,7 @@ namespace UniMarc
{ {
if (chkEditorTest.Checked == false) if (chkEditorTest.Checked == false)
{ {
var marc = this.main.OpenFormInTab(() => new Marc2(this), allowMultiple: true); var marc = this.main.OpenFormInTab(() => new Marc2(item), allowMultiple: true);
marc.input_list(item);
} }
else else
{ {
@@ -323,5 +323,40 @@ namespace UniMarc
var isbn = main.OpenFormInTab(() => new Check_ISBN(main, tSearchText, tSearchIDX)); var isbn = main.OpenFormInTab(() => new Check_ISBN(main, tSearchText, tSearchIDX));
isbn.tb_list_name.Enabled = true; isbn.tb_list_name.Enabled = true;
} }
private void button1_Click(object sender, EventArgs e)
{
var listAdd = new Mac_List_Add2(this);
listAdd.Show();
}
private void btEdit_Click(object sender, EventArgs e)
{
var item = bs1.Current as MacListItem;
if (item == null)
{
UTIL.MsgE("대상을 먼저 선택하세요.");
return;
}
using (var edit = new Mac_List_Edit(this, item))
{
if (edit.ShowDialog() == DialogResult.OK)
{
btn_Lookup_Click(null, null);
}
}
}
private void button2_Click(object sender, EventArgs e)
{
var item = bs1.Current as MacListItem;
if (item == null) return;
string tSearchText = item.list_name;
string tSearchIDX = item.idx;
var isbn = main.OpenFormInTab(() => new Check_ISBN2( tSearchText, tSearchIDX));
isbn.tb_list_name.Enabled = true;
}
} }
} }

View File

@@ -165,38 +165,14 @@
<metadata name="bn1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <metadata name="bn1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>154, 17</value> <value>154, 17</value>
</metadata> </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
wAAADsABataJCQAAAVdJREFUOE/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"> <metadata name="bs1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>308, 17</value> <value>308, 17</value>
</metadata> </metadata>
<data name="bindingNavigatorDeleteItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wAAADsABataJCQAAAWtJREFUOE+1kE0ow2Ecx/9X5a2UiwtKOSCTmJBMhuQlMo3IvCUHDouEXHZwIOVC
DrhIDiQl5USy07zNa2tKf2laaRf84/J8xBCetab4XL/f76fn+SnKX4DrGLqrwbHDzywkWJlHdJYjLEbY
Wg8q4eYKlma+d1hbgF4TotWIaC+FuYmAktcXCksx2HrknBOHX1KbiTDngrXhW0kMdSBM2TA5Io+/wuI0
oiz5TcRwB7hPYazfLx3rDz7+gCsXNBb4v1SdgajTQ19TaOMP2NtFmPSIilSo0v1y7FHBnAdZMWi6aO51
kVCTGZoEzzWYciA/Dl9bBZwfvh3XmxIJy7PBJdx5odnAQ2E87qJUfPbtzwGjVpxJEWjH+4ElPD/BYBsY
EjhKicW3sSoVb0vSUFsq0W6upUxhdxMtOxZnYhhqVz1oj3JJUZSdpCg0p0POmLKhJofjNqaDeikX3tFG
uuHsQM65cML4ABzY5fA/eQGKIwMcVjm2bAAAAABJRU5ErkJggg==
</value>
</data>
<data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="bindingNavigatorMoveFirstItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wAAADsABataJCQAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+ vAAADrwBlbxySQAAATFJREFUOE9jYBg0oHDW8/9NC57/z5z4+D+6HAyEtz/AKceQO/PZ/1VH3v/HpSi+
+8H/4IZrWOXAIGPK0/8L933Aqii+5+H/pfv///evvoAhBwcJPU/+T9vyHkNRRPt9sObMWf//e5WewG1A +8H/4IZrWOXAIGPK0/8L933Aqii+5+H/pfv///evvoAhBwcJPU/+T9vyHkNRRPt9sObMWf//e5WewG1A
ZNej/72rP6AoCm29B9bcuu7/f//Ov/9d8g/gNiCw+eH/uvnv4IqCW+7+X7T3//+Odf//Z8z5+d+u7ud/ ZNej/72rP6AoCm29B9bcuu7/f//Ov/9d8g/gNiCw+eH/uvnv4IqCW+7+X7T3//+Odf//Z8z5+d+u7ud/
+4ztuA3wqLr/P3/aGxRFdsW3/6fP+f3fv+vbf53Cd/8tEtbjNsC+9O7/7MmvMRTpp5z/b1L04r9K1qf/ +4ztuA3wqLr/P3/aGxRFdsW3/6fP+f3fv+vbf53Cd/8tEtbjNsC+9O7/7MmvMRTpp5z/b1L04r9K1qf/
@@ -207,7 +183,7 @@
<data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wAAADsABataJCQAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/8EN18gzIL7n4f+l+///96++QLoBEe33 vAAADrwBlbxySQAAALtJREFUOE9jYBgyILz9wX90MaJBfPeD/8EN18gzIL7n4f+l+///96++QLoBEe33
wZozZ/3/71V6gjQDQlvvgTW3rvv/37/z73+X/APEGxDccvf/or3//3es+/8/Y87P/3Z1P//bZ2wn3gAQ wZozZ/3/71V6gjQDQlvvgTW3rvv/37/z73+X/APEGxDccvf/or3//3es+/8/Y87P/3Z1P//bZ2wn3gAQ
sCu+/T99zu///l3f/usUvvtvkbCeNANAQD/l/H+Tohf/VbI+/TeOXEa6ASBgkHTiv2za1/+6wfPIMwAE sCu+/T99zu///l3f/usUvvtvkbCeNANAQD/l/H+Tohf/VbI+/TeOXEa6ASBgkHTiv2za1/+6wfPIMwAE
9FMv/9fwnUa+ASCg4jGBMgMGLwAA0BRgmCws/7cAAAAASUVORK5CYII= 9FMv/9fwnUa+ASCg4jGBMgMGLwAA0BRgmCws/7cAAAAASUVORK5CYII=
@@ -216,7 +192,7 @@
<data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wAAADsABataJCQAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5 vAAADrwBlbxySQAAAKRJREFUOE9jYBh0oHDW8//oYiSB3JnP/id03yPfkIwpT//P2//7f0LXHfIMSeh5
8n/2vl//O7f+/e9Wepl0QyK7Hv2fsu3X/5Klf/8nTP/73yb3LGmGBDY//N+69j1Ys3HJl//S0df+G0cu 8n/2vl//O7f+/e9Wepl0QyK7Hv2fsu3X/5Klf/8nTP/73yb3LGmGBDY//N+69j1Ys3HJl//S0df+G0cu
I94Qj6r7/0vmvoNrVnTpIV4zCNiX3v0f2PKMPM0gYJF3579NwRXyNIOAYdZt8jWDgE7aDfI1D00AAKB+ I94Qj6r7/0vmvoNrVnTpIV4zCNiX3v0f2PKMPM0gYJF3579NwRXyNIOAYdZt8jWDgE7aDfI1D00AAKB+
X6Bjq5qXAAAAAElFTkSuQmCC X6Bjq5qXAAAAAElFTkSuQmCC
@@ -225,12 +201,27 @@
<data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
wAAADsABataJCQAAAStJREFUOE9jYBhUoHDW8//oYjAAkmta8Px/5sTHONUw5M589j+h+x5WBSC5VUfe vAAADrwBlbxySQAAAStJREFUOE9jYBhUoHDW8//oYjAAkmta8Px/5sTHONUw5M589j+h+x5WBSC5VUfe
/w9vf4BVHgwypjz9P2//7/8JXXcwFIHkFu778D+44RqGHBwk9Dz5P3vfr/+dW//+dyu9jKIQJDdty/v/ /w9vf4BVHgwypjz9P2//7/8JXXcwFIHkFu778D+44RqGHBwk9Dz5P3vfr/+dW//+dyu9jKIQJDdty/v/
/tUXcBsQ2fXo/5Rtv/6XLP37P2H63/82uWfhikFyvas//PcqPYHbgMDmh/9b174HazYu+fJfOvraf+PI /tUXcBsQ2fXo/5Rtv/6XLP37P2H63/82uWfhikFyvas//PcqPYHbgMDmh/9b174HazYu+fJfOvraf+PI
ZWANILm6+e/+u+QfwG2AR9X9/yVz38E1K7r0wBWD5PKnvflvn7EdtwH2pXf/B7Y8w9AMk8ue/Pq/RcJ6 ZWANILm6+e/+u+QfwG2AR9X9/yVz38E1K7r0wBWD5PKnvflvn7EdtwH2pXf/B7Y8w9AMk8ue/Pq/RcJ6
3AZY5N35b1NwBUMzTC61/zXcS1iBYdZtrJpBACQX1vLyv27wPKzyYKCTdgOnJEjOr/rhfw3faTjV4AVO 3AZY5N35b1NwBUMzTC61/zXcS1iBYdZtrJpBACQX1vLyv27wPKzyYKCTdgOnJEjOr/rhfw3faTjV4AVO
uVf+q3hMAGN0uYEFAL7Rv7NmXVYYAAAAAElFTkSuQmCC uVf+q3hMAGN0uYEFAL7Rv7NmXVYYAAAAAElFTkSuQmCC
</value>
</data>
<data name="btEdit.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIFSURBVDhPpZLtS1NhGMbPPxJmmlYSgqHiKzGU1EDxg4iK
YKyG2WBogqMYJQOtCEVRFBGdTBCJfRnkS4VaaWNT5sqx1BUxRXxDHYxAJLvkusEeBaPAB+5z4Jzn+t3X
/aLhnEfjo8m+dCoa+7/C3O2Hqe0zDC+8KG+cRZHZhdzaaWTVTCLDMIY0vfM04Nfh77/G/sEhwpEDbO3t
I7TxE8urEVy99fT/AL5gWDLrTB/hnF4XsW0khCu5ln8DmJliT2AXrcNBsU1gj/MH4nMeKwBrPktM28xM
cX79DFKrHHD5d9D26hvicx4pABt2lpg10zYzU0zr7+e3xXGcrkEB2O2TNec9nJFwB3alZn5jZorfeDZh
6Q3g8s06BeCoKF4MRURoH1+BY2oNCbeb0TIclIYxOhzf8frTOuo7FxCbbVIAzpni0iceEc8vhzEwGkJD
lx83ymxifejdKjRNk/8PWnyIyTQqAJek0jqHwfEVscu31baIu8+90sTE4nY025dQ2/5FIPpnXlzKuK8A
HBUzHot52djqQ6HZhfR7IwK4mKpHtvEDMqvfCiQ6zaAAXM8x94aIWTNrLLG4kVUzgaTSPlzLtyJOZxbb
1wtfyg4Q+AfA3aZlButjSfxGcUJBk4g5tuP3haQKRKXcUQDOmbvNTpPOJeFFjordZmbWTNvMTHFUcpUC
nOccAdABIDXXE1nzAAAAAElFTkSuQmCC
</value> </value>
</data> </data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View File

@@ -55,16 +55,16 @@ namespace UniMarc
this.tb_divComp = new System.Windows.Forms.TextBox(); this.tb_divComp = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.header = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.header = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.num = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.num = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.BookName = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.BookName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Author = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.BookComp = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.BookComp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Total = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Total = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
@@ -91,18 +91,16 @@ namespace UniMarc
this.panel1.Controls.Add(this.tb_divComp); this.panel1.Controls.Add(this.tb_divComp);
this.panel1.Dock = System.Windows.Forms.DockStyle.Top; this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
this.panel1.Location = new System.Drawing.Point(0, 0); this.panel1.Location = new System.Drawing.Point(0, 0);
this.panel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panel1.Name = "panel1"; this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1025, 73); this.panel1.Size = new System.Drawing.Size(897, 59);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
// //
// tbCustomIDX // tbCustomIDX
// //
this.tbCustomIDX.Location = new System.Drawing.Point(200, 6); this.tbCustomIDX.Location = new System.Drawing.Point(175, 5);
this.tbCustomIDX.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tbCustomIDX.Name = "tbCustomIDX"; this.tbCustomIDX.Name = "tbCustomIDX";
this.tbCustomIDX.ReadOnly = true; this.tbCustomIDX.ReadOnly = true;
this.tbCustomIDX.Size = new System.Drawing.Size(75, 25); this.tbCustomIDX.Size = new System.Drawing.Size(66, 21);
this.tbCustomIDX.TabIndex = 15; this.tbCustomIDX.TabIndex = 15;
this.tbCustomIDX.TabStop = false; this.tbCustomIDX.TabStop = false;
this.tbCustomIDX.TextAlign = System.Windows.Forms.HorizontalAlignment.Center; this.tbCustomIDX.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
@@ -110,9 +108,9 @@ namespace UniMarc
// label5 // label5
// //
this.label5.AutoSize = true; this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(677, 44); this.label5.Location = new System.Drawing.Point(592, 35);
this.label5.Name = "label5"; this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(67, 15); this.label5.Size = new System.Drawing.Size(53, 12);
this.label5.TabIndex = 14; this.label5.TabIndex = 14;
this.label5.Text = "쉼표구분"; this.label5.Text = "쉼표구분";
// //
@@ -120,18 +118,16 @@ namespace UniMarc
// //
this.cb_Gubun.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cb_Gubun.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_Gubun.FormattingEnabled = true; this.cb_Gubun.FormattingEnabled = true;
this.cb_Gubun.Location = new System.Drawing.Point(739, 39); this.cb_Gubun.Location = new System.Drawing.Point(647, 31);
this.cb_Gubun.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.cb_Gubun.Name = "cb_Gubun"; this.cb_Gubun.Name = "cb_Gubun";
this.cb_Gubun.Size = new System.Drawing.Size(85, 23); this.cb_Gubun.Size = new System.Drawing.Size(75, 20);
this.cb_Gubun.TabIndex = 6; this.cb_Gubun.TabIndex = 6;
// //
// btn_DelRow // btn_DelRow
// //
this.btn_DelRow.Location = new System.Drawing.Point(640, 5); this.btn_DelRow.Location = new System.Drawing.Point(560, 4);
this.btn_DelRow.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btn_DelRow.Name = "btn_DelRow"; this.btn_DelRow.Name = "btn_DelRow";
this.btn_DelRow.Size = new System.Drawing.Size(93, 29); this.btn_DelRow.Size = new System.Drawing.Size(81, 23);
this.btn_DelRow.TabIndex = 5; this.btn_DelRow.TabIndex = 5;
this.btn_DelRow.Text = "선택 셀 삭제"; this.btn_DelRow.Text = "선택 셀 삭제";
this.btn_DelRow.UseVisualStyleBackColor = true; this.btn_DelRow.UseVisualStyleBackColor = true;
@@ -139,10 +135,9 @@ namespace UniMarc
// //
// btn_Upload // btn_Upload
// //
this.btn_Upload.Location = new System.Drawing.Point(832, 38); this.btn_Upload.Location = new System.Drawing.Point(728, 30);
this.btn_Upload.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btn_Upload.Name = "btn_Upload"; this.btn_Upload.Name = "btn_Upload";
this.btn_Upload.Size = new System.Drawing.Size(86, 29); this.btn_Upload.Size = new System.Drawing.Size(75, 23);
this.btn_Upload.TabIndex = 7; this.btn_Upload.TabIndex = 7;
this.btn_Upload.Text = "txt불러오기"; this.btn_Upload.Text = "txt불러오기";
this.btn_Upload.UseVisualStyleBackColor = true; this.btn_Upload.UseVisualStyleBackColor = true;
@@ -152,18 +147,16 @@ namespace UniMarc
// //
this.cb_User.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cb_User.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_User.FormattingEnabled = true; this.cb_User.FormattingEnabled = true;
this.cb_User.Location = new System.Drawing.Point(517, 6); this.cb_User.Location = new System.Drawing.Point(452, 5);
this.cb_User.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.cb_User.Name = "cb_User"; this.cb_User.Name = "cb_User";
this.cb_User.Size = new System.Drawing.Size(93, 23); this.cb_User.Size = new System.Drawing.Size(82, 20);
this.cb_User.TabIndex = 2; this.cb_User.TabIndex = 2;
// //
// btClose // btClose
// //
this.btClose.Location = new System.Drawing.Point(925, 5); this.btClose.Location = new System.Drawing.Point(809, 4);
this.btClose.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btClose.Name = "btClose"; this.btClose.Name = "btClose";
this.btClose.Size = new System.Drawing.Size(86, 29); this.btClose.Size = new System.Drawing.Size(75, 23);
this.btClose.TabIndex = 8; this.btClose.TabIndex = 8;
this.btClose.Text = "닫 기"; this.btClose.Text = "닫 기";
this.btClose.UseVisualStyleBackColor = true; this.btClose.UseVisualStyleBackColor = true;
@@ -171,10 +164,9 @@ namespace UniMarc
// //
// btn_Empty // btn_Empty
// //
this.btn_Empty.Location = new System.Drawing.Point(739, 5); this.btn_Empty.Location = new System.Drawing.Point(647, 4);
this.btn_Empty.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btn_Empty.Name = "btn_Empty"; this.btn_Empty.Name = "btn_Empty";
this.btn_Empty.Size = new System.Drawing.Size(86, 29); this.btn_Empty.Size = new System.Drawing.Size(75, 23);
this.btn_Empty.TabIndex = 4; this.btn_Empty.TabIndex = 4;
this.btn_Empty.Text = "비 우 기"; this.btn_Empty.Text = "비 우 기";
this.btn_Empty.UseVisualStyleBackColor = true; this.btn_Empty.UseVisualStyleBackColor = true;
@@ -182,10 +174,9 @@ namespace UniMarc
// //
// btSave // btSave
// //
this.btSave.Location = new System.Drawing.Point(832, 5); this.btSave.Location = new System.Drawing.Point(728, 4);
this.btSave.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btSave.Name = "btSave"; this.btSave.Name = "btSave";
this.btSave.Size = new System.Drawing.Size(86, 29); this.btSave.Size = new System.Drawing.Size(75, 23);
this.btSave.TabIndex = 3; this.btSave.TabIndex = 3;
this.btSave.Text = "저 장"; this.btSave.Text = "저 장";
this.btSave.UseVisualStyleBackColor = true; this.btSave.UseVisualStyleBackColor = true;
@@ -194,37 +185,36 @@ namespace UniMarc
// label3 // label3
// //
this.label3.AutoSize = true; this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(467, 11); this.label3.Location = new System.Drawing.Point(409, 9);
this.label3.Name = "label3"; this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(52, 15); this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 13; this.label3.TabIndex = 13;
this.label3.Text = "담당자"; this.label3.Text = "담당자";
// //
// label2 // label2
// //
this.label2.AutoSize = true; this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(294, 11); this.label2.Location = new System.Drawing.Point(257, 9);
this.label2.Name = "label2"; this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(52, 15); this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 11; this.label2.TabIndex = 11;
this.label2.Text = "납품명"; this.label2.Text = "납품명";
// //
// label4 // label4
// //
this.label4.AutoSize = true; this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(31, 44); this.label4.Location = new System.Drawing.Point(27, 35);
this.label4.Name = "label4"; this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(102, 15); this.label4.Size = new System.Drawing.Size(81, 12);
this.label4.TabIndex = 10; this.label4.TabIndex = 10;
this.label4.Text = "생성될 목록명"; this.label4.Text = "생성될 목록명";
// //
// btCustom // btCustom
// //
this.btCustom.AutoSize = true; this.btCustom.AutoSize = true;
this.btCustom.Location = new System.Drawing.Point(6, 5); this.btCustom.Location = new System.Drawing.Point(5, 4);
this.btCustom.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.btCustom.Name = "btCustom"; this.btCustom.Name = "btCustom";
this.btCustom.Size = new System.Drawing.Size(71, 31); this.btCustom.Size = new System.Drawing.Size(62, 25);
this.btCustom.TabIndex = 9; this.btCustom.TabIndex = 9;
this.btCustom.Text = "납품처"; this.btCustom.Text = "납품처";
this.btCustom.Click += new System.EventHandler(this.label1_Click); this.btCustom.Click += new System.EventHandler(this.label1_Click);
@@ -232,27 +222,24 @@ namespace UniMarc
// tb_ExpectList // tb_ExpectList
// //
this.tb_ExpectList.Enabled = false; this.tb_ExpectList.Enabled = false;
this.tb_ExpectList.Location = new System.Drawing.Point(130, 39); this.tb_ExpectList.Location = new System.Drawing.Point(114, 31);
this.tb_ExpectList.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tb_ExpectList.Name = "tb_ExpectList"; this.tb_ExpectList.Name = "tb_ExpectList";
this.tb_ExpectList.Size = new System.Drawing.Size(285, 25); this.tb_ExpectList.Size = new System.Drawing.Size(250, 21);
this.tb_ExpectList.TabIndex = 12; this.tb_ExpectList.TabIndex = 12;
// //
// tb_divName // tb_divName
// //
this.tb_divName.Location = new System.Drawing.Point(343, 6); this.tb_divName.Location = new System.Drawing.Point(300, 5);
this.tb_divName.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tb_divName.Name = "tb_divName"; this.tb_divName.Name = "tb_divName";
this.tb_divName.Size = new System.Drawing.Size(114, 25); this.tb_divName.Size = new System.Drawing.Size(100, 21);
this.tb_divName.TabIndex = 1; this.tb_divName.TabIndex = 1;
this.tb_divName.TextChanged += new System.EventHandler(this.Delivery_TextChanged); this.tb_divName.TextChanged += new System.EventHandler(this.Delivery_TextChanged);
// //
// tb_divComp // tb_divComp
// //
this.tb_divComp.Location = new System.Drawing.Point(79, 6); this.tb_divComp.Location = new System.Drawing.Point(69, 5);
this.tb_divComp.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.tb_divComp.Name = "tb_divComp"; this.tb_divComp.Name = "tb_divComp";
this.tb_divComp.Size = new System.Drawing.Size(114, 25); this.tb_divComp.Size = new System.Drawing.Size(100, 21);
this.tb_divComp.TabIndex = 0; this.tb_divComp.TabIndex = 0;
this.tb_divComp.TextChanged += new System.EventHandler(this.Delivery_TextChanged); this.tb_divComp.TextChanged += new System.EventHandler(this.Delivery_TextChanged);
this.tb_divComp.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_divComp_KeyDown); this.tb_divComp.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_divComp_KeyDown);
@@ -261,10 +248,9 @@ namespace UniMarc
// //
this.panel2.Controls.Add(this.dataGridView1); this.panel2.Controls.Add(this.dataGridView1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 73); this.panel2.Location = new System.Drawing.Point(0, 59);
this.panel2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1025, 777); this.panel2.Size = new System.Drawing.Size(897, 621);
this.panel2.TabIndex = 1; this.panel2.TabIndex = 1;
// //
// dataGridView1 // dataGridView1
@@ -286,20 +272,23 @@ namespace UniMarc
this.BookName, this.BookName,
this.Author, this.Author,
this.BookComp, this.BookComp,
this.Price,
this.Count, this.Count,
this.Price,
this.Total, this.Total,
this.ISBN}); this.ISBN});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill; this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 0); this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(1025, 777); this.dataGridView1.Size = new System.Drawing.Size(897, 621);
this.dataGridView1.TabIndex = 1; this.dataGridView1.TabIndex = 1;
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
// //
// openFileDialog1
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// header // header
// //
this.header.HeaderText = "머리글"; this.header.HeaderText = "머리글";
@@ -335,26 +324,26 @@ namespace UniMarc
this.BookComp.Name = "BookComp"; this.BookComp.Name = "BookComp";
this.BookComp.Width = 120; this.BookComp.Width = 120;
// //
// Price // Count
// //
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
dataGridViewCellStyle5.Format = "N0"; dataGridViewCellStyle5.Format = "N0";
dataGridViewCellStyle5.NullValue = "0"; dataGridViewCellStyle5.NullValue = "1";
this.Price.DefaultCellStyle = dataGridViewCellStyle5; this.Count.DefaultCellStyle = dataGridViewCellStyle5;
this.Price.HeaderText = "가격";
this.Price.Name = "Price";
this.Price.Width = 80;
//
// Count
//
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
dataGridViewCellStyle6.Format = "N0";
dataGridViewCellStyle6.NullValue = "1";
this.Count.DefaultCellStyle = dataGridViewCellStyle6;
this.Count.HeaderText = "수량"; this.Count.HeaderText = "수량";
this.Count.Name = "Count"; this.Count.Name = "Count";
this.Count.Width = 45; this.Count.Width = 45;
// //
// Price
//
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
dataGridViewCellStyle6.Format = "N0";
dataGridViewCellStyle6.NullValue = "0";
this.Price.DefaultCellStyle = dataGridViewCellStyle6;
this.Price.HeaderText = "가격";
this.Price.Name = "Price";
this.Price.Width = 80;
//
// Total // Total
// //
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
@@ -370,20 +359,15 @@ namespace UniMarc
this.ISBN.HeaderText = "ISBN"; this.ISBN.HeaderText = "ISBN";
this.ISBN.Name = "ISBN"; this.ISBN.Name = "ISBN";
// //
// openFileDialog1
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// Mac_List_Add // Mac_List_Add
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1025, 850); this.ClientSize = new System.Drawing.Size(897, 680);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
this.Name = "Mac_List_Add"; this.Name = "Mac_List_Add";
this.Text = "마크 목록 생성"; this.Text = "마크 목록 등록";
this.Load += new System.EventHandler(this.Mac_List_Add_Load); this.Load += new System.EventHandler(this.Mac_List_Add_Load);
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel1.PerformLayout();
@@ -409,20 +393,20 @@ namespace UniMarc
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btClose; private System.Windows.Forms.Button btClose;
private System.Windows.Forms.Button btn_Empty; private System.Windows.Forms.Button btn_Empty;
private System.Windows.Forms.DataGridViewTextBoxColumn header;
private System.Windows.Forms.DataGridViewTextBoxColumn num;
private System.Windows.Forms.DataGridViewTextBoxColumn BookName;
private System.Windows.Forms.DataGridViewTextBoxColumn Author;
private System.Windows.Forms.DataGridViewTextBoxColumn BookComp;
private System.Windows.Forms.DataGridViewTextBoxColumn Price;
private System.Windows.Forms.DataGridViewTextBoxColumn Count;
private System.Windows.Forms.DataGridViewTextBoxColumn Total;
private System.Windows.Forms.DataGridViewTextBoxColumn ISBN;
private System.Windows.Forms.Button btn_Upload; private System.Windows.Forms.Button btn_Upload;
private System.Windows.Forms.ComboBox cb_Gubun; private System.Windows.Forms.ComboBox cb_Gubun;
private System.Windows.Forms.Label label5; private System.Windows.Forms.Label label5;
private System.Windows.Forms.OpenFileDialog openFileDialog1; private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Button btn_DelRow; private System.Windows.Forms.Button btn_DelRow;
private System.Windows.Forms.TextBox tbCustomIDX; private System.Windows.Forms.TextBox tbCustomIDX;
private System.Windows.Forms.DataGridViewTextBoxColumn header;
private System.Windows.Forms.DataGridViewTextBoxColumn num;
private System.Windows.Forms.DataGridViewTextBoxColumn BookName;
private System.Windows.Forms.DataGridViewTextBoxColumn Author;
private System.Windows.Forms.DataGridViewTextBoxColumn BookComp;
private System.Windows.Forms.DataGridViewTextBoxColumn Count;
private System.Windows.Forms.DataGridViewTextBoxColumn Price;
private System.Windows.Forms.DataGridViewTextBoxColumn Total;
private System.Windows.Forms.DataGridViewTextBoxColumn ISBN;
} }
} }

View File

@@ -90,12 +90,12 @@ namespace UniMarc
if (!CopyCheck(compidx, listName, Today)) if (!CopyCheck(compidx, listName, Today))
{ {
MessageBox.Show("목록이 중복되었습니다! 다시 확인해주세요.", "Error"); UTIL.MsgE("목록이 중복되었습니다! 다시 확인해주세요.");
return; return;
} }
if (listName.isEmpty()) if (listName.isEmpty())
{ {
MessageBox.Show("목록명이 비어있습니다! 다시 확인해주세요.", "Error"); UTIL.MsgE("목록명이 비어있습니다! 다시 확인해주세요.");
return; return;
} }
@@ -151,7 +151,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(InBook_Cmd); Helper_DB.ExcuteNonQuery(InBook_Cmd);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
ml.btn_Lookup_Click(null, null); ml.btn_Lookup_Click(null, null);
} }
@@ -235,15 +235,13 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show("오류가 발생했습니다.\n" + ex.Message, "Error"); UTIL.MsgE("오류가 발생했습니다.\n" + ex.Message);
} }
} }
private void btn_DelRow_Click(object sender, EventArgs e) private void btn_DelRow_Click(object sender, EventArgs e)
{ {
DialogResult result = MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo); if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.No) return;
if (result == DialogResult.No) return;
int row = dataGridView1.CurrentCell.RowIndex; int row = dataGridView1.CurrentCell.RowIndex;
@@ -280,7 +278,7 @@ namespace UniMarc
{ {
where += $" and c_sangho like '%{inputsearch.Replace("'", "''")}%'"; where += $" and c_sangho like '%{inputsearch.Replace("'", "''")}%'";
} }
var dt = Helper_DB.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where); var dt = Helper_DB.ExecuteQueryData("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where);
using (var f = new fSelectDT(dt)) using (var f = new fSelectDT(dt))
if (f.ShowDialog() == DialogResult.OK) if (f.ShowDialog() == DialogResult.OK)
{ {

View File

@@ -132,10 +132,10 @@
<metadata name="BookComp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="BookComp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="Total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="Total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View File

@@ -0,0 +1,421 @@
namespace UniMarc
{
partial class Mac_List_Add2
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.tbCustomIDX = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.cb_Gubun = new System.Windows.Forms.ComboBox();
this.btn_DelRow = new System.Windows.Forms.Button();
this.btn_Upload = new System.Windows.Forms.Button();
this.cb_User = new System.Windows.Forms.ComboBox();
this.btClose = new System.Windows.Forms.Button();
this.btn_Empty = new System.Windows.Forms.Button();
this.btSave = new System.Windows.Forms.Button();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.btCustom = new System.Windows.Forms.Button();
this.tb_ExpectList = new System.Windows.Forms.TextBox();
this.tb_divName = new System.Windows.Forms.TextBox();
this.tb_divComp = new System.Windows.Forms.TextBox();
this.panel2 = new System.Windows.Forms.Panel();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.header = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.num = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.BookName = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.BookComp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Count = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Total = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.tbCustomIDX);
this.panel1.Controls.Add(this.label5);
this.panel1.Controls.Add(this.cb_Gubun);
this.panel1.Controls.Add(this.btn_DelRow);
this.panel1.Controls.Add(this.btn_Upload);
this.panel1.Controls.Add(this.cb_User);
this.panel1.Controls.Add(this.btClose);
this.panel1.Controls.Add(this.btn_Empty);
this.panel1.Controls.Add(this.btSave);
this.panel1.Controls.Add(this.label3);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.btCustom);
this.panel1.Controls.Add(this.tb_ExpectList);
this.panel1.Controls.Add(this.tb_divName);
this.panel1.Controls.Add(this.tb_divComp);
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(897, 59);
this.panel1.TabIndex = 0;
//
// tbCustomIDX
//
this.tbCustomIDX.Location = new System.Drawing.Point(175, 5);
this.tbCustomIDX.Name = "tbCustomIDX";
this.tbCustomIDX.ReadOnly = true;
this.tbCustomIDX.Size = new System.Drawing.Size(66, 21);
this.tbCustomIDX.TabIndex = 15;
this.tbCustomIDX.TabStop = false;
this.tbCustomIDX.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(592, 35);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(53, 12);
this.label5.TabIndex = 14;
this.label5.Text = "쉼표구분";
//
// cb_Gubun
//
this.cb_Gubun.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_Gubun.FormattingEnabled = true;
this.cb_Gubun.Location = new System.Drawing.Point(647, 31);
this.cb_Gubun.Name = "cb_Gubun";
this.cb_Gubun.Size = new System.Drawing.Size(75, 20);
this.cb_Gubun.TabIndex = 6;
//
// btn_DelRow
//
this.btn_DelRow.Location = new System.Drawing.Point(560, 4);
this.btn_DelRow.Name = "btn_DelRow";
this.btn_DelRow.Size = new System.Drawing.Size(81, 23);
this.btn_DelRow.TabIndex = 5;
this.btn_DelRow.Text = "선택 셀 삭제";
this.btn_DelRow.UseVisualStyleBackColor = true;
this.btn_DelRow.Click += new System.EventHandler(this.btn_DelRow_Click);
//
// btn_Upload
//
this.btn_Upload.Location = new System.Drawing.Point(728, 30);
this.btn_Upload.Name = "btn_Upload";
this.btn_Upload.Size = new System.Drawing.Size(75, 23);
this.btn_Upload.TabIndex = 7;
this.btn_Upload.Text = "txt불러오기";
this.btn_Upload.UseVisualStyleBackColor = true;
this.btn_Upload.Click += new System.EventHandler(this.btn_Upload_Click);
//
// cb_User
//
this.cb_User.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_User.FormattingEnabled = true;
this.cb_User.Location = new System.Drawing.Point(452, 5);
this.cb_User.Name = "cb_User";
this.cb_User.Size = new System.Drawing.Size(82, 20);
this.cb_User.TabIndex = 2;
//
// btClose
//
this.btClose.Location = new System.Drawing.Point(809, 4);
this.btClose.Name = "btClose";
this.btClose.Size = new System.Drawing.Size(75, 23);
this.btClose.TabIndex = 8;
this.btClose.Text = "닫 기";
this.btClose.UseVisualStyleBackColor = true;
this.btClose.Click += new System.EventHandler(this.btn_Close_Click);
//
// btn_Empty
//
this.btn_Empty.Location = new System.Drawing.Point(647, 4);
this.btn_Empty.Name = "btn_Empty";
this.btn_Empty.Size = new System.Drawing.Size(75, 23);
this.btn_Empty.TabIndex = 4;
this.btn_Empty.Text = "비 우 기";
this.btn_Empty.UseVisualStyleBackColor = true;
this.btn_Empty.Click += new System.EventHandler(this.btn_Empty_Click);
//
// btSave
//
this.btSave.Location = new System.Drawing.Point(728, 4);
this.btSave.Name = "btSave";
this.btSave.Size = new System.Drawing.Size(75, 23);
this.btSave.TabIndex = 3;
this.btSave.Text = "저 장";
this.btSave.UseVisualStyleBackColor = true;
this.btSave.Click += new System.EventHandler(this.btn_AddList_Click);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(409, 9);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 13;
this.label3.Text = "담당자";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(257, 9);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 11;
this.label2.Text = "납품명";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(27, 35);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(81, 12);
this.label4.TabIndex = 10;
this.label4.Text = "생성될 목록명";
//
// btCustom
//
this.btCustom.AutoSize = true;
this.btCustom.Location = new System.Drawing.Point(5, 4);
this.btCustom.Name = "btCustom";
this.btCustom.Size = new System.Drawing.Size(62, 25);
this.btCustom.TabIndex = 9;
this.btCustom.Text = "납품처";
this.btCustom.Click += new System.EventHandler(this.label1_Click);
//
// tb_ExpectList
//
this.tb_ExpectList.Enabled = false;
this.tb_ExpectList.Location = new System.Drawing.Point(114, 31);
this.tb_ExpectList.Name = "tb_ExpectList";
this.tb_ExpectList.Size = new System.Drawing.Size(250, 21);
this.tb_ExpectList.TabIndex = 12;
//
// tb_divName
//
this.tb_divName.Location = new System.Drawing.Point(300, 5);
this.tb_divName.Name = "tb_divName";
this.tb_divName.Size = new System.Drawing.Size(100, 21);
this.tb_divName.TabIndex = 1;
this.tb_divName.TextChanged += new System.EventHandler(this.Delivery_TextChanged);
//
// tb_divComp
//
this.tb_divComp.Location = new System.Drawing.Point(69, 5);
this.tb_divComp.Name = "tb_divComp";
this.tb_divComp.Size = new System.Drawing.Size(100, 21);
this.tb_divComp.TabIndex = 0;
this.tb_divComp.TextChanged += new System.EventHandler(this.Delivery_TextChanged);
this.tb_divComp.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_divComp_KeyDown);
//
// panel2
//
this.panel2.Controls.Add(this.dataGridView1);
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel2.Location = new System.Drawing.Point(0, 59);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(897, 621);
this.panel2.TabIndex = 1;
//
// dataGridView1
//
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
this.dataGridView1.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.dataGridView1.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.header,
this.num,
this.BookName,
this.Author,
this.BookComp,
this.Count,
this.Price,
this.Total,
this.ISBN});
this.dataGridView1.Dock = System.Windows.Forms.DockStyle.Fill;
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(897, 621);
this.dataGridView1.TabIndex = 1;
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
//
// openFileDialog1
//
this.openFileDialog1.FileName = "openFileDialog1";
//
// header
//
this.header.DataPropertyName = "header";
this.header.HeaderText = "머리글";
this.header.Name = "header";
this.header.Width = 65;
//
// num
//
this.num.DataPropertyName = "num";
this.num.HeaderText = "번호";
this.num.Name = "num";
this.num.Width = 45;
//
// BookName
//
this.BookName.DataPropertyName = "BookName";
dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.BookName.DefaultCellStyle = dataGridViewCellStyle2;
this.BookName.HeaderText = "도서명";
this.BookName.Name = "BookName";
this.BookName.Width = 200;
//
// Author
//
this.Author.DataPropertyName = "Author";
dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.Author.DefaultCellStyle = dataGridViewCellStyle3;
this.Author.HeaderText = "저자";
this.Author.Name = "Author";
//
// BookComp
//
this.BookComp.DataPropertyName = "BookComp";
dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
this.BookComp.DefaultCellStyle = dataGridViewCellStyle4;
this.BookComp.HeaderText = "출판사";
this.BookComp.Name = "BookComp";
this.BookComp.Width = 120;
//
// Count
//
this.Count.DataPropertyName = "Count";
dataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
dataGridViewCellStyle5.Format = "N0";
dataGridViewCellStyle5.NullValue = "1";
this.Count.DefaultCellStyle = dataGridViewCellStyle5;
this.Count.HeaderText = "수량";
this.Count.Name = "Count";
this.Count.Width = 45;
//
// Price
//
this.Price.DataPropertyName = "Price";
dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
dataGridViewCellStyle6.Format = "N0";
dataGridViewCellStyle6.NullValue = "0";
this.Price.DefaultCellStyle = dataGridViewCellStyle6;
this.Price.HeaderText = "가격";
this.Price.Name = "Price";
this.Price.Width = 80;
//
// Total
//
this.Total.DataPropertyName = "Total";
dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(128)))));
dataGridViewCellStyle7.Format = "N0";
dataGridViewCellStyle7.NullValue = "0";
this.Total.DefaultCellStyle = dataGridViewCellStyle7;
this.Total.HeaderText = "합계";
this.Total.Name = "Total";
this.Total.Width = 80;
//
// ISBN
//
this.ISBN.DataPropertyName = "ISBN";
this.ISBN.HeaderText = "ISBN";
this.ISBN.Name = "ISBN";
//
// Mac_List_Add
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(897, 680);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Name = "Mac_List_Add";
this.Text = "마크 목록 등록";
this.Load += new System.EventHandler(this.Mac_List_Add_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Button btSave;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btCustom;
private System.Windows.Forms.TextBox tb_divName;
private System.Windows.Forms.TextBox tb_divComp;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cb_User;
private System.Windows.Forms.TextBox tb_ExpectList;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Button btClose;
private System.Windows.Forms.Button btn_Empty;
private System.Windows.Forms.Button btn_Upload;
private System.Windows.Forms.ComboBox cb_Gubun;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.Button btn_DelRow;
private System.Windows.Forms.TextBox tbCustomIDX;
private System.Windows.Forms.DataGridViewTextBoxColumn header;
private System.Windows.Forms.DataGridViewTextBoxColumn num;
private System.Windows.Forms.DataGridViewTextBoxColumn BookName;
private System.Windows.Forms.DataGridViewTextBoxColumn Author;
private System.Windows.Forms.DataGridViewTextBoxColumn BookComp;
private System.Windows.Forms.DataGridViewTextBoxColumn Count;
private System.Windows.Forms.DataGridViewTextBoxColumn Price;
private System.Windows.Forms.DataGridViewTextBoxColumn Total;
private System.Windows.Forms.DataGridViewTextBoxColumn ISBN;
}
}

View File

@@ -0,0 +1,375 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using Microsoft.Office.Interop.Excel;
using UniMarc.ListOfValue;
using AR;
namespace UniMarc
{
public partial class Mac_List_Add2 : Form
{
Helper_DB db = new Helper_DB();
Skill_Grid sg = new Skill_Grid();
BindingSource bs1 = new BindingSource();
BindingList<BookGridItem> bookList = new BindingList<BookGridItem>();
Mac_List ml;
public Mac_List_Add2(Mac_List _ml)
{
InitializeComponent();
ml = _ml;
bs1.DataSource = bookList;
dataGridView1.DataSource = bs1;
}
private void Mac_List_Add_Load(object sender, EventArgs e)
{
db.DBcon();
string compidx = PUB.user.CompanyIdx;
string MyName = PUB.user.UserName;
#region
// 담당자
string CompQuery = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", compidx);
string cmd = string.Format("SELECT `name` FROM `User_Data` WHERE `affil` = ({0});", CompQuery);
string[] cmdResult = db.DB_Send_CMD_Search(cmd).Split('|');
foreach (string UserName in cmdResult)
{
if (UserName != "")
cb_User.Items.Add(UserName);
}
cb_User.SelectedItem = MyName;
// 쉼표구분
string[] Gubun = { "tap", ",", "|" };
cb_Gubun.Items.AddRange(Gubun);
cb_Gubun.SelectedIndex = 0;
#endregion
}
private void Delivery_TextChanged(object sender, EventArgs e)
{
string divComp = tb_divComp.Text;
string divName = tb_divName.Text;
string ListName = string.Format("[{0}]{1}", divComp, divName);
tb_ExpectList.Text = ListName;
}
private void btn_Empty_Click(object sender, EventArgs e)
{
tb_divComp.Text = "";
tb_divName.Text = "";
bookList.Clear();
}
private void btn_AddList_Click(object sender, EventArgs e)
{
string compidx = PUB.user.CompanyIdx;
string Today = DateTime.Now.ToString("yyyy-MM-dd");
string listName = tb_ExpectList.Text;
string charge = cb_User.Text;
int custidx = -1;
if (int.TryParse(tbCustomIDX.Text, out custidx) == false)
{
UTIL.MsgE("납품처를 올바르게 선택하세요");
tb_divComp.Focus();
tb_divComp.SelectAll();
return;
}
if (!CopyCheck(compidx, listName, Today))
{
UTIL.MsgE("목록이 중복되었습니다! 다시 확인해주세요.");
return;
}
if (listName.isEmpty())
{
UTIL.MsgE("목록명이 비어있습니다! 다시 확인해주세요.");
return;
}
string InBook_Area = "`compidx`, `list_name`, `date`, `header`, `num`, " +
"`book_name`, `author`, `book_comp`, `pay`, `count`, " +
"`total`, `isbn_marc`, `l_idx`";
List<string> InBook_List = new List<string>();
int TotalCount = 0;
string InList_Idx = "㏓InList_Idx♠";
string[] InList_Tbl = { "comp_num", "date", "list_name", "m_charge", "state", "vol", "chk_marc", "customer" };
string[] InList_Col = { compidx, Today, listName, charge, "진행", TotalCount.ToString(), "1", $"{custidx}" };
foreach (var item in bookList)
{
if (string.IsNullOrEmpty(item.BookName))
continue;
string header = item.header ?? "";
string num = item.num ?? "";
string bookname = item.BookName ?? "";
string author = item.Author ?? "";
string bookcomp = item.BookComp ?? "";
string price = (item.Price ?? "0").Replace(",", "");
string count = (item.Count ?? "1").Replace(",", "");
string total = (item.Total ?? "0").Replace(",", "");
string isbn = item.ISBN ?? "";
string tmp = string.Format(
"(\"{0}\", \"{1}\", \"{2}\", \"{3}\", \"{4}\", " +
"\"{5}\", \"{6}\", \"{7}\", \"{8}\", \"{9}\", " +
"\"{10}\", \"{11}\", \"{12}\")",
compidx, listName, Today, header, num,
bookname, author, bookcomp, price, count,
total, isbn, InList_Idx);
int cVal = 0;
int.TryParse(count, out cVal);
TotalCount += cVal;
InBook_List.Add(tmp);
}
if (InBook_List.Count == 0)
{
UTIL.MsgE("저장할 데이터가 없습니다.");
return;
}
InList_Col[5] = TotalCount.ToString();
string InList_Cmd = db.DB_INSERT("Obj_List", InList_Tbl, InList_Col);
long listIdxLong = Helper_DB.DB_Send_CMD_Insert_GetIdx(InList_Cmd);
if (listIdxLong == -1)
{
UTIL.MsgE("목록 저장에 실패했습니다.");
return;
}
string listIdx = listIdxLong.ToString();
string InBook_Col = string.Join(", ", InBook_List).Replace(InList_Idx, listIdx);
string InBook_Cmd = string.Format("INSERT INTO `Obj_List_Book` ({0}) VALUES {1};", InBook_Area, InBook_Col);
var rlt = Helper_DB.ExcuteNonQuery(InBook_Cmd);
if (rlt.applyCount == 0)
{
UTIL.MsgE($"내역 저장에 실패했습니다.\n{rlt.errorMessage}");
return;
}
AR.UTIL.MsgI("저장되었습니다!");
ml.btn_Lookup_Click(null, null);
}
#region AddList_Sub
/// <summary>
/// INSERT할 목록 중복체크
/// </summary>
/// <param name="compidx"></param>
/// <param name="listName"></param>
/// <param name="date"></param>
/// <returns></returns>
bool CopyCheck(string compidx, string listName, string date)
{
string cmd = string.Format(
"SELECT `list_name` " +
"FROM `Obj_List` " +
"WHERE `comp_num` = \"{0}\" " +
"AND `list_name` = \"{1}\" " +
"AND `date` = \"{2}\";", compidx, listName, date);
string cmdResult = db.DB_Send_CMD_Search(cmd);
if (cmdResult.Length > 2)
return false;
return true;
}
#endregion
private void btn_Upload_Click(object sender, EventArgs e)
{
string FilePath = "";
openFileDialog1.InitialDirectory = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
if (openFileDialog1.ShowDialog() == DialogResult.OK)
FilePath = openFileDialog1.FileName;
if (string.IsNullOrEmpty(FilePath)) return;
string[] textValue = File.ReadAllLines(FilePath);
char Gubun = cb_Gubun.Text[0];
if (cb_Gubun.SelectedIndex == 0)
{
Gubun = '\t';
}
if (textValue.Length == 0)
return;
try
{
bookList.Clear();
foreach (string Value in textValue)
{
string[] grid = Value.Split(Gubun);
var item = new BookGridItem();
if (grid.Length > 0) item.header = grid[0];
if (grid.Length > 1) item.num = grid[1];
if (grid.Length > 2) item.BookName = grid[2];
if (grid.Length > 3) item.Author = grid[3];
if (grid.Length > 4) item.BookComp = grid[4];
if (grid.Length > 5) item.Count = grid[5];
if (grid.Length > 6) item.Price = grid[6];
if (grid.Length > 7) item.Total = grid[7];
if (grid.Length > 8) item.ISBN = grid[8];
bookList.Add(item);
}
}
catch (Exception ex)
{
UTIL.MsgE("오류가 발생했습니다.\n" + ex.Message);
}
}
private void btn_DelRow_Click(object sender, EventArgs e)
{
if (bs1.Current == null) return;
DialogResult result = UTIL.MsgQ("삭제하시겠습니까?");
if (result == DialogResult.No) return;
bs1.RemoveCurrent();
}
private void btn_Close_Click(object sender, EventArgs e)
{
this.Close();
}
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
sg.Print_Grid_Num(sender, e);
}
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{
Excel_to_BindingSource(sender, e);
}
private void Excel_to_BindingSource(object sender, KeyEventArgs e)
{
if ((e.Shift && e.KeyCode == Keys.Insert) || (e.Control && e.KeyCode == Keys.V))
{
if (Clipboard.ContainsText() == false) return;
string stringInClipboard = Clipboard.GetText();
if (string.IsNullOrEmpty(stringInClipboard)) return;
string[] rowSplitter = { "\r\n", "\r", "\n" };
char[] columnSplitter = { '\t' };
List<string> rowsInClipboard = stringInClipboard.Split(rowSplitter, StringSplitOptions.None).ToList();
if (rowsInClipboard.Count > 0 && string.IsNullOrEmpty(rowsInClipboard.Last()))
{
rowsInClipboard.RemoveAt(rowsInClipboard.Count - 1);
}
if (rowsInClipboard.Count == 0) return;
int startRow = dataGridView1.SelectedCells.Count > 0 ? dataGridView1.SelectedCells[0].RowIndex : 0;
int startCol = dataGridView1.SelectedCells.Count > 0 ? dataGridView1.SelectedCells[0].ColumnIndex : 0;
bookList.RaiseListChangedEvents = false;
for (int iRow = 0; iRow < rowsInClipboard.Count; iRow++)
{
int targetRowIdx = startRow + iRow;
// 필요한 경우 행 추가
while (bookList.Count <= targetRowIdx)
{
bookList.Add(new BookGridItem());
}
BookGridItem item = bookList[targetRowIdx];
string[] valuesInRow = rowsInClipboard[iRow].Split(columnSplitter);
for (int iCol = 0; iCol < valuesInRow.Length; iCol++)
{
int targetColIdx = startCol + iCol;
if (targetColIdx < dataGridView1.ColumnCount)
{
string val = valuesInRow[iCol];
string colName = dataGridView1.Columns[targetColIdx].DataPropertyName;
switch (colName)
{
case "header": item.header = val; break;
case "num": item.num = val; break;
case "BookName": item.BookName = val; break;
case "Author": item.Author = val; break;
case "BookComp": item.BookComp = val; break;
case "Count": item.Count = val; break;
case "Price": item.Price = val; break;
case "Total": item.Total = val; break;
case "ISBN": item.ISBN = val; break;
}
}
}
}
bookList.RaiseListChangedEvents = true;
bookList.ResetBindings();
}
}
private void label1_Click(object sender, EventArgs e)
{
LovCustom();
}
void LovCustom()
{
string compidx = PUB.user.CompanyIdx;
var inputsearch = tb_divComp.Text.Trim();
var where = $"campanyidx={compidx}";
if (inputsearch.isEmpty() == false)
{
where += $" and c_sangho like '%{inputsearch.Replace("'", "''")}%'";
}
var dt = Helper_DB.ExecuteQueryData("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where);
using (var f = new fSelectDT(dt))
if (f.ShowDialog() == DialogResult.OK)
{
var dr = f.SelectedRow;
if (dr == null) return;
tbCustomIDX.Text = dr["idx"]?.ToString() ?? string.Empty;
tb_divComp.Text = dr["c_sangho"]?.ToString() ?? string.Empty;
tb_divName.Focus(); //납품명으로 커서 이동
}
}
private void tb_divComp_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter) LovCustom();
}
}
}

View File

@@ -0,0 +1,200 @@
<?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>
<metadata name="header.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="num.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BookName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="BookComp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Total.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="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>10, 8</value>
</metadata>
<metadata name="bindingSource1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>151, 8</value>
</metadata>
<metadata name="bindingNavigator1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>290, 8</value>
</metadata>
<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/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAExSURBVDhPY2AYNKBw1vP/TQue/8+c+Pg/uhwMhLc/wCnH
kDvz2f9VR97/x6UovvvB/+CGa1jlwCBjytP/C/d9wKoovufh/6X7///3r76AIQcHCT1P/k/b8h5DUUT7
fbDmzFn//3uVnsBtQGTXo/+9qz+gKAptvQfW3Lru/3//zr//XfIP4DYgsPnh/7r57+CKglvu/l+09///
jnX//2fM+fnfru7nf/uM7bgN8Ki6/z9/2hsURXbFt/+nz/n937/r23+dwnf/LRLW4zbAvvTu/+zJrzEU
6aec/29S9OK/Stan/8aRy3AbYJF3539q/2usigySTvyXTfv6Xzd4HoYcHBhm3f4f1vISpyL91Mv/NXyn
YZUDA520G//9qh/iVaTiMQGnHINT7pX/IAV4FQ1KAADwdsCrWJS2HgAAAABJRU5ErkJggg==
</value>
</data>
<data name="bindingNavigatorMovePreviousItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAC7SURBVDhPY2AYMiC8/cF/dDGiQXz3g//BDdfIMyC+5+H/
pfv///evvkC6ARHt98GaM2f9/+9VeoI0A0Jb74E1t677/9+/8+9/l/wDxBsQ3HL3/6K9//93rPv/P2PO
z/92dT//22dsJ94AELArvv0/fc7v//5d3/7rFL77b5GwnjQDQEA/5fx/k6IX/1WyPv03jlxGugEgYJB0
4r9s2tf/usHzyDMABPRTL//X8J1GvgEgoOIxgTIDBi8AANAUYJgsLP+3AAAAAElFTkSuQmCC
</value>
</data>
<data name="bindingNavigatorMoveNextItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACkSURBVDhPY2AYdKBw1vP/6GIkgdyZz/4ndN8j35CMKU//
z9v/+39C1x3yDEnoefJ/9r5f/zu3/v3vVnqZdEMiux79n7Lt1/+SpX//J0z/+98m9yxphgQ2P/zfuvY9
WLNxyZf/0tHX/htHLiPeEI+q+/9L5r6Da1Z06SFeMwjYl979H9jyjDzNIGCRd+e/TcEV8jSDgGHWbfI1
g4BO2g3yNQ9NAACgfl+gY6ualwAAAABJRU5ErkJggg==
</value>
</data>
<data name="bindingNavigatorMoveLastItem.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAErSURBVDhPY2AYVKBw1vP/6GIwAJJrWvD8f+bExzjVMOTO
fPY/ofseVgUguVVH3v8Pb3+AVR4MMqY8/T9v/+//CV13MBSB5Bbu+/A/uOEahhwcJPQ8+T9736//nVv/
/ncrvYyiECQ3bcv7//7VF3AbENn16P+Ubb/+lyz9+z9h+t//Nrln4YpBcr2rP/z3Kj2B24DA5of/W9e+
B2s2LvnyXzr62n/jyGVgDSC5uvnv/rvkH8BtgEfV/f8lc9/BNSu69MAVg+Typ735b5+xHbcB9qV3/we2
PMPQDJPLnvz6v0XCetwGWOTd+W9TcAVDM0wutf813EtYgWHWbayaQQAkF9by8r9u8Dys8mCgk3YDpyRI
zq/64X8N32k41eAFTrlX/qt4TABjdLmBBQC+0b+zZl1WGAAAAABJRU5ErkJggg==
</value>
</data>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>35</value>
</metadata>
</root>

View File

@@ -0,0 +1,256 @@
namespace UniMarc
{
partial class Mac_List_Edit
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.tb_ListName = new System.Windows.Forms.TextBox();
this.btCustom = new System.Windows.Forms.Button();
this.tb_divComp = new System.Windows.Forms.TextBox();
this.tbCustomIDX = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.cb_User = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.cb_State = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.tb_WorkName = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.tb_Etc = new System.Windows.Forms.TextBox();
this.dtp_DateRes = new System.Windows.Forms.DateTimePicker();
this.chk_DateRes = new System.Windows.Forms.CheckBox();
this.btSave = new System.Windows.Forms.Button();
this.btClose = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 17);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 0;
this.label1.Text = "목록명";
//
// tb_ListName
//
this.tb_ListName.Location = new System.Drawing.Point(89, 14);
this.tb_ListName.Name = "tb_ListName";
this.tb_ListName.Size = new System.Drawing.Size(248, 21);
this.tb_ListName.TabIndex = 1;
//
// btCustom
//
this.btCustom.Location = new System.Drawing.Point(7, 41);
this.btCustom.Name = "btCustom";
this.btCustom.Size = new System.Drawing.Size(62, 23);
this.btCustom.TabIndex = 2;
this.btCustom.Text = "납품처";
this.btCustom.UseVisualStyleBackColor = true;
this.btCustom.Click += new System.EventHandler(this.btCustom_Click);
//
// tb_divComp
//
this.tb_divComp.Location = new System.Drawing.Point(89, 41);
this.tb_divComp.Name = "tb_divComp";
this.tb_divComp.Size = new System.Drawing.Size(167, 21);
this.tb_divComp.TabIndex = 3;
this.tb_divComp.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_divComp_KeyDown);
//
// tbCustomIDX
//
this.tbCustomIDX.Location = new System.Drawing.Point(262, 41);
this.tbCustomIDX.Name = "tbCustomIDX";
this.tbCustomIDX.ReadOnly = true;
this.tbCustomIDX.Size = new System.Drawing.Size(75, 21);
this.tbCustomIDX.TabIndex = 4;
this.tbCustomIDX.TabStop = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(7, 71);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 5;
this.label2.Text = "담당자";
//
// cb_User
//
this.cb_User.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_User.FormattingEnabled = true;
this.cb_User.Location = new System.Drawing.Point(89, 68);
this.cb_User.Name = "cb_User";
this.cb_User.Size = new System.Drawing.Size(121, 20);
this.cb_User.TabIndex = 6;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(7, 97);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 12);
this.label3.TabIndex = 7;
this.label3.Text = "상태";
//
// cb_State
//
this.cb_State.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_State.FormattingEnabled = true;
this.cb_State.Location = new System.Drawing.Point(89, 94);
this.cb_State.Name = "cb_State";
this.cb_State.Size = new System.Drawing.Size(121, 20);
this.cb_State.TabIndex = 8;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(7, 123);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(41, 12);
this.label4.TabIndex = 9;
this.label4.Text = "작업명";
//
// tb_WorkName
//
this.tb_WorkName.Location = new System.Drawing.Point(89, 120);
this.tb_WorkName.Name = "tb_WorkName";
this.tb_WorkName.Size = new System.Drawing.Size(248, 21);
this.tb_WorkName.TabIndex = 10;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(7, 149);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 11;
this.label5.Text = "비고";
//
// tb_Etc
//
this.tb_Etc.Location = new System.Drawing.Point(89, 146);
this.tb_Etc.Name = "tb_Etc";
this.tb_Etc.Size = new System.Drawing.Size(248, 21);
this.tb_Etc.TabIndex = 12;
//
// dtp_DateRes
//
this.dtp_DateRes.Enabled = false;
this.dtp_DateRes.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dtp_DateRes.Location = new System.Drawing.Point(89, 172);
this.dtp_DateRes.Name = "dtp_DateRes";
this.dtp_DateRes.Size = new System.Drawing.Size(248, 21);
this.dtp_DateRes.TabIndex = 16;
//
// chk_DateRes
//
this.chk_DateRes.AutoSize = true;
this.chk_DateRes.Location = new System.Drawing.Point(7, 174);
this.chk_DateRes.Name = "chk_DateRes";
this.chk_DateRes.Size = new System.Drawing.Size(72, 16);
this.chk_DateRes.TabIndex = 17;
this.chk_DateRes.Text = "완료일자";
this.chk_DateRes.UseVisualStyleBackColor = true;
this.chk_DateRes.CheckedChanged += new System.EventHandler(this.chk_DateRes_CheckedChanged);
//
// btSave
//
this.btSave.Location = new System.Drawing.Point(183, 205);
this.btSave.Name = "btSave";
this.btSave.Size = new System.Drawing.Size(75, 31);
this.btSave.TabIndex = 13;
this.btSave.Text = "저 장";
this.btSave.UseVisualStyleBackColor = true;
this.btSave.Click += new System.EventHandler(this.btSave_Click);
//
// btClose
//
this.btClose.Location = new System.Drawing.Point(264, 205);
this.btClose.Name = "btClose";
this.btClose.Size = new System.Drawing.Size(75, 31);
this.btClose.TabIndex = 14;
this.btClose.Text = "닫 기";
this.btClose.UseVisualStyleBackColor = true;
this.btClose.Click += new System.EventHandler(this.btClose_Click);
//
// Mac_List_Edit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(347, 245);
this.Controls.Add(this.dtp_DateRes);
this.Controls.Add(this.btClose);
this.Controls.Add(this.btSave);
this.Controls.Add(this.tb_Etc);
this.Controls.Add(this.label5);
this.Controls.Add(this.tb_WorkName);
this.Controls.Add(this.label4);
this.Controls.Add(this.cb_State);
this.Controls.Add(this.label3);
this.Controls.Add(this.cb_User);
this.Controls.Add(this.label2);
this.Controls.Add(this.tbCustomIDX);
this.Controls.Add(this.tb_divComp);
this.Controls.Add(this.btCustom);
this.Controls.Add(this.tb_ListName);
this.Controls.Add(this.label1);
this.Controls.Add(this.chk_DateRes);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "Mac_List_Edit";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "정보 편집";
this.Load += new System.EventHandler(this.Mac_List_Edit_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tb_ListName;
private System.Windows.Forms.Button btCustom;
private System.Windows.Forms.TextBox tb_divComp;
private System.Windows.Forms.TextBox tbCustomIDX;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.ComboBox cb_User;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox cb_State;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox tb_WorkName;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox tb_Etc;
private System.Windows.Forms.DateTimePicker dtp_DateRes;
private System.Windows.Forms.CheckBox chk_DateRes;
private System.Windows.Forms.Button btSave;
private System.Windows.Forms.Button btClose;
}
}

View File

@@ -0,0 +1,159 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using UniMarc.ListOfValue;
using AR;
namespace UniMarc
{
public partial class Mac_List_Edit : Form
{
Helper_DB db = new Helper_DB();
MacListItem item;
Mac_List ml;
public Mac_List_Edit(Mac_List _ml, MacListItem _item)
{
InitializeComponent();
ml = _ml;
item = _item;
}
private void Mac_List_Edit_Load(object sender, EventArgs e)
{
db.DBcon();
string compidx = PUB.user.CompanyIdx;
#region
// 담당자
string CompQuery = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", compidx);
string cmd = string.Format("SELECT `name` FROM `User_Data` WHERE `affil` = ({0});", CompQuery);
string[] cmdResult = db.DB_Send_CMD_Search(cmd).Split('|');
foreach (string UserName in cmdResult)
{
if (!string.IsNullOrEmpty(UserName))
cb_User.Items.Add(UserName);
}
// 상태
cb_State.Items.AddRange(new string[] { "진행", "완료" });
#endregion
// 데이터 로드
tb_ListName.Text = item.list_name;
tb_divComp.Text = item.customer_name;
tbCustomIDX.Text = item.customer;
cb_User.SelectedItem = item.charge;
cb_State.SelectedItem = item.state;
tb_WorkName.Text = item.work_name;
tb_Etc.Text = item.etc;
DateTime resDate;
if (DateTime.TryParse(item.end_date, out resDate))
{
chk_DateRes.Checked = true;
dtp_DateRes.Enabled = true;
dtp_DateRes.Value = resDate;
}
else
{
chk_DateRes.Checked = false;
dtp_DateRes.Enabled = false;
}
}
private void chk_DateRes_CheckedChanged(object sender, EventArgs e)
{
dtp_DateRes.Enabled = chk_DateRes.Checked;
}
private void btCustom_Click(object sender, EventArgs e)
{
LovCustom();
}
void LovCustom()
{
string compidx = PUB.user.CompanyIdx;
var inputsearch = tb_divComp.Text.Trim();
var where = $"campanyidx={compidx}";
if (!string.IsNullOrEmpty(inputsearch))
{
where += $" and c_sangho like '%{inputsearch.Replace("'", "''")}%'";
}
var dt = Helper_DB.ExecuteQueryData("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where);
using (var f = new fSelectDT(dt))
if (f.ShowDialog() == DialogResult.OK)
{
var dr = f.SelectedRow;
if (dr == null) return;
tbCustomIDX.Text = dr["idx"]?.ToString() ?? string.Empty;
tb_divComp.Text = dr["c_sangho"]?.ToString() ?? string.Empty;
}
}
private void tb_divComp_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter) LovCustom();
}
private void btSave_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(tb_ListName.Text))
{
UTIL.MsgI("목록명을 입력하세요.");
return;
}
string table = "Obj_List";
string[] edit_col = { "list_name", "customer", "m_charge", "state", "work_name", "m_etc", "date_res" };
string resDateVal = chk_DateRes.Checked ? dtp_DateRes.Value.ToString("yyyy-MM-dd") : "NULL";
string[] edit_tbl = {
tb_ListName.Text,
tbCustomIDX.Text,
cb_User.Text,
cb_State.Text,
tb_WorkName.Text,
tb_Etc.Text,
resDateVal
};
string[] sear_col = { "idx", "comp_num" };
string[] sear_tbl = { item.idx, PUB.user.CompanyIdx };
string U_cmd = db.More_Update(table, edit_col, edit_tbl, sear_col, sear_tbl);
if (resDateVal == "NULL")
{
U_cmd = U_cmd.Replace("`date_res` = \"NULL\"", "`date_res` = NULL");
}
var result = Helper_DB.ExcuteNonQuery(U_cmd);
if (result.applyCount > 0)
{
//UTIL.MsgI("수정되었습니다.");
this.DialogResult = DialogResult.OK;
this.Close();
}
else
{
UTIL.MsgE("수정에 실패했습니다.\n" + result.errorMessage);
}
}
private void btClose_Click(object sender, EventArgs e)
{
this.Close();
}
}
}

View 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>

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -65,15 +66,15 @@ namespace UniMarc
private void btn_Merge_Click(object sender, EventArgs e) private void btn_Merge_Click(object sender, EventArgs e)
{ {
if (!rb_Delete.Checked && !rb_Keep.Checked) { if (!rb_Delete.Checked && !rb_Keep.Checked) {
MessageBox.Show("기존목록의 유지여부를 선택해주세요."); UTIL.MsgE("기존목록의 유지여부를 선택해주세요.");
return; return;
} }
if (tb_list_name.Text == "변경할 작업처의 이름") { if (tb_list_name.Text == "변경할 작업처의 이름") {
MessageBox.Show("작업처의 이름을 입력해주세요."); UTIL.MsgE("작업처의 이름을 입력해주세요.");
return; return;
} }
if (!chk_Overlap()) { if (!chk_Overlap()) {
MessageBox.Show("작업처의 이름이 중복됩니다. 다시 설정해주세요."); UTIL.MsgE("작업처의 이름이 중복됩니다. 다시 설정해주세요.");
return; return;
} }
@@ -89,7 +90,7 @@ namespace UniMarc
data_delete(); data_delete();
} }
MessageBox.Show("목록이 병합되었습니다."); UTIL.MsgI("목록이 병합되었습니다.");
ml.btn_Lookup_Click(null, null); ml.btn_Lookup_Click(null, null);
this.Close(); this.Close();
} }

View File

@@ -403,10 +403,13 @@ namespace UniMarc
} }
private void Btn_Memo_Click(object sender, EventArgs e) private void Btn_Memo_Click(object sender, EventArgs e)
{ {
Marc_memo memo = new Marc_memo(this); Marc_memo memo = new Marc_memo();
memo.StartPosition = FormStartPosition.Manual; memo.StartPosition = FormStartPosition.Manual;
memo.TopMost = true; memo.TopMost = true;
memo.Location = new Point(1018, 8); memo.Location = new Point(1018, 8);
memo.OnSave += (s1,e1) => {
richTextBox1.Text = e1.Data;
};
memo.Show(); memo.Show();
} }
private void Btn_preview_Click(object sender, EventArgs e) private void Btn_preview_Click(object sender, EventArgs e)
@@ -420,14 +423,14 @@ namespace UniMarc
{ {
if (SaveRowIdx < 0) if (SaveRowIdx < 0)
{ {
MessageBox.Show("마크가 선택되지않았습니다."); UTIL.MsgE("마크가 선택되지않았습니다.");
return; return;
} }
int TabIndex = tabControl1.SelectedIndex; int TabIndex = tabControl1.SelectedIndex;
int grade = cb_grade.SelectedIndex; int grade = cb_grade.SelectedIndex;
if (TabIndex == 1) if (TabIndex == 1)
{ {
MessageBox.Show("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!"); UTIL.MsgE("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!");
return; return;
} }
//if (grade == 3) //if (grade == 3)
@@ -444,7 +447,7 @@ namespace UniMarc
if (!isPass(BaseText)) if (!isPass(BaseText))
{ {
MessageBox.Show("입력된 마크의 상태를 확인해주세요."); UTIL.MsgE("입력된 마크의 상태를 확인해주세요.");
return; return;
} }
@@ -505,7 +508,7 @@ namespace UniMarc
string Incmd = db.DB_INSERT(table_name, Insert_tbl, Insert_col); 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)); 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) if (newIdx > 0)
{ {
Midx = newIdx.ToString(); Midx = newIdx.ToString();
@@ -527,7 +530,7 @@ namespace UniMarc
string[] Sear_col = { Midx, PUB.user.CompanyIdx }; string[] Sear_col = { Midx, PUB.user.CompanyIdx };
if (grid_data[0] == null || grid_data[0] == "") if (grid_data[0] == null || grid_data[0] == "")
{ {
MessageBox.Show("ISBN 데이터가 없습니다."); UTIL.MsgE("ISBN 데이터가 없습니다.");
return; return;
} }
@@ -551,7 +554,7 @@ namespace UniMarc
Midx, List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value.ToString(), PUB.user.CompanyIdx); Midx, List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value.ToString(), PUB.user.CompanyIdx);
PUB.log.Add("MarcUpdate", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, UpdateListIndex)); PUB.log.Add("MarcUpdate", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, UpdateListIndex));
Helper_DB.ExcuteNonQuery(UpdateListIndex); Helper_DB.ExcuteNonQuery(UpdateListIndex);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
} }
#region Save_Click_Sub #region Save_Click_Sub
@@ -639,7 +642,7 @@ namespace UniMarc
if (!isTag) if (!isTag)
{ {
MessageBox.Show(msg + "태그가 없습니다."); UTIL.MsgE(msg + "태그가 없습니다.");
return false; return false;
} }
@@ -655,7 +658,7 @@ namespace UniMarc
if (!is1XX) if (!is1XX)
{ {
MessageBox.Show("기본표목이 존재하지않습니다."); UTIL.MsgE("기본표목이 존재하지않습니다.");
return false; return false;
} }
@@ -673,7 +676,7 @@ namespace UniMarc
if (!is7XX) if (!is7XX)
{ {
MessageBox.Show("부출표목이 존재하지않습니다."); UTIL.MsgE("부출표목이 존재하지않습니다.");
return false; return false;
} }
@@ -1131,7 +1134,7 @@ namespace UniMarc
if (pubDate.Length < 3) if (pubDate.Length < 3)
{ {
MessageBox.Show("260c가 인식되지않습니다."); UTIL.MsgE("260c가 인식되지않습니다.");
return "false"; return "false";
} }
else if (pubDate.Length < 5) else if (pubDate.Length < 5)
@@ -1160,7 +1163,7 @@ namespace UniMarc
if (res == "") if (res == "")
{ {
MessageBox.Show("260a가 인식되지않습니다."); UTIL.MsgE("260a가 인식되지않습니다.");
return "false"; return "false";
} }
else if (res.Length < 3) else if (res.Length < 3)
@@ -1300,9 +1303,9 @@ namespace UniMarc
{ {
int row = List_Book.CurrentCell.RowIndex; int row = List_Book.CurrentCell.RowIndex;
Zoom_Picture zp = new Zoom_Picture(); var url = pictureBox1.ImageLocation;
zp.url = pictureBox1.ImageLocation; var isbn = List_Book.Rows[row].Cells["ISBN13"].Value.ToString();
zp.ISBN = List_Book.Rows[row].Cells["ISBN13"].Value.ToString(); Zoom_Picture zp = new Zoom_Picture(url, isbn);
zp.Show(); zp.Show();
} }
@@ -1557,7 +1560,7 @@ namespace UniMarc
if (ISBN == "" || ISBN == null) if (ISBN == "" || ISBN == null)
{ {
MessageBox.Show("ISBN이 존재하지않습니다!"); UTIL.MsgE("ISBN이 존재하지않습니다!");
return; return;
} }
@@ -1568,12 +1571,12 @@ namespace UniMarc
{ {
var item = new FillBlankItem var item = new FillBlankItem
{ {
Idx = a.ToString(), Idx = a,
Isbn = List_Book.Rows[a].Cells["ISBN13"].Value.ToString(), Isbn = List_Book.Rows[a].Cells["ISBN13"].Value.ToString(),
BookName = List_Book.Rows[a].Cells["book_name"].Value.ToString(), BookName = List_Book.Rows[a].Cells["book_name"].Value.ToString(),
Author = List_Book.Rows[a].Cells["author"].Value.ToString(), Author = List_Book.Rows[a].Cells["author"].Value.ToString(),
Publisher = List_Book.Rows[a].Cells["book_comp"].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); fb.InitFillBlank(item);
} }
@@ -1582,32 +1585,20 @@ namespace UniMarc
if (fb.ShowDialog() == DialogResult.OK) if (fb.ShowDialog() == DialogResult.OK)
{ {
String_Text st = new String_Text(); String_Text st = new String_Text();
if (fb.BulkMarcResults.Count > 0) if (fb.FillBlankItems.Any(t => !string.IsNullOrEmpty(t.BookMarc)))
{ {
foreach (var kvp in fb.BulkMarcResults) foreach (var fbItem in fb.FillBlankItems)
{ {
int targetListIdx = kvp.Key; if (string.IsNullOrEmpty(fbItem.BookMarc)) continue;
foreach (DataGridViewRow r in List_Book.Rows)
{
// In legacy Marc.cs, finding row by index logic might be similar?
// Marc_FillBlank used 'idx' from 'List_idx' column in legacy logic too?
// Legacy code: int idx = Convert.ToInt32(dataGridView1.Rows[a].Cells["List_idx"].Value.ToString());
// And then: this.marc.List_Book.Rows[idx].Cells["db_marc"].Value = ...
// Wait, legacy used `Rows[idx]`. This implies `idx` IS the row index in List_Book?
// Let's assume it matches if we use the same index logic.
// In my refactor, I passed 'a' as first element of GridData if 'List_idx' col missing?
// In Marc.cs line 1579: `a.ToString()` is passed as first element.
// So `idx` in `BulkMarcResults` IS `a` (the row index).
// So we can directly access `List_Book.Rows[targetListIdx]`.
int targetListIdx = (fbItem.Idx);
if (targetListIdx >= 0 && targetListIdx < List_Book.Rows.Count) if (targetListIdx >= 0 && targetListIdx < List_Book.Rows.Count)
{ {
List_Book.Rows[targetListIdx].Cells["db_marc"].Value = kvp.Value; List_Book.Rows[targetListIdx].Cells["db_marc"].Value = fbItem.BookMarc;
List_Book.Rows[targetListIdx].DefaultCellStyle.ForeColor = Color.Blue; List_Book.Rows[targetListIdx].DefaultCellStyle.ForeColor = Color.Blue;
} }
} }
} }
}
else if (!string.IsNullOrEmpty(fb.SingleMarcResult)) else if (!string.IsNullOrEmpty(fb.SingleMarcResult))
{ {
richTextBox1.Text = fb.SingleMarcResult; richTextBox1.Text = fb.SingleMarcResult;
@@ -3509,7 +3500,7 @@ namespace UniMarc
} }
catch catch
{ {
MessageBox.Show("데이터가 올바르지않습니다.\n245d를 확인해주세요."); UTIL.MsgE("데이터가 올바르지않습니다.\n245d를 확인해주세요.");
} }
} }
#region #region
@@ -3573,7 +3564,7 @@ namespace UniMarc
{ {
where = $"c_sangho like '%{inputsearch.Replace("'", "''")}%'"; where = $"c_sangho like '%{inputsearch.Replace("'", "''")}%'";
} }
var dt = Helper_DB.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where); var dt = Helper_DB.ExecuteQueryData("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where);
using (var f = new fSelectDT(dt)) using (var f = new fSelectDT(dt))
if (f.ShowDialog() == DialogResult.OK) if (f.ShowDialog() == DialogResult.OK)
{ {

Some files were not shown because too many files have changed in this diff Show More