* unimarc

a. 팩스전송 완료.
 b. 마크목록 폼 작성중
  1. 엑셀반출 기능 추가중 사용 작업중
  2. 마크편집 폼 수정 중 (마크 반출 test프로젝트 진행완료, 본 프로젝트에 적용중. / 저장기능활성화 작업완료)
   2-1. 기존의 칸채우기에서 예상되지 못한 버그가 발생하여 칸채우기 숨김.
   2-2. 008태크 재배치 => TextBox에 적용완료. 변경사항 메모장으로 넘기는 작업 완료.
   2-3. 저장기능 완료. (04.14 체크해볼것)

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

-- 작업중 --
ISBN 체크 프로그램 => 본프로그램에 이식중.
ㄴ> 코드는 다 옮겼으나 기존 사용하던 방식과 조금 달라서 버그발생 가능성 있음.
ㄴ> 버그 체크 계속 해볼것. 21-04-15

-- 완료 --
1. 주문관리 팩스연동 완료
2. 전송된 팩스 확인 작업개시, 이메일 전송모듈 수정완료.
3. 주문관리에서 주문처와 목록 검색하는 폼 검색 모듈도 재수정 완료함.
This commit is contained in:
SeungHo Yang
2021-04-15 18:36:39 +09:00
parent 2ff6f4ed89
commit c6b4702a79
32 changed files with 321 additions and 220 deletions

View File

