Messagebox 모두 변경

This commit is contained in:
2026-02-23 23:11:54 +09:00
parent 1b77fd02b0
commit 3cfd7ff12c
76 changed files with 474 additions and 425 deletions

View File

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

View File

@@ -55,7 +55,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.ToString(), "ExecuteQueryData Error"); UTIL.MsgE(ex.ToString());
return null; return null;
} }
} }
@@ -748,8 +748,7 @@ namespace UniMarc
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show("{0} Exception caught.\n" + e.ToString()); UTIL.MsgE(e.ToString());
MessageBox.Show(cmd);
} }
conn.Close(); conn.Close();
return result; return result;

View File

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

View File

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

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -97,7 +98,7 @@ namespace UniMarc
isAccess(); isAccess();
SetBtnName(); SetBtnName();
} }
catch (Exception ex) { MessageBox.Show(ex.ToString()); } catch (Exception ex) { UTIL.MsgE(ex.ToString()); }
UpdaterCheck(); UpdaterCheck();
@@ -298,7 +299,7 @@ namespace UniMarc
// 권한설정으로 인한 리턴 // 권한설정으로 인한 리턴
if (!MenuCheckT[count[0]][count[1]].Enabled) if (!MenuCheckT[count[0]][count[1]].Enabled)
{ {
MessageBox.Show("권한이 설정되지 않았습니다!"); UTIL.MsgE("권한이 설정되지 않았습니다!");
return; return;
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
@@ -30,7 +31,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message); UTIL.MsgE(ex.Message);
} }
Application.Run(new Main()); Application.Run(new Main());

View File

