diff --git a/.gitignore b/.gitignore index 13b4645..ee1087c 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ Skill.cs *.csproj *.config *.exe +*.xlsx ## 폴더 무시 unimarc/Factory_Client/ diff --git a/ISBN_Check_test/.vs/ISBN_Check_test/v16/.suo b/ISBN_Check_test/.vs/ISBN_Check_test/v16/.suo index a6d04bd..c448fef 100644 Binary files a/ISBN_Check_test/.vs/ISBN_Check_test/v16/.suo and b/ISBN_Check_test/.vs/ISBN_Check_test/v16/.suo differ diff --git a/ISBN_Check_test/Form1.Designer.cs b/ISBN_Check_test/Form1.Designer.cs index 3052241..4b0c8cc 100644 --- a/ISBN_Check_test/Form1.Designer.cs +++ b/ISBN_Check_test/Form1.Designer.cs @@ -29,11 +29,21 @@ namespace ISBN_Check_test /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); this.cb_filter = new System.Windows.Forms.ComboBox(); this.button1 = new System.Windows.Forms.Button(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); + this.label1 = new System.Windows.Forms.Label(); + this.richTextBox1 = new System.Windows.Forms.RichTextBox(); + this.start_idx = new System.Windows.Forms.TextBox(); + this.end_idx = new System.Windows.Forms.TextBox(); + this.label2 = new System.Windows.Forms.Label(); + this.button2 = new System.Windows.Forms.Button(); + this.cb_api = new System.Windows.Forms.ComboBox(); + this.progressBar1 = new System.Windows.Forms.ProgressBar(); + this.btn_Yes24 = 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(); @@ -44,15 +54,7 @@ namespace ISBN_Check_test this.category = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.sold_out = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.label1 = new System.Windows.Forms.Label(); - this.richTextBox1 = new System.Windows.Forms.RichTextBox(); - this.start_idx = new System.Windows.Forms.TextBox(); - this.end_idx = new System.Windows.Forms.TextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.button2 = new System.Windows.Forms.Button(); - this.cb_api = new System.Windows.Forms.ComboBox(); - this.progressBar1 = new System.Windows.Forms.ProgressBar(); - this.btn_Yes24 = new System.Windows.Forms.Button(); + this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // @@ -67,7 +69,7 @@ namespace ISBN_Check_test // // button1 // - this.button1.Location = new System.Drawing.Point(408, 9); + this.button1.Location = new System.Drawing.Point(431, 9); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 2; @@ -77,14 +79,14 @@ namespace ISBN_Check_test // // dataGridView1 // - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle7.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle10.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.book_name, this.author, @@ -95,27 +97,108 @@ namespace ISBN_Check_test this.pubDate, this.category, this.sold_out, - this.Column1}); + this.Column1, + this.count}); this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnF2; this.dataGridView1.Location = new System.Drawing.Point(12, 38); this.dataGridView1.Name = "dataGridView1"; - 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.True; - this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle12.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle12.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle12; this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; - this.dataGridView1.Size = new System.Drawing.Size(892, 466); + this.dataGridView1.Size = new System.Drawing.Size(973, 466); this.dataGridView1.TabIndex = 3; this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick); this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(734, 15); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(65, 12); + this.label1.TabIndex = 4; + this.label1.Text = "00:00:00.00"; + // + // richTextBox1 + // + this.richTextBox1.Location = new System.Drawing.Point(12, 510); + this.richTextBox1.Name = "richTextBox1"; + this.richTextBox1.Size = new System.Drawing.Size(973, 96); + this.richTextBox1.TabIndex = 5; + this.richTextBox1.Text = ""; + // + // start_idx + // + this.start_idx.Location = new System.Drawing.Point(287, 10); + this.start_idx.Name = "start_idx"; + this.start_idx.Size = new System.Drawing.Size(42, 21); + this.start_idx.TabIndex = 6; + this.start_idx.Text = "1"; + this.start_idx.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress); + // + // end_idx + // + this.end_idx.Location = new System.Drawing.Point(355, 10); + this.end_idx.Name = "end_idx"; + this.end_idx.Size = new System.Drawing.Size(42, 21); + this.end_idx.TabIndex = 6; + this.end_idx.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress); + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(335, 14); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(14, 12); + this.label2.TabIndex = 4; + this.label2.Text = "~"; + // + // button2 + // + this.button2.Location = new System.Drawing.Point(518, 9); + this.button2.Name = "button2"; + this.button2.Size = new System.Drawing.Size(75, 23); + this.button2.TabIndex = 2; + this.button2.Text = "리 셋"; + this.button2.UseVisualStyleBackColor = true; + this.button2.Click += new System.EventHandler(this.button2_Click); + // + // cb_api + // + this.cb_api.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cb_api.FormattingEnabled = true; + this.cb_api.Location = new System.Drawing.Point(27, 9); + this.cb_api.Name = "cb_api"; + this.cb_api.Size = new System.Drawing.Size(121, 20); + this.cb_api.TabIndex = 0; + this.cb_api.SelectedIndexChanged += new System.EventHandler(this.cb_api_SelectedIndexChanged); + // + // progressBar1 + // + this.progressBar1.Location = new System.Drawing.Point(801, 9); + this.progressBar1.Name = "progressBar1"; + this.progressBar1.Size = new System.Drawing.Size(184, 23); + this.progressBar1.TabIndex = 7; + // + // btn_Yes24 + // + this.btn_Yes24.Location = new System.Drawing.Point(605, 9); + this.btn_Yes24.Name = "btn_Yes24"; + this.btn_Yes24.Size = new System.Drawing.Size(75, 23); + this.btn_Yes24.TabIndex = 8; + this.btn_Yes24.Text = "Yes반출"; + this.btn_Yes24.UseVisualStyleBackColor = true; + this.btn_Yes24.Click += new System.EventHandler(this.btn_Yes24_Click); + // // book_name // this.book_name.HeaderText = "도서명"; @@ -173,91 +256,19 @@ namespace ISBN_Check_test this.Column1.Name = "Column1"; this.Column1.Visible = false; // - // label1 + // count // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(653, 15); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(65, 12); - this.label1.TabIndex = 4; - this.label1.Text = "00:00:00.00"; - // - // richTextBox1 - // - this.richTextBox1.Location = new System.Drawing.Point(12, 510); - this.richTextBox1.Name = "richTextBox1"; - this.richTextBox1.Size = new System.Drawing.Size(892, 96); - this.richTextBox1.TabIndex = 5; - this.richTextBox1.Text = ""; - // - // start_idx - // - this.start_idx.Location = new System.Drawing.Point(287, 10); - this.start_idx.Name = "start_idx"; - this.start_idx.Size = new System.Drawing.Size(42, 21); - this.start_idx.TabIndex = 6; - this.start_idx.Text = "1"; - this.start_idx.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress); - // - // end_idx - // - this.end_idx.Location = new System.Drawing.Point(355, 10); - this.end_idx.Name = "end_idx"; - this.end_idx.Size = new System.Drawing.Size(42, 21); - this.end_idx.TabIndex = 6; - this.end_idx.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.textBox1_KeyPress); - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(335, 14); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(14, 12); - this.label2.TabIndex = 4; - this.label2.Text = "~"; - // - // button2 - // - this.button2.Location = new System.Drawing.Point(489, 9); - this.button2.Name = "button2"; - this.button2.Size = new System.Drawing.Size(75, 23); - this.button2.TabIndex = 2; - this.button2.Text = "리 셋"; - this.button2.UseVisualStyleBackColor = true; - this.button2.Click += new System.EventHandler(this.button2_Click); - // - // cb_api - // - this.cb_api.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cb_api.FormattingEnabled = true; - this.cb_api.Location = new System.Drawing.Point(27, 9); - this.cb_api.Name = "cb_api"; - this.cb_api.Size = new System.Drawing.Size(121, 20); - this.cb_api.TabIndex = 0; - this.cb_api.SelectedIndexChanged += new System.EventHandler(this.cb_api_SelectedIndexChanged); - // - // progressBar1 - // - this.progressBar1.Location = new System.Drawing.Point(720, 9); - this.progressBar1.Name = "progressBar1"; - this.progressBar1.Size = new System.Drawing.Size(184, 23); - this.progressBar1.TabIndex = 7; - // - // btn_Yes24 - // - this.btn_Yes24.Location = new System.Drawing.Point(570, 9); - this.btn_Yes24.Name = "btn_Yes24"; - this.btn_Yes24.Size = new System.Drawing.Size(75, 23); - this.btn_Yes24.TabIndex = 8; - this.btn_Yes24.Text = "Yes반출"; - this.btn_Yes24.UseVisualStyleBackColor = true; - this.btn_Yes24.Click += new System.EventHandler(this.btn_Yes24_Click); + dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.count.DefaultCellStyle = dataGridViewCellStyle11; + this.count.HeaderText = "검색갯수"; + this.count.Name = "count"; + this.count.Width = 80; // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(920, 618); + this.ClientSize = new System.Drawing.Size(1001, 618); this.Controls.Add(this.btn_Yes24); this.Controls.Add(this.label1); this.Controls.Add(this.progressBar1); @@ -291,6 +302,8 @@ namespace ISBN_Check_test private System.Windows.Forms.Label label2; private System.Windows.Forms.Button button2; private System.Windows.Forms.ComboBox cb_api; + private System.Windows.Forms.ProgressBar progressBar1; + private System.Windows.Forms.Button btn_Yes24; private System.Windows.Forms.DataGridViewTextBoxColumn book_name; private System.Windows.Forms.DataGridViewTextBoxColumn author; private System.Windows.Forms.DataGridViewTextBoxColumn book_comp; @@ -301,8 +314,7 @@ namespace ISBN_Check_test private System.Windows.Forms.DataGridViewTextBoxColumn category; private System.Windows.Forms.DataGridViewTextBoxColumn sold_out; private System.Windows.Forms.DataGridViewTextBoxColumn Column1; - private System.Windows.Forms.ProgressBar progressBar1; - private System.Windows.Forms.Button btn_Yes24; + private System.Windows.Forms.DataGridViewTextBoxColumn count; } } diff --git a/ISBN_Check_test/Form1.cs b/ISBN_Check_test/Form1.cs index f70fd4c..048fd4e 100644 --- a/ISBN_Check_test/Form1.cs +++ b/ISBN_Check_test/Form1.cs @@ -9,6 +9,8 @@ using System.Text; using System.Threading.Tasks; using System.Threading; using System.Windows.Forms; +using WindowsFormsApp1; +using System.Text.RegularExpressions; namespace ISBN_Check_test { @@ -84,6 +86,20 @@ namespace ISBN_Check_test dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells[0]; this.ActiveControl = dataGridView1; } + #region 검색갯수 계산 + private void count_res() + { + String_Text st = new String_Text(); + int count = dataGridView1.Rows.Count; + for(int a= 0; a < count; a++) + { + string search_data = dataGridView1.Rows[a].Cells["Column1"].Value.ToString(); + int tmp_count = st.Char_count(search_data, '|'); + int lcount = tmp_count / 8; + dataGridView1.Rows[a].Cells["count"].Value = lcount.ToString(); + } + } + #endregion /// /// 알라딘 API /// @@ -104,7 +120,7 @@ namespace ISBN_Check_test else if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.LightGray) gridview.Rows[a].DefaultCellStyle.BackColor = Color.Empty; - // insert_By_Aladin(api.Aladin(query, "ISBN13", param), a); + insert_By_Aladin(api.Aladin(query, "ISBN13", param), a); try { richTextBox1.Text = api.Aladin(query, "ISBN13", param); @@ -265,8 +281,13 @@ namespace ISBN_Check_test if (data == "") { return; } // pubDate형 보기편하게 DateTime형으로 재정리 - string newstring = String.Format("{0:yyyy/MM/dd}", - DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G")))); + string newstring = ""; + try + { + newstring = String.Format("{0:yyyy/MM/dd}", + DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G")))); + } + catch(Exception ex) { MessageBox.Show(data); } // 도서 분류 필요한 데이터로 재정리 int top = insert[6].IndexOf('>'); @@ -344,8 +365,12 @@ namespace ISBN_Check_test if (row > 0) { dataGridView1.Rows[row - 1].Selected = false; } dataGridView1.Rows[row].Selected = true; - - string newstring = DateTime.ParseExact(grid[5], "yyyyMMdd", null).ToString("yyyy-MM-dd"); + string newstring = ""; + try + { + newstring = DateTime.ParseExact(grid[5], "yyyyMMdd", null).ToString("yyyy-MM-dd"); + } + catch { } input_api(grid, row, newstring); } @@ -428,6 +453,7 @@ namespace ISBN_Check_test dataGridView1.Rows[idx].Cells["sold_out"].Value = value[7]; dataGridView1.Rows[idx].DefaultCellStyle.BackColor = Color.Yellow; } + count_res(); } private void dataGridView1_KeyDown(object sender, KeyEventArgs e) { diff --git a/ISBN_Check_test/Form1.resx b/ISBN_Check_test/Form1.resx index 0c3a867..72e4e0f 100644 --- a/ISBN_Check_test/Form1.resx +++ b/ISBN_Check_test/Form1.resx @@ -147,4 +147,7 @@ True + + True + \ No newline at end of file diff --git a/ISBN_Check_test/Form1_Sub.cs b/ISBN_Check_test/Form1_Sub.cs index 2bfdd9b..b35ccbd 100644 --- a/ISBN_Check_test/Form1_Sub.cs +++ b/ISBN_Check_test/Form1_Sub.cs @@ -46,7 +46,6 @@ namespace ISBN_Check_test String xml = reader.ReadToEnd(); stream.Close(); - return xml; // xml형식을 json형식으로 변환 XmlDocument doc = new XmlDocument(); doc.LoadXml(xml); diff --git a/ISBN_Check_test/Form2.cs b/ISBN_Check_test/Form2.cs index 3c4d6ac..e8fcbd9 100644 --- a/ISBN_Check_test/Form2.cs +++ b/ISBN_Check_test/Form2.cs @@ -62,7 +62,11 @@ namespace ISBN_Check_test 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"); + try + { + return DateTime.ParseExact(date, "yyyyMMdd", null).ToString("yyyy-MM-dd"); + } + catch { return ""; } else return date; } diff --git a/ISBN_Check_test/Yes24.Designer.cs b/ISBN_Check_test/Yes24.Designer.cs index ef071f4..8f4eeba 100644 --- a/ISBN_Check_test/Yes24.Designer.cs +++ b/ISBN_Check_test/Yes24.Designer.cs @@ -29,8 +29,8 @@ namespace ISBN_Check_test /// private void InitializeComponent() { - 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 dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); this.btn_Close = new System.Windows.Forms.Button(); this.btn_change = new System.Windows.Forms.Button(); @@ -40,6 +40,8 @@ namespace ISBN_Check_test this.after_author = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.before_book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.after_book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.price = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.cb_bracket = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); // @@ -47,14 +49,14 @@ namespace ISBN_Check_test // this.dataGridView1.AllowUserToAddRows = false; this.dataGridView1.AllowUserToDeleteRows = false; - 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.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle7.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.before_book_name, @@ -62,20 +64,21 @@ namespace ISBN_Check_test this.before_author, this.after_author, this.before_book_comp, - this.after_book_comp}); + this.after_book_comp, + this.price}); this.dataGridView1.Location = new System.Drawing.Point(13, 41); this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.ReadOnly = true; - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle6.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle6; + 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.True; + this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle8; this.dataGridView1.RowTemplate.Height = 23; - this.dataGridView1.Size = new System.Drawing.Size(962, 661); + this.dataGridView1.Size = new System.Drawing.Size(1064, 661); this.dataGridView1.TabIndex = 0; this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); // @@ -139,11 +142,29 @@ namespace ISBN_Check_test this.after_book_comp.ReadOnly = true; this.after_book_comp.Width = 150; // + // price + // + this.price.HeaderText = "가격"; + this.price.Name = "price"; + this.price.ReadOnly = true; + // + // cb_bracket + // + this.cb_bracket.AutoSize = true; + this.cb_bracket.Location = new System.Drawing.Point(296, 13); + this.cb_bracket.Name = "cb_bracket"; + this.cb_bracket.Size = new System.Drawing.Size(104, 16); + this.cb_bracket.TabIndex = 2; + this.cb_bracket.Text = "괄호 제거 여부"; + this.cb_bracket.UseVisualStyleBackColor = true; + this.cb_bracket.CheckedChanged += new System.EventHandler(this.cb_bracket_CheckedChanged); + // // Yes24 // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(987, 714); + this.ClientSize = new System.Drawing.Size(1089, 714); + this.Controls.Add(this.cb_bracket); this.Controls.Add(this.btn_change); this.Controls.Add(this.btn_Close); this.Controls.Add(this.dataGridView1); @@ -152,6 +173,7 @@ namespace ISBN_Check_test this.Load += new System.EventHandler(this.Yes24_Load); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); this.ResumeLayout(false); + this.PerformLayout(); } @@ -166,5 +188,7 @@ namespace ISBN_Check_test private System.Windows.Forms.DataGridViewTextBoxColumn after_author; private System.Windows.Forms.DataGridViewTextBoxColumn before_book_comp; private System.Windows.Forms.DataGridViewTextBoxColumn after_book_comp; + private System.Windows.Forms.DataGridViewTextBoxColumn price; + private System.Windows.Forms.CheckBox cb_bracket; } } \ No newline at end of file diff --git a/ISBN_Check_test/Yes24.cs b/ISBN_Check_test/Yes24.cs index 3efa992..b2a699f 100644 --- a/ISBN_Check_test/Yes24.cs +++ b/ISBN_Check_test/Yes24.cs @@ -33,6 +33,7 @@ namespace ISBN_Check_test db.DBcon(); Take_DataBase(); Base_Setting(); + cb_bracket.Checked = true; } #region Yes24_Load_Sub private void Take_DataBase() @@ -51,16 +52,22 @@ namespace ISBN_Check_test private void Base_Setting() { int count = f1.dataGridView1.Rows.Count - 1; + string price = ""; for (int a = 0; a < count; a++) { + if (f1.dataGridView1.Rows[a].Cells["price"].Value != null) + { + price = f1.dataGridView1.Rows[a].Cells["price"].Value.ToString(); + } string[] grid = { f1.dataGridView1.Rows[a].Cells["book_name"].Value.ToString(), Replace_target(f1.dataGridView1.Rows[a].Cells["book_name"].Value.ToString(), "book_name"), f1.dataGridView1.Rows[a].Cells["author"].Value.ToString(), Replace_target(f1.dataGridView1.Rows[a].Cells["author"].Value.ToString(), "author"), f1.dataGridView1.Rows[a].Cells["book_comp"].Value.ToString(), - Replace_target(f1.dataGridView1.Rows[a].Cells["book_comp"].Value.ToString(), "book_comp") + Replace_target(f1.dataGridView1.Rows[a].Cells["book_comp"].Value.ToString(), "book_comp"), + price }; dataGridView1.Rows.Add(grid); } @@ -116,6 +123,7 @@ namespace ISBN_Check_test grid[a, 0] = count.ToString(); grid[a, 1] = dataGridView1.Rows[a].Cells["after_book_name"].Value.ToString(); grid[a, 3] = dataGridView1.Rows[a].Cells["after_book_comp"].Value.ToString(); + grid[a, 4] = dataGridView1.Rows[a].Cells["price"].Value.ToString(); } Excel_change(grid); } @@ -170,5 +178,25 @@ namespace ISBN_Check_test { this.Close(); } + + private void cb_bracket_CheckedChanged(object sender, EventArgs e) + { + int count = dataGridView1.Rows.Count; + for(int a = 0; a < count; a++) + { + if (cb_bracket.Checked) + { + string book_name = dataGridView1.Rows[a].Cells["before_book_name"].Value.ToString(); + string After = Replace_target(book_name, "book_name"); + dataGridView1.Rows[a].Cells["after_book_name"].Value = After; + } + else + { + + string book_name = dataGridView1.Rows[a].Cells["before_book_name"].Value.ToString(); + dataGridView1.Rows[a].Cells["after_book_name"].Value = book_name; + } + } + } } } diff --git a/ISBN_Check_test/Yes24.resx b/ISBN_Check_test/Yes24.resx index ba61a41..498b2e4 100644 --- a/ISBN_Check_test/Yes24.resx +++ b/ISBN_Check_test/Yes24.resx @@ -135,4 +135,7 @@ True + + True + \ No newline at end of file diff --git a/ISBN_Check_test/bin/Debug/ISBN_Check_test.application b/ISBN_Check_test/bin/Debug/ISBN_Check_test.application index b76c7f9..6e07c87 100644 --- a/ISBN_Check_test/bin/Debug/ISBN_Check_test.application +++ b/ISBN_Check_test/bin/Debug/ISBN_Check_test.application @@ -21,7 +21,7 @@ - bNaGxFwsvqHtjKgaMWpSGieYbPRoJTrpUpqP8sLexSE= + KfNy3DAiJLEh3tRQ2ZQcK5Keg1upaJsdza4YBq+Y4bs= diff --git a/ISBN_Check_test/bin/Debug/ISBN_Check_test.exe b/ISBN_Check_test/bin/Debug/ISBN_Check_test.exe index 1e7f8f2..a89adda 100644 Binary files a/ISBN_Check_test/bin/Debug/ISBN_Check_test.exe and b/ISBN_Check_test/bin/Debug/ISBN_Check_test.exe differ diff --git a/ISBN_Check_test/bin/Debug/ISBN_Check_test.exe.manifest b/ISBN_Check_test/bin/Debug/ISBN_Check_test.exe.manifest index e891f26..f1738a9 100644 --- a/ISBN_Check_test/bin/Debug/ISBN_Check_test.exe.manifest +++ b/ISBN_Check_test/bin/Debug/ISBN_Check_test.exe.manifest @@ -3,7 +3,7 @@ - + @@ -66,14 +66,14 @@ - - + + - eT6wZ+LInGwQyOBwLKoXJc+YhUQSjW/3BLMLJtqq+ko= + 1jQjMNp8jzDP+pP5SPnsAv651qNqU9GEpBC5IKMbD/Q= @@ -230,13 +230,13 @@ Qx+jN639AkukL3VOtM7n2jV0SwkhZyRLAjCNL9Lyp14= - + - 5EY2z3HTLvenYjm2DgJUY+W71iazqD+wGh3CSjpO6+w= + 5wxJhVMbghywvrKT0y8SppZWKsk+i4zv+rv4zZRY8Gw= \ No newline at end of file diff --git a/ISBN_Check_test/bin/Debug/ISBN_Check_test.pdb b/ISBN_Check_test/bin/Debug/ISBN_Check_test.pdb index 0a308fa..2741c16 100644 Binary files a/ISBN_Check_test/bin/Debug/ISBN_Check_test.pdb and b/ISBN_Check_test/bin/Debug/ISBN_Check_test.pdb differ diff --git a/ISBN_Check_test/bin/Debug/app.publish/ISBN_Check_test.exe b/ISBN_Check_test/bin/Debug/app.publish/ISBN_Check_test.exe index d901208..0606d3d 100644 Binary files a/ISBN_Check_test/bin/Debug/app.publish/ISBN_Check_test.exe and b/ISBN_Check_test/bin/Debug/app.publish/ISBN_Check_test.exe differ diff --git a/ISBN_Check_test/obj/Debug/ISBN_Check_test.application b/ISBN_Check_test/obj/Debug/ISBN_Check_test.application index b76c7f9..6e07c87 100644 --- a/ISBN_Check_test/obj/Debug/ISBN_Check_test.application +++ b/ISBN_Check_test/obj/Debug/ISBN_Check_test.application @@ -21,7 +21,7 @@ - bNaGxFwsvqHtjKgaMWpSGieYbPRoJTrpUpqP8sLexSE= + KfNy3DAiJLEh3tRQ2ZQcK5Keg1upaJsdza4YBq+Y4bs= diff --git a/ISBN_Check_test/obj/Debug/ISBN_Check_test.csproj.AssemblyReference.cache b/ISBN_Check_test/obj/Debug/ISBN_Check_test.csproj.AssemblyReference.cache index eb0610d..f5e894a 100644 Binary files a/ISBN_Check_test/obj/Debug/ISBN_Check_test.csproj.AssemblyReference.cache and b/ISBN_Check_test/obj/Debug/ISBN_Check_test.csproj.AssemblyReference.cache differ diff --git a/ISBN_Check_test/obj/Debug/ISBN_Check_test.csproj.GenerateResource.cache b/ISBN_Check_test/obj/Debug/ISBN_Check_test.csproj.GenerateResource.cache index afffe51..29d5e67 100644 Binary files a/ISBN_Check_test/obj/Debug/ISBN_Check_test.csproj.GenerateResource.cache and b/ISBN_Check_test/obj/Debug/ISBN_Check_test.csproj.GenerateResource.cache differ diff --git a/ISBN_Check_test/obj/Debug/ISBN_Check_test.exe b/ISBN_Check_test/obj/Debug/ISBN_Check_test.exe index 1e7f8f2..a89adda 100644 Binary files a/ISBN_Check_test/obj/Debug/ISBN_Check_test.exe and b/ISBN_Check_test/obj/Debug/ISBN_Check_test.exe differ diff --git a/ISBN_Check_test/obj/Debug/ISBN_Check_test.exe.manifest b/ISBN_Check_test/obj/Debug/ISBN_Check_test.exe.manifest index e891f26..f1738a9 100644 --- a/ISBN_Check_test/obj/Debug/ISBN_Check_test.exe.manifest +++ b/ISBN_Check_test/obj/Debug/ISBN_Check_test.exe.manifest @@ -3,7 +3,7 @@ - + @@ -66,14 +66,14 @@ - - + + - eT6wZ+LInGwQyOBwLKoXJc+YhUQSjW/3BLMLJtqq+ko= + 1jQjMNp8jzDP+pP5SPnsAv651qNqU9GEpBC5IKMbD/Q= @@ -230,13 +230,13 @@ Qx+jN639AkukL3VOtM7n2jV0SwkhZyRLAjCNL9Lyp14= - + - 5EY2z3HTLvenYjm2DgJUY+W71iazqD+wGh3CSjpO6+w= + 5wxJhVMbghywvrKT0y8SppZWKsk+i4zv+rv4zZRY8Gw= \ No newline at end of file diff --git a/ISBN_Check_test/obj/Debug/ISBN_Check_test.pdb b/ISBN_Check_test/obj/Debug/ISBN_Check_test.pdb index 0a308fa..2741c16 100644 Binary files a/ISBN_Check_test/obj/Debug/ISBN_Check_test.pdb and b/ISBN_Check_test/obj/Debug/ISBN_Check_test.pdb differ diff --git a/unimarc/.vs/unimarc/v16/.suo b/unimarc/.vs/unimarc/v16/.suo index 4e04b1e..6f64807 100644 Binary files a/unimarc/.vs/unimarc/v16/.suo and b/unimarc/.vs/unimarc/v16/.suo differ diff --git a/unimarc/unimarc/Email.cs b/unimarc/unimarc/Email.cs index 91b3def..2d52969 100644 --- a/unimarc/unimarc/Email.cs +++ b/unimarc/unimarc/Email.cs @@ -31,10 +31,8 @@ namespace WindowsFormsApp1 MailMessage mail_by_self = new MailMessage(); // 보내는 사람 이메일 - // mail.From = new MailAddress(arr_db[1]); - // mail_by_self.From = new MailAddress(arr_db[1]); - mail.From = new MailAddress("jhk132765@naver.com"); - mail_by_self.From = new MailAddress("jhk132765@naver.com"); + mail.From = new MailAddress(arr_db[1]); + mail_by_self.From = new MailAddress(arr_db[1]); // 받는 사람 이메일 mail.To.Add(sender); @@ -48,11 +46,8 @@ namespace WindowsFormsApp1 mail.Body = arr_db[0] + "주문분입니다."; mail_by_self.Body = "Send_" + arr_db[0] + "주문분입니다."; - // 첨부파일 - System.Net.Mail.Attachment attachment; - // 첨부파일 붙이기 - attachment = new System.Net.Mail.Attachment(filePath); + Attachment attachment = new Attachment(filePath); mail.Attachments.Add(attachment); mail_by_self.Attachments.Add(attachment); diff --git a/unimarc/unimarc/bin/Debug/UniMarc.exe b/unimarc/unimarc/bin/Debug/UniMarc.exe index cb958cf..3e19579 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 af8f1e9..97c1138 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 ac4ac47..d274a55 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.AssemblyReference.cache b/unimarc/unimarc/obj/Debug/UniMarc.csproj.AssemblyReference.cache index 48fc6ee..7461d7e 100644 Binary files a/unimarc/unimarc/obj/Debug/UniMarc.csproj.AssemblyReference.cache and b/unimarc/unimarc/obj/Debug/UniMarc.csproj.AssemblyReference.cache differ diff --git a/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache b/unimarc/unimarc/obj/Debug/UniMarc.csproj.GenerateResource.cache index ae55832..dd8680a 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 cb958cf..3e19579 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 af8f1e9..97c1138 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 ac4ac47..d274a55 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/납품관리/Order_Send_Chk.Designer.cs b/unimarc/unimarc/납품관리/Order_Send_Chk.Designer.cs index 53e1847..7799583 100644 --- a/unimarc/unimarc/납품관리/Order_Send_Chk.Designer.cs +++ b/unimarc/unimarc/납품관리/Order_Send_Chk.Designer.cs @@ -33,16 +33,23 @@ namespace WindowsFormsApp1.납품관리 System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); this.panel1 = new System.Windows.Forms.Panel(); - this.label1 = new System.Windows.Forms.Label(); + this.tb_pur = new System.Windows.Forms.TextBox(); this.Start_DatePicker = new System.Windows.Forms.DateTimePicker(); this.label7 = new System.Windows.Forms.Label(); this.End_DatePicker = new System.Windows.Forms.DateTimePicker(); this.label2 = new System.Windows.Forms.Label(); - this.textBox1 = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); this.btn_Lookup = new System.Windows.Forms.Button(); this.btn_Close = new System.Windows.Forms.Button(); this.dataGrid_Fax = new System.Windows.Forms.DataGridView(); this.dataGrid_Email = new System.Windows.Forms.DataGridView(); + this.m_clt = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.m_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.m_time = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.m_sender = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.m_taker = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.m_filename = new System.Windows.Forms.DataGridViewButtonColumn(); + this.m_sendres = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.FaxKey = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.f_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.f_num = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -50,15 +57,8 @@ namespace WindowsFormsApp1.납품관리 this.f_state = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.f_page1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.f_page2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.f_filename = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.f_filename = new System.Windows.Forms.DataGridViewButtonColumn(); this.f_res = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.m_clt = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.m_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.m_time = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.m_sender = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.m_taker = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.m_filename = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.m_sendres = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGrid_Fax)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGrid_Email)).BeginInit(); @@ -67,7 +67,7 @@ namespace WindowsFormsApp1.납품관리 // panel1 // this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; - this.panel1.Controls.Add(this.textBox1); + this.panel1.Controls.Add(this.tb_pur); this.panel1.Controls.Add(this.Start_DatePicker); this.panel1.Controls.Add(this.label7); this.panel1.Controls.Add(this.End_DatePicker); @@ -78,14 +78,12 @@ namespace WindowsFormsApp1.납품관리 this.panel1.Size = new System.Drawing.Size(538, 35); this.panel1.TabIndex = 0; // - // label1 + // tb_pur // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(21, 10); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(69, 12); - this.label1.TabIndex = 0; - this.label1.Text = "발송 요청일"; + this.tb_pur.Location = new System.Drawing.Point(381, 6); + this.tb_pur.Name = "tb_pur"; + this.tb_pur.Size = new System.Drawing.Size(147, 21); + this.tb_pur.TabIndex = 21; // // Start_DatePicker // @@ -123,12 +121,14 @@ namespace WindowsFormsApp1.납품관리 this.label2.TabIndex = 0; this.label2.Text = "거래처명"; // - // textBox1 + // label1 // - this.textBox1.Location = new System.Drawing.Point(381, 6); - this.textBox1.Name = "textBox1"; - this.textBox1.Size = new System.Drawing.Size(147, 21); - this.textBox1.TabIndex = 21; + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(21, 10); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(69, 12); + this.label1.TabIndex = 0; + this.label1.Text = "발송 요청일"; // // btn_Lookup // @@ -138,6 +138,7 @@ namespace WindowsFormsApp1.납품관리 this.btn_Lookup.TabIndex = 1; this.btn_Lookup.Text = "조 회"; this.btn_Lookup.UseVisualStyleBackColor = true; + this.btn_Lookup.Click += new System.EventHandler(this.btn_Lookup_Click); // // btn_Close // @@ -147,6 +148,7 @@ namespace WindowsFormsApp1.납품관리 this.btn_Close.TabIndex = 1; this.btn_Close.Text = "닫 기"; this.btn_Close.UseVisualStyleBackColor = true; + this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click); // // dataGrid_Fax // @@ -176,8 +178,9 @@ namespace WindowsFormsApp1.납품관리 this.dataGrid_Fax.Name = "dataGrid_Fax"; this.dataGrid_Fax.RowHeadersWidth = 10; this.dataGrid_Fax.RowTemplate.Height = 23; - this.dataGrid_Fax.Size = new System.Drawing.Size(890, 493); + this.dataGrid_Fax.Size = new System.Drawing.Size(890, 511); this.dataGrid_Fax.TabIndex = 2; + this.dataGrid_Fax.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGrid_Email_CellContentClick); // // dataGrid_Email // @@ -207,6 +210,48 @@ namespace WindowsFormsApp1.납품관리 this.dataGrid_Email.RowTemplate.Height = 23; this.dataGrid_Email.Size = new System.Drawing.Size(890, 493); this.dataGrid_Email.TabIndex = 3; + this.dataGrid_Email.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGrid_Email_CellContentClick); + // + // m_clt + // + this.m_clt.HeaderText = "거래처명"; + this.m_clt.Name = "m_clt"; + this.m_clt.Width = 150; + // + // m_date + // + this.m_date.HeaderText = "날짜"; + this.m_date.Name = "m_date"; + // + // m_time + // + this.m_time.HeaderText = "시간"; + this.m_time.Name = "m_time"; + // + // m_sender + // + this.m_sender.HeaderText = "보낸 메일주소"; + this.m_sender.Name = "m_sender"; + this.m_sender.Width = 130; + // + // m_taker + // + this.m_taker.HeaderText = "받는 메일주소"; + this.m_taker.Name = "m_taker"; + this.m_taker.Width = 130; + // + // m_filename + // + this.m_filename.HeaderText = "전송파일명"; + this.m_filename.Name = "m_filename"; + this.m_filename.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.m_filename.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; + this.m_filename.Width = 150; + // + // m_sendres + // + this.m_sendres.HeaderText = "전송결과"; + this.m_sendres.Name = "m_sendres"; // // FaxKey // @@ -251,6 +296,8 @@ namespace WindowsFormsApp1.납품관리 // this.f_filename.HeaderText = "전송파일명"; this.f_filename.Name = "f_filename"; + this.f_filename.Resizable = System.Windows.Forms.DataGridViewTriState.True; + this.f_filename.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.Automatic; this.f_filename.Width = 150; // // f_res @@ -260,50 +307,11 @@ namespace WindowsFormsApp1.납품관리 this.f_res.HeaderText = "전송결과"; this.f_res.Name = "f_res"; // - // m_clt - // - this.m_clt.HeaderText = "거래처명"; - this.m_clt.Name = "m_clt"; - this.m_clt.Width = 150; - // - // m_date - // - this.m_date.HeaderText = "날짜"; - this.m_date.Name = "m_date"; - // - // m_time - // - this.m_time.HeaderText = "시간"; - this.m_time.Name = "m_time"; - // - // m_sender - // - this.m_sender.HeaderText = "보낸 메일주소"; - this.m_sender.Name = "m_sender"; - this.m_sender.Width = 130; - // - // m_taker - // - this.m_taker.HeaderText = "받는 메일주소"; - this.m_taker.Name = "m_taker"; - this.m_taker.Width = 130; - // - // m_filename - // - this.m_filename.HeaderText = "전송파일명"; - this.m_filename.Name = "m_filename"; - this.m_filename.Width = 150; - // - // m_sendres - // - this.m_sendres.HeaderText = "전송결과"; - this.m_sendres.Name = "m_sendres"; - // // Order_Send_Chk // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(914, 558); + this.ClientSize = new System.Drawing.Size(914, 576); this.Controls.Add(this.dataGrid_Email); this.Controls.Add(this.btn_Close); this.Controls.Add(this.btn_Lookup); @@ -324,7 +332,7 @@ namespace WindowsFormsApp1.납품관리 private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Label label1; - private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.TextBox tb_pur; private System.Windows.Forms.DateTimePicker Start_DatePicker; private System.Windows.Forms.Label label7; private System.Windows.Forms.DateTimePicker End_DatePicker; @@ -340,14 +348,14 @@ namespace WindowsFormsApp1.납품관리 private System.Windows.Forms.DataGridViewTextBoxColumn f_state; private System.Windows.Forms.DataGridViewTextBoxColumn f_page1; private System.Windows.Forms.DataGridViewTextBoxColumn f_page2; - private System.Windows.Forms.DataGridViewTextBoxColumn f_filename; + private System.Windows.Forms.DataGridViewButtonColumn f_filename; private System.Windows.Forms.DataGridViewTextBoxColumn f_res; private System.Windows.Forms.DataGridViewTextBoxColumn m_clt; private System.Windows.Forms.DataGridViewTextBoxColumn m_date; private System.Windows.Forms.DataGridViewTextBoxColumn m_time; private System.Windows.Forms.DataGridViewTextBoxColumn m_sender; private System.Windows.Forms.DataGridViewTextBoxColumn m_taker; - private System.Windows.Forms.DataGridViewTextBoxColumn m_filename; + private System.Windows.Forms.DataGridViewButtonColumn m_filename; private System.Windows.Forms.DataGridViewTextBoxColumn m_sendres; } } \ No newline at end of file diff --git a/unimarc/unimarc/납품관리/Order_Send_Chk.cs b/unimarc/unimarc/납품관리/Order_Send_Chk.cs index 9101784..0f9ee5a 100644 --- a/unimarc/unimarc/납품관리/Order_Send_Chk.cs +++ b/unimarc/unimarc/납품관리/Order_Send_Chk.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.ComponentModel; using System.Data; +using System.Diagnostics; using System.Drawing; using System.Linq; using System.Text; @@ -31,11 +32,25 @@ namespace WindowsFormsApp1.납품관리 int Year = DateTime.Now.Year; int Month = DateTime.Now.Month; int Day = DateTime.Now.Day - 1; - Start_DatePicker.Value = new DateTime(Year, Month, Day); + try + { + Start_DatePicker.Value = new DateTime(Year, Month, Day); + } + catch + { + Month -= 1; + Day = DateTime.DaysInMonth(Year, Month); + Start_DatePicker.Value = new DateTime(Year, Month, Day); + } + #endregion + btn_Lookup_Click(null, null); + } + + private void btn_Lookup_Click(object sender, EventArgs e) + { set_date[0] = Start_DatePicker.Value.ToString().Substring(0, 10); set_date[1] = End_DatePicker.Value.ToString().Substring(0, 10); - #endregion #region Grid설정 string Area = "`구분`, `팩스전송키`, `거래처명`, `날짜`, `시간`, `보낸이`, `받는이`, `전송파일명`, `전송결과`"; @@ -44,6 +59,7 @@ namespace WindowsFormsApp1.납품관리 input_Grid(Fax_Key); #endregion } + #region LookUp 서브 함수 private void input_Grid(string[] data) { switch(oi.cb_ordersend.SelectedIndex) @@ -67,53 +83,93 @@ namespace WindowsFormsApp1.납품관리 private void Fax_Grid(string[] data) { string[] grid = { "", "", "", "", "", - "", "", "" }; + "", "", "", "" }; + bool not_mail = true; int len = 9; for(int a = 0; a < data.Length; a++) { if (a % len == 0) { - if (data[a] != "팩스") return; + if (data[a] != "팩스") not_mail = false; + else not_mail = true; } - if (a % len == 1) { - dataGrid_Fax.Rows.Add(Plus_Fax(data[a], grid)); + if (a % len == 1 && not_mail) { + dataGrid_Fax.Rows.Add(Plus_Fax(data, grid, a)); } } } + private string[] Plus_Fax(string[] db_data, string[] grid, int a) + { + Barobill_FAX fax = new Barobill_FAX(); + + // 수신자회사명, 수신번호, 전송일시, 전송상태, 전송페이지수, 성공페이지수, 전송파일명, 전송결과 + string[] data = fax.Send_chk_BaroFax(db_data[a]); + MessageBox.Show(db_data[a]); + grid[0] = db_data[a]; + grid[1] = data[0]; + grid[2] = data[1]; + grid[3] = db_data[3] + " " + db_data[4]; + grid[4] = data[3]; + grid[5] = data[4]; + grid[6] = data[5]; + grid[7] = db_data[7]; + grid[8] = data[3]; + + return grid; + } + private void Email_Grid(string[] data) { string[] grid = { "", "", "", "", "", "" }; + bool not_mail = true; int len = 9; for(int a= 0; a < data.Length; a++) { if (a % len == 0) { - if (data[a] != "메일") return; + if (data[a] != "메일") not_mail = false; + else { not_mail = true; } } if (a % len == 2) { grid[0] = data[a]; } if (a % len == 3) { grid[1] = data[a]; } if (a % len == 4) { grid[2] = data[a]; } if (a % len == 5) { grid[3] = data[a]; } if (a % len == 6) { grid[4] = data[a]; } - if (a % len == 7) { grid[5] = data[a]; dataGrid_Email.Rows.Add(grid); } + if (a % len == 7 && not_mail) { + grid[5] = data[a]; + dataGrid_Email.Rows.Add(grid); + } } } - private string[] Plus_Fax(string faxkey, string[] grid) + #endregion + + private void btn_Close_Click(object sender, EventArgs e) { - Barobill_FAX fax = new Barobill_FAX(); + this.Close(); + } - // 수신자회사명, 수신번호, 전송일시, 전송결과, 전송페이지수, 성공페이지수, 전송파일명 - string[] data = fax.Send_chk_BaroFax(faxkey); - MessageBox.Show(faxkey); - grid[0] = faxkey; - grid[1] = data[0]; - grid[2] = data[1]; - grid[3] = data[2]; - grid[4] = data[3]; - grid[5] = data[4]; - grid[6] = data[5]; - grid[7] = data[6]; - - return grid; + private void dataGrid_Email_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + int row = e.RowIndex; + int col = e.ColumnIndex; + string name = ((DataGridView)sender).Name; + string filename = ""; + switch (name) + { + // f_filename m_filename + case "dataGrid_Email": + if (dataGrid_Email.Columns["m_filename"].Index != col) { return; } + filename = dataGrid_Email.Rows[row].Cells[col].Value.ToString(); + break; + case "dataGrid_Fax": + if (dataGrid_Fax.Columns["f_filename"].Index != col) { return; } + filename = dataGrid_Fax.Rows[row].Cells[col].Value.ToString(); + break; + } + try + { + Process.Start(Application.StartupPath + "/Excel\\" + filename + ".xlsx"); + } + catch { } } } } diff --git a/unimarc/unimarc/납품관리/Order_input.Designer.cs b/unimarc/unimarc/납품관리/Order_input.Designer.cs index 6f65457..8d40fd2 100644 --- a/unimarc/unimarc/납품관리/Order_input.Designer.cs +++ b/unimarc/unimarc/납품관리/Order_input.Designer.cs @@ -49,7 +49,7 @@ this.dateTimePicker4 = new System.Windows.Forms.DateTimePicker(); this.label9 = new System.Windows.Forms.Label(); this.label10 = new System.Windows.Forms.Label(); - this.textBox2 = new System.Windows.Forms.TextBox(); + this.tb_PS = new System.Windows.Forms.TextBox(); this.btn_lookup = new System.Windows.Forms.Button(); this.btn_Reset_Order = new System.Windows.Forms.Button(); this.button8 = new System.Windows.Forms.Button(); @@ -259,12 +259,12 @@ this.label10.TabIndex = 22; this.label10.Text = "주문시 요청사항"; // - // textBox2 + // tb_PS // - this.textBox2.Location = new System.Drawing.Point(104, 31); - this.textBox2.Name = "textBox2"; - this.textBox2.Size = new System.Drawing.Size(624, 21); - this.textBox2.TabIndex = 23; + this.tb_PS.Location = new System.Drawing.Point(104, 31); + this.tb_PS.Name = "tb_PS"; + this.tb_PS.Size = new System.Drawing.Size(624, 21); + this.tb_PS.TabIndex = 23; // // btn_lookup // @@ -633,7 +633,7 @@ this.panel2.Controls.Add(this.tb_search_book_list); this.panel2.Controls.Add(this.dateTimePicker3); this.panel2.Controls.Add(this.label10); - this.panel2.Controls.Add(this.textBox2); + this.panel2.Controls.Add(this.tb_PS); this.panel2.Location = new System.Drawing.Point(9, 47); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(887, 58); @@ -736,7 +736,7 @@ private System.Windows.Forms.DateTimePicker dateTimePicker4; private System.Windows.Forms.Label label9; private System.Windows.Forms.Label label10; - private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.TextBox tb_PS; private System.Windows.Forms.Button btn_lookup; private System.Windows.Forms.Button btn_Reset_Order; private System.Windows.Forms.Button button8; diff --git a/unimarc/unimarc/납품관리/Order_input.cs b/unimarc/unimarc/납품관리/Order_input.cs index 6929144..91b49c7 100644 --- a/unimarc/unimarc/납품관리/Order_input.cs +++ b/unimarc/unimarc/납품관리/Order_input.cs @@ -40,7 +40,7 @@ namespace WindowsFormsApp1.Delivery // 데이터 그리드 뷰 수정 for(int a = 0; a < dataGridView1.Columns.Count; a++) { - if (a != 1 && a != 6 && a != 13 && a != 16) { + if (a != 1 && a != 6 && a != 16) { dataGridView1.Columns[a].ReadOnly = true; } } @@ -250,7 +250,8 @@ namespace WindowsFormsApp1.Delivery { grididx = e.RowIndex; ColumnIndex = e.ColumnIndex; - if (e.ColumnIndex == 1 || e.ColumnIndex == 14 || e.ColumnIndex == 13 || + + if (e.ColumnIndex == 0 || e.ColumnIndex == 1 || e.ColumnIndex == 14 || e.ColumnIndex == 6 || e.ColumnIndex == 15 || e.ColumnIndex == 16) { return; } if(e.ColumnIndex == 3 || e.ColumnIndex == 4 || e.ColumnIndex == 5) @@ -265,27 +266,24 @@ namespace WindowsFormsApp1.Delivery bl.Show(); return; } - if (e.ColumnIndex == 0) - { - } - else if (e.ColumnIndex == 2 && chk_V == false) + if (e.ColumnIndex == 2 && !chk_V) { dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = "V"; chk_V = true; } - else if (e.ColumnIndex == 2 && chk_V == true) + else if (e.ColumnIndex == 2 && chk_V) { dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value = ""; chk_V = false; } - else if (chk_mkdate.Contains("." + e.RowIndex + ", ") == true) + if (e.ColumnIndex == 13 && dataGridView1.Rows[grididx].Cells[ColumnIndex].Value.ToString() != "") { - dataGridView1.Rows[e.RowIndex].Cells[13].Value = ""; + dataGridView1.Rows[e.RowIndex].Cells["order_date"].Value = ""; chk_mkdate = chk_mkdate.Replace("." + e.RowIndex + ", ", ""); } - else if (chk_mkdate.Contains("." + e.RowIndex + " , ") == false) + else if (e.ColumnIndex == 13 && dataGridView1.Rows[grididx].Cells[ColumnIndex].Value.ToString() == "") { - dataGridView1.Rows[e.RowIndex].Cells[13].Value = DateTime.Now.ToString("d"); + dataGridView1.Rows[e.RowIndex].Cells["order_date"].Value = DateTime.Now.ToString("d"); chk_mkdate += "." + e.RowIndex + ", "; } } @@ -314,191 +312,259 @@ namespace WindowsFormsApp1.Delivery { int row = dataGridView1.CurrentCell.RowIndex; int col = dataGridView1.CurrentCell.ColumnIndex; - if (e.KeyCode == Keys.Enter) - { - if (col == 1) { - MessageBox.Show(row.ToString() + " " + col.ToString()); + if (e.KeyCode == Keys.Delete) { + if (dataGridView1.Columns[col].HeaderText == "비 고") { + Skill_Grid sg = new Skill_Grid(); + sg.DataGrid_to_Delete(sender, e); } } - if (e.KeyCode == Keys.Delete) { - Skill_Grid sg = new Skill_Grid(); - sg.DataGrid_to_Delete(sender, e); - } - - //tb_orderText_KeyDown(sender, e); } private void btn_Excel_Click(object sender, EventArgs e) + { + string same = same_order(); + if (same == "false") { return; } + + string temp = Excel_sub(); + if (temp == "false") { return; } + + if (sender != null && e != null) { System.Diagnostics.Process.Start(Application.StartupPath + "/Excel"); } + } + private string Excel_sub() { List chkIdx = new List(); int total = 0; - for(int a = 0; a < dataGridView1.Rows.Count; a++) + for (int a = 0; a < dataGridView1.Rows.Count; a++) { if (dataGridView1.Rows[a].Cells["chk"].Value.ToString() == "true") { chkIdx.Add(a); - total += Convert.ToInt32(dataGridView1.Rows[a].Cells["order_count"].Value.ToString()); + total += Convert.ToInt32(dataGridView1.Rows[a].Cells["count"].Value.ToString()); } } - if (chkIdx.Count < 1) { MessageBox.Show("선택된 도서가 없습니다!"); return; } - string[,] inputExcel = new string[chkIdx.Count,7]; + if (chkIdx.Count < 1) { MessageBox.Show("선택된 도서가 없습니다!"); return "false"; } + string[,] inputExcel = new string[chkIdx.Count, 7]; string pur = dataGridView1.Rows[chkIdx[0]].Cells["order"].Value.ToString(); - for(int a = 0; a < chkIdx.Count; a++) + for (int a = 0; a < chkIdx.Count; a++) { - if (dataGridView1.Rows[chkIdx[a]].Cells["order"].Value.ToString() != pur) { - MessageBox.Show("주문처가 동일하지 않습니다!", "Error"); - return; - } string list = dataGridView1.Rows[chkIdx[a]].Cells["list_name"].Value.ToString(); - string div = list.Substring(list.IndexOf(']')+1); + string div = list.Substring(list.IndexOf(']') + 1); int num = a + 1; inputExcel[a, 0] = num.ToString(); inputExcel[a, 1] = dataGridView1.Rows[chkIdx[a]].Cells["book_comp"].Value.ToString(); inputExcel[a, 2] = dataGridView1.Rows[chkIdx[a]].Cells["book_name"].Value.ToString(); inputExcel[a, 3] = dataGridView1.Rows[chkIdx[a]].Cells["author"].Value.ToString(); - inputExcel[a, 4] = dataGridView1.Rows[chkIdx[a]].Cells["order_count"].Value.ToString(); + inputExcel[a, 4] = dataGridView1.Rows[chkIdx[a]].Cells["count"].Value.ToString(); inputExcel[a, 5] = dataGridView1.Rows[chkIdx[a]].Cells["pay"].Value.ToString(); inputExcel[a, 6] = div + "\n" + dataGridView1.Rows[chkIdx[a]].Cells["isbn"].Value.ToString(); - } + } Excel_text ex = new Excel_text(); - ex.mk_Excel_Order(inputExcel, total, compidx, pur); + string filename = ex.mk_Excel_Order(inputExcel, total, compidx, pur, tb_PS.Text); + MessageBox.Show("엑셀 반출 완료"); + + return filename; + } + /// + /// 주문처가 동일한지 조건을 따져보는 함수 + /// + private string same_order() + { + string over_lab = ""; + for (int a = 0; a < dataGridView1.Rows.Count; a++) + { + if (dataGridView1.Rows[a].Cells["chk"].Value.ToString() == "true" && over_lab == "") + { + over_lab = dataGridView1.Rows[a].Cells["order"].Value.ToString(); + } + else if (dataGridView1.Rows[a].Cells["chk"].Value.ToString() == "true") + { + if (dataGridView1.Rows[a].Cells["order"].Value.ToString() == over_lab) + { + MessageBox.Show("주문처가 동일하지 않습니다!", "Error"); + return "false"; + } + } + } + return over_lab; } private void btn_order_send_Click(object sender, EventArgs e) { - string Date = DateTime.Now.ToString("yyyy-MM-dd"); - string Time = DateTime.Now.ToString("HH-mm-ss"); - String_Text st = new String_Text(); - string pur = "dasd"; - string FilePath = string.Empty; - string filename = string.Empty; + // 주문처 따옴 + string pur = same_order(); + if (pur == "false") { return; } - OpenFileDialog Odig = openFileDialog1; - Odig.Filter = "Excel Files(*.xls)|*.xls|Excel Files(*.xlsx)|*.xlsx|All FIles(*.*)|*.*"; - Odig.Title = "파일을 선택해주세요."; + // 보낼 경로가 메일인지 팩스인지 확인. + string emchk = Email_Fax_chk(pur); - if (Odig.ShowDialog() == DialogResult.OK) + // 엑셀파일 생성 + string filename = Excel_sub(); + string filePath = Application.StartupPath + "/Excel" + filename; + + switch (emchk) { - FilePath = Odig.FileName; - filename = Path.GetFileName(FilePath); - FilePath = Path.GetDirectoryName(FilePath); - } - else return; - - if (cb_ordersend.SelectedItem.ToString() == "팩스") { - - List data_list = new List(); - - string Area = "`fax`"; - string tmp = db.DB_Select_Search(Area, "Comp", "idx", compidx); - - string[] tmp_data = tmp.Split('|'); - string[] fax_num = tmp_data[0].Split(','); - - string pur_area = "`fax`, `boss`"; - string tmp_pur = db.DB_Select_Search(pur_area, "Purchase", "sangho", pur); - - string[] db_pur = tmp_pur.Split('|'); - - string[] pur_data = { "", pur, "" }; - if (db_pur.Length > 3) - { - for(int a = 0; a < db_pur.Length; a++) - { - if (a % 3 == 0) { - if (db_pur[a] != "") { - pur_data[0] = db_pur[a]; - } - } - if (a % 3 == 2) { - if (db_pur[a] != "") { - pur_data[2] = db_pur[a]; - } - } - } - } - - if (pur_data[1] == "") { - MessageBox.Show("주문처의 팩스 번호가 비어있습니다!", "Error"); - return; - } - - data_list.Add(fax_num[0]); - data_list.AddRange(pur_data); - - string[] fax_param = data_list.ToArray(); - - FTP ftp = new FTP(); - - // TODO: openFileDialog 사용. 파일경로 가져와야함. - - bool result = ftp.ConnectToServer(); - string path = @""; - DirectoryInfo dirInfo = new DirectoryInfo(FilePath); - FileInfo[] infos = dirInfo.GetFiles(); - - if (result == true) { - foreach (FileInfo info in dirInfo.GetFiles()) - { - if (Path.GetFileName(info.Name) == filename) { - if (ftp.UpLoad(path, info.FullName) == false) - MessageBox.Show("FTP Upload 실패"); - - else - MessageBox.Show("FTP Upload 성공"); - - } - } - } - else MessageBox.Show("접속 실패"); - - // 바로빌 FAX API연동 - db.DB_Update("Comp", "fax_Key", fax.Send_BaroFax(filename, fax_param), "idx", compidx); - string Fax_Key = fax.Send_BaroFax(filename, fax_param); - string[] col_Name = { "compidx", "구분", "팩스전송키", "날짜", "시간" }; - string[] set_Data = { compidx, "팩스", Fax_Key, Date, Time }; - - db.DB_INSERT("Send_Order", col_Name, set_Data); - } - if (cb_ordersend.SelectedItem.ToString() == "메일") { - - // 보내는 이 : 메일ID - string sender_Area = "`email_ID`"; - string tmp_db = db.DB_Select_Search(sender_Area, "Comp", "idx", compidx); - - string[] arr_db = tmp_db.Split('|'); - - // 받는 이 : 메일 - string taker_Area = "`email`"; - tmp_db = db.DB_Select_Search(taker_Area, "Purchase", "sangho", pur); - - string[] arr_pur = tmp_db.Split('|'); - string m_send = arr_pur[0]; - - if (st.isContainHangul(m_send) == true) - { - MessageBox.Show("DB내 저장된 이메일이 사양과 다릅니다. 직접 입력해주세요."); - - Skill_Search_Text sst = new Skill_Search_Text(); - string value = ""; - if (sst.InputBox("보내실 이메일을 적어주세요.", "보내실 이메일을 적어주세요.", ref value) == DialogResult.OK) { - if (value == "") { return; } - } - else { - m_send = value; - } - } - - Email email = new Email(); - if (email.Send_mail(compidx, pur, Odig.FileName, m_send)) { - - string[] col_Name = { "compidx", "구분", "거래처명", "날짜", "시간", "보낸이", "받는이", "전송파일명", "전송결과" }; - string[] set_Data = { compidx, "메일", pur, Date, Time, arr_db[0], m_send, filename, "성공" }; - db.DB_INSERT("Send_Order", col_Name, set_Data); - MessageBox.Show("전송 성공!"); - } - else { MessageBox.Show("전송 실패!"); } + case "0": + Send_FAX(pur, filename, filePath); + break; + case "1": + Send_Email(pur, filename, filePath); + break; } } + #region Order_Send_Sub + /// + /// 보낼 경로가 메일인지 팩스인지 확인 + /// + /// 주문처 + /// + private string Email_Fax_chk(string pur) + { + string emchk = db.DB_Select_Search("`emchk`", "Purchase", "sangho", pur, "comparyidx", compidx); + return emchk.Replace("|", ""); + } + /// + /// 팩스를 보내는 함수 + /// + /// 거래처명 + /// 파일명 + /// 파일경로 (파일명 포함) + private void Send_FAX(string pur, string filename, string FilePath) + { + + List data_list = new List(); + + string Area = "`fax`"; + string tmp = db.DB_Select_Search(Area, "Comp", "idx", compidx); + + string[] tmp_data = tmp.Split('|'); + string[] fax_num = tmp_data[0].Split(','); + + string tmp_pur = db.DB_Select_Search("`fax`, `boss`, `emchk`", "Purchase", "sangho", pur, "comparyidx", compidx); + string[] db_pur = tmp_pur.Split('|'); + + string[] pur_data = { "", pur, "" }; + if (db_pur.Length > 3) + { + for (int a = 0; a < db_pur.Length; a++) + { + if (a % 3 == 0) + { + if (db_pur[a] != "") + { + pur_data[0] = db_pur[a]; + } + } + if (a % 3 == 1) + { + if (db_pur[a] != "") + { + pur_data[2] = db_pur[a]; + } + } + } + } + + if (pur_data[1] == "") + { + MessageBox.Show("주문처의 팩스 번호가 비어있습니다!", "Error"); + return; + } + + data_list.Add(fax_num[0]); + data_list.AddRange(pur_data); + + string[] fax_param = data_list.ToArray(); + + FTP ftp = new FTP(); + + bool result = ftp.ConnectToServer(); + string path = @""; + DirectoryInfo dirInfo = new DirectoryInfo(FilePath); + FileInfo[] infos = dirInfo.GetFiles(); + + if (result == true) + { + foreach (FileInfo info in dirInfo.GetFiles()) + { + if (Path.GetFileName(info.Name) == filename) + { + if (ftp.UpLoad(path, info.FullName) == false) + MessageBox.Show("FTP Upload 실패"); + + else + MessageBox.Show("FTP Upload 성공"); + + } + } + } + else MessageBox.Show("접속 실패"); + + // 날짜 시간 구해오기 + string Date = DateTime.Now.ToString("yyyy-MM-dd"); + string Time = DateTime.Now.ToString("HH:mm"); + + // 바로빌 FAX API연동 + string Fax_Key = fax.Send_BaroFax(filename, fax_param); + + db.DB_Update("Comp", "fax_Key", Fax_Key, "idx", compidx); + + string[] col_Name = { "compidx", "구분", "팩스전송키", "날짜", "시간", "전송파일명" }; + string[] set_Data = { compidx, "팩스", Fax_Key, Date, Time, filename }; + db.DB_INSERT("Send_Order", col_Name, set_Data); + } + /// + /// 메일 보내는 함수 + /// + /// 거래처명 + /// 파일명 + /// 파일경로 (파일명 포함) + private void Send_Email(string pur, string filename, string filePath) + { + String_Text st = new String_Text(); + + // 보내는 이 : 메일ID + string sender_Area = "`email_ID`"; + string tmp_db = db.DB_Select_Search(sender_Area, "Comp", "idx", compidx); + + string[] arr_db = tmp_db.Split('|'); + + // 받는 이 : 메일 + string taker_Area = "`email`"; + tmp_db = db.DB_Select_Search(taker_Area, "Purchase", "sangho", pur); + + string[] arr_pur = tmp_db.Split('|'); + string m_send = arr_pur[0]; + + if (st.isContainHangul(m_send)) + { + MessageBox.Show("DB내 저장된 이메일이 사양과 다릅니다. 직접 입력해주세요."); + + Skill_Search_Text sst = new Skill_Search_Text(); + string value = ""; + if (sst.InputBox("보내실 이메일을 적어주세요.", "보내실 이메일을 적어주세요.", ref value) == DialogResult.OK) + { + if (value == "") { return; } + } + else + { + m_send = value; + } + } + + // 날짜 시간 구해오기 + string Date = DateTime.Now.ToString("yyyy-MM-dd"); + string Time = DateTime.Now.ToString("HH:mm"); + + Email email = new Email(); + if (email.Send_mail(compidx, pur, filePath, m_send)) + { + string[] col_Name = { "compidx", "구분", "거래처명", "날짜", "시간", "보낸이", "받는이", "전송파일명", "전송결과" }; + string[] set_Data = { compidx, "메일", pur, Date, Time, arr_db[0], m_send, filename, "성공" }; + db.DB_INSERT("Send_Order", col_Name, set_Data); + MessageBox.Show("전송 성공!"); + } + else { MessageBox.Show("전송 실패!"); } + } + #endregion private void btn_send_chk_Click(object sender, EventArgs e) { Order_Send_Chk orc = new Order_Send_Chk(this); @@ -553,7 +619,7 @@ namespace WindowsFormsApp1.Delivery } private void dataGridView1_CellEndEdit(object sender, DataGridViewCellEventArgs e) { - if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Selected == dataGridView1.Rows[e.RowIndex].Cells["order"].Selected) + if (dataGridView1.Columns[e.ColumnIndex].HeaderText == "주문처") { if (dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString() != "" || dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex].Value != null) diff --git a/unimarc/unimarc/납품관리/Order_input_Search.cs b/unimarc/unimarc/납품관리/Order_input_Search.cs index a29ce33..87cc293 100644 --- a/unimarc/unimarc/납품관리/Order_input_Search.cs +++ b/unimarc/unimarc/납품관리/Order_input_Search.cs @@ -62,6 +62,7 @@ namespace WindowsFormsApp1.Delivery "list_name", searchText, "`list_name`, `charge`, `date`, `date_res`"); made_grid(cmd); } + this.Text = "목록 검색"; } else if(Where_Open.Contains("Order")) { list_name.HeaderText = "주문처"; @@ -72,6 +73,7 @@ namespace WindowsFormsApp1.Delivery string cmd = db.DB_Contains("Purchase", compidx, "sangho", searchText, "`sangho`, `boss`, `jongmok`, `uptae`"); made_grid(cmd); + this.Text = "주문처 검색"; } } private void made_grid(string strValue) diff --git a/unimarc/unimarc/홈/Order_manage.Designer.cs b/unimarc/unimarc/홈/Order_manage.Designer.cs index cabeb6d..93aab30 100644 --- a/unimarc/unimarc/홈/Order_manage.Designer.cs +++ b/unimarc/unimarc/홈/Order_manage.Designer.cs @@ -28,18 +28,18 @@ /// 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 dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = 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(); this.label12 = new System.Windows.Forms.Label(); this.cb_search_filter = new System.Windows.Forms.ComboBox(); this.chk_stopUse = new System.Windows.Forms.CheckBox(); @@ -49,28 +49,6 @@ this.tb_bank_no = new System.Windows.Forms.TextBox(); this.label10 = new System.Windows.Forms.Label(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.send_chk = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.sangho = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.boss = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.bubin = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.uptae = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.jongmok = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.zip = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.addr = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.tel = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.fax = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.bank_no = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.bank_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.bank_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.gu = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.barea = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.etc_1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.etc_2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.email = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.id = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.pw = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.site = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.btn_Delete = new System.Windows.Forms.Button(); this.btn_Lookup = new System.Windows.Forms.Button(); this.btn_Save = new System.Windows.Forms.Button(); @@ -101,7 +79,7 @@ this.label13 = new System.Windows.Forms.Label(); this.tb_email = new System.Windows.Forms.TextBox(); this.label15 = new System.Windows.Forms.Label(); - this.checkBox3 = new System.Windows.Forms.CheckBox(); + this.chk_email = new System.Windows.Forms.CheckBox(); this.textBox17 = new System.Windows.Forms.TextBox(); this.label17 = new System.Windows.Forms.Label(); this.textBox18 = new System.Windows.Forms.TextBox(); @@ -125,7 +103,9 @@ this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.dataGridViewTextBoxColumn4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel1 = new System.Windows.Forms.Panel(); + this.tb_memo = new System.Windows.Forms.Button(); this.panel2 = new System.Windows.Forms.Panel(); + this.rtb_etc = new System.Windows.Forms.RichTextBox(); this.tb_site = new System.Windows.Forms.TextBox(); this.tb_zip = new System.Windows.Forms.TextBox(); this.btn_SitePage = new System.Windows.Forms.Button(); @@ -134,8 +114,29 @@ this.tb_id = new System.Windows.Forms.TextBox(); this.label20 = new System.Windows.Forms.Label(); this.label22 = new System.Windows.Forms.Label(); - this.rtb_etc = new System.Windows.Forms.RichTextBox(); - this.tb_memo = new System.Windows.Forms.Button(); + this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.send_chk = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.sangho = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.boss = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.bubin = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.uptae = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.jongmok = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.zip = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.addr = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.tel = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.fax = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.bank_no = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.bank_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.bank_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.gu = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.barea = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.etc_1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.etc_2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.email = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.id = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.pw = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.site = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.emchk = new System.Windows.Forms.DataGridViewTextBoxColumn(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView3)).BeginInit(); @@ -218,14 +219,14 @@ this.dataGridView1.AllowUserToAddRows = false; this.dataGridView1.AllowUserToDeleteRows = false; 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; + dataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle13.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle13; this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.idx, @@ -249,30 +250,31 @@ this.email, this.id, this.pw, - this.site}); - dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle2; + this.site, + this.emchk}); + dataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle14.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle14; this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dataGridView1.Location = new System.Drawing.Point(13, 325); this.dataGridView1.MultiSelect = false; this.dataGridView1.Name = "dataGridView1"; - dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle3.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; + dataGridViewCellStyle15.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle15.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle15.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle15.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle15.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle15.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle15; this.dataGridView1.RowHeadersWidth = 21; - dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle4; + dataGridViewCellStyle16.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle16; this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridView1.Size = new System.Drawing.Size(899, 376); @@ -280,138 +282,6 @@ this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick); this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown); // - // idx - // - this.idx.HeaderText = "idx"; - this.idx.Name = "idx"; - this.idx.ReadOnly = true; - this.idx.Visible = false; - // - // send_chk - // - this.send_chk.HeaderText = "M"; - this.send_chk.Name = "send_chk"; - this.send_chk.ReadOnly = true; - this.send_chk.Width = 40; - // - // sangho - // - this.sangho.HeaderText = "상 호"; - this.sangho.Name = "sangho"; - this.sangho.Width = 350; - // - // boss - // - this.boss.HeaderText = "대표자명"; - this.boss.Name = "boss"; - // - // bubin - // - this.bubin.HeaderText = "등록번호"; - this.bubin.Name = "bubin"; - this.bubin.Visible = false; - // - // uptae - // - this.uptae.HeaderText = "업태"; - this.uptae.Name = "uptae"; - this.uptae.Visible = false; - // - // jongmok - // - this.jongmok.HeaderText = "종목"; - this.jongmok.Name = "jongmok"; - this.jongmok.Visible = false; - // - // zip - // - this.zip.HeaderText = "우편번호"; - this.zip.Name = "zip"; - this.zip.Visible = false; - // - // addr - // - this.addr.HeaderText = "주소"; - this.addr.Name = "addr"; - this.addr.Visible = false; - // - // tel - // - this.tel.HeaderText = "전화번호"; - this.tel.Name = "tel"; - this.tel.Width = 130; - // - // fax - // - this.fax.HeaderText = "팩스번호"; - this.fax.Name = "fax"; - this.fax.Width = 130; - // - // bank_no - // - this.bank_no.HeaderText = "계좌번호"; - this.bank_no.Name = "bank_no"; - this.bank_no.Visible = false; - // - // bank_comp - // - this.bank_comp.HeaderText = "은행명"; - this.bank_comp.Name = "bank_comp"; - this.bank_comp.Visible = false; - // - // bank_name - // - this.bank_name.HeaderText = "예금주명"; - this.bank_name.Name = "bank_name"; - this.bank_name.Visible = false; - // - // gu - // - this.gu.HeaderText = "유형"; - this.gu.Name = "gu"; - // - // barea - // - this.barea.HeaderText = "배송처"; - this.barea.Name = "barea"; - this.barea.Visible = false; - // - // etc_1 - // - this.etc_1.HeaderText = "비고1"; - this.etc_1.Name = "etc_1"; - this.etc_1.Visible = false; - // - // etc_2 - // - this.etc_2.HeaderText = "비고2"; - this.etc_2.Name = "etc_2"; - this.etc_2.Visible = false; - // - // email - // - this.email.HeaderText = "이메일"; - this.email.Name = "email"; - this.email.Visible = false; - // - // id - // - this.id.HeaderText = "아이디"; - this.id.Name = "id"; - this.id.Visible = false; - // - // pw - // - this.pw.HeaderText = "패스워드"; - this.pw.Name = "pw"; - this.pw.Visible = false; - // - // site - // - this.site.HeaderText = "사이트"; - this.site.Name = "site"; - this.site.Visible = false; - // // btn_Delete // this.btn_Delete.DialogResult = System.Windows.Forms.DialogResult.Abort; @@ -672,16 +542,15 @@ this.label15.TabIndex = 96; this.label15.Text = "이 메 일"; // - // checkBox3 + // chk_email // - this.checkBox3.AutoSize = true; - this.checkBox3.Enabled = false; - this.checkBox3.Location = new System.Drawing.Point(372, 81); - this.checkBox3.Name = "checkBox3"; - this.checkBox3.Size = new System.Drawing.Size(72, 28); - this.checkBox3.TabIndex = 98; - this.checkBox3.Text = "주문서로\n메일발송"; - this.checkBox3.UseVisualStyleBackColor = true; + this.chk_email.AutoSize = true; + this.chk_email.Location = new System.Drawing.Point(372, 81); + this.chk_email.Name = "chk_email"; + this.chk_email.Size = new System.Drawing.Size(72, 28); + this.chk_email.TabIndex = 98; + this.chk_email.Text = "주문서로\n메일발송"; + this.chk_email.UseVisualStyleBackColor = true; // // textBox17 // @@ -807,41 +676,41 @@ 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; + dataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle17.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle17.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView2.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle17; this.dataGridView2.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView2.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn1, this.dataGridViewTextBoxColumn2}); - dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle6.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle6.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle6.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridView2.DefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle18.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridView2.DefaultCellStyle = dataGridViewCellStyle18; this.dataGridView2.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dataGridView2.Location = new System.Drawing.Point(919, 189); this.dataGridView2.MultiSelect = false; this.dataGridView2.Name = "dataGridView2"; - dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle7.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle19.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView2.RowHeadersDefaultCellStyle = dataGridViewCellStyle19; this.dataGridView2.RowHeadersWidth = 21; - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridView2.RowsDefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle20.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridView2.RowsDefaultCellStyle = dataGridViewCellStyle20; this.dataGridView2.RowTemplate.Height = 23; this.dataGridView2.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridView2.Size = new System.Drawing.Size(213, 128); @@ -908,41 +777,41 @@ this.dataGridView3.AllowUserToAddRows = false; this.dataGridView3.AllowUserToDeleteRows = false; this.dataGridView3.BackgroundColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle9.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView3.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle21.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle21.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle21.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle21.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle21.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle21.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView3.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle21; this.dataGridView3.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dataGridView3.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridViewTextBoxColumn3, this.dataGridViewTextBoxColumn4}); - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle10.BackColor = System.Drawing.SystemColors.Window; - dataGridViewCellStyle10.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle10.ForeColor = System.Drawing.SystemColors.ControlText; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.False; - this.dataGridView3.DefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle22.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle22.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle22.ForeColor = System.Drawing.SystemColors.ControlText; + dataGridViewCellStyle22.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle22.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dataGridView3.DefaultCellStyle = dataGridViewCellStyle22; this.dataGridView3.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dataGridView3.Location = new System.Drawing.Point(919, 356); this.dataGridView3.MultiSelect = false; this.dataGridView3.Name = "dataGridView3"; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; - dataGridViewCellStyle11.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); - dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dataGridView3.RowHeadersDefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle23.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle23.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle23.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle23.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle23.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle23.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle23.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView3.RowHeadersDefaultCellStyle = dataGridViewCellStyle23; this.dataGridView3.RowHeadersWidth = 21; - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.dataGridView3.RowsDefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle24.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.dataGridView3.RowsDefaultCellStyle = dataGridViewCellStyle24; this.dataGridView3.RowTemplate.Height = 23; this.dataGridView3.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dataGridView3.Size = new System.Drawing.Size(213, 345); @@ -976,6 +845,16 @@ this.panel1.Size = new System.Drawing.Size(822, 41); this.panel1.TabIndex = 117; // + // tb_memo + // + this.tb_memo.Location = new System.Drawing.Point(704, 8); + this.tb_memo.Name = "tb_memo"; + this.tb_memo.Size = new System.Drawing.Size(75, 23); + this.tb_memo.TabIndex = 74; + this.tb_memo.Text = "메모장"; + this.tb_memo.UseVisualStyleBackColor = true; + this.tb_memo.Click += new System.EventHandler(this.tb_memo_Click); + // // panel2 // this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; @@ -1012,7 +891,7 @@ this.panel2.Controls.Add(this.label22); this.panel2.Controls.Add(this.label17); this.panel2.Controls.Add(this.tb_tel); - this.panel2.Controls.Add(this.checkBox3); + this.panel2.Controls.Add(this.chk_email); this.panel2.Controls.Add(this.label16); this.panel2.Controls.Add(this.tb_email); this.panel2.Controls.Add(this.tb_fax); @@ -1030,6 +909,14 @@ this.panel2.Size = new System.Drawing.Size(899, 257); this.panel2.TabIndex = 118; // + // rtb_etc + // + this.rtb_etc.Location = new System.Drawing.Point(81, 134); + this.rtb_etc.Name = "rtb_etc"; + this.rtb_etc.Size = new System.Drawing.Size(802, 118); + this.rtb_etc.TabIndex = 107; + this.rtb_etc.Text = ""; + // // tb_site // this.tb_site.Location = new System.Drawing.Point(493, 110); @@ -1097,23 +984,143 @@ this.label22.TabIndex = 99; this.label22.Text = "도메인 주소"; // - // rtb_etc + // idx // - this.rtb_etc.Location = new System.Drawing.Point(81, 134); - this.rtb_etc.Name = "rtb_etc"; - this.rtb_etc.Size = new System.Drawing.Size(802, 118); - this.rtb_etc.TabIndex = 107; - this.rtb_etc.Text = ""; + this.idx.HeaderText = "idx"; + this.idx.Name = "idx"; + this.idx.ReadOnly = true; + this.idx.Visible = false; // - // tb_memo + // send_chk // - this.tb_memo.Location = new System.Drawing.Point(704, 8); - this.tb_memo.Name = "tb_memo"; - this.tb_memo.Size = new System.Drawing.Size(75, 23); - this.tb_memo.TabIndex = 74; - this.tb_memo.Text = "메모장"; - this.tb_memo.UseVisualStyleBackColor = true; - this.tb_memo.Click += new System.EventHandler(this.tb_memo_Click); + this.send_chk.HeaderText = "M"; + this.send_chk.Name = "send_chk"; + this.send_chk.ReadOnly = true; + this.send_chk.Width = 40; + // + // sangho + // + this.sangho.HeaderText = "상 호"; + this.sangho.Name = "sangho"; + this.sangho.Width = 350; + // + // boss + // + this.boss.HeaderText = "대표자명"; + this.boss.Name = "boss"; + // + // bubin + // + this.bubin.HeaderText = "등록번호"; + this.bubin.Name = "bubin"; + this.bubin.Visible = false; + // + // uptae + // + this.uptae.HeaderText = "업태"; + this.uptae.Name = "uptae"; + this.uptae.Visible = false; + // + // jongmok + // + this.jongmok.HeaderText = "종목"; + this.jongmok.Name = "jongmok"; + this.jongmok.Visible = false; + // + // zip + // + this.zip.HeaderText = "우편번호"; + this.zip.Name = "zip"; + this.zip.Visible = false; + // + // addr + // + this.addr.HeaderText = "주소"; + this.addr.Name = "addr"; + this.addr.Visible = false; + // + // tel + // + this.tel.HeaderText = "전화번호"; + this.tel.Name = "tel"; + this.tel.Width = 130; + // + // fax + // + this.fax.HeaderText = "팩스번호"; + this.fax.Name = "fax"; + this.fax.Width = 130; + // + // bank_no + // + this.bank_no.HeaderText = "계좌번호"; + this.bank_no.Name = "bank_no"; + this.bank_no.Visible = false; + // + // bank_comp + // + this.bank_comp.HeaderText = "은행명"; + this.bank_comp.Name = "bank_comp"; + this.bank_comp.Visible = false; + // + // bank_name + // + this.bank_name.HeaderText = "예금주명"; + this.bank_name.Name = "bank_name"; + this.bank_name.Visible = false; + // + // gu + // + this.gu.HeaderText = "유형"; + this.gu.Name = "gu"; + // + // barea + // + this.barea.HeaderText = "배송처"; + this.barea.Name = "barea"; + this.barea.Visible = false; + // + // etc_1 + // + this.etc_1.HeaderText = "비고1"; + this.etc_1.Name = "etc_1"; + this.etc_1.Visible = false; + // + // etc_2 + // + this.etc_2.HeaderText = "비고2"; + this.etc_2.Name = "etc_2"; + this.etc_2.Visible = false; + // + // email + // + this.email.HeaderText = "이메일"; + this.email.Name = "email"; + this.email.Visible = false; + // + // id + // + this.id.HeaderText = "아이디"; + this.id.Name = "id"; + this.id.Visible = false; + // + // pw + // + this.pw.HeaderText = "패스워드"; + this.pw.Name = "pw"; + this.pw.Visible = false; + // + // site + // + this.site.HeaderText = "사이트"; + this.site.Name = "site"; + this.site.Visible = false; + // + // emchk + // + this.emchk.HeaderText = "이메일체크"; + this.emchk.Name = "emchk"; + this.emchk.Visible = false; // // Order_manage // @@ -1191,7 +1198,7 @@ private System.Windows.Forms.Label label13; private System.Windows.Forms.TextBox tb_email; private System.Windows.Forms.Label label15; - private System.Windows.Forms.CheckBox checkBox3; + private System.Windows.Forms.CheckBox chk_email; private System.Windows.Forms.TextBox textBox17; private System.Windows.Forms.Label label17; private System.Windows.Forms.TextBox textBox18; @@ -1225,6 +1232,8 @@ private System.Windows.Forms.TextBox tb_site; private System.Windows.Forms.Label label22; private System.Windows.Forms.DataGridViewTextBoxColumn Column4; + private System.Windows.Forms.RichTextBox rtb_etc; + private System.Windows.Forms.Button tb_memo; private System.Windows.Forms.DataGridViewTextBoxColumn idx; private System.Windows.Forms.DataGridViewTextBoxColumn send_chk; private System.Windows.Forms.DataGridViewTextBoxColumn sangho; @@ -1247,7 +1256,6 @@ private System.Windows.Forms.DataGridViewTextBoxColumn id; private System.Windows.Forms.DataGridViewTextBoxColumn pw; private System.Windows.Forms.DataGridViewTextBoxColumn site; - private System.Windows.Forms.RichTextBox rtb_etc; - private System.Windows.Forms.Button tb_memo; + private System.Windows.Forms.DataGridViewTextBoxColumn emchk; } } \ No newline at end of file diff --git a/unimarc/unimarc/홈/Order_manage.cs b/unimarc/unimarc/홈/Order_manage.cs index a33d157..0a0ac6b 100644 --- a/unimarc/unimarc/홈/Order_manage.cs +++ b/unimarc/unimarc/홈/Order_manage.cs @@ -36,7 +36,7 @@ namespace WindowsFormsApp1.Home "`uptae`, `jongmok`, `zip`, `addr`, `tel`, " + "`fax`, `bank_no`, `bank_comp`, `bank_name`, `gu`, " + "`barea`, `etc_1`, `etc_2`, `email`, `id`, " + - "`pw`, `site`"; + "`pw`, `site`, `emchk`"; if (tb_search.Text == "") { string[] Where_Table = { "comparyidx" }; @@ -64,12 +64,12 @@ namespace WindowsFormsApp1.Home "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", - "", ""}; + "", "", "" }; int count = dbdata.Length; int ea = 0; for(int a = 0; a < count; a++) { - if (a % 22 == ea) { + if (a % 23 == ea) { if (ea == 1) { if (dbdata[a] == "0") { grid[ea] = ""; } if (dbdata[a] == "1") { grid[ea] = "V"; } @@ -82,7 +82,7 @@ namespace WindowsFormsApp1.Home if (dbdata[a] == "3") { grid[14] = "경비"; } ea++; } - else if (ea == 21) { + else if (ea == 22) { grid[ea] = dbdata[a]; dataGridView1.Rows.Add(grid); ea = 0; @@ -137,6 +137,9 @@ namespace WindowsFormsApp1.Home if (dataGridView1.Rows[grididx].Cells["send_chk"].Value.ToString() == "") { chk_send.Checked = false; } if (dataGridView1.Rows[grididx].Cells["send_chk"].Value.ToString() == "V") { chk_send.Checked = true; } + if (dataGridView1.Rows[grididx].Cells["emchk"].Value.ToString() == "0") { chk_email.Checked = false; } + if (dataGridView1.Rows[grididx].Cells["emchk"].Value.ToString() == "1") { chk_email.Checked = true; } + if(dataGridView1.Rows[grididx].Cells["gu"].Value.ToString() == "출판") { cb_gubun.SelectedIndex = 0; } if(dataGridView1.Rows[grididx].Cells["gu"].Value.ToString() == "도매") { cb_gubun.SelectedIndex = 1; } if(dataGridView1.Rows[grididx].Cells["gu"].Value.ToString() == "기타") { cb_gubun.SelectedIndex = 2; } @@ -179,9 +182,18 @@ namespace WindowsFormsApp1.Home } private void btn_Save_Click(object sender, EventArgs e) // 저장 { + string Table = "Purchase"; + string[] Search_Table = { "comparyidx", "bubin" }; + string[] Search_Data = { main.com_idx, tb_bubin.Text }; + + bool insert = false; + if(db.More_DB_Search(Table, Search_Table, Search_Data).Length < 30) { insert = true; } + string send_chk = "0"; + string emchk = "0"; string gu = ""; if (chk_send.Checked == true) { send_chk = "1"; } + if (chk_email.Checked == true) { emchk = "1"; } if(cb_gubun.SelectedIndex == 0) { gu = "출판"; } if(cb_gubun.SelectedIndex == 1) { gu = "도매"; } if(cb_gubun.SelectedIndex == 2) { gu = "기타"; } @@ -193,8 +205,15 @@ namespace WindowsFormsApp1.Home string[] Insert_Data = { send_chk, tb_sangho.Text, tb_boss.Text, tb_bubin.Text, tb_uptae.Text, tb_jongmok.Text, tb_zip.Text, tb_addr.Text, tb_tel.Text, tb_fax.Text, tb_bank_no.Text, tb_bank_comp.Text, tb_bank_name.Text, gu, tb_barea.Text, - rtb_etc.Text, tb_email.Text, tb_id.Text, tb_pw.Text, tb_site.Text, "1"}; - db.DB_INSERT("Purchase", Insert_Table, Insert_Data); + rtb_etc.Text, tb_email.Text, tb_id.Text, tb_pw.Text, tb_site.Text, emchk }; + if (insert) + { + db.DB_INSERT("Purchase", Insert_Table, Insert_Data); + } + else + { + db.More_Update(Table, Insert_Data, Insert_Table, Search_Data, Search_Table); + } MessageBox.Show(tb_sangho.Text + " 저장 완료"); } private void btn_Delete_Click(object sender, EventArgs e) // 삭제 diff --git a/unimarc/unimarc/홈/Order_manage.resx b/unimarc/unimarc/홈/Order_manage.resx index 94babef..e766da8 100644 --- a/unimarc/unimarc/홈/Order_manage.resx +++ b/unimarc/unimarc/홈/Order_manage.resx @@ -183,6 +183,9 @@ True + + True + True