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

TODOLIST
1. 팩스로 전송될 엑셀파일 밑작업마무리 (입력될 파라미터만 적용하면 실사용가능)
2. 알라딘API, 네이버 API연동중 자잘한 버그 수정작업 필요.
3. Form3 => Line 62 수정작업 필요함.
2021-04-01 18:47:31 +09:00

73 lines
2.4 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;
namespace ISBN_Check_test
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
}
private void Form3_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
dataGridView1.Rows.Clear();
API api = new API();
// 도서명, 저자, 출판사
string[] ArrayValue = { tb_book_name.Text, tb_author.Text, tb_book_comp.Text };
// 도서명 / 저자 / 출판사 / isbn / 정가
// 발행일 / 도서분류 / 재고
string[] param = { "title", "authors", "publisher", "isbn", "price",
"datetime", "status" };
string result = api.Daum(ArrayValue, param);
richTextBox1.Text = result;
input_Grid(result);
}
private void input_Grid(string value)
{
string[] sp_data = value.Split('|');
string[] grid = { "", "", "", "", "", "" };
for (int a = 0; a < sp_data.Length; a++)
{
if (a % 7 == 0) { grid[0] = sp_data[a]; } // 도서명
if (a % 7 == 1) { grid[1] = sp_data[a]; } // 저자
if (a % 7 == 2) { grid[2] = sp_data[a]; } // 출판사
if (a % 7 == 3) {
string[] tmp_isbn = sp_data[a].Split('|');
if (tmp_isbn.Length < 2)
grid[3] = sp_data[a].Replace(" ", "");
else
grid[3] = tmp_isbn[1]; } // isbn
if (a % 7 == 4) { grid[4] = sp_data[a]; } // 가격
if (a % 7 == 5) {
sp_data[a] = sp_data[a].Substring(0, sp_data[a].IndexOf('T'));
grid[5] = sp_data[a]; } // 출간일
if (a % 7 == 6) { grid[6] = sp_data[a]; } // 판매여부
}
}
private void tb_book_name_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.Enter) {
button1_Click(null, null);
}
}
}
}