@@ -16,17 +16,13 @@ namespace WindowsFormsApp1.Mac
{
public partial class Check_ISBN : Form
{
/// <summary>
/// 전체 보류.
/// 납품측 ISBN조회부터 작성할것.
/// </summary>
Main main;
List_aggregation list_agg;
Helper_DB db = new Helper_DB();
public string compidx;
public string list_name = string.Empty;
private int rowidx;
private bool save = false;
public Check_ISBN(Main _main)
{
InitializeComponent();
@@ -57,13 +53,14 @@ namespace WindowsFormsApp1.Mac
string tmp_data = db.More_DB_Search("Obj_List_Book", search_tbl, search_col,search_data);
string[] data = tmp_data.Split('|');
made_Grid(data);
}
private void btn_lookup_Click(object sender, EventArgs e)
{
if (cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
if (cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
clear_api();
progressBar1.Style = ProgressBarStyle.Continuous;
progressBar1.Minimum = 0;
progressBar1.Maximum = dataGridView1.Rows.Count;
@@ -86,9 +83,21 @@ namespace WindowsFormsApp1.Mac
// 총 검색 횟수, 일치, 중복
MessageBox.Show("검색이 완료되었습니다!");
progressBar1.Value = dataGridView1.Rows.Count;
dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells[0];
this.ActiveControl = dataGridView1;
rowidx = 0;
save = false;
}
/// <summary>
/// 불러와서 저장한 api값 초기화
/// </summary>
void clear_api()
{
for(int a = 0; a < dataGridView1.Rows.Count; a++)
{
dataGridView1.Rows[a].Cells["api_data"].Value = "";
}
}
private void Aladin_API(DataGridView gridview)
{
@@ -126,7 +135,6 @@ namespace WindowsFormsApp1.Mac
else if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.LightGray)
gridview.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
query = Aladin_Set_query(type, a);
insert_Aladin(api.Aladin(query, type, param), a);
}
@@ -171,7 +179,6 @@ namespace WindowsFormsApp1.Mac
else if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.LightGray)
gridview.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
#region
switch (cb_filter.SelectedIndex)
{
@@ -270,7 +277,7 @@ namespace WindowsFormsApp1.Mac
dataGridView1.Rows[row].Selected = true;
if (data.Length > 0) {
dataGridView1.Rows[row].Cells["api_data"].Value.ToString();
dataGridView1.Rows[row].Cells["api_data"].Value = data;
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
}
string[] insert = data.Split('|');
@@ -335,7 +342,7 @@ namespace WindowsFormsApp1.Mac
else
grid[7] = "";
dataGridView1.Rows[row].Cells["Column1"].Value += string.Join("|", grid) + "|";
dataGridView1.Rows[row].Cells["api_data"].Value += string.Join("|", grid) + "|";
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
}
#endregion
@@ -345,8 +352,15 @@ namespace WindowsFormsApp1.Mac
if (row > 0) dataGridView1.Rows[row - 1].Selected = false;
dataGridView1.Rows[row].Selected = true;
string newstring = DateTime.ParseExact(grid[5], "yyyyMMdd", null).ToString("yyyy-MM-dd");
string newstring = "";
try
{
newstring = DateTime.ParseExact(grid[5], "yyyyMMdd", null).ToString("yyyy-MM-dd");
}
catch (Exception e)
{
MessageBox.Show("[" + grid[5] + "]" + e.ToString());
}
input_api(grid, row, newstring);
}
@@ -377,7 +391,7 @@ namespace WindowsFormsApp1.Mac
grid[5] = data[5].Substring(0, 10);
grid[7] = data[6];
dataGridView1.Rows[row].Cells["Column1"].Value += string.Join("|", grid) + "|";
dataGridView1.Rows[row].Cells["api_data"].Value += string.Join("|", grid) + "|";
dataGridView1.Rows[row].DefaultCellStyle.BackColor = Color.LightGray;
}
@@ -386,8 +400,6 @@ namespace WindowsFormsApp1.Mac
if (row > 0) dataGridView1.Rows[row - 1].Selected = false;
dataGridView1.Rows[row].Selected = true;
bool[] chk = { false, false, false };
// string newstring = DateTime.ParseExact(grid[5], "yyyyMMdd", null).ToString("yyyy-MM-dd");
string newstring = grid[5];
input_api(grid, row, newstring);
@@ -418,6 +430,9 @@ namespace WindowsFormsApp1.Mac
if (chk[0] == true && chk[1] == true && chk[2] == true) {
dataGridView1.Rows[idx].Cells["search_book_name"].Value = value[0];
dataGridView1.Rows[idx].Cells["search_author"].Value = value[1];
dataGridView1.Rows[idx].Cells["search_book_comp"].Value = value[2];
dataGridView1.Rows[idx].Cells["isbn"].Value = value[3];
dataGridView1.Rows[idx].Cells["price"].Value = value[4];
dataGridView1.Rows[idx].Cells["pubDate"].Value = date;
@@ -433,7 +448,8 @@ namespace WindowsFormsApp1.Mac
* 비고 발행일 % 도서분류 */
string[] grid = { "", "", "", "", "",
"", "", "", "", "",
"", "", "", "", "" };
"", "", "", "", "",
"", "", "" };
int sdc = 15; // search_data_count
for (int a = 0; a < data.Length; a++)
@@ -441,19 +457,42 @@ namespace WindowsFormsApp1.Mac
if (a % sdc == 1) { grid[0] = data[a-1] + " " + data[a]; } // 번호
if (a % sdc == 2) { grid[1] = data[a]; } // isbn
if (a % sdc == 3) { grid[2] = data[a]; } // 도서명
if (a % sdc == 4) { grid[3] = data[a]; } // 저자
if (a % sdc == 5) { grid[4] = data[a]; } // 출판사
if (a % sdc == 6) { grid[5] = data[a]; } // 수량
if (a % sdc == 7) { grid[6] = data[a]; } // 단가
if (a % sdc == 8) { grid[7] = data[a]; } // 합계
if (a % sdc == 9) { grid[8] = data[a]; } // 상태
if (a % sdc == 10) { grid[9] = data[a]; } // 정가
if (a % sdc == 11) { grid[10] = data[a]; } // 비고
if (a % sdc == 12) { grid[11] = data[a]; } // 발행일
if (a % sdc == 13) { grid[12] = data[a]; } // %
if (a % sdc == 14) { grid[13] = data[a]; // 도서분류
if (a % sdc == 4) { grid[4] = data[a]; } // 저자
if (a % sdc == 5) { grid[6] = data[a]; } // 출판사
if (a % sdc == 6) { grid[8] = data[a]; } // 수량
if (a % sdc == 7) { grid[9] = data[a]; } // 단가
if (a % sdc == 8) { grid[10] = data[a]; } // 합계
if (a % sdc == 9) { grid[11] = data[a]; } // 상태
if (a % sdc == 10) { grid[12] = data[a]; } // 정가
if (a % sdc == 11) { grid[13] = data[a]; } // 비고
if (a % sdc == 12) { grid[14] = data[a]; } // 발행일
if (a % sdc == 13) { grid[15] = data[a]; } // %
if (a % sdc == 14) { grid[16] = data[a]; // 도서분류
dataGridView1.Rows.Add(grid); }
}
for(int a = 0; a < dataGridView1.Rows.Count; a++)
{
if (dataGridView1.Rows[a].Cells["isbn"].Value.ToString() != "")
{
if (dataGridView1.Rows[a].Cells["unit"].Value.ToString() !=
dataGridView1.Rows[a].Cells["price"].Value.ToString()) {
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Orange;
}
else {
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Yellow;
}
}
}
Set_grid();
}
void Set_grid()
{
for(int a = 0; a < dataGridView1.Columns.Count; a++)
{
if(dataGridView1.Columns[a].HeaderText != "ISBN13")
dataGridView1.Columns[a].ReadOnly = true;
}
}
private void btn_Save_Click(object sender, EventArgs e)
{
@@ -474,6 +513,8 @@ namespace WindowsFormsApp1.Mac
list_name };
db.More_Update("Obj_List_Book", Edit_tbl, Edit_Col, Search_tbl, Search_col);
}
MessageBox.Show("저장되었습니다!");
save = true;
}
private void btn_Close_Click(object sender, EventArgs e)
{
@@ -481,6 +522,7 @@ namespace WindowsFormsApp1.Mac
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
if (rowidx > dataGridView1.Rows.Count) return;
if (dataGridView1.Rows[rowidx].Cells["api_data"].Value == null ||
dataGridView1.Rows[rowidx].Cells["api_data"].Value.ToString() == "") {
return;
@@ -524,5 +566,17 @@ namespace WindowsFormsApp1.Mac
cb_filter.Items.AddRange(daum);
}
}
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
rowidx = e.RowIndex;
}
private void Check_ISBN_FormClosing(object sender, FormClosingEventArgs e)
{
if (!save) {
if (MessageBox.Show("데이터가 저장되지않았습니다!\n종료하시겠습니까?", "Warning!", MessageBoxButtons.YesNo) == DialogResult.No) {
e.Cancel = true;
}
}
}
}
}