diff --git a/Test_Project/.vs/Test_Project/v16/.suo b/Test_Project/.vs/Test_Project/v16/.suo index 0e775d5..72667f0 100644 Binary files a/Test_Project/.vs/Test_Project/v16/.suo and b/Test_Project/.vs/Test_Project/v16/.suo differ diff --git a/unimarc/.vs/unimarc/v16/.suo b/unimarc/.vs/unimarc/v16/.suo index 56aafc1..af9985f 100644 Binary files a/unimarc/.vs/unimarc/v16/.suo and b/unimarc/.vs/unimarc/v16/.suo differ diff --git a/unimarc/unimarc/UniMarc.csproj b/unimarc/unimarc/UniMarc.csproj index ddeab12..9b90c02 100644 --- a/unimarc/unimarc/UniMarc.csproj +++ b/unimarc/unimarc/UniMarc.csproj @@ -108,12 +108,24 @@ Order_Send_Chk.cs + + Form + + + All_Book_Detail.cs + Form All_Book_manage_Add.cs + + Form + + + All_Book_manage_Edit.cs + Form @@ -636,9 +648,15 @@ Order_Send_Chk.cs + + All_Book_Detail.cs + All_Book_manage_Add.cs + + All_Book_manage_Edit.cs + Check_ISBN_Sub.cs diff --git a/unimarc/unimarc/bin/Debug/UniMarc.exe b/unimarc/unimarc/bin/Debug/UniMarc.exe index ec70d4a..38c94fe 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 a15d310..31f3631 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 ff5f2b0..f5252d4 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/UniMarc.csproj.CoreCompileInputs.cache b/unimarc/unimarc/obj/Debug/UniMarc.csproj.CoreCompileInputs.cache index ee3407c..8229ae1 100644 --- a/unimarc/unimarc/obj/Debug/UniMarc.csproj.CoreCompileInputs.cache +++ b/unimarc/unimarc/obj/Debug/UniMarc.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -633b9d395fc7540535e6b0184ba54303a9134e29 +8a4f9a29f0df4ec86b13dc91b01da745329b5adf diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csproj.FileListAbsolute.txt b/unimarc/unimarc/obj/Debug/UniMarc.csproj.FileListAbsolute.txt index 450a1cc..5170f77 100644 --- a/unimarc/unimarc/obj/Debug/UniMarc.csproj.FileListAbsolute.txt +++ b/unimarc/unimarc/obj/Debug/UniMarc.csproj.FileListAbsolute.txt @@ -117,3 +117,5 @@ C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\UniMarc.마크. C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\UniMarc.csproj.AssemblyReference.cache C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\UniMarc.회계.Part_time.resources C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\UniMarc.마크.All_Book_manage_Add.resources +C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\UniMarc.마크.All_Book_manage_Edit.resources +C:\Users\Administrator\Desktop\unimarc\unimarc\UniMarc\obj\Debug\UniMarc.마크.All_Book_Detail.resources diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache b/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache index 732a202..d20c036 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.exe b/unimarc/unimarc/obj/Debug/UniMarc.exe index ec70d4a..38c94fe 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 a15d310..31f3631 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/UniMarc.마크.All_Book_Detail.resources b/unimarc/unimarc/obj/Debug/UniMarc.마크.All_Book_Detail.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/unimarc/unimarc/obj/Debug/UniMarc.마크.All_Book_Detail.resources differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.마크.All_Book_manage_Edit.resources b/unimarc/unimarc/obj/Debug/UniMarc.마크.All_Book_manage_Edit.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/unimarc/unimarc/obj/Debug/UniMarc.마크.All_Book_manage_Edit.resources differ diff --git a/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll b/unimarc/unimarc/obj/Debug/ko/UniMarc.resources.dll index ff5f2b0..f5252d4 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/마크/All_Book_Detail.Designer.cs b/unimarc/unimarc/마크/All_Book_Detail.Designer.cs new file mode 100644 index 0000000..25eff5e --- /dev/null +++ b/unimarc/unimarc/마크/All_Book_Detail.Designer.cs @@ -0,0 +1,118 @@ + +namespace UniMarc.마크 +{ + partial class All_Book_Detail + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.price = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); + this.SuspendLayout(); + // + // dataGridView1 + // + 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.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.book_name, + this.author, + this.book_comp, + this.isbn, + this.price}); + this.dataGridView1.Location = new System.Drawing.Point(12, 12); + this.dataGridView1.Name = "dataGridView1"; + this.dataGridView1.RowTemplate.Height = 23; + this.dataGridView1.Size = new System.Drawing.Size(776, 426); + this.dataGridView1.TabIndex = 0; + this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); + // + // book_name + // + this.book_name.HeaderText = "도서명"; + this.book_name.Name = "book_name"; + this.book_name.Width = 250; + // + // author + // + this.author.HeaderText = "저자"; + this.author.Name = "author"; + // + // book_comp + // + this.book_comp.HeaderText = "출판사"; + this.book_comp.Name = "book_comp"; + this.book_comp.Width = 150; + // + // isbn + // + this.isbn.HeaderText = "ISBN"; + this.isbn.Name = "isbn"; + // + // price + // + this.price.HeaderText = "정가"; + this.price.Name = "price"; + // + // All_Book_Detail + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.dataGridView1); + this.Name = "All_Book_Detail"; + this.Text = "전집 세부"; + this.Load += new System.EventHandler(this.All_Book_Detail_Load); + ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.DataGridView dataGridView1; + private System.Windows.Forms.DataGridViewTextBoxColumn book_name; + private System.Windows.Forms.DataGridViewTextBoxColumn author; + private System.Windows.Forms.DataGridViewTextBoxColumn book_comp; + private System.Windows.Forms.DataGridViewTextBoxColumn isbn; + private System.Windows.Forms.DataGridViewTextBoxColumn price; + } +} \ No newline at end of file diff --git a/unimarc/unimarc/마크/All_Book_Detail.cs b/unimarc/unimarc/마크/All_Book_Detail.cs new file mode 100644 index 0000000..2f21928 --- /dev/null +++ b/unimarc/unimarc/마크/All_Book_Detail.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using WindowsFormsApp1.Mac; +using WindowsFormsApp1; + +namespace UniMarc.마크 +{ + public partial class All_Book_Detail : Form + { + public int row; + public int col; + + /// + /// 세트명[0] / 세트ISBN[1] / 세트수량[2] / 세트정가[3] + /// + 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) + { + this.Text += string.Format(" 『{0}』", data[0]); + db.DBcon(); + + string table = "Set_Book"; + string Area = "`book_name`, `author`, `book_comp`, `isbn`, `price`"; + string[] search_table = { "set_name", "set_isbn", "set_count", "set_price" }; + string db_tmp = db.More_DB_Search(table, search_table, data, Area); + string[] db_data = db_tmp.Split('|'); + input_grid(db_data); + } + #region Load_Sub + private void input_grid(string[] data) + { + string[] grid = { "", "", "", "", "" }; + for(int a = 0; a < data.Length; a++) + { + switch (a % grid.Length) + { + case 0: + grid[0] = data[a]; + break; + case 1: + grid[1] = data[a]; + break; + case 2: + grid[2] = data[a]; + break; + case 3: + grid[3] = data[a]; + break; + case 4: + grid[4] = data[a]; + dataGridView1.Rows.Add(grid); + break; + } + } + } + #endregion + + private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) + { + Skill_Grid sg = new Skill_Grid(); + sg.Print_Grid_Num(sender, e); + } + } +} diff --git a/unimarc/unimarc/마크/All_Book_Detail.resx b/unimarc/unimarc/마크/All_Book_Detail.resx new file mode 100644 index 0000000..f652b00 --- /dev/null +++ b/unimarc/unimarc/마크/All_Book_Detail.resx @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/unimarc/unimarc/마크/All_Book_manage.Designer.cs b/unimarc/unimarc/마크/All_Book_manage.Designer.cs index f77caf5..724ab97 100644 --- a/unimarc/unimarc/마크/All_Book_manage.Designer.cs +++ b/unimarc/unimarc/마크/All_Book_manage.Designer.cs @@ -28,13 +28,9 @@ /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.set_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.set_isbn = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.set_count = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.set_price = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.btn_Search = new System.Windows.Forms.Button(); @@ -42,6 +38,14 @@ this.btn_Edit = new System.Windows.Forms.Button(); this.btn_Delete = new System.Windows.Forms.Button(); this.btn_Close = new System.Windows.Forms.Button(); + this.set_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.set_isbn = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.set_count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.set_price = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.maker = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.chk_V = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // @@ -49,6 +53,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.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.set_name, @@ -56,15 +68,85 @@ this.set_count, this.set_price, this.author, - this.book_comp}); + this.book_comp, + this.maker, + this.chk_V}); this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dataGridView1.Location = new System.Drawing.Point(12, 40); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(792, 318); + this.dataGridView1.Size = new System.Drawing.Size(924, 398); this.dataGridView1.TabIndex = 6; + this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick); this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); // + // textBox1 + // + this.textBox1.Location = new System.Drawing.Point(92, 12); + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(271, 21); + this.textBox1.TabIndex = 7; + this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(17, 16); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(69, 12); + this.label1.TabIndex = 8; + this.label1.Text = "세트명 검색"; + // + // btn_Search + // + this.btn_Search.Location = new System.Drawing.Point(369, 11); + this.btn_Search.Name = "btn_Search"; + this.btn_Search.Size = new System.Drawing.Size(75, 23); + this.btn_Search.TabIndex = 9; + this.btn_Search.Text = "검 색"; + this.btn_Search.UseVisualStyleBackColor = true; + this.btn_Search.Click += new System.EventHandler(this.btn_Search_Click); + // + // btn_Add + // + this.btn_Add.Location = new System.Drawing.Point(486, 11); + this.btn_Add.Name = "btn_Add"; + this.btn_Add.Size = new System.Drawing.Size(75, 23); + this.btn_Add.TabIndex = 9; + this.btn_Add.Text = "추 가"; + this.btn_Add.UseVisualStyleBackColor = true; + this.btn_Add.Click += new System.EventHandler(this.btn_Add_Click); + // + // btn_Edit + // + this.btn_Edit.Location = new System.Drawing.Point(567, 11); + this.btn_Edit.Name = "btn_Edit"; + this.btn_Edit.Size = new System.Drawing.Size(75, 23); + this.btn_Edit.TabIndex = 9; + this.btn_Edit.Text = "수 정"; + this.btn_Edit.UseVisualStyleBackColor = true; + this.btn_Edit.Click += new System.EventHandler(this.btn_Edit_Click); + // + // btn_Delete + // + this.btn_Delete.Location = new System.Drawing.Point(648, 11); + this.btn_Delete.Name = "btn_Delete"; + this.btn_Delete.Size = new System.Drawing.Size(75, 23); + this.btn_Delete.TabIndex = 9; + this.btn_Delete.Text = "삭 제"; + this.btn_Delete.UseVisualStyleBackColor = true; + this.btn_Delete.Click += new System.EventHandler(this.btn_Delete_Click); + // + // btn_Close + // + this.btn_Close.Location = new System.Drawing.Point(729, 11); + this.btn_Close.Name = "btn_Close"; + this.btn_Close.Size = new System.Drawing.Size(75, 23); + this.btn_Close.TabIndex = 9; + this.btn_Close.Text = "닫 기"; + this.btn_Close.UseVisualStyleBackColor = true; + this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click); + // // set_name // this.set_name.HeaderText = "세트명"; @@ -97,78 +179,24 @@ this.book_comp.HeaderText = "출판사"; this.book_comp.Name = "book_comp"; // - // textBox1 + // maker // - this.textBox1.Location = new System.Drawing.Point(59, 12); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(271, 21); - this.textBox1.TabIndex = 7; - this.textBox1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown); + this.maker.HeaderText = "자료 생성자"; + this.maker.Name = "maker"; // - // label1 + // chk_V // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(12, 16); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(41, 12); - this.label1.TabIndex = 8; - this.label1.Text = "검색어"; - // - // btn_Search - // - this.btn_Search.Location = new System.Drawing.Point(336, 11); - this.btn_Search.Name = "btn_Search"; - this.btn_Search.Size = new System.Drawing.Size(75, 23); - this.btn_Search.TabIndex = 9; - this.btn_Search.Text = "검 색"; - this.btn_Search.UseVisualStyleBackColor = true; - this.btn_Search.Click += new System.EventHandler(this.btn_Search_Click); - // - // btn_Add - // - this.btn_Add.Location = new System.Drawing.Point(417, 11); - this.btn_Add.Name = "btn_Add"; - this.btn_Add.Size = new System.Drawing.Size(75, 23); - this.btn_Add.TabIndex = 9; - this.btn_Add.Text = "추 가"; - this.btn_Add.UseVisualStyleBackColor = true; - this.btn_Add.Click += new System.EventHandler(this.btn_Add_Click); - // - // btn_Edit - // - this.btn_Edit.Location = new System.Drawing.Point(498, 11); - this.btn_Edit.Name = "btn_Edit"; - this.btn_Edit.Size = new System.Drawing.Size(75, 23); - this.btn_Edit.TabIndex = 9; - this.btn_Edit.Text = "수 정"; - this.btn_Edit.UseVisualStyleBackColor = true; - this.btn_Edit.Click += new System.EventHandler(this.btn_Edit_Click); - // - // btn_Delete - // - this.btn_Delete.Location = new System.Drawing.Point(579, 11); - this.btn_Delete.Name = "btn_Delete"; - this.btn_Delete.Size = new System.Drawing.Size(75, 23); - this.btn_Delete.TabIndex = 9; - this.btn_Delete.Text = "삭 제"; - this.btn_Delete.UseVisualStyleBackColor = true; - this.btn_Delete.Click += new System.EventHandler(this.btn_Delete_Click); - // - // btn_Close - // - this.btn_Close.Location = new System.Drawing.Point(660, 11); - this.btn_Close.Name = "btn_Close"; - this.btn_Close.Size = new System.Drawing.Size(75, 23); - this.btn_Close.TabIndex = 9; - this.btn_Close.Text = "닫 기"; - this.btn_Close.UseVisualStyleBackColor = true; - this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click); + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.chk_V.DefaultCellStyle = dataGridViewCellStyle2; + this.chk_V.HeaderText = "V"; + this.chk_V.Name = "chk_V"; + this.chk_V.Width = 30; // // All_Book_manage // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(816, 450); + this.ClientSize = new System.Drawing.Size(948, 450); this.Controls.Add(this.btn_Close); this.Controls.Add(this.btn_Delete); this.Controls.Add(this.btn_Edit); @@ -179,6 +207,7 @@ this.Controls.Add(this.dataGridView1); this.Name = "All_Book_manage"; this.Text = "전집 관리"; + this.Load += new System.EventHandler(this.All_Book_manage_Load); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -188,12 +217,6 @@ #endregion private System.Windows.Forms.DataGridView dataGridView1; - private System.Windows.Forms.DataGridViewTextBoxColumn set_name; - private System.Windows.Forms.DataGridViewTextBoxColumn set_isbn; - private System.Windows.Forms.DataGridViewTextBoxColumn set_count; - private System.Windows.Forms.DataGridViewTextBoxColumn set_price; - private System.Windows.Forms.DataGridViewTextBoxColumn author; - private System.Windows.Forms.DataGridViewTextBoxColumn book_comp; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label label1; private System.Windows.Forms.Button btn_Add; @@ -201,5 +224,13 @@ private System.Windows.Forms.Button btn_Delete; private System.Windows.Forms.Button btn_Close; public System.Windows.Forms.Button btn_Search; + private System.Windows.Forms.DataGridViewTextBoxColumn set_name; + private System.Windows.Forms.DataGridViewTextBoxColumn set_isbn; + private System.Windows.Forms.DataGridViewTextBoxColumn set_count; + private System.Windows.Forms.DataGridViewTextBoxColumn set_price; + private System.Windows.Forms.DataGridViewTextBoxColumn author; + private System.Windows.Forms.DataGridViewTextBoxColumn book_comp; + private System.Windows.Forms.DataGridViewTextBoxColumn maker; + private System.Windows.Forms.DataGridViewTextBoxColumn chk_V; } } \ No newline at end of file diff --git a/unimarc/unimarc/마크/All_Book_manage.cs b/unimarc/unimarc/마크/All_Book_manage.cs index 1c7082d..0b8751e 100644 --- a/unimarc/unimarc/마크/All_Book_manage.cs +++ b/unimarc/unimarc/마크/All_Book_manage.cs @@ -13,21 +13,91 @@ namespace WindowsFormsApp1.Mac { 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) + { + db.DBcon(); } public void btn_Search_Click(object sender, EventArgs e) { + dataGridView1.Rows.Clear(); string text = textBox1.Text; + // 세트명 세트ISBN 세트수량 세트정가 저자 출판사 추가자 + string Area_db = "`set_name`, `set_isbn`, `set_count`, `set_price`, `author`, `book_comp`, `charge`"; + string tmp_data = db.DB_Contains("Set_Book", compidx, "set_name", text, Area_db); + string[] db_data = tmp_data.Split('|'); + input_Grid(db_data); } + #region Search_Sub + private void input_Grid(string[] db_data) + { + string[] grid = { "", "", "", "", "", + "", "", "" }; + + for (int a = 0; a < db_data.Length; a++) + { + switch (a % 7) + { + case 0: + grid[0] = db_data[a]; + break; + case 1: + grid[1] = db_data[a]; + break; + case 2: + grid[2] = db_data[a]; + break; + case 3: + grid[3] = db_data[a]; + break; + case 4: + grid[4] = db_data[a]; + break; + case 5: + grid[5] = db_data[a]; + break; + case 6: + grid[6] = db_data[a]; + if (input_Grid_Sub(grid[0])) { + dataGridView1.Rows.Add(grid); + } + break; + default: + break; + } + } + } + private bool input_Grid_Sub(string value) + { + if (dataGridView1.Rows.Count < 1) + { + return true; + } + for (int a = 0; a < dataGridView1.Rows.Count; a++) + { + if (dataGridView1.Rows[a].Cells["set_name"].Value.ToString() == value) { + return false; + } + } + return true; + } + #endregion private void textBox1_KeyDown(object sender, KeyEventArgs e) { - if(e.KeyCode == Keys.Enter) + if (e.KeyCode == Keys.Enter) { btn_Search_Click(null, null); } @@ -38,23 +108,84 @@ namespace WindowsFormsApp1.Mac // 새로운 폼 작업이 필요함. All_Book_manage_Add add = new All_Book_manage_Add(this); add.Show(); - } private void btn_Edit_Click(object sender, EventArgs e) { - // 새로운 폼 작업이 필요함. + int V_idx = Edit_Delete_Sub(); + if (V_idx == -1) + { + return; + } + string[] edit_data = { + dataGridView1.Rows[V_idx].Cells["set_name"].Value.ToString(), + dataGridView1.Rows[V_idx].Cells["set_isbn"].Value.ToString(), + dataGridView1.Rows[V_idx].Cells["set_count"].Value.ToString(), + dataGridView1.Rows[V_idx].Cells["set_price"].Value.ToString() + }; + + + All_Book_manage_Edit edit = new All_Book_manage_Edit(this); + edit.Show(); + edit.set_old(edit_data); + } + + /// + /// row에 체크가 된 idx값을 가져오기 위한 함수. (2개 이상 체크시 리턴됨) + /// + /// 체크된 row의 idx값 + private int Edit_Delete_Sub() + { + // 목록에 값이 없을 경우 리턴 + if (dataGridView1.Rows.Count < 1) + { + return -1; + } + int V_idx = -1; + + // 체크표시된 인덱스 값 확인 및 추출 (2개이상일 경우 오류표출하고 리턴) + for (int a = 0; a < dataGridView1.Rows.Count; a++) + { + if (V_idx != -1 && dataGridView1.Rows[a].Cells["chk_V"].Value.ToString() == "V") + { + MessageBox.Show("체크사항이 1개인지 확인해주세요."); + return -1; + } + if (dataGridView1.Rows[a].Cells["chk_V"].Value.ToString() == "V") + { + V_idx = a; + } + } + return V_idx; } private void btn_Delete_Click(object sender, EventArgs e) { + int V_idx = Edit_Delete_Sub(); + if (V_idx == -1) + { + return; + } + if (MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.Yes) + { + string[] delete_area = { "set_name", "set_isbn", "set_count", "set_price" }; + string[] delete_data = { + dataGridView1.Rows[V_idx].Cells["set_name"].Value.ToString(), + dataGridView1.Rows[V_idx].Cells["set_isbn"].Value.ToString(), + dataGridView1.Rows[V_idx].Cells["set_count"].Value.ToString(), + dataGridView1.Rows[V_idx].Cells["set_price"].Value.ToString() }; + + db.DB_Delete_No_Limit("Set_Book", "compidx", compidx, delete_area, delete_data); + } + + btn_Search_Click(null, null); } private void btn_Close_Click(object sender, EventArgs e) { - + this.Close(); } private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) @@ -62,5 +193,35 @@ namespace WindowsFormsApp1.Mac Skill_Grid sg = new Skill_Grid(); sg.Print_Grid_Num(sender, e); } + + private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + int col = e.ColumnIndex; + int row = e.RowIndex; + + if (dataGridView1.Columns["chk_V"].Index == col) + { + if (dataGridView1.Rows[row].Cells["chk_V"].Value.ToString() == "" || + dataGridView1.Rows[row].Cells["chk_V"].Value == null) + { + dataGridView1.Rows[row].Cells["chk_V"].Value = "V"; + } + else if (dataGridView1.Rows[row].Cells["chk_V"].Value.ToString() == "V") + { + dataGridView1.Rows[row].Cells["chk_V"].Value = ""; + } + } + else + { + All_Book_Detail detail = new All_Book_Detail(this); + detail.row = row; + detail.col = col; + detail.data[0] = dataGridView1.Rows[row].Cells["set_name"].Value.ToString(); + detail.data[1] = dataGridView1.Rows[row].Cells["set_isbn"].Value.ToString(); + detail.data[2] = dataGridView1.Rows[row].Cells["set_count"].Value.ToString(); + detail.data[3] = dataGridView1.Rows[row].Cells["set_price"].Value.ToString(); + detail.Show(); + } + } } } diff --git a/unimarc/unimarc/마크/All_Book_manage.resx b/unimarc/unimarc/마크/All_Book_manage.resx index 2752c88..bbfed09 100644 --- a/unimarc/unimarc/마크/All_Book_manage.resx +++ b/unimarc/unimarc/마크/All_Book_manage.resx @@ -135,4 +135,10 @@ True + + True + + + True + \ No newline at end of file diff --git a/unimarc/unimarc/마크/All_Book_manage_Add.Designer.cs b/unimarc/unimarc/마크/All_Book_manage_Add.Designer.cs index d9f8e9d..28de990 100644 --- a/unimarc/unimarc/마크/All_Book_manage_Add.Designer.cs +++ b/unimarc/unimarc/마크/All_Book_manage_Add.Designer.cs @@ -41,13 +41,13 @@ namespace UniMarc.마크 this.tb_setISBN = new System.Windows.Forms.TextBox(); this.tb_setPrice = new System.Windows.Forms.TextBox(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.btn_Save = new System.Windows.Forms.Button(); - this.btn_Close = new System.Windows.Forms.Button(); this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.price = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.btn_Save = new System.Windows.Forms.Button(); + this.btn_Close = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // @@ -156,26 +156,6 @@ namespace UniMarc.마크 this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); // - // btn_Save - // - this.btn_Save.Location = new System.Drawing.Point(160, 321); - this.btn_Save.Name = "btn_Save"; - this.btn_Save.Size = new System.Drawing.Size(100, 30); - this.btn_Save.TabIndex = 3; - this.btn_Save.Text = "저 장"; - this.btn_Save.UseVisualStyleBackColor = true; - this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click); - // - // btn_Close - // - this.btn_Close.Location = new System.Drawing.Point(425, 321); - this.btn_Close.Name = "btn_Close"; - this.btn_Close.Size = new System.Drawing.Size(100, 30); - this.btn_Close.TabIndex = 3; - this.btn_Close.Text = "닫 기"; - this.btn_Close.UseVisualStyleBackColor = true; - this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click); - // // book_name // this.book_name.HeaderText = "* 도서명"; @@ -203,6 +183,26 @@ namespace UniMarc.마크 this.ISBN.HeaderText = "ISBN"; this.ISBN.Name = "ISBN"; // + // btn_Save + // + this.btn_Save.Location = new System.Drawing.Point(160, 321); + this.btn_Save.Name = "btn_Save"; + this.btn_Save.Size = new System.Drawing.Size(100, 30); + this.btn_Save.TabIndex = 3; + this.btn_Save.Text = "저 장"; + this.btn_Save.UseVisualStyleBackColor = true; + this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click); + // + // btn_Close + // + this.btn_Close.Location = new System.Drawing.Point(425, 321); + this.btn_Close.Name = "btn_Close"; + this.btn_Close.Size = new System.Drawing.Size(100, 30); + this.btn_Close.TabIndex = 3; + this.btn_Close.Text = "닫 기"; + this.btn_Close.UseVisualStyleBackColor = true; + this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click); + // // All_Book_manage_Add // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); @@ -223,6 +223,7 @@ namespace UniMarc.마크 this.Controls.Add(this.label1); this.Name = "All_Book_manage_Add"; this.Text = "전집 목록 생성"; + this.Load += new System.EventHandler(this.All_Book_manage_Add_Load); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); diff --git a/unimarc/unimarc/마크/All_Book_manage_Add.cs b/unimarc/unimarc/마크/All_Book_manage_Add.cs index f9179b9..f57cd99 100644 --- a/unimarc/unimarc/마크/All_Book_manage_Add.cs +++ b/unimarc/unimarc/마크/All_Book_manage_Add.cs @@ -14,6 +14,7 @@ namespace UniMarc.마크 { public partial class All_Book_manage_Add : Form { + Helper_DB db = new Helper_DB(); All_Book_manage manage; public All_Book_manage_Add(All_Book_manage _manage) { @@ -21,6 +22,11 @@ namespace UniMarc.마크 manage = _manage; } + private void All_Book_manage_Add_Load(object sender, EventArgs e) + { + db.DBcon(); + } + private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { Skill_Grid sg = new Skill_Grid(); @@ -30,12 +36,14 @@ namespace UniMarc.마크 private void btn_Save_Click(object sender, EventArgs e) { bool grid_chk = true; + for(int a = 0; a < dataGridView1.Rows.Count; a++) { if (dataGridView1.Rows[a].Cells["book_name"].Value == null || dataGridView1.Rows[a].Cells["author"].Value == null || dataGridView1.Rows[a].Cells["book_comp"].Value == null || dataGridView1.Rows[a].Cells["price"].Value == null) { + grid_chk = false; break; } @@ -50,14 +58,38 @@ namespace UniMarc.마크 grid_chk = false; break; } + if (dataGridView1.Rows[a].Cells["ISBN"].Value == null) + { + dataGridView1.Rows[a].Cells["ISBN"].Value = ""; + } } if (!grid_chk) { - MessageBox.Show("필수 입력사항이 비어있습니다!\n*이 붙은 곳을 확인해주세요."); + MessageBox.Show("필수 입력사항이 비어있습니다!\n맨 앞에 \"*\"이 붙은 곳을 확인해주세요."); return; } + // DB 저장 + for(int a= 0; a < dataGridView1.Rows.Count; a++) + { + string[] insert_tbl = { "compidx", + "set_name", "set_count", "set_isbn", "set_price", "set_pubyear", + "book_name", "author", "book_comp", "isbn", "price", "charge" }; + string[] insert_col = { manage.compidx, + 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["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 }; + db.DB_INSERT("Set_Book", insert_tbl, insert_col); + } + MessageBox.Show("저장완료"); + + // 부모폼 조회버튼 클릭 + manage.btn_Search_Click(null, null); + this.Close(); } private void btn_Close_Click(object sender, EventArgs e) @@ -71,6 +103,7 @@ namespace UniMarc.마크 if ((e.Shift && e.KeyCode == Keys.Insert) || (e.Control && e.KeyCode == Keys.V)) { sg.Excel_to_DataGridView(sender, e); + tb_setCount.Text = dataGridView1.Rows.Count.ToString(); } } } diff --git a/unimarc/unimarc/마크/All_Book_manage_Edit.Designer.cs b/unimarc/unimarc/마크/All_Book_manage_Edit.Designer.cs new file mode 100644 index 0000000..a444b49 --- /dev/null +++ b/unimarc/unimarc/마크/All_Book_manage_Edit.Designer.cs @@ -0,0 +1,324 @@ + +namespace UniMarc.마크 +{ + partial class All_Book_manage_Edit + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.tb_set_name_old = new System.Windows.Forms.TextBox(); + this.panel1 = new System.Windows.Forms.Panel(); + this.label2 = new System.Windows.Forms.Label(); + this.tb_set_isbn_old = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.tb_set_count_old = new System.Windows.Forms.TextBox(); + this.label4 = new System.Windows.Forms.Label(); + this.tb_set_price_old = new System.Windows.Forms.TextBox(); + this.panel2 = new System.Windows.Forms.Panel(); + this.tb_set_price_new = new System.Windows.Forms.TextBox(); + this.label5 = new System.Windows.Forms.Label(); + this.tb_set_count_new = new System.Windows.Forms.TextBox(); + this.label6 = new System.Windows.Forms.Label(); + this.tb_set_isbn_new = new System.Windows.Forms.TextBox(); + this.label7 = new System.Windows.Forms.Label(); + this.tb_set_name_new = new System.Windows.Forms.TextBox(); + this.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.btn_Save = new System.Windows.Forms.Button(); + this.btn_Close = new System.Windows.Forms.Button(); + this.label10 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(31, 46); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(45, 12); + this.label1.TabIndex = 0; + this.label1.Text = "세트 명"; + // + // tb_set_name_old + // + this.tb_set_name_old.Enabled = false; + this.tb_set_name_old.Location = new System.Drawing.Point(82, 42); + this.tb_set_name_old.Name = "tb_set_name_old"; + this.tb_set_name_old.Size = new System.Drawing.Size(100, 21); + this.tb_set_name_old.TabIndex = 1; + // + // panel1 + // + this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel1.Controls.Add(this.label10); + this.panel1.Controls.Add(this.tb_set_price_old); + this.panel1.Controls.Add(this.label4); + this.panel1.Controls.Add(this.tb_set_count_old); + this.panel1.Controls.Add(this.label3); + this.panel1.Controls.Add(this.tb_set_isbn_old); + this.panel1.Controls.Add(this.label2); + this.panel1.Controls.Add(this.tb_set_name_old); + this.panel1.Controls.Add(this.label1); + this.panel1.Location = new System.Drawing.Point(12, 12); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(207, 163); + this.panel1.TabIndex = 2; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(15, 73); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(61, 12); + this.label2.TabIndex = 0; + this.label2.Text = "세트 ISBN"; + // + // tb_set_isbn_old + // + this.tb_set_isbn_old.Enabled = false; + this.tb_set_isbn_old.Location = new System.Drawing.Point(82, 69); + this.tb_set_isbn_old.Name = "tb_set_isbn_old"; + this.tb_set_isbn_old.Size = new System.Drawing.Size(100, 21); + this.tb_set_isbn_old.TabIndex = 1; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(19, 100); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(57, 12); + this.label3.TabIndex = 0; + this.label3.Text = "세트 수량"; + // + // tb_set_count_old + // + this.tb_set_count_old.Enabled = false; + this.tb_set_count_old.Location = new System.Drawing.Point(82, 96); + this.tb_set_count_old.Name = "tb_set_count_old"; + this.tb_set_count_old.Size = new System.Drawing.Size(100, 21); + this.tb_set_count_old.TabIndex = 1; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(19, 127); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(57, 12); + this.label4.TabIndex = 0; + this.label4.Text = "세트 정가"; + // + // tb_set_price_old + // + this.tb_set_price_old.Enabled = false; + this.tb_set_price_old.Location = new System.Drawing.Point(82, 123); + this.tb_set_price_old.Name = "tb_set_price_old"; + this.tb_set_price_old.Size = new System.Drawing.Size(100, 21); + this.tb_set_price_old.TabIndex = 1; + // + // panel2 + // + this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.panel2.Controls.Add(this.label11); + this.panel2.Controls.Add(this.tb_set_price_new); + this.panel2.Controls.Add(this.label5); + this.panel2.Controls.Add(this.tb_set_count_new); + this.panel2.Controls.Add(this.label6); + this.panel2.Controls.Add(this.tb_set_isbn_new); + this.panel2.Controls.Add(this.label7); + this.panel2.Controls.Add(this.tb_set_name_new); + this.panel2.Controls.Add(this.label8); + this.panel2.Location = new System.Drawing.Point(296, 12); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(207, 163); + this.panel2.TabIndex = 2; + // + // tb_set_price_new + // + this.tb_set_price_new.Location = new System.Drawing.Point(82, 123); + this.tb_set_price_new.Name = "tb_set_price_new"; + this.tb_set_price_new.Size = new System.Drawing.Size(100, 21); + this.tb_set_price_new.TabIndex = 1; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(19, 127); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(57, 12); + this.label5.TabIndex = 0; + this.label5.Text = "세트 정가"; + // + // tb_set_count_new + // + this.tb_set_count_new.Enabled = false; + this.tb_set_count_new.Location = new System.Drawing.Point(82, 96); + this.tb_set_count_new.Name = "tb_set_count_new"; + this.tb_set_count_new.Size = new System.Drawing.Size(100, 21); + this.tb_set_count_new.TabIndex = 1; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(19, 100); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(57, 12); + this.label6.TabIndex = 0; + this.label6.Text = "세트 수량"; + // + // tb_set_isbn_new + // + this.tb_set_isbn_new.Location = new System.Drawing.Point(82, 69); + this.tb_set_isbn_new.Name = "tb_set_isbn_new"; + this.tb_set_isbn_new.Size = new System.Drawing.Size(100, 21); + this.tb_set_isbn_new.TabIndex = 1; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(15, 73); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(61, 12); + this.label7.TabIndex = 0; + this.label7.Text = "세트 ISBN"; + // + // tb_set_name_new + // + this.tb_set_name_new.Location = new System.Drawing.Point(82, 42); + this.tb_set_name_new.Name = "tb_set_name_new"; + this.tb_set_name_new.Size = new System.Drawing.Size(100, 21); + this.tb_set_name_new.TabIndex = 1; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(31, 46); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(45, 12); + this.label8.TabIndex = 0; + this.label8.Text = "세트 명"; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Font = new System.Drawing.Font("굴림", 21.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label9.Location = new System.Drawing.Point(236, 86); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(51, 29); + this.label9.TabIndex = 0; + this.label9.Text = "=>"; + // + // btn_Save + // + this.btn_Save.Location = new System.Drawing.Point(144, 181); + this.btn_Save.Name = "btn_Save"; + this.btn_Save.Size = new System.Drawing.Size(75, 23); + this.btn_Save.TabIndex = 3; + this.btn_Save.Text = "저 장"; + this.btn_Save.UseVisualStyleBackColor = true; + this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click); + // + // btn_Close + // + this.btn_Close.Location = new System.Drawing.Point(296, 181); + this.btn_Close.Name = "btn_Close"; + this.btn_Close.Size = new System.Drawing.Size(75, 23); + this.btn_Close.TabIndex = 3; + this.btn_Close.Text = "닫 기"; + this.btn_Close.UseVisualStyleBackColor = true; + this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click); + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Font = new System.Drawing.Font("굴림", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label10.Location = new System.Drawing.Point(80, 10); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(42, 16); + this.label10.TabIndex = 2; + this.label10.Text = "기존"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Font = new System.Drawing.Font("굴림", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + this.label11.Location = new System.Drawing.Point(80, 10); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(42, 16); + this.label11.TabIndex = 2; + this.label11.Text = "변경"; + // + // All_Book_manage_Edit + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(515, 210); + this.Controls.Add(this.btn_Close); + this.Controls.Add(this.btn_Save); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.Controls.Add(this.label9); + this.Name = "All_Book_manage_Edit"; + this.Text = "전집 목록 편집"; + this.Load += new System.EventHandler(this.All_Book_manage_Edit_Load); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.panel2.ResumeLayout(false); + this.panel2.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox tb_set_name_old; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.TextBox tb_set_price_old; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.TextBox tb_set_count_old; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.TextBox tb_set_isbn_old; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.TextBox tb_set_price_new; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.TextBox tb_set_count_new; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.TextBox tb_set_isbn_new; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.TextBox tb_set_name_new; + private System.Windows.Forms.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Button btn_Save; + private System.Windows.Forms.Button btn_Close; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label11; + } +} \ No newline at end of file diff --git a/unimarc/unimarc/마크/All_Book_manage_Edit.cs b/unimarc/unimarc/마크/All_Book_manage_Edit.cs new file mode 100644 index 0000000..8a6c545 --- /dev/null +++ b/unimarc/unimarc/마크/All_Book_manage_Edit.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using WindowsFormsApp1; +using WindowsFormsApp1.Mac; + +namespace UniMarc.마크 +{ + public partial class All_Book_manage_Edit : Form + { + 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) + { + db.DBcon(); + } + + /// + /// 편집창 기본 세팅 + /// + /// 세트명 / 세트ISBN / 세트 수량 / 세트 정가 + public void set_old(string[] old) + { + TextBox[] tb_old = { tb_set_name_old, tb_set_isbn_old, tb_set_count_old, tb_set_price_old }; + TextBox[] tb_new = { tb_set_name_new, tb_set_isbn_new, tb_set_count_new, tb_set_price_new }; + for (int a = 0; a < tb_old.Length; a++) + { + tb_old[a].Text = old[a]; + tb_new[a].Text = old[a]; + } + } + + private void btn_Save_Click(object sender, EventArgs e) + { + string table = "Set_Book"; + string[] sear_tbl = { "compidx", "set_name", "set_isbn", "set_count", "set_price" }; + string[] sear_col = { compidx, + tb_set_name_old.Text, + tb_set_isbn_old.Text, + tb_set_count_old.Text, + tb_set_price_old.Text }; + + string[] edit_tbl = { "set_name", "set_isbn", "set_count", "set_price" }; + string[] edit_col = { tb_set_name_new.Text, + tb_set_isbn_new.Text, + tb_set_count_new.Text, + tb_set_price_new.Text }; + + db.More_Update(table, edit_tbl, edit_col, sear_tbl, sear_col); + MessageBox.Show("변경되었습니다!"); + manage.btn_Search_Click(null, null); + this.Close(); + } + + private void btn_Close_Click(object sender, EventArgs e) + { + this.Close(); + } + } +} diff --git a/unimarc/unimarc/마크/All_Book_manage_Edit.resx b/unimarc/unimarc/마크/All_Book_manage_Edit.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/unimarc/unimarc/마크/All_Book_manage_Edit.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file