@@ -286,7 +286,7 @@ namespace UniMarc
Helper_DB db = new Helper_DB(); Helper_DB db = new Helper_DB();
db.DBcon(); db.DBcon();
if (Pur == "") { MessageBox.Show("입력된 주문처가 없습니다!"); return "False"; } if (Pur == "") { UTIL.MsgE("입력된 주문처가 없습니다!"); return "False"; }
string Area = "`comp_name`, `tel`, `fax`, `bubin`, `uptae`, " + string Area = "`comp_name`, `tel`, `fax`, `bubin`, `uptae`, " +
"`jongmok`, `addr`, `boss`, `email`, `barea`"; "`jongmok`, `addr`, `boss`, `email`, `barea`";
@@ -304,7 +304,7 @@ namespace UniMarc
if (db_res1.Length < 3) if (db_res1.Length < 3)
{ {
MessageBox.Show("DB호출 에러!", "Error"); UTIL.MsgE("DB호출 에러!");
return "False"; return "False";
} }
string tel = string.Empty; string tel = string.Empty;
@@ -377,7 +377,7 @@ namespace UniMarc
// 엑셀 파일 이름 설정 // 엑셀 파일 이름 설정
string now = DateTime.Now.ToString("yy-MM-dd-HH-mm"); string now = DateTime.Now.ToString("yy-MM-dd-HH-mm");
string FileName = string.Format("{0}_{1}_{2}_{3}.xlsx", now.Replace("-", ""), emchk, Pur, db_data[0]); string FileName = string.Format("{0}_{1}_{2}_{3}.xlsx", now.Replace("-", ""), emchk, Pur, db_data[0]);
MessageBox.Show(FileName); UTIL.MsgI(FileName);
// 엑셀 파일 저장 경로 // 엑셀 파일 저장 경로
string Savepath = Path.Combine(tempPath, FileName); string Savepath = Path.Combine(tempPath, FileName);
@@ -602,7 +602,7 @@ namespace UniMarc
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show(e.ToString()); UTIL.MsgE(e.ToString());
return "False"; return "False";
} }
} }
@@ -640,7 +640,7 @@ namespace UniMarc
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show(e.ToString()); UTIL.MsgE(e.ToString());
} }
} }
#region MK_Excel_Sub #region MK_Excel_Sub
@@ -824,9 +824,9 @@ namespace UniMarc
string ErrMsg = FAX_GetErrString(result); string ErrMsg = FAX_GetErrString(result);
if (ErrMsg != "") if (ErrMsg != "")
MessageBox.Show(msg, "전송완료"); UTIL.MsgI(msg);
else else
MessageBox.Show(ErrMsg, "Error"); UTIL.MsgE(ErrMsg);
return result; return result;
} }
@@ -1307,7 +1307,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.ToString()); UTIL.MsgE(ex.ToString());
this.LastException = ex; this.LastException = ex;
System.Reflection.MemberInfo info = System.Reflection.MethodInfo.GetCurrentMethod(); System.Reflection.MemberInfo info = System.Reflection.MethodInfo.GetCurrentMethod();
string id = string.Format("{0}.{1}", info.ReflectedType.Name, info.Name); string id = string.Format("{0}.{1}", info.ReflectedType.Name, info.Name);
@@ -1326,8 +1326,6 @@ namespace UniMarc
string url = string.Format(@"FTP://{0}:{1}/{2}", ipAddr, Port, serverFullPathFile); string url = string.Format(@"FTP://{0}:{1}/{2}", ipAddr, Port, serverFullPathFile);
FtpWebRequest ftp = (FtpWebRequest)WebRequest.Create(url); FtpWebRequest ftp = (FtpWebRequest)WebRequest.Create(url);
MessageBox.Show(url);
ftp.Credentials = new NetworkCredential(userId, Pwd); ftp.Credentials = new NetworkCredential(userId, Pwd);
ftp.KeepAlive = false; ftp.KeepAlive = false;
ftp.UseBinary = true; ftp.UseBinary = true;
@@ -1365,7 +1363,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.ToString()); UTIL.MsgE(ex.ToString());
this.LastException = ex; this.LastException = ex;
if (serverFullPathFile.Contains(@"\ZOOM\")) if (serverFullPathFile.Contains(@"\ZOOM\"))
@@ -2459,7 +2457,7 @@ namespace UniMarc
} }
else else
{ {
MessageBox.Show(status, "Error"); UTIL.MsgE(status);
return "Error"; return "Error";
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,5 @@
using SHDocVw; using AR;
using SHDocVw;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -220,12 +221,12 @@ namespace UniMarc
if (TagIndex == 1) if (TagIndex == 1)
{ {
MessageBox.Show("[칸채우기]가 아닌 [마크 작성] 탭에서 저장해주세요!"); UTIL.MsgE("[칸채우기]가 아닌 [마크 작성] 탭에서 저장해주세요!");
return; return;
} }
if (grade == 3 || grade == -1) if (grade == 3 || grade == -1)
{ {
MessageBox.Show("등급을 설정해주세요. (C 이상)"); UTIL.MsgE("등급을 설정해주세요. (C 이상)");
return; return;
} }
@@ -238,7 +239,7 @@ namespace UniMarc
if (!isPass(MarcText)) if (!isPass(MarcText))
{ {
MessageBox.Show("입력된 마크의 상태를 확인해주세요.", "isPass"); UTIL.MsgE("입력된 마크의 상태를 확인해주세요.");
return; return;
} }
@@ -277,7 +278,7 @@ namespace UniMarc
else else
InsertMarc(Table, BookData, orimarc, grade, tag056, date); InsertMarc(Table, BookData, orimarc, grade, tag056, date);
MessageBox.Show("저장되었습니다.", "저장"); UTIL.MsgI("저장되었습니다.");
} }
#region SaveSub #region SaveSub
@@ -431,7 +432,7 @@ namespace UniMarc
} }
if (!isTag) if (!isTag)
{ {
MessageBox.Show(msg + "태그가 없습니다."); UTIL.MsgE(msg + "태그가 없습니다.");
return false; return false;
} }
@@ -445,7 +446,7 @@ namespace UniMarc
} }
if (!is1XX) if (!is1XX)
{ {
MessageBox.Show("기본표목이 존재하지않습니다."); UTIL.MsgE("기본표목이 존재하지않습니다.");
return false; return false;
} }
@@ -463,7 +464,7 @@ namespace UniMarc
if (!is7XX) if (!is7XX)
{ {
MessageBox.Show("부출표목이 존재하지않습니다."); UTIL.MsgE("부출표목이 존재하지않습니다.");
return false; return false;
} }
@@ -572,13 +573,13 @@ namespace UniMarc
} }
else else
{ {
MessageBox.Show(string.Format("SplitError : {0}", string.Join("\t", DataSplit))); UTIL.MsgE(string.Format("SplitError : {0}", string.Join("\t", DataSplit)));
return false; return false;
} }
} }
else else
{ {
MessageBox.Show(string.Format("DataError : {0}", Data)); UTIL.MsgE(string.Format("DataError : {0}", Data));
return false; return false;
} }
} }
@@ -776,7 +777,7 @@ namespace UniMarc
if (pubDate.Length < 3) if (pubDate.Length < 3)
{ {
MessageBox.Show("260c가 인식되지않습니다."); UTIL.MsgE("260c가 인식되지않습니다.");
return "false"; return "false";
} }
else if (pubDate.Length < 5) else if (pubDate.Length < 5)
@@ -805,7 +806,7 @@ namespace UniMarc
if (res == "") if (res == "")
{ {
MessageBox.Show("260a가 인식되지않습니다."); UTIL.MsgE("260a가 인식되지않습니다.");
return "false"; return "false";
} }
else if (res.Length < 3) else if (res.Length < 3)
@@ -2680,7 +2681,7 @@ namespace UniMarc
} }
catch(Exception ex) catch(Exception ex)
{ {
MessageBox.Show("데이터가 올바르지않습니다.\n245d를 확인해주세요.\n" + ex.ToString()); UTIL.MsgE("데이터가 올바르지않습니다.\n245d를 확인해주세요.\n" + ex.ToString());
} }
} }
#region #region

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.CodeDom; using System.CodeDom;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -171,8 +172,8 @@ namespace UniMarc
private void btn_lookup_Click(object sender, EventArgs e) private void btn_lookup_Click(object sender, EventArgs e)
{ {
if (cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } if (cb_api.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; }
if (cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } if (cb_filter.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; }
clear_api(); clear_api();
@@ -199,7 +200,7 @@ namespace UniMarc
} }
// 총 검색 횟수, 일치, 중복 // 총 검색 횟수, 일치, 중복
MessageBox.Show("검색이 완료되었습니다!"); UTIL.MsgI("검색이 완료되었습니다!");
progressBar1.Value = dataGridView1.Rows.Count; progressBar1.Value = dataGridView1.Rows.Count;
dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells["num"]; dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells["num"];
@@ -503,7 +504,7 @@ namespace UniMarc
newstring = String.Format("{0:yyyy/MM/dd}", newstring = String.Format("{0:yyyy/MM/dd}",
DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G")))); DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G"))));
} }
catch (Exception ex) { MessageBox.Show(data); } catch (Exception ex) { UTIL.MsgE(data); }
for (int a = 0; a < insert.Length; a++) for (int a = 0; a < insert.Length; a++)
{ {
@@ -735,7 +736,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(CMcmd); Helper_DB.ExcuteNonQuery(CMcmd);
} }
} }
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
save = true; save = true;
} }
private void btn_Close_Click(object sender, EventArgs e) private void btn_Close_Click(object sender, EventArgs e)
@@ -836,7 +837,7 @@ namespace UniMarc
private void Check_ISBN_FormClosing(object sender, FormClosingEventArgs e) private void Check_ISBN_FormClosing(object sender, FormClosingEventArgs e)
{ {
if (!save) { if (!save) {
if (MessageBox.Show("데이터가 저장되지않았습니다!\n종료하시겠습니까?", "Warning!", MessageBoxButtons.YesNo) == DialogResult.No) { if (UTIL.MsgQ("데이터가 저장되지않았습니다!\n종료하시겠습니까?") == DialogResult.No) {
e.Cancel = true; e.Cancel = true;
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.CodeDom; using System.CodeDom;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -194,8 +195,8 @@ namespace UniMarc
private void btn_lookup_Click(object sender, EventArgs e) private void btn_lookup_Click(object sender, EventArgs e)
{ {
if (cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } if (cb_api.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; }
if (cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; } if (cb_filter.SelectedIndex == -1) { UTIL.MsgE("조건이 선택되지 않았습니다."); return; }
clear_api(); clear_api();
@@ -222,7 +223,7 @@ namespace UniMarc
} }
// 총 검색 횟수, 일치, 중복 // 총 검색 횟수, 일치, 중복
MessageBox.Show("검색이 완료되었습니다!"); UTIL.MsgI("검색이 완료되었습니다!");
progressBar1.Value = bookList.Count; progressBar1.Value = bookList.Count;
bs1.Position = 0; bs1.Position = 0;
@@ -530,7 +531,7 @@ namespace UniMarc
newstring = String.Format("{0:yyyy/MM/dd}", newstring = String.Format("{0:yyyy/MM/dd}",
DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G")))); DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G"))));
} }
catch (Exception ex) { MessageBox.Show(data); } catch (Exception ex) { UTIL.MsgE(data); }
for (int a = 0; a < insert.Length; a++) for (int a = 0; a < insert.Length; a++)
{ {
@@ -768,7 +769,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(CMcmd); Helper_DB.ExcuteNonQuery(CMcmd);
} }
} }
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
save = true; save = true;
} }
private void btn_Close_Click(object sender, EventArgs e) private void btn_Close_Click(object sender, EventArgs e)
@@ -876,7 +877,7 @@ namespace UniMarc
private void Check_ISBN_FormClosing(object sender, FormClosingEventArgs e) private void Check_ISBN_FormClosing(object sender, FormClosingEventArgs e)
{ {
if (!save) { if (!save) {
if (MessageBox.Show("데이터가 저장되지않았습니다!\n종료하시겠습니까?", "Warning!", MessageBoxButtons.YesNo) == DialogResult.No) { if (UTIL.MsgQ("데이터가 저장되지않았습니다!\n종료하시겠습니까?") == DialogResult.No) {
e.Cancel = true; e.Cancel = true;
} }
} }

View File

@@ -1,3 +1,4 @@
using AR;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -24,7 +25,7 @@ namespace UniMarc
{ {
if (_item == null) if (_item == null)
{ {
MessageBox.Show("데이터가 없습니다."); UTIL.MsgE("데이터가 없습니다.");
this.Close(); this.Close();
return; return;
} }

View File

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

View File

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

View File

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

View File

@@ -468,8 +468,7 @@ namespace UniMarc
// Chrome 설치 확인 // Chrome 설치 확인
if (!SeleniumHelper.IsBrowserInstalled()) if (!SeleniumHelper.IsBrowserInstalled())
{ {
MessageBox.Show("Google Chrome / Microsoft Edge 이(가) 설치되어 있지 않습니다. 브라우저를 설치한 후 프로그램을 다시 실행해주세요.", UTIL.MsgE("Google Chrome / Microsoft Edge 이(가) 설치되어 있지 않습니다. 브라우저를 설치한 후 프로그램을 다시 실행해주세요.");
"Chrome 필요", MessageBoxButtons.OK, MessageBoxIcon.Warning);
lblStatus.Text = "WebDriver: 브라우저가 설치되지 않음"; lblStatus.Text = "WebDriver: 브라우저가 설치되지 않음";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
return; return;
@@ -507,8 +506,7 @@ namespace UniMarc
{ {
lblStatus.Text = "WebDriver:드라이버 테스트 실패"; lblStatus.Text = "WebDriver:드라이버 테스트 실패";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
MessageBox.Show("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요.", UTIL.MsgE("Chrome 드라이버 테스트에 실패했습니다. 인터넷 연결을 확인하고 프로그램을 다시 실행해주세요.");
"드라이버 오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
catch (OperationCanceledException) catch (OperationCanceledException)
@@ -521,8 +519,7 @@ namespace UniMarc
{ {
lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
MessageBox.Show($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}", UTIL.MsgE($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}");
"설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
return; return;
} }
} }
@@ -534,8 +531,7 @@ namespace UniMarc
{ {
lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패"; lblStatus.Text = "WebDriver:Chrome 드라이버 테스트 실패";
lblStatus.ForeColor = Color.Red; lblStatus.ForeColor = Color.Red;
MessageBox.Show($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}", UTIL.MsgE($"Chrome 드라이버 테스트 중 오류가 발생했습니다: {ex.Message}");
"설정 오류", MessageBoxButtons.OK, MessageBoxIcon.Error);
} }
} }
#endregion #endregion
@@ -862,7 +858,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.ToString()); UTIL.MsgE(ex.ToString());
} }
} }
} }

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -115,7 +116,7 @@ namespace UniMarc
private void btn_Save_Click(object sender, EventArgs e) private void btn_Save_Click(object sender, EventArgs e)
{ {
if (MessageBox.Show("선택사항을 저장하시겠습니까?", "저장", MessageBoxButtons.YesNo) == DialogResult.No) if (UTIL.MsgQ("선택사항을 저장하시겠습니까?") == DialogResult.No)
return; return;
string table = "Obj_List"; string table = "Obj_List";
@@ -138,7 +139,7 @@ namespace UniMarc
} }
} }
bs1.ResetBindings(false); bs1.ResetBindings(false);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
} }
private void btn_Excel_Click(object sender, EventArgs e) private void btn_Excel_Click(object sender, EventArgs e)
@@ -183,7 +184,7 @@ namespace UniMarc
bool hasProgress = items.Any(i => i.check == "V" && i.state == "진행"); bool hasProgress = items.Any(i => i.check == "V" && i.state == "진행");
if (hasProgress) if (hasProgress)
{ {
MessageBox.Show("체크된 목록이 현재 진행중입니다."); UTIL.MsgE("체크된 목록이 현재 진행중입니다.");
return; return;
} }
@@ -193,7 +194,7 @@ namespace UniMarc
state_Save_Object(item); state_Save_Object(item);
} }
MessageBox.Show("진행처리되었습니다.", "목록진행"); UTIL.MsgI("진행처리되었습니다.");
btn_Lookup_Click(null, null); btn_Lookup_Click(null, null);
} }
@@ -203,7 +204,7 @@ namespace UniMarc
bool hasCompletion = items.Any(i => i.check == "V" && i.state == "완료"); bool hasCompletion = items.Any(i => i.check == "V" && i.state == "완료");
if (hasCompletion) if (hasCompletion)
{ {
MessageBox.Show("체크된 목록은 현재 완료되어있습니다."); UTIL.MsgE("체크된 목록은 현재 완료되어있습니다.");
return; return;
} }
@@ -213,7 +214,7 @@ namespace UniMarc
state_Save_Object(item); state_Save_Object(item);
} }
MessageBox.Show("완료처리되었습니다.", "목록완료"); UTIL.MsgI("완료처리되었습니다.");
btn_Lookup_Click(null, null); btn_Lookup_Click(null, null);
} }
@@ -237,7 +238,7 @@ namespace UniMarc
private void btn_Delete_Click(object sender, EventArgs e) private void btn_Delete_Click(object sender, EventArgs e)
{ {
if (MessageBox.Show("정말로 삭제하시겠습니까?", "삭제경고", MessageBoxButtons.YesNo) == DialogResult.No) { return; } if (UTIL.MsgQ("정말로 삭제하시겠습니까?") == DialogResult.No) { return; }
List<MacListItem> items = bs1.List.Cast<MacListItem>().ToList(); List<MacListItem> items = bs1.List.Cast<MacListItem>().ToList();
foreach (var item in items.Where(i => i.check == "V")) foreach (var item in items.Where(i => i.check == "V"))
@@ -252,7 +253,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(D_cmd); Helper_DB.ExcuteNonQuery(D_cmd);
} }
MessageBox.Show("삭제되었습니다."); UTIL.MsgI("삭제되었습니다.");
btn_Lookup_Click(null, null); btn_Lookup_Click(null, null);
} }
@@ -336,7 +337,7 @@ namespace UniMarc
var item = bs1.Current as MacListItem; var item = bs1.Current as MacListItem;
if (item == null) if (item == null)
{ {
MessageBox.Show("대상을 먼저 선택하세요."); UTIL.MsgE("대상을 먼저 선택하세요.");
return; return;
} }

View File

