=====* 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:
SeungHo Yang
2021-05-18 18:32:45 +09:00
parent ebe3c58ed1
commit bf3409ec90
30 changed files with 1761 additions and 408 deletions

View File

@@ -354,7 +354,7 @@ namespace WindowsFormsApp1
Sales_Input Acc_sales_Input; Sales_Input Acc_sales_Input;
Sales_In_Pay Acc_sales_In_Pay; Sales_In_Pay Acc_sales_In_Pay;
Sales_Deposit Acc_sales_Deposit; Sales_Deposit Acc_sales_Deposit;
Sales_Book Acc_sales_Book; Sales_Lookup Acc_sales_Book;
Sales_Not_Pay Acc_sales_Not_Pay; Sales_Not_Pay Acc_sales_Not_Pay;
Bill_manage Acc_bill_Manage; Bill_manage Acc_bill_Manage;
@@ -489,7 +489,7 @@ namespace WindowsFormsApp1
} }
else else
{ {
Acc_sales_Book = new Sales_Book(this); Acc_sales_Book = new Sales_Lookup(this);
Acc_sales_Book.MdiParent = this; Acc_sales_Book.MdiParent = this;
Acc_sales_Book.WindowState = FormWindowState.Maximized; Acc_sales_Book.WindowState = FormWindowState.Maximized;
Acc_sales_Book.FormClosed += (o, ea) => Acc_sales_Book = null; Acc_sales_Book.FormClosed += (o, ea) => Acc_sales_Book = null;

View File

@@ -175,11 +175,11 @@
<Compile Include="회계\Remit_reg2.Designer.cs"> <Compile Include="회계\Remit_reg2.Designer.cs">
<DependentUpon>Remit_reg2.cs</DependentUpon> <DependentUpon>Remit_reg2.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="회계\Sales_Book.cs"> <Compile Include="회계\Sales_Lookup.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="회계\Sales_Book.Designer.cs"> <Compile Include="회계\Sales_Lookup.Designer.cs">
<DependentUpon>Sales_Book.cs</DependentUpon> <DependentUpon>Sales_Lookup.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="회계\Sales_Deposit.cs"> <Compile Include="회계\Sales_Deposit.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
@@ -187,6 +187,12 @@
<Compile Include="회계\Sales_Deposit.Designer.cs"> <Compile Include="회계\Sales_Deposit.Designer.cs">
<DependentUpon>Sales_Deposit.cs</DependentUpon> <DependentUpon>Sales_Deposit.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="회계\Sales_Detail.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="회계\Sales_Detail.Designer.cs">
<DependentUpon>Sales_Detail.cs</DependentUpon>
</Compile>
<Compile Include="회계\Sales_Input.cs"> <Compile Include="회계\Sales_Input.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -217,6 +223,12 @@
<Compile Include="회계\Sales_In_Pay.Designer.cs"> <Compile Include="회계\Sales_In_Pay.Designer.cs">
<DependentUpon>Sales_In_Pay.cs</DependentUpon> <DependentUpon>Sales_In_Pay.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="회계\Sales_Book.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="회계\Sales_Book.Designer.cs">
<DependentUpon>Sales_Book.cs</DependentUpon>
</Compile>
<Compile Include="회계\Sales_Not_Pay.cs"> <Compile Include="회계\Sales_Not_Pay.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -642,9 +654,15 @@
<EmbeddedResource Include="회계\Sales_Book.resx"> <EmbeddedResource Include="회계\Sales_Book.resx">
<DependentUpon>Sales_Book.cs</DependentUpon> <DependentUpon>Sales_Book.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="회계\Sales_Lookup.resx">
<DependentUpon>Sales_Lookup.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="회계\Sales_Deposit.resx"> <EmbeddedResource Include="회계\Sales_Deposit.resx">
<DependentUpon>Sales_Deposit.cs</DependentUpon> <DependentUpon>Sales_Deposit.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="회계\Sales_Detail.resx">
<DependentUpon>Sales_Detail.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="회계\Sales_Input.resx"> <EmbeddedResource Include="회계\Sales_Input.resx">
<DependentUpon>Sales_Input.cs</DependentUpon> <DependentUpon>Sales_Input.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>

View File

@@ -1 +1 @@
bb86ab82b0cfd7ad35e01e13af8660f9dfc7ed7d db654643300821df445d8447c6a7bd62a35b6c7d

View File

@@ -297,7 +297,6 @@ C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\Window
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Purchase_Book.resources C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Purchase_Book.resources
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Purchase_Input.resources C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Purchase_Input.resources
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Remit_reg2.resources C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Remit_reg2.resources
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Sales_Book.resources
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Sales_Deposit.resources C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Sales_Deposit.resources
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Sales_Input.resources C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Sales_Input.resources
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Purchase_not_pay.resources C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Purchase_not_pay.resources
@@ -378,3 +377,6 @@ C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\Window
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csprojAssemblyReference.cache C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.csprojAssemblyReference.cache
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.납품관리.Order_Send_Chk.resources C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.납품관리.Order_Send_Chk.resources
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.회계.Sales_In_Pay.resources C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.회계.Sales_In_Pay.resources
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.회계.Sales_Detail.resources
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.Account.Sales_Lookup.resources
C:\Users\Administrator\Desktop\unimarc\unimarc\WindowsFormsApp1\obj\Debug\WindowsFormsApp1.회계.Sales_Book.resources

View File

@@ -21,7 +21,7 @@ namespace WindowsFormsApp1.Delivery
Purchase pur; Purchase pur;
List_aggregation la; List_aggregation la;
Sales_Input si; Sales_Input si;
Sales_Book sb; Sales_Lookup sb;
Sales_In_Pay sip; Sales_In_Pay sip;
public Commodity_Search(Purchase _pur) public Commodity_Search(Purchase _pur)
{ {
@@ -48,7 +48,7 @@ namespace WindowsFormsApp1.Delivery
InitializeComponent(); InitializeComponent();
si = _si; si = _si;
} }
public Commodity_Search(Sales_Book _sb) public Commodity_Search(Sales_Lookup _sb)
{ {
InitializeComponent(); InitializeComponent();
sb = _sb; sb = _sb;

View File

@@ -1,4 +1,5 @@
namespace WindowsFormsApp1.Account 
namespace WindowsFormsApp1.
{ {
partial class Sales_Book partial class Sales_Book
{ {
@@ -28,52 +29,82 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
this.End_Date = new System.Windows.Forms.DateTimePicker(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
this.Start_Date = new System.Windows.Forms.DateTimePicker(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
this.label2 = new System.Windows.Forms.Label(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
this.textBox2 = new System.Windows.Forms.TextBox(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
this.label3 = new System.Windows.Forms.Label(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.tb_clt = new System.Windows.Forms.TextBox(); this.tb_clt = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.btn_Lookup = new System.Windows.Forms.Button(); this.label4 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.Start_Date = new System.Windows.Forms.DateTimePicker();
this.btn_Close = new System.Windows.Forms.Button(); this.btn_Close = new System.Windows.Forms.Button();
this.End_Date = new System.Windows.Forms.DateTimePicker();
this.btn_Lookup = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView(); 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.out_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clt = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tel = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.content = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.content = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.total = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.in_per = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.out_per = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.out_per = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.in_price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.out_price = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.out_price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dif = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.in_price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.now_money = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout(); this.SuspendLayout();
// //
// End_Date // panel1
// //
this.End_Date.CustomFormat = "yyyy-MM-dd"; this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.End_Date.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.panel1.Controls.Add(this.tb_clt);
this.End_Date.Location = new System.Drawing.Point(173, 9); this.panel1.Controls.Add(this.label1);
this.End_Date.Name = "End_Date"; this.panel1.Controls.Add(this.label4);
this.End_Date.Size = new System.Drawing.Size(85, 21); this.panel1.Controls.Add(this.label2);
this.End_Date.TabIndex = 39; this.panel1.Controls.Add(this.Start_Date);
this.panel1.Controls.Add(this.btn_Close);
this.panel1.Controls.Add(this.End_Date);
this.panel1.Controls.Add(this.btn_Lookup);
this.panel1.Location = new System.Drawing.Point(12, 12);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(778, 40);
this.panel1.TabIndex = 93;
// //
// Start_Date // tb_clt
// //
this.Start_Date.CustomFormat = "yyyy-MM-dd"; this.tb_clt.Location = new System.Drawing.Point(359, 9);
this.Start_Date.Format = System.Windows.Forms.DateTimePickerFormat.Custom; this.tb_clt.Name = "tb_clt";
this.Start_Date.Location = new System.Drawing.Point(70, 9); this.tb_clt.Size = new System.Drawing.Size(208, 21);
this.Start_Date.Name = "Start_Date"; this.tb_clt.TabIndex = 83;
this.Start_Date.Size = new System.Drawing.Size(85, 21); //
this.Start_Date.TabIndex = 38; // label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(292, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 82;
this.label1.Text = "매출거래처";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(161, 13);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(14, 12);
this.label4.TabIndex = 37;
this.label4.Text = "~";
// //
// label2 // label2
// //
@@ -84,52 +115,18 @@
this.label2.TabIndex = 37; this.label2.TabIndex = 37;
this.label2.Text = "조회기간"; this.label2.Text = "조회기간";
// //
// textBox2 // Start_Date
// //
this.textBox2.Location = new System.Drawing.Point(560, 9); this.Start_Date.CustomFormat = "yyyy-MM-dd";
this.textBox2.Name = "textBox2"; this.Start_Date.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.textBox2.Size = new System.Drawing.Size(280, 21); this.Start_Date.Location = new System.Drawing.Point(70, 9);
this.textBox2.TabIndex = 78; this.Start_Date.Name = "Start_Date";
// this.Start_Date.Size = new System.Drawing.Size(85, 21);
// label3 this.Start_Date.TabIndex = 38;
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(505, 13);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 12);
this.label3.TabIndex = 77;
this.label3.Text = "비고내용";
//
// tb_clt
//
this.tb_clt.Location = new System.Drawing.Point(344, 9);
this.tb_clt.Name = "tb_clt";
this.tb_clt.Size = new System.Drawing.Size(145, 21);
this.tb_clt.TabIndex = 76;
this.tb_clt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(277, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 75;
this.label1.Text = "매출거래처";
//
// btn_Lookup
//
this.btn_Lookup.Location = new System.Drawing.Point(858, 8);
this.btn_Lookup.Name = "btn_Lookup";
this.btn_Lookup.Size = new System.Drawing.Size(75, 23);
this.btn_Lookup.TabIndex = 79;
this.btn_Lookup.Text = "조 회";
this.btn_Lookup.UseVisualStyleBackColor = true;
this.btn_Lookup.Click += new System.EventHandler(this.btn_Lookup_Click);
// //
// btn_Close // btn_Close
// //
this.btn_Close.Location = new System.Drawing.Point(945, 8); this.btn_Close.Location = new System.Drawing.Point(684, 8);
this.btn_Close.Name = "btn_Close"; this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(75, 23); this.btn_Close.Size = new System.Drawing.Size(75, 23);
this.btn_Close.TabIndex = 81; this.btn_Close.TabIndex = 81;
@@ -137,39 +134,128 @@
this.btn_Close.UseVisualStyleBackColor = true; this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click); this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
// //
// End_Date
//
this.End_Date.CustomFormat = "yyyy-MM-dd";
this.End_Date.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.End_Date.Location = new System.Drawing.Point(181, 9);
this.End_Date.Name = "End_Date";
this.End_Date.Size = new System.Drawing.Size(85, 21);
this.End_Date.TabIndex = 39;
//
// btn_Lookup
//
this.btn_Lookup.Location = new System.Drawing.Point(593, 8);
this.btn_Lookup.Name = "btn_Lookup";
this.btn_Lookup.Size = new System.Drawing.Size(75, 23);
this.btn_Lookup.TabIndex = 79;
this.btn_Lookup.Text = "조 회";
this.btn_Lookup.UseVisualStyleBackColor = true;
this.btn_Lookup.Click += new System.EventHandler(this.btn_Lookup_Click);
//
// dataGridView1 // dataGridView1
// //
this.dataGridView1.AllowUserToAddRows = false; this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false; this.dataGridView1.AllowUserToDeleteRows = false;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); dataGridViewCellStyle7.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.out_date, this.out_date,
this.clt,
this.tel,
this.content, this.content,
this.count, this.count,
this.total,
this.in_per,
this.out_per, this.out_per,
this.in_price,
this.out_price, this.out_price,
this.dif, this.in_price,
this.now_money,
this.etc}); this.etc});
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically; this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dataGridView1.Location = new System.Drawing.Point(12, 58); this.dataGridView1.Location = new System.Drawing.Point(12, 58);
this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 20; this.dataGridView1.RowHeadersWidth = 20;
this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(1151, 421); this.dataGridView1.Size = new System.Drawing.Size(960, 421);
this.dataGridView1.TabIndex = 82; this.dataGridView1.TabIndex = 94;
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick); //
// textBox2
//
this.textBox2.Enabled = false;
this.textBox2.Location = new System.Drawing.Point(32, 488);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(81, 21);
this.textBox2.TabIndex = 95;
this.textBox2.Text = "합계";
this.textBox2.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// textBox1
//
this.textBox1.Enabled = false;
this.textBox1.Location = new System.Drawing.Point(112, 488);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(301, 21);
this.textBox1.TabIndex = 95;
//
// tb_count
//
this.tb_count.Enabled = false;
this.tb_count.Location = new System.Drawing.Point(412, 488);
this.tb_count.Name = "tb_count";
this.tb_count.Size = new System.Drawing.Size(41, 21);
this.tb_count.TabIndex = 95;
this.tb_count.Text = "0";
this.tb_count.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.tb_count.TextChanged += new System.EventHandler(this.tb_count_TextChanged);
//
// textBox6
//
this.textBox6.Enabled = false;
this.textBox6.Location = new System.Drawing.Point(452, 488);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(61, 21);
this.textBox6.TabIndex = 95;
//
// tb_out
//
this.tb_out.Enabled = false;
this.tb_out.Location = new System.Drawing.Point(512, 488);
this.tb_out.Name = "tb_out";
this.tb_out.Size = new System.Drawing.Size(81, 21);
this.tb_out.TabIndex = 95;
this.tb_out.Text = "0";
this.tb_out.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.tb_out.TextChanged += new System.EventHandler(this.tb_count_TextChanged);
//
// tb_in
//
this.tb_in.Enabled = false;
this.tb_in.Location = new System.Drawing.Point(592, 488);
this.tb_in.Name = "tb_in";
this.tb_in.Size = new System.Drawing.Size(81, 21);
this.tb_in.TabIndex = 95;
this.tb_in.Text = "0";
this.tb_in.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
this.tb_in.TextChanged += new System.EventHandler(this.tb_count_TextChanged);
//
// textBox9
//
this.textBox9.Enabled = false;
this.textBox9.Location = new System.Drawing.Point(672, 488);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(81, 21);
this.textBox9.TabIndex = 95;
//
// textBox10
//
this.textBox10.Enabled = false;
this.textBox10.Location = new System.Drawing.Point(752, 488);
this.textBox10.Name = "textBox10";
this.textBox10.Size = new System.Drawing.Size(202, 21);
this.textBox10.TabIndex = 95;
// //
// out_date // out_date
// //
@@ -177,139 +263,110 @@
this.out_date.Name = "out_date"; this.out_date.Name = "out_date";
this.out_date.Width = 80; this.out_date.Width = 80;
// //
// clt
//
this.clt.HeaderText = "매출거래처";
this.clt.Name = "clt";
this.clt.Width = 150;
//
// tel
//
this.tel.HeaderText = "전화번호";
this.tel.Name = "tel";
//
// content // content
// //
this.content.HeaderText = "내용"; this.content.HeaderText = "내용";
this.content.Name = "content"; this.content.Name = "content";
this.content.Width = 200; this.content.Width = 300;
// //
// count // count
// //
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.count.DefaultCellStyle = dataGridViewCellStyle8;
this.count.HeaderText = "수량"; this.count.HeaderText = "수량";
this.count.Name = "count"; this.count.Name = "count";
this.count.Width = 40; this.count.Width = 40;
// //
// total
//
this.total.HeaderText = "총액";
this.total.Name = "total";
this.total.Width = 80;
//
// in_per
//
this.in_per.HeaderText = "입고율";
this.in_per.Name = "in_per";
this.in_per.Width = 60;
//
// out_per // out_per
// //
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.out_per.DefaultCellStyle = dataGridViewCellStyle9;
this.out_per.HeaderText = "출고율"; this.out_per.HeaderText = "출고율";
this.out_per.Name = "out_per"; this.out_per.Name = "out_per";
this.out_per.Width = 60; this.out_per.Width = 60;
// //
// in_price
//
this.in_price.HeaderText = "매입금액";
this.in_price.Name = "in_price";
this.in_price.Width = 80;
//
// out_price // out_price
// //
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.out_price.DefaultCellStyle = dataGridViewCellStyle10;
this.out_price.HeaderText = "매출금액"; this.out_price.HeaderText = "매출금액";
this.out_price.Name = "out_price"; this.out_price.Name = "out_price";
this.out_price.Width = 80; this.out_price.Width = 80;
// //
// dif // in_price
// //
this.dif.HeaderText = "차이"; dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
this.dif.Name = "dif"; this.in_price.DefaultCellStyle = dataGridViewCellStyle11;
this.dif.Width = 80; 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 // etc
// //
this.etc.HeaderText = "비고"; this.etc.HeaderText = "비고";
this.etc.Name = "etc"; this.etc.Name = "etc";
// this.etc.Width = 200;
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.Start_Date);
this.panel1.Controls.Add(this.btn_Close);
this.panel1.Controls.Add(this.End_Date);
this.panel1.Controls.Add(this.btn_Lookup);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.textBox2);
this.panel1.Controls.Add(this.tb_clt);
this.panel1.Controls.Add(this.label3);
this.panel1.Location = new System.Drawing.Point(12, 12);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1051, 40);
this.panel1.TabIndex = 83;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(157, 13);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(14, 12);
this.label4.TabIndex = 37;
this.label4.Text = "~";
// //
// Sales_Book // Sales_Book
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1176, 491); this.ClientSize = new System.Drawing.Size(984, 517);
this.Controls.Add(this.panel1); this.Controls.Add(this.textBox10);
this.Controls.Add(this.textBox9);
this.Controls.Add(this.tb_in);
this.Controls.Add(this.tb_out);
this.Controls.Add(this.textBox6);
this.Controls.Add(this.tb_count);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.dataGridView1); this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.panel1);
this.Name = "Sales_Book"; this.Name = "Sales_Book";
this.Text = " 매출 조회"; this.Text = "매출 장부";
this.Load += new System.EventHandler(this.Sales_Book_Load); this.Load += new System.EventHandler(this.Sales_Book_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false); this.panel1.ResumeLayout(false);
this.panel1.PerformLayout(); this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout();
} }
#endregion #endregion
private System.Windows.Forms.DateTimePicker End_Date;
private System.Windows.Forms.DateTimePicker Start_Date;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btn_Close;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel panel1;
public System.Windows.Forms.TextBox tb_clt; private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btn_Close;
public System.Windows.Forms.Button btn_Lookup;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox tb_count;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.TextBox tb_out;
private System.Windows.Forms.TextBox tb_in;
private System.Windows.Forms.TextBox textBox9;
private System.Windows.Forms.TextBox textBox10;
public System.Windows.Forms.DateTimePicker Start_Date;
public System.Windows.Forms.DateTimePicker End_Date;
public System.Windows.Forms.TextBox tb_clt;
private System.Windows.Forms.DataGridViewTextBoxColumn out_date; private System.Windows.Forms.DataGridViewTextBoxColumn out_date;
private System.Windows.Forms.DataGridViewTextBoxColumn clt;
private System.Windows.Forms.DataGridViewTextBoxColumn tel;
private System.Windows.Forms.DataGridViewTextBoxColumn content; private System.Windows.Forms.DataGridViewTextBoxColumn content;
private System.Windows.Forms.DataGridViewTextBoxColumn count; private System.Windows.Forms.DataGridViewTextBoxColumn count;
private System.Windows.Forms.DataGridViewTextBoxColumn total;
private System.Windows.Forms.DataGridViewTextBoxColumn in_per;
private System.Windows.Forms.DataGridViewTextBoxColumn out_per; private System.Windows.Forms.DataGridViewTextBoxColumn out_per;
private System.Windows.Forms.DataGridViewTextBoxColumn in_price;
private System.Windows.Forms.DataGridViewTextBoxColumn out_price; private System.Windows.Forms.DataGridViewTextBoxColumn out_price;
private System.Windows.Forms.DataGridViewTextBoxColumn dif; private System.Windows.Forms.DataGridViewTextBoxColumn in_price;
private System.Windows.Forms.DataGridViewTextBoxColumn now_money;
private System.Windows.Forms.DataGridViewTextBoxColumn etc; private System.Windows.Forms.DataGridViewTextBoxColumn etc;
public System.Windows.Forms.Button btn_Lookup;
} }
} }

