diff --git a/unimarc/.vs/unimarc/v16/.suo b/unimarc/.vs/unimarc/v16/.suo index 422d6d3..3f1e447 100644 Binary files a/unimarc/.vs/unimarc/v16/.suo and b/unimarc/.vs/unimarc/v16/.suo differ diff --git a/unimarc/unimarc/bin/Debug/UniMarc.exe b/unimarc/unimarc/bin/Debug/UniMarc.exe index eab2f5d..476c3ad 100644 Binary files a/unimarc/unimarc/bin/Debug/UniMarc.exe and b/unimarc/unimarc/bin/Debug/UniMarc.exe differ diff --git a/unimarc/unimarc/bin/Debug/UniMarc.pdb b/unimarc/unimarc/bin/Debug/UniMarc.pdb index df99e0e..b7f393b 100644 Binary files a/unimarc/unimarc/bin/Debug/UniMarc.pdb and b/unimarc/unimarc/bin/Debug/UniMarc.pdb differ diff --git a/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll b/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll index d5364f9..2d86a24 100644 Binary files a/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll and b/unimarc/unimarc/bin/Debug/ko/UniMarc.resources.dll differ diff --git a/unimarc/unimarc/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/unimarc/unimarc/obj/Debug/DesignTimeResolveAssemblyReferences.cache index 140a2a6..3bbe158 100644 Binary files a/unimarc/unimarc/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/unimarc/unimarc/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache b/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache index 2acd9f3..6db7f95 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache and b/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csprojAssemblyReference.cache b/unimarc/unimarc/obj/Debug/UniMarc.csprojAssemblyReference.cache index ae138ca..56a7808 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.csprojAssemblyReference.cache and b/unimarc/unimarc/obj/Debug/UniMarc.csprojAssemblyReference.cache differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.exe b/unimarc/unimarc/obj/Debug/UniMarc.exe index eab2f5d..476c3ad 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.exe and b/unimarc/unimarc/obj/Debug/UniMarc.exe differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.pdb b/unimarc/unimarc/obj/Debug/UniMarc.pdb index df99e0e..b7f393b 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.pdb and b/unimarc/unimarc/obj/Debug/UniMarc.pdb differ diff --git a/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll b/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll index d5364f9..2d86a24 100644 Binary files a/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll and b/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll differ diff --git a/unimarc/unimarc/납품관리/Commodity_registration.Designer.cs b/unimarc/unimarc/납품관리/Commodity_registration.Designer.cs index c845f98..9b3e4ad 100644 --- a/unimarc/unimarc/납품관리/Commodity_registration.Designer.cs +++ b/unimarc/unimarc/납품관리/Commodity_registration.Designer.cs @@ -28,13 +28,13 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle(); this.label1 = new System.Windows.Forms.Label(); this.tb_FilePath = new System.Windows.Forms.TextBox(); this.btn_FileOpen = new System.Windows.Forms.Button(); @@ -74,6 +74,17 @@ this.panel1 = new System.Windows.Forms.Panel(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.dataGridView2 = new System.Windows.Forms.DataGridView(); + this.list_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.pur = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dly = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.charge = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.cout = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tol = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.stat2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Grid_btn_ISBN = new System.Windows.Forms.DataGridViewButtonColumn(); + this.chk_marc = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Grid_Check = new System.Windows.Forms.DataGridViewCheckBoxColumn(); this.btn_morge = new System.Windows.Forms.Button(); this.btn_Edit = new System.Windows.Forms.Button(); this.btn_Del = new System.Windows.Forms.Button(); @@ -95,17 +106,6 @@ this.rbtn_all = new System.Windows.Forms.RadioButton(); this.panel2 = new System.Windows.Forms.Panel(); this.label14 = new System.Windows.Forms.Label(); - this.list_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.pur = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.dly = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.charge = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.cout = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.tol = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.stat2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Grid_btn_ISBN = new System.Windows.Forms.DataGridViewButtonColumn(); - this.chk_marc = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.Grid_Check = new System.Windows.Forms.DataGridViewCheckBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit(); @@ -296,14 +296,14 @@ // dataGridView1 // this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle22.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.header, @@ -359,27 +359,27 @@ // // count // - dataGridViewCellStyle2.Format = "C0"; - dataGridViewCellStyle2.NullValue = null; - this.count.DefaultCellStyle = dataGridViewCellStyle2; + dataGridViewCellStyle23.Format = "C0"; + dataGridViewCellStyle23.NullValue = null; + this.count.DefaultCellStyle = dataGridViewCellStyle23; this.count.HeaderText = "수량"; this.count.Name = "count"; this.count.Width = 35; // // unit // - dataGridViewCellStyle3.Format = "N0"; - dataGridViewCellStyle3.NullValue = null; - this.unit.DefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle24.Format = "N0"; + dataGridViewCellStyle24.NullValue = null; + this.unit.DefaultCellStyle = dataGridViewCellStyle24; this.unit.HeaderText = "단가"; this.unit.Name = "unit"; this.unit.Width = 70; // // total // - dataGridViewCellStyle4.Format = "N0"; - dataGridViewCellStyle4.NullValue = null; - this.total.DefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle25.Format = "N0"; + dataGridViewCellStyle25.NullValue = null; + this.total.DefaultCellStyle = dataGridViewCellStyle25; this.total.HeaderText = "합계"; this.total.Name = "total"; this.total.Width = 80; @@ -442,7 +442,7 @@ this.panel1.Controls.Add(this.tb_user2); this.panel1.Location = new System.Drawing.Point(10, 333); this.panel1.Name = "panel1"; - this.panel1.Size = new System.Drawing.Size(1129, 268); + this.panel1.Size = new System.Drawing.Size(1129, 271); this.panel1.TabIndex = 30; // // comboBox1 @@ -460,14 +460,14 @@ this.dataGridView2.AllowUserToAddRows = false; this.dataGridView2.AllowUserToDeleteRows = false; this.dataGridView2.BackgroundColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle5.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle26.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle26.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle26.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle26.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle26.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle26.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle26; this.dataGridView2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.list_date, this.pur, @@ -485,10 +485,88 @@ this.dataGridView2.Name = "dataGridView2"; this.dataGridView2.RowHeadersWidth = 20; this.dataGridView2.RowTemplate.Height = 23; - this.dataGridView2.Size = new System.Drawing.Size(1083, 217); + this.dataGridView2.Size = new System.Drawing.Size(1083, 229); this.dataGridView2.TabIndex = 29; this.dataGridView2.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView2_CellClick); // + // list_date + // + this.list_date.HeaderText = "목록일자"; + this.list_date.Name = "list_date"; + this.list_date.Width = 70; + // + // pur + // + this.pur.HeaderText = "거래처명"; + this.pur.Name = "pur"; + this.pur.Width = 150; + // + // dly + // + this.dly.HeaderText = "납품목록"; + this.dly.Name = "dly"; + this.dly.Width = 150; + // + // charge + // + this.charge.HeaderText = "담당자"; + this.charge.Name = "charge"; + // + // list_name + // + this.list_name.HeaderText = "목록명"; + this.list_name.Name = "list_name"; + this.list_name.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.list_name.Width = 250; + // + // cout + // + dataGridViewCellStyle27.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this.cout.DefaultCellStyle = dataGridViewCellStyle27; + this.cout.HeaderText = "수량"; + this.cout.Name = "cout"; + this.cout.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.cout.Width = 50; + // + // tol + // + dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + dataGridViewCellStyle28.Format = "N0"; + dataGridViewCellStyle28.NullValue = null; + this.tol.DefaultCellStyle = dataGridViewCellStyle28; + this.tol.HeaderText = "합계"; + this.tol.Name = "tol"; + this.tol.Width = 80; + // + // stat2 + // + this.stat2.HeaderText = "상태"; + this.stat2.Name = "stat2"; + this.stat2.Width = 50; + // + // Grid_btn_ISBN + // + this.Grid_btn_ISBN.HeaderText = "ISBN조회"; + this.Grid_btn_ISBN.Name = "Grid_btn_ISBN"; + this.Grid_btn_ISBN.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.Grid_btn_ISBN.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + // + // chk_marc + // + this.chk_marc.HeaderText = "MarcCheck"; + this.chk_marc.Name = "chk_marc"; + this.chk_marc.ReadOnly = true; + this.chk_marc.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.chk_marc.Visible = false; + // + // Grid_Check + // + this.Grid_Check.HeaderText = "체크"; + this.Grid_Check.Name = "Grid_Check"; + this.Grid_Check.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.Grid_Check.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.Grid_Check.Width = 40; + // // btn_morge // this.btn_morge.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); @@ -688,84 +766,6 @@ this.label14.TabIndex = 22; this.label14.Text = "작업\n대상"; // - // list_date - // - this.list_date.HeaderText = "목록일자"; - this.list_date.Name = "list_date"; - this.list_date.Width = 70; - // - // pur - // - this.pur.HeaderText = "거래처명"; - this.pur.Name = "pur"; - this.pur.Width = 150; - // - // dly - // - this.dly.HeaderText = "납품목록"; - this.dly.Name = "dly"; - this.dly.Width = 150; - // - // charge - // - this.charge.HeaderText = "담당자"; - this.charge.Name = "charge"; - // - // list_name - // - this.list_name.HeaderText = "목록명"; - this.list_name.Name = "list_name"; - this.list_name.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.list_name.Width = 250; - // - // cout - // - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - this.cout.DefaultCellStyle = dataGridViewCellStyle6; - this.cout.HeaderText = "수량"; - this.cout.Name = "cout"; - this.cout.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.cout.Width = 50; - // - // tol - // - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - dataGridViewCellStyle7.Format = "N0"; - dataGridViewCellStyle7.NullValue = null; - this.tol.DefaultCellStyle = dataGridViewCellStyle7; - this.tol.HeaderText = "합계"; - this.tol.Name = "tol"; - this.tol.Width = 80; - // - // stat2 - // - this.stat2.HeaderText = "상태"; - this.stat2.Name = "stat2"; - this.stat2.Width = 50; - // - // Grid_btn_ISBN - // - this.Grid_btn_ISBN.HeaderText = "ISBN조회"; - this.Grid_btn_ISBN.Name = "Grid_btn_ISBN"; - this.Grid_btn_ISBN.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.Grid_btn_ISBN.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - // - // chk_marc - // - this.chk_marc.HeaderText = "MarcCheck"; - this.chk_marc.Name = "chk_marc"; - this.chk_marc.ReadOnly = true; - this.chk_marc.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.chk_marc.Visible = false; - // - // Grid_Check - // - this.Grid_Check.HeaderText = "체크"; - this.Grid_Check.Name = "Grid_Check"; - this.Grid_Check.Resizable = System.Windows.Forms.DataGridViewTriState.True; - this.Grid_Check.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; - this.Grid_Check.Width = 40; - // // Commodity_registration // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); diff --git a/unimarc/unimarc/납품관리/Commodity_registration.cs b/unimarc/unimarc/납품관리/Commodity_registration.cs index 35a5671..7c13eb3 100644 --- a/unimarc/unimarc/납품관리/Commodity_registration.cs +++ b/unimarc/unimarc/납품관리/Commodity_registration.cs @@ -136,15 +136,15 @@ namespace WindowsFormsApp1.Delivery { MessageBox.Show("담당자를 확인해주세요."); return; } if (db.DB_Search("Obj_List", "list_name", "[" + tb_clt1.Text + "]" + tb_dvy1.Text, "comp_num", comp_idx) != "") { MessageBox.Show("DB의 납품목록과 중복됩니다."); return; } - bool MsgOk = true; + bool MsgOk = false; int Marc_ton = chk_Save_DB(); int vol, price, total, resVol=0, resTotal=0; // 5, 6, 7 string Strvol = ""; string Strprice = ""; string Strtotal = ""; string Strmsg = ""; - string[] data={ "", "", "", "", "", "", "", "", "", "", "", "ISBN조회", ""}; - // 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10, 11 , 12 + string[] data = { "", "", "", "", "", "", "", "", "", "", "", "ISBN조회", "" }; + // 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 ,10 , 11 , 12 string[] add_grid_data = { "", "", "", "", "", "", "", "", "ISBN조회", "" }; // 0-9 for (int a = 0; a < dataGridView1.Rows.Count; a++) { @@ -152,13 +152,15 @@ namespace WindowsFormsApp1.Delivery } for (int a = 0; a < dataGridView1.Rows.Count; a++) { - if(dataGridView1.Rows[a].Cells["count"].Value == null) { break; } + if (dataGridView1.Rows[a].Cells["count"].Value == null || + dataGridView1.Rows[a].Cells["count"].Value.ToString() == "") { break; } Strvol = dataGridView1.Rows[a].Cells["count"].Value.ToString(); Strprice = dataGridView1.Rows[a].Cells["unit"].Value.ToString().Replace(",", ""); - if(dataGridView1.Rows[a].Cells["total"].Value == null) { - int vol_tmp = Convert.ToInt32(Strvol); - int price_tmp = Convert.ToInt32(Strprice); + if (dataGridView1.Rows[a].Cells["total"].Value == null || + dataGridView1.Rows[a].Cells["total"].Value.ToString() == "") { + int vol_tmp = Convert.ToInt32(Regex.Replace(Strvol, @"[^0-9]", "")); + int price_tmp = Convert.ToInt32(Regex.Replace(Strprice, @"[^0-9]", "")); int total_tmp = vol_tmp + price_tmp; Strtotal = total_tmp.ToString(); } @@ -177,12 +179,13 @@ namespace WindowsFormsApp1.Delivery resTotal += total; if (vol * price != total) { dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Orange; - Strmsg += dataGridView1.Rows[a].Cells[1].Value.ToString()+", "; - MsgOk = false; + Strmsg += a.ToString() + ", "; + MsgOk = true; } } - if (MsgOk == false) { + if (MsgOk) { MessageBox.Show(Strmsg + "번째 행의 단가/수량/합계를 확인해 주세요."); + return; } data[0] = start_date.Value.ToString().Substring(0,10); if (end_date.Checked == true) { data[1] = end_date.Value.ToString().Substring(0, 10); } diff --git a/unimarc/unimarc/마크/Check_ISBN_Sub.cs b/unimarc/unimarc/마크/Check_ISBN_Sub.cs index f0082f2..b50dcb7 100644 --- a/unimarc/unimarc/마크/Check_ISBN_Sub.cs +++ b/unimarc/unimarc/마크/Check_ISBN_Sub.cs @@ -70,9 +70,8 @@ namespace WindowsFormsApp1.마크 } private string change_Date_type(string date) { - if (Call_API == "알라딘") { + if (Call_API == "알라딘") return String.Format("{0:yyyy/MM/dd}", DateTime.Parse(date.Remove(date.IndexOf(" G")))); - } else if (Call_API == "네이버") return DateTime.ParseExact(date, "yyyyMMdd", null).ToString("yyyy-MM-dd"); else diff --git a/unimarc/unimarc/마크/Mac_Input.Designer.cs b/unimarc/unimarc/마크/Mac_Input.Designer.cs index 1964e31..6d9b1b7 100644 --- a/unimarc/unimarc/마크/Mac_Input.Designer.cs +++ b/unimarc/unimarc/마크/Mac_Input.Designer.cs @@ -30,14 +30,13 @@ { System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); + this.btn_close = new System.Windows.Forms.Button(); this.btn_db_save = new System.Windows.Forms.Button(); - this.btn_file_save = new System.Windows.Forms.Button(); this.tb_filePath = new System.Windows.Forms.TextBox(); this.btn_FileOpen = new System.Windows.Forms.Button(); this.comboBox1 = new System.Windows.Forms.ComboBox(); this.label1 = new System.Windows.Forms.Label(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.series = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -45,6 +44,7 @@ this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.price = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Marc = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); @@ -52,8 +52,8 @@ // panel1 // this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.btn_close); this.panel1.Controls.Add(this.btn_db_save); - this.panel1.Controls.Add(this.btn_file_save); this.panel1.Controls.Add(this.tb_filePath); this.panel1.Controls.Add(this.btn_FileOpen); this.panel1.Controls.Add(this.comboBox1); @@ -63,6 +63,16 @@ this.panel1.Size = new System.Drawing.Size(1273, 40); this.panel1.TabIndex = 0; // + // btn_close + // + this.btn_close.Location = new System.Drawing.Point(879, 8); + this.btn_close.Name = "btn_close"; + this.btn_close.Size = new System.Drawing.Size(75, 23); + this.btn_close.TabIndex = 5; + this.btn_close.Text = "닫 기"; + this.btn_close.UseVisualStyleBackColor = true; + this.btn_close.Click += new System.EventHandler(this.btn_close_Click); + // // btn_db_save // this.btn_db_save.Location = new System.Drawing.Point(784, 8); @@ -73,15 +83,6 @@ this.btn_db_save.UseVisualStyleBackColor = true; this.btn_db_save.Click += new System.EventHandler(this.btn_db_save_Click); // - // btn_file_save - // - this.btn_file_save.Location = new System.Drawing.Point(689, 8); - this.btn_file_save.Name = "btn_file_save"; - this.btn_file_save.Size = new System.Drawing.Size(89, 23); - this.btn_file_save.TabIndex = 4; - this.btn_file_save.Text = "파일로 저장"; - this.btn_file_save.UseVisualStyleBackColor = true; - // // tb_filePath // this.tb_filePath.Enabled = false; @@ -146,16 +147,11 @@ this.dataGridView1.Size = new System.Drawing.Size(1273, 600); this.dataGridView1.TabIndex = 1; this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); - // - // openFileDialog1 - // - this.openFileDialog1.Filter = "마크 파일 (*.mrc)|*.mrc|모든 파일 (*.*)|*.*"; - this.openFileDialog1.InitialDirectory = "C:"; - this.openFileDialog1.Title = "열기"; + this.dataGridView1.KeyUp += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyUp); // // isbn // - this.isbn.HeaderText = "isbn"; + this.isbn.HeaderText = "ISBN"; this.isbn.Name = "isbn"; this.isbn.Width = 110; // @@ -194,6 +190,12 @@ this.Marc.Name = "Marc"; this.Marc.Width = 300; // + // openFileDialog1 + // + this.openFileDialog1.Filter = "마크 파일 (*.mrc)|*.mrc|모든 파일 (*.*)|*.*"; + this.openFileDialog1.InitialDirectory = "C:"; + this.openFileDialog1.Title = "열기"; + // // Mac_Input // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); @@ -217,11 +219,11 @@ private System.Windows.Forms.Label label1; private System.Windows.Forms.ComboBox comboBox1; private System.Windows.Forms.Button btn_db_save; - private System.Windows.Forms.Button btn_file_save; private System.Windows.Forms.TextBox tb_filePath; private System.Windows.Forms.Button btn_FileOpen; private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.OpenFileDialog openFileDialog1; + private System.Windows.Forms.Button btn_close; private System.Windows.Forms.DataGridViewTextBoxColumn isbn; private System.Windows.Forms.DataGridViewTextBoxColumn book_name; private System.Windows.Forms.DataGridViewTextBoxColumn series; diff --git a/unimarc/unimarc/마크/Mac_Input.cs b/unimarc/unimarc/마크/Mac_Input.cs index ba25c7c..f85a741 100644 --- a/unimarc/unimarc/마크/Mac_Input.cs +++ b/unimarc/unimarc/마크/Mac_Input.cs @@ -64,6 +64,7 @@ namespace WindowsFormsApp1.Mac grid[a] = grid[a].Replace("\r\n", ""); string[] data = Split_Marc(grid[a]); + data[0] = data[0].Replace(":", ""); data[6] = grid[a] + ""; dataGridView1.Rows.Add(data); } @@ -143,5 +144,16 @@ namespace WindowsFormsApp1.Mac } MessageBox.Show("DB 저장 완료!"); } + + private void btn_close_Click(object sender, EventArgs e) + { + Close(); + } + + private void dataGridView1_KeyUp(object sender, KeyEventArgs e) + { + Skill_Grid sg = new Skill_Grid(); + sg.clipboard_not_crack(sender, e); + } } } diff --git a/unimarc/unimarc/마크/Mac_List.cs b/unimarc/unimarc/마크/Mac_List.cs index 622a331..dd63e17 100644 --- a/unimarc/unimarc/마크/Mac_List.cs +++ b/unimarc/unimarc/마크/Mac_List.cs @@ -16,11 +16,13 @@ namespace WindowsFormsApp1.Mac Helper_DB db = new Helper_DB(); Main main; public string compidx; + public string user_name; public Mac_List(Main _main) { InitializeComponent(); main = _main; compidx = main.com_idx; + user_name = main.User_Name; } private void Mac_List_Load(object sender, EventArgs e) { diff --git a/unimarc/unimarc/마크/Mac_List.resx b/unimarc/unimarc/마크/Mac_List.resx index 49a5e6d..56402f0 100644 --- a/unimarc/unimarc/마크/Mac_List.resx +++ b/unimarc/unimarc/마크/Mac_List.resx @@ -162,4 +162,7 @@ 17, 17 + + 51 + \ No newline at end of file diff --git a/unimarc/unimarc/마크/Mac_Output.Designer.cs b/unimarc/unimarc/마크/Mac_Output.Designer.cs index 4624fd0..0e6d585 100644 --- a/unimarc/unimarc/마크/Mac_Output.Designer.cs +++ b/unimarc/unimarc/마크/Mac_Output.Designer.cs @@ -28,7 +28,7 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -38,14 +38,15 @@ this.price = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Marc = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel1 = new System.Windows.Forms.Panel(); - this.btn_db_save = new System.Windows.Forms.Button(); - this.btn_file_save = new System.Windows.Forms.Button(); - this.cb_state = new System.Windows.Forms.ComboBox(); - this.label1 = new System.Windows.Forms.Label(); - this.cb_years = new System.Windows.Forms.ComboBox(); - this.label2 = new System.Windows.Forms.Label(); - this.cb_list = new System.Windows.Forms.ComboBox(); this.connect_list = new System.Windows.Forms.ComboBox(); + this.cb_list = new System.Windows.Forms.ComboBox(); + this.btn_file_save = new System.Windows.Forms.Button(); + this.cb_years = new System.Windows.Forms.ComboBox(); + this.cb_state = new System.Windows.Forms.ComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); + this.btn_close = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.panel1.SuspendLayout(); this.SuspendLayout(); @@ -54,14 +55,14 @@ // this.dataGridView1.AllowUserToAddRows = false; this.dataGridView1.AllowUserToDeleteRows = false; - dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle8.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.isbn, @@ -77,6 +78,7 @@ this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.Size = new System.Drawing.Size(1273, 600); this.dataGridView1.TabIndex = 9; + this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); // // isbn // @@ -122,9 +124,9 @@ // panel1 // this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.btn_close); this.panel1.Controls.Add(this.connect_list); this.panel1.Controls.Add(this.cb_list); - this.panel1.Controls.Add(this.btn_db_save); this.panel1.Controls.Add(this.btn_file_save); this.panel1.Controls.Add(this.cb_years); this.panel1.Controls.Add(this.cb_state); @@ -135,61 +137,15 @@ this.panel1.Size = new System.Drawing.Size(1273, 40); this.panel1.TabIndex = 10; // - // btn_db_save + // connect_list // - this.btn_db_save.Location = new System.Drawing.Point(784, 8); - this.btn_db_save.Name = "btn_db_save"; - this.btn_db_save.Size = new System.Drawing.Size(89, 23); - this.btn_db_save.TabIndex = 4; - this.btn_db_save.Text = "DB 저장"; - this.btn_db_save.UseVisualStyleBackColor = true; - // - // btn_file_save - // - this.btn_file_save.Location = new System.Drawing.Point(689, 8); - this.btn_file_save.Name = "btn_file_save"; - this.btn_file_save.Size = new System.Drawing.Size(89, 23); - this.btn_file_save.TabIndex = 4; - this.btn_file_save.Text = "파일로 저장"; - this.btn_file_save.UseVisualStyleBackColor = true; - // - // cb_state - // - this.cb_state.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cb_state.FormattingEnabled = true; - this.cb_state.Location = new System.Drawing.Point(45, 10); - this.cb_state.Name = "cb_state"; - this.cb_state.Size = new System.Drawing.Size(75, 20); - this.cb_state.TabIndex = 2; - this.cb_state.SelectedIndexChanged += new System.EventHandler(this.cb_state_SelectedIndexChanged); - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(11, 14); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(29, 12); - this.label1.TabIndex = 1; - this.label1.Text = "구분"; - // - // cb_years - // - this.cb_years.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cb_years.Enabled = false; - this.cb_years.FormattingEnabled = true; - this.cb_years.Location = new System.Drawing.Point(126, 10); - this.cb_years.Name = "cb_years"; - this.cb_years.Size = new System.Drawing.Size(90, 20); - this.cb_years.TabIndex = 2; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(244, 14); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(58, 12); - this.label2.TabIndex = 1; - this.label2.Text = "Marc목록"; + this.connect_list.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.connect_list.FormattingEnabled = true; + this.connect_list.Location = new System.Drawing.Point(1147, 11); + this.connect_list.Name = "connect_list"; + this.connect_list.Size = new System.Drawing.Size(121, 20); + this.connect_list.TabIndex = 6; + this.connect_list.Visible = false; // // cb_list // @@ -201,14 +157,63 @@ this.cb_list.TabIndex = 5; this.cb_list.SelectedIndexChanged += new System.EventHandler(this.cb_list_SelectedIndexChanged); // - // connect_list + // btn_file_save // - this.connect_list.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.connect_list.FormattingEnabled = true; - this.connect_list.Location = new System.Drawing.Point(911, 10); - this.connect_list.Name = "connect_list"; - this.connect_list.Size = new System.Drawing.Size(121, 20); - this.connect_list.TabIndex = 6; + this.btn_file_save.Location = new System.Drawing.Point(731, 8); + this.btn_file_save.Name = "btn_file_save"; + this.btn_file_save.Size = new System.Drawing.Size(89, 23); + this.btn_file_save.TabIndex = 4; + this.btn_file_save.Text = "파일로 저장"; + this.btn_file_save.UseVisualStyleBackColor = true; + this.btn_file_save.Click += new System.EventHandler(this.btn_file_save_Click); + // + // cb_years + // + this.cb_years.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cb_years.Enabled = false; + this.cb_years.FormattingEnabled = true; + this.cb_years.Location = new System.Drawing.Point(126, 10); + this.cb_years.Name = "cb_years"; + this.cb_years.Size = new System.Drawing.Size(90, 20); + this.cb_years.TabIndex = 2; + // + // cb_state + // + this.cb_state.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cb_state.FormattingEnabled = true; + this.cb_state.Location = new System.Drawing.Point(45, 10); + this.cb_state.Name = "cb_state"; + this.cb_state.Size = new System.Drawing.Size(75, 20); + this.cb_state.TabIndex = 2; + this.cb_state.SelectedIndexChanged += new System.EventHandler(this.cb_state_SelectedIndexChanged); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(244, 14); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(58, 12); + this.label2.TabIndex = 1; + this.label2.Text = "Marc목록"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(11, 14); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(29, 12); + this.label1.TabIndex = 1; + this.label1.Text = "구분"; + // + // btn_close + // + this.btn_close.Location = new System.Drawing.Point(826, 8); + this.btn_close.Name = "btn_close"; + this.btn_close.Size = new System.Drawing.Size(75, 23); + this.btn_close.TabIndex = 7; + this.btn_close.Text = "닫 기"; + this.btn_close.UseVisualStyleBackColor = true; + this.btn_close.Click += new System.EventHandler(this.btn_close_Click); // // Mac_Output // @@ -237,7 +242,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn price; private System.Windows.Forms.DataGridViewTextBoxColumn Marc; private System.Windows.Forms.Panel panel1; - private System.Windows.Forms.Button btn_db_save; private System.Windows.Forms.Button btn_file_save; private System.Windows.Forms.ComboBox cb_state; private System.Windows.Forms.Label label1; @@ -245,5 +249,7 @@ private System.Windows.Forms.ComboBox cb_list; private System.Windows.Forms.Label label2; private System.Windows.Forms.ComboBox connect_list; + private System.Windows.Forms.SaveFileDialog saveFileDialog1; + private System.Windows.Forms.Button btn_close; } } \ No newline at end of file diff --git a/unimarc/unimarc/마크/Mac_Output.cs b/unimarc/unimarc/마크/Mac_Output.cs index 0e0a79c..5a94980 100644 --- a/unimarc/unimarc/마크/Mac_Output.cs +++ b/unimarc/unimarc/마크/Mac_Output.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; +using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -15,6 +16,7 @@ namespace WindowsFormsApp1.Mac Helper_DB db = new Helper_DB(); Main main; string compidx = string.Empty; + List save_date = new List(); public Mac_Output(Main _main) { InitializeComponent(); @@ -79,6 +81,7 @@ namespace WindowsFormsApp1.Mac if (a % 3 == 1) { tmp[1] = marc_list[a]; } if (a % 3 == 2) { tmp[2] = marc_list[a]; if (years) { + save_date.Add(tmp[0]); cb_list.Items.Add(tmp[1]); connect_list.Items.Add(tmp[2]); } @@ -100,8 +103,97 @@ namespace WindowsFormsApp1.Mac private void cb_list_SelectedIndexChanged(object sender, EventArgs e) { + dataGridView1.Rows.Clear(); connect_list.SelectedIndex = cb_list.SelectedIndex; + string area = "`isbn`, `book_name`, `author`, `book_comp`, `price`"; + string[] col = { "compidx", "list_name", "date" }; + string[] data = { compidx, connect_list.Text, save_date[cb_list.SelectedIndex] }; + string tmp_data = db.More_DB_Search("Obj_List_Book", col, data, area); + string[] tmp_ary = tmp_data.Split('|'); + Input_Grid(tmp_ary); + Search_Marc(); + } + #region cb_list 선택 시 Sub함수 + private void Input_Grid(string[] db_data) + { + string[] grid = { "", "", "", "", "", "", "" }; // isbn, 도서명, 총서명, 저자, 출판사, 정가, 마크 + for (int a = 0; a < db_data.Length; a++) + { + if (a % 5 == 0) { grid[0] = db_data[a]; } + if (a % 5 == 1) { grid[1] = db_data[a]; } + if (a % 5 == 2) { grid[3] = db_data[a]; } + if (a % 5 == 3) { grid[4] = db_data[a]; } + if (a % 5 == 4) { grid[5] = db_data[a]; + dataGridView1.Rows.Add(grid); + } + } + } + private void Search_Marc() + { + string area = "`총서명`, `marc`, `marc_chk`, `marc1`, `marc_chk1`, `marc2`, `marc_chk2`"; + string[] col = { "ISBN" }; + for(int a = 0; a < dataGridView1.Rows.Count; a++) + { + string[] data = { dataGridView1.Rows[a].Cells["isbn"].Value.ToString() }; + + string tmp_data = db.More_DB_Search("Marc", col, data, area); + if(tmp_data.Length < 7) { continue; } + string[] tmp_ary = tmp_data.Split('|'); + Add_Marc(tmp_ary, a); + } + } + private void Add_Marc(string[] db_data, int idx) + { + if (db_data[2] == "1") { + dataGridView1.Rows[idx].Cells["series"].Value = db_data[0]; + dataGridView1.Rows[idx].Cells["Marc"].Value = db_data[1]; + } + else if (db_data[4] == "1") { + dataGridView1.Rows[idx].Cells["series"].Value = db_data[0]; + dataGridView1.Rows[idx].Cells["Marc"].Value = db_data[3]; + } + else if (db_data[6] == "1") { + dataGridView1.Rows[idx].Cells["series"].Value = db_data[0]; + dataGridView1.Rows[idx].Cells["Marc"].Value = db_data[5]; + } + } + #endregion + + private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Skill_Grid sg = new Skill_Grid(); + sg.Print_Grid_Num(sender, e); + } + + private void btn_file_save_Click(object sender, EventArgs e) + { + string Marc_data = string.Empty; + for (int a = 0; a < dataGridView1.Rows.Count; a++) + { + if (dataGridView1.Rows[a].Cells["Marc"].Value.ToString() == "" && + dataGridView1.Rows[a].Cells["Marc"].Value == null) + continue; + + Marc_data += dataGridView1.Rows[a].Cells["Marc"].Value.ToString(); + } + + string FileName; + SaveFileDialog saveFileDialog = new SaveFileDialog(); + saveFileDialog.Title = "저장 경로를 지정하세요."; + saveFileDialog.OverwritePrompt = true; + saveFileDialog.Filter = "마크 파일 (*.mrc)|*.mrc|모든 파일 (*.*)|*.*"; + + if (saveFileDialog.ShowDialog() == DialogResult.OK) + { + FileName = saveFileDialog.FileName; + File.WriteAllText(FileName, Marc_data); + } + } + + private void btn_close_Click(object sender, EventArgs e) + { + Close(); } } } diff --git a/unimarc/unimarc/마크/Mac_Output.resx b/unimarc/unimarc/마크/Mac_Output.resx index 338af23..bffd378 100644 --- a/unimarc/unimarc/마크/Mac_Output.resx +++ b/unimarc/unimarc/마크/Mac_Output.resx @@ -138,4 +138,10 @@ True + + 10, 5 + + + 28 + \ No newline at end of file diff --git a/unimarc/unimarc/마크/Marc.cs b/unimarc/unimarc/마크/Marc.cs index 16a634c..077cad9 100644 --- a/unimarc/unimarc/마크/Marc.cs +++ b/unimarc/unimarc/마크/Marc.cs @@ -14,6 +14,7 @@ namespace ExcelTest public partial class Marc : Form { string[] data_book = { "", "", "", "", "" }; + string user_name; public string find; public string change; public string call = ""; @@ -34,6 +35,7 @@ namespace ExcelTest { InitializeComponent(); ml = _ml; + user_name = ml.user_name; } private void Marc_Load(object sender, EventArgs e) @@ -1207,9 +1209,11 @@ namespace ExcelTest else { string[] Insert_tbl = { "ISBN", "서명", "저자", "출판사", "가격", - "marc", "비고1", "비고2", "url", "grade", "marc_chk" }; + "marc", "비고1", "비고2", "url", "grade", + "marc_chk", "id" }; string[] Insert_col = { grid_data[0], grid_data[1], grid_data[2], grid_data[3], grid_data[4], - made_Ori_marc(), etc1.Text, etc2.Text, grid_data[5], cb_grade.SelectedIndex.ToString(), "1" }; + made_Ori_marc(), etc1.Text, etc2.Text, grid_data[5], cb_grade.SelectedIndex.ToString(), + "1", user_name }; db.DB_INSERT(table_name, Insert_tbl, Insert_col); MessageBox.Show("추가");