@@ -90,12 +90,12 @@ namespace UniMarc
if (!CopyCheck(compidx, listName, Today)) if (!CopyCheck(compidx, listName, Today))
{ {
MessageBox.Show("목록이 중복되었습니다! 다시 확인해주세요.", "Error"); UTIL.MsgE("목록이 중복되었습니다! 다시 확인해주세요.");
return; return;
} }
if (listName.isEmpty()) if (listName.isEmpty())
{ {
MessageBox.Show("목록명이 비어있습니다! 다시 확인해주세요.", "Error"); UTIL.MsgE("목록명이 비어있습니다! 다시 확인해주세요.");
return; return;
} }
@@ -151,7 +151,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(InBook_Cmd); Helper_DB.ExcuteNonQuery(InBook_Cmd);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
ml.btn_Lookup_Click(null, null); ml.btn_Lookup_Click(null, null);
} }
@@ -235,15 +235,13 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show("오류가 발생했습니다.\n" + ex.Message, "Error"); UTIL.MsgE("오류가 발생했습니다.\n" + ex.Message);
} }
} }
private void btn_DelRow_Click(object sender, EventArgs e) private void btn_DelRow_Click(object sender, EventArgs e)
{ {
DialogResult result = MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo); if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.No) return;
if (result == DialogResult.No) return;
int row = dataGridView1.CurrentCell.RowIndex; int row = dataGridView1.CurrentCell.RowIndex;

View File

@@ -95,12 +95,12 @@ namespace UniMarc
if (!CopyCheck(compidx, listName, Today)) if (!CopyCheck(compidx, listName, Today))
{ {
MessageBox.Show("목록이 중복되었습니다! 다시 확인해주세요.", "Error"); UTIL.MsgE("목록이 중복되었습니다! 다시 확인해주세요.");
return; return;
} }
if (listName.isEmpty()) if (listName.isEmpty())
{ {
MessageBox.Show("목록명이 비어있습니다! 다시 확인해주세요.", "Error"); UTIL.MsgE("목록명이 비어있습니다! 다시 확인해주세요.");
return; return;
} }
@@ -147,7 +147,7 @@ namespace UniMarc
if (InBook_List.Count == 0) if (InBook_List.Count == 0)
{ {
MessageBox.Show("저장할 데이터가 없습니다."); UTIL.MsgE("저장할 데이터가 없습니다.");
return; return;
} }
@@ -157,7 +157,7 @@ namespace UniMarc
long listIdxLong = db.DB_Send_CMD_Insert_GetIdx(InList_Cmd); long listIdxLong = db.DB_Send_CMD_Insert_GetIdx(InList_Cmd);
if (listIdxLong == -1) if (listIdxLong == -1)
{ {
MessageBox.Show($"목록 저장에 실패했습니다."); UTIL.MsgE("목록 저장에 실패했습니다.");
return; return;
} }
string listIdx = listIdxLong.ToString(); string listIdx = listIdxLong.ToString();
@@ -167,7 +167,7 @@ namespace UniMarc
var rlt = Helper_DB.ExcuteNonQuery(InBook_Cmd); var rlt = Helper_DB.ExcuteNonQuery(InBook_Cmd);
if (rlt.applyCount == 0) if (rlt.applyCount == 0)
{ {
MessageBox.Show($"내역 저장에 실패했습니다.\n{rlt.errorMessage}"); UTIL.MsgE($"내역 저장에 실패했습니다.\n{rlt.errorMessage}");
return; return;
} }
@@ -245,7 +245,7 @@ namespace UniMarc
} }
catch (Exception ex) 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; if (bs1.Current == null) return;
DialogResult result = MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo); DialogResult result = UTIL.MsgQ("삭제하시겠습니까?");
if (result == DialogResult.No) return; if (result == DialogResult.No) return;
bs1.RemoveCurrent(); bs1.RemoveCurrent();

View File

@@ -111,7 +111,7 @@ namespace UniMarc
{ {
if (string.IsNullOrEmpty(tb_ListName.Text)) if (string.IsNullOrEmpty(tb_ListName.Text))
{ {
MessageBox.Show("목록명을 입력하세요."); UTIL.MsgI("목록명을 입력하세요.");
return; return;
} }

View File

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

View File

@@ -423,14 +423,14 @@ namespace UniMarc
{ {
if (SaveRowIdx < 0) if (SaveRowIdx < 0)
{ {
MessageBox.Show("마크가 선택되지않았습니다."); UTIL.MsgE("마크가 선택되지않았습니다.");
return; return;
} }
int TabIndex = tabControl1.SelectedIndex; int TabIndex = tabControl1.SelectedIndex;
int grade = cb_grade.SelectedIndex; int grade = cb_grade.SelectedIndex;
if (TabIndex == 1) if (TabIndex == 1)
{ {
MessageBox.Show("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!"); UTIL.MsgE("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!");
return; return;
} }
//if (grade == 3) //if (grade == 3)
@@ -447,7 +447,7 @@ namespace UniMarc
if (!isPass(BaseText)) if (!isPass(BaseText))
{ {
MessageBox.Show("입력된 마크의 상태를 확인해주세요."); UTIL.MsgE("입력된 마크의 상태를 확인해주세요.");
return; return;
} }
@@ -530,7 +530,7 @@ namespace UniMarc
string[] Sear_col = { Midx, PUB.user.CompanyIdx }; string[] Sear_col = { Midx, PUB.user.CompanyIdx };
if (grid_data[0] == null || grid_data[0] == "") if (grid_data[0] == null || grid_data[0] == "")
{ {
MessageBox.Show("ISBN 데이터가 없습니다."); UTIL.MsgE("ISBN 데이터가 없습니다.");
return; return;
} }
@@ -554,7 +554,7 @@ namespace UniMarc
Midx, List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value.ToString(), PUB.user.CompanyIdx); Midx, List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value.ToString(), PUB.user.CompanyIdx);
PUB.log.Add("MarcUpdate", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, UpdateListIndex)); PUB.log.Add("MarcUpdate", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, UpdateListIndex));
Helper_DB.ExcuteNonQuery(UpdateListIndex); Helper_DB.ExcuteNonQuery(UpdateListIndex);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
} }
#region Save_Click_Sub #region Save_Click_Sub
@@ -642,7 +642,7 @@ namespace UniMarc
if (!isTag) if (!isTag)
{ {
MessageBox.Show(msg + "태그가 없습니다."); UTIL.MsgE(msg + "태그가 없습니다.");
return false; return false;
} }
@@ -658,7 +658,7 @@ namespace UniMarc
if (!is1XX) if (!is1XX)
{ {
MessageBox.Show("기본표목이 존재하지않습니다."); UTIL.MsgE("기본표목이 존재하지않습니다.");
return false; return false;
} }
@@ -676,7 +676,7 @@ namespace UniMarc
if (!is7XX) if (!is7XX)
{ {
MessageBox.Show("부출표목이 존재하지않습니다."); UTIL.MsgE("부출표목이 존재하지않습니다.");
return false; return false;
} }
@@ -1134,7 +1134,7 @@ namespace UniMarc
if (pubDate.Length < 3) if (pubDate.Length < 3)
{ {
MessageBox.Show("260c가 인식되지않습니다."); UTIL.MsgE("260c가 인식되지않습니다.");
return "false"; return "false";
} }
else if (pubDate.Length < 5) else if (pubDate.Length < 5)
@@ -1163,7 +1163,7 @@ namespace UniMarc
if (res == "") if (res == "")
{ {
MessageBox.Show("260a가 인식되지않습니다."); UTIL.MsgE("260a가 인식되지않습니다.");
return "false"; return "false";
} }
else if (res.Length < 3) else if (res.Length < 3)
@@ -1560,7 +1560,7 @@ namespace UniMarc
if (ISBN == "" || ISBN == null) if (ISBN == "" || ISBN == null)
{ {
MessageBox.Show("ISBN이 존재하지않습니다!"); UTIL.MsgE("ISBN이 존재하지않습니다!");
return; return;
} }
@@ -3500,7 +3500,7 @@ namespace UniMarc
} }
catch catch
{ {
MessageBox.Show("데이터가 올바르지않습니다.\n245d를 확인해주세요."); UTIL.MsgE("데이터가 올바르지않습니다.\n245d를 확인해주세요.");
} }
} }
#region #region

View File

@@ -921,7 +921,7 @@ namespace UniMarc
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
var fullmarc = marcEditorControl1.MakeMarcString(); var fullmarc = marcEditorControl1.MakeMarcString();
var fb = new Marc_CopyForm(fullmarc); using (var fb = new Marc_CopyForm(fullmarc))
fb.ShowDialog(); fb.ShowDialog();
} }
@@ -929,7 +929,7 @@ namespace UniMarc
{ {
if (Param.NewMake == false && string.IsNullOrEmpty(Param.ISBN13)) if (Param.NewMake == false && string.IsNullOrEmpty(Param.ISBN13))
{ {
MessageBox.Show("마크가 선택되지않았습니다."); UTIL.MsgE("마크가 선택되지않았습니다.");
return; return;
} }
@@ -941,15 +941,15 @@ namespace UniMarc
var v_isbn = marcEditorControl1.lbl_ISBN.Text.Trim(); var v_isbn = marcEditorControl1.lbl_ISBN.Text.Trim();
// ISBN 중복체크 //// ISBN 중복체크
var exist = DB_Utils.ExistISBN(v_isbn); //var exist = DB_Utils.ExistISBN(v_isbn);
if (exist) //if (exist)
{ //{
if (UTIL.MsgQ($"입력하신 ISBN({v_isbn})은 이미 등록된 데이터가 존재합니다.\n그래도 저장하시겠습니까?") != DialogResult.Yes) // if (UTIL.MsgQ($"입력하신 ISBN({v_isbn})은 이미 등록된 데이터가 존재합니다.\n그래도 저장하시겠습니까?") != DialogResult.Yes)
{ // {
return; // return;
} // }
} //}
this.Param.text008 = marcEditorControl1.text008.Text.Trim(); this.Param.text008 = marcEditorControl1.text008.Text.Trim();
this.Param.tag056 = marcEditorControl1.Tag056(out string with008fullmarcstring); this.Param.tag056 = marcEditorControl1.Tag056(out string with008fullmarcstring);
@@ -996,7 +996,7 @@ namespace UniMarc
string[] Sear_tbl = { "idx", "compidx" }; string[] Sear_tbl = { "idx", "compidx" };
string[] Sear_col = { item.MarcIdx, mCompidx }; 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); 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", " "))); 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 자동 업데이트 // 4. BindingSource 갱신으로 UI 자동 업데이트
bs1.ResetCurrentItem(); bs1.ResetCurrentItem();
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
} }
private void btn_FillBlank_Click(object sender, EventArgs e) private void btn_FillBlank_Click(object sender, EventArgs e)
@@ -1025,7 +1025,7 @@ namespace UniMarc
if (string.IsNullOrEmpty(ISBN)) if (string.IsNullOrEmpty(ISBN))
{ {
MessageBox.Show("ISBN이 존재하지않습니다!"); UTIL.MsgE("ISBN이 존재하지않습니다!");
return; return;
} }

