* unimarc
a. 팩스전송 완료. b. 마크목록 폼 작성중 1. 엑셀반출 기능 추가중 사용 작업중 2. 마크편집 폼 수정 중 (마크 반출 test프로젝트 진행완료, 본 프로젝트에 적용중. / 저장기능활성화 작업완료) 2-1. 기존의 칸채우기에서 예상되지 못한 버그가 발생하여 칸채우기 숨김. 2-2. 008태크 재배치 => TextBox에 적용완료. 변경사항 메모장으로 넘기는 작업 진행해야함. 2-3. 현재 TODO : 저장기능 TODOLIST 1. 팩스로 전송될 엑셀파일 밑작업마무리 (입력될 파라미터만 적용하면 실사용가능) 2. 알라딘API, 네이버 API연동중 자잘한 버그 수정작업 필요. 3. Form3 => Line 62 수정작업 필요함.
This commit is contained in:
@@ -13,6 +13,7 @@ namespace ISBN_Check_test
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
private int rowidx;
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -34,6 +35,7 @@ namespace ISBN_Check_test
|
||||
}
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
{
|
||||
button2_Click(null, null);
|
||||
if(cb_api.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
|
||||
if(cb_filter.SelectedIndex == -1) { MessageBox.Show("조건이 선택되지 않았습니다."); return; }
|
||||
|
||||
@@ -64,9 +66,13 @@ namespace ISBN_Check_test
|
||||
string elapsedTime = String.Format("{0:00}:{1:00}:{2:00}.{3:00}",
|
||||
ts.Hours, ts.Minutes, ts.Seconds, ts.Milliseconds / 10);
|
||||
label1.Text = elapsedTime;
|
||||
rowidx = 0;
|
||||
|
||||
// 총 검색 횟수, 일치, 중복
|
||||
MessageBox.Show("검색이 완료되었습니다!");
|
||||
|
||||
dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells[0];
|
||||
this.ActiveControl = dataGridView1;
|
||||
}
|
||||
/// <summary>
|
||||
/// 알라딘 API
|
||||
@@ -110,23 +116,73 @@ namespace ISBN_Check_test
|
||||
}
|
||||
private void Naver_API(DataGridView gridview, int start, int end)
|
||||
{
|
||||
API api = new API();
|
||||
// 도서명 / 저자 / 출판사 / isbn / 정가
|
||||
// 발행일 / 도서분류 / 재고
|
||||
string[] param = { "title", "author", "publisher", "isbn", "price",
|
||||
"pubdate", "discount" };
|
||||
API api = new API();
|
||||
List<string> L_type = new List<string>();
|
||||
List<string> L_Array = new List<string>();
|
||||
|
||||
for(int a = start; a < end; a++)
|
||||
{
|
||||
L_type.Clear();
|
||||
L_Array.Clear();
|
||||
if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.Yellow)
|
||||
continue;
|
||||
else if (gridview.Rows[a].DefaultCellStyle.BackColor == Color.LightGray)
|
||||
gridview.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
|
||||
|
||||
string[] ArrayValue = { gridview.Rows[a].Cells["book_name"].Value.ToString(),
|
||||
gridview.Rows[a].Cells["author"].Value.ToString(),
|
||||
gridview.Rows[a].Cells["book_comp"].Value.ToString() };
|
||||
string result = api.Naver(ArrayValue, param);
|
||||
switch (cb_filter.SelectedIndex)
|
||||
{
|
||||
case 0:
|
||||
L_type.Add("d_titl");
|
||||
L_Array.Add(gridview.Rows[a].Cells["book_name"].Value.ToString());
|
||||
break;
|
||||
|
||||
case 1:
|
||||
L_type.Add("d_auth");
|
||||
L_Array.Add(gridview.Rows[a].Cells["author"].Value.ToString());
|
||||
break;
|
||||
|
||||
case 2:
|
||||
L_type.Add("d_publ");
|
||||
L_Array.Add(gridview.Rows[a].Cells["book_comp"].Value.ToString());
|
||||
break;
|
||||
|
||||
case 3:
|
||||
L_type.Add("d_titl");
|
||||
L_type.Add("d_auth");
|
||||
L_Array.Add(gridview.Rows[a].Cells["book_name"].Value.ToString());
|
||||
L_Array.Add(gridview.Rows[a].Cells["author"].Value.ToString());
|
||||
break;
|
||||
|
||||
case 4:
|
||||
L_type.Add("d_titl");
|
||||
L_type.Add("d_publ");
|
||||
L_Array.Add(gridview.Rows[a].Cells["book_name"].Value.ToString());
|
||||
L_Array.Add(gridview.Rows[a].Cells["book_comp"].Value.ToString());
|
||||
break;
|
||||
|
||||
case 5:
|
||||
L_type.Add("d_auth");
|
||||
L_type.Add("d_publ");
|
||||
L_Array.Add(gridview.Rows[a].Cells["author"].Value.ToString());
|
||||
L_Array.Add(gridview.Rows[a].Cells["book_comp"].Value.ToString());
|
||||
break;
|
||||
|
||||
case 6:
|
||||
L_type.Add("d_titl");
|
||||
L_type.Add("d_auth");
|
||||
L_type.Add("d_publ");
|
||||
L_Array.Add(gridview.Rows[a].Cells["book_name"].Value.ToString());
|
||||
L_Array.Add(gridview.Rows[a].Cells["author"].Value.ToString());
|
||||
L_Array.Add(gridview.Rows[a].Cells["book_comp"].Value.ToString());
|
||||
break;
|
||||
}
|
||||
string[] arrayType = L_type.ToArray();
|
||||
string[] arrayValue = L_Array.ToArray();
|
||||
string result = api.Naver(arrayValue, arrayType, param);
|
||||
insert_By_Naver(result, a);
|
||||
}
|
||||
}
|
||||
@@ -286,6 +342,9 @@ namespace ISBN_Check_test
|
||||
else if (e.KeyCode == Keys.Delete) {
|
||||
sg.DataGrid_to_Delete(sender, e);
|
||||
}
|
||||
if (e.KeyCode == Keys.Enter) { dataGridView1_CellDoubleClick(null, null); rowidx++; }
|
||||
if (e.KeyCode == Keys.Up) { rowidx--; }
|
||||
if (e.KeyCode == Keys.Down) { rowidx++; }
|
||||
end_idx.Text = dataGridView1.Rows.Count.ToString();
|
||||
}
|
||||
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||
@@ -296,17 +355,18 @@ namespace ISBN_Check_test
|
||||
}
|
||||
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
rowidx = e.RowIndex;
|
||||
if(dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value == null)
|
||||
{
|
||||
dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value = "";
|
||||
}
|
||||
|
||||
richTextBox1.Text = dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value.ToString();
|
||||
}
|
||||
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||
{
|
||||
if(dataGridView1.Rows[e.RowIndex].Cells["Column1"].Value == null) { return; }
|
||||
if (dataGridView1.Rows[rowidx].Cells["Column1"].Value == null ||
|
||||
dataGridView1.Rows[rowidx].Cells["Column1"].Value == "") { return; }
|
||||
Form2 f2 = new Form2(this);
|
||||
f2.row = e.RowIndex;
|
||||
f2.row = rowidx;
|
||||
f2.Call_API = cb_api.Text;
|
||||
f2.Show();
|
||||
}
|
||||
@@ -324,7 +384,9 @@ namespace ISBN_Check_test
|
||||
cb_filter.Items.AddRange(aladin);
|
||||
}
|
||||
else if (cb_api.SelectedIndex == 1) {
|
||||
string[] naver = { "도서명+출판사" };
|
||||
string[] naver = { "도서명", "저자", "출판사",
|
||||
"도서명 + 저자", "도서명 + 출판사", "저자 + 출판사",
|
||||
"도서명 + 저자 + 출판사" };
|
||||
cb_filter.Items.AddRange(naver);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user