=====* UniMarc [0.0155] 버전 업데이트 내용 *=====

** ERP 작업 전면 중단 (마크우선) **

1. DVD/CD/LP
ㄴ> CD/LP 작업 완료.
ㄴ> DVD 교보쪽 작업 완료.

2. Main & Quick_menu
ㄴ> DVD/CD/LP 쪽 메뉴 추가.
ㄴ> 실수로 날려먹은 리소스 (이미지) 파일 재작업 후 업로드 완료

3. DLS_Copy (DLS복본조사)
ㄴ> 이제 검색 완료 시, 해당 셀에 색이 채워짐. -> 자료가 있을경우 노랑, 없을경우 회색

4. Login
ㄴ> 접속하려는 회선의 아이피로 로그인을 통과시킬지 안시킬지 if문이 추가됨.
ㄴ> 이걸로 회사회선이 아닐경우 접속이 불가능하게 변경됨.
ㄴ> DB에 올려놓은 상태로 추후 아이피 추가요청시 DB 수정만 하면 접속이 가능함.
This commit is contained in:
SeungHo Yang
2022-08-23 17:03:36 +09:00
parent 38198b787f
commit 9cfbc44e0a
35 changed files with 812 additions and 370 deletions

View File

@@ -107,18 +107,24 @@ namespace WindowsFormsApp1
{
get
{
string url = "http://checkip.dyndns.org/";
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
string externalIp = new WebClient().DownloadString("http://ipinfo.io/ip").Trim(); // http://icanhazip.com
string resResult = string.Empty;
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
{
StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8, true);
resResult = reader.ReadToEnd();
}
string realip = Parsing(Parsing(resResult, "Current IP Address:")[1], "</body>")[0].Trim();
return realip;
if (string.IsNullOrWhiteSpace(externalIp))
externalIp = GetIP;
return externalIp;
// string url = "http://checkip.dyndns.org/";
// HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
// request.Method = "GET";
//
// string resResult = string.Empty;
// using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
// {
// StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8, true);
// resResult = reader.ReadToEnd();
// }
// string realip = Parsing(Parsing(resResult, "Current IP Address:")[1], "</body>")[0].Trim();
// return realip;
}
}

View File

