diff --git a/unimarc/unimarc/Email.cs b/unimarc/unimarc/Email.cs index 2d64c8e..782d9fe 100644 --- a/unimarc/unimarc/Email.cs +++ b/unimarc/unimarc/Email.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; @@ -74,12 +75,12 @@ namespace UniMarc { SmtpMail.SmtpServer = smtp_server; SmtpMail.Send(msg); - MessageBox.Show("다음 메일 전송 성공"); + UTIL.MsgI("다음 메일 전송 성공"); return true; } catch (Exception e) { - MessageBox.Show(e.ToString()); + UTIL.MsgE(e.ToString()); return false; } } @@ -118,12 +119,12 @@ namespace UniMarc try { smtp.Send(mail); - MessageBox.Show("메일 전송 완료"); + UTIL.MsgI("메일 전송 완료"); return true; } catch (SmtpException e) { - MessageBox.Show(e.ToString()); + UTIL.MsgE(e.ToString()); return false; } } @@ -156,7 +157,7 @@ namespace UniMarc } catch (Exception e) { - MessageBox.Show(e.ToString()); + UTIL.MsgE(e.ToString()); } } else @@ -187,7 +188,7 @@ namespace UniMarc } catch (SmtpException e) { - MessageBox.Show(e.ToString()); + UTIL.MsgE(e.ToString()); } } } diff --git a/unimarc/unimarc/Helper_DB.cs b/unimarc/unimarc/Helper_DB.cs index e7df2ae..6ee5b3e 100644 --- a/unimarc/unimarc/Helper_DB.cs +++ b/unimarc/unimarc/Helper_DB.cs @@ -55,7 +55,7 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show(ex.ToString(), "ExecuteQueryData Error"); + UTIL.MsgE(ex.ToString()); return null; } } @@ -748,8 +748,7 @@ namespace UniMarc } catch (Exception e) { - MessageBox.Show("{0} Exception caught.\n" + e.ToString()); - MessageBox.Show(cmd); + UTIL.MsgE(e.ToString()); } conn.Close(); return result; diff --git a/unimarc/unimarc/ListOfValue/fSelectDT.cs b/unimarc/unimarc/ListOfValue/fSelectDT.cs index 9ff55a6..ec2eefd 100644 --- a/unimarc/unimarc/ListOfValue/fSelectDT.cs +++ b/unimarc/unimarc/ListOfValue/fSelectDT.cs @@ -123,7 +123,7 @@ namespace UniMarc.ListOfValue { if (this.bs.Current == null) { - MessageBox.Show("선택된 데이터가 없습니다.", "알림", MessageBoxButtons.OK, MessageBoxIcon.Warning); + UTIL.MsgE("선택된 데이터가 없습니다."); return; } diff --git a/unimarc/unimarc/Login.cs b/unimarc/unimarc/Login.cs index 445c6e5..b04761d 100644 --- a/unimarc/unimarc/Login.cs +++ b/unimarc/unimarc/Login.cs @@ -11,6 +11,7 @@ using System.IO; using System.Net; using System.Net.Sockets; using Application = System.Windows.Forms.Application; +using AR; namespace UniMarc { @@ -62,7 +63,7 @@ namespace UniMarc ((Main)(this.Owner)).User_Name = ID_text.Text; if (db_res == "") { - MessageBox.Show("아이디 혹은 비밀번호가 정확하지않습니다."); + UTIL.MsgE("아이디 혹은 비밀번호가 정확하지않습니다."); return; } @@ -75,7 +76,7 @@ namespace UniMarc WriteFile(); if (!CheckIP(lbl_IP.Text, result[4])) { - MessageBox.Show("허용된 아이피가 아닙니다!"); + UTIL.MsgE("허용된 아이피가 아닙니다!"); return; } ((Main)(this.Owner)).IPText.Text = string.Format("접속 아이피 : {0}", lbl_IP.Text); @@ -88,12 +89,12 @@ namespace UniMarc } else { - MessageBox.Show("아이디 혹은 비밀번호가 정확하지않습니다."); + UTIL.MsgE("아이디 혹은 비밀번호가 정확하지않습니다."); } } else { - MessageBox.Show("아이디 혹은 비밀번호가 정확하지않습니다."); + UTIL.MsgE("아이디 혹은 비밀번호가 정확하지않습니다."); } } #region CheckIP diff --git a/unimarc/unimarc/Main.cs b/unimarc/unimarc/Main.cs index 9e88485..18b3145 100644 --- a/unimarc/unimarc/Main.cs +++ b/unimarc/unimarc/Main.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -97,7 +98,7 @@ namespace UniMarc isAccess(); SetBtnName(); } - catch (Exception ex) { MessageBox.Show(ex.ToString()); } + catch (Exception ex) { UTIL.MsgE(ex.ToString()); } UpdaterCheck(); @@ -298,7 +299,7 @@ namespace UniMarc // 권한설정으로 인한 리턴 if (!MenuCheckT[count[0]][count[1]].Enabled) { - MessageBox.Show("권한이 설정되지 않았습니다!"); + UTIL.MsgE("권한이 설정되지 않았습니다!"); return; } diff --git a/unimarc/unimarc/Program.cs b/unimarc/unimarc/Program.cs index 4896cb8..578020c 100644 --- a/unimarc/unimarc/Program.cs +++ b/unimarc/unimarc/Program.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; @@ -30,7 +31,7 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show(ex.Message); + UTIL.MsgE(ex.Message); } Application.Run(new Main()); diff --git a/unimarc/unimarc/Skill.cs b/unimarc/unimarc/Skill.cs index 0fde85b..530ccdf 100644 --- a/unimarc/unimarc/Skill.cs +++ b/unimarc/unimarc/Skill.cs @@ -286,7 +286,7 @@ namespace UniMarc Helper_DB db = new Helper_DB(); db.DBcon(); - if (Pur == "") { MessageBox.Show("입력된 주문처가 없습니다!"); return "False"; } + if (Pur == "") { UTIL.MsgE("입력된 주문처가 없습니다!"); return "False"; } string Area = "`comp_name`, `tel`, `fax`, `bubin`, `uptae`, " + "`jongmok`, `addr`, `boss`, `email`, `barea`"; @@ -304,7 +304,7 @@ namespace UniMarc if (db_res1.Length < 3) { - MessageBox.Show("DB호출 에러!", "Error"); + UTIL.MsgE("DB호출 에러!"); return "False"; } string tel = string.Empty; @@ -377,7 +377,7 @@ namespace UniMarc // 엑셀 파일 이름 설정 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]); - MessageBox.Show(FileName); + UTIL.MsgI(FileName); // 엑셀 파일 저장 경로 string Savepath = Path.Combine(tempPath, FileName); @@ -602,7 +602,7 @@ namespace UniMarc } catch (Exception e) { - MessageBox.Show(e.ToString()); + UTIL.MsgE(e.ToString()); return "False"; } } @@ -640,7 +640,7 @@ namespace UniMarc } catch (Exception e) { - MessageBox.Show(e.ToString()); + UTIL.MsgE(e.ToString()); } } #region MK_Excel_Sub @@ -824,9 +824,9 @@ namespace UniMarc string ErrMsg = FAX_GetErrString(result); if (ErrMsg != "") - MessageBox.Show(msg, "전송완료"); + UTIL.MsgI(msg); else - MessageBox.Show(ErrMsg, "Error"); + UTIL.MsgE(ErrMsg); return result; } @@ -1307,7 +1307,7 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show(ex.ToString()); + UTIL.MsgE(ex.ToString()); this.LastException = ex; System.Reflection.MemberInfo info = System.Reflection.MethodInfo.GetCurrentMethod(); string id = string.Format("{0}.{1}", info.ReflectedType.Name, info.Name); @@ -1326,8 +1326,6 @@ namespace UniMarc string url = string.Format(@"FTP://{0}:{1}/{2}", ipAddr, Port, serverFullPathFile); FtpWebRequest ftp = (FtpWebRequest)WebRequest.Create(url); - MessageBox.Show(url); - ftp.Credentials = new NetworkCredential(userId, Pwd); ftp.KeepAlive = false; ftp.UseBinary = true; @@ -1365,7 +1363,7 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show(ex.ToString()); + UTIL.MsgE(ex.ToString()); this.LastException = ex; if (serverFullPathFile.Contains(@"\ZOOM\")) @@ -2459,7 +2457,7 @@ namespace UniMarc } else { - MessageBox.Show(status, "Error"); + UTIL.MsgE(status); return "Error"; } diff --git a/unimarc/unimarc/납품관리/Book_Lookup.cs b/unimarc/unimarc/납품관리/Book_Lookup.cs index 6d8e51c..65e2774 100644 --- a/unimarc/unimarc/납품관리/Book_Lookup.cs +++ b/unimarc/unimarc/납품관리/Book_Lookup.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; 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); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show("저장되었습니다."); + UTIL.MsgI("저장되었습니다."); } 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 }; string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show(tb_book_name.Text + "가 입고처리되었습니다."); + UTIL.MsgI(tb_book_name.Text + "가 입고처리되었습니다."); 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); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show(tb_book_name.Text + "가 미입고처리되었습니다."); + UTIL.MsgI(tb_book_name.Text + "가 미입고처리되었습니다."); mk_Grid(); } private void btn_order_ccl_Click(object sender, EventArgs e) diff --git a/unimarc/unimarc/납품관리/Book_Lookup2.cs b/unimarc/unimarc/납품관리/Book_Lookup2.cs index 559aeb8..f193284 100644 --- a/unimarc/unimarc/납품관리/Book_Lookup2.cs +++ b/unimarc/unimarc/납품관리/Book_Lookup2.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; 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); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show("저장되었습니다."); + UTIL.MsgI("저장되었습니다."); } 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 }; string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show(tb_book_name.Text + "가 입고처리되었습니다."); + UTIL.MsgI(tb_book_name.Text + "가 입고처리되었습니다."); 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); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show(tb_book_name.Text + "가 미입고처리되었습니다."); + UTIL.MsgI(tb_book_name.Text + "가 미입고처리되었습니다."); mk_Grid(); } private void btn_order_ccl_Click(object sender, EventArgs e) diff --git a/unimarc/unimarc/납품관리/Commodity_registration.cs b/unimarc/unimarc/납품관리/Commodity_registration.cs index 93175dc..02553e3 100644 --- a/unimarc/unimarc/납품관리/Commodity_registration.cs +++ b/unimarc/unimarc/납품관리/Commodity_registration.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -103,7 +104,7 @@ namespace UniMarc } else { - MessageBox.Show("읽을 파일이 없습니다.", "에러", MessageBoxButtons.OK, MessageBoxIcon.Error); + UTIL.MsgE("읽을 파일이 없습니다."); } } /// @@ -126,16 +127,16 @@ namespace UniMarc /// private void btn_Save_Click(object sender, EventArgs e) { - if(cltchk == false || tb_clt1.Text=="") { MessageBox.Show("거래처를 확인해주세요."); return; } - if (chk_Save_DB() == -1) { MessageBox.Show("작업 대상을 선택해 주세요."); return; } + if(cltchk == false || tb_clt1.Text=="") { UTIL.MsgE("거래처를 확인해주세요."); return; } + if (chk_Save_DB() == -1) { UTIL.MsgE("작업 대상을 선택해 주세요."); return; } string cmd = db.DB_Select_Search("name", "User_Data", "name", tb_UserName.Text); if (db.DB_Send_CMD_Search(cmd) == "") - { MessageBox.Show("담당자를 확인해주세요."); return; } + { UTIL.MsgE("담당자를 확인해주세요."); return; } // TODO: 목록명, 목록일자로 구분 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) != "") - { MessageBox.Show("DB의 납품목록과 중복됩니다."); return; } + { UTIL.MsgE("DB의 납품목록과 중복됩니다."); return; } bool MsgOk = false; int Marc_ton = chk_Save_DB(); @@ -189,7 +190,7 @@ namespace UniMarc } } if (MsgOk) { - MessageBox.Show(Strmsg + "번째 행의 단가/수량/합계를 확인해 주세요."); + UTIL.MsgE(Strmsg + "번째 행의 단가/수량/합계를 확인해 주세요."); return; } 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); Helper_DB.ExcuteNonQuery(Incmd); + UTIL.MsgI("저장되었습니다."); + Grid1_total(); dataGridView2.Rows.Add(add_grid_data); GridColorChange(); @@ -269,7 +272,7 @@ namespace UniMarc { int cout = 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++) { @@ -277,10 +280,10 @@ namespace UniMarc if (isChecked) { 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) { string[] del_target = { dataGridView2.Rows[delcout].Cells["list_date"].Value.ToString(), @@ -305,10 +308,10 @@ namespace UniMarc if (isChecked) { 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) { Commodity_Edit edit = new Commodity_Edit(this); @@ -417,10 +420,10 @@ namespace UniMarc 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) { - MessageBox.Show("체크가 1개밖에 되어있지않습니다."); + UTIL.MsgE("체크가 1개밖에 되어있지않습니다."); } else if (cout == 2) { Commodity_Morge morge = new Commodity_Morge(this); @@ -428,12 +431,12 @@ namespace UniMarc } else if (cout > 2) { - MessageBox.Show("체크된 사항이 너무 많습니다!"); + UTIL.MsgE("체크된 사항이 너무 많습니다!"); } } 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++) { @@ -455,7 +458,7 @@ namespace UniMarc } 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++) { diff --git a/unimarc/unimarc/납품관리/Input_Lookup_Stock.cs b/unimarc/unimarc/납품관리/Input_Lookup_Stock.cs index b797c20..801c290 100644 --- a/unimarc/unimarc/납품관리/Input_Lookup_Stock.cs +++ b/unimarc/unimarc/납품관리/Input_Lookup_Stock.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -16,7 +17,7 @@ namespace UniMarc Helper_DB db = new Helper_DB(); public string compidx; string table_name = "Inven"; - int rowidx=0; + int rowidx = 0; public Input_Lookup_Stock(Main _main) { InitializeComponent(); @@ -34,7 +35,7 @@ namespace UniMarc string cmd = db.DB_Select_Search(Area, table_name, "compidx", compidx); string db_res = db.DB_Send_CMD_Search(cmd); mk_grid(db_res); - for(int a= 0; a < dataGridView1.Rows.Count; a++) + for (int a = 0; a < dataGridView1.Rows.Count; a++) { if (chk_stock(dataGridView1.Rows[a].Cells["ISBN"].Value.ToString()) == true) { @@ -48,7 +49,8 @@ namespace UniMarc string[] data = db_data.Split('|'); 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 == 1) { input_grid[1] = 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 == 5) { input_grid[5] = 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]; } 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) @@ -70,13 +74,13 @@ namespace UniMarc } private void btn_Save_Click(object sender, EventArgs e) { - if (tb_book_name.Text == "") { MessageBox.Show("도서명을 작성해주세요."); return; } - if (tb_isbn.Text == "") { MessageBox.Show("ISBN을 작성해주세요."); return; } - if (tb_book_comp.Text == "") { MessageBox.Show("출판사를 작성해주세요."); return; } - if (tb_author.Text == "") { MessageBox.Show("저자를 작성해주세요."); return; } - if (tb_pay.Text == "") { MessageBox.Show("정가를 작성해주세요."); return; } - if (tb_order.Text == "") { MessageBox.Show("매입처를 작성해주세요."); return; } - if (tb_count.Text == "") { MessageBox.Show("수량을 작성해주세요."); return; } + if (tb_book_name.Text == "") { UTIL.MsgE("도서명을 작성해주세요."); return; } + if (tb_isbn.Text == "") { UTIL.MsgE("ISBN을 작성해주세요."); return; } + if (tb_book_comp.Text == "") { UTIL.MsgE("출판사를 작성해주세요."); return; } + if (tb_author.Text == "") { UTIL.MsgE("저자를 작성해주세요."); return; } + if (tb_pay.Text == "") { UTIL.MsgE("정가를 작성해주세요."); return; } + if (tb_order.Text == "") { UTIL.MsgE("매입처를 작성해주세요."); return; } + if (tb_count.Text == "") { UTIL.MsgE("수량을 작성해주세요."); return; } if (!ask_SaveChk(grid_text_savechk())) { return; } @@ -86,7 +90,7 @@ namespace UniMarc "order", "count", "import_date", "compidx" }; string Incmd = db.DB_INSERT(table_name, where, input); Helper_DB.ExcuteNonQuery(Incmd); - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); } private bool grid_text_savechk() { @@ -106,10 +110,10 @@ namespace UniMarc } private bool ask_SaveChk(bool ask) { - if (!ask) { - if (MessageBox.Show("저장하실 내용이 입고에 저장되어있습니다. 저장하시겠습니까?", "경고!", - MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) { - + if (!ask) + { + if (UTIL.MsgQ("저장하실 내용이 입고에 저장되어있습니다. 저장하시겠습니까?") != DialogResult.Yes) + { return false; } } @@ -135,7 +139,7 @@ namespace UniMarc private void stock_check(string[] stock) { string[] gird = { "", "", "", "", "", "", "", "" }; - for(int a = 0; a < stock.Length - 1; a++) + for (int a = 0; a < stock.Length - 1; a++) { if (a % 8 == 0) { gird[0] = stock[a]; } if (a % 8 == 1) { gird[1] = stock[a]; } @@ -144,10 +148,12 @@ namespace UniMarc if (a % 8 == 4) { gird[4] = stock[a]; } if (a % 8 == 5) { gird[5] = 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]; } else { gird[7] = stock[a].Substring(0, 10); } - if (chk_stock(gird[0]) == true) { + if (chk_stock(gird[0]) == true) + { dataGridView1.Rows.Add(gird); } } @@ -206,12 +212,12 @@ namespace UniMarc private void input_TextBox(string[] Text) { tb_book_name.Text = Text[0]; - tb_isbn.Text = Text[1]; + tb_isbn.Text = Text[1]; tb_book_comp.Text = Text[2]; - tb_author.Text = Text[3]; - tb_pay.Text = Text[4]; - tb_order.Text = Text[5]; - tb_count.Text = Text[6]; + tb_author.Text = Text[3]; + tb_pay.Text = Text[4]; + tb_order.Text = Text[5]; + tb_count.Text = Text[6]; } private void btn_Close_Click(object sender, EventArgs e) { diff --git a/unimarc/unimarc/납품관리/List_Lookup.cs b/unimarc/unimarc/납품관리/List_Lookup.cs index ab68e94..2a4fc9a 100644 --- a/unimarc/unimarc/납품관리/List_Lookup.cs +++ b/unimarc/unimarc/납품관리/List_Lookup.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using System.Drawing.Printing; using System.IO; +using AR; namespace UniMarc { @@ -91,7 +92,7 @@ namespace UniMarc private void btn_print_Click(object sender, EventArgs e) // 인쇄 기능 { if (dataGridView1.Rows.Count < 1) { - MessageBox.Show("인쇄할 목록이 없습니다!"); + UTIL.MsgE("인쇄할 목록이 없습니다!"); return; } // 여백 설정 diff --git a/unimarc/unimarc/납품관리/List_aggregation.cs b/unimarc/unimarc/납품관리/List_aggregation.cs index d92bcec..2823bfe 100644 --- a/unimarc/unimarc/납품관리/List_aggregation.cs +++ b/unimarc/unimarc/납품관리/List_aggregation.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -246,7 +247,7 @@ namespace UniMarc string U_cmd = db.More_Update(table, Edit_col, Edit_Data, Search_col, Search_Data); Helper_DB.ExcuteNonQuery(U_cmd); } - MessageBox.Show("저장되었습니다."); + UTIL.MsgI("저장되었습니다."); } 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); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show("정상적으로 완료처리 되었습니다."); + UTIL.MsgI("정상적으로 완료처리 되었습니다."); } /// /// 목록도서DB 내용을 들고와서 SalesDB에 출고율을 추가하여 집어넣는다. diff --git a/unimarc/unimarc/납품관리/Order_Send_Chk.cs b/unimarc/unimarc/납품관리/Order_Send_Chk.cs index 998332a..ae19eee 100644 --- a/unimarc/unimarc/납품관리/Order_Send_Chk.cs +++ b/unimarc/unimarc/납품관리/Order_Send_Chk.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -63,7 +64,7 @@ namespace UniMarc Area, "날짜", start, end, gu, 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); - MessageBox.Show(Fax_Key_ary); + UTIL.MsgI(Fax_Key_ary); string[] Fax_Key = Fax_Key_ary.Split('|'); input_Grid(Fax_Key); #endregion @@ -212,10 +213,10 @@ namespace UniMarc private static void DownloadFileCallBack(object sender, AsyncCompletedEventArgs e) { if (e.Cancelled) - MessageBox.Show("File Download Cancelled"); + UTIL.MsgE("File Download Cancelled"); if (e.Error != null) - MessageBox.Show(e.Error.ToString()); + UTIL.MsgE(e.Error.ToString()); } #endregion } diff --git a/unimarc/unimarc/납품관리/Order_input.cs b/unimarc/unimarc/납품관리/Order_input.cs index 41d376d..962541c 100644 --- a/unimarc/unimarc/납품관리/Order_input.cs +++ b/unimarc/unimarc/납품관리/Order_input.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; 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); Helper_DB.ExcuteNonQuery(U_cmd); } - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); } 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()); } } - if (chkIdx.Count < 1) { MessageBox.Show("선택된 도서가 없습니다!"); return "false"; } + if (chkIdx.Count < 1) { UTIL.MsgE("선택된 도서가 없습니다!"); return "false"; } string[,] inputExcel = new string[chkIdx.Count, 7]; string pur = dataGridView1.Rows[chkIdx[0]].Cells["order"].Value.ToString(); @@ -433,7 +434,7 @@ namespace UniMarc } Excel_text ex = new Excel_text(); string filename = ex.mk_Excel_Order(inputExcel, total, compidx, pur, tb_PS.Text); - MessageBox.Show("엑셀 반출 완료"); + UTIL.MsgI("엑셀 반출 완료"); return filename; } @@ -453,7 +454,7 @@ namespace UniMarc { if (dataGridView1.Rows[a].Cells["order"].Value.ToString() != over_lab) { - MessageBox.Show("주문처가 동일하지 않습니다!", "Error"); + UTIL.MsgE("주문처가 동일하지 않습니다!"); return "false"; } } @@ -592,7 +593,7 @@ namespace UniMarc if (pur_data[1] == "") { - MessageBox.Show("주문처의 팩스 번호가 비어있습니다!", "Error"); + UTIL.MsgE("주문처의 팩스 번호가 비어있습니다!"); return false; } @@ -675,7 +676,7 @@ namespace UniMarc if (st.isContainHangul(m_send)) { - MessageBox.Show("DB내 저장된 이메일이 사양과 다릅니다. 직접 입력해주세요."); + UTIL.MsgE("DB내 저장된 이메일이 사양과 다릅니다. 직접 입력해주세요."); Skill_Search_Text sst = new Skill_Search_Text(); string value = ""; diff --git a/unimarc/unimarc/납품관리/Purchase.cs b/unimarc/unimarc/납품관리/Purchase.cs index 622755d..7dbdb39 100644 --- a/unimarc/unimarc/납품관리/Purchase.cs +++ b/unimarc/unimarc/납품관리/Purchase.cs @@ -9,6 +9,7 @@ using System.Threading.Tasks; using System.Windows.Forms; using System.IO; using System.Windows.Forms.VisualStyles; +using AR; namespace UniMarc { @@ -219,7 +220,7 @@ namespace UniMarc } if (name == "dataGridView1" && col == 11) { if(tb_persent.Text == "") { - MessageBox.Show("매입율을 작성해주세요."); + UTIL.MsgE("매입율을 작성해주세요."); tb_persent.Focus(); } 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) { @@ -429,7 +430,7 @@ namespace UniMarc if (chk_stock.Checked == true) { if (stock_chk(isbn_chk) == true) { int inven_count = stock_count_chk(isbn_chk); - MessageBox.Show(inven_count.ToString()); + UTIL.MsgI(inven_count.ToString()); if (lbl_inven_count.Text == "0") { lbl_inven_count.Text = "0"; inven_count = 0; @@ -792,7 +793,7 @@ namespace UniMarc { string Incmd = db.DB_INSERT("Inven", input_col, input_data); Helper_DB.ExcuteNonQuery(Incmd); - MessageBox.Show("DB 새로 추가"); + UTIL.MsgI("DB 새로 추가"); return; } else @@ -802,7 +803,7 @@ namespace UniMarc string[] cout = db_res.Split('|'); int count = Convert.ToInt32(cout[0]); count += data; - MessageBox.Show("DB 수정"); + UTIL.MsgI("DB 수정"); string U_cmd = db.DB_Update("Inven", "count", count.ToString(), "idx", cout[0]); Helper_DB.ExcuteNonQuery(U_cmd); } @@ -942,7 +943,7 @@ namespace UniMarc } private void Purchase_FormClosing(object sender, FormClosingEventArgs e) { - if (MessageBox.Show("이대로 닫으시겠습니까?", "경고", MessageBoxButtons.YesNo) == DialogResult.No) + if (UTIL.MsgQ("이대로 닫으시겠습니까?") != DialogResult.Yes) { // 로컬파일 생성. (C:\) create_TempTxt(); diff --git a/unimarc/unimarc/마스터/From_User_manage_List.cs b/unimarc/unimarc/마스터/From_User_manage_List.cs index eef171e..31b967c 100644 --- a/unimarc/unimarc/마스터/From_User_manage_List.cs +++ b/unimarc/unimarc/마스터/From_User_manage_List.cs @@ -29,7 +29,7 @@ namespace UniMarc { if (tCheckText == "") { - MessageBox.Show("전화번호, 상호, 이메일, IP, 고유번호는 필수 입력 사항입니다."); + UTIL.MsgE("전화번호, 상호, 이메일, IP, 고유번호는 필수 입력 사항입니다."); return; } } @@ -43,7 +43,7 @@ namespace UniMarc string tResult = mDb.DB_Send_CMD_Search(tCmd); if (tResult != "") { - MessageBox.Show("상호명이 중복되었습니다.\n다시 확인해주세요."); + UTIL.MsgE("상호명이 중복되었습니다.\n다시 확인해주세요."); return; } @@ -52,7 +52,7 @@ namespace UniMarc if (tResult != "") { - MessageBox.Show("고유번호가 중복되었습니다.\n다시 확인해주세요."); + UTIL.MsgE("고유번호가 중복되었습니다.\n다시 확인해주세요."); return; } @@ -86,7 +86,7 @@ namespace UniMarc { if (dgvList.CurrentCell == null || dgvList.CurrentCell.RowIndex < 0 || dgvList.SelectedRows.Count == 0) { - MessageBox.Show("수정할 행을 선택해 주세요."); + UTIL.MsgE("수정할 행을 선택해 주세요."); return; } 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) { - MessageBox.Show("삭제할 행을 선택해 주세요."); + UTIL.MsgE("삭제할 행을 선택해 주세요."); return; } string tText = string.Format("{0} 를 삭제 하시겠습니까?", dgvList.SelectedRows[0].Cells["comp_name"].Value.ToString()); diff --git a/unimarc/unimarc/마스터/Sales_Details.cs b/unimarc/unimarc/마스터/Sales_Details.cs index 8b31f25..9c957df 100644 --- a/unimarc/unimarc/마스터/Sales_Details.cs +++ b/unimarc/unimarc/마스터/Sales_Details.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -32,10 +33,10 @@ namespace UniMarc { data = Doc.GetElementsByTagName("b")[a].InnerText; 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? // ItemId=248012843" class="bo3"> // 무한도전 낱말퍼즐 : 과학 diff --git a/unimarc/unimarc/마스터/User_manage.cs b/unimarc/unimarc/마스터/User_manage.cs index 916cdbc..e23a6fb 100644 --- a/unimarc/unimarc/마스터/User_manage.cs +++ b/unimarc/unimarc/마스터/User_manage.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -39,12 +40,12 @@ namespace UniMarc if (ID == "") { - MessageBox.Show("ID칸이 비어있습니다!"); + UTIL.MsgE("ID칸이 비어있습니다!"); return; } if (!System.Text.RegularExpressions.Regex.IsMatch(ID, @"^[a-zA-Z0-9]")) { - MessageBox.Show("영어와 숫자 조합으로 작성해주세요!"); + UTIL.MsgE("영어와 숫자 조합으로 작성해주세요!"); isIDcheck = false; return; } @@ -52,12 +53,12 @@ namespace UniMarc string cmd = string.Format("SELECT * FROM `User_Data` WHERE `ID` = \"{0}\";", ID); string res = db.DB_Send_CMD_Search(cmd); if (res == "") { - MessageBox.Show("사용가능한 이이디입니다. [" + ID + "]"); + UTIL.MsgI("사용가능한 이이디입니다. [" + ID + "]"); isIDcheck = true; button1.ForeColor = Color.Blue; } else { - MessageBox.Show("중복된 아이디입니다. [" + ID + "]"); + UTIL.MsgE("중복된 아이디입니다. [" + ID + "]"); isIDcheck = false; } } @@ -77,7 +78,7 @@ namespace UniMarc foreach (string CheckText in NeedText) { if (CheckText == "") { - MessageBox.Show("노란 박스는 꼭 채워주세요!"); + UTIL.MsgE("노란 박스는 꼭 채워주세요!"); return; } } @@ -85,12 +86,12 @@ namespace UniMarc string cmd_sanghoCheck = string.Format("SELECT * FROM `Comp` WHERE `comp_name` = \"{0}\"", tb_sangho.Text); string res = db.DB_Send_CMD_Search(cmd_sanghoCheck); if (res != "") { - MessageBox.Show("상호명이 중복되었습니다.\n다시 확인해주세요."); + UTIL.MsgE("상호명이 중복되었습니다.\n다시 확인해주세요."); return; } if (!isIDcheck) { - MessageBox.Show("아이디 중복확인 먼저 진행해주세요."); + UTIL.MsgE("아이디 중복확인 먼저 진행해주세요."); return; } diff --git a/unimarc/unimarc/마크/AddMarc.cs b/unimarc/unimarc/마크/AddMarc.cs index 36770f1..4c957d5 100644 --- a/unimarc/unimarc/마크/AddMarc.cs +++ b/unimarc/unimarc/마크/AddMarc.cs @@ -1,4 +1,5 @@ -using SHDocVw; +using AR; +using SHDocVw; using System; using System.Collections.Generic; using System.ComponentModel; @@ -220,12 +221,12 @@ namespace UniMarc if (TagIndex == 1) { - MessageBox.Show("[칸채우기]가 아닌 [마크 작성] 탭에서 저장해주세요!"); + UTIL.MsgE("[칸채우기]가 아닌 [마크 작성] 탭에서 저장해주세요!"); return; } if (grade == 3 || grade == -1) { - MessageBox.Show("등급을 설정해주세요. (C 이상)"); + UTIL.MsgE("등급을 설정해주세요. (C 이상)"); return; } @@ -238,7 +239,7 @@ namespace UniMarc if (!isPass(MarcText)) { - MessageBox.Show("입력된 마크의 상태를 확인해주세요.", "isPass"); + UTIL.MsgE("입력된 마크의 상태를 확인해주세요."); return; } @@ -277,7 +278,7 @@ namespace UniMarc else InsertMarc(Table, BookData, orimarc, grade, tag056, date); - MessageBox.Show("저장되었습니다.", "저장"); + UTIL.MsgI("저장되었습니다."); } #region SaveSub @@ -431,7 +432,7 @@ namespace UniMarc } if (!isTag) { - MessageBox.Show(msg + "태그가 없습니다."); + UTIL.MsgE(msg + "태그가 없습니다."); return false; } @@ -445,7 +446,7 @@ namespace UniMarc } if (!is1XX) { - MessageBox.Show("기본표목이 존재하지않습니다."); + UTIL.MsgE("기본표목이 존재하지않습니다."); return false; } @@ -463,7 +464,7 @@ namespace UniMarc if (!is7XX) { - MessageBox.Show("부출표목이 존재하지않습니다."); + UTIL.MsgE("부출표목이 존재하지않습니다."); return false; } @@ -572,13 +573,13 @@ namespace UniMarc } else { - MessageBox.Show(string.Format("SplitError : {0}", string.Join("\t", DataSplit))); + UTIL.MsgE(string.Format("SplitError : {0}", string.Join("\t", DataSplit))); return false; } } else { - MessageBox.Show(string.Format("DataError : {0}", Data)); + UTIL.MsgE(string.Format("DataError : {0}", Data)); return false; } } @@ -776,7 +777,7 @@ namespace UniMarc if (pubDate.Length < 3) { - MessageBox.Show("260c가 인식되지않습니다."); + UTIL.MsgE("260c가 인식되지않습니다."); return "false"; } else if (pubDate.Length < 5) @@ -805,7 +806,7 @@ namespace UniMarc if (res == "") { - MessageBox.Show("260a가 인식되지않습니다."); + UTIL.MsgE("260a가 인식되지않습니다."); return "false"; } else if (res.Length < 3) @@ -2680,7 +2681,7 @@ namespace UniMarc } catch(Exception ex) { - MessageBox.Show("데이터가 올바르지않습니다.\n245d를 확인해주세요.\n" + ex.ToString()); + UTIL.MsgE("데이터가 올바르지않습니다.\n245d를 확인해주세요.\n" + ex.ToString()); } } #region 기본표목 생성 서브 함수 diff --git a/unimarc/unimarc/마크/All_Book_manage.cs b/unimarc/unimarc/마크/All_Book_manage.cs index b816bda..f50a9dd 100644 --- a/unimarc/unimarc/마크/All_Book_manage.cs +++ b/unimarc/unimarc/마크/All_Book_manage.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -143,7 +144,7 @@ namespace UniMarc { if (V_idx != -1 && dataGridView1.Rows[a].Cells["chk_V"].Value.ToString() == "V") { - MessageBox.Show("체크사항이 1개인지 확인해주세요."); + UTIL.MsgE("체크사항이 한 개인지 확인해주세요."); return -1; } if (dataGridView1.Rows[a].Cells["chk_V"].Value.ToString() == "V") @@ -162,7 +163,7 @@ namespace UniMarc 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_data = { diff --git a/unimarc/unimarc/마크/All_Book_manage_Add.cs b/unimarc/unimarc/마크/All_Book_manage_Add.cs index 374fb6d..79cf2a0 100644 --- a/unimarc/unimarc/마크/All_Book_manage_Add.cs +++ b/unimarc/unimarc/마크/All_Book_manage_Add.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -62,7 +63,7 @@ namespace UniMarc } } if (!grid_chk) { - MessageBox.Show("필수 입력사항이 비어있습니다!\n맨 앞에 \"*\"이 붙은 곳을 확인해주세요."); + UTIL.MsgE("필수 입력사항이 비어있습니다!\n맨 앞에 \"*\"이 붙은 곳을 확인해주세요."); return; } @@ -88,7 +89,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(Incmd); } - MessageBox.Show("저장완료"); + UTIL.MsgI("저장완료"); // 부모폼 조회버튼 클릭 manage.btn_Search_Click(null, null); diff --git a/unimarc/unimarc/마크/All_Book_manage_Edit.cs b/unimarc/unimarc/마크/All_Book_manage_Edit.cs index d7db9d6..29905e7 100644 --- a/unimarc/unimarc/마크/All_Book_manage_Edit.cs +++ b/unimarc/unimarc/마크/All_Book_manage_Edit.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -58,7 +59,7 @@ namespace UniMarc string U_cmd = db.More_Update(table, edit_tbl, edit_col, sear_tbl, sear_col); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show("변경되었습니다!"); + UTIL.MsgI("변경되었습니다!"); manage.btn_Search_Click(null, null); this.Close(); } diff --git a/unimarc/unimarc/마크/CD_LP.cs b/unimarc/unimarc/마크/CD_LP.cs index ba1662d..f5a2f8a 100644 --- a/unimarc/unimarc/마크/CD_LP.cs +++ b/unimarc/unimarc/마크/CD_LP.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -155,7 +156,7 @@ namespace UniMarc string orimarc = st.made_Ori_marc(marc, false); if (!isSaveOK(orimarc, code)) { - MessageBox.Show("상품코드를 확인해주세요."); + UTIL.MsgE("상품코드를 확인해주세요."); return; } @@ -315,19 +316,19 @@ namespace UniMarc // 상품코드 체크 if (!isSaveOK(orimarc, code)) { - MessageBox.Show("상품코드를 확인해주세요."); + UTIL.MsgE("상품코드를 확인해주세요."); return; } // 필수태그 확인 if (!isMustTag(orimarc)) { - MessageBox.Show("입력된 마크의 상태를 확인해주세요."); + UTIL.MsgE("입력된 마크의 상태를 확인해주세요."); return; } // 마크 형식 체크 if (!isPass(marc)) { - MessageBox.Show("입력된 마크의 상태를 확인해주세요."); + UTIL.MsgE("입력된 마크의 상태를 확인해주세요."); return; } @@ -410,7 +411,7 @@ namespace UniMarc if (!isTag) { - MessageBox.Show(msg + "태그가 없습니다."); + UTIL.MsgE(msg + "태그가 없습니다."); return false; } @@ -426,7 +427,7 @@ namespace UniMarc if (!is1XX) { - MessageBox.Show("기본표목이 존재하지않습니다."); + UTIL.MsgE("기본표목이 존재하지않습니다."); return false; } @@ -444,7 +445,7 @@ namespace UniMarc if (!is7XX) { - MessageBox.Show("부출표목이 존재하지않습니다."); + UTIL.MsgE("부출표목이 존재하지않습니다."); return false; } diff --git a/unimarc/unimarc/마크/CD_LP_AddList.cs b/unimarc/unimarc/마크/CD_LP_AddList.cs index 27c8995..f66d81c 100644 --- a/unimarc/unimarc/마크/CD_LP_AddList.cs +++ b/unimarc/unimarc/마크/CD_LP_AddList.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -52,7 +53,7 @@ namespace UniMarc string user = PUB.user.UserName; if (listName == "") { - MessageBox.Show("목록명이 비어있습니다!"); + UTIL.MsgE("목록명이 비어있습니다!"); return; } @@ -87,7 +88,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(listCMD); Helper_DB.ExcuteNonQuery(ProductCMD); - MessageBox.Show("저장되었습니다."); + UTIL.MsgI("저장되었습니다."); } private void btn_Close_Click(object sender, EventArgs e) diff --git a/unimarc/unimarc/마크/CD_LP_List.cs b/unimarc/unimarc/마크/CD_LP_List.cs index 4bd0dda..29592ac 100644 --- a/unimarc/unimarc/마크/CD_LP_List.cs +++ b/unimarc/unimarc/마크/CD_LP_List.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -86,7 +87,7 @@ namespace UniMarc if (dataGridView1.Rows[row].Cells["Marc"].Value.ToString() == "" && dataGridView1.Rows[row].Cells["Marc"].Value == null) { - MessageBox.Show("저장된 마크가 없습니다!"); + UTIL.MsgE("저장된 마크가 없습니다!"); return; } @@ -342,7 +343,7 @@ namespace UniMarc private void Btn_SelectRemove_Click(object sender, EventArgs e) { - if (MessageBox.Show("정말 삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.No) + if (UTIL.MsgQ("정말 삭제하시겠습니까?") != DialogResult.Yes) return; List SelectIndex = new List(); @@ -356,7 +357,7 @@ namespace UniMarc } if (SelectIndex.Count <= 0) { - MessageBox.Show("선택 사항이 없습니다."); + UTIL.MsgE("선택 사항이 없습니다."); return; } @@ -367,7 +368,7 @@ namespace UniMarc db.DB_Delete("DVD_List_Product", "idx", dataGridView1.Rows[SelectIndex[a]].Cells["idx"].Value.ToString(), "compidx", compidx) ); } - MessageBox.Show("삭제되었습니다"); + UTIL.MsgI("삭제되었습니다"); } } diff --git a/unimarc/unimarc/마크/CD_LP_SelectList.cs b/unimarc/unimarc/마크/CD_LP_SelectList.cs index 134265d..743d9e4 100644 --- a/unimarc/unimarc/마크/CD_LP_SelectList.cs +++ b/unimarc/unimarc/마크/CD_LP_SelectList.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -100,7 +101,7 @@ namespace UniMarc private void Btn_Delete_Click(object sender, EventArgs e) { 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 compidx = Properties.Settings.Default.compidx; @@ -108,7 +109,7 @@ namespace UniMarc string cmd = db.DB_Delete("DVD_List", "compidx", PUB.user.CompanyIdx, "idx", idx); Helper_DB.ExcuteNonQuery(cmd); - MessageBox.Show("삭제되었습니다."); + UTIL.MsgI("삭제되었습니다."); } } diff --git a/unimarc/unimarc/마크/Check_Copy_Login.cs b/unimarc/unimarc/마크/Check_Copy_Login.cs index 3cbf040..4b6e845 100644 --- a/unimarc/unimarc/마크/Check_Copy_Login.cs +++ b/unimarc/unimarc/마크/Check_Copy_Login.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -31,7 +32,7 @@ namespace UniMarc if (id == "" || pw == "") { - MessageBox.Show("입력된 값이 없습니다."); + UTIL.MsgE("입력된 값이 없습니다."); return; } diff --git a/unimarc/unimarc/마크/Check_ISBN.cs b/unimarc/unimarc/마크/Check_ISBN.cs index d5dcf16..140632f 100644 --- a/unimarc/unimarc/마크/Check_ISBN.cs +++ b/unimarc/unimarc/마크/Check_ISBN.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.CodeDom; using System.Collections.Generic; using System.ComponentModel; @@ -171,8 +172,8 @@ namespace UniMarc private void btn_lookup_Click(object sender, EventArgs e) { - if (cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } - if (cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } + if (cb_api.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; } + if (cb_filter.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; } clear_api(); @@ -199,7 +200,7 @@ namespace UniMarc } // 총 검색 횟수, 일치, 중복 - MessageBox.Show("검색이 완료되었습니다!"); + UTIL.MsgI("검색이 완료되었습니다!"); progressBar1.Value = dataGridView1.Rows.Count; dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells["num"]; @@ -503,7 +504,7 @@ namespace UniMarc newstring = String.Format("{0:yyyy/MM/dd}", 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++) { @@ -735,7 +736,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(CMcmd); } } - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); save = true; } private void btn_Close_Click(object sender, EventArgs e) @@ -836,7 +837,7 @@ namespace UniMarc private void Check_ISBN_FormClosing(object sender, FormClosingEventArgs e) { if (!save) { - if (MessageBox.Show("데이터가 저장되지않았습니다!\n종료하시겠습니까?", "Warning!", MessageBoxButtons.YesNo) == DialogResult.No) { + if (UTIL.MsgQ("데이터가 저장되지않았습니다!\n종료하시겠습니까?") == DialogResult.No) { e.Cancel = true; } } diff --git a/unimarc/unimarc/마크/Check_ISBN2.cs b/unimarc/unimarc/마크/Check_ISBN2.cs index ca5d823..13c0fcd 100644 --- a/unimarc/unimarc/마크/Check_ISBN2.cs +++ b/unimarc/unimarc/마크/Check_ISBN2.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.CodeDom; using System.Collections.Generic; using System.ComponentModel; @@ -194,8 +195,8 @@ namespace UniMarc private void btn_lookup_Click(object sender, EventArgs e) { - if (cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } - if (cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } + if (cb_api.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; } + if (cb_filter.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; } clear_api(); @@ -222,7 +223,7 @@ namespace UniMarc } // 총 검색 횟수, 일치, 중복 - MessageBox.Show("검색이 완료되었습니다!"); + UTIL.MsgI("검색이 완료되었습니다!"); progressBar1.Value = bookList.Count; bs1.Position = 0; @@ -530,7 +531,7 @@ namespace UniMarc newstring = String.Format("{0:yyyy/MM/dd}", 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++) { @@ -768,7 +769,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(CMcmd); } } - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); save = true; } private void btn_Close_Click(object sender, EventArgs e) @@ -876,7 +877,7 @@ namespace UniMarc private void Check_ISBN_FormClosing(object sender, FormClosingEventArgs e) { if (!save) { - if (MessageBox.Show("데이터가 저장되지않았습니다!\n종료하시겠습니까?", "Warning!", MessageBoxButtons.YesNo) == DialogResult.No) { + if (UTIL.MsgQ("데이터가 저장되지않았습니다!\n종료하시겠습니까?") == DialogResult.No) { e.Cancel = true; } } diff --git a/unimarc/unimarc/마크/Check_ISBN_ItemEdit.cs b/unimarc/unimarc/마크/Check_ISBN_ItemEdit.cs index dded7dd..e6244dc 100644 --- a/unimarc/unimarc/마크/Check_ISBN_ItemEdit.cs +++ b/unimarc/unimarc/마크/Check_ISBN_ItemEdit.cs @@ -1,3 +1,4 @@ +using AR; using System; using System.Collections.Generic; using System.ComponentModel; @@ -24,7 +25,7 @@ namespace UniMarc { if (_item == null) { - MessageBox.Show("데이터가 없습니다."); + UTIL.MsgE("데이터가 없습니다."); this.Close(); return; } diff --git a/unimarc/unimarc/마크/Check_ISBN_Yes24.cs b/unimarc/unimarc/마크/Check_ISBN_Yes24.cs index f7cdf4b..6087ce5 100644 --- a/unimarc/unimarc/마크/Check_ISBN_Yes24.cs +++ b/unimarc/unimarc/마크/Check_ISBN_Yes24.cs @@ -11,6 +11,7 @@ using Excel = Microsoft.Office.Interop.Excel; using System.Reflection; using System.Text.RegularExpressions; using System.IO; +using AR; namespace UniMarc { @@ -170,7 +171,7 @@ namespace UniMarc application.Interactive = true; } - catch (Exception e) { MessageBox.Show(e.Message); } + catch (Exception e) { UTIL.MsgE(e.Message); } } #endregion @@ -260,7 +261,7 @@ namespace UniMarc 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."); } } } diff --git a/unimarc/unimarc/마크/Check_ISBN_Yes242.cs b/unimarc/unimarc/마크/Check_ISBN_Yes242.cs index c38edfc..875d5df 100644 --- a/unimarc/unimarc/마크/Check_ISBN_Yes242.cs +++ b/unimarc/unimarc/마크/Check_ISBN_Yes242.cs @@ -11,6 +11,7 @@ using Excel = Microsoft.Office.Interop.Excel; using System.Reflection; using System.Text.RegularExpressions; using System.IO; +using AR; namespace UniMarc { @@ -170,7 +171,7 @@ namespace UniMarc application.Interactive = true; } - catch (Exception e) { MessageBox.Show(e.Message); } + catch (Exception e) { UTIL.MsgE(e.Message); } } #endregion @@ -260,7 +261,7 @@ namespace UniMarc 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."); } } } diff --git a/unimarc/unimarc/마크/Check_copy.cs b/unimarc/unimarc/마크/Check_copy.cs index cc81ed2..73c4a7c 100644 --- a/unimarc/unimarc/마크/Check_copy.cs +++ b/unimarc/unimarc/마크/Check_copy.cs @@ -139,7 +139,7 @@ namespace UniMarc if (BookSearchCount == "false") { - MessageBox.Show("검색대상이 설정되지않았습니다!"); + UTIL.MsgE("검색대상이 설정되지않았습니다!"); return; } @@ -190,7 +190,7 @@ namespace UniMarc if (RowCount == SearchCount.Value) { webBrowser1.DocumentCompleted -= this.webBrowser1_DocumentCompleted; - MessageBox.Show("조사가 완료되었습니다!"); + UTIL.MsgI("조사가 완료되었습니다!"); RowCount = 0; return; } @@ -1575,7 +1575,7 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show(ex.ToString()); + UTIL.MsgE(ex.ToString()); } } } diff --git a/unimarc/unimarc/마크/Check_copyWD.cs b/unimarc/unimarc/마크/Check_copyWD.cs index 35320b0..e2ed6ea 100644 --- a/unimarc/unimarc/마크/Check_copyWD.cs +++ b/unimarc/unimarc/마크/Check_copyWD.cs @@ -468,8 +468,7 @@ namespace UniMarc // Chrome 설치 확인 if (!SeleniumHelper.IsBrowserInstalled()) { - MessageBox.Show("Google Chrome / Microsoft Edge 이(가) 설치되어 있지 않습니다. 브라우저를 설치한 후 프로그램을 다시 실행해주세요.", - "Chrome 필요", MessageBoxButtons.OK, MessageBoxIcon.Warning); + UTIL.MsgE("Google Chrome / Microsoft Edge 이(가) 설치되어 있지 않습니다. 브라우저를 설치한 후 프로그램을 다시 실행해주세요."); lblStatus.Text = "WebDriver: 브라우저가 설치되지 않음"; lblStatus.ForeColor = Color.Red; return; @@ -507,8 +506,7 @@ namespace UniMarc { lblStatus.Text = "WebDriver:드라이버 테스트 실패"; lblStatus.ForeColor = Color.Red; - MessageBox.Show("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요.", - "드라이버 오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + UTIL.MsgE("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요."); } } catch (OperationCanceledException) @@ -521,8 +519,7 @@ namespace UniMarc { lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; lblStatus.ForeColor = Color.Red; - MessageBox.Show($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}", - "설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + UTIL.MsgE($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}"); return; } } @@ -534,8 +531,7 @@ namespace UniMarc { lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; lblStatus.ForeColor = Color.Red; - MessageBox.Show($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}", - "설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + UTIL.MsgE($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}"); } } #endregion @@ -862,7 +858,7 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show(ex.ToString()); + UTIL.MsgE(ex.ToString()); } } } diff --git a/unimarc/unimarc/마크/DLS_Copy.cs b/unimarc/unimarc/마크/DLS_Copy.cs index 113037d..47b8f2b 100644 --- a/unimarc/unimarc/마크/DLS_Copy.cs +++ b/unimarc/unimarc/마크/DLS_Copy.cs @@ -1,4 +1,5 @@ -using BokBonCheck; +using AR; +using BokBonCheck; using System; using System.Collections.Generic; using System.ComponentModel; @@ -67,8 +68,7 @@ namespace UniMarc // Chrome 설치 확인 if (!SeleniumHelper.IsBrowserInstalled()) { - MessageBox.Show("Google Chrome / Microsoft Edge 이(가) 설치되어 있지 않습니다. 브라우저를 설치한 후 프로그램을 다시 실행해주세요.", - "Chrome 필요", MessageBoxButtons.OK, MessageBoxIcon.Warning); + UTIL.MsgE("Google Chrome / Microsoft Edge 이(가) 설치되어 있지 않습니다. 브라우저를 설치한 후 프로그램을 다시 실행해주세요."); lblStatus.Text = "WebDriver: 브라우저가 설치되지 않음"; lblStatus.ForeColor = Color.Red; return; @@ -103,8 +103,7 @@ namespace UniMarc { lblStatus.Text = "WebDriver:드라이버 테스트 실패"; lblStatus.ForeColor = Color.Red; - MessageBox.Show("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요.", - "드라이버 오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + UTIL.MsgE("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요."); } } catch (OperationCanceledException) @@ -117,8 +116,7 @@ namespace UniMarc { lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; lblStatus.ForeColor = Color.Red; - MessageBox.Show($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}", - "설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + UTIL.MsgE($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}"); return; } } @@ -130,8 +128,7 @@ namespace UniMarc { lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; lblStatus.ForeColor = Color.Red; - MessageBox.Show($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}", - "설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + UTIL.MsgE($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}"); } } #endregion @@ -169,12 +166,12 @@ namespace UniMarc { if (lbl_Client.Text == "Client") { - MessageBox.Show("납품처명을 선택해주세요"); + UTIL.MsgE("납품처명을 선택해주세요"); return; } if (lbl_Area.Text == "") { - MessageBox.Show("설정된 지역이 없습니다. 납품처 관리에서 확인해주세요."); + UTIL.MsgE("설정된 지역이 없습니다. 납품처 관리에서 확인해주세요."); return; } @@ -196,12 +193,12 @@ namespace UniMarc { if (dv1.Rows[0].Cells["ISBN"].Value == null && rBtn_ISBN.Checked) { - MessageBox.Show("ISBN이 입력되지않았습니다!"); + UTIL.MsgE("ISBN이 입력되지않았습니다!"); return; } if (dv1.Rows[0].Cells["Book_name"].Value == null && rBtn_BookName.Checked) { - MessageBox.Show("도서명이 입력되지않았습니다!"); + UTIL.MsgE("도서명이 입력되지않았습니다!"); return; } if (_searcher == null) @@ -240,7 +237,7 @@ namespace UniMarc } - MessageBox.Show("완료되었습니다."); + UTIL.MsgI("완료되었습니다."); } diff --git a/unimarc/unimarc/마크/DLS_Lookup.cs b/unimarc/unimarc/마크/DLS_Lookup.cs index 3a0e786..ecd62a0 100644 --- a/unimarc/unimarc/마크/DLS_Lookup.cs +++ b/unimarc/unimarc/마크/DLS_Lookup.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -83,12 +84,12 @@ namespace UniMarc { if (lbl_Client.Text == "Client") { - MessageBox.Show("납품처명을 선택해주세요"); + UTIL.MsgE("납품처명을 선택해주세요"); return; } if (lbl_Area.Text == "") { - MessageBox.Show("설정된 지역이 없습니다. 납품처 관리에서 확인해주세요."); + UTIL.MsgE("설정된 지역이 없습니다. 납품처 관리에서 확인해주세요."); return; } @@ -106,7 +107,7 @@ namespace UniMarc { if (lbl_ID.Text == "" || lbl_PW.Text == "") { - MessageBox.Show("ID 혹은 PW가 없습니다."); + UTIL.MsgE("ID 혹은 PW가 없습니다."); return; } string ID = lbl_ID.Text, PW = lbl_PW.Text; diff --git a/unimarc/unimarc/마크/Help008Tag.cs b/unimarc/unimarc/마크/Help008Tag.cs index 82d0699..28efc2f 100644 --- a/unimarc/unimarc/마크/Help008Tag.cs +++ b/unimarc/unimarc/마크/Help008Tag.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -179,7 +180,7 @@ namespace UniMarc int result = combo1_res.ToList().FindIndex(x => x == value); 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; } return result; @@ -201,7 +202,7 @@ namespace UniMarc int result = combo2_res.ToList().FindIndex(x=>x==value); 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; } return result; @@ -227,7 +228,7 @@ namespace UniMarc int result = combo3_res.ToList().FindIndex(x => x == value); 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; } return result; @@ -252,7 +253,7 @@ namespace UniMarc int result = combo4_res.ToList().FindIndex(x => x == value); 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; } return result; @@ -274,7 +275,7 @@ namespace UniMarc int result = combo5_res.ToList().FindIndex(x => x == value); 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; } return result; @@ -303,7 +304,7 @@ namespace UniMarc int result = combo6_res.ToList().FindIndex(x => x == value); 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; } return result; diff --git a/unimarc/unimarc/마크/Mac_Input.cs b/unimarc/unimarc/마크/Mac_Input.cs index 0735085..31fee07 100644 --- a/unimarc/unimarc/마크/Mac_Input.cs +++ b/unimarc/unimarc/마크/Mac_Input.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -50,7 +51,7 @@ namespace UniMarc catch(Exception ex) { //  - MessageBox.Show(ex.ToString()); + UTIL.MsgE(ex.ToString()); } } tb_filePath.Text = file_path; @@ -167,9 +168,9 @@ namespace UniMarc string Incmd = db.DB_INSERT(table, col, data); 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) diff --git a/unimarc/unimarc/마크/Mac_List.cs b/unimarc/unimarc/마크/Mac_List.cs index e2f7f56..95f7081 100644 --- a/unimarc/unimarc/마크/Mac_List.cs +++ b/unimarc/unimarc/마크/Mac_List.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -115,7 +116,7 @@ namespace UniMarc private void btn_Save_Click(object sender, EventArgs e) { - if (MessageBox.Show("선택사항을 저장하시겠습니까?", "저장", MessageBoxButtons.YesNo) == DialogResult.No) + if (UTIL.MsgQ("선택사항을 저장하시겠습니까?") == DialogResult.No) return; string table = "Obj_List"; @@ -138,7 +139,7 @@ namespace UniMarc } } bs1.ResetBindings(false); - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); } 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 == "진행"); if (hasProgress) { - MessageBox.Show("체크된 목록이 현재 진행중입니다."); + UTIL.MsgE("체크된 목록이 현재 진행중입니다."); return; } @@ -193,7 +194,7 @@ namespace UniMarc state_Save_Object(item); } - MessageBox.Show("진행처리되었습니다.", "목록진행"); + UTIL.MsgI("진행처리되었습니다."); btn_Lookup_Click(null, null); } @@ -203,7 +204,7 @@ namespace UniMarc bool hasCompletion = items.Any(i => i.check == "V" && i.state == "완료"); if (hasCompletion) { - MessageBox.Show("체크된 목록은 현재 완료되어있습니다."); + UTIL.MsgE("체크된 목록은 현재 완료되어있습니다."); return; } @@ -213,7 +214,7 @@ namespace UniMarc state_Save_Object(item); } - MessageBox.Show("완료처리되었습니다.", "목록완료"); + UTIL.MsgI("완료처리되었습니다."); btn_Lookup_Click(null, null); } @@ -237,7 +238,7 @@ namespace UniMarc private void btn_Delete_Click(object sender, EventArgs e) { - if (MessageBox.Show("정말로 삭제하시겠습니까?", "삭제경고", MessageBoxButtons.YesNo) == DialogResult.No) { return; } + if (UTIL.MsgQ("정말로 삭제하시겠습니까?") == DialogResult.No) { return; } List items = bs1.List.Cast().ToList(); foreach (var item in items.Where(i => i.check == "V")) @@ -252,7 +253,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(D_cmd); } - MessageBox.Show("삭제되었습니다."); + UTIL.MsgI("삭제되었습니다."); btn_Lookup_Click(null, null); } @@ -336,7 +337,7 @@ namespace UniMarc var item = bs1.Current as MacListItem; if (item == null) { - MessageBox.Show("대상을 먼저 선택하세요."); + UTIL.MsgE("대상을 먼저 선택하세요."); return; } diff --git a/unimarc/unimarc/마크/Mac_List_Add.cs b/unimarc/unimarc/마크/Mac_List_Add.cs index a431d60..f110045 100644 --- a/unimarc/unimarc/마크/Mac_List_Add.cs +++ b/unimarc/unimarc/마크/Mac_List_Add.cs @@ -90,12 +90,12 @@ namespace UniMarc if (!CopyCheck(compidx, listName, Today)) { - MessageBox.Show("목록이 중복되었습니다! 다시 확인해주세요.", "Error"); + UTIL.MsgE("목록이 중복되었습니다! 다시 확인해주세요."); return; } if (listName.isEmpty()) { - MessageBox.Show("목록명이 비어있습니다! 다시 확인해주세요.", "Error"); + UTIL.MsgE("목록명이 비어있습니다! 다시 확인해주세요."); return; } @@ -151,7 +151,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(InBook_Cmd); - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); ml.btn_Lookup_Click(null, null); } @@ -235,15 +235,13 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show("오류가 발생했습니다.\n" + ex.Message, "Error"); + UTIL.MsgE("오류가 발생했습니다.\n" + ex.Message); } } private void btn_DelRow_Click(object sender, EventArgs e) { - DialogResult result = MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo); - - if (result == DialogResult.No) return; + if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.No) return; int row = dataGridView1.CurrentCell.RowIndex; diff --git a/unimarc/unimarc/마크/Mac_List_Add2.cs b/unimarc/unimarc/마크/Mac_List_Add2.cs index 0a48c7e..91cf23b 100644 --- a/unimarc/unimarc/마크/Mac_List_Add2.cs +++ b/unimarc/unimarc/마크/Mac_List_Add2.cs @@ -95,12 +95,12 @@ namespace UniMarc if (!CopyCheck(compidx, listName, Today)) { - MessageBox.Show("목록이 중복되었습니다! 다시 확인해주세요.", "Error"); + UTIL.MsgE("목록이 중복되었습니다! 다시 확인해주세요."); return; } if (listName.isEmpty()) { - MessageBox.Show("목록명이 비어있습니다! 다시 확인해주세요.", "Error"); + UTIL.MsgE("목록명이 비어있습니다! 다시 확인해주세요."); return; } @@ -147,7 +147,7 @@ namespace UniMarc if (InBook_List.Count == 0) { - MessageBox.Show("저장할 데이터가 없습니다."); + UTIL.MsgE("저장할 데이터가 없습니다."); return; } @@ -157,7 +157,7 @@ namespace UniMarc long listIdxLong = db.DB_Send_CMD_Insert_GetIdx(InList_Cmd); if (listIdxLong == -1) { - MessageBox.Show($"목록 저장에 실패했습니다."); + UTIL.MsgE("목록 저장에 실패했습니다."); return; } string listIdx = listIdxLong.ToString(); @@ -167,7 +167,7 @@ namespace UniMarc var rlt = Helper_DB.ExcuteNonQuery(InBook_Cmd); if (rlt.applyCount == 0) { - MessageBox.Show($"내역 저장에 실패했습니다.\n{rlt.errorMessage}"); + UTIL.MsgE($"내역 저장에 실패했습니다.\n{rlt.errorMessage}"); return; } @@ -245,7 +245,7 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show("오류가 발생했습니다.\n" + ex.Message, "Error"); + UTIL.MsgE("오류가 발생했습니다.\n" + ex.Message); } } @@ -253,7 +253,7 @@ namespace UniMarc { if (bs1.Current == null) return; - DialogResult result = MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo); + DialogResult result = UTIL.MsgQ("삭제하시겠습니까?"); if (result == DialogResult.No) return; bs1.RemoveCurrent(); diff --git a/unimarc/unimarc/마크/Mac_List_Edit.cs b/unimarc/unimarc/마크/Mac_List_Edit.cs index 9c83557..21f5023 100644 --- a/unimarc/unimarc/마크/Mac_List_Edit.cs +++ b/unimarc/unimarc/마크/Mac_List_Edit.cs @@ -111,7 +111,7 @@ namespace UniMarc { if (string.IsNullOrEmpty(tb_ListName.Text)) { - MessageBox.Show("목록명을 입력하세요."); + UTIL.MsgI("목록명을 입력하세요."); return; } diff --git a/unimarc/unimarc/마크/Mac_List_Merge.cs b/unimarc/unimarc/마크/Mac_List_Merge.cs index de73513..1c8bcd5 100644 --- a/unimarc/unimarc/마크/Mac_List_Merge.cs +++ b/unimarc/unimarc/마크/Mac_List_Merge.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -65,15 +66,15 @@ namespace UniMarc private void btn_Merge_Click(object sender, EventArgs e) { if (!rb_Delete.Checked && !rb_Keep.Checked) { - MessageBox.Show("기존목록의 유지여부를 선택해주세요."); + UTIL.MsgE("기존목록의 유지여부를 선택해주세요."); return; } if (tb_list_name.Text == "변경할 작업처의 이름") { - MessageBox.Show("작업처의 이름을 입력해주세요."); + UTIL.MsgE("작업처의 이름을 입력해주세요."); return; } if (!chk_Overlap()) { - MessageBox.Show("작업처의 이름이 중복됩니다. 다시 설정해주세요."); + UTIL.MsgE("작업처의 이름이 중복됩니다. 다시 설정해주세요."); return; } @@ -89,7 +90,7 @@ namespace UniMarc data_delete(); } - MessageBox.Show("목록이 병합되었습니다."); + UTIL.MsgI("목록이 병합되었습니다."); ml.btn_Lookup_Click(null, null); this.Close(); } diff --git a/unimarc/unimarc/마크/Marc.cs b/unimarc/unimarc/마크/Marc.cs index 2fe6a2b..0c92204 100644 --- a/unimarc/unimarc/마크/Marc.cs +++ b/unimarc/unimarc/마크/Marc.cs @@ -423,14 +423,14 @@ namespace UniMarc { if (SaveRowIdx < 0) { - MessageBox.Show("마크가 선택되지않았습니다."); + UTIL.MsgE("마크가 선택되지않았습니다."); return; } int TabIndex = tabControl1.SelectedIndex; int grade = cb_grade.SelectedIndex; if (TabIndex == 1) { - MessageBox.Show("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!"); + UTIL.MsgE("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!"); return; } //if (grade == 3) @@ -447,7 +447,7 @@ namespace UniMarc if (!isPass(BaseText)) { - MessageBox.Show("입력된 마크의 상태를 확인해주세요."); + UTIL.MsgE("입력된 마크의 상태를 확인해주세요."); return; } @@ -530,7 +530,7 @@ namespace UniMarc string[] Sear_col = { Midx, PUB.user.CompanyIdx }; if (grid_data[0] == null || grid_data[0] == "") { - MessageBox.Show("ISBN 데이터가 없습니다."); + UTIL.MsgE("ISBN 데이터가 없습니다."); return; } @@ -554,7 +554,7 @@ namespace UniMarc 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)); Helper_DB.ExcuteNonQuery(UpdateListIndex); - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); } #region Save_Click_Sub @@ -642,7 +642,7 @@ namespace UniMarc if (!isTag) { - MessageBox.Show(msg + "태그가 없습니다."); + UTIL.MsgE(msg + "태그가 없습니다."); return false; } @@ -658,7 +658,7 @@ namespace UniMarc if (!is1XX) { - MessageBox.Show("기본표목이 존재하지않습니다."); + UTIL.MsgE("기본표목이 존재하지않습니다."); return false; } @@ -676,7 +676,7 @@ namespace UniMarc if (!is7XX) { - MessageBox.Show("부출표목이 존재하지않습니다."); + UTIL.MsgE("부출표목이 존재하지않습니다."); return false; } @@ -1134,7 +1134,7 @@ namespace UniMarc if (pubDate.Length < 3) { - MessageBox.Show("260c가 인식되지않습니다."); + UTIL.MsgE("260c가 인식되지않습니다."); return "false"; } else if (pubDate.Length < 5) @@ -1163,7 +1163,7 @@ namespace UniMarc if (res == "") { - MessageBox.Show("260a가 인식되지않습니다."); + UTIL.MsgE("260a가 인식되지않습니다."); return "false"; } else if (res.Length < 3) @@ -1560,7 +1560,7 @@ namespace UniMarc if (ISBN == "" || ISBN == null) { - MessageBox.Show("ISBN이 존재하지않습니다!"); + UTIL.MsgE("ISBN이 존재하지않습니다!"); return; } @@ -3500,7 +3500,7 @@ namespace UniMarc } catch { - MessageBox.Show("데이터가 올바르지않습니다.\n245d를 확인해주세요."); + UTIL.MsgE("데이터가 올바르지않습니다.\n245d를 확인해주세요."); } } #region 기본표목 생성 서브 함수 diff --git a/unimarc/unimarc/마크/Marc2.cs b/unimarc/unimarc/마크/Marc2.cs index 7da3f9e..87fdbdd 100644 --- a/unimarc/unimarc/마크/Marc2.cs +++ b/unimarc/unimarc/마크/Marc2.cs @@ -558,7 +558,7 @@ namespace UniMarc } - + #region Save_Click_Sub @@ -921,15 +921,15 @@ namespace UniMarc private void button2_Click(object sender, EventArgs e) { var fullmarc = marcEditorControl1.MakeMarcString(); - var fb = new Marc_CopyForm(fullmarc); - fb.ShowDialog(); + using (var fb = new Marc_CopyForm(fullmarc)) + fb.ShowDialog(); } private void btn_Save_Click(object sender, EventArgs e) { if (Param.NewMake == false && string.IsNullOrEmpty(Param.ISBN13)) { - MessageBox.Show("마크가 선택되지않았습니다."); + UTIL.MsgE("마크가 선택되지않았습니다."); return; } @@ -941,15 +941,15 @@ namespace UniMarc var v_isbn = marcEditorControl1.lbl_ISBN.Text.Trim(); - // ISBN 중복체크 - var exist = DB_Utils.ExistISBN(v_isbn); - if (exist) - { - if (UTIL.MsgQ($"입력하신 ISBN({v_isbn})은 이미 등록된 데이터가 존재합니다.\n그래도 저장하시겠습니까?") != DialogResult.Yes) - { - return; - } - } + //// ISBN 중복체크 + //var exist = DB_Utils.ExistISBN(v_isbn); + //if (exist) + //{ + // if (UTIL.MsgQ($"입력하신 ISBN({v_isbn})은 이미 등록된 데이터가 존재합니다.\n그래도 저장하시겠습니까?") != DialogResult.Yes) + // { + // return; + // } + //} this.Param.text008 = marcEditorControl1.text008.Text.Trim(); this.Param.tag056 = marcEditorControl1.Tag056(out string with008fullmarcstring); @@ -996,7 +996,7 @@ namespace UniMarc string[] Sear_tbl = { "idx", "compidx" }; string[] Sear_col = { item.MarcIdx, mCompidx }; - if (string.IsNullOrEmpty(this.Param.ISBN13)) { MessageBox.Show("ISBN 데이터가 없습니다."); return; } + if (string.IsNullOrEmpty(this.Param.ISBN13)) { UTIL.MsgE("ISBN 데이터가 없습니다."); return; } string U_cmd = db.More_Update(table_name, Edit_tbl, Edit_col, Sear_tbl, Sear_col); PUB.log.Add("Update", string.Format("{0}({1},{2}) : {3}", mUserName, mCompidx, item.Status, U_cmd.Replace("\r", " ").Replace("\n", " "))); @@ -1014,7 +1014,7 @@ namespace UniMarc // 4. BindingSource 갱신으로 UI 자동 업데이트 bs1.ResetCurrentItem(); - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); } private void btn_FillBlank_Click(object sender, EventArgs e) @@ -1025,7 +1025,7 @@ namespace UniMarc if (string.IsNullOrEmpty(ISBN)) { - MessageBox.Show("ISBN이 존재하지않습니다!"); + UTIL.MsgE("ISBN이 존재하지않습니다!"); return; } diff --git a/unimarc/unimarc/마크/Marc2.designer.cs b/unimarc/unimarc/마크/Marc2.designer.cs index 807c97b..6dc9892 100644 --- a/unimarc/unimarc/마크/Marc2.designer.cs +++ b/unimarc/unimarc/마크/Marc2.designer.cs @@ -735,7 +735,7 @@ 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(1372, 0); + this.panel5.Location = new System.Drawing.Point(1585, 0); this.panel5.Name = "panel5"; this.panel5.Size = new System.Drawing.Size(266, 658); this.panel5.TabIndex = 326; @@ -871,7 +871,7 @@ // this.radD.AutoSize = true; this.radD.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - this.radD.Location = new System.Drawing.Point(194, 41); + this.radD.Location = new System.Drawing.Point(196, 46); this.radD.Name = "radD"; this.radD.Size = new System.Drawing.Size(42, 27); this.radD.TabIndex = 323; @@ -883,7 +883,7 @@ // this.radC.AutoSize = true; this.radC.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - this.radC.Location = new System.Drawing.Point(147, 41); + this.radC.Location = new System.Drawing.Point(149, 46); this.radC.Name = "radC"; this.radC.Size = new System.Drawing.Size(41, 27); this.radC.TabIndex = 322; @@ -895,7 +895,7 @@ // this.radB.AutoSize = true; this.radB.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - this.radB.Location = new System.Drawing.Point(100, 41); + this.radB.Location = new System.Drawing.Point(102, 46); this.radB.Name = "radB"; this.radB.Size = new System.Drawing.Size(41, 27); this.radB.TabIndex = 321; @@ -907,7 +907,7 @@ // this.radA.AutoSize = true; this.radA.Font = new System.Drawing.Font("Tahoma", 14F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - this.radA.Location = new System.Drawing.Point(53, 41); + this.radA.Location = new System.Drawing.Point(55, 46); this.radA.Name = "radA"; this.radA.Size = new System.Drawing.Size(41, 27); this.radA.TabIndex = 320; @@ -920,10 +920,10 @@ this.lbl_SaveData.BackColor = System.Drawing.Color.SkyBlue; this.lbl_SaveData.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); this.lbl_SaveData.ForeColor = System.Drawing.Color.Black; - this.lbl_SaveData.Location = new System.Drawing.Point(11, 73); + this.lbl_SaveData.Location = new System.Drawing.Point(13, 78); this.lbl_SaveData.Multiline = true; this.lbl_SaveData.Name = "lbl_SaveData"; - this.lbl_SaveData.Size = new System.Drawing.Size(241, 136); + this.lbl_SaveData.Size = new System.Drawing.Size(241, 131); this.lbl_SaveData.TabIndex = 319; this.lbl_SaveData.Text = "[] []"; // @@ -941,7 +941,7 @@ // this.label6.AutoSize = true; this.label6.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - this.label6.Location = new System.Drawing.Point(12, 51); + this.label6.Location = new System.Drawing.Point(14, 56); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(31, 12); this.label6.TabIndex = 223; @@ -954,7 +954,7 @@ 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(555, 0); this.marcEditorControl1.Name = "marcEditorControl1"; - this.marcEditorControl1.Size = new System.Drawing.Size(817, 658); + this.marcEditorControl1.Size = new System.Drawing.Size(1030, 658); this.marcEditorControl1.TabIndex = 0; // // Marc2 @@ -962,7 +962,7 @@ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.SkyBlue; - this.ClientSize = new System.Drawing.Size(1638, 658); + this.ClientSize = new System.Drawing.Size(1851, 658); this.Controls.Add(this.marcEditorControl1); this.Controls.Add(this.panel5); this.Controls.Add(this.panel3); diff --git a/unimarc/unimarc/마크/MarcCopySelect.cs b/unimarc/unimarc/마크/MarcCopySelect.cs index d6c7ed0..6f4a6ac 100644 --- a/unimarc/unimarc/마크/MarcCopySelect.cs +++ b/unimarc/unimarc/마크/MarcCopySelect.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -450,11 +451,11 @@ namespace UniMarc if (SelectAry[0] != compidx) { - MessageBox.Show("해당 마크를 삭제할 권한이 없습니다.", "삭제"); + UTIL.MsgE("해당 마크를 삭제할 권한이 없습니다."); return; } - if (MessageBox.Show("삭제하시겠습니까?", "삭제!", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.Cancel) return; string[] InsertCol = { diff --git a/unimarc/unimarc/마크/MarcCopySelect2.cs b/unimarc/unimarc/마크/MarcCopySelect2.cs index dcad011..0d84f7b 100644 --- a/unimarc/unimarc/마크/MarcCopySelect2.cs +++ b/unimarc/unimarc/마크/MarcCopySelect2.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -310,11 +311,11 @@ namespace UniMarc if (compidx != PUB.user.CompanyIdx) { - MessageBox.Show("해당 마크를 삭제할 권한이 없습니다.", "삭제"); + UTIL.MsgE("해당 마크를 삭제할 권한이 없습니다."); return; } - if (MessageBox.Show("삭제하시겠습니까?", "삭제!", MessageBoxButtons.OKCancel) == DialogResult.Cancel) + if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.Cancel) return; string User = PUB.user.UserName; diff --git a/unimarc/unimarc/마크/MarcEditorControl.cs b/unimarc/unimarc/마크/MarcEditorControl.cs index 0e790d4..4967e80 100644 --- a/unimarc/unimarc/마크/MarcEditorControl.cs +++ b/unimarc/unimarc/마크/MarcEditorControl.cs @@ -876,7 +876,7 @@ namespace UniMarc if (pubDate.Length < 3) { - MessageBox.Show($"260c 값이 없거나 올바르지 않습니다\n\n값:{pubDate}"); + UTIL.MsgE($"260c 값이 없거나 올바르지 않습니다\n\n값:{pubDate}"); return null; } else if (pubDate.Length < 5) @@ -905,7 +905,7 @@ namespace UniMarc if (res == "") { - MessageBox.Show($"260c 값이 없거나 올바르지 않습니다\n\n값:{ContentTag}"); + UTIL.MsgE($"260c 값이 없거나 올바르지 않습니다\n\n값:{ContentTag}"); return null; } else if (res.Length < 3) @@ -2987,7 +2987,7 @@ namespace UniMarc } catch { - MessageBox.Show("데이터가 올바르지않습니다.\n245d를 확인해주세요."); + UTIL.MsgE("데이터가 올바르지않습니다.\n245d를 확인해주세요."); } } #region 기본표목 생성 서브 함수 diff --git a/unimarc/unimarc/마크/Marc_CopyForm.cs b/unimarc/unimarc/마크/Marc_CopyForm.cs index cedd4c9..caac48c 100644 --- a/unimarc/unimarc/마크/Marc_CopyForm.cs +++ b/unimarc/unimarc/마크/Marc_CopyForm.cs @@ -34,6 +34,7 @@ namespace UniMarc // Wire up events this.Controls.Add(marcEditorControl1); + marcEditorControl1.BringToFront(); this.StartPosition = FormStartPosition.CenterScreen; diff --git a/unimarc/unimarc/마크/Marc_FillBlank.cs b/unimarc/unimarc/마크/Marc_FillBlank.cs index c0c1dac..d8caa08 100644 --- a/unimarc/unimarc/마크/Marc_FillBlank.cs +++ b/unimarc/unimarc/마크/Marc_FillBlank.cs @@ -1,4 +1,5 @@ -using Org.BouncyCastle.Pkcs; +using AR; +using Org.BouncyCastle.Pkcs; using System; using System.Collections.Generic; using System.ComponentModel; @@ -262,7 +263,7 @@ namespace UniMarc if (!tb_URL.Text.Contains("searchResultMarc")) { - MessageBox.Show("코리스 마크가 있는곳으로 이동해주세요!"); + UTIL.MsgE("코리스 마크가 있는곳으로 이동해주세요!"); return; } SearchResultMarc(); @@ -319,7 +320,7 @@ namespace UniMarc progressBar1.Value += 1; } - MessageBox.Show("완료되었습니다!"); + UTIL.MsgI("완료되었습니다!"); this.DialogResult = DialogResult.OK; this.Close(); } diff --git a/unimarc/unimarc/마크/Marc_Plan.cs b/unimarc/unimarc/마크/Marc_Plan.cs index f0043d1..e5e1333 100644 --- a/unimarc/unimarc/마크/Marc_Plan.cs +++ b/unimarc/unimarc/마크/Marc_Plan.cs @@ -478,11 +478,11 @@ namespace UniMarc string msg = string.Format("『{0}』 태그를 변경하시겠습니까?", tb_SearchTag.Text); // 아니오 선택시 아래코드 실행되지않음. - if (MessageBox.Show(msg, "태그변경", MessageBoxButtons.YesNo) == DialogResult.No) return; + if (UTIL.MsgQ(msg) == DialogResult.No) return; if (tb_SearchTag.Text.Length <= 3) { - MessageBox.Show("변경할 태그 검색을 양식에 맞춰주세요. ex) 245a"); + UTIL.MsgE("변경할 태그 검색을 양식에 맞춰주세요. ex) 245a"); return; } @@ -571,7 +571,7 @@ namespace UniMarc */ #endregion - MessageBox.Show("변경되었습니다!", "태그변경"); + UTIL.MsgI("변경되었습니다!"); } /// @@ -653,7 +653,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(Ucmd); } - MessageBox.Show("저장되었습니다."); + UTIL.MsgI("저장되었습니다."); mk_Grid(btn_Select_List.Text, this.date); } @@ -771,7 +771,7 @@ namespace UniMarc FileName = saveFileDialog.FileName; System.IO.File.WriteAllText(FileName, Marc_data, Encoding.Unicode); } - MessageBox.Show("반출되었습니다!"); + UTIL.MsgI("반출되었습니다!"); } } @@ -821,7 +821,7 @@ namespace UniMarc String_Text st = new String_Text(); dataGridView1.Rows[i].Cells["marc"].Value = st.made_Ori_marc(tChange); } - MessageBox.Show("태그 일괄 적용 완료!"); + UTIL.MsgI("태그 일괄 적용 완료!"); } private List GetSelectGridIDX() { @@ -884,7 +884,7 @@ namespace UniMarc } dataGridView1.Rows[i].Cells["marc"].Value = st.made_Ori_marc(tNewMarc); } - MessageBox.Show("태그 일괄 적용 완료!"); + UTIL.MsgI("태그 일괄 적용 완료!"); } @@ -973,12 +973,12 @@ namespace UniMarc } if (dataGridView1.Rows[row].Cells["marc"].Value == null) { - MessageBox.Show("저장된 마크가 없습니다!"); + UTIL.MsgE("저장된 마크가 없습니다!"); return; } if (dataGridView1.Rows[row].Cells["marc"].Value.ToString() == "") { - MessageBox.Show("저장된 마크가 없습니다!"); + UTIL.MsgE("저장된 마크가 없습니다!"); return; } @@ -1176,7 +1176,7 @@ namespace UniMarc { if (cb_TextFont.SelectedIndex < 0) { - MessageBox.Show("글자체를 선택해주세요!"); + UTIL.MsgE("글자체를 선택해주세요!"); return; } Cnt = 0; @@ -1614,7 +1614,7 @@ namespace UniMarc string[] parts = input.Split('~', '-'); if (parts.Length != 2) { - MessageBox.Show("올바른 형식으로 입력해주세요.\n예) 1~100", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); + UTIL.MsgE("올바른 형식으로 입력해주세요.\n예) 1~100"); return; } @@ -1624,13 +1624,13 @@ namespace UniMarc // 범위 검증 if (startRow < 1 || endRow < 1) { - MessageBox.Show("행 번호는 1 이상이어야 합니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); + UTIL.MsgE("행 번호는 1 이상이어야 합니다."); return; } if (startRow > endRow) { - MessageBox.Show("시작 행 번호가 끝 행 번호보다 클 수 없습니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); + UTIL.MsgE("시작 행 번호가 끝 행 번호보다 클 수 없습니다."); return; } @@ -1641,14 +1641,14 @@ namespace UniMarc // 범위가 데이터 범위를 벗어나는지 확인 if (endIndex >= bs1.Count) { - MessageBox.Show($"입력한 범위가 전체 데이터 수({bs1.Count})를 초과합니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); + UTIL.MsgE($"입력한 범위가 전체 데이터 수({bs1.Count})를 초과합니다."); return; } // 삭제 확인 string confirmMsg = string.Format("{0}번부터 {1}번까지 총 {2}개의 행을 삭제하시겠습니까?", startRow, endRow, endRow - startRow + 1); - if (MessageBox.Show(confirmMsg, "행 삭제 확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) + if (UTIL.MsgQ(confirmMsg) == DialogResult.No) return; // 뒤에서부터 삭제 (인덱스가 꼬이지 않도록) @@ -1660,15 +1660,15 @@ namespace UniMarc } } - MessageBox.Show("삭제가 완료되었습니다.", "완료", MessageBoxButtons.OK, MessageBoxIcon.Information); + UTIL.MsgI("삭제가 완료되었습니다."); } catch (FormatException) { - MessageBox.Show("숫자 형식으로 입력해주세요.\n예) 1~100", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); + UTIL.MsgE("숫자 형식으로 입력해주세요.\n예) 1~100"); } catch (Exception ex) { - MessageBox.Show($"삭제 중 오류가 발생했습니다.\n{ex.Message}", "오류", MessageBoxButtons.OK, MessageBoxIcon.Error); + UTIL.MsgE($"삭제 중 오류가 발생했습니다.\n{ex.Message}"); } } @@ -1680,7 +1680,7 @@ namespace UniMarc if (string.IsNullOrEmpty(ISBN)) { - MessageBox.Show("ISBN이 존재하지않습니다!"); + UTIL.MsgE("ISBN이 존재하지않습니다!"); return; } diff --git a/unimarc/unimarc/마크/Marc_Plan_GearExcel.cs b/unimarc/unimarc/마크/Marc_Plan_GearExcel.cs index f17e8b1..3e51849 100644 --- a/unimarc/unimarc/마크/Marc_Plan_GearExcel.cs +++ b/unimarc/unimarc/마크/Marc_Plan_GearExcel.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -120,7 +121,7 @@ namespace UniMarc } catch (Exception e) { - MessageBox.Show(e.ToString()); + UTIL.MsgE(e.ToString()); } } #region MK_Excel_Sub diff --git a/unimarc/unimarc/마크/Marc_Plan_PrintLabel.cs b/unimarc/unimarc/마크/Marc_Plan_PrintLabel.cs index 0eec05c..dbf0e81 100644 --- a/unimarc/unimarc/마크/Marc_Plan_PrintLabel.cs +++ b/unimarc/unimarc/마크/Marc_Plan_PrintLabel.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -234,7 +235,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show(tb_ListName.Text + "가 성공적으로 수정되었습니다!", "수정완료"); + UTIL.MsgI(tb_ListName.Text + "가 성공적으로 수정되었습니다!"); } else { @@ -257,7 +258,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(Incmd); - MessageBox.Show(tb_ListName.Text + "가 성공적으로 저장되었습니다!", "저장완료"); + UTIL.MsgI(tb_ListName.Text + "가 성공적으로 저장되었습니다!"); } } diff --git a/unimarc/unimarc/마크/Marc_Plan_Sub_MarcEdit.cs b/unimarc/unimarc/마크/Marc_Plan_Sub_MarcEdit.cs index d930887..805a541 100644 --- a/unimarc/unimarc/마크/Marc_Plan_Sub_MarcEdit.cs +++ b/unimarc/unimarc/마크/Marc_Plan_Sub_MarcEdit.cs @@ -8,6 +8,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Drawing.Drawing2D; +using AR; namespace UniMarc { @@ -490,7 +491,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(cmd); InputBookData(SearchBookTag); - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); mp.dataGridView1.Rows[row].Cells["book_name"].Value = BookName; mp.dataGridView1.Rows[row].Cells["marc"].Value = oriMarc; @@ -545,7 +546,7 @@ namespace UniMarc string Ucmd = db.More_Update(Table, Update_Col, Update_data, Search_Col, Search_data); Helper_DB.ExcuteNonQuery(Ucmd); - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); si.dataGridView1.Rows[row].Cells["Marc"].Value = oriMarc; si.dataGridView1.Rows[row].Cells["User"].Value = user; @@ -706,7 +707,7 @@ namespace UniMarc string cmd = db.More_Update(Table, Update_col, Update_Data, Search_col, Search_Data); Helper_DB.ExcuteNonQuery(cmd); - MessageBox.Show("적용되었습니다!"); + UTIL.MsgI("적용되었습니다!"); } private void richTextBox1_KeyDown(object sender, KeyEventArgs e) diff --git a/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList.cs b/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList.cs index bb47ab3..d4adbc9 100644 --- a/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList.cs +++ b/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -111,14 +112,14 @@ namespace UniMarc if (CheckRow.Length != 1) { - MessageBox.Show("처리할 목록 [1]개 선택하여 주세요."); + UTIL.MsgE("처리할 목록 [1]개 선택하여 주세요."); return; } int row = CheckRow[0]; string msg = string.Format("【{0}】을(를) {1} 하시겠습니까?", dataGridView1.Rows[row].Cells["list_name"].Value.ToString(), name); - if (MessageBox.Show(msg, name, MessageBoxButtons.OKCancel) == DialogResult.Cancel) + if (UTIL.MsgQ(msg) == DialogResult.Cancel) return; string[] search_col = { "idx", "work_list", "date" }; @@ -146,7 +147,7 @@ namespace UniMarc if (CheckRow.Length != 1) { - MessageBox.Show("수정할 목록 [1]개 선택하여 주세요."); + UTIL.MsgE("수정할 목록 [1]개 선택하여 주세요."); return; } @@ -165,7 +166,7 @@ namespace UniMarc if (CheckRow.Length < 2) { - MessageBox.Show("병합할 목록 [2]개이상 선택하여 주세요."); + UTIL.MsgE("병합할 목록 [2]개이상 선택하여 주세요."); return; } @@ -194,14 +195,14 @@ namespace UniMarc if (CheckRow.Length != 1) { - MessageBox.Show("삭제할 목록 [1]개 선택하여 주세요."); + UTIL.MsgE("삭제할 목록 [1]개 선택하여 주세요."); return; } int row = CheckRow[0]; string msg = string.Format("【{0}】을(를) 삭제하시겠습니까?", dataGridView1.Rows[row].Cells["list_name"].Value.ToString()); - if (MessageBox.Show(msg, "삭제하시겠습니까?", MessageBoxButtons.YesNo) == DialogResult.No) + if (UTIL.MsgQ(msg) == DialogResult.No) return; string idx = dataGridView1.Rows[row].Cells["idx"].Value.ToString(); @@ -217,7 +218,7 @@ namespace UniMarc cmd = db.DB_Delete_No_Limit("Specs_Marc", "compidx", PUB.user.CompanyIdx, search_col, search_data); Helper_DB.ExcuteNonQuery(cmd); - MessageBox.Show("삭제되었습니다."); + UTIL.MsgI("삭제되었습니다."); btn_Search_Click(null, null); } @@ -257,7 +258,7 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show(ex.ToString()); + UTIL.MsgE(ex.ToString()); } } diff --git a/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList_Edit.cs b/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList_Edit.cs index f57c56a..f2b6620 100644 --- a/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList_Edit.cs +++ b/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList_Edit.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -93,7 +94,7 @@ namespace UniMarc string[] search_data = { IDX }; string cmd = db.More_Update("Specs_List", update_col, update_data, search_col, search_data); Helper_DB.ExcuteNonQuery(cmd); - MessageBox.Show("저장완료되었습니다."); + UTIL.MsgI("저장완료되었습니다."); sub.btn_Search_Click(null, null); this.Close(); } diff --git a/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList_Morge.cs b/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList_Morge.cs index e685d65..036ee60 100644 --- a/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList_Morge.cs +++ b/unimarc/unimarc/마크/Marc_Plan_Sub_SelectList_Morge.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -53,7 +54,7 @@ namespace UniMarc private void btn_Morge_Click(object sender, EventArgs e) { if (tb_ListName.Text == "") { - MessageBox.Show("저장될 목록명이 비어있습니다.", "Error"); + UTIL.MsgE("저장될 목록명이 비어있습니다."); return; } string MorgeUser = PUB.user.UserName; @@ -90,7 +91,7 @@ namespace UniMarc } } - MessageBox.Show("병합되었습니다."); + UTIL.MsgI("병합되었습니다."); sub.btn_Search_Click(null, null); } diff --git a/unimarc/unimarc/마크/Marc_mkList.cs b/unimarc/unimarc/마크/Marc_mkList.cs index c5ddc71..d0424cd 100644 --- a/unimarc/unimarc/마크/Marc_mkList.cs +++ b/unimarc/unimarc/마크/Marc_mkList.cs @@ -327,7 +327,7 @@ namespace UniMarc if (Author[0].Length < 1) { - MessageBox.Show(row[a] + "번째의 저자를 확인해주세요. \n (100a, 110a, 111a 중 1개 필수)"); + UTIL.MsgE("저장할 목록명이 비어있습니다." + row[a] + "번째의 저자를 확인해주세요. \n (100a, 110a, 111a 중 1개 필수)"); return; } diff --git a/unimarc/unimarc/마크/Marc_mkList2.cs b/unimarc/unimarc/마크/Marc_mkList2.cs index 1f0ad00..11970eb 100644 --- a/unimarc/unimarc/마크/Marc_mkList2.cs +++ b/unimarc/unimarc/마크/Marc_mkList2.cs @@ -321,11 +321,7 @@ namespace UniMarc tmp_ViewMarc = st.AddTagInMarc(string.Format("056\t \t▼a{0}▼2{1}▲", insert_marc_data[12], cb_divNum.Text), tmp_ViewMarc); insert_marc_data[14] = st.made_Ori_marc(tmp_ViewMarc); - if (Author[0].Length < 1) - { - MessageBox.Show( $"{a}번 줄,인덱스({dr.ListIdx})의 저자를 확인해주세요(ISBN:{dr.ISBN13}). \n (100a, 110a, 111a 중 1개 필수)"); - return; - } + UTIL.MsgE( $"{a}번 줄,인덱스({dr.ListIdx})의 저자를 확인해주세요(ISBN:{dr.ISBN13}). \n (100a, 110a, 111a 중 1개 필수)"); Author[0] = Regex.Replace(Author[0], @"[^a-zA-Z0-9가-힣_]", "", RegexOptions.Singleline); Author[1] = st.RemoveWordInBracket(Author[1]); diff --git a/unimarc/unimarc/마크/Search_Infor.cs b/unimarc/unimarc/마크/Search_Infor.cs index 8db88a4..dce46c5 100644 --- a/unimarc/unimarc/마크/Search_Infor.cs +++ b/unimarc/unimarc/마크/Search_Infor.cs @@ -1,4 +1,5 @@ -using Microsoft.Office.Interop.Excel; +using AR; +using Microsoft.Office.Interop.Excel; using System; using System.Collections.Generic; using System.ComponentModel; @@ -506,7 +507,7 @@ namespace UniMarc return; if (dataGridView1.Rows[row].Cells["marc2"].Value.ToString() == "") { - MessageBox.Show("이전에 저장된 MARC 데이터가 없습니다."); + UTIL.MsgE("이전에 저장된 MARC 데이터가 없습니다."); return; } Marc_Plan_Sub_MarcEdit me = new Marc_Plan_Sub_MarcEdit(this); diff --git a/unimarc/unimarc/마크/Search_Infor2.cs b/unimarc/unimarc/마크/Search_Infor2.cs index c059c8e..44e07a2 100644 --- a/unimarc/unimarc/마크/Search_Infor2.cs +++ b/unimarc/unimarc/마크/Search_Infor2.cs @@ -434,7 +434,7 @@ namespace UniMarc if (dataList.Any() == false) { // UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다"); - MessageBox.Show("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다"); + UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다"); } else me.OpenFillBlank(dataList, currentBoundItem.ISBN); }; @@ -579,7 +579,7 @@ namespace UniMarc if (string.IsNullOrEmpty(item.marc2)) { - MessageBox.Show("이전에 저장된 MARC 데이터가 없습니다."); + UTIL.MsgE("이전에 저장된 MARC 데이터가 없습니다."); return; } @@ -670,7 +670,7 @@ namespace UniMarc if (dataList.Any() == false) { // UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다"); - MessageBox.Show("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다"); + UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다"); } else me.OpenFillBlank(dataList, currentBoundItem.ISBN); }; diff --git a/unimarc/unimarc/마크/Set_Macro.cs b/unimarc/unimarc/마크/Set_Macro.cs index 660c5a8..b709939 100644 --- a/unimarc/unimarc/마크/Set_Macro.cs +++ b/unimarc/unimarc/마크/Set_Macro.cs @@ -12,6 +12,7 @@ using System.IO; using System.Xml.Linq; using System.Data.SqlTypes; using Microsoft.VisualBasic.Devices; +using AR; namespace UniMarc { @@ -172,7 +173,7 @@ namespace UniMarc //TargetGrid.Rows[a].Cells["marc"].Value = macro.MacroMarc(ViewMarcArray[count], idxArray, TagArray, RunCode); count++; } - MessageBox.Show("적용되었습니다!"); + UTIL.MsgI("적용되었습니다!"); } private void btn_AddList_Click(object sender, EventArgs e) @@ -195,7 +196,7 @@ namespace UniMarc string Table = "Comp_SaveMacro"; if (db.DB_Send_CMD_Search(string.Format("SELECT * FROM {0} WHERE `compidx` = \"{1}\" AND `{2}` = \"{3}\"", Table, compidx, "listname", value)).Length > 2) { - MessageBox.Show("중복된 목록명이 있습니다!"); + UTIL.MsgE("중복된 목록명이 있습니다!"); return; } string[] Insert_Tbl = { "compidx", "listname", "user", "Macroidx" }; @@ -212,7 +213,7 @@ namespace UniMarc { if (cb_SearchList.SelectedIndex < 0) { - MessageBox.Show("선택된 목록이 없습니다!"); + UTIL.MsgE("선택된 목록이 없습니다!"); return; } @@ -238,7 +239,7 @@ namespace UniMarc if (db.DB_Send_CMD_Search(db.More_DB_Search(Table, Search_T, Search_C)).Length < 2) { - MessageBox.Show("선택된 목록이 없습니다!"); + UTIL.MsgE("선택된 목록이 없습니다!"); return; } @@ -246,12 +247,12 @@ namespace UniMarc string[] Update_C = { MacroIndex }; Helper_DB.ExcuteNonQuery(db.More_Update(Table, Update_T, Update_C, Search_T, Search_C)); - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); } private void btn_ListRemove_Click(object sender, EventArgs e) { - if (DialogResult.Yes != MessageBox.Show("현재 목록을 삭제하시겠습니까?", "목록 삭제", MessageBoxButtons.YesNo)) + if (DialogResult.Yes != UTIL.MsgQ("현재 목록을 삭제하시겠습니까?")) return; string compidx = PUB.user.CompanyIdx; @@ -263,12 +264,12 @@ namespace UniMarc if (db.DB_Send_CMD_Search(db.More_DB_Search(Table, Search_T, Search_C)).Length < 2) { - MessageBox.Show("선택된 목록이 없습니다!"); + UTIL.MsgE("선택된 목록이 없습니다!"); return; } Helper_DB.ExcuteNonQuery(db.DB_Delete_More_term(Table, "compidx", compidx, Search_T, Search_C)); - MessageBox.Show("삭제되었습니다!"); + UTIL.MsgI("삭제되었습니다!"); Refresh_Macro_List(); } diff --git a/unimarc/unimarc/마크/Symbol_Add.cs b/unimarc/unimarc/마크/Symbol_Add.cs index c2ae3c6..5f25dc4 100644 --- a/unimarc/unimarc/마크/Symbol_Add.cs +++ b/unimarc/unimarc/마크/Symbol_Add.cs @@ -8,6 +8,7 @@ using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; +using AR; using AuthorSymbol; namespace UniMarc @@ -42,14 +43,14 @@ namespace UniMarc if (tb_author.Text == "") { - MessageBox.Show("대표 저자를 입력해주세요!"); + UTIL.MsgE("대표 저자를 입력해주세요!"); return; } if (cb_symbolK.Text == "커터 샌본 저자기호표") { if (!CheckEng(res)) { - MessageBox.Show("영어만 입력해주세요!"); + UTIL.MsgE("영어만 입력해주세요!"); return; } } @@ -58,7 +59,7 @@ namespace UniMarc { if (!CheckKor(res)) { - MessageBox.Show("한글만 입력해주세요!"); + UTIL.MsgE("한글만 입력해주세요!"); return; } } diff --git a/unimarc/unimarc/편의기능/Quick_menu.cs b/unimarc/unimarc/편의기능/Quick_menu.cs index 0c0ad43..8444558 100644 --- a/unimarc/unimarc/편의기능/Quick_menu.cs +++ b/unimarc/unimarc/편의기능/Quick_menu.cs @@ -8,6 +8,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Text.RegularExpressions; +using AR; namespace UniMarc { @@ -187,7 +188,7 @@ namespace UniMarc string cmd = InCmd + UpCmd; Helper_DB.ExcuteNonQuery(cmd); - MessageBox.Show("저장완료!"); + UTIL.MsgI("저장완료!"); main.SetBtnName(); } diff --git a/unimarc/unimarc/홈/Home_User_manage.cs b/unimarc/unimarc/홈/Home_User_manage.cs index ac46286..2b602f4 100644 --- a/unimarc/unimarc/홈/Home_User_manage.cs +++ b/unimarc/unimarc/홈/Home_User_manage.cs @@ -215,21 +215,21 @@ namespace UniMarc { if (!System.Text.RegularExpressions.Regex.IsMatch(tb_ID.Text, @"^[a-zA-Z0-9]")) { - MessageBox.Show("영어와 숫자 조합으로 작성해주세요!"); + UTIL.MsgE("영어와 숫자 조합으로 작성해주세요!"); mOverlap = false; return; } string cmd = mDB.DB_Search(Table_User, "id", tb_ID.Text); string db_res = mDB.DB_Send_CMD_Search(cmd); - if (db_res == "") { MessageBox.Show("사용가능한 아이디입니다. [" + tb_ID.Text + "]"); mOverlap = true; } - else { MessageBox.Show("중복된 아이디입니다. [" + tb_ID.Text + "]"); mOverlap = false; } + if (db_res == "") { UTIL.MsgI("사용가능한 아이디입니다. [" + tb_ID.Text + "]"); mOverlap = true; } + else { UTIL.MsgE("중복된 아이디입니다. [" + tb_ID.Text + "]"); mOverlap = false; } } private void btn_Save_Click(object sender, EventArgs e) { if (tb_ID.Text == "" || tb_PW.Text == "" || tb_Name.Text == "") { - MessageBox.Show("성명 / 아이디 / 비밀번호 를 채워주세요."); + UTIL.MsgE("성명 / 아이디 / 비밀번호 를 채워주세요."); return; } @@ -237,7 +237,7 @@ namespace UniMarc { if (!mOverlap) { - MessageBox.Show("아이디 중복확인을 해주세요."); + UTIL.MsgE("아이디 중복확인을 해주세요."); return; } } @@ -264,7 +264,7 @@ namespace UniMarc tCmd = string.Format("INSERT INTO `User_ShortCut` (`id`) VALUES ('{0}')", tb_ID.Text); Helper_DB.ExcuteNonQuery(tCmd); - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); main.isAccess(); RefreshList(); } @@ -272,7 +272,7 @@ namespace UniMarc { if (dataGridView1.CurrentCell == null || dataGridView1.CurrentCell.RowIndex < 0 || dataGridView1.SelectedRows.Count == 0) { - MessageBox.Show("삭제할 행을 선택해 주세요."); + UTIL.MsgE("삭제할 행을 선택해 주세요."); return; } string tText = string.Format("{0} 를 수정 하시겠습니까?", dataGridView1.SelectedRows[0].Cells["ID"].Value.ToString()); @@ -280,7 +280,7 @@ namespace UniMarc { if (tb_ID.Text == "" || tb_PW.Text == "" || tb_Name.Text == "") { - MessageBox.Show("성명 / 아이디 / 비밀번호 를 채워주세요."); + UTIL.MsgE("성명 / 아이디 / 비밀번호 를 채워주세요."); return; } @@ -290,7 +290,7 @@ namespace UniMarc { if (!mOverlap) { - MessageBox.Show("아이디 중복확인을 해주세요."); + UTIL.MsgE("아이디 중복확인을 해주세요."); return; } } @@ -318,7 +318,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(cmd); cmd = mDB.More_Update("User_Data", tAccess_Col, tAccess_Data, tSearch_Col, tSearch_Data); Helper_DB.ExcuteNonQuery(cmd); - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); RefreshList(); } } @@ -360,7 +360,7 @@ namespace UniMarc { if (dataGridView1.CurrentCell == null || dataGridView1.CurrentCell.RowIndex < 0 || dataGridView1.SelectedRows.Count == 0) { - MessageBox.Show("삭제할 행을 선택해 주세요."); + UTIL.MsgE("삭제할 행을 선택해 주세요."); return; } string tText = string.Format("{0} 를 삭제 하시겠습니까?", dataGridView1.SelectedRows[0].Cells["ID"].Value.ToString()); @@ -375,7 +375,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(D_cmd); D_cmd = mDB.DB_Delete("User_Data", "ID", tID, "PW", tPW); Helper_DB.ExcuteNonQuery(D_cmd); - MessageBox.Show("삭제 완료되었습니다!"); + UTIL.MsgI("삭제 완료되었습니다!"); RefreshList(); } } diff --git a/unimarc/unimarc/홈/Order_manage.cs b/unimarc/unimarc/홈/Order_manage.cs index d5b4bc3..e354c43 100644 --- a/unimarc/unimarc/홈/Order_manage.cs +++ b/unimarc/unimarc/홈/Order_manage.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -244,13 +245,13 @@ namespace UniMarc { string Incmd = db.DB_INSERT("Purchase", Insert_Table, Insert_Data); Helper_DB.ExcuteNonQuery(Incmd); - MessageBox.Show(tb_sangho.Text + " 저장 완료"); + UTIL.MsgI(tb_sangho.Text + " 저장 완료"); } else { string U_cmd = db.More_Update(Table, Insert_Table, Insert_Data, Search_Table, Search_Data); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show(tb_sangho.Text + " 수정 완료"); + UTIL.MsgI(tb_sangho.Text + " 수정 완료"); } } private void btn_Delete_Click(object sender, EventArgs e) // 삭제 @@ -261,7 +262,7 @@ namespace UniMarc string sangho = dataGridView1.Rows[row].Cells["sangho"].Value.ToString(); string D_cmd = db.DB_Delete("Purchase", "idx", idx, "sangho", sangho); Helper_DB.ExcuteNonQuery(D_cmd); - MessageBox.Show(sangho + " 삭제 완료"); + UTIL.MsgI(sangho + " 삭제 완료"); } private void tb_memo_Click(object sender, EventArgs e) { @@ -284,7 +285,7 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show(ex.Message); + UTIL.MsgE(ex.Message); } } private void btn_close_Click(object sender, EventArgs e) @@ -380,7 +381,9 @@ namespace UniMarc "word", word, "persent", persent); - MessageBox.Show(cmd); + // MessageBox.Show(cmd); // Debugging code, commenting out or replacing + // UTIL.MsgI(cmd); + Helper_DB.ExcuteNonQuery(cmd); dgv_IndexWord.Rows.RemoveAt(row); diff --git a/unimarc/unimarc/홈/Transaction_manage.cs b/unimarc/unimarc/홈/Transaction_manage.cs index 721167b..1230971 100644 --- a/unimarc/unimarc/홈/Transaction_manage.cs +++ b/unimarc/unimarc/홈/Transaction_manage.cs @@ -164,22 +164,22 @@ namespace UniMarc if (tb_sangho.Text == "") { - MessageBox.Show("업체명이 비어있습니다."); + UTIL.MsgE("업체명이 비어있습니다."); return; } if (cb_gubun1.SelectedIndex == 0) { - MessageBox.Show("구분을 선택해주세요."); + UTIL.MsgE("구분을 선택해주세요."); return; } if (cb_gubun2.SelectedIndex == 0) { - MessageBox.Show("구분을 선택해주세요."); + UTIL.MsgE("구분을 선택해주세요."); return; } if (cb_gubun2.SelectedItem.ToString() == "학교" && cb_dlsArea.SelectedIndex < 0 && tb_id.Text != "") { - MessageBox.Show("DLS 지역을 선택해주세요."); + UTIL.MsgE("DLS 지역을 선택해주세요."); return; } //string CopyCheckCMD = string.Format("SELECT {0} FROM {1} WHERE {0} = \"{2}\";", "`c_sangho`", "`Client`", tb_sangho.Text); @@ -188,7 +188,7 @@ namespace UniMarc bool isCopy = Check_Data(tb_sangho.Text); if (isCopy) { - MessageBox.Show("중복된 상호명이 존재합니다!"); + UTIL.MsgE("중복된 상호명이 존재합니다!"); return; } @@ -213,13 +213,13 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(Incmd); SearchList(); - MessageBox.Show(string.Format("[{0}]가 성공적으로 저장되었습니다.", tb_sangho.Text)); + UTIL.MsgI(string.Format("[{0}]가 성공적으로 저장되었습니다.", tb_sangho.Text)); } private void btn_save_Click(object sender, EventArgs e) { if (dv1.SelectedRows.Count == 0) { - MessageBox.Show("수정 할 업체를 선택해 주세요."); + UTIL.MsgE("수정 할 업체를 선택해 주세요."); return; } int tRowIndex = dv1.SelectedRows[0].Index; @@ -229,22 +229,22 @@ namespace UniMarc if (UTIL.MsgQ(tText) != DialogResult.Yes) return; if (tb_sangho.Text == "") { - MessageBox.Show("업체명이 비어있습니다."); + UTIL.MsgE("업체명이 비어있습니다."); return; } if (cb_gubun1.SelectedIndex == 0) { - MessageBox.Show("구분을 선택해주세요."); + UTIL.MsgE("구분을 선택해주세요."); return; } if (cb_gubun2.SelectedIndex == 0) { - MessageBox.Show("구분을 선택해주세요."); + UTIL.MsgE("구분을 선택해주세요."); return; } if (cb_gubun2.SelectedItem.ToString() == "학교" && cb_dlsArea.SelectedIndex < 0 && tb_id.Text != "") { - MessageBox.Show("DLS 지역을 선택해주세요."); + UTIL.MsgE("DLS 지역을 선택해주세요."); return; } //string CopyCheckCMD = string.Format("SELECT {0} FROM {1} WHERE {0} = \"{2}\";", "`c_sangho`", "`Client`", tb_sangho.Text); @@ -277,7 +277,7 @@ namespace UniMarc string U_cmd = db.More_Update("Client", editcol, editname, searchcol, searchname); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show(tb_sangho.Text + "가 성공적으로 수정되었습니다."); + UTIL.MsgI(tb_sangho.Text + "가 성공적으로 수정되었습니다."); //} //else //{ @@ -297,7 +297,7 @@ namespace UniMarc // Helper_DB.ExcuteNonQuery(Incmd); - // MessageBox.Show(string.Format("[{0}]가 성공적으로 저장되었습니다.", tb_sangho.Text)); + // UTIL.MsgI(string.Format("[{0}]가 성공적으로 저장되었습니다.", tb_sangho.Text)); //} SearchList(); dv1.Rows[RowIndex].Selected = true; @@ -315,7 +315,7 @@ namespace UniMarc Helper_DB.ExcuteNonQuery(D_cmd); Made_Grid(); SearchList(); - MessageBox.Show("삭제되었습니다."); + UTIL.MsgI("삭제되었습니다."); } private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) diff --git a/unimarc/unimarc/홈/User_Infor.cs b/unimarc/unimarc/홈/User_Infor.cs index c8689b7..3431a82 100644 --- a/unimarc/unimarc/홈/User_Infor.cs +++ b/unimarc/unimarc/홈/User_Infor.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -91,7 +92,7 @@ namespace UniMarc string[] search_name = { PUB.user.CompanyIdx, tb_sangho.Text }; string U_cmd = db.More_Update("Comp", Area, temp, search_col, search_name); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show("저장되었습니다."); + UTIL.MsgI("저장되었습니다."); } private void tb_port_KeyPress(object sender, KeyPressEventArgs e) { diff --git a/unimarc/unimarc/회계/Part_time.cs b/unimarc/unimarc/회계/Part_time.cs index 9c72712..c5033de 100644 --- a/unimarc/unimarc/회계/Part_time.cs +++ b/unimarc/unimarc/회계/Part_time.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -113,12 +114,12 @@ namespace UniMarc cb_end_hour.SelectedIndex = tmp; } string start_time = Regex.Replace(cb_start_hour.Text, @"\D", ""); - if (cb_start_hour.SelectedIndex < 0) { MessageBox.Show("시간이 선택되지 않았습니다!"); return; } + if (cb_start_hour.SelectedIndex < 0) { UTIL.MsgE("시간이 선택되지 않았습니다!"); return; } else if (start_30min.Checked) { start_time += ":30"; } else { start_time += ":00"; } string end_time = Regex.Replace(cb_end_hour.Text, @"\D", ""); - if (cb_end_hour.SelectedIndex < 0) { MessageBox.Show("시간이 선택되지 않았습니다!"); return; } + if (cb_end_hour.SelectedIndex < 0) { UTIL.MsgE("시간이 선택되지 않았습니다!"); return; } else if (end_30min.Checked) { end_time += ":30"; } else { end_time += ":00"; } #endregion @@ -164,7 +165,7 @@ namespace UniMarc string Incmd = db.DB_INSERT("Part_Time", input_area, input_data); Helper_DB.ExcuteNonQuery(Incmd); } - MessageBox.Show("저장되었습니다!"); + UTIL.MsgI("저장되었습니다!"); } #region Save_Sub /// @@ -177,7 +178,7 @@ namespace UniMarc { if (dataGridView1.Rows[a].Cells["per_name"].Value.ToString() == "") { - MessageBox.Show("이름이 빈칸입니다!"); + UTIL.MsgE("이름이 빈칸입니다!"); return false; } } @@ -193,7 +194,7 @@ namespace UniMarc dataGridView1.Rows.RemoveAt(a); } } - MessageBox.Show("삭제되었습니다!"); + UTIL.MsgI("삭제되었습니다!"); } private void btn_Close_Click(object sender, EventArgs e) diff --git a/unimarc/unimarc/회계/Remit_reg.cs b/unimarc/unimarc/회계/Remit_reg.cs index f0a9408..bf8ae67 100644 --- a/unimarc/unimarc/회계/Remit_reg.cs +++ b/unimarc/unimarc/회계/Remit_reg.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -88,7 +89,7 @@ namespace UniMarc string where_col = dataGridView1.Rows[row_count[a]].Cells[0].Value.ToString(); string U_cmd = db.DB_Update("Remit_reg", update_tbl, update_col, where_tbl, where_col); Helper_DB.ExcuteNonQuery(U_cmd); - MessageBox.Show(where_col); + UTIL.MsgI(where_col); } } int[] grid_chk() diff --git a/unimarc/unimarc/회계/Remit_reg2.cs b/unimarc/unimarc/회계/Remit_reg2.cs index ee43c56..f24571b 100644 --- a/unimarc/unimarc/회계/Remit_reg2.cs +++ b/unimarc/unimarc/회계/Remit_reg2.cs @@ -8,6 +8,7 @@ using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using System.Text.RegularExpressions; +using AR; namespace UniMarc { @@ -93,7 +94,7 @@ namespace UniMarc string Incmd = db.DB_INSERT("Remit_reg", input_table, input_data); Helper_DB.ExcuteNonQuery(Incmd); - MessageBox.Show("성공적으로 저장되었습니다."); + UTIL.MsgI("성공적으로 저장되었습니다."); Add_Grid(); } void Add_Grid() @@ -112,11 +113,11 @@ namespace UniMarc string[] target_data = { date, tb_purchase.Text, tb_bank.Text, tb_bank_code.Text, tb_bank_num.Text, tb_bank_boss.Text, tb_send_money.Text, tb_etc.Text }; - if (MessageBox.Show("정말 삭제하시겠습니까?", "경고", MessageBoxButtons.YesNo) == DialogResult.Yes) + if (UTIL.MsgQ("정말 삭제하시겠습니까?") == DialogResult.Yes) { string cmd = db.DB_Delete_More_term("Remit_reg", target_idx, compidx, target_table, target_data); Helper_DB.ExcuteNonQuery(cmd); - MessageBox.Show("삭제되었습니다."); + UTIL.MsgI("삭제되었습니다."); } } private void btn_lookup_Click(object sender, EventArgs e) diff --git a/unimarc/unimarc/회계/Sales_Detail.cs b/unimarc/unimarc/회계/Sales_Detail.cs index 7ba40f2..ad845fe 100644 --- a/unimarc/unimarc/회계/Sales_Detail.cs +++ b/unimarc/unimarc/회계/Sales_Detail.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -99,7 +100,7 @@ namespace UniMarc } private void btn_save_Click(object sender, EventArgs e) { - if(MessageBox.Show("저장하시겠습니까?", "저장", MessageBoxButtons.YesNo) == DialogResult.No) { + if(UTIL.MsgQ("저장하시겠습니까?") == DialogResult.No) { return; } for (int a = 0; a < dataGridView1.Rows.Count; a++) @@ -113,11 +114,11 @@ namespace UniMarc string U_cmd = db.More_Update("Sales", edit_col, edit_data, search_col, search_data); Helper_DB.ExcuteNonQuery(U_cmd); } - MessageBox.Show("저장되었습니다.", "저장", MessageBoxButtons.OK, MessageBoxIcon.Information); + UTIL.MsgI("저장되었습니다."); } private void btn_delete_Click(object sender, EventArgs e) { - if (MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.No) { + if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.No) { return; } for (int a = 0; a < dataGridView1.Rows.Count; a++) @@ -125,7 +126,7 @@ namespace UniMarc string D_cmd = db.DB_Delete("Sales", "compidx", compidx, "idx", dataGridView1.Rows[a].Cells["idx"].Value.ToString()); Helper_DB.ExcuteNonQuery(D_cmd); } - MessageBox.Show("삭제되었습니다.", "삭제", MessageBoxButtons.OK, MessageBoxIcon.Information); + UTIL.MsgI("삭제되었습니다."); } private void btn_close_Click(object sender, EventArgs e) { diff --git a/unimarc/unimarc/회계/Sales_In_Pay.cs b/unimarc/unimarc/회계/Sales_In_Pay.cs index a4b4df0..9d74afb 100644 --- a/unimarc/unimarc/회계/Sales_In_Pay.cs +++ b/unimarc/unimarc/회계/Sales_In_Pay.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -42,9 +43,9 @@ namespace UniMarc } private void btn_Save_Click(object sender, EventArgs e) { - if (tb_clt.Text == "") { MessageBox.Show("거래처를 입력해주세요."); return; } - if (tb_price.Text == "") { MessageBox.Show("금액을 입력해주세요."); return; } - if (cb_gubun.SelectedIndex < 0) { MessageBox.Show("구분을 선택해주세요."); return; } + if (tb_clt.Text == "") { UTIL.MsgE("거래처를 입력해주세요."); return; } + if (tb_price.Text == "") { UTIL.MsgE("금액을 입력해주세요."); return; } + if (cb_gubun.SelectedIndex < 0) { UTIL.MsgE("구분을 선택해주세요."); return; } string date = Pay_In_Date.Text.Substring(0, 10); if (row < 0 || !add_chk) { @@ -85,7 +86,7 @@ namespace UniMarc #endregion private void btn_Delete_Click(object sender, EventArgs e) { - if(MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.No) { return; } + if(UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.No) { return; } string D_cmd = db.DB_Delete("Sales", "compidx", compidx, "idx", dataGridView1.Rows[row].Cells["idx"].Value.ToString()); Helper_DB.ExcuteNonQuery(D_cmd); diff --git a/unimarc/unimarc/회계/Sales_Input.cs b/unimarc/unimarc/회계/Sales_Input.cs index 89ed0f0..ff61bb7 100644 --- a/unimarc/unimarc/회계/Sales_Input.cs +++ b/unimarc/unimarc/회계/Sales_Input.cs @@ -1,4 +1,5 @@ -using System; +using AR; +using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; @@ -61,7 +62,7 @@ namespace UniMarc { btn_Total_Click(null, null); - if (tb_book_name.Text == "") { MessageBox.Show("도서명이 입력해주세요."); return; } + if (tb_book_name.Text == "") { UTIL.MsgE("도서명이 입력해주세요."); return; } // 도서명/저자/출판사/정가/출고율/부수/합계금액/ISBN string[] grid = { tb_book_name.Text, @@ -80,8 +81,8 @@ namespace UniMarc } private void btn_Save_Click(object sender, EventArgs e) { - if (tb_clt.Text == "") { MessageBox.Show("거래처를 입력해주세요."); return; } - if (dataGridView1.Rows.Count <= 0) { MessageBox.Show("저장할 내용이 없습니다."); return; } + if (tb_clt.Text == "") { UTIL.MsgE("거래처를 입력해주세요."); return; } + if (dataGridView1.Rows.Count <= 0) { UTIL.MsgE("저장할 내용이 없습니다."); return; } string date = out_date.Text.Substring(0, 10);