diff --git a/unimarc/unimarc/Helper_DB.cs b/unimarc/unimarc/Helper_DB.cs index de176c5..3f357ba 100644 --- a/unimarc/unimarc/Helper_DB.cs +++ b/unimarc/unimarc/Helper_DB.cs @@ -1,4 +1,7 @@ -using System; +using AR; +using MySql.Data.MySqlClient; +using Renci.SshNet; +using System; using System.Collections.Generic; using System.Data; using System.IO.Ports; @@ -6,16 +9,72 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; -using MySql.Data.MySqlClient; -using Renci.SshNet; using UniMarc.Properties; namespace UniMarc { + + public partial class Helper_DB + { + /// + /// 오류발생시 null을 반환합니다 + /// + /// + /// + /// + /// + /// + public static DataTable GetDT(string tableName, string columns = "*", string wheres = "", string orders = "") + { + try + { + var sql = $"select {columns} from {tableName}"; + if (wheres.isEmpty() == false) sql += " where " + wheres; + if (orders.isEmpty() == false) sql += " order by " + orders; + Helper_DB db = new Helper_DB(); + var cn = db.CreateConnection(); + var da = new MySql.Data.MySqlClient.MySqlDataAdapter(sql, cn); + var dt = new DataTable(); + da.Fill(dt); + dt.AcceptChanges(); + return dt; + } + catch + { + return null; + } + } + + /// + /// 오류발생시 -1을 반환합니다 + /// + /// + /// + public static int ExcuteNonQuery(string query,out string errormessage) + { + errormessage = string.Empty; + try + { + Helper_DB db = new Helper_DB(); + var cn = db.CreateConnection(); + var cmd = new MySqlCommand(query, cn); + cn.Open(); + var cnt = cmd.ExecuteNonQuery(); + cmd.Dispose(); + cn.Dispose(); + return cnt; + } + catch(Exception ex) + { + errormessage = ex.Message; + return -1; + } + } + } /// /// DB접속을 도와주는 클래스 /// - public class Helper_DB + public partial class Helper_DB { // 접속 MySqlConnection conn; @@ -40,7 +99,6 @@ namespace UniMarc MySqlCommand sqlcmd = new MySqlCommand(); MySqlDataReader sd; - public string comp_idx { get; internal set; } /// /// DB를 사용하고 싶을 때 미리 저장된 DB의 기본 접속정보를 이용하여 DB에 접근한다. @@ -141,7 +199,7 @@ namespace UniMarc } catch (Exception ex) { - MessageBox.Show(ex.ToString(), "ExecuteQueryData Error"); + MessageBox.Show(ex.ToString(), "ExecuteQueryData Error"); } finally { @@ -149,6 +207,7 @@ namespace UniMarc } return dt; } + public string DB_Send_CMD_Search(string cmd) { @@ -247,33 +306,12 @@ namespace UniMarc } conn.Close(); } - public void DB_Send_CMD_reVoid(string cmd) + public int DB_Send_CMD_reVoid(string cmd) { + var cnt = Helper_DB.ExcuteNonQuery(cmd,out string message); + if (cnt == -1) UTIL.MsgE($"데이터베이스 실행오류\n{message}"); + return cnt; - - //using (conn) - { - conn.Open(); - MySqlTransaction tran = conn.BeginTransaction(); - sqlcmd.Connection = conn; - sqlcmd.Transaction = tran; - try - { - sqlcmd.CommandText = cmd; - sqlcmd.ExecuteNonQuery(); - tran.Commit(); - } - catch (Exception ex) - { - tran.Rollback(); - MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); - } - finally - { - if (conn != null && conn.State != System.Data.ConnectionState.Closed) - conn.Close(); - } - } } /// /// DBcon이 선진행되어야함. diff --git a/unimarc/unimarc/Helper_DB2.cs b/unimarc/unimarc/Helper_DB2.cs deleted file mode 100644 index a040dc5..0000000 --- a/unimarc/unimarc/Helper_DB2.cs +++ /dev/null @@ -1,48 +0,0 @@ -using AR; -using Microsoft.Vbe.Interop; -using MySql.Data.MySqlClient; -using OpenQA.Selenium.BiDi.Input; -using Renci.SshNet; -using System; -using System.Collections.Generic; -using System.Data; -using System.IO.Ports; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; -using UniMarc; -using UniMarc.Properties; - -namespace UniMarc -{ - public static class DB2 - { - public static DataTable GetDT(string tableName, string columns="*" , string wheres="", string orders="") - { - var sql = $"select {columns} from {tableName}"; - if (wheres.isEmpty() == false) sql += " where " + wheres; - if (orders.isEmpty() == false) sql += " order by " + orders; - Helper_DB db = new Helper_DB(); - var cn = db.CreateConnection(); - var da = new MySql.Data.MySqlClient.MySqlDataAdapter(sql, cn); - var dt = new DataTable(); - da.Fill(dt); - dt.AcceptChanges(); - return dt; - } - - public static int ExcuteNonQuery(string query) - { - Helper_DB db = new Helper_DB(); - var cn = db.CreateConnection(); - var cmd = new MySqlCommand(query, cn); - cn.Open(); - var cnt = cmd.ExecuteNonQuery(); - cmd.Dispose(); - cn.Dispose(); - return cnt; - - } - } -} diff --git a/unimarc/unimarc/Main.Designer.cs b/unimarc/unimarc/Main.Designer.cs index 9f614d6..a5057da 100644 --- a/unimarc/unimarc/Main.Designer.cs +++ b/unimarc/unimarc/Main.Designer.cs @@ -67,6 +67,7 @@ this.작업지시서 = new System.Windows.Forms.ToolStripMenuItem(); this.마크작업 = new System.Windows.Forms.ToolStripMenuItem(); this.마크작성 = new System.Windows.Forms.ToolStripMenuItem(); + this.신규마크작성NewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.마크목록 = new System.Windows.Forms.ToolStripMenuItem(); this.소장자료검색 = new System.Windows.Forms.ToolStripMenuItem(); this.마크정리 = new System.Windows.Forms.ToolStripMenuItem(); @@ -127,7 +128,7 @@ this.ShortCut2 = new System.Windows.Forms.Button(); this.ShortCut1 = new System.Windows.Forms.Button(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); - this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel(); + this.lbCompanyName = new System.Windows.Forms.ToolStripLabel(); this.VersionText = new System.Windows.Forms.ToolStripLabel(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.botUserLabel = new System.Windows.Forms.ToolStripLabel(); @@ -139,7 +140,6 @@ this.mdiTabControl = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage(); - this.신규마크작성NewToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.panel1.SuspendLayout(); this.toolStrip1.SuspendLayout(); @@ -418,7 +418,7 @@ this.불용어, this.작업지시서}); this.마크설정.Name = "마크설정"; - this.마크설정.Size = new System.Drawing.Size(180, 22); + this.마크설정.Size = new System.Drawing.Size(156, 22); this.마크설정.Text = "설정"; // // 단축키설정 @@ -464,7 +464,7 @@ this.복본조사2, this.iSBN조회}); this.마크작업.Name = "마크작업"; - this.마크작업.Size = new System.Drawing.Size(180, 22); + this.마크작업.Size = new System.Drawing.Size(156, 22); this.마크작업.Text = "마크 작업"; // // 마크작성 @@ -475,6 +475,13 @@ this.마크작성.ToolTipText = "마크 작성(2)"; this.마크작성.Click += new System.EventHandler(this.마크작성ToolStripMenuItem_Click); // + // 신규마크작성NewToolStripMenuItem + // + this.신규마크작성NewToolStripMenuItem.Name = "신규마크작성NewToolStripMenuItem"; + this.신규마크작성NewToolStripMenuItem.Size = new System.Drawing.Size(182, 22); + this.신규마크작성NewToolStripMenuItem.Text = "신규마크 작성(New)"; + this.신규마크작성NewToolStripMenuItem.Click += new System.EventHandler(this.신규마크작성NewToolStripMenuItem_Click); + // // 마크목록 // this.마크목록.Name = "마크목록"; @@ -523,7 +530,7 @@ this.목록, this.편목}); this.dVDCDLPToolStripMenuItem.Name = "dVDCDLPToolStripMenuItem"; - this.dVDCDLPToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.dVDCDLPToolStripMenuItem.Size = new System.Drawing.Size(156, 22); this.dVDCDLPToolStripMenuItem.Text = "DVD / CD / LP"; // // 목록 @@ -547,7 +554,7 @@ this.마크반입, this.마크반출}); this.반입및반출.Name = "반입및반출"; - this.반입및반출.Size = new System.Drawing.Size(180, 22); + this.반입및반출.Size = new System.Drawing.Size(156, 22); this.반입및반출.Text = "반입 및 반출"; // // 마크반입 @@ -572,7 +579,7 @@ this.검수, this.저자기호}); this.부가기능.Name = "부가기능"; - this.부가기능.Size = new System.Drawing.Size(180, 22); + this.부가기능.Size = new System.Drawing.Size(156, 22); this.부가기능.Text = "부가기능"; // // 마크수집 @@ -613,7 +620,7 @@ this.DLS조회, this.dLS복본조사}); this.DLS.Name = "DLS"; - this.DLS.Size = new System.Drawing.Size(180, 22); + this.DLS.Size = new System.Drawing.Size(156, 22); this.DLS.Text = "DLS"; // // DLS조회 @@ -637,7 +644,7 @@ this.마크통계, this.장비관리}); this.마크기타.Name = "마크기타"; - this.마크기타.Size = new System.Drawing.Size(180, 22); + this.마크기타.Size = new System.Drawing.Size(156, 22); this.마크기타.Text = "기타"; // // 서류작성 @@ -1042,7 +1049,7 @@ this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripLabel2, + this.lbCompanyName, this.VersionText, this.toolStripSeparator1, this.botUserLabel, @@ -1056,11 +1063,11 @@ this.toolStrip1.TabIndex = 4; this.toolStrip1.Text = "toolStrip1"; // - // toolStripLabel2 + // lbCompanyName // - this.toolStripLabel2.Name = "toolStripLabel2"; - this.toolStripLabel2.Size = new System.Drawing.Size(43, 22); - this.toolStripLabel2.Text = "회사명"; + this.lbCompanyName.Name = "lbCompanyName"; + this.lbCompanyName.Size = new System.Drawing.Size(43, 22); + this.lbCompanyName.Text = "회사명"; // // VersionText // @@ -1119,7 +1126,7 @@ // this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; - this.tabPage1.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); this.tabPage1.Size = new System.Drawing.Size(1656, 687); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "tabPage1"; @@ -1129,19 +1136,12 @@ // this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2"; - this.tabPage2.Padding = new System.Windows.Forms.Padding(3, 3, 3, 3); - this.tabPage2.Size = new System.Drawing.Size(1656, 688); + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(1656, 687); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "tabPage2"; this.tabPage2.UseVisualStyleBackColor = true; // - // 신규마크작성NewToolStripMenuItem - // - this.신규마크작성NewToolStripMenuItem.Name = "신규마크작성NewToolStripMenuItem"; - this.신규마크작성NewToolStripMenuItem.Size = new System.Drawing.Size(182, 22); - this.신규마크작성NewToolStripMenuItem.Text = "신규마크 작성(New)"; - this.신규마크작성NewToolStripMenuItem.Click += new System.EventHandler(this.신규마크작성NewToolStripMenuItem_Click); - // // Main // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); @@ -1248,7 +1248,7 @@ private System.Windows.Forms.OpenFileDialog openFileDialog1; private System.Windows.Forms.ToolStripMenuItem 매출입금; private System.Windows.Forms.ToolStripMenuItem 반품처리; - public System.Windows.Forms.ToolStripLabel toolStripLabel2; + public System.Windows.Forms.ToolStripLabel lbCompanyName; private System.Windows.Forms.ToolStripMenuItem 파트타임관리; public System.Windows.Forms.ToolStripLabel botUserLabel; private System.Windows.Forms.ToolStripMenuItem 복본조사1; diff --git a/unimarc/unimarc/Main.cs b/unimarc/unimarc/Main.cs index 4c46567..419c4e5 100644 --- a/unimarc/unimarc/Main.cs +++ b/unimarc/unimarc/Main.cs @@ -21,8 +21,7 @@ namespace UniMarc Helper_DB _DB = new Helper_DB(); IP ip = new IP(); public string DB_User_Data; - public string User; - public string com_idx; + public Main() { @@ -32,7 +31,7 @@ namespace UniMarc this.mdiTabControl.DrawItem += MdiTabControl_DrawItem; PUB.Init(); this.btDevDb.Visible = System.Diagnostics.Debugger.IsAttached; - if(System.Diagnostics.Debugger.IsAttached) + if (System.Diagnostics.Debugger.IsAttached) { this.Size = new Size(1920, 1080); this.WindowState = FormWindowState.Normal; @@ -67,28 +66,33 @@ namespace UniMarc { string[] result = DB_User_Data.Split('|'); - if (result[3] == null) { } + if (result[3] == null) { + PUB.user.UserName = ""; + PUB.user.CompanyName = string.Empty; + } else { - toolStripLabel2.Text = result[4]; - botUserLabel.Text = result[3]; - User = result[3]; + PUB.user.CompanyName = result[4]; + PUB.user.UserName = result[3]; } cmd = _DB.DB_Select_Search("`idx`", "Comp", "comp_name", result[4]); - com_idx = _DB.DB_Send_CMD_Search(cmd).Replace("|", ""); + PUB.user.CompanyIdx = _DB.DB_Send_CMD_Search(cmd).Replace("|", ""); - if (com_idx != "1") + if (PUB.user.CompanyIdx != "1") { 납품관리ToolStripMenuItem.Visible = false; 회계ToolStripMenuItem.Visible = false; } if (result[5] != "관리자") { 마스터ToolStripMenuItem.Visible = false; } - Settings.Default.compidx = com_idx; - Settings.Default.User = botUserLabel.Text; + lbCompanyName.Text = PUB.user.CompanyName; + botUserLabel.Text = PUB.user.UserName; - this.Text = "[ '" + com_idx + "' : " + result[4] + " - " + result[3] + "]"; + + + + this.Text = "[ '" + PUB.user.CompanyIdx + "' : " + result[4] + " - " + result[3] + "]"; isAccess(); SetBtnName(); @@ -645,7 +649,7 @@ namespace UniMarc #endregion - + #region DLS // Fields removed @@ -660,7 +664,7 @@ namespace UniMarc OpenFormInTab(() => new DLS_Copy(this)); } #endregion - + #region 기타 // Fields removed // Make_Document, Mac_Stat, Mac_equip_Manage removed @@ -772,7 +776,7 @@ namespace UniMarc { OpenFormInTab(() => new Batch_processing(this)); } - + private void 복본조사2_Click(object sender, EventArgs e) { OpenFormInTab(() => diff --git a/unimarc/unimarc/PUB.cs b/unimarc/unimarc/PUB.cs index c303f7c..5cc7c4d 100644 --- a/unimarc/unimarc/PUB.cs +++ b/unimarc/unimarc/PUB.cs @@ -8,11 +8,17 @@ using UniMarc.Properties; namespace UniMarc { + public class LoginInfo + { + public string UserName { get; set; } + public string CompanyIdx { get; set; } + public string CompanyName { get; set; } + } public static class PUB { public static arUtil.Log log; public static UserSetting setting; - + public static LoginInfo user; public static void Init() { #region "Log setting" @@ -25,6 +31,8 @@ namespace UniMarc setting = new UserSetting(); setting.Load(); + + user = new LoginInfo(); } } diff --git a/unimarc/unimarc/UniMarc.csproj b/unimarc/unimarc/UniMarc.csproj index 6db5775..ab871ee 100644 --- a/unimarc/unimarc/UniMarc.csproj +++ b/unimarc/unimarc/UniMarc.csproj @@ -224,7 +224,6 @@ True Reference.svcmap - Form diff --git a/unimarc/unimarc/납품관리/Book_Lookup.cs b/unimarc/unimarc/납품관리/Book_Lookup.cs index 04fc308..fff3425 100644 --- a/unimarc/unimarc/납품관리/Book_Lookup.cs +++ b/unimarc/unimarc/납품관리/Book_Lookup.cs @@ -20,7 +20,6 @@ namespace UniMarc List_Lookup ll; Bring_Back bb; Check_ISBN cisbn; - string compidx; string list_name; int idx; public Book_Lookup(Order_input _oin) @@ -28,35 +27,30 @@ namespace UniMarc InitializeComponent(); oin = _oin; idx = oin.grididx; - compidx = oin.compidx; } public Book_Lookup(Purchase _pur) { InitializeComponent(); pur = _pur; idx = pur.grididx; - compidx = pur.compidx; } public Book_Lookup(List_Lookup _ll) { InitializeComponent(); ll = _ll; idx = ll.grididx; - compidx = ll.compidx; } public Book_Lookup(Bring_Back _bb) { InitializeComponent(); bb = _bb; idx = bb.grididx; - compidx = bb.compidx; } public Book_Lookup(Check_ISBN _isbn) { InitializeComponent(); cisbn = _isbn; idx = cisbn.rowidx; - compidx = cisbn.compidx; } private void Book_Lookup_Load(object sender, EventArgs e) { @@ -70,7 +64,7 @@ namespace UniMarc * idx 도서명 저자 출판사 isbn * 정가 수량 입고수 합계금액 비고 * 주문처 주문일자 */ - string[] List_book = { compidx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text, + string[] List_book = { PUB.user.CompanyIdx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text, tb_pay.Text, tb_count.Text, tb_stock.Text, tb_total.Text, tb_etc.Text, tb_order1.Text, tb_order_date.Text, tb_List_name.Text }; } @@ -79,7 +73,7 @@ namespace UniMarc string Area = "`order`, `pay`, `count`, `persent`, " + // 0-3 "`order_date`, `import_date`, `chk_date`, `export_date`"; // 4-7 string[] Search_col = { "compidx", "list_name", "book_name", "author", "book_comp" }; - string[] Search_data = { compidx, tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text }; + string[] Search_data = { PUB.user.CompanyIdx, tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text }; string cmd = db.More_DB_Search("Obj_List_Book", Search_col, Search_data, Area); string db_res = db.DB_Send_CMD_Search(cmd); string[] db_data = db_res.Split('|'); @@ -123,7 +117,7 @@ namespace UniMarc "`total`, `header`, `num`, `order`, `etc`, " + "`input_count`, `order_date`, `list_name`, `idx`"; - string[] data = { compidx, book_name, author, book_comp, list_name }; + string[] data = { PUB.user.CompanyIdx, book_name, author, book_comp, list_name }; string[] table = { "compidx", "book_name", "author", "book_comp", "list_name" }; string cmd = db.More_DB_Search("Obj_List_Book", table, data, search); string db_res = db.DB_Send_CMD_Search(cmd); @@ -136,7 +130,7 @@ namespace UniMarc "`total`, `header`, `num`, `order`, `etc`, " + "`input_count`, `order_date`, `list_name`, `idx`"; - string[] data = { compidx, idx }; + string[] data = { PUB.user.CompanyIdx, idx }; string[] table = { "compidx", "idx" }; string cmd = db.More_DB_Search("Obj_List_Book", table, data, search); string db_res = db.DB_Send_CMD_Search(cmd); @@ -167,7 +161,7 @@ namespace UniMarc private void list_db() { string[] where_table = { "comp_num", "list_name" }; - string[] search_data = { compidx, list_name }; + string[] search_data = { PUB.user.CompanyIdx, list_name }; string cmd = db.More_DB_Search("Obj_List", where_table, search_data, "`clt`, `dly`, `charge`, `date`, `date_res`"); cmd = db.DB_Send_CMD_Search(cmd); @@ -184,7 +178,7 @@ namespace UniMarc private string isbn() { string[] where_table = { "compidx", "list_name", "book_name", "author", "book_comp" }; - string[] search_data = { compidx, + string[] search_data = { PUB.user.CompanyIdx, list_name, tb_book_name.Text, tb_author.Text, tb_book_comp.Text }; string cmd = db.More_DB_Search("Obj_List_Book", where_table, search_data, "`isbn`"); string db_res = db.DB_Send_CMD_Search(cmd); @@ -209,7 +203,7 @@ namespace UniMarc "pay", "count", "input_count", "total", "etc", "order", "order_date", "list_name" }; string[] List_book = { - compidx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text, + PUB.user.CompanyIdx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text, tb_pay.Text, tb_count.Text, tb_stock.Text, tb_total.Text, tb_etc.Text, tb_order1.Text, tb_order_date.Text, tb_List_name.Text }; string[] idx_table = { "idx" }; @@ -230,7 +224,7 @@ namespace UniMarc string[] edit_tbl = { "input_count", "import", "import_date" }; string[] edit_col = { tb_stock.Text, "입고", DateTime.Today.ToString("yyyy-MM-dd") }; string[] search_tbl = { "compidx", "list_name", "book_name", "author", "book_comp", "isbn" }; - string[] search_col = { compidx, + string[] search_col = { PUB.user.CompanyIdx, tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text }; string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col); db.DB_Send_CMD_reVoid(U_cmd); @@ -246,7 +240,7 @@ namespace UniMarc string[] edit_col = { tb_stock.Text, "미입고", "" }; string[] search_tbl = { "compidx", "list_name", "book_name", "author", "book_comp", "isbn" }; - string[] search_col = { compidx, + string[] search_col = { PUB.user.CompanyIdx, tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text }; string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col); db.DB_Send_CMD_reVoid(U_cmd); diff --git a/unimarc/unimarc/납품관리/Bring_Back.cs b/unimarc/unimarc/납품관리/Bring_Back.cs index 0c45f28..4613b23 100644 --- a/unimarc/unimarc/납품관리/Bring_Back.cs +++ b/unimarc/unimarc/납품관리/Bring_Back.cs @@ -12,7 +12,6 @@ namespace UniMarc { public partial class Bring_Back : Form { - public string compidx; public int grididx; Main main; Helper_DB db = new Helper_DB(); @@ -20,14 +19,13 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; } private void Bring_Back_Load(object sender, EventArgs e) { db.DBcon(); string Area = "`list_name`"; string[] sear_col = { "comp_num", "state" }; - string[] sear_data = { compidx, "진행" }; + string[] sear_data = { PUB.user.CompanyIdx, "진행" }; string cmd = db.More_DB_Search("Obj_List", sear_col, sear_data, Area); string db_res = db.DB_Send_CMD_Search(cmd); string[] arr_data = db_res.Split('|'); @@ -43,7 +41,7 @@ namespace UniMarc string Area = "`idx`, `num`, `book_name`, `author`, `book_comp`, " + "`isbn`, `price`, `count`, `total`, `list_name`, `etc`"; string[] sear_col = { "compidx", "list_name" }; - string[] sear_data = { compidx, cb_list_name.Text }; + string[] sear_data = { PUB.user.CompanyIdx, cb_list_name.Text }; string cmd = db.More_DB_Search("Obj_List_Book", sear_col, sear_data, Area); string db_res = db.DB_Send_CMD_Search(cmd); string[] arr_data = db_res.Split('|'); @@ -91,7 +89,7 @@ namespace UniMarc private void Return(int a) { string[] sear_col = { "idx", "compidx" }; - string[] sear_data = { dataGridView1.Rows[a].Cells["idx"].Value.ToString(), compidx }; + string[] sear_data = { dataGridView1.Rows[a].Cells["idx"].Value.ToString(), PUB.user.CompanyIdx }; string[] edit_col = { "import", "etc" }; string[] edit_data = { "미입고", "반품처리 " + dataGridView1.Rows[a].Cells["etc"].Value.ToString() }; string U_cmd = db.More_Update("Obj_List_Book", edit_col, edit_data, sear_col, sear_data); diff --git a/unimarc/unimarc/납품관리/Commodity_registration.cs b/unimarc/unimarc/납품관리/Commodity_registration.cs index 1fd92ad..4880d42 100644 --- a/unimarc/unimarc/납품관리/Commodity_registration.cs +++ b/unimarc/unimarc/납품관리/Commodity_registration.cs @@ -52,7 +52,7 @@ namespace UniMarc } User_Data_temp = main.DB_User_Data; string[] User_Data = User_Data_temp.Split('|'); - comp_idx = main.com_idx; + comp_idx = PUB.user.CompanyIdx; tb_UserName.Text = User_Data[3]; Add_Grid("진행"); @@ -217,7 +217,7 @@ namespace UniMarc "chk_marc", "comp_num", "unstock" }; string[] setData = { data[0], data[1], data[2], data[3], data[4], data[5], data[6], data[7], data[8], data[9], - data[12], main.com_idx, data[7] }; + data[12], PUB.user.CompanyIdx, data[7] }; string Incmd = db.DB_INSERT("Obj_List", col_name, setData); db.DB_Send_CMD_reVoid(Incmd); @@ -287,7 +287,7 @@ namespace UniMarc dataGridView2.Rows[delcout].Cells["list_name"].Value.ToString() }; string[] del_table = { "date", "list_name" }; - string cmd = db.DB_Delete_More_term("Obj_List", "comp_num", main.com_idx, del_table, del_target); + string cmd = db.DB_Delete_More_term("Obj_List", "comp_num", PUB.user.CompanyIdx, del_table, del_target); db.DB_Send_CMD_reVoid(cmd); cmd = db.DB_Delete_No_Limit("Obj_List_Book", "compidx", comp_idx, del_table, del_target); db.DB_Send_CMD_reVoid(cmd); @@ -325,7 +325,7 @@ namespace UniMarc string getdata = "`date`, `clt`, `dly`, `charge`, `list_name`, " + "`vol`, `total`, `state`, `chk_marc`"; string[] othertable = { "comp_num", "state" }; - string[] othercol = { main.com_idx, code }; + string[] othercol = { PUB.user.CompanyIdx, code }; string cmd = db.More_DB_Search("Obj_List", othertable, othercol, getdata); string db_res = db.DB_Send_CMD_Search(cmd); diff --git a/unimarc/unimarc/납품관리/Input_Lookup_Stock.cs b/unimarc/unimarc/납품관리/Input_Lookup_Stock.cs index 7804274..76e1041 100644 --- a/unimarc/unimarc/납품관리/Input_Lookup_Stock.cs +++ b/unimarc/unimarc/납품관리/Input_Lookup_Stock.cs @@ -21,7 +21,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Input_Lookup_Stock_Load(object sender, EventArgs e) { diff --git a/unimarc/unimarc/납품관리/List_Lookup.cs b/unimarc/unimarc/납품관리/List_Lookup.cs index 12ee6ea..ab68e94 100644 --- a/unimarc/unimarc/납품관리/List_Lookup.cs +++ b/unimarc/unimarc/납품관리/List_Lookup.cs @@ -35,7 +35,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void List_Lookup_Load(object sender, EventArgs e) { diff --git a/unimarc/unimarc/납품관리/List_aggregation.cs b/unimarc/unimarc/납품관리/List_aggregation.cs index 63d3f7b..dcac6b7 100644 --- a/unimarc/unimarc/납품관리/List_aggregation.cs +++ b/unimarc/unimarc/납품관리/List_aggregation.cs @@ -23,7 +23,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } /////// TODO: // 새로운 폼 작업 필요. @@ -61,7 +61,7 @@ namespace UniMarc #endregion combo_user.Items.Add("전체"); - string cmd = db.self_Made_Cmd("SELECT `name` FROM `User_Data` WHERE `affil` = '" + main.toolStripLabel2.Text + "';"); + string cmd = db.self_Made_Cmd("SELECT `name` FROM `User_Data` WHERE `affil` = '" + main.lbCompanyName.Text + "';"); string[] user_name = cmd.Split('|'); for(int a = 0; a < user_name.Length; a++) { diff --git a/unimarc/unimarc/납품관리/Order_input.cs b/unimarc/unimarc/납품관리/Order_input.cs index 996e065..4c73f6a 100644 --- a/unimarc/unimarc/납품관리/Order_input.cs +++ b/unimarc/unimarc/납품관리/Order_input.cs @@ -30,7 +30,7 @@ namespace UniMarc private void Order_input_Load(object sender, EventArgs e) { db.DBcon(); - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; dataGridView1.Columns["book_name"].DefaultCellStyle.Font = new Font("굴림", 8, FontStyle.Regular); dataGridView1.Columns["author"].DefaultCellStyle.Font = new Font("굴림", 8, FontStyle.Regular); @@ -46,7 +46,7 @@ namespace UniMarc // 사용자 구분 cb_user.Items.Add("전체"); - string compName = main.toolStripLabel2.Text; + string compName = main.lbCompanyName.Text; string cmd = db.self_Made_Cmd("SELECT `name` FROM `User_Data` WHERE `affil` = '" + compName + "';"); string[] user_name = cmd.Split('|'); for (int a = 0; a < user_name.Length; a++) diff --git a/unimarc/unimarc/납품관리/Purchase.cs b/unimarc/unimarc/납품관리/Purchase.cs index 49d196b..b52b849 100644 --- a/unimarc/unimarc/납품관리/Purchase.cs +++ b/unimarc/unimarc/납품관리/Purchase.cs @@ -24,7 +24,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Purchase_Load(object sender, EventArgs e) { diff --git a/unimarc/unimarc/마크/AddMarc.cs b/unimarc/unimarc/마크/AddMarc.cs index 2e75171..16fa2fa 100644 --- a/unimarc/unimarc/마크/AddMarc.cs +++ b/unimarc/unimarc/마크/AddMarc.cs @@ -17,16 +17,12 @@ namespace UniMarc Helper_DB db = new Helper_DB(); String_Text st = new String_Text(); Help008Tag tag008 = new Help008Tag(); - public string mUserName; - public string mCompidx; private string mOldMarc = string.Empty; Main m; public AddMarc(Main _m) { InitializeComponent(); m = _m; - mUserName = m.User; - mCompidx = m.com_idx; } private void AddMarc_Load(object sender, EventArgs e) @@ -294,12 +290,12 @@ namespace UniMarc }; string[] EditColumn = { - mCompidx, oriMarc, "1",mOldMarc, "0", etc1.Text, - etc2.Text, tag056, text008.Text, date, mUserName, + PUB.user.CompanyIdx, oriMarc, "1",mOldMarc, "0", etc1.Text, + etc2.Text, tag056, text008.Text, date, PUB.user.UserName, grade.ToString() }; string[] SearchTable = { "idx","compidx" }; - string[] SearchColumn = { MarcIndex, mCompidx }; + string[] SearchColumn = { MarcIndex, PUB.user.CompanyIdx }; //int marcChk = subMarcChk(Table, MarcIndex); //if (IsCovertDate) @@ -329,7 +325,7 @@ namespace UniMarc // break; //} string UpCMD = db.More_Update(Table, EditTable, EditColumn, SearchTable, SearchColumn); - PUB.log.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpCMD.Replace("\r", " ").Replace("\n", " "))); + PUB.log.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, UpCMD.Replace("\r", " ").Replace("\n", " "))); db.DB_Send_CMD_reVoid(UpCMD); } @@ -355,11 +351,11 @@ namespace UniMarc { BookData[0], BookData[1], BookData[2], BookData[3], BookData[4], oriMarc, etc1.Text, etc2.Text, grade.ToString(), "1", - mUserName, tag056, text008.Text, date, mCompidx + PUB.user.UserName, tag056, text008.Text, date, PUB.user.CompanyIdx }; string InCMD = db.DB_INSERT(Table, InsertTable, InsertColumn); - PUB.log.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", mUserName, mCompidx, InCMD.Replace("\r", " ").Replace("\n", " "))); + PUB.log.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, InCMD.Replace("\r", " ").Replace("\n", " "))); db.DB_Send_CMD_reVoid(InCMD); } @@ -373,7 +369,7 @@ namespace UniMarc { if (TimeSpanDaysValue < -1) return false; - if (user != mUserName) + if (user != PUB.user.UserName) return false; return true; } diff --git a/unimarc/unimarc/마크/AddMarc2.cs b/unimarc/unimarc/마크/AddMarc2.cs index fadc9c9..eb3474c 100644 --- a/unimarc/unimarc/마크/AddMarc2.cs +++ b/unimarc/unimarc/마크/AddMarc2.cs @@ -17,16 +17,12 @@ namespace UniMarc Helper_DB db = new Helper_DB(); String_Text st = new String_Text(); Help008Tag tag008 = new Help008Tag(); - public string mUserName; - public string mCompidx; private string mOldMarc = string.Empty; Main m; public AddMarc2(Main _m) { InitializeComponent(); m = _m; - mUserName = m.User; - mCompidx = m.com_idx; } private void AddMarc_Load(object sender, EventArgs e) @@ -233,12 +229,12 @@ namespace UniMarc }; string[] EditColumn = { - mCompidx, oriMarc, "1",mOldMarc, "0", param.Remark1, - param.Remark2, tag056, param.text008, date, mUserName, + PUB.user.CompanyIdx, oriMarc, "1",mOldMarc, "0", param.Remark1, + param.Remark2, tag056, param.text008, date, PUB.user.UserName, grade.ToString() }; string[] SearchTable = { "idx", "compidx" }; - string[] SearchColumn = { MarcIndex, mCompidx }; + string[] SearchColumn = { MarcIndex, PUB.user.CompanyIdx }; //int marcChk = subMarcChk(Table, MarcIndex); //if (IsCovertDate) @@ -268,7 +264,7 @@ namespace UniMarc // break; //} string UpCMD = db.More_Update(Table, EditTable, EditColumn, SearchTable, SearchColumn); - PUB.log.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpCMD.Replace("\r", " ").Replace("\n", " "))); + PUB.log.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, UpCMD.Replace("\r", " ").Replace("\n", " "))); db.DB_Send_CMD_reVoid(UpCMD); } @@ -293,11 +289,11 @@ namespace UniMarc { BookData[0], BookData[1], BookData[2], BookData[3], BookData[4], oriMarc, param.Remark1, param.Remark2, grade.ToString(), "1", - mUserName, tag056, param.text008, date, mCompidx + PUB.user.UserName, tag056, param.text008, date, PUB.user.CompanyIdx }; string InCMD = db.DB_INSERT(Table, InsertTable, InsertColumn); - PUB.log.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", mUserName, mCompidx, InCMD.Replace("\r", " ").Replace("\n", " "))); + PUB.log.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, InCMD.Replace("\r", " ").Replace("\n", " "))); db.DB_Send_CMD_reVoid(InCMD); } @@ -311,7 +307,7 @@ namespace UniMarc { if (TimeSpanDaysValue < -1) return false; - if (user != mUserName) + if (user != PUB.user.UserName) return false; return true; } diff --git a/unimarc/unimarc/마크/All_Book_Detail.cs b/unimarc/unimarc/마크/All_Book_Detail.cs index 7b0e430..b72038a 100644 --- a/unimarc/unimarc/마크/All_Book_Detail.cs +++ b/unimarc/unimarc/마크/All_Book_Detail.cs @@ -20,14 +20,12 @@ namespace UniMarc /// public string[] data = { "", "", "", "" }; - string compidx; Helper_DB db = new Helper_DB(); All_Book_manage manage; public All_Book_Detail(All_Book_manage _manage) { InitializeComponent(); manage = _manage; - compidx = manage.compidx; } private void All_Book_Detail_Load(object sender, EventArgs e) diff --git a/unimarc/unimarc/마크/All_Book_manage.cs b/unimarc/unimarc/마크/All_Book_manage.cs index 60c2b7a..7b17fa3 100644 --- a/unimarc/unimarc/마크/All_Book_manage.cs +++ b/unimarc/unimarc/마크/All_Book_manage.cs @@ -12,16 +12,12 @@ namespace UniMarc { public partial class All_Book_manage : Form { - public string compidx; - public string charge; Helper_DB db = new Helper_DB(); Main main; public All_Book_manage(Main _main) { InitializeComponent(); main = _main; - compidx = main.com_idx; - charge = main.User; } private void All_Book_manage_Load(object sender, EventArgs e) @@ -35,7 +31,7 @@ namespace UniMarc string text = textBox1.Text; // 세트명 세트ISBN 세트수량 세트정가 저자 출판사 추가자 string Area_db = "`set_name`, `set_isbn`, `set_count`, `set_price`, `author`, `book_comp`, `charge`"; - string cmd = db.DB_Contains("Set_Book", compidx, "set_name", text, Area_db); + string cmd = db.DB_Contains("Set_Book", PUB.user.CompanyIdx, "set_name", text, Area_db); string db_res = db.DB_Send_CMD_Search(cmd); string[] db_data = db_res.Split('|'); input_Grid(db_data); @@ -175,7 +171,7 @@ namespace UniMarc dataGridView1.Rows[V_idx].Cells["set_count"].Value.ToString(), dataGridView1.Rows[V_idx].Cells["set_price"].Value.ToString() }; - string cmd = db.DB_Delete_No_Limit("Set_Book", "compidx", compidx, delete_area, delete_data); + string cmd = db.DB_Delete_No_Limit("Set_Book", "compidx", PUB.user.CompanyIdx, delete_area, delete_data); db.DB_Send_CMD_reVoid(cmd); } diff --git a/unimarc/unimarc/마크/All_Book_manage_Add.cs b/unimarc/unimarc/마크/All_Book_manage_Add.cs index 5891bc7..e8d5c0e 100644 --- a/unimarc/unimarc/마크/All_Book_manage_Add.cs +++ b/unimarc/unimarc/마크/All_Book_manage_Add.cs @@ -73,7 +73,7 @@ namespace UniMarc "set_name", "set_count", "set_isbn", "set_price", "set_pubyear", "book_name", "series_title", "sub_title", "series_num", "author", "book_comp", "isbn", "price", "charge" }; - string[] insert_col = { manage.compidx, + string[] insert_col = { PUB.user.CompanyIdx, tb_setName.Text, tb_setCount.Text, tb_setISBN.Text, tb_setPrice.Text, tb_setYear.Text, dataGridView1.Rows[a].Cells["book_name"].Value.ToString(), dataGridView1.Rows[a].Cells["series_title"].Value.ToString(), @@ -82,7 +82,7 @@ namespace UniMarc dataGridView1.Rows[a].Cells["author"].Value.ToString(), dataGridView1.Rows[a].Cells["book_comp"].Value.ToString(), dataGridView1.Rows[a].Cells["ISBN"].Value.ToString(), - dataGridView1.Rows[a].Cells["price"].Value.ToString(), manage.charge }; + dataGridView1.Rows[a].Cells["price"].Value.ToString(), PUB.user.UserName }; string Incmd = db.DB_INSERT("Set_Book", insert_tbl, insert_col); db.DB_Send_CMD_reVoid(Incmd); diff --git a/unimarc/unimarc/마크/All_Book_manage_Edit.cs b/unimarc/unimarc/마크/All_Book_manage_Edit.cs index afbbd02..e0e68ef 100644 --- a/unimarc/unimarc/마크/All_Book_manage_Edit.cs +++ b/unimarc/unimarc/마크/All_Book_manage_Edit.cs @@ -14,12 +14,10 @@ namespace UniMarc { All_Book_manage manage; Helper_DB db = new Helper_DB(); - string compidx; public All_Book_manage_Edit(All_Book_manage _manage) { InitializeComponent(); manage = _manage; - compidx = manage.compidx; } private void All_Book_manage_Edit_Load(object sender, EventArgs e) @@ -46,7 +44,7 @@ namespace UniMarc { string table = "Set_Book"; string[] sear_tbl = { "compidx", "set_name", "set_isbn", "set_count", "set_price" }; - string[] sear_col = { compidx, + string[] sear_col = { PUB.user.CompanyIdx, tb_set_name_old.Text, tb_set_isbn_old.Text, tb_set_count_old.Text, diff --git a/unimarc/unimarc/마크/CD_LP.cs b/unimarc/unimarc/마크/CD_LP.cs index 3840183..099b3bb 100644 --- a/unimarc/unimarc/마크/CD_LP.cs +++ b/unimarc/unimarc/마크/CD_LP.cs @@ -14,8 +14,6 @@ namespace UniMarc { Main main; Helper_DB db = new Helper_DB(); - string compidx; - string name; public CD_LP(Main _m) { InitializeComponent(); @@ -25,8 +23,6 @@ namespace UniMarc private void CD_LP_Load(object sender, EventArgs e) { db.DBcon(); - compidx = main.com_idx; - name = main.User; string[] Site = { "교보문고", "알라딘" }; cb_SiteCon.Items.AddRange(Site); @@ -61,7 +57,7 @@ namespace UniMarc { CD_LP_SelectList selectList = new CD_LP_SelectList(this); selectList.Show(); - selectList.LoadList(compidx); + selectList.LoadList(PUB.user.CompanyIdx); dataGridView1.Rows.Clear(); } @@ -73,7 +69,7 @@ namespace UniMarc string Table = "DVD_List_Product"; string Area = "`idx`, `num`, `code`, `title`, `artist`, `comp`, `price`, `m_idx`"; string[] Search_Table = { "compidx", "listname", "date" }; - string[] Search_Column = { compidx, ListName, date }; + string[] Search_Column = { PUB.user.CompanyIdx, ListName, date }; string cmd = db.More_DB_Search(Table, Search_Table, Search_Column, Area); string res = db.DB_Send_CMD_Search(cmd); @@ -512,7 +508,7 @@ namespace UniMarc string[] Insert_col = { "compidx", "listname", "date", "user", "num", "code", "title", "artist", "comp", "price" }; string[] Insert_data = { - compidx, + PUB.user.CompanyIdx, lbl_ListTitle.Text, lbl_date.Text, Properties.Settings.Default.User, @@ -531,7 +527,7 @@ namespace UniMarc for (int a = 0; a < DeleteIndex.Count; a++) { - db.DB_Send_CMD_reVoid(db.DB_Delete("DVD_List_Product", "compidx", compidx, "idx", DeleteIndex[a])); + db.DB_Send_CMD_reVoid(db.DB_Delete("DVD_List_Product", "compidx", PUB.user.CompanyIdx, "idx", DeleteIndex[a])); } } diff --git a/unimarc/unimarc/마크/Check_ISBN.cs b/unimarc/unimarc/마크/Check_ISBN.cs index 0cb2aa9..757eaad 100644 --- a/unimarc/unimarc/마크/Check_ISBN.cs +++ b/unimarc/unimarc/마크/Check_ISBN.cs @@ -31,7 +31,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; mSearchText = pSearchText; mListIDX = pListIDX; } diff --git a/unimarc/unimarc/마크/DLS_Copy.cs b/unimarc/unimarc/마크/DLS_Copy.cs index e649ef9..113037d 100644 --- a/unimarc/unimarc/마크/DLS_Copy.cs +++ b/unimarc/unimarc/마크/DLS_Copy.cs @@ -23,7 +23,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; //https://dls.edunet.net/DLS/totalLoginMain //아이디: yudeok5530 비번: YUDEOK6578 diff --git a/unimarc/unimarc/마크/DLS_Lookup.cs b/unimarc/unimarc/마크/DLS_Lookup.cs index e42e695..3a0e786 100644 --- a/unimarc/unimarc/마크/DLS_Lookup.cs +++ b/unimarc/unimarc/마크/DLS_Lookup.cs @@ -18,7 +18,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } #region SHDocVw diff --git a/unimarc/unimarc/마크/Mac_Input.cs b/unimarc/unimarc/마크/Mac_Input.cs index cb05a1a..0b7ab03 100644 --- a/unimarc/unimarc/마크/Mac_Input.cs +++ b/unimarc/unimarc/마크/Mac_Input.cs @@ -132,7 +132,7 @@ namespace UniMarc private void btn_db_save_Click(object sender, EventArgs e) { string Time = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); - string user = main.User; + string user = PUB.user.UserName; string compidx = UniMarc.Properties.Settings.Default.compidx; string table = "Marc"; string[] GridCol = { "isbn", "book_name", "series", "author", "book_comp", "price" }; diff --git a/unimarc/unimarc/마크/Mac_List.Designer.cs b/unimarc/unimarc/마크/Mac_List.Designer.cs index 21103e7..0a3198b 100644 --- a/unimarc/unimarc/마크/Mac_List.Designer.cs +++ b/unimarc/unimarc/마크/Mac_List.Designer.cs @@ -77,18 +77,18 @@ this.panel3 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel(); this.bn1 = new System.Windows.Forms.BindingNavigator(this.components); + this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton(); + this.bs1 = new System.Windows.Forms.BindingSource(this.components); + this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel(); + this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorMoveFirstItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorMovePreviousItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorSeparator = new System.Windows.Forms.ToolStripSeparator(); this.bindingNavigatorPositionItem = new System.Windows.Forms.ToolStripTextBox(); - this.bindingNavigatorCountItem = new System.Windows.Forms.ToolStripLabel(); this.bindingNavigatorSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.bindingNavigatorMoveNextItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorMoveLastItem = new System.Windows.Forms.ToolStripButton(); this.bindingNavigatorSeparator2 = new System.Windows.Forms.ToolStripSeparator(); - this.bindingNavigatorAddNewItem = new System.Windows.Forms.ToolStripButton(); - this.bindingNavigatorDeleteItem = new System.Windows.Forms.ToolStripButton(); - this.bs1 = new System.Windows.Forms.BindingSource(this.components); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); @@ -613,6 +613,31 @@ this.bn1.TabIndex = 49; this.bn1.Text = "bindingNavigator1"; // + // bindingNavigatorAddNewItem + // + this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image"))); + this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem"; + this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorAddNewItem.Text = "새로 추가"; + // + // bindingNavigatorCountItem + // + this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; + this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22); + this.bindingNavigatorCountItem.Text = "/{0}"; + this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수"; + // + // bindingNavigatorDeleteItem + // + this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; + this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image"))); + this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem"; + this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true; + this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22); + this.bindingNavigatorDeleteItem.Text = "삭제"; + // // bindingNavigatorMoveFirstItem // this.bindingNavigatorMoveFirstItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; @@ -646,16 +671,9 @@ this.bindingNavigatorPositionItem.Text = "0"; this.bindingNavigatorPositionItem.ToolTipText = "현재 위치"; // - // bindingNavigatorCountItem - // - this.bindingNavigatorCountItem.Name = "bindingNavigatorCountItem"; - this.bindingNavigatorCountItem.Size = new System.Drawing.Size(27, 22); - this.bindingNavigatorCountItem.Text = "/{0}"; - this.bindingNavigatorCountItem.ToolTipText = "전체 항목 수"; - // // bindingNavigatorSeparator1 // - this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator"; + this.bindingNavigatorSeparator1.Name = "bindingNavigatorSeparator1"; this.bindingNavigatorSeparator1.Size = new System.Drawing.Size(6, 25); // // bindingNavigatorMoveNextItem @@ -678,27 +696,9 @@ // // bindingNavigatorSeparator2 // - this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator"; + this.bindingNavigatorSeparator2.Name = "bindingNavigatorSeparator2"; this.bindingNavigatorSeparator2.Size = new System.Drawing.Size(6, 25); // - // bindingNavigatorAddNewItem - // - this.bindingNavigatorAddNewItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.bindingNavigatorAddNewItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorAddNewItem.Image"))); - this.bindingNavigatorAddNewItem.Name = "bindingNavigatorAddNewItem"; - this.bindingNavigatorAddNewItem.RightToLeftAutoMirrorImage = true; - this.bindingNavigatorAddNewItem.Size = new System.Drawing.Size(23, 22); - this.bindingNavigatorAddNewItem.Text = "새로 추가"; - // - // bindingNavigatorDeleteItem - // - this.bindingNavigatorDeleteItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image; - this.bindingNavigatorDeleteItem.Image = ((System.Drawing.Image)(resources.GetObject("bindingNavigatorDeleteItem.Image"))); - this.bindingNavigatorDeleteItem.Name = "bindingNavigatorDeleteItem"; - this.bindingNavigatorDeleteItem.RightToLeftAutoMirrorImage = true; - this.bindingNavigatorDeleteItem.Size = new System.Drawing.Size(23, 22); - this.bindingNavigatorDeleteItem.Text = "삭제"; - // // Mac_List // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); diff --git a/unimarc/unimarc/마크/Mac_List.cs b/unimarc/unimarc/마크/Mac_List.cs index 981ef99..239ea69 100644 --- a/unimarc/unimarc/마크/Mac_List.cs +++ b/unimarc/unimarc/마크/Mac_List.cs @@ -20,8 +20,8 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; - user_name = main.botUserLabel.Text; + compidx = PUB.user.CompanyIdx; + user_name = PUB.user.UserName; dataGridView1.AutoGenerateColumns = false; dataGridView1.DataSource = bs1; @@ -174,7 +174,6 @@ namespace UniMarc { Mac_List_Merge merge = new Mac_List_Merge(this); merge.ListState = cb_state.Text; - merge.UserName = main.User; merge.Show(); } @@ -276,12 +275,6 @@ namespace UniMarc { var marc = this.main.OpenFormInTab(() => new Marc2(this), allowMultiple: true); marc.input_list(item); - //item.idx, - //item.list_name, - //compidx, - //item.customer, - //item.customer_name - //); } else { diff --git a/unimarc/unimarc/마크/Mac_List.resx b/unimarc/unimarc/마크/Mac_List.resx index f4c2138..a73c7d5 100644 --- a/unimarc/unimarc/마크/Mac_List.resx +++ b/unimarc/unimarc/마크/Mac_List.resx @@ -168,14 +168,14 @@ - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAFXSURBVDhPzc9LSwJhFAZgd5FkaAlFRCEhVCRm9T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rlX/qt4TABjdLmBBQC+0b+zZl1WGAAAAABJRU5ErkJggg== + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wgAADsIBFShKgAAAAStJREFUOE9jYBhUoHDW8//oYjAAkmta8Px/5sTHONUw5M589j+h+x5WBSC5VUfe + /w9vf4BVHgwypjz9P2//7/8JXXcwFIHkFu778D+44RqGHBwk9Dz5P3vfr/+dW//+dyu9jKIQJDdty/v/ + /tUXcBsQ2fXo/5Rtv/6XLP37P2H63/82uWfhikFyvas//PcqPYHbgMDmh/9b174HazYu+fJfOvraf+PI + ZWANILm6+e/+u+QfwG2AR9X9/yVz38E1K7r0wBWD5PKnvflvn7EdtwH2pXf/B7Y8w9AMk8ue/Pq/RcJ6 + 3AZY5N35b1NwBUMzTC61/zXcS1iBYdZtrJpBACQX1vLyv27wPKzyYKCTdgOnJEjOr/rhfw3faTjV4AVO + uVf+q3hMAGN0uYEFAL7Rv7NmXVYYAAAAAElFTkSuQmCC diff --git a/unimarc/unimarc/마크/Mac_List_Add.cs b/unimarc/unimarc/마크/Mac_List_Add.cs index cc97cfd..bea7e90 100644 --- a/unimarc/unimarc/마크/Mac_List_Add.cs +++ b/unimarc/unimarc/마크/Mac_List_Add.cs @@ -280,7 +280,7 @@ namespace UniMarc { where += $" and c_sangho like '%{inputsearch.Replace("'", "''")}%'"; } - var dt = DB2.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where); + var dt = Helper_DB.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where); using (var f = new fSelectDT(dt)) if (f.ShowDialog() == DialogResult.OK) { diff --git a/unimarc/unimarc/마크/Mac_List_Merge.cs b/unimarc/unimarc/마크/Mac_List_Merge.cs index 69c0acf..629c0e7 100644 --- a/unimarc/unimarc/마크/Mac_List_Merge.cs +++ b/unimarc/unimarc/마크/Mac_List_Merge.cs @@ -16,7 +16,6 @@ namespace UniMarc Helper_DB db = new Helper_DB(); Skill_Grid skill = new Skill_Grid(); - public string UserName = ""; public string ListState = ""; string date = DateTime.Now.ToString("yyyy-MM-dd"); @@ -28,7 +27,7 @@ namespace UniMarc private void Mac_List_Merge_Load(object sender, EventArgs e) { - lbl_charge.Text = UserName; + lbl_charge.Text = PUB.user.UserName; lbl_state.Text = ListState; db.DBcon(); diff --git a/unimarc/unimarc/마크/Mac_Output.cs b/unimarc/unimarc/마크/Mac_Output.cs index 8f5dc7e..d5de11c 100644 --- a/unimarc/unimarc/마크/Mac_Output.cs +++ b/unimarc/unimarc/마크/Mac_Output.cs @@ -21,7 +21,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Mac_Output_Load(object sender, EventArgs e) diff --git a/unimarc/unimarc/마크/Mac_Stat.cs b/unimarc/unimarc/마크/Mac_Stat.cs index b8a457c..f676f47 100644 --- a/unimarc/unimarc/마크/Mac_Stat.cs +++ b/unimarc/unimarc/마크/Mac_Stat.cs @@ -19,7 +19,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Mac_Stat_Load(object sender, EventArgs e) diff --git a/unimarc/unimarc/마크/Marc.cs b/unimarc/unimarc/마크/Marc.cs index 35ddfec..d01b0dd 100644 --- a/unimarc/unimarc/마크/Marc.cs +++ b/unimarc/unimarc/마크/Marc.cs @@ -23,8 +23,6 @@ namespace UniMarc /// string[] data_book = { "", "", "", "", "" }; int SaveRowIdx = -1; - public string mUserName; - string mCompidx = UniMarc.Properties.Settings.Default.compidx; string mListIdx = ""; public string find; public string change; @@ -40,17 +38,10 @@ namespace UniMarc String_Text st = new String_Text(); Mac_List ml; - public Marc() - { - InitializeComponent(); - this.ml = null; - mUserName = string.Empty; - } public Marc(Mac_List _ml) { InitializeComponent(); ml = _ml; - mUserName = ml.user_name; } string l_idx = string.Empty; @@ -119,7 +110,7 @@ namespace UniMarc if (value.isEmpty() == false) { if (value.IndexOf("]") != -1) - this.Text = $"마크 작성(1)-{value.Substring(value.IndexOf("]")+1)}"; + this.Text = $"마크 작성(1)-{value.Substring(value.IndexOf("]") + 1)}"; else this.Text = $"마크 작성(1){value}"; } @@ -213,7 +204,7 @@ namespace UniMarc //} string Chk_Cmd = string.Format("SELECT {0} FROM {1} WHERE `{2}` = \"{3}\" ORDER BY FIELD(`compidx`, {4}) DESC;", - Area, Table, sear_tbl[0], sear_col[0], mCompidx); + Area, Table, sear_tbl[0], sear_col[0], PUB.user.CompanyIdx); string Chk_Res = db.DB_Send_CMD_Search(Chk_Cmd); string[] Chk_Arr = Chk_Res.Split('|'); @@ -226,7 +217,7 @@ namespace UniMarc continue; } - if (Chk_Arr[1] != mCompidx) + if (Chk_Arr[1] != PUB.user.CompanyIdx) isMyData = false; string[] MarcData = { Chk_Arr[2], Chk_Arr[4], Chk_Arr[6] }; @@ -450,7 +441,7 @@ namespace UniMarc if (BaseText.IndexOf(lblisbn) < 0) { - UTIL.MsgE("저장된 ISBN이 마크데이터에 없습니다.\nISBN값이 변경되었습니다"); + UTIL.MsgE("저장된 ISBN이 마크데이터에 없습니다.\nISBN값이 변경되었습니다"); //if (dlg != DialogResult.Yes) return; return; } @@ -500,11 +491,11 @@ namespace UniMarc string[] Insert_col = { grid_data[0], grid_data[1], grid_data[2], grid_data[3], grid_data[4], orimarc, etc1.Text, etc2.Text, grid_data[5], - grade.ToString(), "1", mUserName, tag056, text008.Text, - date, mCompidx }; + grade.ToString(), "1", PUB.user.UserName, tag056, text008.Text, + date, PUB.user.CompanyIdx }; string Incmd = db.DB_INSERT(table_name, Insert_tbl, Insert_col); - PUB.log.Add("INSERT", string.Format("{0}({1},{2}) : {3}", mUserName, mCompidx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, Incmd)); + PUB.log.Add("INSERT", string.Format("{0}({1},{2}) : {3}", PUB.user.UserName, PUB.user.CompanyIdx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, Incmd)); db.DB_Send_CMD_reVoid(Incmd); isNewData = true; } @@ -515,11 +506,11 @@ namespace UniMarc "비고2", "url", "division", "008tag", "date", "user", "grade" }; string[] Edit_col = { - mCompidx, orimarc, "1", mOldMarc , "0", etc1.Text, + PUB.user.CompanyIdx, orimarc, "1", mOldMarc , "0", etc1.Text, etc2.Text, grid_data[5], tag056, text008.Text, date, - mUserName, grade.ToString() }; + PUB.user.UserName, grade.ToString() }; string[] Sear_tbl = { "idx", "compidx" }; - string[] Sear_col = { Midx, mCompidx }; + string[] Sear_col = { Midx, PUB.user.CompanyIdx }; if (grid_data[0] == null || grid_data[0] == "") { MessageBox.Show("ISBN 데이터가 없습니다."); @@ -527,29 +518,29 @@ namespace UniMarc } 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, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, U_cmd.Replace("\r", " ").Replace("\n", " "))); + PUB.log.Add("Update", string.Format("{0}({1},{2}) : {3}", PUB.user.UserName, PUB.user.CompanyIdx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, U_cmd.Replace("\r", " ").Replace("\n", " "))); db.DB_Send_CMD_reVoid(U_cmd); isNewData = false; } List_Book.Rows[SaveRowIdx].Cells["grade"].Value = grade.ToString(); List_Book.Rows[SaveRowIdx].Cells["SaveDate"].Value = date; - List_Book.Rows[SaveRowIdx].Cells["user"].Value = mUserName; + List_Book.Rows[SaveRowIdx].Cells["user"].Value = PUB.user.UserName; List_Book.Rows[SaveRowIdx].Cells["db_marc"].Value = orimarc; List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor = SetGradeColor(grade.ToString()); if (isNewData) { - string MidxQuery = string.Format("SELECT `idx` FROM Marc WHERE isbn = {0} AND `compidx` = {1};", grid_data[0], mCompidx); - PUB.log.Add("MarcInsert", string.Format("{0}({1}) : {2}", mUserName, mCompidx, MidxQuery)); + string MidxQuery = string.Format("SELECT `idx` FROM Marc WHERE isbn = {0} AND `compidx` = {1};", grid_data[0], PUB.user.CompanyIdx); + PUB.log.Add("MarcInsert", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, MidxQuery)); Midx = db.DB_Send_CMD_Search(MidxQuery).Replace("|", ""); List_Book.Rows[SaveRowIdx].Cells["marc_idx"].Value = Midx; } string UpdateListIndex = string.Format("UPDATE `Obj_List_Book` SET `m_idx` = {0} WHERE `idx` = {1} AND 'compidx' ={2};", - Midx, List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value.ToString(), mCompidx); - PUB.log.Add("MarcUpdate", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpdateListIndex)); + 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)); db.DB_Send_CMD_reVoid(UpdateListIndex); MessageBox.Show("저장되었습니다!"); } @@ -566,7 +557,7 @@ namespace UniMarc { if (TimeSpanDaysValue < -1) return false; - if (user != mUserName) + if (user != PUB.user.UserName) return false; return true; @@ -801,7 +792,7 @@ namespace UniMarc cb_grade.SelectedIndex = grade; OnSaveData(row_idx); } - + #region CellClick_Sub void OnSaveData(int row) @@ -1224,7 +1215,7 @@ namespace UniMarc private void checkBox1_CheckedChanged(object sender, EventArgs e) { - var chk = sender as CheckBox; + var chk = sender as CheckBox; string name = chk.Name; if (chk.Checked == true) { @@ -1590,7 +1581,7 @@ namespace UniMarc foreach (var kvp in fb.BulkMarcResults) { int targetListIdx = kvp.Key; - foreach (DataGridViewRow r in List_Book.Rows) + foreach (DataGridViewRow r in List_Book.Rows) { // In legacy Marc.cs, finding row by index logic might be similar? // Marc_FillBlank used 'idx' from 'List_idx' column in legacy logic too? @@ -1602,7 +1593,7 @@ namespace UniMarc // In Marc.cs line 1579: `a.ToString()` is passed as first element. // So `idx` in `BulkMarcResults` IS `a` (the row index). // So we can directly access `List_Book.Rows[targetListIdx]`. - + if (targetListIdx >= 0 && targetListIdx < List_Book.Rows.Count) { List_Book.Rows[targetListIdx].Cells["db_marc"].Value = kvp.Value; @@ -3576,7 +3567,7 @@ namespace UniMarc { where = $"c_sangho like '%{inputsearch.Replace("'", "''")}%'"; } - var dt = DB2.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where); + var dt = Helper_DB.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where); using (var f = new fSelectDT(dt)) if (f.ShowDialog() == DialogResult.OK) { @@ -3588,9 +3579,9 @@ namespace UniMarc if (int.TryParse(lbCustIDX.Text, out int custidx) && custidx >= 0) { var sql = $"update Obj_List set customer={custidx} where idx = {l_idx} and comp_num={c_idx}"; - var cnt = DB2.ExcuteNonQuery(sql); + var cnt = Helper_DB.ExcuteNonQuery(sql, out string msg); if (cnt != 1) - UTIL.MsgE($"데이터 저장시 오류가 발생했습니다. 영향을 받은 행 수 = {cnt}"); + UTIL.MsgE($"데이터 저장시 오류가 발생했습니다. 영향을 받은 행 수 = {cnt},메세지={msg}"); } } diff --git a/unimarc/unimarc/마크/Marc2.cs b/unimarc/unimarc/마크/Marc2.cs index 7dde685..94d8639 100644 --- a/unimarc/unimarc/마크/Marc2.cs +++ b/unimarc/unimarc/마크/Marc2.cs @@ -1,7 +1,4 @@ using AR; -using OpenQA.Selenium.DevTools.V136.Animation; -using OpenQA.Selenium.DevTools.V136.Overlay; -using Org.BouncyCastle.Asn1.CryptoPro; using System; using System.Collections.Generic; using System.Drawing; @@ -25,7 +22,7 @@ namespace UniMarc string[] data_book = { "", "", "", "", "" }; int SaveRowIdx = -1; public string mUserName; - string mCompidx = UniMarc.Properties.Settings.Default.compidx; + string mCompidx = PUB.user.CompanyIdx; string mListIdx = ""; public string find; public string change; @@ -59,7 +56,7 @@ namespace UniMarc { InitializeComponent(); ml = _ml; - mUserName = ml.user_name; + mUserName = PUB.user.UserName; marcEditorControl1.db = this.db; marcEditorControl1.BookSaved += MarcEditorControl_BookSaved; marcEditorControl1.FillBlankClicked += MarcEditorControl_FillBlankClicked; @@ -138,7 +135,7 @@ namespace UniMarc string Area = "`idx`, `isbn_marc`, `header`, `num`, `book_name`, `author`, `book_comp`, `count`, `pay`, `image_url`, `m_idx`"; string[] sear_tbl = { "l_idx", "compidx" }; - string[] sear_col = { item.idx, Properties.Settings.Default.compidx }; + string[] sear_col = { item.idx, PUB.user.CompanyIdx }; lbl_BookList.Text = item.list_name; tbCustName.Text = item.customer_name; @@ -916,7 +913,7 @@ namespace UniMarc { where = $"c_sangho like '%{inputsearch.Replace("'", "''")}%'"; } - var dt = DB2.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where); + var dt = Helper_DB.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where); using (var f = new fSelectDT(dt)) if (f.ShowDialog() == DialogResult.OK) { @@ -927,10 +924,10 @@ namespace UniMarc if (int.TryParse(lbCustIDX.Text, out int custidx) && custidx >= 0) { - var sql = $"update Obj_List set customer={custidx} where idx = {pItem.idx} and comp_num={Properties.Settings.Default.compidx}"; - var cnt = DB2.ExcuteNonQuery(sql); + var sql = $"update Obj_List set customer={custidx} where idx = {pItem.idx} and comp_num={PUB.user.CompanyIdx}"; + var cnt = Helper_DB.ExcuteNonQuery(sql,out string msg); if (cnt != 1) - UTIL.MsgE($"데이터 저장시 오류가 발생했습니다. 영향을 받은 행 수 = {cnt}"); + UTIL.MsgE($"데이터 저장시 오류가 발생했습니다. 영향을 받은 행 수 = {cnt},메세지={msg}"); } } diff --git a/unimarc/unimarc/마크/Marc_mkList.cs b/unimarc/unimarc/마크/Marc_mkList.cs index 4d0cb99..822b93f 100644 --- a/unimarc/unimarc/마크/Marc_mkList.cs +++ b/unimarc/unimarc/마크/Marc_mkList.cs @@ -88,7 +88,7 @@ namespace UniMarc if (int.TryParse(marc.lbCustIDX.Text, out int custidx) == true && custidx > 0) { string mCompidx = UniMarc.Properties.Settings.Default.compidx; - var dt = DB2.GetDT("Client", "c_sangho,c_author_first,c_author_typeK,c_author_typeE,c_author_firstbook,c_author_divtype,c_author_divnum,c_author_four,c_pijunja,c_author_four_use", $"campanyidx = {mCompidx} AND idx = {custidx}"); + var dt = Helper_DB.GetDT("Client", "c_sangho,c_author_first,c_author_typeK,c_author_typeE,c_author_firstbook,c_author_divtype,c_author_divnum,c_author_four,c_pijunja,c_author_four_use", $"campanyidx = {mCompidx} AND idx = {custidx}"); if (dt != null && dt.Rows.Count > 0) { var row = dt.Rows[0]; diff --git a/unimarc/unimarc/마크/Search_Infor.cs b/unimarc/unimarc/마크/Search_Infor.cs index 2bca6e7..247204b 100644 --- a/unimarc/unimarc/마크/Search_Infor.cs +++ b/unimarc/unimarc/마크/Search_Infor.cs @@ -20,7 +20,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Search_Infor_Load(object sender, EventArgs e) { @@ -409,7 +409,7 @@ namespace UniMarc cbUser.Items.Clear(); cbUser.Items.Add("전체"); - string compName = main.toolStripLabel2.Text; + string compName = main.lbCompanyName.Text; string cmd = string.Format("SELECT `name` FROM `User_Data` WHERE `affil` = \"{0}\"", compName); string res = db.self_Made_Cmd(cmd); List Aryres = res.Split('|').ToList(); @@ -459,7 +459,7 @@ namespace UniMarc else if (cb_filter.SelectedItem.ToString() == "작성자") { cb_filterDetail.Items.Add("전체"); - string compName = main.toolStripLabel2.Text; + string compName = main.lbCompanyName.Text; string cmd = string.Format("SELECT `name` FROM `User_Data` WHERE `affil` = \"{0}\"", compName); string res = db.self_Made_Cmd(cmd); string[] Aryres = res.Split('|'); diff --git a/unimarc/unimarc/편의기능/Calendar.cs b/unimarc/unimarc/편의기능/Calendar.cs index 80c342f..d3f0136 100644 --- a/unimarc/unimarc/편의기능/Calendar.cs +++ b/unimarc/unimarc/편의기능/Calendar.cs @@ -20,7 +20,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Calendar_Load(object sender, EventArgs e) diff --git a/unimarc/unimarc/편의기능/Quick_menu.cs b/unimarc/unimarc/편의기능/Quick_menu.cs index 7975050..a192858 100644 --- a/unimarc/unimarc/편의기능/Quick_menu.cs +++ b/unimarc/unimarc/편의기능/Quick_menu.cs @@ -20,7 +20,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Quick_menu_Load(object sender, EventArgs e) { @@ -141,7 +141,7 @@ namespace UniMarc { string Table = "User_ShortCut"; - string User = main.User_Name; + string User = PUB.user.UserName; ComboBox[] DetailMenu = { cb_setShort1, cb_setShort2, cb_setShort3, cb_setShort4, cb_setShort5, diff --git a/unimarc/unimarc/홈/Home_User_manage.cs b/unimarc/unimarc/홈/Home_User_manage.cs index 5e855d1..ac18c07 100644 --- a/unimarc/unimarc/홈/Home_User_manage.cs +++ b/unimarc/unimarc/홈/Home_User_manage.cs @@ -27,7 +27,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - comp_name = main.toolStripLabel2.Text; + comp_name = main.lbCompanyName.Text; tUserAccesschkBox =new CheckBox[] { chk_Div_ListInput, chk_Div_ListLookup, chk_Div_ListTotal, chk_Div_OrderInput, chk_Div_Inven, @@ -96,7 +96,7 @@ namespace UniMarc private void Load_CompanyList() { cbCompany.Items.Clear(); - string compName = main.toolStripLabel2.Text; + string compName = main.lbCompanyName.Text; string cmd = string.Format("SELECT `comp_name` FROM Comp"); string res = mDB.self_Made_Cmd(cmd); List Aryres = res.Split('|').ToList(); diff --git a/unimarc/unimarc/홈/Order_manage.cs b/unimarc/unimarc/홈/Order_manage.cs index e93c7fb..c0edc27 100644 --- a/unimarc/unimarc/홈/Order_manage.cs +++ b/unimarc/unimarc/홈/Order_manage.cs @@ -39,7 +39,7 @@ namespace UniMarc if (tb_search.Text == "") { string[] Where_Table = { "comparyidx" }; - string[] Search_Data = { main.com_idx }; + string[] Search_Data = { PUB.user.CompanyIdx }; string cmd = db.More_DB_Search("Purchase", Where_Table, Search_Data, Search_Table); string db_res = db.DB_Send_CMD_Search(cmd); Made_Grid(db_res); @@ -52,7 +52,7 @@ namespace UniMarc if (cb_search_filter.SelectedIndex == 2) Search_col[0] = "tel"; if (cb_search_filter.SelectedIndex == 4) Search_col[0] = "fax"; if (cb_search_filter.SelectedIndex == 3) Search_col[0] = "bubin"; - string cmd = db.DB_Contains("Purchase", main.com_idx, Search_col[0], tb_search.Text, Search_Table); + string cmd = db.DB_Contains("Purchase", PUB.user.CompanyIdx, Search_col[0], tb_search.Text, Search_Table); string db_res = db.DB_Send_CMD_Search(cmd); Made_Grid(db_res); } @@ -164,7 +164,7 @@ namespace UniMarc "compidx", "puridx" }; string[] Search_Data = { - main.com_idx, + PUB.user.CompanyIdx, lbl_idx.Text }; @@ -217,7 +217,7 @@ namespace UniMarc { string Table = "Purchase"; string[] Search_Table = { "comparyidx", "idx" }; - string[] Search_Data = { main.com_idx, lbl_idx.Text }; + string[] Search_Data = { PUB.user.CompanyIdx, lbl_idx.Text }; bool Isinsert = false; string cmd = db.More_DB_Search(Table, Search_Table, Search_Data); @@ -321,7 +321,7 @@ namespace UniMarc private void btn_SaveIW_Click(object sender, EventArgs e) { // 사전준비 - string compidx = main.com_idx; + string compidx = PUB.user.CompanyIdx; string puridx = lbl_idx.Text; string word = tb_IndexWord.Text; string persent = tb_persent.Value.ToString(); @@ -375,7 +375,7 @@ namespace UniMarc "AND `{7}` = \"{8}\" " + "LIMIT 1;", "IndexWord", - "compidx", main.com_idx, + "compidx", PUB.user.CompanyIdx, "puridx", puridx, "word", word, "persent", persent); @@ -440,7 +440,7 @@ namespace UniMarc { int count = dgv_WordSUB.RowCount; - string compidx = main.com_idx; + string compidx = PUB.user.CompanyIdx; string puridx = lbl_idx.Text; for (int a = 0; a < count; a++) { diff --git a/unimarc/unimarc/홈/Transaction_manage.cs b/unimarc/unimarc/홈/Transaction_manage.cs index 8bf7076..0311959 100644 --- a/unimarc/unimarc/홈/Transaction_manage.cs +++ b/unimarc/unimarc/홈/Transaction_manage.cs @@ -35,7 +35,7 @@ namespace UniMarc }; cb_dlsArea.Items.AddRange(dlsArea); - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; panel4.Visible = false; db.DBcon(); @@ -121,7 +121,7 @@ namespace UniMarc tb_mail.Text = ""; tb_man.Text = ""; tb_man1.Text = ""; - tb_user.Text = main.User; + tb_user.Text = PUB.user.UserName; tb_zip.Text = ""; tb_addr.Text = ""; tb_id.Text = ""; diff --git a/unimarc/unimarc/홈/User_Infor.cs b/unimarc/unimarc/홈/User_Infor.cs index 1c51f3e..9bf21b7 100644 --- a/unimarc/unimarc/홈/User_Infor.cs +++ b/unimarc/unimarc/홈/User_Infor.cs @@ -39,7 +39,7 @@ namespace UniMarc "`jongmok`, `zip`, `addr`, `tel`, `fax`, " + "`bank_comp`, `bank_no`, `email`, `barea`, `smtp`, " + "`port`, `email_ID`, `email_PW`, `print`, `statement`, `kind`"; - string cmd = db.DB_Select_Search(Area, "Comp", "idx", main.com_idx); + string cmd = db.DB_Select_Search(Area, "Comp", "idx", PUB.user.CompanyIdx); string db_res = db.DB_Send_CMD_Search(cmd); string[] data = db_res.Split('|'); made_Form(data); @@ -88,7 +88,7 @@ namespace UniMarc "bank_no", "email", "barea", "smtp", "port", "email_ID", "email_PW", "print", "statement", "kind"}; string[] search_col = { "idx", "comp_name" }; - string[] search_name = { main.com_idx, 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); db.DB_Send_CMD_reVoid(U_cmd); MessageBox.Show("저장되었습니다."); diff --git a/unimarc/unimarc/회계/Part_time.cs b/unimarc/unimarc/회계/Part_time.cs index 884fb8c..010dcc9 100644 --- a/unimarc/unimarc/회계/Part_time.cs +++ b/unimarc/unimarc/회계/Part_time.cs @@ -20,7 +20,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Part_time_Load(object sender, EventArgs e) diff --git a/unimarc/unimarc/회계/Purchase_Aggregation.cs b/unimarc/unimarc/회계/Purchase_Aggregation.cs index f050b19..70d595d 100644 --- a/unimarc/unimarc/회계/Purchase_Aggregation.cs +++ b/unimarc/unimarc/회계/Purchase_Aggregation.cs @@ -20,7 +20,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Purchase_Aggregation_Load(object sender, EventArgs e) { diff --git a/unimarc/unimarc/회계/Purchase_Book.cs b/unimarc/unimarc/회계/Purchase_Book.cs index c0c9dd0..ed6744d 100644 --- a/unimarc/unimarc/회계/Purchase_Book.cs +++ b/unimarc/unimarc/회계/Purchase_Book.cs @@ -22,7 +22,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } public Purchase_Book(Purchase_Aggregation _pa) { diff --git a/unimarc/unimarc/회계/Remit_reg.cs b/unimarc/unimarc/회계/Remit_reg.cs index 354cd10..c57082f 100644 --- a/unimarc/unimarc/회계/Remit_reg.cs +++ b/unimarc/unimarc/회계/Remit_reg.cs @@ -19,7 +19,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Remit_reg_Load(object sender, EventArgs e) { diff --git a/unimarc/unimarc/회계/Remit_reg2.cs b/unimarc/unimarc/회계/Remit_reg2.cs index c01db8d..ae22d20 100644 --- a/unimarc/unimarc/회계/Remit_reg2.cs +++ b/unimarc/unimarc/회계/Remit_reg2.cs @@ -21,7 +21,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Remit_reg2_Load(object sender, EventArgs e) { @@ -88,8 +88,8 @@ namespace UniMarc "bank_num", "bank_name", "send_money", "etc", "payment", "reg_man" }; string[] input_data = { compidx, 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, "False", - main.User }; + tb_bank_num.Text, tb_bank_boss.Text, tb_send_money.Text, tb_etc.Text, "False", + PUB.user.UserName }; string Incmd = db.DB_INSERT("Remit_reg", input_table, input_data); db.DB_Send_CMD_reVoid(Incmd); diff --git a/unimarc/unimarc/회계/Sales_Book.cs b/unimarc/unimarc/회계/Sales_Book.cs index f9e8715..829c11a 100644 --- a/unimarc/unimarc/회계/Sales_Book.cs +++ b/unimarc/unimarc/회계/Sales_Book.cs @@ -28,7 +28,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Sales_Book_Load(object sender, EventArgs e) { diff --git a/unimarc/unimarc/회계/Sales_Deposit.cs b/unimarc/unimarc/회계/Sales_Deposit.cs index d84560e..fa87e0c 100644 --- a/unimarc/unimarc/회계/Sales_Deposit.cs +++ b/unimarc/unimarc/회계/Sales_Deposit.cs @@ -19,7 +19,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Sales_Deposit_Load(object sender, EventArgs e) { diff --git a/unimarc/unimarc/회계/Sales_In_Pay.cs b/unimarc/unimarc/회계/Sales_In_Pay.cs index 7026e82..fc5728a 100644 --- a/unimarc/unimarc/회계/Sales_In_Pay.cs +++ b/unimarc/unimarc/회계/Sales_In_Pay.cs @@ -21,7 +21,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Sales_In_Pay_Load(object sender, EventArgs e) { diff --git a/unimarc/unimarc/회계/Sales_Input.cs b/unimarc/unimarc/회계/Sales_Input.cs index 4f88f2d..66c63c4 100644 --- a/unimarc/unimarc/회계/Sales_Input.cs +++ b/unimarc/unimarc/회계/Sales_Input.cs @@ -23,7 +23,7 @@ namespace UniMarc private void Sales_Input_Load(object sender, EventArgs e) { db.DBcon(); - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void btn_Add_Click(object sender, EventArgs e) { diff --git a/unimarc/unimarc/회계/Sales_Lookup.cs b/unimarc/unimarc/회계/Sales_Lookup.cs index e103abd..1b6347d 100644 --- a/unimarc/unimarc/회계/Sales_Lookup.cs +++ b/unimarc/unimarc/회계/Sales_Lookup.cs @@ -18,7 +18,7 @@ namespace UniMarc { InitializeComponent(); main = _main; - compidx = main.com_idx; + compidx = PUB.user.CompanyIdx; } private void Sales_Book_Load(object sender, EventArgs e) {