View File

@@ -7,164 +7,177 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using WindowsFormsApp1.Account;
// 추가된 참조 namespace WindowsFormsApp1.
using WindowsFormsApp1.Delivery;
namespace WindowsFormsApp1.Account
{ {
public partial class Sales_Book : Form public partial class Sales_Book : Form
{ {
public string compidx;
Main main; Main main;
Sales_Deposit sd;
Helper_DB db = new Helper_DB(); Helper_DB db = new Helper_DB();
public string compidx;
public int row = -1;
public Sales_Book(Main _main) public Sales_Book(Main _main)
{ {
InitializeComponent(); InitializeComponent();
main = _main; main = _main;
compidx = main.com_idx; }
public Sales_Book(Sales_Deposit _sd)
{
InitializeComponent();
sd = _sd;
compidx = sd.compidx;
} }
private void Sales_Book_Load(object sender, EventArgs e) private void Sales_Book_Load(object sender, EventArgs e)
{ {
db.DBcon(); db.DBcon();
Start_Date.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
} }
public void btn_Lookup_Click(object sender, EventArgs e) public void btn_Lookup_Click(object sender, EventArgs e)
{ {
string table = "`date`, `client`, `tel`, `book_name`, `in_per`, " + dataGridView1.Rows.Clear();
"`out_per`, `in_price`, `out_price`, `total`, `etc`"; // grid
string start = Start_Date.Text.Substring(0, 10); // [0]매출일자 / [1]내용 / [2]수량 / [3]출고율 / [4]매출금액 / [5]입금액 / [6]현잔액 / [7]비고
string end = End_Date.Text.Substring(0, 10); string[] grid = { "", "", "", "", "", "", "", "" };
// db
string data_base = db.Search_Date("Sales", table, "date", start, end, compidx); // [0]매출일자 / [1]책이름 / [2]수량 / [3]출고율 / [4]매출금액 / [5]입금액 / [6]비고 / [7]입금구분
input_Grid(data_base); string Area = "`date`, `book_name`, `count`, `out_per`, `out_price`, `deposit`, `etc`, `gu`";
string[] sear_col = { "compidx", "client" };
string[] sear_data = { compidx, tb_clt.Text };
string db_tmp = db.More_DB_Search("Sales", sear_col, sear_data, Area);
string[] ary = db_tmp.Split('|');
input_grid(grid, ary);
} }
private void input_Grid(string value) #region btn_Lookup_Click_Sub
private void input_grid(string[] grid, string[] db)
{ {
/* 조회기간, 매출거래처, 전화번호, 내용, 수량, 총액 int count = 8;
* 입고율, 출고율, 매입금액, 매출금액, 차이, 비고 */ for(int a = 0; a < db.Length; a++)
string[] grid = { "", "", "", "", "", "",
"", "", "", "", "", "" };
string[] data = { "", "", "", "", "",
"", "", "", "", "" };
string[] ary = value.Split('|');
int cot = 10;
for(int a = 0; a < ary.Length; a++)
{ {
if (a % cot == 0) { data[0] = ary[a]; } if (a % count == 0) { grid[0] = db[a]; }
if (a % cot == 1) { data[1] = ary[a]; } if (a % count == 1) { grid[1] = db[a]; }
if (a % cot == 2) { data[2] = ary[a]; } if (a % count == 2) { grid[2] = db[a]; }
if (a % cot == 3) { data[3] = ary[a]; } if (a % count == 3) { grid[3] = db[a]; }
if (a % cot == 4) { data[4] = ary[a]; } if (a % count == 4) { grid[4] = db[a]; }
if (a % cot == 5) { data[5] = ary[a]; } if (a % count == 5) { grid[5] = db[a]; }
if (a % cot == 6) { data[6] = ary[a]; } if (a % count == 6) { grid[7] = db[a]; }
if (a % cot == 7) { data[7] = ary[a]; } if (a % count == 7) {
if (a % cot == 8) { data[8] = ary[a]; } if (db[a] != "") {
if (a % cot == 9) { data[9] = ary[a]; grid[1] = "입금 " + db[a];
if (tb_clt.Text != "")
{
if (data[1] != tb_clt.Text) { continue; }
} }
grid_data_check(grid, data); set_grid(grid);
} }
} }
set_now_money(dataGridView1.Rows.Count);
} }
private void grid_data_check(string[] grid, string[] data) private void set_grid(string[] grid)
{ {
/* data: 0.출고일자 / 1.거래처 / 2.전화번호 / 3.내용 / 4.입고율 / DateTime start = Start_Date.Value;
* 5.출고율 / 6.입고금액 / 7.출고금액 / 8.합계 / 9.비고 DateTime end = End_Date.Value;
* DateTime sear = Convert.ToDateTime(grid[0]);
*
* grid: 0.조회기간 / 1.거래처 / 2.전화번호 / 3.내용 / 4.수량 /
* 5.총합계 / 6.입고율 / 7.출고율 / 8.매입금액 / 9.매출금액 / 10.차이 / 11.비고
*
* out_date / clt / tel / content / count /
* total / in_per / out_per / in_price / out_price / dif / etc
*/
if (data[3] == "" && data[5] == "0") { return; }
if (dataGridView1.Rows.Count <= 0) bool date_chk = false;
if (sear >= start && sear < end) { date_chk = true; }
if (sear > end) { return; }
int row = accord_grid(grid);
if (date_chk)
{ {
base_Setting(grid, data); int out_price = Convert.ToInt32(grid[4]);
return; int in_price = Convert.ToInt32(grid[5]);
} if (row > 0) {
int ori_out_price = Convert.ToInt32(dataGridView1.Rows[row].Cells["out_price"].Value.ToString());
int ori_in_price = Convert.ToInt32(dataGridView1.Rows[row].Cells["in_price"].Value.ToString());
out_price += ori_out_price;
in_price += ori_in_price;
dataGridView1.Rows[row].Cells["out_price"].Value = out_price.ToString();
dataGridView1.Rows[row].Cells["in_price"].Value = in_price.ToString();
}
if (row <= 0) {
dataGridView1.Rows.Add(grid);
}
}
else if (!date_chk)
{
set_remain(grid);
}
}
private void set_remain(string[] grid)
{
if (dataGridView1.Rows.Count <= 0) {
string[] grid_base = { "이월미수금", "", "", "", "", "", "0", "" };
dataGridView1.Rows.Add(grid_base);
}
int out_price = Convert.ToInt32(grid[4]);
int in_price = Convert.ToInt32(grid[5]);
int result = Convert.ToInt32(dataGridView1.Rows[row].Cells["now_money"].Value.ToString());
result += out_price - in_price;
dataGridView1.Rows[0].Cells["now_money"].Value = result.ToString();
}
private void set_now_money(int count)
{
for(int a = 0; a < count; a++)
{
if(a <= 0) { continue; }
int cout = Convert.ToInt32(dataGridView1.Rows[a].Cells["count"].Value.ToString());
int out_price = Convert.ToInt32(dataGridView1.Rows[a].Cells["out_price"].Value.ToString());
int in_price = Convert.ToInt32(dataGridView1.Rows[a].Cells["in_price"].Value.ToString());
int money = Convert.ToInt32(dataGridView1.Rows[a - 1].Cells["now_money"].Value.ToString());
set_total(cout, out_price, in_price);
money += out_price - in_price;
dataGridView1.Rows[a].Cells["now_money"].Value = money.ToString();
}
}
private void set_total(int count, int out_price, int in_price)
{
int text_count = Convert.ToInt32(tb_count.Text.Replace(",", ""));
int text_out = Convert.ToInt32(tb_out.Text.Replace(",", ""));
int text_in = Convert.ToInt32(tb_in.Text.Replace(",", ""));
text_count += count;
text_out += out_price;
text_in += in_price;
tb_count.Text = text_count.ToString();
tb_out.Text = text_out.ToString();
tb_in.Text = text_in.ToString();
}
private int accord_grid(string[] grid)
{
int result = 0;
bool[] check_list = { false, false, false };
for(int a = 0; a < dataGridView1.Rows.Count; a++) for(int a = 0; a < dataGridView1.Rows.Count; a++)
{ {
if (dataGridView1.Rows[a].Cells["out_date"].Value.ToString() == data[0] && if (dataGridView1.Rows[a].Cells["out_date"].Value.ToString() == grid[0]) {
dataGridView1.Rows[a].Cells["clt"].Value.ToString() == data[1] && check_list[0] = true;
dataGridView1.Rows[a].Cells["tel"].Value.ToString() == data[2]) {
int count = Convert.ToInt32(dataGridView1.Rows[a].Cells["count"].Value.ToString());
int total = Convert.ToInt32(dataGridView1.Rows[a].Cells["total"].Value.ToString());
int in_per = Convert.ToInt32(dataGridView1.Rows[a].Cells["in_per"].Value.ToString());
int out_per = Convert.ToInt32(dataGridView1.Rows[a].Cells["out_per"].Value.ToString());
count++;
total = total + Convert.ToInt32(data[8]);
in_per = (in_per + Convert.ToInt32(data[4])) / count;
out_per = (out_per + Convert.ToInt32(data[5])) / count;
int in_price = persent(in_per, total);
int out_price = persent(out_per, total);
int dif = out_price - in_price;
dataGridView1.Rows[a].Cells["content"].Value = data[3];
dataGridView1.Rows[a].Cells["count"].Value = count.ToString();
dataGridView1.Rows[a].Cells["total"].Value = total.ToString();
dataGridView1.Rows[a].Cells["in_per"].Value = in_per.ToString();
dataGridView1.Rows[a].Cells["out_per"].Value = out_per.ToString();
dataGridView1.Rows[a].Cells["in_price"].Value = in_price.ToString();
dataGridView1.Rows[a].Cells["out_price"].Value = out_price.ToString();
dataGridView1.Rows[a].Cells["dif"].Value = dif.ToString();
return;
} }
else if (dataGridView1.Rows[a].Cells["out_per"].Value.ToString() == grid[3]) {
{ check_list[1] = true;
base_Setting(grid, data); }
return; if (dataGridView1.Rows[a].Cells["etc"].Value.ToString() == grid[7]) {
check_list[2] = true;
}
if (check_list[0] && check_list[1] && check_list[2]) {
result = a;
} }
} }
return result;
} }
private void base_Setting(string[] grid, string[] data) #endregion
{
grid[0] = data[0];
grid[1] = data[1];
grid[2] = data[2];
grid[3] = data[3];
grid[4] = "1";
grid[5] = data[8];
grid[6] = data[4];
grid[7] = data[5];
grid[8] = data[6];
grid[9] = data[7];
int dif = Convert.ToInt32(grid[9]) - Convert.ToInt32(grid[8]);
grid[10] = dif.ToString();
grid[11] = data[9];
dataGridView1.Rows.Add(grid);
return;
}
private int persent(int per, int total)
{
return per * total / 100;
}
private void btn_Close_Click(object sender, EventArgs e) private void btn_Close_Click(object sender, EventArgs e)
{ {
this.Close(); this.Close();
} }
private void textBox1_KeyDown(object sender, KeyEventArgs e) private void tb_count_TextChanged(object sender, EventArgs e)
{ {
if (e.KeyCode == Keys.Enter) { String_Text st = new String_Text();
Commodity_Search cs = new Commodity_Search(this); st.Int_Comma(sender, e);
cs.Clinet_name = tb_clt.Text;
cs.Show();
}
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
} }
} }
} }

