* unimarc

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

TODOLIST
1. 팩스로 전송될 엑셀파일 밑작업마무리 (입력될 파라미터만 적용하면 실사용가능)
2. 알라딘API, 네이버 API연동중 자잘한 버그 수정작업 필요.
This commit is contained in:
SeungHo Yang
2021-03-30 18:42:33 +09:00
parent 7e802070bf
commit 9eeb4b5ad6
18 changed files with 210 additions and 141 deletions

View File

@@ -15,6 +15,7 @@ namespace ISBN_Check_test
Form1 f1;
public int row;
public string Call_API = string.Empty;
int rowidx;
public Form2(Form1 _f1)
{
InitializeComponent();
@@ -22,15 +23,12 @@ namespace ISBN_Check_test
}
private void Form2_Load(object sender, EventArgs e)
{
// 호출 API에 따라 다르게 함수호출
if (Call_API == "알라딘")
Aladin();
else if (Call_API == "네이버")
Naver();
Sort_data();
// 비슷한거 색깔표시
same_chk();
}
#region KEEP
private void Aladin()
{
tb_book_name.Text = f1.dataGridView1.Rows[row].Cells["book_name"].Value.ToString();
@@ -60,9 +58,46 @@ namespace ISBN_Check_test
if (a % 8 == 7) { grid[7] = tmp[a]; dataGridView1.Rows.Add(grid); }
}
}
private void Naver()
#endregion
private void Sort_data()
{
MessageBox.Show("네이버!");
tb_book_name.Text = f1.dataGridView1.Rows[row].Cells["book_name"].Value.ToString();
tb_author.Text = f1.dataGridView1.Rows[row].Cells["author"].Value.ToString();
tb_book_comp.Text = f1.dataGridView1.Rows[row].Cells["book_comp"].Value.ToString();
if (f1.dataGridView1.Rows[row].Cells["price"].Value != null)
{
tb_price.Text = f1.dataGridView1.Rows[row].Cells["price"].Value.ToString();
}
else { tb_price.Text = ""; }
string data = f1.dataGridView1.Rows[row].Cells["Column1"].Value.ToString();
// 도서명 / 저자 / 출판사 / isbn / 출간일 / 카테고리 / 품절여부
string[] tmp = data.Split('|');
string[] grid = { "", "", "", "", "", "", "", "" };
for (int a = 0; a < tmp.Length; a++)
{
if (a % 8 == 0) { grid[0] = tmp[a]; }
if (a % 8 == 1) { grid[1] = tmp[a]; }
if (a % 8 == 2) { grid[2] = tmp[a]; }
if (a % 8 == 3) { grid[3] = tmp[a]; }
if (a % 8 == 4) { grid[4] = tmp[a]; }
if (a % 8 == 5) { grid[5] = change_Date_type(tmp[a]); }
if (a % 8 == 6) { grid[6] = tmp[a]; }
if (a % 8 == 7) { grid[7] = tmp[a]; dataGridView1.Rows.Add(grid); }
}
}
private string change_Date_type(string date)
{
MessageBox.Show(date);
if (Call_API == "알라딘")
return String.Format("{0:yyyy/MM/dd}", DateTime.Parse(date.Remove(date.IndexOf(" G"))));
else if (Call_API == "네이버")
return DateTime.ParseExact(date, "yyyyMMdd", null).ToString("yyyy-MM-dd");
else
return "NULL";
}
private void same_chk()
{
@@ -95,7 +130,8 @@ namespace ISBN_Check_test
}
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
int rowidx = e.RowIndex;
if(e != null) { rowidx = e.RowIndex;}
string book_name = dataGridView1.Rows[rowidx].Cells["book_name"].Value.ToString();
string author = dataGridView1.Rows[rowidx].Cells["author"].Value.ToString();
string book_comp = dataGridView1.Rows[rowidx].Cells["book_comp"].Value.ToString();
@@ -123,5 +159,15 @@ namespace ISBN_Check_test
{
this.Close();
}
private void dataGridView1_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode == Keys.Enter) { dataGridView1_CellDoubleClick(null, null); }
if (e.KeyCode == Keys.Up) { rowidx--; }
if (e.KeyCode == Keys.Down) { rowidx++; }
}
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
{
rowidx = e.RowIndex;
}
}
}