=====* unimarc *=====

------------------------

=====* ISBN 체크 프로그램  *===== ★작업완료★
 a. 현재 마크팀 배포완료. - 추후 수정사항발생시 수정할 것.

------------------------

===== 작업중 =====
목록집계 폼 재 수정작업 완료 - 확인 및 수정 필요.

===== 보류 =====
 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:
SeungHo Yang
2021-04-28 18:48:22 +09:00
parent 278c4bb5e2
commit 2596ff751a
20 changed files with 532 additions and 389 deletions

View File

@@ -78,6 +78,7 @@
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.lbl_idx = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
@@ -86,6 +87,7 @@
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.lbl_idx);
this.panel1.Controls.Add(this.tb_isbn);
this.panel1.Controls.Add(this.tb_order_idx);
this.panel1.Controls.Add(this.label9);
@@ -572,6 +574,16 @@
this.Column6.Name = "Column6";
this.Column6.Width = 40;
//
// lbl_idx
//
this.lbl_idx.AutoSize = true;
this.lbl_idx.Location = new System.Drawing.Point(212, 10);
this.lbl_idx.Name = "lbl_idx";
this.lbl_idx.Size = new System.Drawing.Size(62, 12);
this.lbl_idx.TabIndex = 2;
this.lbl_idx.Text = "idx 들어감";
this.lbl_idx.Visible = false;
//
// Book_Lookup
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -649,5 +661,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
private System.Windows.Forms.TextBox tb_stock;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label lbl_idx;
}
}

View File

@@ -11,20 +11,12 @@ using System.Windows.Forms;
namespace WindowsFormsApp1.Delivery
{
public struct Backup_Data
{
public string[] book_data;
public void backup_set_book(string[] backup)
{
book_data = backup;
}
}
public partial class Book_Lookup : Form
{
Helper_DB db = new Helper_DB();
Backup_Data back;
Order_input oin;
Purchase pur;
List_Lookup ll;
string compidx;
string list_name;
int idx;
@@ -42,6 +34,13 @@ namespace WindowsFormsApp1.Delivery
idx = pur.grididx;
compidx = pur.compidx;
}
public Book_Lookup(List_Lookup _ll)
{
InitializeComponent();
ll = _ll;
idx = ll.grididx;
compidx = ll.compidx;
}
private void Book_Lookup_Load(object sender, EventArgs e)
{
db.DBcon();
@@ -57,7 +56,6 @@ namespace WindowsFormsApp1.Delivery
string[] List_book = { compidx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text,
tb_pay.Text, tb_count.Text, tb_stock.Text, tb_total.Text, tb_etc.Text,
tb_order1.Text, tb_order_date.Text, tb_List_name.Text };
back.backup_set_book(List_book);
}
private void mk_Grid()
{
@@ -103,13 +101,26 @@ namespace WindowsFormsApp1.Delivery
this.list_name = list_name;
db.DBcon();
string search = "`book_name`, `author`, `book_comp`, `count`, `pay`, " +
"`total`, `header`, `num`, `order`, `etc`, `input_count`, `order_date`";
"`total`, `header`, `num`, `order`, `etc`, " +
"`input_count`, `order_date`, `list_name`, `idx`";
string[] data = { compidx, book_name, author, book_comp, list_name };
string[] table = { "compidx", "book_name", "author", "book_comp", "list_name" };
string tmp_db = db.More_DB_Search("Obj_List_Book", table, data, search);
mk_Lookup(tmp_db);
}
public void Lookup_Load_tmp(string idx)
{
db.DBcon();
string search = "`book_name`, `author`, `book_comp`, `count`, `pay`, " +
"`total`, `header`, `num`, `order`, `etc`, " +
"`input_count`, `order_date`, `list_name`, `idx`";
string[] data = { compidx, idx };
string[] table = { "compidx", "idx" };
string tmp_db = db.More_DB_Search("Obj_List_Book", table, data, search);
mk_Lookup(tmp_db);
}
private void mk_Lookup(string values)
{
string[] data = values.Split('|');
@@ -126,6 +137,8 @@ namespace WindowsFormsApp1.Delivery
tb_stock.Text = data[10];
if (data[11].Length < 3) { tb_order_date.Text = ""; }
else { tb_order_date.Text = data[11].Substring(0, 10); }
this.list_name = data[12];
lbl_idx.Text = data[13];
}
/// <summary>
/// 목록db에서 불러온 값을 적용시키는 함수
@@ -161,13 +174,6 @@ namespace WindowsFormsApp1.Delivery
{
btn_close_Click(null, null);
}
if (e.KeyCode == Keys.Control)
{
if (e.KeyCode == Keys.S)
{
btn_save_Click(null, null);
}
}
}
private void btn_save_Click(object sender, EventArgs e)
{
@@ -181,8 +187,10 @@ namespace WindowsFormsApp1.Delivery
string[] List_book = { compidx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text,
tb_pay.Text, tb_count.Text, tb_stock.Text, tb_total.Text, tb_etc.Text,
tb_order1.Text, tb_order_date.Text, tb_List_name.Text };
string[] idx_table = { "idx" };
string[] idx_col = { lbl_idx.Text };
db.More_Update("Obj_List_Book", Table, List_book, Table, back.book_data);
db.More_Update("Obj_List_Book", Table, List_book, idx_table, idx_col);
MessageBox.Show("저장되었습니다.");
}
private void btn_close_Click(object sender, EventArgs e)

View File

@@ -40,6 +40,7 @@
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
@@ -61,6 +62,7 @@
this.dataGridView1.Location = new System.Drawing.Point(0, 0);
this.dataGridView1.MultiSelect = false;
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 20;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.Size = new System.Drawing.Size(563, 242);
@@ -73,6 +75,7 @@
this.Column1.HeaderText = "업체명";
this.Column1.Name = "Column1";
this.Column1.ReadOnly = true;
this.Column1.Width = 120;
//
// Column2
//