View File

@@ -120,34 +120,22 @@
<metadata name="out_date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="out_date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="clt.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="content.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="content.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="count.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> <value>True</value>
</metadata> </metadata>
<metadata name="total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="in_per.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="out_per.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="out_per.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="in_price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="out_price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="out_price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="dif.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="in_price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="now_money.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="etc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="etc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">

View File

@@ -28,7 +28,7 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.rb_clt = new System.Windows.Forms.RadioButton(); this.rb_clt = new System.Windows.Forms.RadioButton();
this.rb_Date = new System.Windows.Forms.RadioButton(); this.rb_Date = new System.Windows.Forms.RadioButton();
@@ -160,14 +160,14 @@
// //
this.dataGridView1.AllowUserToAddRows = false; this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false; this.dataGridView1.AllowUserToDeleteRows = false;
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle5.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129))); dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.True; dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5; this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Grid0, this.Grid0,
this.Grid1, this.Grid1,
@@ -185,6 +185,7 @@
this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(691, 492); this.dataGridView1.Size = new System.Drawing.Size(691, 492);
this.dataGridView1.TabIndex = 85; this.dataGridView1.TabIndex = 85;
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
// //
// Grid0 // Grid0
// //
@@ -355,9 +356,7 @@
private System.Windows.Forms.RadioButton rb_Date; private System.Windows.Forms.RadioButton rb_Date;
private System.Windows.Forms.Label label4; private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
private System.Windows.Forms.DateTimePicker Start_Date;
private System.Windows.Forms.Button btn_Close; private System.Windows.Forms.Button btn_Close;
private System.Windows.Forms.DateTimePicker End_Date;
public System.Windows.Forms.Button btn_Lookup; public System.Windows.Forms.Button btn_Lookup;
private System.Windows.Forms.DataGridView dataGridView1; private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn Grid0; private System.Windows.Forms.DataGridViewTextBoxColumn Grid0;
@@ -377,5 +376,7 @@
private System.Windows.Forms.TextBox tb_grid5; private System.Windows.Forms.TextBox tb_grid5;
private System.Windows.Forms.TextBox tb_grid6; private System.Windows.Forms.TextBox tb_grid6;
private System.Windows.Forms.TextBox tb_grid7; private System.Windows.Forms.TextBox tb_grid7;
public System.Windows.Forms.DateTimePicker Start_Date;
public System.Windows.Forms.DateTimePicker End_Date;
} }
} }