View File

@@ -735,7 +735,7 @@
this.panel5.Controls.Add(this.tableLayoutPanel1); this.panel5.Controls.Add(this.tableLayoutPanel1);
this.panel5.Controls.Add(this.panel6); this.panel5.Controls.Add(this.panel6);
this.panel5.Dock = System.Windows.Forms.DockStyle.Right; 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.Name = "panel5";
this.panel5.Size = new System.Drawing.Size(266, 658); this.panel5.Size = new System.Drawing.Size(266, 658);
this.panel5.TabIndex = 326; this.panel5.TabIndex = 326;
@@ -871,7 +871,7 @@
// //
this.radD.AutoSize = true; 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.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.Name = "radD";
this.radD.Size = new System.Drawing.Size(42, 27); this.radD.Size = new System.Drawing.Size(42, 27);
this.radD.TabIndex = 323; this.radD.TabIndex = 323;
@@ -883,7 +883,7 @@
// //
this.radC.AutoSize = true; 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.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.Name = "radC";
this.radC.Size = new System.Drawing.Size(41, 27); this.radC.Size = new System.Drawing.Size(41, 27);
this.radC.TabIndex = 322; this.radC.TabIndex = 322;
@@ -895,7 +895,7 @@
// //
this.radB.AutoSize = true; 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.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.Name = "radB";
this.radB.Size = new System.Drawing.Size(41, 27); this.radB.Size = new System.Drawing.Size(41, 27);
this.radB.TabIndex = 321; this.radB.TabIndex = 321;
@@ -907,7 +907,7 @@
// //
this.radA.AutoSize = true; 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.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.Name = "radA";
this.radA.Size = new System.Drawing.Size(41, 27); this.radA.Size = new System.Drawing.Size(41, 27);
this.radA.TabIndex = 320; this.radA.TabIndex = 320;
@@ -920,10 +920,10 @@
this.lbl_SaveData.BackColor = System.Drawing.Color.SkyBlue; this.lbl_SaveData.BackColor = System.Drawing.Color.SkyBlue;
this.lbl_SaveData.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); this.lbl_SaveData.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
this.lbl_SaveData.ForeColor = System.Drawing.Color.Black; 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.Multiline = true;
this.lbl_SaveData.Name = "lbl_SaveData"; 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.TabIndex = 319;
this.lbl_SaveData.Text = "[] []"; this.lbl_SaveData.Text = "[] []";
// //
@@ -941,7 +941,7 @@
// //
this.label6.AutoSize = true; this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); 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.Name = "label6";
this.label6.Size = new System.Drawing.Size(31, 12); this.label6.Size = new System.Drawing.Size(31, 12);
this.label6.TabIndex = 223; 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.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.Location = new System.Drawing.Point(555, 0);
this.marcEditorControl1.Name = "marcEditorControl1"; 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; this.marcEditorControl1.TabIndex = 0;
// //
// Marc2 // Marc2
@@ -962,7 +962,7 @@
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.SkyBlue; 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.marcEditorControl1);
this.Controls.Add(this.panel5); this.Controls.Add(this.panel5);
this.Controls.Add(this.panel3); this.Controls.Add(this.panel3);

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -450,11 +451,11 @@ namespace UniMarc
if (SelectAry[0] != compidx) if (SelectAry[0] != compidx)
{ {
MessageBox.Show("해당 마크를 삭제할 권한이 없습니다.", "삭제"); UTIL.MsgE("해당 마크를 삭제할 권한이 없습니다.");
return; return;
} }
if (MessageBox.Show("삭제하시겠습니까?", "삭제!", MessageBoxButtons.OKCancel) == DialogResult.Cancel) if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.Cancel)
return; return;
string[] InsertCol = { string[] InsertCol = {

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -310,11 +311,11 @@ namespace UniMarc
if (compidx != PUB.user.CompanyIdx) if (compidx != PUB.user.CompanyIdx)
{ {
MessageBox.Show("해당 마크를 삭제할 권한이 없습니다.", "삭제"); UTIL.MsgE("해당 마크를 삭제할 권한이 없습니다.");
return; return;
} }
if (MessageBox.Show("삭제하시겠습니까?", "삭제!", MessageBoxButtons.OKCancel) == DialogResult.Cancel) if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.Cancel)
return; return;
string User = PUB.user.UserName; string User = PUB.user.UserName;

View File

@@ -876,7 +876,7 @@ namespace UniMarc
if (pubDate.Length < 3) if (pubDate.Length < 3)
{ {
MessageBox.Show($"260c 값이 없거나 올바르지 않습니다\n\n값:{pubDate}"); UTIL.MsgE($"260c 값이 없거나 올바르지 않습니다\n\n값:{pubDate}");
return null; return null;
} }
else if (pubDate.Length < 5) else if (pubDate.Length < 5)
@@ -905,7 +905,7 @@ namespace UniMarc
if (res == "") if (res == "")
{ {
MessageBox.Show($"260c 값이 없거나 올바르지 않습니다\n\n값:{ContentTag}"); UTIL.MsgE($"260c 값이 없거나 올바르지 않습니다\n\n값:{ContentTag}");
return null; return null;
} }
else if (res.Length < 3) else if (res.Length < 3)
@@ -2987,7 +2987,7 @@ namespace UniMarc
} }
catch catch
{ {
MessageBox.Show("데이터가 올바르지않습니다.\n245d를 확인해주세요."); UTIL.MsgE("데이터가 올바르지않습니다.\n245d를 확인해주세요.");
} }
} }
#region #region

View File

@@ -34,6 +34,7 @@ namespace UniMarc
// Wire up events // Wire up events
this.Controls.Add(marcEditorControl1); this.Controls.Add(marcEditorControl1);
marcEditorControl1.BringToFront();
this.StartPosition = FormStartPosition.CenterScreen; this.StartPosition = FormStartPosition.CenterScreen;

View File

@@ -1,4 +1,5 @@
using Org.BouncyCastle.Pkcs; using AR;
using Org.BouncyCastle.Pkcs;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -262,7 +263,7 @@ namespace UniMarc
if (!tb_URL.Text.Contains("searchResultMarc")) if (!tb_URL.Text.Contains("searchResultMarc"))
{ {
MessageBox.Show("코리스 마크가 있는곳으로 이동해주세요!"); UTIL.MsgE("코리스 마크가 있는곳으로 이동해주세요!");
return; return;
} }
SearchResultMarc(); SearchResultMarc();
@@ -319,7 +320,7 @@ namespace UniMarc
progressBar1.Value += 1; progressBar1.Value += 1;
} }
MessageBox.Show("완료되었습니다!"); UTIL.MsgI("완료되었습니다!");
this.DialogResult = DialogResult.OK; this.DialogResult = DialogResult.OK;
this.Close(); this.Close();
} }

View File