View File

@@ -17,6 +17,7 @@ namespace WindowsFormsApp1.Delivery
Commodity_registration com;
Commodity_Edit edit;
Purchase pur;
List_aggregation la;
public Commodity_Search(Purchase _pur)
{
InitializeComponent();
@@ -32,25 +33,33 @@ namespace WindowsFormsApp1.Delivery
InitializeComponent();
com = _com;
}
public Commodity_Search(List_aggregation _la)
{
InitializeComponent();
la = _la;
}
private void Commodity_Sub_Load(object sender, EventArgs e)
{
string compidx = "";
if (edit != null) { edit.New_Clit.Text = ""; compidx = edit.compidx; }
if (com != null) { com.tb_clt1.Text = ""; compidx = com.comp_idx; }
if (pur != null) { pur.tb_clt.Text = ""; compidx = pur.compidx; }
if (la != null) { la.tb_clt.Text = ""; compidx = la.compidx; }
Helper_DB db = new Helper_DB();
string Area = "`c_sangho`, `c_boss`, `c_tel`, `c_man`, `c_mantel`";
db.DBcon();
string dbcon = db.DB_Contains("Client", compidx, "c_sangho", Clinet_name);
string dbcon = db.DB_Contains("Client", compidx, "c_sangho", Clinet_name, Area);
string[] res = dbcon.Split('|');
int cout = 0;
for (int a = 0; a < res.Length/8; a++) { dataGridView1.Rows.Add(); }
string[] grid = { "", "", "", "", "" };
for(int a = 0; a < res.Length; a++)
{
if (a % 24 == 1) { dataGridView1.Rows[cout].Cells[0].Value = res[a]; }
else if (a % 24 == 2) { dataGridView1.Rows[cout].Cells[1].Value = res[a]; }
else if (a % 24 == 8) { dataGridView1.Rows[cout].Cells[2].Value = res[a]; }
else if (a % 24 == 12) { dataGridView1.Rows[cout].Cells[3].Value = res[a]; }
else if (a % 24 == 13) { dataGridView1.Rows[cout].Cells[4].Value = res[a]; cout++; }
if (a % 5 == 0) { grid[0] = res[a]; }
if (a % 5 == 1) { grid[1] = res[a]; }
if (a % 5 == 2) { grid[2] = res[a]; }
if (a % 5 == 3) { grid[3] = res[a]; }
if (a % 5 == 4) { grid[4] = res[a];
dataGridView1.Rows.Add(grid);
}
}
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
@@ -59,6 +68,7 @@ namespace WindowsFormsApp1.Delivery
if (edit != null) { edit.New_Clit.Text = value; }
if (com != null) { com.tb_clt1.Text = value; }
if (pur != null) { pur.tb_clt.Text = value; }
if (la != null) { la.tb_clt.Text = value; }
Close();
}
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
@@ -75,10 +85,10 @@ namespace WindowsFormsApp1.Delivery
if (edit != null) { edit.New_Clit.Text = value; }
if (com != null) { com.tb_clt1.Text = value; }
if (pur != null) { pur.tb_clt.Text = value; }
if (la != null) { la.tb_clt.Text = value; }
Close();
}
if(e.KeyCode == Keys.Escape)
{
if (e.KeyCode == Keys.Escape) {
Close();
}
}

View File