View File

@@ -7,6 +7,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using WindowsFormsApp1.;
namespace WindowsFormsApp1.Account namespace WindowsFormsApp1.Account
{ {
@@ -72,6 +73,7 @@ namespace WindowsFormsApp1.Account
tb_grid7.Text = grid[7].ToString(); tb_grid7.Text = grid[7].ToString();
} }
#endregion #endregion
#region "일자별" #region "일자별"
private void input_Grid_Date(string[] grid, string value) private void input_Grid_Date(string[] grid, string value)
{ {
@@ -148,6 +150,7 @@ namespace WindowsFormsApp1.Account
return; return;
} }
#endregion #endregion
#region "거래처별" #region "거래처별"
private void input_Grid_Clt(string[] grid, string value) private void input_Grid_Clt(string[] grid, string value)
{ {
@@ -172,17 +175,17 @@ namespace WindowsFormsApp1.Account
} }
private void setting_grid_Clt(string[] grid, string[] db) private void setting_grid_Clt(string[] grid, string[] db)
{ {
DateTime start = Start_Date.Value; DateTime start = Start_Date.Value;
DateTime end = End_Date.Value; DateTime end = End_Date.Value;
DateTime sear = Convert.ToDateTime(db[4]); DateTime sear = Convert.ToDateTime(db[4]);
bool date_chk = false; bool date_chk = false;
bool chk = false; bool chk = false;
if (sear >= start && sear < end) { date_chk = true; } if (sear >= start && sear < end) { date_chk = true; }
if (sear > end) { return; } if (sear > end) { return; }
if (dataGridView1.Rows.Count <= 0) { if (dataGridView1.Rows.Count == 0) {
grid[0] = db[0]; grid[0] = db[0];
dataGridView1.Rows.Add(grid); dataGridView1.Rows.Add(grid);
} }
@@ -222,12 +225,20 @@ namespace WindowsFormsApp1.Account
dataGridView1.Rows[a].Cells["grid6"].Value = mid.ToString(); dataGridView1.Rows[a].Cells["grid6"].Value = mid.ToString();
dataGridView1.Rows[a].Cells["grid7"].Value = fin.ToString(); dataGridView1.Rows[a].Cells["grid7"].Value = fin.ToString();
} }
chk = false;
break;
}
else
{
chk = true;
} }
else { chk = true; }
} }
if (chk) if (chk)
{ {
grid[0] = db[0]; grid[0] = db[0];
grid[3] = db[1];
grid[4] = db[2];
grid[5] = db[3];
dataGridView1.Rows.Add(grid); dataGridView1.Rows.Add(grid);
} }
@@ -271,5 +282,18 @@ namespace WindowsFormsApp1.Account
String_Text st = new String_Text(); String_Text st = new String_Text();
st.Int_Comma(sender, e); st.Int_Comma(sender, e);
} }
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (e.RowIndex < 0) { return; }
Sales_Book sb = new Sales_Book(this);
sb.row = e.RowIndex;
sb.MdiParent = main;
sb.WindowState = FormWindowState.Maximized;
sb.tb_clt.Text = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
sb.Start_Date.Value = DateTime.Parse(Start_Date.Value.ToString());
sb.End_Date.Value = DateTime.Parse(End_Date.Value.ToString());
sb.Show();
sb.btn_Lookup_Click(null, null);
}
} }
} }