@@ -140,12 +140,13 @@ namespace WindowsFormsApp1
private Image SetPicture(string Text)
{
Image[] source_Home = {
Resources._1_2_사용자관리, Resources._1_3_납품처관리
Resources._1_2_사용자관리, Resources._1_3_납품처관리, Resources._1_4_주문처관리, Resources._1_5_도서정보관리
};
Image[] source_Marc = {
Resources._3_1_1_마크작성, Resources._3_1_2_마크목록, Resources._3_1_3_소장자료검색, Resources._3_1_4_마크정리, Resources._3_1_5_복본조사, Resources._3_1_6_ISBN조회,
Resources._3_2_1_목록, Resources._3_2_2_편목,
Resources._3_2_1_반입, Resources._3_2_2_반출,
Resources._3_3_1_전집관리, Resources._3_3_2_저자기호,
Resources._3_4_1_DLS조회입력, Resources._3_4_2_DLS복본조사,
@@ -158,6 +159,7 @@ namespace WindowsFormsApp1
string[] Marc = {
"마크 추가", "마크 목록", "소장자료검색", "마크 정리", "복본 조사", "ISBN 조회",
"DVD/CD/LP 목록", "DVD/CD/LP 편목",
"반입", "반출",
"전집관리", "저자기호",
"DLS 조회 입력", "DLS 복본 조사",
@@ -211,18 +213,19 @@ namespace WindowsFormsApp1
};
string[] Marc = {
"마크 추가", "마크 목록", "소장자료검색", "마크 정리", "ISBN 조회", "반입",
"반출", "복본 조사", "DLS 복본 조사", "마크 수집", "전집관리",
"마크 추가", "마크 목록", "소장자료검색", "마크 정리", "ISBN 조회",
"DVD/CD/LP 목록", "DVD/CD/LP 편목",
"반입", "반출", "복본 조사", "DLS 복본 조사", "마크 수집", "전집관리",
"검수", "저자기호", "DLS 조회 입력", "서류작성",
"마크통계", "장비관리" };
ToolStripMenuItem[] MarcT = {
, , , , iSBN조회, ,
, , , , iSBN조회, , , ,
, 1, dLS복본조사, , ,
, , DLS조회, ,
,
};
ToolStripMenuItem[] TempMarc = {
, , , , , ,
, , , , , dVDCDLPToolStripMenuItem, dVDCDLPToolStripMenuItem, ,
, , DLS, , ,
, , DLS, ,
,

View File

@@ -19,7 +19,7 @@ namespace UniMarc.Properties {
// 클래스에서 자동으로 생성되었습니다.
// 멤버를 추가하거나 제거하려면 .ResX 파일을 편집한 다음 /str 옵션을 사용하여 ResGen을
// 다시 실행하거나 VS 프로젝트를 다시 빌드하십시오.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
@@ -100,6 +100,26 @@ namespace UniMarc.Properties {
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap _1_4_주문처관리 {
get {
object obj = ResourceManager.GetObject("_1_4_주문처관리", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap _1_5_도서정보관리 {
get {
object obj = ResourceManager.GetObject("_1_5_도서정보관리", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
@@ -160,6 +180,16 @@ namespace UniMarc.Properties {
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap _3_2_1_목록 {
get {
object obj = ResourceManager.GetObject("_3_2_1_목록", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
@@ -180,6 +210,16 @@ namespace UniMarc.Properties {
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>
internal static System.Drawing.Bitmap _3_2_2_편목 {
get {
object obj = ResourceManager.GetObject("_3_2_2_편목", resourceCulture);
return ((System.Drawing.Bitmap)(obj));
}
}
/// <summary>
/// System.Drawing.Bitmap 형식의 지역화된 리소스를 찾습니다.
/// </summary>

View File

@@ -169,4 +169,16 @@
<data name="_3_1_6_ISBN조회" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\3_1_6_ISBN조회.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_1_4_주문처관리" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\1_4_주문처관리.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_1_5_도서정보관리" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\1_5_도서정보관리.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_3_2_1_목록" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\3_2_1_목록.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="_3_2_2_편목" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\resources\3_2_2_편목.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@@ -1402,12 +1402,18 @@
<None Include="Resources\0_Empty.png" />
</ItemGroup>
<ItemGroup>
<Content Include="Resources\1_1_사업체정보.png" />
<Content Include="Resources\1_3_납품처관리.png" />
<Content Include="Resources\1_4_주문처관리.png" />
<Content Include="Resources\1_5_도서정보관리.png" />
<Content Include="Resources\3_1_1_마크작성.png" />
<Content Include="Resources\3_1_2_마크목록.png" />
<Content Include="Resources\3_1_3_소장자료검색.png" />
<Content Include="Resources\3_1_4_마크정리.png" />
<Content Include="Resources\3_1_5_복본조사.png" />
<Content Include="Resources\3_1_6_ISBN조회.png" />
<Content Include="Resources\3_2_1_목록.png" />
<Content Include="Resources\3_2_2_편목.png" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -29,7 +29,7 @@ namespace UniMarc.마크
compidx = main.com_idx;
name = main.User;
string[] Site = { "교보문고", "알라딘(미구현)" };
string[] Site = { "교보문고", "알라딘" };
cb_SiteCon.Items.AddRange(Site);
cb_SiteCon.SelectedIndex = 0;
@@ -41,10 +41,6 @@ namespace UniMarc.마크
private void Btn_Connect_Click(object sender, EventArgs e)
{
int site = cb_SiteCon.SelectedIndex;
// if (site < 0)
if (site != 0) // 알라딘 미구현으로 인해 알라딘 막아놓음
return;
CD_LP_Sub sub = new CD_LP_Sub(this);
sub.Show();
@@ -75,7 +71,7 @@ namespace UniMarc.마크
lbl_date.Text = date;
string Table = "DVD_List_Product";
string Area = "`idx`, `num`, `code`, `title`, `author`, `comp`, `price`, `marc`";
string Area = "`idx`, `num`, `code`, `title`, `artist`, `comp`, `price`, `marc`";
string[] Search_Table = { "compidx", "listname", "date" };
string[] Search_Column = { compidx, ListName, date };
@@ -83,7 +79,7 @@ namespace UniMarc.마크
string res = db.DB_Send_CMD_Search(cmd);
string[] ary_res = res.Split('|');
// idx num code title author comp price marc
// idx num code title artist comp price marc
string[] grid = { "", "", "", "", "", "", "", "" };
for (int a = 0; a < ary_res.Length; a++)
{
@@ -151,26 +147,26 @@ namespace UniMarc.마크
string[] SearchTag = { "020a", "020c", "245a", "260b" };
string[] ContentTag = st.Take_Tag(orimarc, SearchTag);
string[] AuthorTag = { "100a", "110a", "111a" };
string[] ContentAuthor = st.Take_Tag(orimarc, AuthorTag);
string Author = TakeAuthor(ContentAuthor);
string[] artistTag = { "100a", "110a", "111a" };
string[] Contentartist = st.Take_Tag(orimarc, artistTag);
string artist = Takeartist(Contentartist);
if (isAdd)
{
// idx num code title author comp price marc
string[] Grid = { "", num, ContentTag[0], ContentTag[2], Author, ContentTag[3], ContentTag[1], orimarc };
// idx num code title artist comp price marc
string[] Grid = { "", num, ContentTag[0], ContentTag[2], artist, ContentTag[3], ContentTag[1], orimarc };
dataGridView1.Rows.Add(Grid);
// DB INSERT 준비
string Table = "DVD_List_Product";
string[] InsertTbl = {
"compidx", "listname", "date", "user", "num",
"code", "title", "author", "comp", "price",
"code", "title", "artist", "comp", "price",
"marc", "type"
};
string[] InsertCol = {
compidx, listtitle, date, name, num,
ContentTag[0], ContentTag[2], Author, ContentTag[3], ContentTag[1],
ContentTag[0], ContentTag[2], artist, ContentTag[3], ContentTag[1],
orimarc, Type
};
string cmd = db.DB_INSERT(Table, InsertTbl, InsertCol);
@@ -187,7 +183,7 @@ namespace UniMarc.마크
marcidx = dataGridView1.Rows[a].Cells["idx"].Value.ToString();
dataGridView1.Rows[a].Cells["code"].Value = ContentTag[0];
dataGridView1.Rows[a].Cells["title"].Value = ContentTag[2];
dataGridView1.Rows[a].Cells["author"].Value = Author;
dataGridView1.Rows[a].Cells["artist"].Value = artist;
dataGridView1.Rows[a].Cells["comp"].Value = ContentTag[3];
dataGridView1.Rows[a].Cells["price"].Value = ContentTag[1];
dataGridView1.Rows[a].Cells["marc"].Value = orimarc;
@@ -206,8 +202,8 @@ namespace UniMarc.마크
SearchTbl = new string[] { "idx" };
SearchCol = new string[] { marcidx };
}
string[] UpdateTbl = { "num", "code", "title", "author", "comp", "price", "marc", "type" };
string[] UpdateCol = { num, ContentTag[0], ContentTag[2], Author, ContentTag[3], ContentTag[1], orimarc, Type };
string[] UpdateTbl = { "num", "code", "title", "artist", "comp", "price", "marc", "type" };
string[] UpdateCol = { num, ContentTag[0], ContentTag[2], artist, ContentTag[3], ContentTag[1], orimarc, Type };
string cmd = db.More_Update(Table, UpdateTbl, UpdateCol, SearchTbl, SearchCol);
db.DB_Send_CMD_reVoid(cmd);
@@ -220,7 +216,7 @@ namespace UniMarc.마크
/// </summary>
/// <param name="ValueArray">태그 100, 110, 111</param>
/// <returns>값이 들어있는 태그의 내용</returns>
string TakeAuthor(string[] ValueArray)
string Takeartist(string[] ValueArray)
{
string result = "";
foreach (string value in ValueArray)

View File

@@ -1,4 +1,6 @@
using System;
using Microsoft.VisualBasic;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
@@ -28,8 +30,6 @@ namespace UniMarc.마크
private void CD_LP_Sub_Load(object sender, EventArgs e)
{
db.DBcon();
// 알라딘 비활성화 (사유 : 개발중)
Btn_Aladin.Enabled = false;
}
public void Btn_KyoBo_Click(object sender, EventArgs e)
@@ -51,29 +51,58 @@ namespace UniMarc.마크
private void Btn_Marc_Click(object sender, EventArgs e)
{
string result = "";
if (isKyoBo)
{
// Code, Name, Author, Comp, Price, PubDate
string[] Data = KyoBoInfor();
string[] Track = KyoBoGetTrack();
cp.richTextBox1.Text = MakeMarc(Data, Track);
if (KyoBo_trDVD_flCD())
{
result = MakeMarcKyoBo_DVD(KyoboInfor_DVD());
}
else
{
result = MakeMarcKyoBo_Music(KyoBoInfor_Music(), KyoBoGetTrack_Music());
}
}
else
{
// title, artist, comp, price, PubYear
string[] Data = AladinInfor_Music();
result = MakeMarcAladin_Music(Data);
}
cp.richTextBox1.Text = result;
}
#region Marc_Sub
#region KyoBo
bool KyoBo_trDVD_flCD()
{
bool result = false;
foreach (HtmlElement ul in webBrowser1.Document.GetElementsByTagName("ul"))
{
if (ul.GetAttribute("className").IndexOf("main") > -1)
{
if (ul.InnerText.IndexOf("DVD") > -1)
{
result = true;
}
}
}
return result;
}
#region Music
/// <summary>
/// 앨범의 기본 정보를 가져옴.
/// </summary>
/// <returns>[0]Code [1]Name [2]Author [3]Comp [4]Price [5]PubDate</returns>
string[] KyoBoInfor()
string[] KyoBoInfor_Music()
{
string tmp = "";
string Code = "";
string Name = "";
string Author = "";
string Artist = "";
string Comp = "";
string Price = "";
string PubDate = "";
@@ -127,19 +156,19 @@ namespace UniMarc.마크
} // div foreach
string[] ArrayTmp = tmp.Split('|');
Author = ArrayTmp[0];
Artist = ArrayTmp[0];
Comp = ArrayTmp[1];
Name = Name.Replace(Author + " - ", "");
Name = Name.Replace(Artist + " - ", "");
Name = Name.Substring(0, Name.IndexOf(" ["));
PubDate = Regex.Replace(PubDate, @"[^0-9]", "").Substring(0, 4);
Price = Regex.Replace(Price, @"[^0-9]", "");
string[] result = { Code, Name, Author, Comp, Price, PubDate };
string[] result = { Code, Name, Artist, Comp, Price, PubDate };
return result;
}
string[] KyoBoGetTrack()
string[] KyoBoGetTrack_Music()
{
// CD,LP구분 디스크갯수
foreach (HtmlElement dl in webBrowser1.Document.GetElementsByTagName("dl"))
@@ -176,7 +205,7 @@ namespace UniMarc.마크
/// </summary>
/// <param name="Data">[0]Code [1]Name [2]Author [3]Comp [4]Price [5]PubDate</param>
/// <returns></returns>
string MakeMarc(string[] Data, string[] Track)
string MakeMarcKyoBo_Music(string[] Data, string[] Track)
{
string Marc = "020\t \t▼a" + Data[0] + ":▼c\\" + Data[4] + "▲\n";
@@ -204,6 +233,379 @@ namespace UniMarc.마크
}
#endregion
#region DVD
/// <summary>
/// DVD 기본 데이터 추출
/// </summary>
/// <returns>[0]title, [1]artist, [2]comp, [3]code, [4]price, [5]PubDate, [6]synopsis, [7]actor, [8]data</returns>
string[] KyoboInfor_DVD()
{
string title = "";
string artist = "";
string comp = "";
string code = "";
string price = "";
string PubDate = "";
string synopsis = "";
string actor = "";
// 타이틀 가져오기
foreach (HtmlElement p in webBrowser1.Document.GetElementsByTagName("p"))
{
if (p.GetAttribute("className").IndexOf("subject") > -1)
{
title = p.InnerText;
break;
}
}
// 제작사, 출시일 가져오기
string tmpCategory = "";
string tmp = "";
foreach (HtmlElement ul in webBrowser1.Document.GetElementsByTagName("ul"))
{
if (ul.GetAttribute("className").IndexOf("newdf") > -1)
{
foreach (HtmlElement em in ul.GetElementsByTagName("em"))
{
tmpCategory += em.InnerText + "|";
}
foreach (HtmlElement span in ul.GetElementsByTagName("span"))
{
tmp += span.InnerText + "|";
}
foreach (HtmlElement li in ul.GetElementsByTagName("li"))
{
if (li.GetAttribute("className").IndexOf("date") > -1)
{
PubDate = Regex.Replace(li.InnerText, @"[^0-9]", "").Substring(0, 4);
}
}
}
}
string[] cateArray = tmpCategory.Split('|');
string[] tmpArray = tmp.Split('|');
int a = 0;
foreach (string t in cateArray)
{
if (t == "") continue;
if (t.IndexOf("제작사") > -1)
comp = tmpArray[a];
a++;
}
// 가격, 상품 코드 가져오기
foreach (HtmlElement dd in webBrowser1.Document.GetElementsByTagName("dd"))
{
if (dd.GetAttribute("className").IndexOf("sale-price") > -1)
price = Regex.Replace(dd.InnerText, @"[^0-9]", ""); // 가격
if (dd.GetAttribute("className").IndexOf("product-code") > -1)
code = dd.InnerText.Split(' ')[0]; // 코드
}
// 출연진 가져오기
foreach (HtmlElement p in webBrowser1.Document.GetElementsByTagName("p"))
{
if (p.GetAttribute("className").IndexOf("actor") > -1)
{
actor = p.InnerText;
}
}
// 시놉시스 & 기타 정보 가져오기
string tmp_SYNOP = "";
string data = "";
foreach (HtmlElement div in webBrowser1.Document.GetElementsByTagName("div"))
{
if (div.GetAttribute("className").IndexOf("product_add") > -1)
{
data = div.InnerText.Replace(actor, "").Replace("\n", " | ");
}
if (div.GetAttribute("className").IndexOf("album_information_content_real") > -1)
{
tmp_SYNOP = div.InnerText;
}
}
bool isSYNOP = false;
foreach (string t in tmp_SYNOP.Split('\n'))
{
if (isSYNOP)
{
synopsis = t;
break;
}
if (t.IndexOf("SYNOPSIS") > -1)
isSYNOP = true;
}
string[] result = { title, artist, comp, code, price, PubDate, synopsis, actor, data };
return result;
}
/// <summary>
/// 종합하여 마크를 만드는 함수
/// </summary>
/// <param name="Data">[0]title, [1]artist, [2]comp, [3]code, [4]price, [5]PubDate, [6]synopsis, [7]actor, [8]data</param>
/// <returns></returns>
string MakeMarcKyoBo_DVD(string[] Data)
{
String_Text st = new String_Text();
string title = Data[0].Substring(0, Data[0].IndexOf("[")).Trim();
string OriTitle = st.GetMiddelString(Data[0], "[", "]");
string = MiddleData(Data[8], "언어");
string = MiddleData(Data[8], "자막");
string = MiddleData(Data[8], "화면");
string = MiddleData(Data[8], "음향");
string = MiddleData(Data[8], "등급");
string = MiddleData(Data[8], "상영시간");
string = MiddleData(Data[8], "디스크수");
string Marc = "020\t \t▼a" + Data[3] + ":▼c\\" + Data[4] + "▲\n";
Marc += KyoBoMake049(, );
Marc += "056\t \t▼a▼25▲\n";
Marc += "100\t1 \t▼a" + Data[1] + "▲\n";
Marc += "245\t10\t▼a" + title + "▼h[비디오 녹화자료]/▼d" + Data[1] + "▲\n";
Marc += "260\t \t▼a서울:▼b" + Data[2] + " [제작],▼c" + Data[5] + "▲\n";
Marc += String.Format("300\t \t▼aDVD {0}매({1})▼b유성, 천연색▼c12cm▲\n", , );
if ( != "") Marc += String.Format("500\t \t▼a언어 : {0}▲\n", );
if ( != "") Marc += String.Format("500\t \t▼a자막 : {0}▲\n", );
if ( != "") Marc += String.Format("500\t \t▼a화면 : {0}▲\n", );
if ( != "") Marc += String.Format("500\t \t▼a음향 : {0}▲\n", );
Marc += "500\t \t▼a지역코드, 3 NTSC▲\n";
if(OriTitle != null || OriTitle != "")
Marc += "507\t10\t▼a" + OriTitle + "▲\n";
Marc += String.Format("508\t \t▼제작진 : 감독 {0}▲\n", Data[1]);
foreach (string Value in Data[7].Split(','))
{
if (Value == "")
continue;
Marc += "507\t8 \t▼a" + Value.Trim() + "▲\n";
}
Marc += "520\t \t▼a" + Data[6] + "▲\n";
Marc += "521\t \t▼a" + + "▲\n";
Marc += "538\t \t▼aDVD 전용 플레이어▲\n";
foreach (string Value in Data[7].Split(','))
{
if (Value == "")
continue;
Marc += "700\t1 \t▼a" + Value.Trim() + "▲\n";
}
Marc += "950\t0 \t▼b\\" + Data[4] + "▲\n";
return Marc;
}
string KyoBoMake049(string Lang, string Text)
{
string Marc = ""; // "049\t0 \t";
//▼a" + Data[3] + ":▼c\\" + Data[4] + "▲\n"
string[] combo6 = {
"한국어", "영어", "일본어", "중국어", "독일어",
"프랑스어", "러시아어", "스페인어", "이탈리아어", "네덜란드어",
"핀란드어", "스웨덴어", "포르투갈어", "노르웨이어", "그리스어",
"체코어", "폴란드어", "다국어", "말레이시아어", "몽골어",
"버마어", "베트남어", "슬로베니아어", "아랍어", "아프리카어",
"에스토니아어", "우즈베키스탄어", "우크라이나어", "마라티어", "캄보디아어",
"태국어", "터키어", "투르크메니스탄어", "티베르어", "타갈로그어",
"헝가리어" };
string[] combo6_res = {
"kor", "eng", "jpn", "chi", "ger",
"fre", "rus", "spa", "ita", "dut",
"fin", "swe", "por", "nor", "grc",
"cze", "pol", "mul", "may", "mon",
"bur", "vie", "slv", "ara", "afr",
"est", "uzb", "ukr", "mar", "cam",
"tha", "tur", "tuk", "tib", "tag",
"hun" };
foreach (string s in Lang.Split(','))
{
int count = 0;
foreach (string s2 in combo6)
{
if (s.Trim() == s2)
{
Marc += "▼a" + combo6_res[count];
}
count++;
}
}
foreach (string s in Text.Split(','))
{
int count = 0;
foreach (string s2 in combo6)
{
if (s.Trim() == s2)
{
Marc += "▼b" + combo6_res[count];
}
count++;
}
}
if (Marc == "")
return "";
return "049\t0 \t" + Marc + "▲\n";
}
string MiddleData(string Data, string Search)
{
Search += " : ";
Data = Data.Replace(" │ ", "│");
if (Data.IndexOf(Search) > -1)
{
string tmp = Data.Substring(Data.IndexOf(Search) + Search.Length);
if (tmp.IndexOf("│") > -1)
return tmp.Substring(0, tmp.IndexOf("│"));
else
return tmp.Replace("│", "");
}
return "";
}
#endregion
#endregion
#region Aladin
string[] AladinInfor_Music()
{
string title = "";
string tmp = "";
string artist = "";
string subArtist = "";
string comp = "";
string price = "";
string PubYear = "";
string tmpMsg = "";
foreach (HtmlElement a in webBrowser1.Document.GetElementsByTagName("a"))
{
if (a.GetAttribute("className").IndexOf("Ere_bo_title") > -1)
title = a.InnerText;
if (a.GetAttribute("className").IndexOf("Ere_sub2_title") > -1)
{
if (a.GetAttribute("href").IndexOf("Publisher") > -1)
{
comp = a.InnerText;
continue;
}
tmp += a.InnerText + "|";
}
}
string tmp2 = "";
foreach (HtmlElement li in webBrowser1.Document.GetElementsByTagName("li"))
{
if (li.GetAttribute("className").IndexOf("Ere_sub2_title") > -1)
{
tmp2 += li.InnerText;
}
}
foreach (HtmlElement div in webBrowser1.Document.GetElementsByTagName("div"))
{
if (div.GetAttribute("className").IndexOf("Ritem") > -1)
{
price = Regex.Replace(div.InnerText, @"[^0-9]", "");
break;
}
}
string[] arytmp = tmp.Split('|');
foreach (string t in arytmp)
{
if (t == "")
continue;
tmp2 = tmp2.Replace(t, "");
}
artist = arytmp[0];
subArtist = string.Join("|", arytmp).Replace(artist, "");
PubYear = Regex.Replace(tmp2, @"[^0-9]", "").Substring(0, 4);
//PubYear = tmp2.Substring(0, 4);
isCD = AladinIsCD_Music();
string[] result = { title, artist, subArtist, comp, price, PubYear };
return result;
}
bool AladinIsCD_Music()
{
foreach (HtmlElement ul in webBrowser1.Document.GetElementsByTagName("ul"))
{
if (ul.Id != null && ul.Id.IndexOf("ulCategory") > -1)
{
if (ul.InnerText.Contains("LP"))
{
return false;
}
}
}
return true;
}
/// <summary>
/// 종합하여 마크를 만드는 함수
/// </summary>
/// <param name="Data">[0]title, [1]artist, [2]subArtist, [3]comp, [4]price, [5]PubYear</param>
/// <returns></returns>
string MakeMarcAladin_Music(string[] Data)
{
string Marc = "056\t \t▼a▼25▲\n";
Marc += "100\t1 \t▼a" + Data[1] + "▲\n";
Marc += "245\t10\t▼a" + Data[0] + "▼h[녹음자료]/▼d" + Data[1] + MakeSubArtist(Data[2]) + "▲\n";
Marc += "260\t \t▼a서울:▼b" + Data[3] + "▼c" + Data[5] + "▲\n";
Marc += "300\t \t▼a음반 1매";
if (isCD) Marc += "▼b디지털, 스테레오▼c12 cm▲\n500\t \t▼a컴팩트 디스크▲\n";
else Marc += "▼c30 cm▲\n";
Marc += "508\t \t▼a제작진 : " + Data[1] + "▲\n";
Marc += "521\t \t▼a전체이용가▲\n";
Marc += "653\t \t▼a" + Data[0].Replace(" ", "▼a") + "▲\n";
Marc += "950\t0 \t▼b\\" + Data[4] + "▲\n";
return Marc;
}
/// <summary>
/// 245e에 들어갈 자리를 만듦.
/// </summary>
/// <param name="SubArtist">메인 아티스트를 제외한 서브 아티스트들</param>
/// <returns></returns>
string MakeSubArtist(string SubArtist)
{
if (SubArtist == "")
return "";
string[] ary = SubArtist.Split('|');
string result = "";
foreach (string t in ary)
{
if (t == "")
continue;
result += "▼e" + t;
}
return result;
}
#endregion
#region DVD
#endregion
#endregion
private void Btn_Close_Click(object sender, EventArgs e)
{
this.Close();

View File

@@ -157,7 +157,7 @@ namespace WindowsFormsApp1.Mac
private bool SearchCopy(bool isISBN)
{
if (!webBrowser1.Url.AbsoluteUri.Contains("collectionFormMA")) {
if (!webBrowser1.Url.AbsoluteUri.Contains("collectionFormMA")) {
MessageBox.Show("자료관리 창이 아닙니다!");
return false;
}
@@ -166,7 +166,7 @@ namespace WindowsFormsApp1.Mac
for(int a = 0; a < count; a++)
{
string Check = "";
string Check;
if (isISBN) {
string Target = dataGridView1.Rows[a].Cells["ISBN"].Value.ToString();
Check = SearchISBN(Target);
@@ -178,6 +178,10 @@ namespace WindowsFormsApp1.Mac
if (Check == "0")
Check = "";
dataGridView1.Rows[a].Cells["Check"].Value = Check;
if (Check == "")
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.LightGray;
else
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Yellow;
}
return true;
}

View File

@@ -228,6 +228,7 @@ namespace WindowsFormsApp1.Convenience
};
string[] Marc = {
"마크 추가", "마크 목록", "소장자료검색", "마크 정리", "복본 조사", "ISBN 조회",
"DVD/CD/LP 목록", "DVD/CD/LP 편목",
"반입", "반출",
"전집관리", "저자기호", "DLS 복본 조사", "DLS 조회 입력",
"마크통계"