Files
Unimarc/unimarc/WindowsFormsApp1/회계/Sales_Input.cs
SeungHo Yang 3b670bf26d =====* unimarc *=====
===== 작업중 =====
주문관리 폼 재 수정작업중 - 팩스 및 이메일 기록 폼 제작해야함. - 제작완료 (현재 목록등록 -> 수정버튼 작업중)
ㄴ> 작업 완료후 검토하고, 회계로 넘어갈 것. - 회계전환
ㄴ> 회계전환. 매출입력 폼 완료. 매출장부 수정해야함. 76번줄 참고

===== 보류 =====
 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 완료
2021-05-11 18:37:18 +09:00

140 lines
4.7 KiB
C#

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_Input : Form
{
Main main;
public string compidx;
Helper_DB db = new Helper_DB();
public Sales_Input(Main _main)
{
InitializeComponent();
main = _main;
}
private void Sales_Input_Load(object sender, EventArgs e)
{
db.DBcon();
compidx = main.com_idx;
}
private void btn_Add_Click(object sender, EventArgs e)
{
if (sender != null) {
// 위 패널
tb_clt.Text = "";
tb_etc.Text = "";
}
// 아래 패널
tb_isbn.Text = "";
tb_book_name.Text = "";
tb_author.Text = "";
tb_book_comp.Text = "";
tb_price.Text = "";
tb_persent.Text = "";
tb_count.Text = "";
tb_total.Text = "";
}
private void btn_Clear_Click(object sender, EventArgs e)
{
btn_Add_Click(null, null);
}
private void btn_Total_Click(object sender, EventArgs e)
{
if (tb_price.Text != "" && tb_count.Text != "")
{
int price = Convert.ToInt32(tb_price.Text);
int count = Convert.ToInt32(tb_count.Text);
int total = price * count;
tb_total.Text = total.ToString();
}
}
private void btn_Input_Click(object sender, EventArgs e)
{
btn_Total_Click(null, null);
if (tb_book_name.Text == "") { MessageBox.Show("도서명이 입력해주세요."); return; }
// 도서명/저자/출판사/정가/출고율/부수/합계금액/ISBN
string[] grid = {
tb_book_name.Text,
tb_author.Text,
tb_book_comp.Text,
tb_price.Text,
tb_persent.Text,
tb_count.Text,
tb_total.Text,
tb_isbn.Text
};
dataGridView1.Rows.Add(grid);
btn_Clear_Click(null, null);
}
private void btn_Save_Click(object sender, EventArgs e)
{
if (tb_clt.Text == "") { MessageBox.Show("거래처를 입력해주세요."); return; }
if (dataGridView1.Rows.Count <= 0) { MessageBox.Show("저장할 내용이 없습니다."); return; }
string date = out_date.Text.Substring(0, 10);
string[] col_name = { "compidx", "date", "client", "isbn", "book_name",
"author", "book_comp", "price", "count", "total",
"out_per", "etc", "tel" };
for(int a = 0; a < dataGridView1.Rows.Count; a++)
{
string[] set_data = { compidx, date, tb_clt.Text,
dataGridView1.Rows[a].Cells["ISBN"].Value.ToString(),
dataGridView1.Rows[a].Cells["book_name"].Value.ToString(),
dataGridView1.Rows[a].Cells["author"].Value.ToString(),
dataGridView1.Rows[a].Cells["book_comp"].Value.ToString(),
dataGridView1.Rows[a].Cells["price"].Value.ToString(),
dataGridView1.Rows[a].Cells["count"].Value.ToString(),
dataGridView1.Rows[a].Cells["total"].Value.ToString(),
dataGridView1.Rows[a].Cells["persent"].Value.ToString(),
tb_etc.Text,
lbl_tel.Text
};
db.DB_INSERT("Sales", col_name, set_data);
}
}
private void chk_Add5000_CheckedChanged(object sender, EventArgs e)
{
if (chk_Add5000.Checked) { dataGridView1.Rows.Add(5000); }
else {
dataGridView1.Rows.Clear();
dataGridView1.Refresh();
}
}
private void tb_price_KeyPress(object sender, KeyPressEventArgs e)
{
String_Text st = new String_Text();
st.Only_Int(sender, e);
}
private void tb_pur_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 btn_Close_Click(object sender, EventArgs e)
{
this.Close();
}
}
}