View File

@@ -0,0 +1,386 @@

namespace WindowsFormsApp1.
{
partial class Sales_Detail
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.tb_clt = new System.Windows.Forms.TextBox();
this.Out_Date = new System.Windows.Forms.DateTimePicker();
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();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.textBox10 = new System.Windows.Forms.TextBox();
this.textBox11 = new System.Windows.Forms.TextBox();
this.textBox12 = new System.Windows.Forms.TextBox();
this.textBox13 = new System.Windows.Forms.TextBox();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.tb_clt);
this.panel1.Controls.Add(this.Out_Date);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(13, 13);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(416, 45);
this.panel1.TabIndex = 0;
//
// tb_clt
//
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);
this.tb_clt.TabIndex = 40;
//
// Out_Date
//
this.Out_Date.CustomFormat = "yyyy-MM-dd";
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";
this.Out_Date.Size = new System.Drawing.Size(85, 21);
this.Out_Date.TabIndex = 39;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(175, 15);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 0;
this.label2.Text = "거래처명";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(10, 15);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 0;
this.label1.Text = "매출일";
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.book_name,
this.author,
this.book_comp,
this.price,
this.count,
this.out_per,
this.in_per,
this.list_date,
this.list_name,
this.out_price,
this.in_price,
this.etc});
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dataGridView1.Location = new System.Drawing.Point(13, 64);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 30;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(1241, 421);
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;
this.textBox1.Location = new System.Drawing.Point(43, 491);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(251, 21);
this.textBox1.TabIndex = 84;
//
// textBox2
//
this.textBox2.Enabled = false;
this.textBox2.Location = new System.Drawing.Point(293, 491);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(101, 21);
this.textBox2.TabIndex = 84;
//
// textBox3
//
this.textBox3.Enabled = false;
this.textBox3.Location = new System.Drawing.Point(393, 491);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(101, 21);
this.textBox3.TabIndex = 84;
//
// textBox4
//
this.textBox4.Enabled = false;
this.textBox4.Location = new System.Drawing.Point(493, 491);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(71, 21);
this.textBox4.TabIndex = 84;
//
// textBox5
//
this.textBox5.Enabled = false;
this.textBox5.Location = new System.Drawing.Point(563, 491);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(51, 21);
this.textBox5.TabIndex = 84;
//
// textBox6
//
this.textBox6.Enabled = false;
this.textBox6.Location = new System.Drawing.Point(613, 491);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(41, 21);
this.textBox6.TabIndex = 84;
//
// textBox7
//
this.textBox7.Enabled = false;
this.textBox7.Location = new System.Drawing.Point(653, 491);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(41, 21);
this.textBox7.TabIndex = 84;
//
// textBox8
//
this.textBox8.Enabled = false;
this.textBox8.Location = new System.Drawing.Point(693, 491);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(81, 21);
this.textBox8.TabIndex = 84;
//
// textBox9
//
this.textBox9.Enabled = false;
this.textBox9.Location = new System.Drawing.Point(773, 491);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(171, 21);
this.textBox9.TabIndex = 84;
//
// textBox10
//
this.textBox10.Enabled = false;
this.textBox10.Location = new System.Drawing.Point(943, 491);
this.textBox10.Name = "textBox10";
this.textBox10.Size = new System.Drawing.Size(81, 21);
this.textBox10.TabIndex = 84;
//
// textBox11
//
this.textBox11.Enabled = false;
this.textBox11.Location = new System.Drawing.Point(1023, 491);
this.textBox11.Name = "textBox11";
this.textBox11.Size = new System.Drawing.Size(81, 21);
this.textBox11.TabIndex = 84;
//
// textBox12
//
this.textBox12.Enabled = false;
this.textBox12.Location = new System.Drawing.Point(1103, 491);
this.textBox12.Name = "textBox12";
this.textBox12.Size = new System.Drawing.Size(131, 21);
this.textBox12.TabIndex = 84;
//
// textBox13
//
this.textBox13.Enabled = false;
this.textBox13.Location = new System.Drawing.Point(13, 491);
this.textBox13.Name = "textBox13";
this.textBox13.Size = new System.Drawing.Size(31, 21);
this.textBox13.TabIndex = 84;
//
// 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.textBox12);
this.Controls.Add(this.textBox11);
this.Controls.Add(this.textBox10);
this.Controls.Add(this.textBox9);
this.Controls.Add(this.textBox8);
this.Controls.Add(this.textBox7);
this.Controls.Add(this.textBox6);
this.Controls.Add(this.textBox5);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox13);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.panel1);
this.Name = "Sales_Detail";
this.Text = "매출 상세";
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel panel1;
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;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.TextBox textBox9;
private System.Windows.Forms.TextBox textBox10;
private System.Windows.Forms.TextBox textBox11;
private System.Windows.Forms.TextBox textBox12;
private System.Windows.Forms.TextBox textBox13;
public System.Windows.Forms.DateTimePicker Out_Date;
public System.Windows.Forms.TextBox tb_clt;
}
}