@@ -28,10 +28,10 @@
/// </summary>
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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(List_Lookup));
this.label1 = new System.Windows.Forms.Label();
this.cb_list = new System.Windows.Forms.ComboBox();
@@ -57,6 +57,15 @@
this.cb_import = new System.Windows.Forms.ComboBox();
this.cb_charge = new System.Windows.Forms.ComboBox();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.panel4 = new System.Windows.Forms.Panel();
this.lbl_total = new System.Windows.Forms.Label();
this.lbl_pay = new System.Windows.Forms.Label();
this.lbl_count = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.printDialog1 = new System.Windows.Forms.PrintDialog();
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.num = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -71,14 +80,6 @@
this.order = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel4 = new System.Windows.Forms.Panel();
this.lbl_total = new System.Windows.Forms.Label();
this.lbl_pay = new System.Windows.Forms.Label();
this.lbl_count = new System.Windows.Forms.Label();
this.label11 = new System.Windows.Forms.Label();
this.printDialog1 = new System.Windows.Forms.PrintDialog();
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
@@ -129,6 +130,7 @@
this.tb_search.Name = "tb_search";
this.tb_search.Size = new System.Drawing.Size(134, 21);
this.tb_search.TabIndex = 2;
this.tb_search.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_search_KeyDown);
//
// panel1
//
@@ -309,16 +311,17 @@
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, 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;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Bold, 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;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.idx,
this.Column1,
this.num,
this.book_name,
@@ -333,113 +336,33 @@
this.order,
this.Column2,
this.Column3});
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.True;
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle2;
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.True;
this.dataGridView1.DefaultCellStyle = dataGridViewCellStyle6;
this.dataGridView1.Location = new System.Drawing.Point(10, 80);
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;
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.RowHeadersDefaultCellStyle = dataGridViewCellStyle7;
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.RowHeadersWidth = 21;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle4;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle8;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
this.dataGridView1.Size = new System.Drawing.Size(1206, 371);
this.dataGridView1.TabIndex = 8;
//
// Column1
//
this.Column1.HeaderText = "주";
this.Column1.Name = "Column1";
this.Column1.Width = 35;
//
// num
//
this.num.HeaderText = "번호";
this.num.Name = "num";
this.num.Width = 60;
//
// book_name
//
this.book_name.HeaderText = "도서명";
this.book_name.Name = "book_name";
this.book_name.Width = 238;
//
// author
//
this.author.HeaderText = "저자";
this.author.Name = "author";
//
// book_comp
//
this.book_comp.HeaderText = "출판사";
this.book_comp.Name = "book_comp";
//
// count
//
this.count.HeaderText = "수량";
this.count.Name = "count";
this.count.Width = 60;
//
// pay
//
this.pay.HeaderText = "단가";
this.pay.Name = "pay";
this.pay.Width = 80;
//
// total
//
this.total.HeaderText = "합계";
this.total.Name = "total";
this.total.Width = 80;
//
// stat
//
this.stat.HeaderText = "상태";
this.stat.Name = "stat";
//
// etc
//
this.etc.HeaderText = "비고";
this.etc.Name = "etc";
this.etc.Width = 130;
//
// gubun
//
this.gubun.HeaderText = "구분";
this.gubun.Name = "gubun";
//
// order
//
this.order.HeaderText = "주문처";
this.order.Name = "order";
//
// Column2
//
this.Column2.HeaderText = "입고";
this.Column2.Name = "Column2";
this.Column2.Visible = false;
this.Column2.Width = 50;
//
// Column3
//
this.Column3.HeaderText = "출고";
this.Column3.Name = "Column3";
this.Column3.Visible = false;
this.Column3.Width = 30;
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
//
// panel4
//
@@ -511,6 +434,97 @@
this.printPreviewDialog1.Name = "printPreviewDialog1";
this.printPreviewDialog1.Visible = false;
//
// idx
//
this.idx.HeaderText = "idx";
this.idx.MinimumWidth = 2;
this.idx.Name = "idx";
this.idx.Visible = false;
this.idx.Width = 2;
//
// Column1
//
this.Column1.HeaderText = "주";
this.Column1.Name = "Column1";
this.Column1.Width = 35;
//
// num
//
this.num.HeaderText = "번호";
this.num.Name = "num";
this.num.Width = 60;
//
// book_name
//
this.book_name.HeaderText = "도서명";
this.book_name.Name = "book_name";
this.book_name.Width = 238;
//
// author
//
this.author.HeaderText = "저자";
this.author.Name = "author";
//
// book_comp
//
this.book_comp.HeaderText = "출판사";
this.book_comp.Name = "book_comp";
//
// count
//
this.count.HeaderText = "수량";
this.count.Name = "count";
this.count.Width = 60;
//
// pay
//
this.pay.HeaderText = "단가";
this.pay.Name = "pay";
this.pay.Width = 80;
//
// total
//
this.total.HeaderText = "합계";
this.total.Name = "total";
this.total.Width = 80;
//
// stat
//
this.stat.HeaderText = "상태";
this.stat.Name = "stat";
//
// etc
//
this.etc.HeaderText = "비고";
this.etc.Name = "etc";
this.etc.Width = 130;
//
// gubun
//
this.gubun.HeaderText = "구분";
this.gubun.Name = "gubun";
//
// order
//
this.order.HeaderText = "주문처";
this.order.Name = "order";
//
// Column2
//
this.Column2.HeaderText = "입고";
this.Column2.MinimumWidth = 2;
this.Column2.Name = "Column2";
this.Column2.Visible = false;
this.Column2.Width = 2;
//
// Column3
//
this.Column3.HeaderText = "출고";
this.Column3.MinimumWidth = 2;
this.Column3.Name = "Column3";
this.Column3.Visible = false;
this.Column3.Width = 2;
//
// List_Lookup
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -574,6 +588,7 @@
private System.Windows.Forms.PrintDialog printDialog1;
private System.Drawing.Printing.PrintDocument printDocument1;
private System.Windows.Forms.PrintPreviewDialog printPreviewDialog1;
private System.Windows.Forms.DataGridViewTextBoxColumn idx;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn num;
private System.Windows.Forms.DataGridViewTextBoxColumn book_name;

View File

