------------------------ =====* ISBN 체크 프로그램 *===== ★작업완료★ a. 현재 마크팀 배포완료. - 추후 수정사항발생시 수정할 것. ------------------------ ===== 작업중 ===== b. 마크목록 폼 작성중 1. 엑셀반출 기능 추가중 사용 작업중 ===== 완료 ===== 1. 주문관리 팩스연동 완료 2. 전송된 팩스 확인 작업개시, 이메일 전송모듈 수정완료. 3. 주문관리에서 주문처와 목록 검색하는 폼 검색 모듈도 재수정 완료함. ISBN 체크 프로그램 => 본프로그램에 이식중. ㄴ> 코드는 다 옮겼으나 기존 사용하던 방식과 조금 달라서 버그발생 가능성 있음. ㄴ> 버그 체크 계속 해볼것. 21-04-15 ㄴ> 21_04_20 버그 없음. 2. 마크편집 폼 수정 중 (마크 반출 test프로젝트 진행완료, 본 프로젝트에 적용중. / 저장기능활성화 작업완료) 2-1. 기존의 칸채우기에서 예상되지 못한 버그가 발생하여 칸채우기 숨김. 2-2. 008태크 재배치 => TextBox에 적용완료. 변경사항 메모장으로 넘기는 작업 완료. 2-3. 저장기능 완료. (04.14 체크해볼것)
152 lines
5.2 KiB
C#
152 lines
5.2 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.Account;
|
|
|
|
namespace WindowsFormsApp1.Delivery
|
|
{
|
|
public partial class Order_input_Search : Form
|
|
{
|
|
Order_input oin;
|
|
Purchase_Book pb;
|
|
Remit_reg2 rem2;
|
|
Helper_DB db = new Helper_DB();
|
|
|
|
int grididx = 0;
|
|
public string Where_Open;
|
|
public string searchText;
|
|
string compidx;
|
|
|
|
public Order_input_Search(Order_input o_in)
|
|
{
|
|
InitializeComponent();
|
|
oin = o_in;
|
|
compidx = oin.compidx;
|
|
}
|
|
public Order_input_Search(Remit_reg2 _rem2)
|
|
{
|
|
InitializeComponent();
|
|
rem2 = _rem2;
|
|
compidx = rem2.compidx;
|
|
searchText = rem2.tb_purchase.Text;
|
|
}
|
|
public Order_input_Search(Purchase_Book _pb)
|
|
{
|
|
InitializeComponent();
|
|
pb = _pb;
|
|
compidx = pb.compidx;
|
|
searchText = pb.tb_purchase.Text;
|
|
}
|
|
public Order_input_Search()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
private void Order_input_Search_Load(object sender, EventArgs e)
|
|
{
|
|
db.DBcon();
|
|
if(Where_Open == "book_list") {
|
|
if(searchText == "") {
|
|
string cmd = db.DB_Contains("Obj_List", compidx,
|
|
"", "", "`list_name`, `charge`, `state`");
|
|
made_grid(cmd);
|
|
}
|
|
else {
|
|
string cmd = db.DB_Contains("Obj_List", compidx,
|
|
"list_name", searchText, "`list_name`, `charge`, `state`");
|
|
made_grid(cmd);
|
|
}
|
|
}
|
|
else if(Where_Open == "Order") {
|
|
list_name.HeaderText = "주문처";
|
|
charge.HeaderText = "대표자";
|
|
state.HeaderText = "종목";
|
|
|
|
string cmd = db.DB_Contains("Purchase", compidx,
|
|
"sangho", searchText, "`sangho`, `boss`, `jongmok`");
|
|
made_grid(cmd);
|
|
}
|
|
}
|
|
private void made_grid(string strValue)
|
|
{
|
|
string[] data = strValue.Split('|');
|
|
dataGridView1.Rows.Clear();
|
|
string[] res = { "", "", "" };
|
|
for (int a = 0; a < data.Length; a++)
|
|
{
|
|
if (a % 3 == 0) { res[0] = data[a]; }
|
|
if (a % 3 == 1) { res[1] = data[a]; }
|
|
if (a % 3 == 2) { res[2] = data[a];
|
|
if(Contain_Text(res[0]))
|
|
dataGridView1.Rows.Add(res);
|
|
}
|
|
}
|
|
}
|
|
private bool Contain_Text(string ori)
|
|
{
|
|
if (ori.Contains(searchText))
|
|
return true;
|
|
|
|
return false;
|
|
}
|
|
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
grididx = e.RowIndex;
|
|
}
|
|
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
|
|
{
|
|
if (e.KeyCode == Keys.Up) { grididx--; }
|
|
if (e.KeyCode == Keys.Down) { grididx++; }
|
|
|
|
if (e.KeyCode == Keys.Enter) { dataGridView1_CellDoubleClick(null, null); }
|
|
if (e.KeyCode == Keys.Escape) { Close(); }
|
|
}
|
|
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
|
{
|
|
if (Where_Open == "") { grididx = 0; }
|
|
if (e != null) { grididx = e.RowIndex; }
|
|
if (oin != null) {
|
|
oin_result();
|
|
}
|
|
else if (pb != null) {
|
|
pb_result();
|
|
}
|
|
else if (rem2 != null) {
|
|
rem2.tb_purchase.Text = dataGridView1.Rows[grididx].Cells["list_name"].Value.ToString();
|
|
rem2.mk_base(rem2.tb_purchase.Text);
|
|
}
|
|
Close();
|
|
}
|
|
private void oin_result()
|
|
{
|
|
if (Where_Open == "book_list")
|
|
{
|
|
string[] tmp_col = { "compidx", "list_name" };
|
|
string[] tmp_data = { compidx,
|
|
dataGridView1.Rows[grididx].Cells["list_name"].Value.ToString() };
|
|
string takedata = "`order`, `order_stat`, `isbn`, `book_name`, `author`, " +
|
|
"`book_comp`, `order_count`, `count`, `pay`, `total`, " +
|
|
"`etc`, `list_name`, `order_date`, `send_date`, `header`, " +
|
|
"`num`";
|
|
string cmd = db.More_DB_Search("Obj_List_Book", tmp_col, tmp_data, takedata);
|
|
oin.made_grid(cmd, false);
|
|
oin.tb_search_book_list.Text = tmp_data[1];
|
|
}
|
|
else if (Where_Open == "Order")
|
|
{
|
|
oin.tb_orderText.Text = dataGridView1.Rows[grididx].Cells["list_name"].Value.ToString();
|
|
}
|
|
}
|
|
private void pb_result()
|
|
{
|
|
pb.tb_purchase.Text = dataGridView1.Rows[grididx].Cells["list_name"].Value.ToString();
|
|
pb.btn_Lookup_Click(null, null);
|
|
}
|
|
}
|
|
}
|