View File

@@ -0,0 +1,67 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WindowsFormsApp1.
{
public partial class Sales_Detail : Form
{
public Sales_Detail()
{
InitializeComponent();
}
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
{
Skill_Grid sg = new Skill_Grid();
sg.Print_Grid_Num(sender, e);
}
}
}
#region .
// 목록일자 + " " + 납품처
//
// 2021-04-29 전남도립(희)4-3
// 2021-04-29 주은금호작은m
// 2021-05-11 대동고
// 2021-04-28 화정남초
// 2021-04-22 큰별초
// 2021-04-28 금구초
// 2021-04-27 정원유치원추가
// 2021-04-28 여수신기초m
// 2021-04-22 송원여상
// 2021-05-10 송원고국어
// 2021-05-18 원주대(급)
// 2021-04-27 장성고m
// 2021-05-03 여수진남초m
// 2021-04-16 운남고m
// 2021-05-11 죽곡유치원추가
// 2021-05-06 조선이공대2차k
// 2021-04-27 서구공립6개관
//
//
// 목록일자 + "일자 " + 납품처 + "납품목록"
//
// 2021-04-29일자 전남도립(희)4-3납품목록
// 2021-04-29일자 주은금호작은m납품목록
// 2021-05-11일자 대동고납품목록
// 2021-04-28일자 화정남초납품목록
// 2021-04-22일자 큰별초납품목록
// 2021-04-28일자 금구초납품목록
// 2021-04-27일자 정원유치원추가납품목록
// 2021-04-28일자 여수신기초m납품목록
// 2021-04-22일자 송원여상납품목록
// 2021-05-10일자 송원고국어납품목록
// 2021-05-18일자 원주대(급)납품목록
// 2021-04-27일자 장성고m납품목록
// 2021-05-03일자 여수진남초m납품목록
// 2021-04-16일자 운남고m납품목록
// 2021-05-11일자 죽곡유치원추가납품목록
// 2021-05-06일자 조선이공대2차k납품목록
// 2021-04-27일자 서구공립6개관납품목록
#endregion

View File