@@ -478,11 +478,11 @@ namespace UniMarc
string msg = string.Format("『{0}』 태그를 변경하시겠습니까?", tb_SearchTag.Text); 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) if (tb_SearchTag.Text.Length <= 3)
{ {
MessageBox.Show("변경할 태그 검색을 양식에 맞춰주세요. ex) 245a"); UTIL.MsgE("변경할 태그 검색을 양식에 맞춰주세요. ex) 245a");
return; return;
} }
@@ -571,7 +571,7 @@ namespace UniMarc
*/ */
#endregion #endregion
MessageBox.Show("변경되었습니다!", "태그변경"); UTIL.MsgI("변경되었습니다!");
} }
/// <summary> /// <summary>
@@ -653,7 +653,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(Ucmd); Helper_DB.ExcuteNonQuery(Ucmd);
} }
MessageBox.Show("저장되었습니다."); UTIL.MsgI("저장되었습니다.");
mk_Grid(btn_Select_List.Text, this.date); mk_Grid(btn_Select_List.Text, this.date);
} }
@@ -771,7 +771,7 @@ namespace UniMarc
FileName = saveFileDialog.FileName; FileName = saveFileDialog.FileName;
System.IO.File.WriteAllText(FileName, Marc_data, Encoding.Unicode); 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(); String_Text st = new String_Text();
dataGridView1.Rows[i].Cells["marc"].Value = st.made_Ori_marc(tChange); dataGridView1.Rows[i].Cells["marc"].Value = st.made_Ori_marc(tChange);
} }
MessageBox.Show("태그 일괄 적용 완료!"); UTIL.MsgI("태그 일괄 적용 완료!");
} }
private List<int> GetSelectGridIDX() private List<int> GetSelectGridIDX()
{ {
@@ -884,7 +884,7 @@ namespace UniMarc
} }
dataGridView1.Rows[i].Cells["marc"].Value = st.made_Ori_marc(tNewMarc); 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) if (dataGridView1.Rows[row].Cells["marc"].Value == null)
{ {
MessageBox.Show("저장된 마크가 없습니다!"); UTIL.MsgE("저장된 마크가 없습니다!");
return; return;
} }
if (dataGridView1.Rows[row].Cells["marc"].Value.ToString() == "") if (dataGridView1.Rows[row].Cells["marc"].Value.ToString() == "")
{ {
MessageBox.Show("저장된 마크가 없습니다!"); UTIL.MsgE("저장된 마크가 없습니다!");
return; return;
} }
@@ -1176,7 +1176,7 @@ namespace UniMarc
{ {
if (cb_TextFont.SelectedIndex < 0) if (cb_TextFont.SelectedIndex < 0)
{ {
MessageBox.Show("글자체를 선택해주세요!"); UTIL.MsgE("글자체를 선택해주세요!");
return; return;
} }
Cnt = 0; Cnt = 0;
@@ -1614,7 +1614,7 @@ namespace UniMarc
string[] parts = input.Split('~', '-'); string[] parts = input.Split('~', '-');
if (parts.Length != 2) if (parts.Length != 2)
{ {
MessageBox.Show("올바른 형식으로 입력해주세요.\n예) 1~100", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); UTIL.MsgE("올바른 형식으로 입력해주세요.\n예) 1~100");
return; return;
} }
@@ -1624,13 +1624,13 @@ namespace UniMarc
// 범위 검증 // 범위 검증
if (startRow < 1 || endRow < 1) if (startRow < 1 || endRow < 1)
{ {
MessageBox.Show("행 번호는 1 이상이어야 합니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); UTIL.MsgE("행 번호는 1 이상이어야 합니다.");
return; return;
} }
if (startRow > endRow) if (startRow > endRow)
{ {
MessageBox.Show("시작 행 번호가 끝 행 번호보다 클 수 없습니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); UTIL.MsgE("시작 행 번호가 끝 행 번호보다 클 수 없습니다.");
return; return;
} }
@@ -1641,14 +1641,14 @@ namespace UniMarc
// 범위가 데이터 범위를 벗어나는지 확인 // 범위가 데이터 범위를 벗어나는지 확인
if (endIndex >= bs1.Count) if (endIndex >= bs1.Count)
{ {
MessageBox.Show($"입력한 범위가 전체 데이터 수({bs1.Count})를 초과합니다.", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); UTIL.MsgE($"입력한 범위가 전체 데이터 수({bs1.Count})를 초과합니다.");
return; return;
} }
// 삭제 확인 // 삭제 확인
string confirmMsg = string.Format("{0}번부터 {1}번까지 총 {2}개의 행을 삭제하시겠습니까?", string confirmMsg = string.Format("{0}번부터 {1}번까지 총 {2}개의 행을 삭제하시겠습니까?",
startRow, endRow, endRow - startRow + 1); startRow, endRow, endRow - startRow + 1);
if (MessageBox.Show(confirmMsg, "행 삭제 확인", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) if (UTIL.MsgQ(confirmMsg) == DialogResult.No)
return; return;
// 뒤에서부터 삭제 (인덱스가 꼬이지 않도록) // 뒤에서부터 삭제 (인덱스가 꼬이지 않도록)
@@ -1660,15 +1660,15 @@ namespace UniMarc
} }
} }
MessageBox.Show("삭제가 완료되었습니다.", "완료", MessageBoxButtons.OK, MessageBoxIcon.Information); UTIL.MsgI("삭제가 완료되었습니다.");
} }
catch (FormatException) catch (FormatException)
{ {
MessageBox.Show("숫자 형식으로 입력해주세요.\n예) 1~100", "입력 오류", MessageBoxButtons.OK, MessageBoxIcon.Warning); UTIL.MsgE("숫자 형식으로 입력해주세요.\n예) 1~100");
} }
catch (Exception ex) 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)) if (string.IsNullOrEmpty(ISBN))
{ {
MessageBox.Show("ISBN이 존재하지않습니다!"); UTIL.MsgE("ISBN이 존재하지않습니다!");
return; return;
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -120,7 +121,7 @@ namespace UniMarc
} }
catch (Exception e) catch (Exception e)
{ {
MessageBox.Show(e.ToString()); UTIL.MsgE(e.ToString());
} }
} }
#region MK_Excel_Sub #region MK_Excel_Sub

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -234,7 +235,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
MessageBox.Show(tb_ListName.Text + "가 성공적으로 수정되었습니다!", "수정완료"); UTIL.MsgI(tb_ListName.Text + "가 성공적으로 수정되었습니다!");
} }
else else
{ {
@@ -257,7 +258,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(Incmd); Helper_DB.ExcuteNonQuery(Incmd);
MessageBox.Show(tb_ListName.Text + "가 성공적으로 저장되었습니다!", "저장완료"); UTIL.MsgI(tb_ListName.Text + "가 성공적으로 저장되었습니다!");
} }
} }

View File

@@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
using AR;
namespace UniMarc namespace UniMarc
{ {
@@ -490,7 +491,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(cmd); Helper_DB.ExcuteNonQuery(cmd);
InputBookData(SearchBookTag); InputBookData(SearchBookTag);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
mp.dataGridView1.Rows[row].Cells["book_name"].Value = BookName; mp.dataGridView1.Rows[row].Cells["book_name"].Value = BookName;
mp.dataGridView1.Rows[row].Cells["marc"].Value = oriMarc; 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); string Ucmd = db.More_Update(Table, Update_Col, Update_data, Search_Col, Search_data);
Helper_DB.ExcuteNonQuery(Ucmd); Helper_DB.ExcuteNonQuery(Ucmd);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
si.dataGridView1.Rows[row].Cells["Marc"].Value = oriMarc; si.dataGridView1.Rows[row].Cells["Marc"].Value = oriMarc;
si.dataGridView1.Rows[row].Cells["User"].Value = user; 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); string cmd = db.More_Update(Table, Update_col, Update_Data, Search_col, Search_Data);
Helper_DB.ExcuteNonQuery(cmd); Helper_DB.ExcuteNonQuery(cmd);
MessageBox.Show("적용되었습니다!"); UTIL.MsgI("적용되었습니다!");
} }
private void richTextBox1_KeyDown(object sender, KeyEventArgs e) private void richTextBox1_KeyDown(object sender, KeyEventArgs e)

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -111,14 +112,14 @@ namespace UniMarc
if (CheckRow.Length != 1) if (CheckRow.Length != 1)
{ {
MessageBox.Show("처리할 목록 [1]개 선택하여 주세요."); UTIL.MsgE("처리할 목록 [1]개 선택하여 주세요.");
return; return;
} }
int row = CheckRow[0]; int row = CheckRow[0];
string msg = string.Format("【{0}】을(를) {1} 하시겠습니까?", dataGridView1.Rows[row].Cells["list_name"].Value.ToString(), name); 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; return;
string[] search_col = { "idx", "work_list", "date" }; string[] search_col = { "idx", "work_list", "date" };
@@ -146,7 +147,7 @@ namespace UniMarc
if (CheckRow.Length != 1) if (CheckRow.Length != 1)
{ {
MessageBox.Show("수정할 목록 [1]개 선택하여 주세요."); UTIL.MsgE("수정할 목록 [1]개 선택하여 주세요.");
return; return;
} }
@@ -165,7 +166,7 @@ namespace UniMarc
if (CheckRow.Length < 2) if (CheckRow.Length < 2)
{ {
MessageBox.Show("병합할 목록 [2]개이상 선택하여 주세요."); UTIL.MsgE("병합할 목록 [2]개이상 선택하여 주세요.");
return; return;
} }
@@ -194,14 +195,14 @@ namespace UniMarc
if (CheckRow.Length != 1) if (CheckRow.Length != 1)
{ {
MessageBox.Show("삭제할 목록 [1]개 선택하여 주세요."); UTIL.MsgE("삭제할 목록 [1]개 선택하여 주세요.");
return; return;
} }
int row = CheckRow[0]; int row = CheckRow[0];
string msg = string.Format("【{0}】을(를) 삭제하시겠습니까?", dataGridView1.Rows[row].Cells["list_name"].Value.ToString()); 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; return;
string idx = dataGridView1.Rows[row].Cells["idx"].Value.ToString(); 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); cmd = db.DB_Delete_No_Limit("Specs_Marc", "compidx", PUB.user.CompanyIdx, search_col, search_data);
Helper_DB.ExcuteNonQuery(cmd); Helper_DB.ExcuteNonQuery(cmd);
MessageBox.Show("삭제되었습니다."); UTIL.MsgI("삭제되었습니다.");
btn_Search_Click(null, null); btn_Search_Click(null, null);
} }
@@ -257,7 +258,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.ToString()); UTIL.MsgE(ex.ToString());
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -93,7 +94,7 @@ namespace UniMarc
string[] search_data = { IDX }; string[] search_data = { IDX };
string cmd = db.More_Update("Specs_List", update_col, update_data, search_col, search_data); string cmd = db.More_Update("Specs_List", update_col, update_data, search_col, search_data);
Helper_DB.ExcuteNonQuery(cmd); Helper_DB.ExcuteNonQuery(cmd);
MessageBox.Show("저장완료되었습니다."); UTIL.MsgI("저장완료되었습니다.");
sub.btn_Search_Click(null, null); sub.btn_Search_Click(null, null);
this.Close(); this.Close();
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -53,7 +54,7 @@ namespace UniMarc
private void btn_Morge_Click(object sender, EventArgs e) private void btn_Morge_Click(object sender, EventArgs e)
{ {
if (tb_ListName.Text == "") { if (tb_ListName.Text == "") {
MessageBox.Show("저장될 목록명이 비어있습니다.", "Error"); UTIL.MsgE("저장될 목록명이 비어있습니다.");
return; return;
} }
string MorgeUser = PUB.user.UserName; string MorgeUser = PUB.user.UserName;
@@ -90,7 +91,7 @@ namespace UniMarc
} }
} }
MessageBox.Show("병합되었습니다."); UTIL.MsgI("병합되었습니다.");
sub.btn_Search_Click(null, null); sub.btn_Search_Click(null, null);
} }

View File

@@ -327,7 +327,7 @@ namespace UniMarc
if (Author[0].Length < 1) if (Author[0].Length < 1)
{ {
MessageBox.Show(row[a] + "번째의 저자를 확인해주세요. \n (100a, 110a, 111a 중 1개 필수)"); UTIL.MsgE("저장할 목록명이 비어있습니다." + row[a] + "번째의 저자를 확인해주세요. \n (100a, 110a, 111a 중 1개 필수)");
return; return;
} }

