* 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:
76
unimarc/WindowsFormsApp1/마크/Check_ISBN.Designer.cs
generated
76
unimarc/WindowsFormsApp1/마크/Check_ISBN.Designer.cs
generated
@@ -41,11 +41,15 @@
|
||||
this.btn_Close = new System.Windows.Forms.Button();
|
||||
this.label3 = new System.Windows.Forms.Label();
|
||||
this.cb_api = new System.Windows.Forms.ComboBox();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
this.num = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.search_book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.author = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.search_author = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.search_book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.count = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.unit = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.total = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
@@ -57,7 +61,6 @@
|
||||
this.category = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.sold_out = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.api_data = new System.Windows.Forms.DataGridViewTextBoxColumn();
|
||||
this.progressBar1 = new System.Windows.Forms.ProgressBar();
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -78,8 +81,11 @@
|
||||
this.num,
|
||||
this.isbn,
|
||||
this.book_name,
|
||||
this.search_book_name,
|
||||
this.author,
|
||||
this.search_author,
|
||||
this.book_comp,
|
||||
this.search_book_comp,
|
||||
this.count,
|
||||
this.unit,
|
||||
this.total,
|
||||
@@ -91,8 +97,8 @@
|
||||
this.category,
|
||||
this.sold_out,
|
||||
this.api_data});
|
||||
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(12, 55);
|
||||
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditOnF2;
|
||||
this.dataGridView1.Location = new System.Drawing.Point(12, 35);
|
||||
this.dataGridView1.Name = "dataGridView1";
|
||||
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
|
||||
@@ -106,14 +112,15 @@
|
||||
dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
|
||||
this.dataGridView1.RowsDefaultCellStyle = dataGridViewCellStyle3;
|
||||
this.dataGridView1.RowTemplate.Height = 23;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(1309, 433);
|
||||
this.dataGridView1.Size = new System.Drawing.Size(1615, 547);
|
||||
this.dataGridView1.TabIndex = 0;
|
||||
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
|
||||
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
||||
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
||||
//
|
||||
// btn_lookup
|
||||
//
|
||||
this.btn_lookup.Location = new System.Drawing.Point(719, 15);
|
||||
this.btn_lookup.Location = new System.Drawing.Point(709, 7);
|
||||
this.btn_lookup.Name = "btn_lookup";
|
||||
this.btn_lookup.Size = new System.Drawing.Size(99, 23);
|
||||
this.btn_lookup.TabIndex = 1;
|
||||
@@ -125,15 +132,15 @@
|
||||
//
|
||||
this.cb_filter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cb_filter.FormattingEnabled = true;
|
||||
this.cb_filter.Location = new System.Drawing.Point(554, 16);
|
||||
this.cb_filter.Location = new System.Drawing.Point(516, 8);
|
||||
this.cb_filter.Name = "cb_filter";
|
||||
this.cb_filter.Size = new System.Drawing.Size(121, 20);
|
||||
this.cb_filter.Size = new System.Drawing.Size(161, 20);
|
||||
this.cb_filter.TabIndex = 2;
|
||||
//
|
||||
// label1
|
||||
//
|
||||
this.label1.AutoSize = true;
|
||||
this.label1.Location = new System.Drawing.Point(16, 20);
|
||||
this.label1.Location = new System.Drawing.Point(16, 12);
|
||||
this.label1.Name = "label1";
|
||||
this.label1.Size = new System.Drawing.Size(41, 12);
|
||||
this.label1.TabIndex = 3;
|
||||
@@ -142,7 +149,7 @@
|
||||
// tb_list_name
|
||||
//
|
||||
this.tb_list_name.Enabled = false;
|
||||
this.tb_list_name.Location = new System.Drawing.Point(59, 16);
|
||||
this.tb_list_name.Location = new System.Drawing.Point(59, 8);
|
||||
this.tb_list_name.Name = "tb_list_name";
|
||||
this.tb_list_name.Size = new System.Drawing.Size(199, 21);
|
||||
this.tb_list_name.TabIndex = 4;
|
||||
@@ -150,7 +157,7 @@
|
||||
// label2
|
||||
//
|
||||
this.label2.AutoSize = true;
|
||||
this.label2.Location = new System.Drawing.Point(495, 20);
|
||||
this.label2.Location = new System.Drawing.Point(457, 12);
|
||||
this.label2.Name = "label2";
|
||||
this.label2.Size = new System.Drawing.Size(57, 12);
|
||||
this.label2.TabIndex = 3;
|
||||
@@ -158,7 +165,7 @@
|
||||
//
|
||||
// btn_Save
|
||||
//
|
||||
this.btn_Save.Location = new System.Drawing.Point(829, 15);
|
||||
this.btn_Save.Location = new System.Drawing.Point(819, 7);
|
||||
this.btn_Save.Name = "btn_Save";
|
||||
this.btn_Save.Size = new System.Drawing.Size(99, 23);
|
||||
this.btn_Save.TabIndex = 1;
|
||||
@@ -168,7 +175,7 @@
|
||||
//
|
||||
// btn_Close
|
||||
//
|
||||
this.btn_Close.Location = new System.Drawing.Point(939, 15);
|
||||
this.btn_Close.Location = new System.Drawing.Point(929, 7);
|
||||
this.btn_Close.Name = "btn_Close";
|
||||
this.btn_Close.Size = new System.Drawing.Size(99, 23);
|
||||
this.btn_Close.TabIndex = 1;
|
||||
@@ -179,7 +186,7 @@
|
||||
// label3
|
||||
//
|
||||
this.label3.AutoSize = true;
|
||||
this.label3.Location = new System.Drawing.Point(297, 20);
|
||||
this.label3.Location = new System.Drawing.Point(278, 12);
|
||||
this.label3.Name = "label3";
|
||||
this.label3.Size = new System.Drawing.Size(57, 12);
|
||||
this.label3.TabIndex = 5;
|
||||
@@ -189,12 +196,19 @@
|
||||
//
|
||||
this.cb_api.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cb_api.FormattingEnabled = true;
|
||||
this.cb_api.Location = new System.Drawing.Point(356, 16);
|
||||
this.cb_api.Location = new System.Drawing.Point(337, 8);
|
||||
this.cb_api.Name = "cb_api";
|
||||
this.cb_api.Size = new System.Drawing.Size(121, 20);
|
||||
this.cb_api.Size = new System.Drawing.Size(93, 20);
|
||||
this.cb_api.TabIndex = 6;
|
||||
this.cb_api.SelectedIndexChanged += new System.EventHandler(this.cb_api_SelectedIndexChanged);
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(1060, 7);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(219, 23);
|
||||
this.progressBar1.TabIndex = 7;
|
||||
//
|
||||
// num
|
||||
//
|
||||
this.num.HeaderText = "번호";
|
||||
@@ -212,16 +226,31 @@
|
||||
this.book_name.Name = "book_name";
|
||||
this.book_name.Width = 130;
|
||||
//
|
||||
// search_book_name
|
||||
//
|
||||
this.search_book_name.HeaderText = "검색 도서명";
|
||||
this.search_book_name.Name = "search_book_name";
|
||||
//
|
||||
// author
|
||||
//
|
||||
this.author.HeaderText = "저자";
|
||||
this.author.Name = "author";
|
||||
//
|
||||
// search_author
|
||||
//
|
||||
this.search_author.HeaderText = "검색 저자";
|
||||
this.search_author.Name = "search_author";
|
||||
//
|
||||
// book_comp
|
||||
//
|
||||
this.book_comp.HeaderText = "출판사";
|
||||
this.book_comp.Name = "book_comp";
|
||||
//
|
||||
// search_book_comp
|
||||
//
|
||||
this.search_book_comp.HeaderText = "검색 출판사";
|
||||
this.search_book_comp.Name = "search_book_comp";
|
||||
//
|
||||
// count
|
||||
//
|
||||
this.count.HeaderText = "수량";
|
||||
@@ -283,18 +312,11 @@
|
||||
this.api_data.Name = "api_data";
|
||||
this.api_data.Visible = false;
|
||||
//
|
||||
// progressBar1
|
||||
//
|
||||
this.progressBar1.Location = new System.Drawing.Point(1070, 15);
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(219, 23);
|
||||
this.progressBar1.TabIndex = 7;
|
||||
//
|
||||
// Check_ISBN
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1333, 594);
|
||||
this.ClientSize = new System.Drawing.Size(1639, 594);
|
||||
this.Controls.Add(this.progressBar1);
|
||||
this.Controls.Add(this.cb_api);
|
||||
this.Controls.Add(this.label3);
|
||||
@@ -308,6 +330,7 @@
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.Name = "Check_ISBN";
|
||||
this.Text = "Check_ISBN";
|
||||
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Check_ISBN_FormClosing);
|
||||
this.Load += new System.EventHandler(this.Check_ISBN_Load);
|
||||
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
|
||||
this.ResumeLayout(false);
|
||||
@@ -325,11 +348,16 @@
|
||||
private System.Windows.Forms.Button btn_Close;
|
||||
private System.Windows.Forms.Label label3;
|
||||
private System.Windows.Forms.ComboBox cb_api;
|
||||
private System.Windows.Forms.ProgressBar progressBar1;
|
||||
public System.Windows.Forms.DataGridView dataGridView1;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn num;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn isbn;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn book_name;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn search_book_name;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn author;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn search_author;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn book_comp;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn search_book_comp;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn count;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn unit;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn total;
|
||||
@@ -341,7 +369,5 @@
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn category;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn sold_out;
|
||||
private System.Windows.Forms.DataGridViewTextBoxColumn api_data;
|
||||
private System.Windows.Forms.ProgressBar progressBar1;
|
||||
public System.Windows.Forms.DataGridView dataGridView1;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -126,12 +126,21 @@
|
||||
<metadata name="book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="search_book_name.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="search_author.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="search_book_comp.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="count.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
|
||||
@@ -181,17 +181,18 @@ namespace WindowsFormsApp1.마크
|
||||
this.dataGridView1.RowHeadersDefaultCellStyle = dataGridViewCellStyle2;
|
||||
this.dataGridView1.RowTemplate.Height = 23;
|
||||
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect;
|
||||
this.dataGridView1.Size = new System.Drawing.Size(834, 361);
|
||||
this.dataGridView1.Size = new System.Drawing.Size(964, 361);
|
||||
this.dataGridView1.TabIndex = 19;
|
||||
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
|
||||
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
|
||||
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
|
||||
this.dataGridView1.KeyDown += new System.Windows.Forms.KeyEventHandler(this.dataGridView1_KeyDown);
|
||||
//
|
||||
// book_name
|
||||
//
|
||||
this.book_name.HeaderText = "도서명";
|
||||
this.book_name.Name = "book_name";
|
||||
this.book_name.Width = 200;
|
||||
this.book_name.Width = 300;
|
||||
//
|
||||
// author
|
||||
//
|
||||
@@ -207,7 +208,6 @@ namespace WindowsFormsApp1.마크
|
||||
//
|
||||
this.isbn.HeaderText = "ISBN";
|
||||
this.isbn.Name = "isbn";
|
||||
this.isbn.Width = 70;
|
||||
//
|
||||
// price
|
||||
//
|
||||
@@ -242,7 +242,7 @@ namespace WindowsFormsApp1.마크
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(834, 412);
|
||||
this.ClientSize = new System.Drawing.Size(964, 412);
|
||||
this.Controls.Add(this.dataGridView1);
|
||||
this.Controls.Add(this.btn_Close);
|
||||
this.Controls.Add(this.label5);
|
||||
|
||||
@@ -32,6 +32,10 @@ namespace WindowsFormsApp1.마크
|
||||
{
|
||||
Sort_data();
|
||||
same_chk(); // 비슷한거 색깔표시
|
||||
|
||||
dataGridView1.CurrentCell = dataGridView1.Rows[0].Cells[0];
|
||||
this.ActiveControl = dataGridView1;
|
||||
rowidx = 0;
|
||||
}
|
||||
private void Sort_data()
|
||||
{
|
||||
@@ -39,8 +43,8 @@ namespace WindowsFormsApp1.마크
|
||||
tb_author.Text = ci.dataGridView1.Rows[row].Cells["author"].Value.ToString();
|
||||
tb_book_comp.Text = ci.dataGridView1.Rows[row].Cells["book_comp"].Value.ToString();
|
||||
|
||||
if (ci.dataGridView1.Rows[row].Cells["price"].Value != null)
|
||||
tb_price.Text = ci.dataGridView1.Rows[row].Cells["price"].Value.ToString();
|
||||
if (ci.dataGridView1.Rows[row].Cells["unit"].Value != null)
|
||||
tb_price.Text = ci.dataGridView1.Rows[row].Cells["unit"].Value.ToString();
|
||||
|
||||
else tb_price.Text = "";
|
||||
|
||||
@@ -104,7 +108,7 @@ namespace WindowsFormsApp1.마크
|
||||
if (ori_data[4] != "")
|
||||
price = Convert.ToInt32(ori_data[4]);
|
||||
|
||||
if (price - 5000 <= pay && pay <= price + 5000)
|
||||
if (price - 500 <= pay && pay <= price + 500)
|
||||
dataGridView1.Rows[a].DefaultCellStyle.BackColor = Color.Yellow;
|
||||
|
||||
else
|
||||
@@ -131,11 +135,11 @@ namespace WindowsFormsApp1.마크
|
||||
string category = dataGridView1.Rows[rowidx].Cells["category"].Value.ToString();
|
||||
string sold = dataGridView1.Rows[rowidx].Cells["sold_out"].Value.ToString();
|
||||
|
||||
ci.dataGridView1.Rows[row].Cells["book_name"].Value = book_name;
|
||||
ci.dataGridView1.Rows[row].Cells["author"].Value = author;
|
||||
ci.dataGridView1.Rows[row].Cells["book_comp"].Value = book_comp;
|
||||
ci.dataGridView1.Rows[row].Cells["search_book_name"].Value = book_name;
|
||||
ci.dataGridView1.Rows[row].Cells["search_author"].Value = author;
|
||||
ci.dataGridView1.Rows[row].Cells["search_book_comp"].Value = book_comp;
|
||||
ci.dataGridView1.Rows[row].Cells["isbn"].Value = isbn;
|
||||
ci.dataGridView1.Rows[row].Cells["price2"].Value = price;
|
||||
ci.dataGridView1.Rows[row].Cells["price"].Value = price;
|
||||
ci.dataGridView1.Rows[row].Cells["pubDate"].Value = Date;
|
||||
ci.dataGridView1.Rows[row].Cells["category"].Value = category;
|
||||
ci.dataGridView1.Rows[row].Cells["sold_out"].Value = sold;
|
||||
@@ -165,5 +169,10 @@ namespace WindowsFormsApp1.마크
|
||||
this.Close();
|
||||
}
|
||||
}
|
||||
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
||||
{
|
||||
Skill_Grid sg = new Skill_Grid();
|
||||
sg.Print_Grid_Num(sender, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user