@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="out_per.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="in_per.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="list_date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="list_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="out_price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="in_price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="etc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -30,6 +30,14 @@
{ {
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.dataGridView1 = new System.Windows.Forms.DataGridView(); 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.persent = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.total = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.chk_Add5000 = new System.Windows.Forms.CheckBox(); this.chk_Add5000 = new System.Windows.Forms.CheckBox();
this.btn_Total = new System.Windows.Forms.Button(); this.btn_Total = new System.Windows.Forms.Button();
this.btn_Clear = new System.Windows.Forms.Button(); this.btn_Clear = new System.Windows.Forms.Button();
@@ -59,17 +67,9 @@
this.out_date = new System.Windows.Forms.DateTimePicker(); this.out_date = new System.Windows.Forms.DateTimePicker();
this.label1 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label();
this.panel1 = new System.Windows.Forms.Panel(); this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
this.btn_Close = new System.Windows.Forms.Button();
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.persent = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.total = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.lbl_tel = new System.Windows.Forms.Label(); this.lbl_tel = new System.Windows.Forms.Label();
this.btn_Close = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout(); this.panel1.SuspendLayout();
this.panel2.SuspendLayout(); this.panel2.SuspendLayout();
@@ -97,13 +97,60 @@
this.count, this.count,
this.total, this.total,
this.ISBN}); this.ISBN});
this.dataGridView1.Location = new System.Drawing.Point(12, 177); this.dataGridView1.Location = new System.Drawing.Point(12, 170);
this.dataGridView1.Name = "dataGridView1"; this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 20; this.dataGridView1.RowHeadersWidth = 20;
this.dataGridView1.RowTemplate.Height = 23; this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(1020, 370); this.dataGridView1.Size = new System.Drawing.Size(1020, 370);
this.dataGridView1.TabIndex = 91; this.dataGridView1.TabIndex = 91;
// //
// book_name
//
this.book_name.HeaderText = "도서명";
this.book_name.Name = "book_name";
this.book_name.Width = 390;
//
// author
//
this.author.HeaderText = "저자";
this.author.Name = "author";
//
// book_comp
//
this.book_comp.HeaderText = "출판사";
this.book_comp.Name = "book_comp";
this.book_comp.Width = 200;
//
// price
//
this.price.HeaderText = "정가";
this.price.Name = "price";
this.price.Width = 80;
//
// persent
//
this.persent.HeaderText = "출고율";
this.persent.Name = "persent";
this.persent.Width = 70;
//
// count
//
this.count.HeaderText = "부수";
this.count.Name = "count";
this.count.Width = 60;
//
// total
//
this.total.HeaderText = "합계금액";
this.total.Name = "total";
this.total.Width = 80;
//
// ISBN
//
this.ISBN.HeaderText = "ISBN";
this.ISBN.Name = "ISBN";
this.ISBN.Visible = false;
//
// chk_Add5000 // chk_Add5000
// //
this.chk_Add5000.AutoSize = true; this.chk_Add5000.AutoSize = true;
@@ -365,6 +412,24 @@
this.panel1.Size = new System.Drawing.Size(1020, 61); this.panel1.Size = new System.Drawing.Size(1020, 61);
this.panel1.TabIndex = 0; this.panel1.TabIndex = 0;
// //
// lbl_tel
//
this.lbl_tel.AutoSize = true;
this.lbl_tel.Location = new System.Drawing.Point(522, 11);
this.lbl_tel.Name = "lbl_tel";
this.lbl_tel.Size = new System.Drawing.Size(0, 12);
this.lbl_tel.TabIndex = 80;
//
// btn_Close
//
this.btn_Close.Location = new System.Drawing.Point(691, 32);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(75, 23);
this.btn_Close.TabIndex = 79;
this.btn_Close.Text = "닫 기";
this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// panel2 // panel2
// //
this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.panel2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
@@ -388,81 +453,16 @@
this.panel2.Controls.Add(this.label5); this.panel2.Controls.Add(this.label5);
this.panel2.Controls.Add(this.tb_persent); this.panel2.Controls.Add(this.tb_persent);
this.panel2.Controls.Add(this.tb_isbn); this.panel2.Controls.Add(this.tb_isbn);
this.panel2.Location = new System.Drawing.Point(12, 79); this.panel2.Location = new System.Drawing.Point(12, 72);
this.panel2.Name = "panel2"; this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1020, 92); this.panel2.Size = new System.Drawing.Size(1020, 92);
this.panel2.TabIndex = 1; this.panel2.TabIndex = 1;
// //
// btn_Close
//
this.btn_Close.Location = new System.Drawing.Point(691, 32);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(75, 23);
this.btn_Close.TabIndex = 79;
this.btn_Close.Text = "닫 기";
this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// book_name
//
this.book_name.HeaderText = "도서명";
this.book_name.Name = "book_name";
this.book_name.Width = 390;
//
// author
//
this.author.HeaderText = "저자";
this.author.Name = "author";
//
// book_comp
//
this.book_comp.HeaderText = "출판사";
this.book_comp.Name = "book_comp";
this.book_comp.Width = 200;
//
// price
//
this.price.HeaderText = "정가";
this.price.Name = "price";
this.price.Width = 80;
//
// persent
//
this.persent.HeaderText = "출고율";
this.persent.Name = "persent";
this.persent.Width = 70;
//
// count
//
this.count.HeaderText = "부수";
this.count.Name = "count";
this.count.Width = 60;
//
// total
//
this.total.HeaderText = "합계금액";
this.total.Name = "total";
this.total.Width = 80;
//
// ISBN
//
this.ISBN.HeaderText = "ISBN";
this.ISBN.Name = "ISBN";
this.ISBN.Visible = false;
//
// lbl_tel
//
this.lbl_tel.AutoSize = true;
this.lbl_tel.Location = new System.Drawing.Point(522, 11);
this.lbl_tel.Name = "lbl_tel";
this.lbl_tel.Size = new System.Drawing.Size(0, 12);
this.lbl_tel.TabIndex = 80;
//
// Sales_Input // Sales_Input
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1044, 558); this.ClientSize = new System.Drawing.Size(1044, 552);
this.Controls.Add(this.panel2); this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1); this.Controls.Add(this.panel1);
this.Controls.Add(this.dataGridView1); this.Controls.Add(this.dataGridView1);

View File

@@ -0,0 +1,315 @@
namespace WindowsFormsApp1.Account
{
partial class Sales_Lookup
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.End_Date = new System.Windows.Forms.DateTimePicker();
this.Start_Date = new System.Windows.Forms.DateTimePicker();
this.label2 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.tb_clt = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
this.btn_Lookup = new System.Windows.Forms.Button();
this.btn_Close = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.out_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.clt = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tel = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.content = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.total = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.in_per = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.out_per = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.in_price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.out_price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.dif = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1 = new System.Windows.Forms.Panel();
this.label4 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
// End_Date
//
this.End_Date.CustomFormat = "yyyy-MM-dd";
this.End_Date.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.End_Date.Location = new System.Drawing.Point(173, 9);
this.End_Date.Name = "End_Date";
this.End_Date.Size = new System.Drawing.Size(85, 21);
this.End_Date.TabIndex = 39;
//
// Start_Date
//
this.Start_Date.CustomFormat = "yyyy-MM-dd";
this.Start_Date.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.Start_Date.Location = new System.Drawing.Point(70, 9);
this.Start_Date.Name = "Start_Date";
this.Start_Date.Size = new System.Drawing.Size(85, 21);
this.Start_Date.TabIndex = 38;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 13);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(53, 12);
this.label2.TabIndex = 37;
this.label2.Text = "조회기간";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(560, 9);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(280, 21);
this.textBox2.TabIndex = 78;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(505, 13);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(53, 12);
this.label3.TabIndex = 77;
this.label3.Text = "비고내용";
//
// tb_clt
//
this.tb_clt.Location = new System.Drawing.Point(344, 9);
this.tb_clt.Name = "tb_clt";
this.tb_clt.Size = new System.Drawing.Size(145, 21);
this.tb_clt.TabIndex = 76;
this.tb_clt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(277, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(65, 12);
this.label1.TabIndex = 75;
this.label1.Text = "매출거래처";
//
// btn_Lookup
//
this.btn_Lookup.Location = new System.Drawing.Point(858, 8);
this.btn_Lookup.Name = "btn_Lookup";
this.btn_Lookup.Size = new System.Drawing.Size(75, 23);
this.btn_Lookup.TabIndex = 79;
this.btn_Lookup.Text = "조 회";
this.btn_Lookup.UseVisualStyleBackColor = true;
this.btn_Lookup.Click += new System.EventHandler(this.btn_Lookup_Click);
//
// btn_Close
//
this.btn_Close.Location = new System.Drawing.Point(945, 8);
this.btn_Close.Name = "btn_Close";
this.btn_Close.Size = new System.Drawing.Size(75, 23);
this.btn_Close.TabIndex = 81;
this.btn_Close.Text = "닫 기";
this.btn_Close.UseVisualStyleBackColor = true;
this.btn_Close.Click += new System.EventHandler(this.btn_Close_Click);
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.out_date,
this.clt,
this.tel,
this.content,
this.count,
this.total,
this.in_per,
this.out_per,
this.in_price,
this.out_price,
this.dif,
this.etc});
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
this.dataGridView1.Location = new System.Drawing.Point(12, 58);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 20;
this.dataGridView1.RowTemplate.Height = 23;
this.dataGridView1.Size = new System.Drawing.Size(1151, 421);
this.dataGridView1.TabIndex = 82;
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;
//
// clt
//
this.clt.HeaderText = "매출거래처";
this.clt.Name = "clt";
this.clt.Width = 150;
//
// tel
//
this.tel.HeaderText = "전화번호";
this.tel.Name = "tel";
//
// content
//
this.content.HeaderText = "내용";
this.content.Name = "content";
this.content.Width = 200;
//
// count
//
this.count.HeaderText = "수량";
this.count.Name = "count";
this.count.Width = 40;
//
// total
//
this.total.HeaderText = "총액";
this.total.Name = "total";
this.total.Width = 80;
//
// in_per
//
this.in_per.HeaderText = "입고율";
this.in_per.Name = "in_per";
this.in_per.Width = 60;
//
// out_per
//
this.out_per.HeaderText = "출고율";
this.out_per.Name = "out_per";
this.out_per.Width = 60;
//
// in_price
//
this.in_price.HeaderText = "매입금액";
this.in_price.Name = "in_price";
this.in_price.Width = 80;
//
// out_price
//
this.out_price.HeaderText = "매출금액";
this.out_price.Name = "out_price";
this.out_price.Width = 80;
//
// dif
//
this.dif.HeaderText = "차이";
this.dif.Name = "dif";
this.dif.Width = 80;
//
// etc
//
this.etc.HeaderText = "비고";
this.etc.Name = "etc";
//
// panel1
//
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.panel1.Controls.Add(this.label4);
this.panel1.Controls.Add(this.label2);
this.panel1.Controls.Add(this.Start_Date);
this.panel1.Controls.Add(this.btn_Close);
this.panel1.Controls.Add(this.End_Date);
this.panel1.Controls.Add(this.btn_Lookup);
this.panel1.Controls.Add(this.label1);
this.panel1.Controls.Add(this.textBox2);
this.panel1.Controls.Add(this.tb_clt);
this.panel1.Controls.Add(this.label3);
this.panel1.Location = new System.Drawing.Point(12, 12);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1051, 40);
this.panel1.TabIndex = 83;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(157, 13);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(14, 12);
this.label4.TabIndex = 37;
this.label4.Text = "~";
//
// Sales_Lookup
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1176, 491);
this.Controls.Add(this.panel1);
this.Controls.Add(this.dataGridView1);
this.Name = "Sales_Lookup";
this.Text = " 매출 조회";
this.Load += new System.EventHandler(this.Sales_Book_Load);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.DateTimePicker End_Date;
private System.Windows.Forms.DateTimePicker Start_Date;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Button btn_Close;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Panel panel1;
public System.Windows.Forms.TextBox tb_clt;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.DataGridViewTextBoxColumn out_date;
private System.Windows.Forms.DataGridViewTextBoxColumn clt;
private System.Windows.Forms.DataGridViewTextBoxColumn tel;
private System.Windows.Forms.DataGridViewTextBoxColumn content;
private System.Windows.Forms.DataGridViewTextBoxColumn count;
private System.Windows.Forms.DataGridViewTextBoxColumn total;
private System.Windows.Forms.DataGridViewTextBoxColumn in_per;
private System.Windows.Forms.DataGridViewTextBoxColumn out_per;
private System.Windows.Forms.DataGridViewTextBoxColumn in_price;
private System.Windows.Forms.DataGridViewTextBoxColumn out_price;
private System.Windows.Forms.DataGridViewTextBoxColumn dif;
private System.Windows.Forms.DataGridViewTextBoxColumn etc;
public System.Windows.Forms.Button btn_Lookup;
}
}