View File

@@ -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); 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); insert_marc_data[14] = st.made_Ori_marc(tmp_ViewMarc);
if (Author[0].Length < 1) UTIL.MsgE( $"{a}번 줄,인덱스({dr.ListIdx})의 저자를 확인해주세요(ISBN:{dr.ISBN13}). \n (100a, 110a, 111a 중 1개 필수)");
{
MessageBox.Show( $"{a}번 줄,인덱스({dr.ListIdx})의 저자를 확인해주세요(ISBN:{dr.ISBN13}). \n (100a, 110a, 111a 중 1개 필수)");
return;
}
Author[0] = Regex.Replace(Author[0], @"[^a-zA-Z0-9가-힣_]", "", RegexOptions.Singleline); Author[0] = Regex.Replace(Author[0], @"[^a-zA-Z0-9가-힣_]", "", RegexOptions.Singleline);
Author[1] = st.RemoveWordInBracket(Author[1]); Author[1] = st.RemoveWordInBracket(Author[1]);

View File

@@ -1,4 +1,5 @@
using Microsoft.Office.Interop.Excel; using AR;
using Microsoft.Office.Interop.Excel;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
@@ -506,7 +507,7 @@ namespace UniMarc
return; return;
if (dataGridView1.Rows[row].Cells["marc2"].Value.ToString() == "") if (dataGridView1.Rows[row].Cells["marc2"].Value.ToString() == "")
{ {
MessageBox.Show("이전에 저장된 MARC 데이터가 없습니다."); UTIL.MsgE("이전에 저장된 MARC 데이터가 없습니다.");
return; return;
} }
Marc_Plan_Sub_MarcEdit me = new Marc_Plan_Sub_MarcEdit(this); Marc_Plan_Sub_MarcEdit me = new Marc_Plan_Sub_MarcEdit(this);

View File

@@ -434,7 +434,7 @@ namespace UniMarc
if (dataList.Any() == false) if (dataList.Any() == false)
{ {
// UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다"); // UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
MessageBox.Show("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다"); UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
} }
else me.OpenFillBlank(dataList, currentBoundItem.ISBN); else me.OpenFillBlank(dataList, currentBoundItem.ISBN);
}; };
@@ -579,7 +579,7 @@ namespace UniMarc
if (string.IsNullOrEmpty(item.marc2)) if (string.IsNullOrEmpty(item.marc2))
{ {
MessageBox.Show("이전에 저장된 MARC 데이터가 없습니다."); UTIL.MsgE("이전에 저장된 MARC 데이터가 없습니다.");
return; return;
} }
@@ -670,7 +670,7 @@ namespace UniMarc
if (dataList.Any() == false) if (dataList.Any() == false)
{ {
// UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다"); // UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
MessageBox.Show("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다"); UTIL.MsgE("비마크 데이터가 존재하지 않아 기능을 사용할 수 없습니다");
} }
else me.OpenFillBlank(dataList, currentBoundItem.ISBN); else me.OpenFillBlank(dataList, currentBoundItem.ISBN);
}; };

View File

@@ -12,6 +12,7 @@ using System.IO;
using System.Xml.Linq; using System.Xml.Linq;
using System.Data.SqlTypes; using System.Data.SqlTypes;
using Microsoft.VisualBasic.Devices; using Microsoft.VisualBasic.Devices;
using AR;
namespace UniMarc namespace UniMarc
{ {
@@ -172,7 +173,7 @@ namespace UniMarc
//TargetGrid.Rows[a].Cells["marc"].Value = macro.MacroMarc(ViewMarcArray[count], idxArray, TagArray, RunCode); //TargetGrid.Rows[a].Cells["marc"].Value = macro.MacroMarc(ViewMarcArray[count], idxArray, TagArray, RunCode);
count++; count++;
} }
MessageBox.Show("적용되었습니다!"); UTIL.MsgI("적용되었습니다!");
} }
private void btn_AddList_Click(object sender, EventArgs e) private void btn_AddList_Click(object sender, EventArgs e)
@@ -195,7 +196,7 @@ namespace UniMarc
string Table = "Comp_SaveMacro"; 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) 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; return;
} }
string[] Insert_Tbl = { "compidx", "listname", "user", "Macroidx" }; string[] Insert_Tbl = { "compidx", "listname", "user", "Macroidx" };
@@ -212,7 +213,7 @@ namespace UniMarc
{ {
if (cb_SearchList.SelectedIndex < 0) if (cb_SearchList.SelectedIndex < 0)
{ {
MessageBox.Show("선택된 목록이 없습니다!"); UTIL.MsgE("선택된 목록이 없습니다!");
return; return;
} }
@@ -238,7 +239,7 @@ namespace UniMarc
if (db.DB_Send_CMD_Search(db.More_DB_Search(Table, Search_T, Search_C)).Length < 2) if (db.DB_Send_CMD_Search(db.More_DB_Search(Table, Search_T, Search_C)).Length < 2)
{ {
MessageBox.Show("선택된 목록이 없습니다!"); UTIL.MsgE("선택된 목록이 없습니다!");
return; return;
} }
@@ -246,12 +247,12 @@ namespace UniMarc
string[] Update_C = { MacroIndex }; string[] Update_C = { MacroIndex };
Helper_DB.ExcuteNonQuery(db.More_Update(Table, Update_T, Update_C, Search_T, Search_C)); 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) private void btn_ListRemove_Click(object sender, EventArgs e)
{ {
if (DialogResult.Yes != MessageBox.Show("현재 목록을 삭제하시겠습니까?", "목록 삭제", MessageBoxButtons.YesNo)) if (DialogResult.Yes != UTIL.MsgQ("현재 목록을 삭제하시겠습니까?"))
return; return;
string compidx = PUB.user.CompanyIdx; 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) if (db.DB_Send_CMD_Search(db.More_DB_Search(Table, Search_T, Search_C)).Length < 2)
{ {
MessageBox.Show("선택된 목록이 없습니다!"); UTIL.MsgE("선택된 목록이 없습니다!");
return; return;
} }
Helper_DB.ExcuteNonQuery(db.DB_Delete_More_term(Table, "compidx", compidx, Search_T, Search_C)); Helper_DB.ExcuteNonQuery(db.DB_Delete_More_term(Table, "compidx", compidx, Search_T, Search_C));
MessageBox.Show("삭제되었습니다!"); UTIL.MsgI("삭제되었습니다!");
Refresh_Macro_List(); Refresh_Macro_List();
} }

View File

@@ -8,6 +8,7 @@ using System.Text;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using AR;
using AuthorSymbol; using AuthorSymbol;
namespace UniMarc namespace UniMarc
@@ -42,14 +43,14 @@ namespace UniMarc
if (tb_author.Text == "") if (tb_author.Text == "")
{ {
MessageBox.Show("대표 저자를 입력해주세요!"); UTIL.MsgE("대표 저자를 입력해주세요!");
return; return;
} }
if (cb_symbolK.Text == "커터 샌본 저자기호표") if (cb_symbolK.Text == "커터 샌본 저자기호표")
{ {
if (!CheckEng(res)) if (!CheckEng(res))
{ {
MessageBox.Show("영어만 입력해주세요!"); UTIL.MsgE("영어만 입력해주세요!");
return; return;
} }
} }
@@ -58,7 +59,7 @@ namespace UniMarc
{ {
if (!CheckKor(res)) if (!CheckKor(res))
{ {
MessageBox.Show("한글만 입력해주세요!"); UTIL.MsgE("한글만 입력해주세요!");
return; return;
} }
} }

View File

@@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using AR;
namespace UniMarc namespace UniMarc
{ {
@@ -187,7 +188,7 @@ namespace UniMarc
string cmd = InCmd + UpCmd; string cmd = InCmd + UpCmd;
Helper_DB.ExcuteNonQuery(cmd); Helper_DB.ExcuteNonQuery(cmd);
MessageBox.Show("저장완료!"); UTIL.MsgI("저장완료!");
main.SetBtnName(); main.SetBtnName();
} }

View File

