알라딘데이터추출시 버퍼꼬이는 증상 수정
This commit is contained in:
@@ -159,11 +159,16 @@ namespace ISBN_Check_test
|
||||
gridview.Rows[a ].DefaultCellStyle.BackColor = Color.Empty;
|
||||
|
||||
// string aladin = api.Aladin(query, "ISBN13", param);
|
||||
string aladin = api.Aladin(query, type, param);
|
||||
var aladin = api.Aladin(query, type, param);
|
||||
insert_By_Aladin(aladin, a);
|
||||
try
|
||||
{
|
||||
richTextBox1.Text = aladin;
|
||||
var sb = new StringBuilder();
|
||||
foreach(var item in aladin)
|
||||
{
|
||||
sb.AppendLine(string.Join("|", item));
|
||||
}
|
||||
richTextBox1.Text = sb.ToString();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
@@ -309,7 +314,7 @@ namespace ISBN_Check_test
|
||||
{
|
||||
progressBar1.PerformStep();
|
||||
}
|
||||
void insert_By_Aladin(string data, int row)
|
||||
void insert_By_Aladin(string[] insert, int row)
|
||||
{
|
||||
if (row >0)
|
||||
{
|
||||
@@ -317,9 +322,8 @@ namespace ISBN_Check_test
|
||||
}
|
||||
dataGridView1.Rows[row ].Selected = true;
|
||||
|
||||
string[] insert = data.Split('|');
|
||||
|
||||
if (data == "") { return; }
|
||||
if (insert.Any() == false) { return; }
|
||||
|
||||
// pubDate형 보기편하게 DateTime형으로 재정리
|
||||
string newstring = "";
|
||||
@@ -328,7 +332,7 @@ namespace ISBN_Check_test
|
||||
newstring = String.Format("{0:yyyy/MM/dd}",
|
||||
DateTime.Parse(insert[5].Remove(insert[5].IndexOf(" G"))));
|
||||
}
|
||||
catch (Exception ex) { MessageBox.Show(data); }
|
||||
catch (Exception ex) { MessageBox.Show(string.Join("|",insert)); }
|
||||
|
||||
for (int a = 0; a < insert.Length; a++)
|
||||
{
|
||||
@@ -641,7 +645,8 @@ namespace ISBN_Check_test
|
||||
{
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
string[] lst = { "9791193110584",
|
||||
string[] lst = { "9788965427520",
|
||||
"9791193110584",
|
||||
"9791168672260",
|
||||
"9788993858396",
|
||||
"9791171200351",
|
||||
@@ -658,5 +663,17 @@ namespace ISBN_Check_test
|
||||
end_idx.Text = (this.dataGridView1.Rows.Count - 1).ToString();
|
||||
}
|
||||
}
|
||||
|
||||
private void button3_Click(object sender, EventArgs e)
|
||||
{
|
||||
for (int a = 0; a < dataGridView1.Rows.Count - 1; a++)
|
||||
{
|
||||
//if (dataGridView1.Rows[a].DefaultCellStyle.BackColor != Color.Yellow)
|
||||
{
|
||||
dataGridView1.Rows[a].Cells["Column1"].Value = "";
|
||||
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Empty;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user