View File

@@ -0,0 +1,170 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
// 추가된 참조
using WindowsFormsApp1.Delivery;
namespace WindowsFormsApp1.Account
{
public partial class Sales_Lookup : Form
{
public string compidx;
Main main;
Helper_DB db = new Helper_DB();
public Sales_Lookup(Main _main)
{
InitializeComponent();
main = _main;
compidx = main.com_idx;
}
private void Sales_Book_Load(object sender, EventArgs e)
{
db.DBcon();
Start_Date.Value = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1);
}
public void btn_Lookup_Click(object sender, EventArgs e)
{
string table = "`date`, `client`, `tel`, `book_name`, `in_per`, " +
"`out_per`, `in_price`, `out_price`, `total`, `etc`";
string start = Start_Date.Text.Substring(0, 10);
string end = End_Date.Text.Substring(0, 10);
string data_base = db.Search_Date("Sales", table, "date", start, end, compidx);
input_Grid(data_base);
}
private void input_Grid(string value)
{
/* 조회기간, 매출거래처, 전화번호, 내용, 수량, 총액
* 입고율, 출고율, 매입금액, 매출금액, 차이, 비고 */
string[] grid = { "", "", "", "", "", "",
"", "", "", "", "", "" };
string[] data = { "", "", "", "", "",
"", "", "", "", "" };
string[] ary = value.Split('|');
int cot = 10;
for(int a = 0; a < ary.Length; a++)
{
if (a % cot == 0) { data[0] = ary[a]; }
if (a % cot == 1) { data[1] = ary[a]; }
if (a % cot == 2) { data[2] = ary[a]; }
if (a % cot == 3) { data[3] = ary[a]; }
if (a % cot == 4) { data[4] = ary[a]; }
if (a % cot == 5) { data[5] = ary[a]; }
if (a % cot == 6) { data[6] = ary[a]; }
if (a % cot == 7) { data[7] = ary[a]; }
if (a % cot == 8) { data[8] = ary[a]; }
if (a % cot == 9) { data[9] = ary[a];
if (tb_clt.Text != "")
{
if (data[1] != tb_clt.Text) { continue; }
}
grid_data_check(grid, data);
}
}
}
private void grid_data_check(string[] grid, string[] data)
{
/* data: 0.출고일자 / 1.거래처 / 2.전화번호 / 3.내용 / 4.입고율 /
* 5.출고율 / 6.입고금액 / 7.출고금액 / 8.합계 / 9.비고
*
*
* grid: 0.조회기간 / 1.거래처 / 2.전화번호 / 3.내용 / 4.수량 /
* 5.총합계 / 6.입고율 / 7.출고율 / 8.매입금액 / 9.매출금액 / 10.차이 / 11.비고
*
* out_date / clt / tel / content / count /
* total / in_per / out_per / in_price / out_price / dif / etc
*/
if (data[3] == "" && data[5] == "0") { return; }
if (dataGridView1.Rows.Count <= 0)
{
base_Setting(grid, data);
return;
}
for(int a = 0; a < dataGridView1.Rows.Count; a++)
{
if (dataGridView1.Rows[a].Cells["out_date"].Value.ToString() == data[0] &&
dataGridView1.Rows[a].Cells["clt"].Value.ToString() == data[1] &&
dataGridView1.Rows[a].Cells["tel"].Value.ToString() == data[2]) {
int count = Convert.ToInt32(dataGridView1.Rows[a].Cells["count"].Value.ToString());
int total = Convert.ToInt32(dataGridView1.Rows[a].Cells["total"].Value.ToString());
int in_per = Convert.ToInt32(dataGridView1.Rows[a].Cells["in_per"].Value.ToString());
int out_per = Convert.ToInt32(dataGridView1.Rows[a].Cells["out_per"].Value.ToString());
count++;
total = total + Convert.ToInt32(data[8]);
in_per = (in_per + Convert.ToInt32(data[4])) / count;
out_per = (out_per + Convert.ToInt32(data[5])) / count;
int in_price = persent(in_per, total);
int out_price = persent(out_per, total);
int dif = out_price - in_price;
dataGridView1.Rows[a].Cells["content"].Value = data[3];
dataGridView1.Rows[a].Cells["count"].Value = count.ToString();
dataGridView1.Rows[a].Cells["total"].Value = total.ToString();
dataGridView1.Rows[a].Cells["in_per"].Value = in_per.ToString();
dataGridView1.Rows[a].Cells["out_per"].Value = out_per.ToString();
dataGridView1.Rows[a].Cells["in_price"].Value = in_price.ToString();
dataGridView1.Rows[a].Cells["out_price"].Value = out_price.ToString();
dataGridView1.Rows[a].Cells["dif"].Value = dif.ToString();
return;
}
else
{
base_Setting(grid, data);
return;
}
}
}
private void base_Setting(string[] grid, string[] data)
{
grid[0] = data[0];
grid[1] = data[1];
grid[2] = data[2];
grid[3] = data[3];
grid[4] = "1";
grid[5] = data[8];
grid[6] = data[4];
grid[7] = data[5];
grid[8] = data[6];
grid[9] = data[7];
int dif = Convert.ToInt32(grid[9]) - Convert.ToInt32(grid[8]);
grid[10] = dif.ToString();
grid[11] = data[9];
dataGridView1.Rows.Add(grid);
return;
}
private int persent(int per, int total)
{
return per * total / 100;
}
private void btn_Close_Click(object sender, EventArgs e)
{
this.Close();
}
private void textBox1_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter) {
Commodity_Search cs = new Commodity_Search(this);
cs.Clinet_name = tb_clt.Text;
cs.Show();
}
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
}
}
}

View File

@@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="out_date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="clt.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="tel.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="content.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="total.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="in_per.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="out_per.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="in_price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="out_price.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="dif.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="etc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>