@@ -19,6 +19,7 @@ namespace WindowsFormsApp1.Delivery
Main main;
string form_call;
public string call_base;
public int grididx;
public string compidx;
public List_Lookup()
{
@@ -69,9 +70,9 @@ namespace WindowsFormsApp1.Delivery
ps.ToPage = 13;
// 여백 설정
printDocument1.DefaultPageSettings.Margins.Top = 10;
printDocument1.DefaultPageSettings.Margins.Left = 10;
printDocument1.DefaultPageSettings.Margins.Right = 10;
printDocument1.DefaultPageSettings.Margins.Top = 10;
printDocument1.DefaultPageSettings.Margins.Bottom = 10;
// 용지 방향
@@ -93,6 +94,9 @@ namespace WindowsFormsApp1.Delivery
}
private void printDocument1_PrintPage(object sender, PrintPageEventArgs e)
{
if (dataGridView1.Rows.Count < 1) {
MessageBox.Show("인쇄할 목록이 없습니다!");
return; }
int dialogWidth = 528; // 페이지 전체 넓이
StringFormat sf = new StringFormat();
@@ -174,6 +178,7 @@ namespace WindowsFormsApp1.Delivery
// 조회 기능
mk_grid();
res_total();
Column_Text_Color();
}
private void res_total()
{
@@ -258,19 +263,19 @@ namespace WindowsFormsApp1.Delivery
{
dataGridView1.Rows.Clear();
string list = cb_list_name.Text;
string area = "`header`, `num`, `book_name`, `author`, `book_comp`, " +
string area = "`idx`, `header`, `num`, `book_name`, `author`, `book_comp`, " +
"`count`, `pay`, `total`, `stat`, `etc`, " +
"`list_name`, `order`, `import`, `export`";
string tmp_data = db.DB_Select_Search(area, "Obj_List_Book", "compidx", compidx);
string[] data = tmp_data.Split('|');
string[] mkgrid = { "", "", "", "", "",
"", "", "", "", "",
"", "", "", "" };
int num = 14;
"", "", "", "", "" };
int num = 15;
for(int a = 0; a < data.Length; a++) {
if (a % num == 0) { mkgrid[1] = data[a] + " "; }
if (a % num == 1) { mkgrid[1] += data[a]; }
if (a % num == 2) { mkgrid[2] = data[a]; }
if (a % num == 0) { mkgrid[0] = data[a]; }
if (a % num == 1) { mkgrid[2] = data[a] + " "; }
if (a % num == 2) { mkgrid[2] += data[a]; }
if (a % num == 3) { mkgrid[3] = data[a]; }
if (a % num == 4) { mkgrid[4] = data[a]; }
if (a % num == 5) { mkgrid[5] = data[a]; }
@@ -281,13 +286,30 @@ namespace WindowsFormsApp1.Delivery
if (a % num == 10) { mkgrid[10] = data[a]; }
if (a % num == 11) { mkgrid[11] = data[a]; }
if (a % num == 12) { mkgrid[12] = data[a]; }
if (a % num == 13) { mkgrid[13] = data[a];
if (filter(mkgrid) == true) {
if (a % num == 13) { mkgrid[13] = data[a]; }
if (a % num == 14) { mkgrid[14] = data[a];
if (filter(mkgrid)) {
dataGridView1.Rows.Add(mkgrid);
}
}
}
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
Book_Lookup bl = new Book_Lookup(this);
bl.TopMost = true;
bl.Lookup_Load_tmp(dataGridView1.Rows[e.RowIndex].Cells["idx"].Value.ToString());
bl.Show();
}
private void tb_search_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
btn_lookup_Click(null, null);
}
}
private bool filter(string[] array)
{
/* 주 | 번호 | 도서명 | 저자 | 출판사
@@ -295,37 +317,49 @@ namespace WindowsFormsApp1.Delivery
* 구분 | 주문처 | 입고상태 | 출고상태 */
if (tb_search.Text != "") {
if (cb_search.SelectedIndex == 0) {
if (array[2].Contains(tb_search.Text) == false) {
if (array[3].Contains(tb_search.Text) == false) {
return false;
}
}
else if (cb_search.SelectedIndex == 1) {
if (array[4].Contains(tb_search.Text) == false) {
if (array[5].Contains(tb_search.Text) == false) {
return false;
}
}
}
if (tb_order.Text != "") {
if (array[11].Contains(tb_order.Text) == false) {
if (array[12].Contains(tb_order.Text) == false) {
return false;
}
}
if (cb_list_name.SelectedIndex != 0) {
if (array[10].Contains(cb_list_name.Text) == false){
if (array[11].Contains(cb_list_name.Text) == false){
return false;
}
}
if (cb_import.SelectedIndex != 0) {
if (array[12].Contains(cb_import.Text) == false) {
if (array[13] != cb_import.Text) {
return false;
}
}
if (cb_export.SelectedIndex != 0) {
if (array[13].Contains(cb_export.Text) == false) {
if (array[14] != cb_export.Text) {
return false;
}
}
return true;
}
void Column_Text_Color()
{
for(int a = 0; a < dataGridView1.Rows.Count; a++)
{
if (dataGridView1.Rows[a].Cells["Column2"].Value.ToString() == "입고") {
dataGridView1.Rows[a].DefaultCellStyle.ForeColor = Color.Blue;
}
else if (dataGridView1.Rows[a].Cells["Column2"].Value.ToString() == "미입고") {
dataGridView1.Rows[a].DefaultCellStyle.ForeColor = Color.Red;
}
}
}
}
}

View File

@@ -117,6 +117,9 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="idx.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@@ -28,7 +28,7 @@
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(List_aggregation));
this.btn_lookup = new System.Windows.Forms.Button();
this.btn_save = new System.Windows.Forms.Button();
@@ -39,23 +39,6 @@
this.tb_dlv = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column10 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.chk_label = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Chk_Column = new System.Windows.Forms.DataGridViewCheckBoxColumn();
this.label5 = new System.Windows.Forms.Label();
this.combo_user = new System.Windows.Forms.ComboBox();
this.btn_process = new System.Windows.Forms.Button();
@@ -106,6 +89,23 @@
this.printPreviewDialog1 = new System.Windows.Forms.PrintPreviewDialog();
this.pageSetupDialog1 = new System.Windows.Forms.PageSetupDialog();
this.printDocument1 = new System.Drawing.Printing.PrintDocument();
this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.list_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.date_res = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.charge = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.work_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.work_way = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.send_way = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.total = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.stock_money = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column11 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column12 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column13 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column18 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column20 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.chk_label = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Chk_Column = new System.Windows.Forms.DataGridViewCheckBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.SuspendLayout();
@@ -164,6 +164,7 @@
this.tb_clt.Name = "tb_clt";
this.tb_clt.Size = new System.Drawing.Size(126, 21);
this.tb_clt.TabIndex = 7;
this.tb_clt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_clt_KeyDown);
//
// tb_dlv
//
@@ -187,25 +188,25 @@
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
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.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle4.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column1,
this.Column2,
this.Column5,
this.Column3,
this.Column4,
this.Column6,
this.Column7,
this.Column8,
this.Column9,
this.Column10,
this.list_name,
this.list_date,
this.date_res,
this.charge,
this.work_name,
this.work_way,
this.send_way,
this.total,
this.stock_money,
this.count,
this.Column11,
this.Column12,
this.Column13,
@@ -218,116 +219,12 @@
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 20;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(911, 447);
this.dataGridView1.Size = new System.Drawing.Size(984, 595);
this.dataGridView1.TabIndex = 0;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
//
// Column1
//
this.Column1.HeaderText = "목록명";
this.Column1.Name = "Column1";
this.Column1.Width = 150;
//
// Column2
//
this.Column2.HeaderText = "목록일자";
this.Column2.Name = "Column2";
this.Column2.Width = 70;
//
// Column5
//
this.Column5.HeaderText = "완료일자";
this.Column5.Name = "Column5";
this.Column5.Width = 70;
//
// Column3
//
this.Column3.HeaderText = "담당자";
this.Column3.Name = "Column3";
this.Column3.Width = 50;
//
// Column4
//
this.Column4.HeaderText = "작업명";
this.Column4.Name = "Column4";
this.Column4.Visible = false;
this.Column4.Width = 150;
//
// Column6
//
this.Column6.HeaderText = "작업방법";
this.Column6.Name = "Column6";
this.Column6.Visible = false;
//
// Column7
//
this.Column7.HeaderText = "배송방법";
this.Column7.Name = "Column7";
this.Column7.Visible = false;
//
// Column8
//
this.Column8.HeaderText = "합계금액";
this.Column8.Name = "Column8";
this.Column8.Width = 90;
//
// Column9
//
this.Column9.HeaderText = "입고금액";
this.Column9.Name = "Column9";
this.Column9.Width = 90;
//
// Column10
//
this.Column10.HeaderText = "수량";
this.Column10.Name = "Column10";
this.Column10.Width = 40;
//
// Column11
//
this.Column11.HeaderText = "입고";
this.Column11.Name = "Column11";
this.Column11.Width = 50;
//
// Column12
//
this.Column12.HeaderText = "미입고";
this.Column12.Name = "Column12";
this.Column12.Width = 50;
//
// Column13
//
this.Column13.HeaderText = "입고율";
this.Column13.Name = "Column13";
this.Column13.Width = 50;
//
// Column18
//
this.Column18.HeaderText = "택배";
this.Column18.Name = "Column18";
this.Column18.Width = 50;
//
// Column20
//
this.Column20.HeaderText = "목록번호";
this.Column20.Name = "Column20";
this.Column20.Width = 70;
//
// chk_label
//
this.chk_label.HeaderText = "라벨";
this.chk_label.Name = "chk_label";
this.chk_label.Visible = false;
//
// Chk_Column
//
this.Chk_Column.HeaderText = "체크";
this.Chk_Column.Name = "Chk_Column";
this.Chk_Column.Visible = false;
this.Chk_Column.Width = 40;
//
// label5
//
this.label5.AutoSize = true;
@@ -348,7 +245,7 @@
//
// btn_process
//
this.btn_process.Location = new System.Drawing.Point(308, 6);
this.btn_process.Location = new System.Drawing.Point(308, 5);
this.btn_process.Name = "btn_process";
this.btn_process.Size = new System.Drawing.Size(65, 23);
this.btn_process.TabIndex = 4;
@@ -358,7 +255,7 @@
//
// btn_ISBN
//
this.btn_ISBN.Location = new System.Drawing.Point(166, 6);
this.btn_ISBN.Location = new System.Drawing.Point(166, 5);
this.btn_ISBN.Name = "btn_ISBN";
this.btn_ISBN.Size = new System.Drawing.Size(65, 23);
this.btn_ISBN.TabIndex = 2;
@@ -369,7 +266,7 @@
// btn_date
//
this.btn_date.Enabled = false;
this.btn_date.Location = new System.Drawing.Point(237, 6);
this.btn_date.Location = new System.Drawing.Point(237, 5);
this.btn_date.Name = "btn_date";
this.btn_date.Size = new System.Drawing.Size(65, 23);
this.btn_date.TabIndex = 3;
@@ -379,7 +276,7 @@
//
// btn_checkup
//
this.btn_checkup.Location = new System.Drawing.Point(95, 6);
this.btn_checkup.Location = new System.Drawing.Point(95, 5);
this.btn_checkup.Name = "btn_checkup";
this.btn_checkup.Size = new System.Drawing.Size(65, 23);
this.btn_checkup.TabIndex = 1;
@@ -462,7 +359,7 @@
this.panel1.Controls.Add(this.btn_process);
this.panel1.Location = new System.Drawing.Point(1002, 5);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(385, 478);
this.panel1.Size = new System.Drawing.Size(385, 366);
this.panel1.TabIndex = 14;
//
// label20
@@ -809,7 +706,7 @@
//
// btn_apply
//
this.btn_apply.Location = new System.Drawing.Point(24, 6);
this.btn_apply.Location = new System.Drawing.Point(24, 5);
this.btn_apply.Name = "btn_apply";
this.btn_apply.Size = new System.Drawing.Size(65, 23);
this.btn_apply.TabIndex = 0;
@@ -831,11 +728,115 @@
//
this.printDocument1.PrintPage += new System.Drawing.Printing.PrintPageEventHandler(this.printDocument1_PrintPage);
//
// list_name
//
this.list_name.HeaderText = "목록명";
this.list_name.Name = "list_name";
this.list_name.Width = 230;
//
// list_date
//
this.list_date.HeaderText = "목록일자";
this.list_date.Name = "list_date";
this.list_date.Width = 80;
//
// date_res
//
this.date_res.HeaderText = "완료일자";
this.date_res.Name = "date_res";
this.date_res.Width = 80;
//
// charge
//
this.charge.HeaderText = "담당자";
this.charge.Name = "charge";
this.charge.Width = 50;
//
// work_name
//
this.work_name.HeaderText = "작업명";
this.work_name.Name = "work_name";
this.work_name.Visible = false;
this.work_name.Width = 150;
//
// work_way
//
this.work_way.HeaderText = "작업방법";
this.work_way.Name = "work_way";
this.work_way.Visible = false;
//
// send_way
//
this.send_way.HeaderText = "배송방법";
this.send_way.Name = "send_way";
this.send_way.Visible = false;
//
// total
//
this.total.HeaderText = "합계금액";
this.total.Name = "total";
this.total.Width = 90;
//
// stock_money
//
this.stock_money.HeaderText = "입고금액";
this.stock_money.Name = "stock_money";
this.stock_money.Width = 90;
//
// count
//
this.count.HeaderText = "수량";
this.count.Name = "count";
this.count.Width = 50;
//
// Column11
//
this.Column11.HeaderText = "입고";
this.Column11.Name = "Column11";
this.Column11.Width = 50;
//
// Column12
//
this.Column12.HeaderText = "미입고";
this.Column12.Name = "Column12";
this.Column12.Width = 50;
//
// Column13
//
this.Column13.HeaderText = "입고율";
this.Column13.Name = "Column13";
this.Column13.Width = 50;
//
// Column18
//
this.Column18.HeaderText = "택배";
this.Column18.Name = "Column18";
this.Column18.Width = 50;
//
// Column20
//
this.Column20.HeaderText = "목록번호";
this.Column20.Name = "Column20";
this.Column20.Width = 70;
//
// chk_label
//
this.chk_label.HeaderText = "라벨";
this.chk_label.Name = "chk_label";
this.chk_label.Visible = false;
//
// Chk_Column
//
this.Chk_Column.HeaderText = "체크";
this.Chk_Column.Name = "Chk_Column";
this.Chk_Column.Visible = false;
this.Chk_Column.Width = 40;
//
// List_aggregation
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1395, 615);
this.ClientSize = new System.Drawing.Size(1395, 670);
this.Controls.Add(this.panel1);
this.Controls.Add(this.btn_close);
this.Controls.Add(this.dataGridView1);
@@ -869,7 +870,6 @@
private System.Windows.Forms.Label label1;
private System.Windows.Forms.ComboBox combo_state;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tb_clt;
private System.Windows.Forms.TextBox tb_dlv;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.DataGridView dataGridView1;
@@ -923,16 +923,20 @@
private System.Windows.Forms.Label lbl_send_y;
private System.Windows.Forms.Label lbl_unstock_count;
private System.Windows.Forms.Button btn_apply;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column5;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
private System.Windows.Forms.DataGridViewTextBoxColumn Column6;
private System.Windows.Forms.DataGridViewTextBoxColumn Column7;
private System.Windows.Forms.DataGridViewTextBoxColumn Column8;
private System.Windows.Forms.DataGridViewTextBoxColumn Column9;
private System.Windows.Forms.DataGridViewTextBoxColumn Column10;
private System.Windows.Forms.DataGridViewTextBoxColumn list_name;
private System.Windows.Forms.DataGridViewTextBoxColumn list_date;
private System.Windows.Forms.DataGridViewTextBoxColumn date_res;
private System.Windows.Forms.DataGridViewTextBoxColumn charge;
private System.Windows.Forms.DataGridViewTextBoxColumn work_name;
private System.Windows.Forms.DataGridViewTextBoxColumn work_way;
private System.Windows.Forms.DataGridViewTextBoxColumn send_way;
private System.Windows.Forms.DataGridViewTextBoxColumn total;
private System.Windows.Forms.DataGridViewTextBoxColumn stock_money;
private System.Windows.Forms.DataGridViewTextBoxColumn count;
private System.Windows.Forms.DataGridViewTextBoxColumn Column11;
private System.Windows.Forms.DataGridViewTextBoxColumn Column12;
private System.Windows.Forms.DataGridViewTextBoxColumn Column13;
@@ -940,5 +944,6 @@
private System.Windows.Forms.DataGridViewTextBoxColumn Column20;
private System.Windows.Forms.DataGridViewTextBoxColumn chk_label;
private System.Windows.Forms.DataGridViewCheckBoxColumn Chk_Column;
public System.Windows.Forms.TextBox tb_clt;
}
}

