=====* unimarc *=====
===== 작업중 ===== 주문관리 폼 재 수정작업중 - 팩스 및 이메일 기록 폼 제작해야함. - 제작완료 (현재 목록등록 -> 수정버튼 작업중) ㄴ> 작업 완료후 검토하고, 회계로 넘어갈 것. - 회계전환 ㄴ> 회계전환. 매출상세(Sales_Detail.cs) 폼 작업중. (버튼 이벤트 작업진행중) ===== 보류 ===== b. 마크목록 폼 작성중 1. 엑셀반출 기능 추가중 사용 작업대기중 c. 마크 반입 폼 수정중 1. 불러오기는 되나 저장 기능이 필요함. ===== 완료 ===== 1. 주문관리 팩스연동 완료 2. 전송된 팩스 확인 작업개시, 이메일 전송모듈 수정완료. 3. 주문관리에서 주문처와 목록 검색하는 폼 검색 모듈도 재수정 완료함. 4. 데이터베이스 내 이미지URL을 가져오는작업 완료 목록집계 폼 재 수정작업 완료 - 확인 및 수정 필요. ISBN 체크 프로그램 => 본프로그램에 이식중. ㄴ> 코드는 다 옮겼으나 기존 사용하던 방식과 조금 달라서 버그발생 가능성 있음. ㄴ> 버그 체크 계속 해볼것. 21-04-15 ㄴ> 21_04_20 버그 없음. 2. 마크편집 폼 수정 중 (마크 반출 test프로젝트 진행완료, 본 프로젝트에 적용중. / 저장기능활성화 작업완료) 2-1. 기존의 칸채우기에서 예상되지 못한 버그가 발생하여 칸채우기 숨김. 2-2. 008태크 재배치 => TextBox에 적용완료. 변경사항 메모장으로 넘기는 작업 완료. 2-3. 저장기능 완료. (04.14 체크해볼것 - 완료) 주문관리 작업중 (DataGridView 주문처 엔터키 입력시 검색되게끔 하는 코드작성중) - 21.04.27 완료
This commit is contained in:
		| @@ -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("정상적으로 완료처리 되었습니다."); | ||||
|         } | ||||
|         /// <summary> | ||||
|         /// 목록도서DB 내용을 들고와서 SalesDB에 출고율을 추가하여 집어넣는다. | ||||
|         /// </summary> | ||||
|         private void Sales(string book_list, string out_per) | ||||
|         { | ||||
|             string[] tmp = book_list.Split('|'); | ||||
|             List<string> l_book = new List<string>(); | ||||
|             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<string> 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)    // 인쇄 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 SeungHo Yang
					SeungHo Yang