@@ -215,21 +215,21 @@ namespace UniMarc
{ {
if (!System.Text.RegularExpressions.Regex.IsMatch(tb_ID.Text, @"^[a-zA-Z0-9]")) if (!System.Text.RegularExpressions.Regex.IsMatch(tb_ID.Text, @"^[a-zA-Z0-9]"))
{ {
MessageBox.Show("영어와 숫자 조합으로 작성해주세요!"); UTIL.MsgE("영어와 숫자 조합으로 작성해주세요!");
mOverlap = false; mOverlap = false;
return; return;
} }
string cmd = mDB.DB_Search(Table_User, "id", tb_ID.Text); string cmd = mDB.DB_Search(Table_User, "id", tb_ID.Text);
string db_res = mDB.DB_Send_CMD_Search(cmd); string db_res = mDB.DB_Send_CMD_Search(cmd);
if (db_res == "") { MessageBox.Show("사용가능한 아이디입니다. [" + tb_ID.Text + "]"); mOverlap = true; } if (db_res == "") { UTIL.MsgI("사용가능한 아이디입니다. [" + tb_ID.Text + "]"); mOverlap = true; }
else { MessageBox.Show("중복된 아이디입니다. [" + tb_ID.Text + "]"); mOverlap = false; } else { UTIL.MsgE("중복된 아이디입니다. [" + tb_ID.Text + "]"); mOverlap = false; }
} }
private void btn_Save_Click(object sender, EventArgs e) private void btn_Save_Click(object sender, EventArgs e)
{ {
if (tb_ID.Text == "" || tb_PW.Text == "" || tb_Name.Text == "") if (tb_ID.Text == "" || tb_PW.Text == "" || tb_Name.Text == "")
{ {
MessageBox.Show("성명 / 아이디 / 비밀번호 를 채워주세요."); UTIL.MsgE("성명 / 아이디 / 비밀번호 를 채워주세요.");
return; return;
} }
@@ -237,7 +237,7 @@ namespace UniMarc
{ {
if (!mOverlap) if (!mOverlap)
{ {
MessageBox.Show("아이디 중복확인을 해주세요."); UTIL.MsgE("아이디 중복확인을 해주세요.");
return; return;
} }
} }
@@ -264,7 +264,7 @@ namespace UniMarc
tCmd = string.Format("INSERT INTO `User_ShortCut` (`id`) VALUES ('{0}')", tb_ID.Text); tCmd = string.Format("INSERT INTO `User_ShortCut` (`id`) VALUES ('{0}')", tb_ID.Text);
Helper_DB.ExcuteNonQuery(tCmd); Helper_DB.ExcuteNonQuery(tCmd);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
main.isAccess(); main.isAccess();
RefreshList(); RefreshList();
} }
@@ -272,7 +272,7 @@ namespace UniMarc
{ {
if (dataGridView1.CurrentCell == null || dataGridView1.CurrentCell.RowIndex < 0 || dataGridView1.SelectedRows.Count == 0) if (dataGridView1.CurrentCell == null || dataGridView1.CurrentCell.RowIndex < 0 || dataGridView1.SelectedRows.Count == 0)
{ {
MessageBox.Show("삭제할 행을 선택해 주세요."); UTIL.MsgE("삭제할 행을 선택해 주세요.");
return; return;
} }
string tText = string.Format("{0} 를 수정 하시겠습니까?", dataGridView1.SelectedRows[0].Cells["ID"].Value.ToString()); 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 == "") if (tb_ID.Text == "" || tb_PW.Text == "" || tb_Name.Text == "")
{ {
MessageBox.Show("성명 / 아이디 / 비밀번호 를 채워주세요."); UTIL.MsgE("성명 / 아이디 / 비밀번호 를 채워주세요.");
return; return;
} }
@@ -290,7 +290,7 @@ namespace UniMarc
{ {
if (!mOverlap) if (!mOverlap)
{ {
MessageBox.Show("아이디 중복확인을 해주세요."); UTIL.MsgE("아이디 중복확인을 해주세요.");
return; return;
} }
} }
@@ -318,7 +318,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(cmd); Helper_DB.ExcuteNonQuery(cmd);
cmd = mDB.More_Update("User_Data", tAccess_Col, tAccess_Data, tSearch_Col, tSearch_Data); cmd = mDB.More_Update("User_Data", tAccess_Col, tAccess_Data, tSearch_Col, tSearch_Data);
Helper_DB.ExcuteNonQuery(cmd); Helper_DB.ExcuteNonQuery(cmd);
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
RefreshList(); RefreshList();
} }
} }
@@ -360,7 +360,7 @@ namespace UniMarc
{ {
if (dataGridView1.CurrentCell == null || dataGridView1.CurrentCell.RowIndex < 0 || dataGridView1.SelectedRows.Count == 0) if (dataGridView1.CurrentCell == null || dataGridView1.CurrentCell.RowIndex < 0 || dataGridView1.SelectedRows.Count == 0)
{ {
MessageBox.Show("삭제할 행을 선택해 주세요."); UTIL.MsgE("삭제할 행을 선택해 주세요.");
return; return;
} }
string tText = string.Format("{0} 를 삭제 하시겠습니까?", dataGridView1.SelectedRows[0].Cells["ID"].Value.ToString()); string tText = string.Format("{0} 를 삭제 하시겠습니까?", dataGridView1.SelectedRows[0].Cells["ID"].Value.ToString());
@@ -375,7 +375,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(D_cmd); Helper_DB.ExcuteNonQuery(D_cmd);
D_cmd = mDB.DB_Delete("User_Data", "ID", tID, "PW", tPW); D_cmd = mDB.DB_Delete("User_Data", "ID", tID, "PW", tPW);
Helper_DB.ExcuteNonQuery(D_cmd); Helper_DB.ExcuteNonQuery(D_cmd);
MessageBox.Show("삭제 완료되었습니다!"); UTIL.MsgI("삭제 완료되었습니다!");
RefreshList(); RefreshList();
} }
} }

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -244,13 +245,13 @@ namespace UniMarc
{ {
string Incmd = db.DB_INSERT("Purchase", Insert_Table, Insert_Data); string Incmd = db.DB_INSERT("Purchase", Insert_Table, Insert_Data);
Helper_DB.ExcuteNonQuery(Incmd); Helper_DB.ExcuteNonQuery(Incmd);
MessageBox.Show(tb_sangho.Text + " 저장 완료"); UTIL.MsgI(tb_sangho.Text + " 저장 완료");
} }
else else
{ {
string U_cmd = db.More_Update(Table, Insert_Table, Insert_Data, Search_Table, Search_Data); string U_cmd = db.More_Update(Table, Insert_Table, Insert_Data, Search_Table, Search_Data);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
MessageBox.Show(tb_sangho.Text + " 수정 완료"); UTIL.MsgI(tb_sangho.Text + " 수정 완료");
} }
} }
private void btn_Delete_Click(object sender, EventArgs e) // 삭제 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 sangho = dataGridView1.Rows[row].Cells["sangho"].Value.ToString();
string D_cmd = db.DB_Delete("Purchase", "idx", idx, "sangho", sangho); string D_cmd = db.DB_Delete("Purchase", "idx", idx, "sangho", sangho);
Helper_DB.ExcuteNonQuery(D_cmd); Helper_DB.ExcuteNonQuery(D_cmd);
MessageBox.Show(sangho + " 삭제 완료"); UTIL.MsgI(sangho + " 삭제 완료");
} }
private void tb_memo_Click(object sender, EventArgs e) private void tb_memo_Click(object sender, EventArgs e)
{ {
@@ -284,7 +285,7 @@ namespace UniMarc
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(ex.Message); UTIL.MsgE(ex.Message);
} }
} }
private void btn_close_Click(object sender, EventArgs e) private void btn_close_Click(object sender, EventArgs e)
@@ -380,7 +381,9 @@ namespace UniMarc
"word", word, "word", word,
"persent", persent); "persent", persent);
MessageBox.Show(cmd); // MessageBox.Show(cmd); // Debugging code, commenting out or replacing
// UTIL.MsgI(cmd);
Helper_DB.ExcuteNonQuery(cmd); Helper_DB.ExcuteNonQuery(cmd);
dgv_IndexWord.Rows.RemoveAt(row); dgv_IndexWord.Rows.RemoveAt(row);

View File