View File

@@ -61,7 +61,7 @@ namespace WindowsFormsApp1.Delivery
combo_user.Items.Add(user_name[a]);
}
combo_user.SelectedIndex = 0;
/*
string searchdb = "`list_name`, `date`, `date_res`, `charge`, `work_name`, " +
"`work_way`, `send_way`, `total`, `stock_money`, `vol`, " +
"`stock`, `unstock`, `list_num`, `chk_marc`";
@@ -70,7 +70,7 @@ namespace WindowsFormsApp1.Delivery
db_tmp = db.More_DB_Search("Obj_List", searchdb1, searchdb2, searchdb);
Made_Grid(db_tmp);
dataGridView1.Focus();
infor_Update(0);
infor_Update(0);*/
}
/// <summary>
/// 표에 값을 채우는 함수.
@@ -108,27 +108,67 @@ namespace WindowsFormsApp1.Delivery
if (a % 14 == 10) { grid[10] = db_data[a]; }
if (a % 14 == 11) { grid[11] = db_data[a]; }
if (a % 14 == 12) { grid[14] = db_data[a]; }
if (a % 14 == 13) { grid[15] = db_data[a]; dataGridView1.Rows.Add(grid); }
if (a % 14 == 13) {
grid[15] = db_data[a];
if (Grid_filter(grid)) {
dataGridView1.Rows.Add(grid);
}
}
}
GridColorChange();
}
private bool Grid_filter(string[] arr)
{
String_Text st = new String_Text();
string db_clt = st.GetMiddelString(arr[0], "[", "]");
string cb_year = combo_year.SelectedItem.ToString();
string db_year = arr[1].Substring(0, 4);
if (combo_state.SelectedIndex == 1) {
if (cb_year != db_year) {
MessageBox.Show("연도 컷");
return false;
}
}
if (combo_user.SelectedIndex != 0) {
if (combo_user.SelectedItem.ToString() != arr[3]) {
MessageBox.Show("사용자 컷");
return false;
}
}
if (tb_clt.Text != "") {
if(tb_clt.Text == db_clt) {
return true;
}
MessageBox.Show("거래처 컷");
return false;
}
return true;
}
private void btn_lookup_Click(object sender, EventArgs e) // 조회
{
string cmd = "SELECT `list_name`, `date`, `date_res`, `charge`, `work_name`, " +
/// 목록명 / 목록일자 / 완료일자 / 담당자 / 작업명
/// 작업방법 / 배송방법 / 합계금액 / 입고금액 / 수량
/// 입고 / 미입고 / 목록번호 / 마크여부
string searchdb = "`list_name`, `date`, `date_res`, `charge`, `work_name`, " +
"`work_way`, `send_way`, `total`, `stock_money`, `vol`, " +
"`stock`, `unstock`, `list_num`, `chk_label` " +
"FROM Obj_List WHERE `comp_num` = '" + main.com_idx + "'";
if(combo_state.Text == "진행") { cmd += " AND `state` = '진행'"; }
if(combo_state.Text == "완료") {
cmd += " AND `state` = '완료'";
// TODO: 연도 적용
"`stock`, `unstock`, `list_num`, `chk_marc`";
List<string> search_L_tbl = new List<string>();
List<string> search_L_col = new List<string>();
search_L_tbl.Add("comp_num");
search_L_col.Add(compidx);
if (combo_state.SelectedItem.ToString() != "전체") {
search_L_tbl.Add("state");
search_L_col.Add(combo_state.SelectedItem.ToString());
}
if(combo_user.Text != "전체") { cmd += " AND `charge` = '" + combo_user.Text + "'"; }
if(tb_clt.Text != "") { cmd += " AND `clt` LIKE'%" + tb_clt.Text + "%'"; }
if(tb_dlv.Text != "") { cmd += " AND `dly` LIKE'%" + tb_dlv.Text + "%'"; }
cmd += ";";
string tmp = db.self_Made_Cmd(cmd);
Made_Grid(tmp);
string[] searchdb1 = search_L_tbl.ToArray();
string[] searchdb2 = search_L_col.ToArray();
db_tmp = db.More_DB_Search("Obj_List", searchdb1, searchdb2, searchdb);
Made_Grid(db_tmp);
dataGridView1.Focus();
}
private void btn_save_Click(object sender, EventArgs e) // 저장
{
@@ -138,18 +178,18 @@ namespace WindowsFormsApp1.Delivery
string edit1, edit2, edit3;
for (int a = 0; a < dataGridView1.Rows.Count; a++)
{
if(dataGridView1.Rows[a].Cells["Column4"].Value.ToString() == null) { edit1 = ""; }
else { edit1 = dataGridView1.Rows[a].Cells["Column4"].Value.ToString(); }
if(dataGridView1.Rows[a].Cells["work_name"].Value.ToString() == null) { edit1 = ""; }
else { edit1 = dataGridView1.Rows[a].Cells["work_name"].Value.ToString(); }
if(dataGridView1.Rows[a].Cells["Column6"].Value.ToString() == null) { edit2 = ""; }
else { edit2 = dataGridView1.Rows[a].Cells["Column6"].Value.ToString(); }
if(dataGridView1.Rows[a].Cells["work_way"].Value.ToString() == null) { edit2 = ""; }
else { edit2 = dataGridView1.Rows[a].Cells["work_way"].Value.ToString(); }
if(dataGridView1.Rows[a].Cells["Column7"].Value.ToString() == null) { edit3 = ""; }
else { edit3 = dataGridView1.Rows[a].Cells["Column7"].Value.ToString(); }
if(dataGridView1.Rows[a].Cells["send_way"].Value.ToString() == null) { edit3 = ""; }
else { edit3 = dataGridView1.Rows[a].Cells["send_way"].Value.ToString(); }
string[] Edit_Data = { edit1, edit2, edit3 };
string[] Search_Data = {dataGridView1.Rows[a].Cells["Column1"].Value.ToString(),
dataGridView1.Rows[a].Cells["Column8"].Value.ToString()};
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);
}
}
@@ -167,8 +207,8 @@ namespace WindowsFormsApp1.Delivery
if (isChecked)
{
if (cout == 0) { EditNumber = a; cout++; }
string[] Search_Data = { dataGridView1.Rows[a].Cells["Column1"].Value.ToString(),
dataGridView1.Rows[a].Cells["Column8"].Value.ToString()};
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);
}
}
@@ -269,16 +309,16 @@ namespace WindowsFormsApp1.Delivery
}
private void btn_apply_Click(object sender, EventArgs e)
{
dataGridView1.Rows[row].Cells["Column1"].Value = tb_list_name.Text;
dataGridView1.Rows[row].Cells["Column2"].Value = tb_date.Text;
dataGridView1.Rows[row].Cells["Column5"].Value = tb_date_res.Text;
dataGridView1.Rows[row].Cells["Column3"].Value = tb_charge.Text;
dataGridView1.Rows[row].Cells["Column4"].Value = tb_work_name.Text;
dataGridView1.Rows[row].Cells["Column6"].Value = tb_work_way.Text;
dataGridView1.Rows[row].Cells["Column7"].Value = tb_send_way.Text;
dataGridView1.Rows[row].Cells["Column8"].Value = tb_total.Text;
dataGridView1.Rows[row].Cells["Column9"].Value = tb_stock.Text;
dataGridView1.Rows[row].Cells["Column10"].Value = tb_count.Text;
dataGridView1.Rows[row].Cells["list_name"].Value = tb_list_name.Text;
dataGridView1.Rows[row].Cells["list_date"].Value = tb_date.Text;
dataGridView1.Rows[row].Cells["date_res"].Value = tb_date_res.Text;
dataGridView1.Rows[row].Cells["charge"].Value = tb_charge.Text;
dataGridView1.Rows[row].Cells["work_name"].Value = tb_work_name.Text;
dataGridView1.Rows[row].Cells["work_way"].Value = tb_work_way.Text;
dataGridView1.Rows[row].Cells["send_way"].Value = tb_send_way.Text;
dataGridView1.Rows[row].Cells["total"].Value = tb_total.Text;
dataGridView1.Rows[row].Cells["stock_money"].Value = tb_stock.Text;
dataGridView1.Rows[row].Cells["count"].Value = tb_count.Text;
dataGridView1.Rows[row].Cells["Column13"].Value = tb_stock_per.Text;
dataGridView1.Rows[row].Cells["Column11"].Value = lbl_stock_count.Text;
dataGridView1.Rows[row].Cells["Column12"].Value = lbl_unstock_count.Text;
@@ -301,11 +341,10 @@ namespace WindowsFormsApp1.Delivery
{
List_Chk_Work chk_work = new List_Chk_Work(this);
chk_work.TopMost = true;
chk_work.data[0] = dataGridView1.Rows[EditNumber].Cells["Column1"].Value.ToString();
chk_work.data[0] = dataGridView1.Rows[EditNumber].Cells["list_name"].Value.ToString();
chk_work.data[1] = compidx;
chk_work.Show();
}
}
private void btn_ISBN_Click(object sender, EventArgs e) // ISBN조회
{
@@ -320,6 +359,15 @@ namespace WindowsFormsApp1.Delivery
//////////////////////////////////////////////////////////////////////////////////////
private void tb_clt_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter)
{
Commodity_Search sea = new Commodity_Search(this);
sea.Clinet_name = tb_clt.Text;
sea.Show();
}
}
private void combo_state_SelectedIndexChanged(object sender, EventArgs e)
{
if(combo_state.Text == "진행")
@@ -395,35 +443,35 @@ namespace WindowsFormsApp1.Delivery
row = rowidx;
infor_reset();
// 목록명
tb_list_name.Text = dataGridView1.Rows[rowidx].Cells["Column1"].Value.ToString();
tb_list_name.Text = dataGridView1.Rows[rowidx].Cells["list_name"].Value.ToString();
// 목록일자
tb_date.Text = dataGridView1.Rows[rowidx].Cells["Column2"].Value.ToString().Substring(0,10);
tb_date.Text = dataGridView1.Rows[rowidx].Cells["list_date"].Value.ToString().Substring(0,10);
// 완료일자
if (dataGridView1.Rows[rowidx].Cells["Column5"].Value.ToString().Length < 3) {
if (dataGridView1.Rows[rowidx].Cells["date_res"].Value.ToString().Length < 3) {
tb_date_res.Text = "";
}
else {
tb_date_res.Text = dataGridView1.Rows[rowidx].Cells["Column5"].Value.ToString().Substring(0, 10);
tb_date_res.Text = dataGridView1.Rows[rowidx].Cells["date_res"].Value.ToString().Substring(0, 10);
}
// 담당자
tb_charge.Text = dataGridView1.Rows[rowidx].Cells["Column3"].Value.ToString();
tb_charge.Text = dataGridView1.Rows[rowidx].Cells["charge"].Value.ToString();
// 작업명
tb_work_name.Text = dataGridView1.Rows[rowidx].Cells["Column4"].Value.ToString();
tb_work_name.Text = dataGridView1.Rows[rowidx].Cells["work_name"].Value.ToString();
// 작업방법
tb_work_way.Text = dataGridView1.Rows[rowidx].Cells["Column6"].Value.ToString();
tb_work_way.Text = dataGridView1.Rows[rowidx].Cells["work_way"].Value.ToString();
// 배송방법
tb_send_way.Text = dataGridView1.Rows[rowidx].Cells["Column7"].Value.ToString();
tb_send_way.Text = dataGridView1.Rows[rowidx].Cells["send_way"].Value.ToString();
// 합계금액
tb_total.Text = dataGridView1.Rows[rowidx].Cells["Column8"].Value.ToString();
tb_total.Text = dataGridView1.Rows[rowidx].Cells["total"].Value.ToString();
// 입고금액
tb_stock.Text = dataGridView1.Rows[rowidx].Cells["Column9"].Value.ToString();
tb_stock.Text = dataGridView1.Rows[rowidx].Cells["stock_money"].Value.ToString();
// 수량
tb_count.Text = dataGridView1.Rows[rowidx].Cells["Column10"].Value.ToString();
// 입고율
tb_stock_per.Text = dataGridView1.Rows[rowidx].Cells["Column13"].Value.ToString();
tb_count.Text = dataGridView1.Rows[rowidx].Cells["count"].Value.ToString();
// 입고 / 미입고
lbl_stock_count.Text = dataGridView1.Rows[rowidx].Cells["Column11"].Value.ToString();
lbl_unstock_count.Text = dataGridView1.Rows[rowidx].Cells["Column12"].Value.ToString();
// 입고율
tb_stock_per.Text = dataGridView1.Rows[rowidx].Cells["Column13"].Value.ToString();
// 목록번호
tb_list_num.Text = dataGridView1.Rows[rowidx].Cells["Column20"].Value.ToString();
// 택배여부
@@ -449,7 +497,7 @@ namespace WindowsFormsApp1.Delivery
e.ColumnIndex != 6 || e.ColumnIndex != 15)
{
List_Lookup list_l = new List_Lookup(this);
list_l.call_base = dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value.ToString();
list_l.call_base = dataGridView1.Rows[e.RowIndex].Cells["list_name"].Value.ToString();
list_l.MdiParent = main;
list_l.WindowState = FormWindowState.Maximized;
list_l.Show();
@@ -482,5 +530,6 @@ namespace WindowsFormsApp1.Delivery
lbl_send_n.Font = new Font(this.Font, FontStyle.Bold);
}
}
}
}

View File

@@ -117,34 +117,34 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Column1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="list_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="list_date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column5.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="date_res.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column3.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="charge.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column4.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="work_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column6.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="work_way.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column7.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="send_way.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column8.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column9.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="stock_money.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column10.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<metadata name="count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Column11.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -169,7 +169,7 @@
<value>True</value>
</metadata>
<metadata name="printPreviewDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
<value>5, 3</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="printPreviewDialog1.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
@@ -346,9 +346,12 @@
</value>
</data>
<metadata name="pageSetupDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>181, 17</value>
<value>169, 3</value>
</metadata>
<metadata name="printDocument1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>336, 17</value>
<value>324, 3</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>28</value>
</metadata>
</root>