diff --git a/unimarc/.vs/WindowsFormsApp1/v16/.suo b/unimarc/.vs/WindowsFormsApp1/v16/.suo index d5b18a3..ce414e3 100644 Binary files a/unimarc/.vs/WindowsFormsApp1/v16/.suo and b/unimarc/.vs/WindowsFormsApp1/v16/.suo differ diff --git a/unimarc/WindowsFormsApp1/Main.Designer.cs b/unimarc/WindowsFormsApp1/Main.Designer.cs index 250e18a..6850036 100644 --- a/unimarc/WindowsFormsApp1/Main.Designer.cs +++ b/unimarc/WindowsFormsApp1/Main.Designer.cs @@ -56,8 +56,9 @@ this.매입미결제ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.매출입력ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.매출입력ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.매출집계ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.매출입금toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.매출조회ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.매출집계ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.매출미수금ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.매출입금ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.마크ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); @@ -124,7 +125,6 @@ this.toolStrip1 = new System.Windows.Forms.ToolStrip(); this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); - this.매출입금toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); this.menuStrip1.SuspendLayout(); this.panel1.SuspendLayout(); this.toolStrip1.SuspendLayout(); @@ -230,28 +230,28 @@ // 물품등록ToolStripMenuItem // this.물품등록ToolStripMenuItem.Name = "물품등록ToolStripMenuItem"; - this.물품등록ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.물품등록ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.물품등록ToolStripMenuItem.Text = "물품등록"; this.물품등록ToolStripMenuItem.Click += new System.EventHandler(this.물품등록ToolStripMenuItem_Click); // // 목록등록편의ToolStripMenuItem // this.목록등록편의ToolStripMenuItem.Name = "목록등록편의ToolStripMenuItem"; - this.목록등록편의ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.목록등록편의ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.목록등록편의ToolStripMenuItem.Text = "목록조회"; this.목록등록편의ToolStripMenuItem.Click += new System.EventHandler(this.목록등록편의ToolStripMenuItem_Click); // // 목록집계ToolStripMenuItem // this.목록집계ToolStripMenuItem.Name = "목록집계ToolStripMenuItem"; - this.목록집계ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.목록집계ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.목록집계ToolStripMenuItem.Text = "목록집계"; this.목록집계ToolStripMenuItem.Click += new System.EventHandler(this.목록집계ToolStripMenuItem_Click); // // 주문입력ToolStripMenuItem // this.주문입력ToolStripMenuItem.Name = "주문입력ToolStripMenuItem"; - this.주문입력ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.주문입력ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.주문입력ToolStripMenuItem.Text = "주문입력"; this.주문입력ToolStripMenuItem.Click += new System.EventHandler(this.주문입력ToolStripMenuItem_Click); // @@ -259,14 +259,14 @@ // this.견적서ToolStripMenuItem.Enabled = false; this.견적서ToolStripMenuItem.Name = "견적서ToolStripMenuItem"; - this.견적서ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.견적서ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.견적서ToolStripMenuItem.Text = "견적서"; this.견적서ToolStripMenuItem.Click += new System.EventHandler(this.견적서ToolStripMenuItem_Click); // // 매입ToolStripMenuItem // this.매입ToolStripMenuItem.Name = "매입ToolStripMenuItem"; - this.매입ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.매입ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.매입ToolStripMenuItem.Text = "입고작업"; this.매입ToolStripMenuItem.Click += new System.EventHandler(this.매입ToolStripMenuItem_Click); // @@ -274,14 +274,14 @@ // this.매입반품입력ToolStripMenuItem.Enabled = false; this.매입반품입력ToolStripMenuItem.Name = "매입반품입력ToolStripMenuItem"; - this.매입반품입력ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.매입반품입력ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.매입반품입력ToolStripMenuItem.Text = "매입 / 반품입력"; this.매입반품입력ToolStripMenuItem.Click += new System.EventHandler(this.매입반품입력ToolStripMenuItem_Click); // // 재고입력및조회ToolStripMenuItem // this.재고입력및조회ToolStripMenuItem.Name = "재고입력및조회ToolStripMenuItem"; - this.재고입력및조회ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.재고입력및조회ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.재고입력및조회ToolStripMenuItem.Text = "재고입력 및 조회"; this.재고입력및조회ToolStripMenuItem.Click += new System.EventHandler(this.재고입력및조회ToolStripMenuItem_Click); // @@ -289,7 +289,7 @@ // this.예가조회ToolStripMenuItem.Enabled = false; this.예가조회ToolStripMenuItem.Name = "예가조회ToolStripMenuItem"; - this.예가조회ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.예가조회ToolStripMenuItem.Size = new System.Drawing.Size(166, 22); this.예가조회ToolStripMenuItem.Text = "예가조회"; this.예가조회ToolStripMenuItem.Click += new System.EventHandler(this.예가조회ToolStripMenuItem_Click); // @@ -308,14 +308,14 @@ // 송금내역조회ToolStripMenuItem // this.송금내역조회ToolStripMenuItem.Name = "송금내역조회ToolStripMenuItem"; - this.송금내역조회ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.송금내역조회ToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.송금내역조회ToolStripMenuItem.Text = "송금 내역 조회"; this.송금내역조회ToolStripMenuItem.Click += new System.EventHandler(this.송금내역조회ToolStripMenuItem_Click); // // 송금등록ToolStripMenuItem // this.송금등록ToolStripMenuItem.Name = "송금등록ToolStripMenuItem"; - this.송금등록ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.송금등록ToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.송금등록ToolStripMenuItem.Text = "송금 등록"; this.송금등록ToolStripMenuItem.Click += new System.EventHandler(this.송금등록ToolStripMenuItem_Click); // @@ -326,20 +326,20 @@ this.매입장부ToolStripMenuItem1, this.매입미결제ToolStripMenuItem}); this.매입장부ToolStripMenuItem.Name = "매입장부ToolStripMenuItem"; - this.매입장부ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.매입장부ToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.매입장부ToolStripMenuItem.Text = "매입"; // // 매입집계ToolStripMenuItem // this.매입집계ToolStripMenuItem.Name = "매입집계ToolStripMenuItem"; - this.매입집계ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.매입집계ToolStripMenuItem.Size = new System.Drawing.Size(138, 22); this.매입집계ToolStripMenuItem.Text = "매입 집계"; this.매입집계ToolStripMenuItem.Click += new System.EventHandler(this.매입집계ToolStripMenuItem_Click); // // 매입장부ToolStripMenuItem1 // this.매입장부ToolStripMenuItem1.Name = "매입장부ToolStripMenuItem1"; - this.매입장부ToolStripMenuItem1.Size = new System.Drawing.Size(180, 22); + this.매입장부ToolStripMenuItem1.Size = new System.Drawing.Size(138, 22); this.매입장부ToolStripMenuItem1.Text = "매입 장부"; this.매입장부ToolStripMenuItem1.Click += new System.EventHandler(this.매입장부ToolStripMenuItem1_Click); // @@ -347,7 +347,7 @@ // this.매입미결제ToolStripMenuItem.Enabled = false; this.매입미결제ToolStripMenuItem.Name = "매입미결제ToolStripMenuItem"; - this.매입미결제ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.매입미결제ToolStripMenuItem.Size = new System.Drawing.Size(138, 22); this.매입미결제ToolStripMenuItem.Text = "매입 미결제"; this.매입미결제ToolStripMenuItem.Click += new System.EventHandler(this.매입미결제ToolStripMenuItem_Click); // @@ -360,42 +360,49 @@ this.매출집계ToolStripMenuItem1, this.매출미수금ToolStripMenuItem}); this.매출입력ToolStripMenuItem.Name = "매출입력ToolStripMenuItem"; - this.매출입력ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.매출입력ToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.매출입력ToolStripMenuItem.Text = "매출"; // // 매출입력ToolStripMenuItem1 // this.매출입력ToolStripMenuItem1.Name = "매출입력ToolStripMenuItem1"; - this.매출입력ToolStripMenuItem1.Size = new System.Drawing.Size(180, 22); + this.매출입력ToolStripMenuItem1.Size = new System.Drawing.Size(138, 22); this.매출입력ToolStripMenuItem1.Text = "매출 입력"; this.매출입력ToolStripMenuItem1.Click += new System.EventHandler(this.매출입력ToolStripMenuItem1_Click); // - // 매출집계ToolStripMenuItem1 + // 매출입금toolStripMenuItem1 // - this.매출집계ToolStripMenuItem1.Name = "매출집계ToolStripMenuItem1"; - this.매출집계ToolStripMenuItem1.Size = new System.Drawing.Size(180, 22); - this.매출집계ToolStripMenuItem1.Text = "매출 집계"; - this.매출집계ToolStripMenuItem1.Click += new System.EventHandler(this.매출입금ToolStripMenuItem1_Click); + this.매출입금toolStripMenuItem1.Name = "매출입금toolStripMenuItem1"; + this.매출입금toolStripMenuItem1.Size = new System.Drawing.Size(138, 22); + this.매출입금toolStripMenuItem1.Text = "매출 입금"; + this.매출입금toolStripMenuItem1.Click += new System.EventHandler(this.매출입금toolStripMenuItem1_Click_1); // // 매출조회ToolStripMenuItem // this.매출조회ToolStripMenuItem.Name = "매출조회ToolStripMenuItem"; - this.매출조회ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.매출조회ToolStripMenuItem.Size = new System.Drawing.Size(138, 22); this.매출조회ToolStripMenuItem.Text = "매출 조회"; this.매출조회ToolStripMenuItem.Click += new System.EventHandler(this.매출장부ToolStripMenuItem_Click); // + // 매출집계ToolStripMenuItem1 + // + this.매출집계ToolStripMenuItem1.Name = "매출집계ToolStripMenuItem1"; + this.매출집계ToolStripMenuItem1.Size = new System.Drawing.Size(138, 22); + this.매출집계ToolStripMenuItem1.Text = "매출 집계"; + this.매출집계ToolStripMenuItem1.Click += new System.EventHandler(this.매출입금ToolStripMenuItem1_Click); + // // 매출미수금ToolStripMenuItem // this.매출미수금ToolStripMenuItem.Enabled = false; this.매출미수금ToolStripMenuItem.Name = "매출미수금ToolStripMenuItem"; - this.매출미수금ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.매출미수금ToolStripMenuItem.Size = new System.Drawing.Size(138, 22); this.매출미수금ToolStripMenuItem.Text = "매출 미수금"; this.매출미수금ToolStripMenuItem.Click += new System.EventHandler(this.매출미수금ToolStripMenuItem_Click); // // 매출입금ToolStripMenuItem // this.매출입금ToolStripMenuItem.Name = "매출입금ToolStripMenuItem"; - this.매출입금ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.매출입금ToolStripMenuItem.Size = new System.Drawing.Size(154, 22); this.매출입금ToolStripMenuItem.Text = "계산서 관리"; this.매출입금ToolStripMenuItem.Click += new System.EventHandler(this.매출입금ToolStripMenuItem_Click); // @@ -421,7 +428,7 @@ this.불용어ToolStripMenuItem, this.작업지시서ToolStripMenuItem}); this.설정ToolStripMenuItem.Name = "설정ToolStripMenuItem"; - this.설정ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.설정ToolStripMenuItem.Size = new System.Drawing.Size(142, 22); this.설정ToolStripMenuItem.Text = "설정"; // // 단축키설정ToolStripMenuItem @@ -460,7 +467,7 @@ this.엑셀작성ToolStripMenuItem, this.iSBN조회ToolStripMenuItem}); this.마크작업ToolStripMenuItem.Name = "마크작업ToolStripMenuItem"; - this.마크작업ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.마크작업ToolStripMenuItem.Size = new System.Drawing.Size(142, 22); this.마크작업ToolStripMenuItem.Text = "마크 작업"; // // 마크목록ToolStripMenuItem @@ -497,7 +504,7 @@ this.반입ToolStripMenuItem, this.반출ToolStripMenuItem}); this.반입및반출ToolStripMenuItem.Name = "반입및반출ToolStripMenuItem"; - this.반입및반출ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.반입및반출ToolStripMenuItem.Size = new System.Drawing.Size(142, 22); this.반입및반출ToolStripMenuItem.Text = "반입 및 반출"; // // 반입ToolStripMenuItem @@ -520,7 +527,7 @@ this.복본조사ToolStripMenuItem1, this.dLS복본조사ToolStripMenuItem}); this.복본조사ToolStripMenuItem.Name = "복본조사ToolStripMenuItem"; - this.복본조사ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.복본조사ToolStripMenuItem.Size = new System.Drawing.Size(142, 22); this.복본조사ToolStripMenuItem.Text = "복본 조사"; // // 복본조사ToolStripMenuItem1 @@ -545,7 +552,7 @@ this.검수ToolStripMenuItem, this.저자기호ToolStripMenuItem}); this.부가기능ToolStripMenuItem.Name = "부가기능ToolStripMenuItem"; - this.부가기능ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.부가기능ToolStripMenuItem.Size = new System.Drawing.Size(142, 22); this.부가기능ToolStripMenuItem.Text = "부가기능"; // // 마크수집ToolStripMenuItem @@ -582,7 +589,7 @@ this.dLS조회ToolStripMenuItem, this.dLS입력ToolStripMenuItem}); this.dLSToolStripMenuItem.Name = "dLSToolStripMenuItem"; - this.dLSToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.dLSToolStripMenuItem.Size = new System.Drawing.Size(142, 22); this.dLSToolStripMenuItem.Text = "DLS"; // // dLS조회ToolStripMenuItem @@ -606,7 +613,7 @@ this.마크통계ToolStripMenuItem, this.장비관리ToolStripMenuItem1}); this.기타ToolStripMenuItem.Name = "기타ToolStripMenuItem"; - this.기타ToolStripMenuItem.Size = new System.Drawing.Size(180, 22); + this.기타ToolStripMenuItem.Size = new System.Drawing.Size(142, 22); this.기타ToolStripMenuItem.Text = "기타"; // // 서류작성ToolStripMenuItem @@ -930,13 +937,6 @@ this.toolStripLabel1.Size = new System.Drawing.Size(88, 22); this.toolStripLabel1.Text = "toolStripLabel1"; // - // 매출입금toolStripMenuItem1 - // - this.매출입금toolStripMenuItem1.Name = "매출입금toolStripMenuItem1"; - this.매출입금toolStripMenuItem1.Size = new System.Drawing.Size(180, 22); - this.매출입금toolStripMenuItem1.Text = "매출 입금"; - this.매출입금toolStripMenuItem1.Click += new System.EventHandler(this.매출입금toolStripMenuItem1_Click_1); - // // Main // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); diff --git a/unimarc/WindowsFormsApp1/Main.cs b/unimarc/WindowsFormsApp1/Main.cs index db3593f..709dbca 100644 --- a/unimarc/WindowsFormsApp1/Main.cs +++ b/unimarc/WindowsFormsApp1/Main.cs @@ -1152,58 +1152,9 @@ namespace WindowsFormsApp1 private void button3_Click(object sender, EventArgs e) { - /* - string FilePath = string.Empty; - string filename = string.Empty; - - OpenFileDialog Odig = openFileDialog1; - Odig.Filter = "Excel Files(*.xls)|*.xls|Excel Files(*.xlsx)|*.xlsx|All FIles(*.*)|*.*"; - Odig.Title = "엑셀파일을 선택해주세요."; - - if (Odig.ShowDialog() == DialogResult.OK) - { - FilePath = Odig.FileName; - filename = Path.GetFileName(FilePath); - FilePath = Path.GetDirectoryName(FilePath); - if (Path.GetExtension(filename) != ".xls" && Path.GetExtension(filename) != ".xlsx") - { - MessageBox.Show("엑셀파일만 적용이 가능합니다! | " + Path.GetExtension(filename)); - return; - } - - } - if (FilePath == "") return; - - 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연동 - Barobill_FAX fax = new Barobill_FAX(); - fax.Send_BaroFax(filename, "", ""); - */ + string tmp = "[가로수(남경)]갖고놀거"; + tmp = tmp.Substring(tmp.IndexOf(']') + 1); + MessageBox.Show(tmp); } - } } \ No newline at end of file diff --git a/unimarc/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe b/unimarc/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe index 9d40a1b..9d068ef 100644 Binary files a/unimarc/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe and b/unimarc/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.exe differ diff --git a/unimarc/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb b/unimarc/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb index c2adfcf..0849e15 100644 Binary files a/unimarc/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb and b/unimarc/WindowsFormsApp1/bin/Debug/WindowsFormsApp1.pdb differ diff --git a/unimarc/WindowsFormsApp1/bin/Debug/ko/WindowsFormsApp1.resources.dll b/unimarc/WindowsFormsApp1/bin/Debug/ko/WindowsFormsApp1.resources.dll index 496cc13..90d05fa 100644 Binary files a/unimarc/WindowsFormsApp1/bin/Debug/ko/WindowsFormsApp1.resources.dll and b/unimarc/WindowsFormsApp1/bin/Debug/ko/WindowsFormsApp1.resources.dll differ diff --git a/unimarc/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/unimarc/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache index ab1a000..e7dc2d3 100644 Binary files a/unimarc/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache and b/unimarc/WindowsFormsApp1/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache b/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache index 00ed9fa..fcd75e6 100644 Binary files a/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache and b/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csproj.GenerateResource.cache differ diff --git a/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csprojAssemblyReference.cache b/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csprojAssemblyReference.cache index acc0dc8..66573a0 100644 Binary files a/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csprojAssemblyReference.cache and b/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.csprojAssemblyReference.cache differ diff --git a/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe b/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe index 9d40a1b..9d068ef 100644 Binary files a/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe and b/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.exe differ diff --git a/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb b/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb index c2adfcf..0849e15 100644 Binary files a/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb and b/unimarc/WindowsFormsApp1/obj/Debug/WindowsFormsApp1.pdb differ diff --git a/unimarc/WindowsFormsApp1/obj/Debug/ko/WindowsFormsApp1.resources.dll b/unimarc/WindowsFormsApp1/obj/Debug/ko/WindowsFormsApp1.resources.dll index 496cc13..90d05fa 100644 Binary files a/unimarc/WindowsFormsApp1/obj/Debug/ko/WindowsFormsApp1.resources.dll and b/unimarc/WindowsFormsApp1/obj/Debug/ko/WindowsFormsApp1.resources.dll differ diff --git a/unimarc/WindowsFormsApp1/납품관리/List_aggregation.cs b/unimarc/WindowsFormsApp1/납품관리/List_aggregation.cs index b008b48..55d46f0 100644 --- a/unimarc/WindowsFormsApp1/납품관리/List_aggregation.cs +++ b/unimarc/WindowsFormsApp1/납품관리/List_aggregation.cs @@ -6,6 +6,7 @@ using System.Drawing; using System.Drawing.Printing; using System.Linq; using System.Text; +using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Windows.Forms; using WindowsFormsApp1.Mac; @@ -195,25 +196,99 @@ namespace WindowsFormsApp1.Delivery } private void btn_process_Click(object sender, EventArgs e) // 완료처리 { - string table = "Obj_List"; - string[] Edit_col = { "state" }; - string[] Search_col = { "list_name", "total" }; - string[] Edit_Data = { "완료" }; + Skill_Search_Text sst = new Skill_Search_Text(); + string value = ""; + if (sst.InputBox("출고율을 입력해주세요!", "출고율 입력", ref value) != DialogResult.OK) return; - int cout = 0; - for (int a = 0; a < dataGridView1.Rows.Count; a++) + value = Regex.Replace(value, @"[^0-9]", ""); + + if(value == "") return; + + string[] Edit_col = { "state" }; + string[] Edit_data = { "완료" }; + string[] Search_col = { "compidx", "list_name", "date" }; + string[] Search_data = { compidx, tb_list_name.Text, tb_date.Text }; + + string Area = "`isbn`, `isbn_import`, `book_name`, `author`, `book_comp`, `price`, `input_count`, `persent`"; + string book_list = db.More_DB_Search("Obj_List_Book", Search_col, Search_data, Area); + Sales(book_list, value); + + db.More_Update("Obj_List_Marc", Edit_col, Edit_data, Search_col, Search_data); + Search_col[0] = "comp_num"; + db.More_Update("Obj_List", Edit_col, Edit_data, Search_col, Search_data); + + MessageBox.Show("정상적으로 완료처리 되었습니다."); + } + /// + /// 목록도서DB 내용을 들고와서 SalesDB에 출고율을 추가하여 집어넣는다. + /// + private void Sales(string book_list, string out_per) + { + string[] tmp = book_list.Split('|'); + List l_book = new List(); + string[] book = { "", "", "", "", "", "", "" }; + for(int a= 0; a < tmp.Length; a++) { - bool isChecked = Convert.ToBoolean(dataGridView1.Rows[a].Cells["Chk_Column"].Value); - if (isChecked) - { - if (cout == 0) { EditNumber = a; cout++; } - string[] Search_Data = { dataGridView1.Rows[a].Cells["list_name"].Value.ToString(), - dataGridView1.Rows[a].Cells["total"].Value.ToString()}; - db.More_Update(table, Edit_col, Edit_Data, Search_col, Search_Data); + if (a % 8 == 0) { l_book.Add(tmp[a]); } // isbn + if (a % 8 == 1) { l_book.Add(tmp[a]); } // isbn_import + if (a % 8 == 2) { l_book.Add(tmp[a]); } // book_name + if (a % 8 == 3) { l_book.Add(tmp[a]); } // author + if (a % 8 == 4) { l_book.Add(tmp[a]); } // book_comp + if (a % 8 == 5) { l_book.Add(tmp[a]); } // price + if (a % 8 == 6) { l_book.Add(tmp[a]); } // input_count + if (a % 8 == 7) { l_book.Add(tmp[a]); // persent + book = db_data_filter(l_book, book); + input_sales(book, out_per); } } - if (cout == 0) { MessageBox.Show("체크된 사항이 없습니다."); return; } - else { btn_lookup_Click(null, null); } + } + private void input_sales(string[] book, string out_per) + { + String_Text st = new String_Text(); + DateTime date_tmp = new DateTime(DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day); + string date = date_tmp.ToString().Substring(0, 10); + string clt = st.GetMiddelString(tb_list_name.Text, "[", "]"); + string dly = tb_list_name.Text.Substring(tb_list_name.Text.IndexOf(']') + 1); + // 목록일자 + " " + 납품처 + string etc = tb_date.Text + " " + dly; + + string[] total = Cal_out_price(book[4], book[5], out_per, book[6]); + + string[] col_name = { "compidx", "date", "list_date", "list_name", "client", + "isbn", "book_name", "author", "book_comp", "price", + "count", "out_per", "total", "in_price", "out_price", "in_per", "etc" }; + string[] insert_data = { compidx, date, tb_date.Text, tb_list_name.Text, clt, + book[0], book[1], book[2], book[3], book[4], + book[5], out_per, total[0], total[1], total[2], book[6], etc }; + + db.DB_INSERT("Sales", col_name, insert_data); + } + private string[] Cal_out_price(string price_st, string count_st, string out_per_st, string in_per_st) + { + int price = Convert.ToInt32(price_st); + int count = Convert.ToInt32(count_st); + int in_per = Convert.ToInt32(in_per_st); + int out_per = Convert.ToInt32(out_per_st); + + int total = price * count; + double in_price_db = total * in_per / 100; + int in_price = Convert.ToInt32(in_price_db); + double out_price_db = total * out_per / 100; + int out_price = Convert.ToInt32(out_price_db); + + string[] result = { total.ToString(), in_price.ToString(), out_price.ToString() }; + return result; + } + private string[] db_data_filter(List l_book, string[] book) + { + if (l_book[0] == "") { + l_book.RemoveAt(0); + } + else if(l_book[0] != l_book[1]){ + l_book.RemoveAt(1); + } + book = l_book.ToArray(); + return book; } int cnt = 0; int pageNo = 1; private void btn_print_Click(object sender, EventArgs e) // 인쇄 diff --git a/unimarc/WindowsFormsApp1/회계/Sales_Book.Designer.cs b/unimarc/WindowsFormsApp1/회계/Sales_Book.Designer.cs index 5b84f95..be81b69 100644 --- a/unimarc/WindowsFormsApp1/회계/Sales_Book.Designer.cs +++ b/unimarc/WindowsFormsApp1/회계/Sales_Book.Designer.cs @@ -29,12 +29,12 @@ namespace WindowsFormsApp1.회계 /// 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 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 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(); this.panel1 = new System.Windows.Forms.Panel(); this.tb_clt = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); @@ -45,14 +45,6 @@ namespace WindowsFormsApp1.회계 this.End_Date = new System.Windows.Forms.DateTimePicker(); this.btn_Lookup = new System.Windows.Forms.Button(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.textBox2 = new System.Windows.Forms.TextBox(); - this.textBox1 = new System.Windows.Forms.TextBox(); - this.tb_count = new System.Windows.Forms.TextBox(); - this.textBox6 = new System.Windows.Forms.TextBox(); - this.tb_out = new System.Windows.Forms.TextBox(); - this.tb_in = new System.Windows.Forms.TextBox(); - this.textBox9 = new System.Windows.Forms.TextBox(); - this.textBox10 = new System.Windows.Forms.TextBox(); this.out_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.content = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -61,6 +53,14 @@ namespace WindowsFormsApp1.회계 this.in_price = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.now_money = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.tb_count = new System.Windows.Forms.TextBox(); + this.textBox6 = new System.Windows.Forms.TextBox(); + this.tb_out = new System.Windows.Forms.TextBox(); + this.tb_in = new System.Windows.Forms.TextBox(); + this.textBox9 = new System.Windows.Forms.TextBox(); + this.textBox10 = new System.Windows.Forms.TextBox(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); @@ -157,14 +157,14 @@ namespace WindowsFormsApp1.회계 // this.dataGridView1.AllowUserToAddRows = false; this.dataGridView1.AllowUserToDeleteRows = false; - 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; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.out_date, this.content, @@ -181,6 +181,65 @@ namespace WindowsFormsApp1.회계 this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.Size = new System.Drawing.Size(960, 421); this.dataGridView1.TabIndex = 94; + this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick); + // + // out_date + // + this.out_date.HeaderText = "출고일자"; + this.out_date.Name = "out_date"; + this.out_date.Width = 80; + // + // content + // + this.content.HeaderText = "내용"; + this.content.Name = "content"; + this.content.Width = 300; + // + // count + // + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this.count.DefaultCellStyle = dataGridViewCellStyle2; + this.count.HeaderText = "수량"; + this.count.Name = "count"; + this.count.Width = 40; + // + // out_per + // + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this.out_per.DefaultCellStyle = dataGridViewCellStyle3; + this.out_per.HeaderText = "출고율"; + this.out_per.Name = "out_per"; + this.out_per.Width = 60; + // + // out_price + // + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this.out_price.DefaultCellStyle = dataGridViewCellStyle4; + this.out_price.HeaderText = "매출금액"; + this.out_price.Name = "out_price"; + this.out_price.Width = 80; + // + // in_price + // + dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this.in_price.DefaultCellStyle = dataGridViewCellStyle5; + this.in_price.HeaderText = "입금액"; + this.in_price.Name = "in_price"; + this.in_price.Width = 80; + // + // now_money + // + dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; + this.now_money.DefaultCellStyle = dataGridViewCellStyle6; + this.now_money.HeaderText = "현잔액"; + this.now_money.Name = "now_money"; + this.now_money.Width = 80; + // + // etc + // + this.etc.HeaderText = "비고"; + this.etc.Name = "etc"; + this.etc.Width = 200; // // textBox2 // @@ -257,64 +316,6 @@ namespace WindowsFormsApp1.회계 this.textBox10.Size = new System.Drawing.Size(202, 21); this.textBox10.TabIndex = 95; // - // out_date - // - this.out_date.HeaderText = "출고일자"; - this.out_date.Name = "out_date"; - this.out_date.Width = 80; - // - // content - // - this.content.HeaderText = "내용"; - this.content.Name = "content"; - this.content.Width = 300; - // - // count - // - dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - this.count.DefaultCellStyle = dataGridViewCellStyle8; - this.count.HeaderText = "수량"; - this.count.Name = "count"; - this.count.Width = 40; - // - // out_per - // - dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - this.out_per.DefaultCellStyle = dataGridViewCellStyle9; - this.out_per.HeaderText = "출고율"; - this.out_per.Name = "out_per"; - this.out_per.Width = 60; - // - // out_price - // - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - this.out_price.DefaultCellStyle = dataGridViewCellStyle10; - this.out_price.HeaderText = "매출금액"; - this.out_price.Name = "out_price"; - this.out_price.Width = 80; - // - // in_price - // - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - this.in_price.DefaultCellStyle = dataGridViewCellStyle11; - this.in_price.HeaderText = "입금액"; - this.in_price.Name = "in_price"; - this.in_price.Width = 80; - // - // now_money - // - dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight; - this.now_money.DefaultCellStyle = dataGridViewCellStyle12; - this.now_money.HeaderText = "현잔액"; - this.now_money.Name = "now_money"; - this.now_money.Width = 80; - // - // etc - // - this.etc.HeaderText = "비고"; - this.etc.Name = "etc"; - this.etc.Width = 200; - // // Sales_Book // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); diff --git a/unimarc/WindowsFormsApp1/회계/Sales_Book.cs b/unimarc/WindowsFormsApp1/회계/Sales_Book.cs index 1d8c3b8..56ac766 100644 --- a/unimarc/WindowsFormsApp1/회계/Sales_Book.cs +++ b/unimarc/WindowsFormsApp1/회계/Sales_Book.cs @@ -13,16 +13,10 @@ namespace WindowsFormsApp1.회계 { public partial class Sales_Book : Form { - Main main; Sales_Deposit sd; Helper_DB db = new Helper_DB(); public string compidx; public int row = -1; - public Sales_Book(Main _main) - { - InitializeComponent(); - main = _main; - } public Sales_Book(Sales_Deposit _sd) { InitializeComponent(); @@ -179,5 +173,27 @@ namespace WindowsFormsApp1.회계 String_Text st = new String_Text(); st.Int_Comma(sender, e); } + + private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + int row = e.RowIndex; + if (row < 0) { return; } + if (dataGridView1.Rows[row].Cells["out_date"].Value.ToString() == "이월미수금") { return; } + if (dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 통장" || + dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 카드" || + dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 현금" || + dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 어음") { return; } + + Sales_Detail sde = new Sales_Detail(this); + string out_date = dataGridView1.Rows[e.RowIndex].Cells["out_date"].Value.ToString().Substring(0, 10).Replace("-", ""); + int yesr = Convert.ToInt32(out_date.Substring(0, 4)); + int month = Convert.ToInt32(out_date.Substring(4, 2)); + int day = Convert.ToInt32(out_date.Substring(6, 2)); + // sde.MdiParent = main; + sde.WindowState = FormWindowState.Maximized; + sde.Out_Date.Value = new DateTime(yesr, month, day); + sde.tb_clt.Text = tb_clt.Text; + sde.Show(); + } } } diff --git a/unimarc/WindowsFormsApp1/회계/Sales_Detail.Designer.cs b/unimarc/WindowsFormsApp1/회계/Sales_Detail.Designer.cs index f040be8..13b2d8d 100644 --- a/unimarc/WindowsFormsApp1/회계/Sales_Detail.Designer.cs +++ b/unimarc/WindowsFormsApp1/회계/Sales_Detail.Designer.cs @@ -36,18 +36,6 @@ namespace WindowsFormsApp1.회계 this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.dataGridView1 = new System.Windows.Forms.DataGridView(); - this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.price = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.out_per = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.in_per = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.list_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.out_price = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.in_price = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.textBox1 = new System.Windows.Forms.TextBox(); this.textBox2 = new System.Windows.Forms.TextBox(); this.textBox3 = new System.Windows.Forms.TextBox(); @@ -61,6 +49,25 @@ namespace WindowsFormsApp1.회계 this.textBox11 = new System.Windows.Forms.TextBox(); this.textBox12 = new System.Windows.Forms.TextBox(); this.textBox13 = new System.Windows.Forms.TextBox(); + this.btn_per_change = new System.Windows.Forms.Button(); + this.btn_delete = new System.Windows.Forms.Button(); + this.btn_close = new System.Windows.Forms.Button(); + this.btn_save = new System.Windows.Forms.Button(); + this.tb_out_per = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.author = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.price = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.out_per = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.in_per = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.list_date = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.out_price = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.in_price = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); this.SuspendLayout(); @@ -79,6 +86,7 @@ namespace WindowsFormsApp1.회계 // // tb_clt // + this.tb_clt.Enabled = false; this.tb_clt.Location = new System.Drawing.Point(234, 11); this.tb_clt.Name = "tb_clt"; this.tb_clt.Size = new System.Drawing.Size(167, 21); @@ -87,6 +95,7 @@ namespace WindowsFormsApp1.회계 // Out_Date // this.Out_Date.CustomFormat = "yyyy-MM-dd"; + this.Out_Date.Enabled = false; this.Out_Date.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.Out_Date.Location = new System.Drawing.Point(57, 11); this.Out_Date.Name = "Out_Date"; @@ -124,6 +133,7 @@ namespace WindowsFormsApp1.회계 dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.idx, this.book_name, this.author, this.book_comp, @@ -145,76 +155,6 @@ namespace WindowsFormsApp1.회계 this.dataGridView1.TabIndex = 83; this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint); // - // book_name - // - this.book_name.HeaderText = "도서명"; - this.book_name.Name = "book_name"; - this.book_name.Width = 250; - // - // author - // - this.author.HeaderText = "저자"; - this.author.Name = "author"; - // - // book_comp - // - this.book_comp.HeaderText = "출판사"; - this.book_comp.Name = "book_comp"; - // - // price - // - this.price.HeaderText = "정가"; - this.price.Name = "price"; - this.price.Width = 70; - // - // count - // - this.count.HeaderText = "수량"; - this.count.Name = "count"; - this.count.Width = 50; - // - // out_per - // - this.out_per.HeaderText = "O%"; - this.out_per.Name = "out_per"; - this.out_per.Width = 40; - // - // in_per - // - this.in_per.HeaderText = "I%"; - this.in_per.Name = "in_per"; - this.in_per.Width = 40; - // - // list_date - // - this.list_date.HeaderText = "목록일자"; - this.list_date.Name = "list_date"; - this.list_date.Width = 80; - // - // list_name - // - this.list_name.HeaderText = "목록명"; - this.list_name.Name = "list_name"; - this.list_name.Width = 170; - // - // out_price - // - this.out_price.HeaderText = "출고가"; - this.out_price.Name = "out_price"; - this.out_price.Width = 80; - // - // in_price - // - this.in_price.HeaderText = "입고가"; - this.in_price.Name = "in_price"; - this.in_price.Width = 80; - // - // etc - // - this.etc.HeaderText = "비고"; - this.etc.Name = "etc"; - this.etc.Width = 130; - // // textBox1 // this.textBox1.Enabled = false; @@ -319,11 +259,150 @@ namespace WindowsFormsApp1.회계 this.textBox13.Size = new System.Drawing.Size(31, 21); this.textBox13.TabIndex = 84; // + // btn_per_change + // + this.btn_per_change.Location = new System.Drawing.Point(572, 12); + this.btn_per_change.Name = "btn_per_change"; + this.btn_per_change.Size = new System.Drawing.Size(75, 23); + this.btn_per_change.TabIndex = 85; + this.btn_per_change.Text = "일괄변경"; + this.btn_per_change.UseVisualStyleBackColor = true; + this.btn_per_change.Click += new System.EventHandler(this.btn_per_change_Click); + // + // btn_delete + // + this.btn_delete.Location = new System.Drawing.Point(653, 35); + this.btn_delete.Name = "btn_delete"; + this.btn_delete.Size = new System.Drawing.Size(75, 23); + this.btn_delete.TabIndex = 85; + this.btn_delete.Text = "삭 제"; + this.btn_delete.UseVisualStyleBackColor = true; + this.btn_delete.Click += new System.EventHandler(this.btn_delete_Click); + // + // btn_close + // + this.btn_close.Location = new System.Drawing.Point(734, 35); + this.btn_close.Name = "btn_close"; + this.btn_close.Size = new System.Drawing.Size(75, 23); + this.btn_close.TabIndex = 85; + this.btn_close.Text = "닫 기"; + this.btn_close.UseVisualStyleBackColor = true; + this.btn_close.Click += new System.EventHandler(this.btn_close_Click); + // + // btn_save + // + this.btn_save.Location = new System.Drawing.Point(572, 35); + this.btn_save.Name = "btn_save"; + this.btn_save.Size = new System.Drawing.Size(75, 23); + this.btn_save.TabIndex = 85; + this.btn_save.Text = "저 장"; + this.btn_save.UseVisualStyleBackColor = true; + this.btn_save.Click += new System.EventHandler(this.btn_save_Click); + // + // tb_out_per + // + this.tb_out_per.Location = new System.Drawing.Point(513, 13); + this.tb_out_per.Name = "tb_out_per"; + this.tb_out_per.Size = new System.Drawing.Size(53, 21); + this.tb_out_per.TabIndex = 86; + this.tb_out_per.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tb_out_per_KeyPress); + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(470, 17); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(41, 12); + this.label3.TabIndex = 0; + this.label3.Text = "할인율"; + // + // idx + // + this.idx.HeaderText = "idx"; + this.idx.Name = "idx"; + this.idx.Visible = false; + // + // book_name + // + this.book_name.HeaderText = "도서명"; + this.book_name.Name = "book_name"; + this.book_name.Width = 250; + // + // author + // + this.author.HeaderText = "저자"; + this.author.Name = "author"; + // + // book_comp + // + this.book_comp.HeaderText = "출판사"; + this.book_comp.Name = "book_comp"; + // + // price + // + this.price.HeaderText = "정가"; + this.price.Name = "price"; + this.price.Width = 70; + // + // count + // + this.count.HeaderText = "수량"; + this.count.Name = "count"; + this.count.Width = 50; + // + // out_per + // + this.out_per.HeaderText = "O%"; + this.out_per.Name = "out_per"; + this.out_per.Width = 40; + // + // in_per + // + this.in_per.HeaderText = "I%"; + this.in_per.Name = "in_per"; + this.in_per.Width = 40; + // + // list_date + // + this.list_date.HeaderText = "목록일자"; + this.list_date.Name = "list_date"; + this.list_date.Width = 80; + // + // list_name + // + this.list_name.HeaderText = "목록명"; + this.list_name.Name = "list_name"; + this.list_name.Width = 170; + // + // out_price + // + this.out_price.HeaderText = "출고가"; + this.out_price.Name = "out_price"; + this.out_price.Width = 80; + // + // in_price + // + this.in_price.HeaderText = "입고가"; + this.in_price.Name = "in_price"; + this.in_price.Width = 80; + // + // etc + // + this.etc.HeaderText = "비고"; + this.etc.Name = "etc"; + this.etc.Width = 130; + // // Sales_Detail // this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1266, 518); + this.Controls.Add(this.tb_out_per); + this.Controls.Add(this.btn_save); + this.Controls.Add(this.label3); + this.Controls.Add(this.btn_close); + this.Controls.Add(this.btn_delete); + this.Controls.Add(this.btn_per_change); this.Controls.Add(this.textBox12); this.Controls.Add(this.textBox11); this.Controls.Add(this.textBox10); @@ -341,6 +420,7 @@ namespace WindowsFormsApp1.회계 this.Controls.Add(this.panel1); this.Name = "Sales_Detail"; this.Text = "매출 상세"; + this.Load += new System.EventHandler(this.Sales_Detail_Load); this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit(); @@ -355,18 +435,6 @@ namespace WindowsFormsApp1.회계 private System.Windows.Forms.Label label1; private System.Windows.Forms.Label label2; private System.Windows.Forms.DataGridView dataGridView1; - private System.Windows.Forms.DataGridViewTextBoxColumn book_name; - private System.Windows.Forms.DataGridViewTextBoxColumn author; - private System.Windows.Forms.DataGridViewTextBoxColumn book_comp; - private System.Windows.Forms.DataGridViewTextBoxColumn price; - private System.Windows.Forms.DataGridViewTextBoxColumn count; - private System.Windows.Forms.DataGridViewTextBoxColumn out_per; - private System.Windows.Forms.DataGridViewTextBoxColumn in_per; - private System.Windows.Forms.DataGridViewTextBoxColumn list_date; - private System.Windows.Forms.DataGridViewTextBoxColumn list_name; - private System.Windows.Forms.DataGridViewTextBoxColumn out_price; - private System.Windows.Forms.DataGridViewTextBoxColumn in_price; - private System.Windows.Forms.DataGridViewTextBoxColumn etc; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.TextBox textBox2; private System.Windows.Forms.TextBox textBox3; @@ -382,5 +450,24 @@ namespace WindowsFormsApp1.회계 private System.Windows.Forms.TextBox textBox13; public System.Windows.Forms.DateTimePicker Out_Date; public System.Windows.Forms.TextBox tb_clt; + private System.Windows.Forms.Button btn_per_change; + private System.Windows.Forms.Button btn_delete; + private System.Windows.Forms.Button btn_close; + private System.Windows.Forms.Button btn_save; + private System.Windows.Forms.TextBox tb_out_per; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.DataGridViewTextBoxColumn idx; + private System.Windows.Forms.DataGridViewTextBoxColumn book_name; + private System.Windows.Forms.DataGridViewTextBoxColumn author; + private System.Windows.Forms.DataGridViewTextBoxColumn book_comp; + private System.Windows.Forms.DataGridViewTextBoxColumn price; + private System.Windows.Forms.DataGridViewTextBoxColumn count; + private System.Windows.Forms.DataGridViewTextBoxColumn out_per; + private System.Windows.Forms.DataGridViewTextBoxColumn in_per; + private System.Windows.Forms.DataGridViewTextBoxColumn list_date; + private System.Windows.Forms.DataGridViewTextBoxColumn list_name; + private System.Windows.Forms.DataGridViewTextBoxColumn out_price; + private System.Windows.Forms.DataGridViewTextBoxColumn in_price; + private System.Windows.Forms.DataGridViewTextBoxColumn etc; } } \ No newline at end of file diff --git a/unimarc/WindowsFormsApp1/회계/Sales_Detail.cs b/unimarc/WindowsFormsApp1/회계/Sales_Detail.cs index 7c976a8..8d27b1b 100644 --- a/unimarc/WindowsFormsApp1/회계/Sales_Detail.cs +++ b/unimarc/WindowsFormsApp1/회계/Sales_Detail.cs @@ -7,23 +7,112 @@ using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; +using WindowsFormsApp1.Account; namespace WindowsFormsApp1.회계 { public partial class Sales_Detail : Form { - public Sales_Detail() + public string compidx; + Helper_DB db = new Helper_DB(); + Sales_Book sb; + Sales_Lookup sl; + public Sales_Detail(Sales_Book _sb) { InitializeComponent(); + sb = _sb; + compidx = sb.compidx; + } + public Sales_Detail(Sales_Lookup _sl) + { + InitializeComponent(); + sl = _sl; + compidx = sl.compidx; + } + private void Sales_Detail_Load(object sender, EventArgs e) + { + db.DBcon(); + + string area = "`idx`, `book_name`, `author`, `book_comp`, `price`, " + + "`count`, `out_per`, `in_per`, `list_date`, `list_name`, " + + "`out_price`, `in_price`, `etc`"; + + string[] search_col = { "compidx", "date", "client" }; + string[] search_data = { compidx, Out_Date.Value.ToString().Substring(0, 10), tb_clt.Text }; + string db_data = db.More_DB_Search("Sales", search_col, search_data, area); + string[] ary = db_data.Split('|'); + input_grid(ary); + } + void input_grid(string[] db_data) + { + string[] grid = { "", "", "", "", "", + "", "", "", "", "", + "", "", "" }; + int cnt = 13; + for (int a = 0; a < db_data.Length; a++) + { + if (a % cnt == 0) { grid[0] = db_data[a]; } + if (a % cnt == 1) { grid[1] = db_data[a]; } + if (a % cnt == 2) { grid[2] = db_data[a]; } + if (a % cnt == 3) { grid[3] = db_data[a]; } + if (a % cnt == 4) { grid[4] = db_data[a]; } + if (a % cnt == 5) { grid[5] = db_data[a]; } + if (a % cnt == 6) { grid[6] = db_data[a]; } + if (a % cnt == 7) { grid[7] = db_data[a]; } + if (a % cnt == 8) { grid[8] = db_data[a]; } + if (a % cnt == 9) { grid[9] = db_data[a]; } + if (a % cnt == 10) { grid[10] = db_data[a]; } + if (a % cnt == 11) { grid[11] = db_data[a]; } + if (a % cnt == 12) { grid[12] = db_data[a]; + dataGridView1.Rows.Add(grid); + } + } + } + private void btn_per_change_Click(object sender, EventArgs e) + { + string per = tb_out_per.Text; + + if (dataGridView1.Rows.Count < 0) { return; } + for (int a = 0; a < dataGridView1.Rows.Count; a++) + { + dataGridView1.Rows[a].Cells["out_per"].Value = per; + cal_total(a); + } + } + void cal_total(int row) + { + int price = Convert.ToInt32(dataGridView1.Rows[row].Cells["price"].Value.ToString()); + int count = Convert.ToInt32(dataGridView1.Rows[row].Cells["count"].Value.ToString()); + int o_per = Convert.ToInt32(dataGridView1.Rows[row].Cells["out_per"].Value.ToString()); + + double res_do = price * count * o_per / 100; + int res = Convert.ToInt32(res_do); + dataGridView1.Rows[row].Cells["out_price"].Value = res.ToString(); + } + private void btn_save_Click(object sender, EventArgs e) + { + + } + private void btn_delete_Click(object sender, EventArgs e) + { + + } + private void btn_close_Click(object sender, EventArgs e) + { + this.Close(); } private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e) { Skill_Grid sg = new Skill_Grid(); sg.Print_Grid_Num(sender, e); } + private void tb_out_per_KeyPress(object sender, KeyPressEventArgs e) + { + String_Text st = new String_Text(); + st.Only_Int(sender, e); + } } } -#region 비고란 기본 설정 정할것. // 목록일자 + " " + 납품처 // // 2021-04-29 전남도립(희)4-3 @@ -63,5 +152,4 @@ namespace WindowsFormsApp1.회계 // 2021-04-16일자 운남고m납품목록 // 2021-05-11일자 죽곡유치원추가납품목록 // 2021-05-06일자 조선이공대2차k납품목록 -// 2021-04-27일자 서구공립6개관납품목록 -#endregion \ No newline at end of file +// 2021-04-27일자 서구공립6개관납품목록 \ No newline at end of file diff --git a/unimarc/WindowsFormsApp1/회계/Sales_Detail.resx b/unimarc/WindowsFormsApp1/회계/Sales_Detail.resx index 4181118..c0ed20d 100644 --- a/unimarc/WindowsFormsApp1/회계/Sales_Detail.resx +++ b/unimarc/WindowsFormsApp1/회계/Sales_Detail.resx @@ -117,6 +117,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + True diff --git a/unimarc/WindowsFormsApp1/회계/Sales_Lookup.cs b/unimarc/WindowsFormsApp1/회계/Sales_Lookup.cs index 3de55e5..b701af4 100644 --- a/unimarc/WindowsFormsApp1/회계/Sales_Lookup.cs +++ b/unimarc/WindowsFormsApp1/회계/Sales_Lookup.cs @@ -10,6 +10,7 @@ using System.Windows.Forms; // 추가된 참조 using WindowsFormsApp1.Delivery; +using WindowsFormsApp1.회계; namespace WindowsFormsApp1.Account { @@ -164,7 +165,16 @@ namespace WindowsFormsApp1.Account } private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { - + Sales_Detail sd = new Sales_Detail(this); + string out_date = dataGridView1.Rows[e.RowIndex].Cells["out_date"].Value.ToString().Substring(0, 10).Replace("-", ""); + int yesr = Convert.ToInt32(out_date.Substring(0, 4)); + int month = Convert.ToInt32(out_date.Substring(4, 2)); + int day = Convert.ToInt32(out_date.Substring(6, 2)); + sd.MdiParent = main; + sd.WindowState = FormWindowState.Maximized; + sd.Out_Date.Value = new DateTime(yesr, month, day); + sd.tb_clt.Text = dataGridView1.Rows[e.RowIndex].Cells["clt"].Value.ToString(); + sd.Show(); } } }