=====* unimarc *=====
===== 작업중 ===== 주문관리 폼 재 수정작업중 - 팩스 및 이메일 기록 폼 제작해야함. - 제작완료 (현재 목록등록 -> 수정버튼 작업중) ㄴ> 작업 완료후 검토하고, 회계로 넘어갈 것. - 회계전환 회계전환. 매출상세(Sales_Detail.cs) 폼 작업완료. (버튼 이벤트 작업진행중) ㄴ> 매출집계에서 상세까지 가는 도중 MDI 부모로 적용되지않는 버그 수정작업중. ===== 보류 ===== 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:
48
unimarc/WindowsFormsApp1/회계/Sales_Book.Designer.cs
generated
48
unimarc/WindowsFormsApp1/회계/Sales_Book.Designer.cs
generated
@@ -29,12 +29,12 @@ namespace WindowsFormsApp1.회계
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.tb_clt = new System.Windows.Forms.TextBox();
|
||||
this.label1 = new System.Windows.Forms.Label();
|
||||
@@ -157,14 +157,14 @@ namespace WindowsFormsApp1.회계
|
||||
//
|
||||
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;
|
||||
dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle7.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle7.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
|
||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.out_date,
|
||||
this.content,
|
||||
@@ -197,40 +197,40 @@ namespace WindowsFormsApp1.회계
|
||||
//
|
||||
// count
|
||||
//
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
this.count.DefaultCellStyle = dataGridViewCellStyle2;
|
||||
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
this.count.DefaultCellStyle = dataGridViewCellStyle8;
|
||||
this.count.HeaderText = "수량";
|
||||
this.count.Name = "count";
|
||||
this.count.Width = 40;
|
||||
//
|
||||
// out_per
|
||||
//
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
this.out_per.DefaultCellStyle = dataGridViewCellStyle3;
|
||||
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
this.out_per.DefaultCellStyle = dataGridViewCellStyle9;
|
||||
this.out_per.HeaderText = "출고율";
|
||||
this.out_per.Name = "out_per";
|
||||
this.out_per.Width = 60;
|
||||
//
|
||||
// out_price
|
||||
//
|
||||
dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
this.out_price.DefaultCellStyle = dataGridViewCellStyle4;
|
||||
dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
this.out_price.DefaultCellStyle = dataGridViewCellStyle10;
|
||||
this.out_price.HeaderText = "매출금액";
|
||||
this.out_price.Name = "out_price";
|
||||
this.out_price.Width = 80;
|
||||
//
|
||||
// in_price
|
||||
//
|
||||
dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
this.in_price.DefaultCellStyle = dataGridViewCellStyle5;
|
||||
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
this.in_price.DefaultCellStyle = dataGridViewCellStyle11;
|
||||
this.in_price.HeaderText = "입금액";
|
||||
this.in_price.Name = "in_price";
|
||||
this.in_price.Width = 80;
|
||||
//
|
||||
// now_money
|
||||
//
|
||||
dataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight;
|
||||
this.now_money.DefaultCellStyle = dataGridViewCellStyle6;
|
||||
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;
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace WindowsFormsApp1.회계
|
||||
{
|
||||
public partial class Sales_Book : Form
|
||||
{
|
||||
Main main;
|
||||
Sales_Deposit sd;
|
||||
Helper_DB db = new Helper_DB();
|
||||
public string compidx;
|
||||
@@ -23,6 +24,12 @@ namespace WindowsFormsApp1.회계
|
||||
sd = _sd;
|
||||
compidx = sd.compidx;
|
||||
}
|
||||
public Sales_Book(Main _main)
|
||||
{
|
||||
InitializeComponent();
|
||||
main = _main;
|
||||
compidx = main.com_idx;
|
||||
}
|
||||
private void Sales_Book_Load(object sender, EventArgs e)
|
||||
{
|
||||
db.DBcon();
|
||||
@@ -32,7 +39,7 @@ namespace WindowsFormsApp1.회계
|
||||
dataGridView1.Rows.Clear();
|
||||
// grid
|
||||
// [0]매출일자 / [1]내용 / [2]수량 / [3]출고율 / [4]매출금액 / [5]입금액 / [6]현잔액 / [7]비고
|
||||
string[] grid = { "", "", "", "", "", "", "", "" };
|
||||
string[] grid = { "", "", "", "", "", "", "0", "" };
|
||||
// db
|
||||
// [0]매출일자 / [1]책이름 / [2]수량 / [3]출고율 / [4]매출금액 / [5]입금액 / [6]비고 / [7]입금구분
|
||||
string Area = "`date`, `book_name`, `count`, `out_per`, `out_price`, `deposit`, `etc`, `gu`";
|
||||
@@ -96,10 +103,10 @@ namespace WindowsFormsApp1.회계
|
||||
}
|
||||
else if (!date_chk)
|
||||
{
|
||||
set_remain(grid);
|
||||
set_remain(grid, row);
|
||||
}
|
||||
}
|
||||
private void set_remain(string[] grid)
|
||||
private void set_remain(string[] grid, int row)
|
||||
{
|
||||
if (dataGridView1.Rows.Count <= 0) {
|
||||
string[] grid_base = { "이월미수금", "", "", "", "", "", "0", "" };
|
||||
@@ -115,11 +122,20 @@ namespace WindowsFormsApp1.회계
|
||||
{
|
||||
for(int a = 0; a < count; a++)
|
||||
{
|
||||
if(a <= 0) { continue; }
|
||||
if (dataGridView1.Rows[0].Cells["out_date"].Value.ToString() != "이월미수금") {
|
||||
string[] grid_base = { "이월미수금", "", "", "", "", "", "0", "" };
|
||||
dataGridView1.Rows.Insert(0, grid_base);
|
||||
count++;
|
||||
}
|
||||
|
||||
int money_idx = a - 1;
|
||||
if (a - 1 < 1) { money_idx = 0; }
|
||||
if (a < 1) { 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());
|
||||
int money = Convert.ToInt32(dataGridView1.Rows[money_idx].Cells["now_money"].Value.ToString());
|
||||
|
||||
set_total(cout, out_price, in_price);
|
||||
|
||||
@@ -183,14 +199,13 @@ namespace WindowsFormsApp1.회계
|
||||
dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 카드" ||
|
||||
dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 현금" ||
|
||||
dataGridView1.Rows[row].Cells["content"].Value.ToString() == "입금 어음") { return; }
|
||||
|
||||
Sales_Detail sde = new Sales_Detail(this);
|
||||
string out_date = dataGridView1.Rows[e.RowIndex].Cells["out_date"].Value.ToString().Substring(0, 10).Replace("-", "");
|
||||
int yesr = Convert.ToInt32(out_date.Substring(0, 4));
|
||||
int month = Convert.ToInt32(out_date.Substring(4, 2));
|
||||
int day = Convert.ToInt32(out_date.Substring(6, 2));
|
||||
// sde.MdiParent = main;
|
||||
sde.WindowState = FormWindowState.Maximized;
|
||||
sde.MdiParent = main;
|
||||
// sde.WindowState = FormWindowState.Maximized;
|
||||
sde.Out_Date.Value = new DateTime(yesr, month, day);
|
||||
sde.tb_clt.Text = tb_clt.Text;
|
||||
sde.Show();
|
||||
|
||||
@@ -270,7 +270,7 @@ namespace WindowsFormsApp1.Account
|
||||
dataGridView1.Columns[6].HeaderText = "기간잔고";
|
||||
dataGridView1.Columns[7].HeaderText = "최종잔고";
|
||||
}
|
||||
// btn_Lookup_Click(null, null);
|
||||
btn_Lookup_Click(null, null);
|
||||
}
|
||||
private void btn_Close_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -284,6 +284,7 @@ namespace WindowsFormsApp1.Account
|
||||
}
|
||||
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if (rb_Date.Checked) return;
|
||||
if (e.RowIndex < 0) { return; }
|
||||
Sales_Book sb = new Sales_Book(this);
|
||||
sb.row = e.RowIndex;
|
||||
|
||||
206
unimarc/WindowsFormsApp1/회계/Sales_Detail.Designer.cs
generated
206
unimarc/WindowsFormsApp1/회계/Sales_Detail.Designer.cs
generated
@@ -29,13 +29,26 @@ namespace WindowsFormsApp1.회계
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
|
||||
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = 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.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.author = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.out_per = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.in_per = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.list_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.out_price = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.in_price = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.textBox1 = new System.Windows.Forms.TextBox();
|
||||
this.textBox2 = new System.Windows.Forms.TextBox();
|
||||
this.textBox3 = new System.Windows.Forms.TextBox();
|
||||
@@ -55,19 +68,7 @@ namespace WindowsFormsApp1.회계
|
||||
this.btn_save = new System.Windows.Forms.Button();
|
||||
this.tb_out_per = new System.Windows.Forms.TextBox();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.idx = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.author = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.out_per = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.in_per = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.list_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.list_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.out_price = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.in_price = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.etc = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.btn_lookup = new System.Windows.Forms.Button();
|
||||
this.panel1.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
@@ -124,14 +125,14 @@ namespace WindowsFormsApp1.회계
|
||||
//
|
||||
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;
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Control;
|
||||
dataGridViewCellStyle3.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
dataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.WindowText;
|
||||
dataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight;
|
||||
dataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
|
||||
dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
|
||||
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
|
||||
this.idx,
|
||||
this.book_name,
|
||||
@@ -155,6 +156,82 @@ namespace WindowsFormsApp1.회계
|
||||
this.dataGridView1.TabIndex = 83;
|
||||
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
||||
//
|
||||
// idx
|
||||
//
|
||||
this.idx.HeaderText = "idx";
|
||||
this.idx.Name = "idx";
|
||||
this.idx.Visible = false;
|
||||
//
|
||||
// book_name
|
||||
//
|
||||
this.book_name.HeaderText = "도서명";
|
||||
this.book_name.Name = "book_name";
|
||||
this.book_name.Width = 250;
|
||||
//
|
||||
// author
|
||||
//
|
||||
this.author.HeaderText = "저자";
|
||||
this.author.Name = "author";
|
||||
//
|
||||
// book_comp
|
||||
//
|
||||
this.book_comp.HeaderText = "출판사";
|
||||
this.book_comp.Name = "book_comp";
|
||||
//
|
||||
// price
|
||||
//
|
||||
this.price.HeaderText = "정가";
|
||||
this.price.Name = "price";
|
||||
this.price.Width = 70;
|
||||
//
|
||||
// count
|
||||
//
|
||||
this.count.HeaderText = "수량";
|
||||
this.count.Name = "count";
|
||||
this.count.Width = 50;
|
||||
//
|
||||
// out_per
|
||||
//
|
||||
this.out_per.HeaderText = "O%";
|
||||
this.out_per.Name = "out_per";
|
||||
this.out_per.Width = 40;
|
||||
//
|
||||
// in_per
|
||||
//
|
||||
this.in_per.HeaderText = "I%";
|
||||
this.in_per.Name = "in_per";
|
||||
this.in_per.Width = 40;
|
||||
//
|
||||
// list_date
|
||||
//
|
||||
this.list_date.HeaderText = "목록일자";
|
||||
this.list_date.Name = "list_date";
|
||||
this.list_date.Width = 80;
|
||||
//
|
||||
// list_name
|
||||
//
|
||||
this.list_name.HeaderText = "목록명";
|
||||
this.list_name.Name = "list_name";
|
||||
this.list_name.Width = 170;
|
||||
//
|
||||
// out_price
|
||||
//
|
||||
this.out_price.HeaderText = "출고가";
|
||||
this.out_price.Name = "out_price";
|
||||
this.out_price.Width = 80;
|
||||
//
|
||||
// in_price
|
||||
//
|
||||
this.in_price.HeaderText = "입고가";
|
||||
this.in_price.Name = "in_price";
|
||||
this.in_price.Width = 80;
|
||||
//
|
||||
// etc
|
||||
//
|
||||
this.etc.HeaderText = "비고";
|
||||
this.etc.Name = "etc";
|
||||
this.etc.Width = 130;
|
||||
//
|
||||
// textBox1
|
||||
//
|
||||
this.textBox1.Enabled = false;
|
||||
@@ -305,6 +382,7 @@ namespace WindowsFormsApp1.회계
|
||||
this.tb_out_per.Name = "tb_out_per";
|
||||
this.tb_out_per.Size = new System.Drawing.Size(53, 21);
|
||||
this.tb_out_per.TabIndex = 86;
|
||||
this.tb_out_per.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_out_per_KeyDown);
|
||||
this.tb_out_per.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.tb_out_per_KeyPress);
|
||||
//
|
||||
// label3
|
||||
@@ -316,81 +394,15 @@ namespace WindowsFormsApp1.회계
|
||||
this.label3.TabIndex = 0;
|
||||
this.label3.Text = "할인율";
|
||||
//
|
||||
// idx
|
||||
// btn_lookup
|
||||
//
|
||||
this.idx.HeaderText = "idx";
|
||||
this.idx.Name = "idx";
|
||||
this.idx.Visible = false;
|
||||
//
|
||||
// book_name
|
||||
//
|
||||
this.book_name.HeaderText = "도서명";
|
||||
this.book_name.Name = "book_name";
|
||||
this.book_name.Width = 250;
|
||||
//
|
||||
// author
|
||||
//
|
||||
this.author.HeaderText = "저자";
|
||||
this.author.Name = "author";
|
||||
//
|
||||
// book_comp
|
||||
//
|
||||
this.book_comp.HeaderText = "출판사";
|
||||
this.book_comp.Name = "book_comp";
|
||||
//
|
||||
// price
|
||||
//
|
||||
this.price.HeaderText = "정가";
|
||||
this.price.Name = "price";
|
||||
this.price.Width = 70;
|
||||
//
|
||||
// count
|
||||
//
|
||||
this.count.HeaderText = "수량";
|
||||
this.count.Name = "count";
|
||||
this.count.Width = 50;
|
||||
//
|
||||
// out_per
|
||||
//
|
||||
this.out_per.HeaderText = "O%";
|
||||
this.out_per.Name = "out_per";
|
||||
this.out_per.Width = 40;
|
||||
//
|
||||
// in_per
|
||||
//
|
||||
this.in_per.HeaderText = "I%";
|
||||
this.in_per.Name = "in_per";
|
||||
this.in_per.Width = 40;
|
||||
//
|
||||
// list_date
|
||||
//
|
||||
this.list_date.HeaderText = "목록일자";
|
||||
this.list_date.Name = "list_date";
|
||||
this.list_date.Width = 80;
|
||||
//
|
||||
// list_name
|
||||
//
|
||||
this.list_name.HeaderText = "목록명";
|
||||
this.list_name.Name = "list_name";
|
||||
this.list_name.Width = 170;
|
||||
//
|
||||
// out_price
|
||||
//
|
||||
this.out_price.HeaderText = "출고가";
|
||||
this.out_price.Name = "out_price";
|
||||
this.out_price.Width = 80;
|
||||
//
|
||||
// in_price
|
||||
//
|
||||
this.in_price.HeaderText = "입고가";
|
||||
this.in_price.Name = "in_price";
|
||||
this.in_price.Width = 80;
|
||||
//
|
||||
// etc
|
||||
//
|
||||
this.etc.HeaderText = "비고";
|
||||
this.etc.Name = "etc";
|
||||
this.etc.Width = 130;
|
||||
this.btn_lookup.Location = new System.Drawing.Point(493, 35);
|
||||
this.btn_lookup.Name = "btn_lookup";
|
||||
this.btn_lookup.Size = new System.Drawing.Size(75, 23);
|
||||
this.btn_lookup.TabIndex = 85;
|
||||
this.btn_lookup.Text = "조 회";
|
||||
this.btn_lookup.UseVisualStyleBackColor = true;
|
||||
this.btn_lookup.Click += new System.EventHandler(this.btn_lookup_Click);
|
||||
//
|
||||
// Sales_Detail
|
||||
//
|
||||
@@ -398,6 +410,7 @@ namespace WindowsFormsApp1.회계
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1266, 518);
|
||||
this.Controls.Add(this.tb_out_per);
|
||||
this.Controls.Add(this.btn_lookup);
|
||||
this.Controls.Add(this.btn_save);
|
||||
this.Controls.Add(this.label3);
|
||||
this.Controls.Add(this.btn_close);
|
||||
@@ -469,5 +482,6 @@ namespace WindowsFormsApp1.회계
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn out_price;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn in_price;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn etc;
|
||||
private System.Windows.Forms.Button btn_lookup;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@ namespace WindowsFormsApp1.회계
|
||||
{
|
||||
public string compidx;
|
||||
Helper_DB db = new Helper_DB();
|
||||
Main main;
|
||||
Sales_Book sb;
|
||||
Sales_Lookup sl;
|
||||
public Sales_Detail(Sales_Book _sb)
|
||||
@@ -23,6 +24,11 @@ namespace WindowsFormsApp1.회계
|
||||
sb = _sb;
|
||||
compidx = sb.compidx;
|
||||
}
|
||||
public Sales_Detail(Main _main)
|
||||
{
|
||||
InitializeComponent();
|
||||
main = _main;
|
||||
}
|
||||
public Sales_Detail(Sales_Lookup _sl)
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -33,40 +39,7 @@ namespace WindowsFormsApp1.회계
|
||||
{
|
||||
db.DBcon();
|
||||
|
||||
string area = "`idx`, `book_name`, `author`, `book_comp`, `price`, " +
|
||||
"`count`, `out_per`, `in_per`, `list_date`, `list_name`, " +
|
||||
"`out_price`, `in_price`, `etc`";
|
||||
|
||||
string[] search_col = { "compidx", "date", "client" };
|
||||
string[] search_data = { compidx, Out_Date.Value.ToString().Substring(0, 10), tb_clt.Text };
|
||||
string db_data = db.More_DB_Search("Sales", search_col, search_data, area);
|
||||
string[] ary = db_data.Split('|');
|
||||
input_grid(ary);
|
||||
}
|
||||
void input_grid(string[] db_data)
|
||||
{
|
||||
string[] grid = { "", "", "", "", "",
|
||||
"", "", "", "", "",
|
||||
"", "", "" };
|
||||
int cnt = 13;
|
||||
for (int a = 0; a < db_data.Length; a++)
|
||||
{
|
||||
if (a % cnt == 0) { grid[0] = db_data[a]; }
|
||||
if (a % cnt == 1) { grid[1] = db_data[a]; }
|
||||
if (a % cnt == 2) { grid[2] = db_data[a]; }
|
||||
if (a % cnt == 3) { grid[3] = db_data[a]; }
|
||||
if (a % cnt == 4) { grid[4] = db_data[a]; }
|
||||
if (a % cnt == 5) { grid[5] = db_data[a]; }
|
||||
if (a % cnt == 6) { grid[6] = db_data[a]; }
|
||||
if (a % cnt == 7) { grid[7] = db_data[a]; }
|
||||
if (a % cnt == 8) { grid[8] = db_data[a]; }
|
||||
if (a % cnt == 9) { grid[9] = db_data[a]; }
|
||||
if (a % cnt == 10) { grid[10] = db_data[a]; }
|
||||
if (a % cnt == 11) { grid[11] = db_data[a]; }
|
||||
if (a % cnt == 12) { grid[12] = db_data[a];
|
||||
dataGridView1.Rows.Add(grid);
|
||||
}
|
||||
}
|
||||
btn_lookup_Click(null, null);
|
||||
}
|
||||
private void btn_per_change_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -89,13 +62,73 @@ namespace WindowsFormsApp1.회계
|
||||
int res = Convert.ToInt32(res_do);
|
||||
dataGridView1.Rows[row].Cells["out_price"].Value = res.ToString();
|
||||
}
|
||||
private void btn_lookup_Click(object sender, EventArgs e)
|
||||
{
|
||||
dataGridView1.Rows.Clear();
|
||||
string area = "`idx`, `book_name`, `author`, `book_comp`, `price`, " +
|
||||
"`count`, `out_per`, `in_per`, `list_date`, `list_name`, " +
|
||||
"`out_price`, `in_price`, `etc`";
|
||||
|
||||
string[] search_col = { "compidx", "date", "client" };
|
||||
string[] search_data = { compidx, Out_Date.Value.ToString().Substring(0, 10), tb_clt.Text };
|
||||
string db_data = db.More_DB_Search("Sales", search_col, search_data, area);
|
||||
string[] ary = db_data.Split('|');
|
||||
input_grid(ary);
|
||||
}
|
||||
void input_grid(string[] db_data)
|
||||
{
|
||||
string[] grid = { "", "", "", "", "",
|
||||
"", "", "", "", "",
|
||||
"", "", "" };
|
||||
int cnt = 13;
|
||||
for (int a = 0; a < db_data.Length; a++)
|
||||
{
|
||||
if (a % cnt == 0) { grid[0] = db_data[a]; }
|
||||
if (a % cnt == 1) { grid[1] = db_data[a]; }
|
||||
if (a % cnt == 2) { grid[2] = db_data[a]; }
|
||||
if (a % cnt == 3) { grid[3] = db_data[a]; }
|
||||
if (a % cnt == 4) { grid[4] = db_data[a]; }
|
||||
if (a % cnt == 5) { grid[5] = db_data[a]; }
|
||||
if (a % cnt == 6) { grid[6] = db_data[a]; }
|
||||
if (a % cnt == 7) { grid[7] = db_data[a]; }
|
||||
if (a % cnt == 8) { grid[8] = db_data[a]; }
|
||||
if (a % cnt == 9) { grid[9] = db_data[a]; }
|
||||
if (a % cnt == 10) { grid[10] = db_data[a]; }
|
||||
if (a % cnt == 11) { grid[11] = db_data[a]; }
|
||||
if (a % cnt == 12)
|
||||
{
|
||||
grid[12] = db_data[a];
|
||||
dataGridView1.Rows.Add(grid);
|
||||
}
|
||||
}
|
||||
}
|
||||
private void btn_save_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(MessageBox.Show("저장하시겠습니까?", "저장", MessageBoxButtons.YesNo) == DialogResult.No) {
|
||||
return;
|
||||
}
|
||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||
{
|
||||
string[] search_col = { "idx", "compidx" };
|
||||
string[] search_data = { dataGridView1.Rows[a].Cells["idx"].Value.ToString(), compidx };
|
||||
string[] edit_col = { "out_per", "out_price" };
|
||||
string[] edit_data = { dataGridView1.Rows[a].Cells["out_per"].Value.ToString(),
|
||||
dataGridView1.Rows[a].Cells["out_price"].Value.ToString() };
|
||||
|
||||
db.More_Update("Sales", edit_col, edit_data, search_col, search_data);
|
||||
}
|
||||
MessageBox.Show("저장되었습니다.", "저장", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
private void btn_delete_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
if (MessageBox.Show("삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.No) {
|
||||
return;
|
||||
}
|
||||
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
||||
{
|
||||
db.DB_Delete("Sales", "compidx", compidx, "idx", dataGridView1.Rows[a].Cells["idx"].Value.ToString());
|
||||
}
|
||||
MessageBox.Show("삭제되었습니다.", "삭제", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
private void btn_close_Click(object sender, EventArgs e)
|
||||
{
|
||||
@@ -111,6 +144,13 @@ namespace WindowsFormsApp1.회계
|
||||
String_Text st = new String_Text();
|
||||
st.Only_Int(sender, e);
|
||||
}
|
||||
|
||||
private void tb_out_per_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter) {
|
||||
btn_per_change_Click(null, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// 목록일자 + " " + 납품처
|
||||
|
||||
Reference in New Issue
Block a user