@@ -164,22 +164,22 @@ namespace UniMarc
if (tb_sangho.Text == "") if (tb_sangho.Text == "")
{ {
MessageBox.Show("업체명이 비어있습니다."); UTIL.MsgE("업체명이 비어있습니다.");
return; return;
} }
if (cb_gubun1.SelectedIndex == 0) if (cb_gubun1.SelectedIndex == 0)
{ {
MessageBox.Show("구분을 선택해주세요."); UTIL.MsgE("구분을 선택해주세요.");
return; return;
} }
if (cb_gubun2.SelectedIndex == 0) if (cb_gubun2.SelectedIndex == 0)
{ {
MessageBox.Show("구분을 선택해주세요."); UTIL.MsgE("구분을 선택해주세요.");
return; return;
} }
if (cb_gubun2.SelectedItem.ToString() == "학교" && cb_dlsArea.SelectedIndex < 0 && tb_id.Text != "") if (cb_gubun2.SelectedItem.ToString() == "학교" && cb_dlsArea.SelectedIndex < 0 && tb_id.Text != "")
{ {
MessageBox.Show("DLS 지역을 선택해주세요."); UTIL.MsgE("DLS 지역을 선택해주세요.");
return; return;
} }
//string CopyCheckCMD = string.Format("SELECT {0} FROM {1} WHERE {0} = \"{2}\";", "`c_sangho`", "`Client`", tb_sangho.Text); //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); bool isCopy = Check_Data(tb_sangho.Text);
if (isCopy) if (isCopy)
{ {
MessageBox.Show("중복된 상호명이 존재합니다!"); UTIL.MsgE("중복된 상호명이 존재합니다!");
return; return;
} }
@@ -213,13 +213,13 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(Incmd); Helper_DB.ExcuteNonQuery(Incmd);
SearchList(); 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) private void btn_save_Click(object sender, EventArgs e)
{ {
if (dv1.SelectedRows.Count == 0) if (dv1.SelectedRows.Count == 0)
{ {
MessageBox.Show("수정 할 업체를 선택해 주세요."); UTIL.MsgE("수정 할 업체를 선택해 주세요.");
return; return;
} }
int tRowIndex = dv1.SelectedRows[0].Index; int tRowIndex = dv1.SelectedRows[0].Index;
@@ -229,22 +229,22 @@ namespace UniMarc
if (UTIL.MsgQ(tText) != DialogResult.Yes) return; if (UTIL.MsgQ(tText) != DialogResult.Yes) return;
if (tb_sangho.Text == "") if (tb_sangho.Text == "")
{ {
MessageBox.Show("업체명이 비어있습니다."); UTIL.MsgE("업체명이 비어있습니다.");
return; return;
} }
if (cb_gubun1.SelectedIndex == 0) if (cb_gubun1.SelectedIndex == 0)
{ {
MessageBox.Show("구분을 선택해주세요."); UTIL.MsgE("구분을 선택해주세요.");
return; return;
} }
if (cb_gubun2.SelectedIndex == 0) if (cb_gubun2.SelectedIndex == 0)
{ {
MessageBox.Show("구분을 선택해주세요."); UTIL.MsgE("구분을 선택해주세요.");
return; return;
} }
if (cb_gubun2.SelectedItem.ToString() == "학교" && cb_dlsArea.SelectedIndex < 0 && tb_id.Text != "") if (cb_gubun2.SelectedItem.ToString() == "학교" && cb_dlsArea.SelectedIndex < 0 && tb_id.Text != "")
{ {
MessageBox.Show("DLS 지역을 선택해주세요."); UTIL.MsgE("DLS 지역을 선택해주세요.");
return; return;
} }
//string CopyCheckCMD = string.Format("SELECT {0} FROM {1} WHERE {0} = \"{2}\";", "`c_sangho`", "`Client`", tb_sangho.Text); //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); string U_cmd = db.More_Update("Client", editcol, editname, searchcol, searchname);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
MessageBox.Show(tb_sangho.Text + "가 성공적으로 수정되었습니다."); UTIL.MsgI(tb_sangho.Text + "가 성공적으로 수정되었습니다.");
//} //}
//else //else
//{ //{
@@ -297,7 +297,7 @@ namespace UniMarc
// Helper_DB.ExcuteNonQuery(Incmd); // Helper_DB.ExcuteNonQuery(Incmd);
// MessageBox.Show(string.Format("[{0}]가 성공적으로 저장되었습니다.", tb_sangho.Text)); // UTIL.MsgI(string.Format("[{0}]가 성공적으로 저장되었습니다.", tb_sangho.Text));
//} //}
SearchList(); SearchList();
dv1.Rows[RowIndex].Selected = true; dv1.Rows[RowIndex].Selected = true;
@@ -315,7 +315,7 @@ namespace UniMarc
Helper_DB.ExcuteNonQuery(D_cmd); Helper_DB.ExcuteNonQuery(D_cmd);
Made_Grid(); Made_Grid();
SearchList(); SearchList();
MessageBox.Show("삭제되었습니다."); UTIL.MsgI("삭제되었습니다.");
} }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -91,7 +92,7 @@ namespace UniMarc
string[] search_name = { PUB.user.CompanyIdx, tb_sangho.Text }; string[] search_name = { PUB.user.CompanyIdx, tb_sangho.Text };
string U_cmd = db.More_Update("Comp", Area, temp, search_col, search_name); string U_cmd = db.More_Update("Comp", Area, temp, search_col, search_name);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
MessageBox.Show("저장되었습니다."); UTIL.MsgI("저장되었습니다.");
} }
private void tb_port_KeyPress(object sender, KeyPressEventArgs e) private void tb_port_KeyPress(object sender, KeyPressEventArgs e)
{ {

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -113,12 +114,12 @@ namespace UniMarc
cb_end_hour.SelectedIndex = tmp; cb_end_hour.SelectedIndex = tmp;
} }
string start_time = Regex.Replace(cb_start_hour.Text, @"\D", ""); 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 if (start_30min.Checked) { start_time += ":30"; }
else { start_time += ":00"; } else { start_time += ":00"; }
string end_time = Regex.Replace(cb_end_hour.Text, @"\D", ""); 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 if (end_30min.Checked) { end_time += ":30"; }
else { end_time += ":00"; } else { end_time += ":00"; }
#endregion #endregion
@@ -164,7 +165,7 @@ namespace UniMarc
string Incmd = db.DB_INSERT("Part_Time", input_area, input_data); string Incmd = db.DB_INSERT("Part_Time", input_area, input_data);
Helper_DB.ExcuteNonQuery(Incmd); Helper_DB.ExcuteNonQuery(Incmd);
} }
MessageBox.Show("저장되었습니다!"); UTIL.MsgI("저장되었습니다!");
} }
#region Save_Sub #region Save_Sub
/// <summary> /// <summary>
@@ -177,7 +178,7 @@ namespace UniMarc
{ {
if (dataGridView1.Rows[a].Cells["per_name"].Value.ToString() == "") if (dataGridView1.Rows[a].Cells["per_name"].Value.ToString() == "")
{ {
MessageBox.Show("이름이 빈칸입니다!"); UTIL.MsgE("이름이 빈칸입니다!");
return false; return false;
} }
} }
@@ -193,7 +194,7 @@ namespace UniMarc
dataGridView1.Rows.RemoveAt(a); dataGridView1.Rows.RemoveAt(a);
} }
} }
MessageBox.Show("삭제되었습니다!"); UTIL.MsgI("삭제되었습니다!");
} }
private void btn_Close_Click(object sender, EventArgs e) private void btn_Close_Click(object sender, EventArgs e)

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -88,7 +89,7 @@ namespace UniMarc
string where_col = dataGridView1.Rows[row_count[a]].Cells[0].Value.ToString(); 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); string U_cmd = db.DB_Update("Remit_reg", update_tbl, update_col, where_tbl, where_col);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
MessageBox.Show(where_col); UTIL.MsgI(where_col);
} }
} }
int[] grid_chk() int[] grid_chk()

View File

@@ -8,6 +8,7 @@ using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using AR;
namespace UniMarc namespace UniMarc
{ {
@@ -93,7 +94,7 @@ namespace UniMarc
string Incmd = db.DB_INSERT("Remit_reg", input_table, input_data); string Incmd = db.DB_INSERT("Remit_reg", input_table, input_data);
Helper_DB.ExcuteNonQuery(Incmd); Helper_DB.ExcuteNonQuery(Incmd);
MessageBox.Show("성공적으로 저장되었습니다."); UTIL.MsgI("성공적으로 저장되었습니다.");
Add_Grid(); Add_Grid();
} }
void 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, 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 }; 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); string cmd = db.DB_Delete_More_term("Remit_reg", target_idx, compidx, target_table, target_data);
Helper_DB.ExcuteNonQuery(cmd); Helper_DB.ExcuteNonQuery(cmd);
MessageBox.Show("삭제되었습니다."); UTIL.MsgI("삭제되었습니다.");
} }
} }
private void btn_lookup_Click(object sender, EventArgs e) private void btn_lookup_Click(object sender, EventArgs e)

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -99,7 +100,7 @@ namespace UniMarc
} }
private void btn_save_Click(object sender, EventArgs e) private void btn_save_Click(object sender, EventArgs e)
{ {
if(MessageBox.Show("저장하시겠습니까?", "저장", MessageBoxButtons.YesNo) == DialogResult.No) { if(UTIL.MsgQ("저장하시겠습니까?") == DialogResult.No) {
return; return;
} }
for (int a = 0; a < dataGridView1.Rows.Count; a++) 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); string U_cmd = db.More_Update("Sales", edit_col, edit_data, search_col, search_data);
Helper_DB.ExcuteNonQuery(U_cmd); Helper_DB.ExcuteNonQuery(U_cmd);
} }
MessageBox.Show("저장되었습니다.", "저장", MessageBoxButtons.OK, MessageBoxIcon.Information); UTIL.MsgI("저장되었습니다.");
} }
private void btn_delete_Click(object sender, EventArgs e) private void btn_delete_Click(object sender, EventArgs e)
{ {
if (MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.No) { if (UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.No) {
return; return;
} }
for (int a = 0; a < dataGridView1.Rows.Count; a++) 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()); string D_cmd = db.DB_Delete("Sales", "compidx", compidx, "idx", dataGridView1.Rows[a].Cells["idx"].Value.ToString());
Helper_DB.ExcuteNonQuery(D_cmd); Helper_DB.ExcuteNonQuery(D_cmd);
} }
MessageBox.Show("삭제되었습니다.", "삭제", MessageBoxButtons.OK, MessageBoxIcon.Information); UTIL.MsgI("삭제되었습니다.");
} }
private void btn_close_Click(object sender, EventArgs e) private void btn_close_Click(object sender, EventArgs e)
{ {

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -42,9 +43,9 @@ namespace UniMarc
} }
private void btn_Save_Click(object sender, EventArgs e) private void btn_Save_Click(object sender, EventArgs e)
{ {
if (tb_clt.Text == "") { MessageBox.Show("거래처를 입력해주세요."); return; } if (tb_clt.Text == "") { UTIL.MsgE("거래처를 입력해주세요."); return; }
if (tb_price.Text == "") { MessageBox.Show("금액을 입력해주세요."); return; } if (tb_price.Text == "") { UTIL.MsgE("금액을 입력해주세요."); return; }
if (cb_gubun.SelectedIndex < 0) { MessageBox.Show("구분을 선택해주세요."); return; } if (cb_gubun.SelectedIndex < 0) { UTIL.MsgE("구분을 선택해주세요."); return; }
string date = Pay_In_Date.Text.Substring(0, 10); string date = Pay_In_Date.Text.Substring(0, 10);
if (row < 0 || !add_chk) { if (row < 0 || !add_chk) {
@@ -85,7 +86,7 @@ namespace UniMarc
#endregion #endregion
private void btn_Delete_Click(object sender, EventArgs e) private void btn_Delete_Click(object sender, EventArgs e)
{ {
if(MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.No) { return; } if(UTIL.MsgQ("삭제하시겠습니까?") == DialogResult.No) { return; }
string D_cmd = db.DB_Delete("Sales", "compidx", compidx, "idx", dataGridView1.Rows[row].Cells["idx"].Value.ToString()); string D_cmd = db.DB_Delete("Sales", "compidx", compidx, "idx", dataGridView1.Rows[row].Cells["idx"].Value.ToString());
Helper_DB.ExcuteNonQuery(D_cmd); Helper_DB.ExcuteNonQuery(D_cmd);

View File

@@ -1,4 +1,5 @@
using System; using AR;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Data; using System.Data;
@@ -61,7 +62,7 @@ namespace UniMarc
{ {
btn_Total_Click(null, null); btn_Total_Click(null, null);
if (tb_book_name.Text == "") { MessageBox.Show("도서명이 입력해주세요."); return; } if (tb_book_name.Text == "") { UTIL.MsgE("도서명이 입력해주세요."); return; }
// 도서명/저자/출판사/정가/출고율/부수/합계금액/ISBN // 도서명/저자/출판사/정가/출고율/부수/합계금액/ISBN
string[] grid = { string[] grid = {
tb_book_name.Text, tb_book_name.Text,
@@ -80,8 +81,8 @@ namespace UniMarc
} }
private void btn_Save_Click(object sender, EventArgs e) private void btn_Save_Click(object sender, EventArgs e)
{ {
if (tb_clt.Text == "") { MessageBox.Show("거래처를 입력해주세요."); return; } if (tb_clt.Text == "") { UTIL.MsgE("거래처를 입력해주세요."); return; }
if (dataGridView1.Rows.Count <= 0) { MessageBox.Show("저장할 내용이 없습니다."); return; } if (dataGridView1.Rows.Count <= 0) { UTIL.MsgE("저장할 내용이 없습니다."); return; }
string date = out_date.Text.Substring(0, 10); string date = out_date.Text.Substring(0, 10);