=====* unimarc *=====

== TODO ==
기타 추가적인 버그 잡을것. / 바로빌 세금계산서알아볼것.

===== 작업중 =====

===== 보류 =====
 b. 마크목록 폼 작성중
  1. 엑셀반출 기능 추가중 사용 작업대기중

 c. 마크 반입 폼 수정중
  1. 불러오기는 되나 저장 기능이 필요함.

===== 완료 =====
21.06.21 마크검색 작업완료

마크 편집창에서 메모장, 미리보기, 표지크게보기 기능 추가

21.06.08 자동업데이트 기능 완료 - 프로젝트가 새로 바뀜.

1. 주문관리 팩스연동 완료
2. 전송된 팩스 확인 작업개시, 이메일 전송모듈 수정완료.
3. 주문관리에서 주문처와 목록 검색하는 폼 검색 모듈도 재수정 완료함.
4. 데이터베이스 내 이미지URL을 가져오는작업 완료
목록집계 폼 재 수정작업 완료 - 확인 및 수정 필요.

ISBN 체크 프로그램 => 본프로그램에 이식중.
ㄴ> 코드는 다 옮겼으나 기존 사용하던 방식과 조금 달라서 버그발생 가능성 있음.
ㄴ> 버그 체크 계속 해볼것. 21-04-15
ㄴ> 21_04_20 버그 없음.

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

주문관리 작업중 (DataGridView 주문처 엔터키 입력시 검색되게끔 하는 코드작성중) - 21.04.27 완료
This commit is contained in:
SeungHo Yang
2021-06-21 18:34:32 +09:00
parent 2d5f25ac4f
commit 50d5d90789
20 changed files with 1913 additions and 894 deletions

Binary file not shown.

View File

@@ -44,6 +44,7 @@
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
@@ -120,7 +121,7 @@
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
this.menuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
this.toolStrip1.SuspendLayout();
@@ -224,45 +225,52 @@
// 물품등록ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "물품등록ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.ToolStripMenuItem.Text = "물품등록";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 목록등록편의ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "목록등록편의ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.ToolStripMenuItem.Text = "목록조회";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 목록집계ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "목록집계ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.ToolStripMenuItem.Text = "목록집계";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 주문입력ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "주문입력ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.ToolStripMenuItem.Text = "주문입력";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 매입ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "매입ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.ToolStripMenuItem.Text = "입고작업";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 재고입력및조회ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "재고입력및조회ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.ToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.ToolStripMenuItem.Text = "재고입력 및 조회";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 반품처리ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "반품처리ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(166, 22);
this.ToolStripMenuItem.Text = "반품처리";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 회계ToolStripMenuItem
//
this.ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -842,7 +850,6 @@
this.button3.TabIndex = 2;
this.button3.Text = "즐겨찾기3";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// button4
//
@@ -861,7 +868,6 @@
this.button2.TabIndex = 1;
this.button2.Text = "즐겨찾기2";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button1
//
@@ -871,12 +877,12 @@
this.button1.TabIndex = 0;
this.button1.Text = "즐겨찾기1";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// toolStrip1
//
this.toolStrip1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripLabel2,
this.toolStripLabel1});
this.toolStrip1.Location = new System.Drawing.Point(0, 607);
this.toolStrip1.Name = "toolStrip1";
@@ -887,15 +893,14 @@
// toolStripLabel1
//
this.toolStripLabel1.Name = "toolStripLabel1";
this.toolStripLabel1.Size = new System.Drawing.Size(88, 22);
this.toolStripLabel1.Text = "toolStripLabel1";
this.toolStripLabel1.Size = new System.Drawing.Size(43, 22);
this.toolStripLabel1.Text = "이용자";
//
// 반품처리ToolStripMenuItem
// toolStripLabel2
//
this.ToolStripMenuItem.Name = "반품처리ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(180, 22);
this.ToolStripMenuItem.Text = "반품처리";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
this.toolStripLabel2.Name = "toolStripLabel2";
this.toolStripLabel2.Size = new System.Drawing.Size(43, 22);
this.toolStripLabel2.Text = "회사명";
//
// Main
//
@@ -1016,5 +1021,6 @@
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
public System.Windows.Forms.ToolStripLabel toolStripLabel2;
}
}

View File

@@ -9,6 +9,8 @@ using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.IO;
using WindowsFormsApp1.Account;
using WindowsFormsApp1.Convenience;
using WindowsFormsApp1.Delivery;
@@ -17,8 +19,6 @@ using WindowsFormsApp1.Home;
using WindowsFormsApp1.Mac;
using WindowsFormsApp1.Work_log;
using WindowsFormsApp1.;
using System.IO;
using WindowsFormsApp1.;
using WindowsFormsApp1.;
@@ -59,6 +59,7 @@ namespace WindowsFormsApp1
if (result[3] == null) { }
else {
toolStripLabel2.Text = result[5];
toolStripLabel1.Text = "이용자 : " + result[3];
User = result[3];
}
@@ -73,6 +74,7 @@ namespace WindowsFormsApp1
catch { }
}
#region
// 홈 탭 클릭이벤트
private User_Infor User_Infor;
private Home_User_manage home_User_Manage;
@@ -189,7 +191,9 @@ namespace WindowsFormsApp1
Home_ledger_Of_Use.Show();
}
}
#endregion
#region
// 납품관리 탭 클릭 이벤트
Commodity_registration Del_commodity_Registration;
List_Lookup del_list_lookup;
@@ -307,7 +311,9 @@ namespace WindowsFormsApp1
del_bring_Back.Show();
}
}
#endregion
#region
// 회계 탭 클릭 이벤트
Remit_reg2 Acc_remit_Reg2;
Purchase_Input Acc_purchase_Input;
@@ -493,6 +499,9 @@ namespace WindowsFormsApp1
Acc_bill_Manage.Show();
}
}
#endregion
#region
// 마크 탭 이벤트
Setup_Shortcut Mac_shortcut;
@@ -836,6 +845,9 @@ namespace WindowsFormsApp1
Mac_equip_Manage.Show();
}
}
#endregion
#region
// 작업일지 탭 이벤트
Work_Log work_Log;
@@ -855,7 +867,9 @@ namespace WindowsFormsApp1
work_Log.Show();
}
}
#endregion
#region
// 편의기능 탭 이벤트
Calendar calendar;
Talk talk;
@@ -1002,7 +1016,9 @@ namespace WindowsFormsApp1
sale_Member_Manage.Show();
}
}
#endregion
#region
// 마스터 탭 이벤트
User_manage master_user_Manage;
Notice_Send master_notice_Send;
@@ -1101,26 +1117,6 @@ namespace WindowsFormsApp1
master_batch_Processing.Show();
}
}
private void button1_Click(object sender, EventArgs e)
{
// 엑셀 테스트
Excel_text et = new Excel_text();
// et.mk_Excel_Order();
}
private void button2_Click(object sender, EventArgs e)
{
ExcelTest.Marc marc = new ExcelTest.Marc();
marc.Show();
}
private void button3_Click(object sender, EventArgs e)
{
string tmp = "[가로수(남경)]갖고놀거";
tmp = tmp.Substring(tmp.IndexOf(']') + 1);
MessageBox.Show(tmp);
}
#endregion
}
}

View File

@@ -37,13 +37,13 @@
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.isbn = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.author = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Marc = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
@@ -143,12 +143,6 @@
this.dataGridView1.TabIndex = 1;
this.dataGridView1.RowPostPaint += new System.Windows.Forms.DataGridViewRowPostPaintEventHandler(this.dataGridView1_RowPostPaint);
//
// openFileDialog1
//
this.openFileDialog1.Filter = "마크 파일 (*.mrc)|*.mrc|모든 파일 (*.*)|*.*";
this.openFileDialog1.InitialDirectory = "C:";
this.openFileDialog1.Title = "열기";
//
// isbn
//
this.isbn.HeaderText = "isbn";
@@ -184,6 +178,12 @@
this.Marc.Name = "Marc";
this.Marc.Width = 500;
//
// openFileDialog1
//
this.openFileDialog1.Filter = "마크 파일 (*.mrc)|*.mrc|모든 파일 (*.*)|*.*";
this.openFileDialog1.InitialDirectory = "C:";
this.openFileDialog1.Title = "열기";
//
// Mac_Input
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
@@ -192,7 +192,7 @@
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.panel1);
this.Name = "Mac_Input";
this.Text = "Mac_Carry";
this.Text = "마크 반입";
this.Load += new System.EventHandler(this.Mac_Input_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();

View File

@@ -31,6 +31,12 @@
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
this.label1 = new System.Windows.Forms.Label();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.label2 = new System.Windows.Forms.Label();
this.tb_search = new System.Windows.Forms.TextBox();
this.btn_search = new System.Windows.Forms.Button();
this.cb_filter = new System.Windows.Forms.ComboBox();
this.btn_close = new System.Windows.Forms.Button();
this.cb_data_area = new System.Windows.Forms.ComboBox();
this.grade = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ISBN = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.book_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
@@ -38,14 +44,9 @@
this.book_comp = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.price = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.pub_date = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Marc = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.etc1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.etc2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Marc = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.label2 = new System.Windows.Forms.Label();
this.tb_search = new System.Windows.Forms.TextBox();
this.btn_search = new System.Windows.Forms.Button();
this.cb_filter = new System.Windows.Forms.ComboBox();
this.btn_close = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
@@ -79,9 +80,9 @@
this.book_comp,
this.price,
this.pub_date,
this.Marc,
this.etc1,
this.etc2,
this.Marc});
this.etc2});
this.dataGridView1.Location = new System.Drawing.Point(12, 35);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersWidth = 20;
@@ -90,6 +91,61 @@
this.dataGridView1.TabIndex = 49;
this.dataGridView1.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellDoubleClick);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(430, 11);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 5;
this.label2.Text = "검색어";
//
// tb_search
//
this.tb_search.Location = new System.Drawing.Point(477, 7);
this.tb_search.Name = "tb_search";
this.tb_search.Size = new System.Drawing.Size(222, 21);
this.tb_search.TabIndex = 6;
this.tb_search.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_search_KeyDown);
//
// btn_search
//
this.btn_search.Location = new System.Drawing.Point(710, 6);
this.btn_search.Name = "btn_search";
this.btn_search.Size = new System.Drawing.Size(75, 23);
this.btn_search.TabIndex = 7;
this.btn_search.Text = "검 색";
this.btn_search.UseVisualStyleBackColor = true;
this.btn_search.Click += new System.EventHandler(this.btn_search_Click);
//
// cb_filter
//
this.cb_filter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_filter.FormattingEnabled = true;
this.cb_filter.Location = new System.Drawing.Point(222, 7);
this.cb_filter.Name = "cb_filter";
this.cb_filter.Size = new System.Drawing.Size(161, 20);
this.cb_filter.TabIndex = 50;
//
// btn_close
//
this.btn_close.Location = new System.Drawing.Point(798, 6);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(75, 23);
this.btn_close.TabIndex = 51;
this.btn_close.Text = "닫 기";
this.btn_close.UseVisualStyleBackColor = true;
this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
//
// cb_data_area
//
this.cb_data_area.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_data_area.FormattingEnabled = true;
this.cb_data_area.Location = new System.Drawing.Point(71, 7);
this.cb_data_area.Name = "cb_data_area";
this.cb_data_area.Size = new System.Drawing.Size(145, 20);
this.cb_data_area.TabIndex = 52;
//
// grade
//
this.grade.HeaderText = "등급";
@@ -130,6 +186,12 @@
this.pub_date.HeaderText = "출판년월";
this.pub_date.Name = "pub_date";
//
// Marc
//
this.Marc.HeaderText = "marc";
this.Marc.Name = "Marc";
this.Marc.Visible = false;
//
// etc1
//
this.etc1.HeaderText = "비고1";
@@ -142,63 +204,12 @@
this.etc2.Name = "etc2";
this.etc2.Width = 140;
//
// Marc
//
this.Marc.HeaderText = "marc";
this.Marc.Name = "Marc";
this.Marc.Visible = false;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(271, 11);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 5;
this.label2.Text = "검색어";
//
// tb_search
//
this.tb_search.Location = new System.Drawing.Point(318, 7);
this.tb_search.Name = "tb_search";
this.tb_search.Size = new System.Drawing.Size(222, 21);
this.tb_search.TabIndex = 6;
this.tb_search.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_search_KeyDown);
//
// btn_search
//
this.btn_search.Location = new System.Drawing.Point(551, 6);
this.btn_search.Name = "btn_search";
this.btn_search.Size = new System.Drawing.Size(75, 23);
this.btn_search.TabIndex = 7;
this.btn_search.Text = "검 색";
this.btn_search.UseVisualStyleBackColor = true;
this.btn_search.Click += new System.EventHandler(this.btn_search_Click);
//
// cb_filter
//
this.cb_filter.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_filter.FormattingEnabled = true;
this.cb_filter.Location = new System.Drawing.Point(71, 7);
this.cb_filter.Name = "cb_filter";
this.cb_filter.Size = new System.Drawing.Size(161, 20);
this.cb_filter.TabIndex = 50;
//
// btn_close
//
this.btn_close.Location = new System.Drawing.Point(639, 6);
this.btn_close.Name = "btn_close";
this.btn_close.Size = new System.Drawing.Size(75, 23);
this.btn_close.TabIndex = 51;
this.btn_close.Text = "닫 기";
this.btn_close.UseVisualStyleBackColor = true;
this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
//
// Search_Infor
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1258, 666);
this.Controls.Add(this.cb_data_area);
this.Controls.Add(this.btn_close);
this.Controls.Add(this.cb_filter);
this.Controls.Add(this.dataGridView1);
@@ -224,6 +235,7 @@
private System.Windows.Forms.Button btn_search;
private System.Windows.Forms.ComboBox cb_filter;
private System.Windows.Forms.Button btn_close;
private System.Windows.Forms.ComboBox cb_data_area;
private System.Windows.Forms.DataGridViewTextBoxColumn grade;
private System.Windows.Forms.DataGridViewTextBoxColumn ISBN;
private System.Windows.Forms.DataGridViewTextBoxColumn book_name;
@@ -231,8 +243,8 @@
private System.Windows.Forms.DataGridViewTextBoxColumn book_comp;
private System.Windows.Forms.DataGridViewTextBoxColumn price;
private System.Windows.Forms.DataGridViewTextBoxColumn pub_date;
private System.Windows.Forms.DataGridViewTextBoxColumn Marc;
private System.Windows.Forms.DataGridViewTextBoxColumn etc1;
private System.Windows.Forms.DataGridViewTextBoxColumn etc2;
private System.Windows.Forms.DataGridViewTextBoxColumn Marc;
}
}

View File

@@ -26,6 +26,9 @@ namespace WindowsFormsApp1.Mac
{
db.DBcon();
string[] area = { "국립 중앙 도서관", "자체 저장 DB" };
cb_data_area.Items.AddRange(area);
cb_data_area.SelectedIndex = 0;
string[] filter = { "도서명", "저자", "출판사", "ISBN" };
cb_filter.Items.AddRange(filter);
cb_filter.SelectedIndex = 0;
@@ -40,19 +43,38 @@ namespace WindowsFormsApp1.Mac
{
dataGridView1.Rows.Clear();
string target = string.Empty;
string Area = "`grade`, `ISBN`, `서명`, `저자`, `출판사`, `출판년월`, `가격`, `비고1`, `비고2`, `marc`";
string Area = string.Empty;
if (cb_data_area.SelectedIndex == -1) {
MessageBox.Show("검색필터를 선택해주세요!");
cb_data_area.Focus();
return;
}
if (cb_filter.SelectedIndex == -1) {
MessageBox.Show("검색필터를 선택해주세요!");
cb_filter.Focus();
return;
}
if (cb_filter.SelectedItem.ToString() == "도서명") { target = "서명"; }
else { target = cb_filter.SelectedItem.ToString(); }
target = setting_target();
string tmp_data = db.DB_Contains("Marc", compidx, target, tb_search.Text, Area);
if(cb_data_area.SelectedIndex == 0) {
db.DBcon_cl();
Area = "`grade`, `isbn`, `book_name`, `author`, `book_comp`, `years`, `price`, `marc`, `etc`, `etc`";
}
else if(cb_data_area.SelectedIndex == 1) {
db.DBcon();
Area = "`grade`, `ISBN`, `서명`, `저자`, `출판사`, `출판년월`, `가격`, `marc`, `비고1`, `비고2`";
}
string tmp_data = db.DB_Contains("Marc", "none", target, tb_search.Text, Area);
string[] tmp_arr = tmp_data.Split('|');
input_grid(tmp_arr);
}
#region search_Click_Sub
/// <summary>
/// 검색결과에 따라 Grid를 새로 그림
/// </summary>
/// <param name="arr"></param>
void input_grid(string[] arr)
{
string[] grid = { "", "", "", "", "",
@@ -74,6 +96,11 @@ namespace WindowsFormsApp1.Mac
}
}
}
/// <summary>
/// idx값에 따라 Grade를 보기 쉽게 바꿔줌.
/// </summary>
/// <param name="idx">DB에서 가져온 마크등급</param>
/// <returns></returns>
string Change_Grade(string idx)
{
string result = string.Empty;
@@ -97,6 +124,57 @@ namespace WindowsFormsApp1.Mac
}
return result;
}
/// <summary>
/// 검색 필터에 따라 target이 변경됨
/// </summary>
/// <returns></returns>
string setting_target()
{
string res = string.Empty;
if (cb_data_area.SelectedIndex == 0)
{
switch (cb_filter.SelectedIndex)
{
case 0:
res = "book_name";
break;
case 1:
res = "author";
break;
case 2:
res = "book_comp";
break;
case 3:
res = "isbn";
break;
default:
break;
}
}
else
{
switch (cb_filter.SelectedIndex)
{
case 0:
res = "서명";
break;
case 1:
res = cb_filter.Text;
break;
case 2:
res = cb_filter.Text;
break;
case 3:
res = cb_filter.Text;
break;
default:
break;
}
}
return res;
}
#endregion
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
{
int row = e.RowIndex;

View File

@@ -138,13 +138,13 @@
<metadata name="pub_date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Marc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="etc1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="etc2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Marc.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

View File

@@ -29,12 +29,7 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Home_User_manage));
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel();
this.toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.check_Away = new System.Windows.Forms.CheckBox();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
this.panel1 = new System.Windows.Forms.Panel();
this.panel12 = new System.Windows.Forms.Panel();
this.check20_2 = new System.Windows.Forms.CheckBox();
@@ -75,7 +70,6 @@
this.check16_2 = new System.Windows.Forms.CheckBox();
this.check16_1 = new System.Windows.Forms.CheckBox();
this.label41 = new System.Windows.Forms.Label();
this.btn_Save = new System.Windows.Forms.Button();
this.panel7 = new System.Windows.Forms.Panel();
this.check6_2 = new System.Windows.Forms.CheckBox();
this.check6_1 = new System.Windows.Forms.CheckBox();
@@ -125,6 +119,7 @@
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.btn_Save = new System.Windows.Forms.Button();
this.btn_IDOverlap = new System.Windows.Forms.Button();
this.label11 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
@@ -141,15 +136,14 @@
this.tb_position = new System.Windows.Forms.TextBox();
this.tb_Name = new System.Windows.Forms.TextBox();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.tabPage2 = new System.Windows.Forms.TabPage();
this.tabPage3 = new System.Windows.Forms.TabPage();
this.toolStrip1.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.btn_lookup = new System.Windows.Forms.Button();
this.btn_close = new System.Windows.Forms.Button();
this.Per_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Rank = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Phone = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.PW = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.right = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel1.SuspendLayout();
this.panel12.SuspendLayout();
this.panel11.SuspendLayout();
@@ -174,63 +168,6 @@
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// toolStrip1
//
resources.ApplyResources(this.toolStrip1, "toolStrip1");
this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripLabel1,
this.toolStripLabel2});
this.toolStrip1.Name = "toolStrip1";
//
// toolStripLabel1
//
this.toolStripLabel1.Name = "toolStripLabel1";
resources.ApplyResources(this.toolStripLabel1, "toolStripLabel1");
//
// toolStripLabel2
//
this.toolStripLabel2.Name = "toolStripLabel2";
resources.ApplyResources(this.toolStripLabel2, "toolStripLabel2");
//
// tabControl1
//
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
resources.ApplyResources(this.tabControl1, "tabControl1");
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.check_Away);
this.tabPage1.Controls.Add(this.panel1);
this.tabPage1.Controls.Add(this.btn_IDOverlap);
this.tabPage1.Controls.Add(this.label11);
this.tabPage1.Controls.Add(this.label10);
this.tabPage1.Controls.Add(this.label9);
this.tabPage1.Controls.Add(this.label8);
this.tabPage1.Controls.Add(this.label7);
this.tabPage1.Controls.Add(this.label4);
this.tabPage1.Controls.Add(this.btn_Del);
this.tabPage1.Controls.Add(this.btn_Add);
this.tabPage1.Controls.Add(this.tb_Affil);
this.tabPage1.Controls.Add(this.tb_Phone);
this.tabPage1.Controls.Add(this.tb_PW);
this.tabPage1.Controls.Add(this.tb_ID);
this.tabPage1.Controls.Add(this.tb_position);
this.tabPage1.Controls.Add(this.tb_Name);
this.tabPage1.Controls.Add(this.dataGridView1);
resources.ApplyResources(this.tabPage1, "tabPage1");
this.tabPage1.Name = "tabPage1";
this.tabPage1.UseVisualStyleBackColor = true;
//
// check_Away
//
resources.ApplyResources(this.check_Away, "check_Away");
this.check_Away.Name = "check_Away";
this.check_Away.UseVisualStyleBackColor = true;
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.Silver;
@@ -246,7 +183,6 @@
this.panel1.Controls.Add(this.panel15);
this.panel1.Controls.Add(this.panel8);
this.panel1.Controls.Add(this.panel16);
this.panel1.Controls.Add(this.btn_Save);
this.panel1.Controls.Add(this.panel7);
this.panel1.Controls.Add(this.panel17);
this.panel1.Controls.Add(this.panel6);
@@ -537,13 +473,6 @@
resources.ApplyResources(this.label41, "label41");
this.label41.Name = "label41";
//
// btn_Save
//
resources.ApplyResources(this.btn_Save, "btn_Save");
this.btn_Save.Name = "btn_Save";
this.btn_Save.UseVisualStyleBackColor = true;
this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
//
// panel7
//
this.panel7.BackColor = System.Drawing.Color.LightGray;
@@ -878,6 +807,13 @@
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// btn_Save
//
resources.ApplyResources(this.btn_Save, "btn_Save");
this.btn_Save.Name = "btn_Save";
this.btn_Save.UseVisualStyleBackColor = true;
this.btn_Save.Click += new System.EventHandler(this.btn_Save_Click);
//
// btn_IDOverlap
//
resources.ApplyResources(this.btn_IDOverlap, "btn_IDOverlap");
@@ -964,11 +900,21 @@
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.BackgroundColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle2.Font = new System.Drawing.Font("굴림", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dataGridView1.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Column3,
this.Column1,
this.Column2,
this.Column4});
this.Per_name,
this.Rank,
this.Phone,
this.ID,
this.PW,
this.right});
this.dataGridView1.EditMode = System.Windows.Forms.DataGridViewEditMode.EditProgrammatically;
resources.ApplyResources(this.dataGridView1, "dataGridView1");
this.dataGridView1.Name = "dataGridView1";
@@ -976,55 +922,79 @@
this.dataGridView1.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellClick);
//
// Column3
// btn_lookup
//
resources.ApplyResources(this.Column3, "Column3");
this.Column3.Name = "Column3";
this.Column3.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
resources.ApplyResources(this.btn_lookup, "btn_lookup");
this.btn_lookup.Name = "btn_lookup";
this.btn_lookup.UseVisualStyleBackColor = true;
this.btn_lookup.Click += new System.EventHandler(this.btn_lookup_Click);
//
// Column1
// btn_close
//
resources.ApplyResources(this.Column1, "Column1");
this.Column1.Name = "Column1";
this.Column1.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
resources.ApplyResources(this.btn_close, "btn_close");
this.btn_close.Name = "btn_close";
this.btn_close.UseVisualStyleBackColor = true;
//
// Column2
// Per_name
//
resources.ApplyResources(this.Column2, "Column2");
this.Column2.Name = "Column2";
this.Column2.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
resources.ApplyResources(this.Per_name, "Per_name");
this.Per_name.Name = "Per_name";
this.Per_name.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// Column4
// Rank
//
resources.ApplyResources(this.Column4, "Column4");
this.Column4.Name = "Column4";
this.Column4.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
resources.ApplyResources(this.Rank, "Rank");
this.Rank.Name = "Rank";
this.Rank.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// tabPage2
// Phone
//
resources.ApplyResources(this.tabPage2, "tabPage2");
this.tabPage2.Name = "tabPage2";
this.tabPage2.UseVisualStyleBackColor = true;
resources.ApplyResources(this.Phone, "Phone");
this.Phone.Name = "Phone";
this.Phone.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// tabPage3
// ID
//
resources.ApplyResources(this.tabPage3, "tabPage3");
this.tabPage3.Name = "tabPage3";
this.tabPage3.UseVisualStyleBackColor = true;
resources.ApplyResources(this.ID, "ID");
this.ID.Name = "ID";
this.ID.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
//
// PW
//
resources.ApplyResources(this.PW, "PW");
this.PW.Name = "PW";
//
// right
//
resources.ApplyResources(this.right, "right");
this.right.Name = "right";
//
// Home_User_manage
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.toolStrip1);
this.Controls.Add(this.btn_close);
this.Controls.Add(this.btn_lookup);
this.Controls.Add(this.panel1);
this.Controls.Add(this.btn_IDOverlap);
this.Controls.Add(this.dataGridView1);
this.Controls.Add(this.label11);
this.Controls.Add(this.tb_Name);
this.Controls.Add(this.label10);
this.Controls.Add(this.tb_position);
this.Controls.Add(this.label9);
this.Controls.Add(this.tb_ID);
this.Controls.Add(this.label8);
this.Controls.Add(this.btn_Save);
this.Controls.Add(this.tb_PW);
this.Controls.Add(this.label7);
this.Controls.Add(this.tb_Phone);
this.Controls.Add(this.label4);
this.Controls.Add(this.tb_Affil);
this.Controls.Add(this.btn_Del);
this.Controls.Add(this.btn_Add);
this.Name = "Home_User_manage";
this.Load += new System.EventHandler(this.Form1_Load);
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel12.ResumeLayout(false);
@@ -1074,19 +1044,8 @@
}
#endregion
private System.Windows.Forms.ToolStrip toolStrip1;
private System.Windows.Forms.ToolStripLabel toolStripLabel1;
private System.Windows.Forms.ToolStripLabel toolStripLabel2;
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage2;
private System.Windows.Forms.TabPage tabPage3;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.Button btn_Add;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column3;
private System.Windows.Forms.DataGridViewTextBoxColumn Column1;
private System.Windows.Forms.DataGridViewTextBoxColumn Column2;
private System.Windows.Forms.DataGridViewTextBoxColumn Column4;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Panel panel12;
private System.Windows.Forms.Label label37;
@@ -1189,9 +1148,16 @@
private System.Windows.Forms.TextBox tb_position;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox tb_Affil;
private System.Windows.Forms.CheckBox check_Away;
private System.Windows.Forms.CheckBox ALL_check2;
private System.Windows.Forms.CheckBox ALL_check1;
private System.Windows.Forms.Button btn_lookup;
private System.Windows.Forms.Button btn_close;
private System.Windows.Forms.DataGridViewTextBoxColumn Per_name;
private System.Windows.Forms.DataGridViewTextBoxColumn Rank;
private System.Windows.Forms.DataGridViewTextBoxColumn Phone;
private System.Windows.Forms.DataGridViewTextBoxColumn ID;
private System.Windows.Forms.DataGridViewTextBoxColumn PW;
private System.Windows.Forms.DataGridViewTextBoxColumn right;
}
}

View File

@@ -9,8 +9,6 @@ using System.Net.Sockets;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using MySql.Data.MySqlClient;
using MySqlX.XDevAPI.Relational;
namespace WindowsFormsApp1.Home
{
@@ -21,6 +19,7 @@ namespace WindowsFormsApp1.Home
string[] tempData;
Helper_DB _DB = new Helper_DB();
Main main;
string comp_name = string.Empty;
string Table_User = "User_Data";
int gridIndex;
@@ -28,30 +27,37 @@ namespace WindowsFormsApp1.Home
{
InitializeComponent();
main = _main;
comp_name = main.toolStripLabel2.Text;
}
private void Form1_Load(object sender, EventArgs e)
{
_DB.DBcon();
tb_Affil.Enabled = false;
_DB.DB_Select_Search("`affil`", Table_User, "");
User_Manage();
btn_lookup_Click(null, null);
init_check();
}
/// <summary>
/// DB에 저장된 사용자 데이터를 dataGridView1로 입력하는 함수.
/// </summary>
private void User_Manage()
/// <param name="sender"></param>
/// <param name="e"></param>
private void btn_lookup_Click(object sender, EventArgs e)
{
string tmpstr = _DB.DB_Search("User_Data", "affil", "글로리아북"); // 글로리아북 -> data[3]
dataGridView1.Rows.Clear();
string Area = "`name`, `position`, `Phone`, `ID`, `PW`, `right`";
string tmpstr = _DB.DB_Select_Search(Area, "User_Data", "affil", comp_name);
string[] data = tmpstr.Split('|');
int cout = 0;
for (int a = 0; a < data.Length / 9; a++) { dataGridView1.Rows.Add(); }
string[] grid = { "", "", "", "", "", "" };
for (int a = 0; a < data.Length; a++)
{
if (a % 9 == 1) { dataGridView1.Rows[cout].Cells[0].Value = data[a]; }
if (a % 9 == 3) { dataGridView1.Rows[cout].Cells[1].Value = data[a]; }
if (a % 9 == 6) { dataGridView1.Rows[cout].Cells[2].Value = data[a]; }
if (a % 9 == 7) { dataGridView1.Rows[cout].Cells[3].Value = data[a]; cout++; }
if (a % 6 == 0) { grid[0] = data[a]; }
if (a % 6 == 1) { grid[1] = data[a]; }
if (a % 6 == 2) { grid[2] = data[a]; }
if (a % 6 == 3) { grid[3] = data[a]; }
if (a % 6 == 4) { grid[4] = data[a]; }
if (a % 6 == 5) { grid[5] = data[a];
dataGridView1.Rows.Add(grid);
}
}
}
/// <summary>
@@ -66,94 +72,14 @@ namespace WindowsFormsApp1.Home
string value = dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
string tmpstr = _DB.DB_Search(Table_User, "id", value);
tempData = tmpstr.Split('|');
tb_ID.Text = tempData[1];
tb_PW.Text = tempData[2];
tb_Name.Text = tempData[3];
tb_Affil.Text = tempData[5];
tb_position.Text = tempData[6];
tb_Phone.Text = tempData[7];
string[] real = tempData[4].Split(',');
{
if (real[0] == "0") { check1_1.Checked = false; check1_2.Checked = false; }
else if (real[0] == "1") { check1_1.Checked = true; check1_2.Checked = false; }
else if (real[0] == "2") { check1_1.Checked = true; check1_2.Checked = true; }
if (real[1] == "0") { check2_1.Checked = false; check2_2.Checked = false; }
else if (real[1] == "1") { check2_1.Checked = true; check2_2.Checked = false; }
else if (real[1] == "2") { check2_1.Checked = true; check2_2.Checked = true; }
if (real[2] == "0") { check3_1.Checked = false; check3_2.Checked = false; }
else if (real[2] == "1") { check3_1.Checked = true; check3_2.Checked = false; }
else if (real[2] == "2") { check3_1.Checked = true; check3_2.Checked = true; }
if (real[3] == "0") { check4_1.Checked = false; check4_2.Checked = false; }
else if (real[3] == "1") { check4_1.Checked = true; check4_2.Checked = false; }
else if (real[3] == "2") { check4_1.Checked = true; check4_2.Checked = true; }
if (real[4] == "0") { check5_1.Checked = false; check5_2.Checked = false; }
else if (real[4] == "1") { check5_1.Checked = true; check5_2.Checked = false; }
else if (real[4] == "2") { check5_1.Checked = true; check5_2.Checked = true; }
if (real[5] == "0") { check6_1.Checked = false; check6_2.Checked = false; }
else if (real[5] == "1") { check6_1.Checked = true; check6_2.Checked = false; }
else if (real[5] == "2") { check6_1.Checked = true; check6_2.Checked = true; }
if (real[6] == "0") { check7_1.Checked = false; check7_2.Checked = false; }
else if (real[6] == "1") { check7_1.Checked = true; check7_2.Checked = false; }
else if (real[6] == "2") { check7_1.Checked = true; check7_2.Checked = true; }
if (real[7] == "0") { check8_1.Checked = false; check8_2.Checked = false; }
else if (real[7] == "1") { check8_1.Checked = true; check8_2.Checked = false; }
else if (real[7] == "2") { check8_1.Checked = true; check8_2.Checked = true; }
if (real[8] == "0") { check9_1.Checked = false; check9_2.Checked = false; }
else if (real[8] == "1") { check9_1.Checked = true; check9_2.Checked = false; }
else if (real[8] == "2") { check9_1.Checked = true; check9_2.Checked = true; }
if (real[9] == "0") { check10_1.Checked = false; check10_2.Checked = false; }
else if (real[9] == "1") { check10_1.Checked = true; check10_2.Checked = false; }
else if (real[9] == "2") { check10_1.Checked = true; check10_2.Checked = true; }
if (real[10] == "0") { check11_1.Checked = false; check11_2.Checked = false; }
else if (real[10] == "1") { check11_1.Checked = true; check11_2.Checked = false; }
else if (real[10] == "2") { check11_1.Checked = true; check11_2.Checked = true; }
if (real[11] == "0") { check12_1.Checked = false; check12_2.Checked = false; }
else if (real[11] == "1") { check12_1.Checked = true; check12_2.Checked = false; }
else if (real[11] == "2") { check12_1.Checked = true; check12_2.Checked = true; }
if (real[12] == "0") { check13_1.Checked = false; check13_2.Checked = false; }
else if (real[12] == "1") { check13_1.Checked = true; check13_2.Checked = false; }
else if (real[12] == "2") { check13_1.Checked = true; check13_2.Checked = true; }
if (real[13] == "0") { check14_1.Checked = false; check14_2.Checked = false; }
else if (real[13] == "1") { check14_1.Checked = true; check14_2.Checked = false; }
else if (real[13] == "2") { check14_1.Checked = true; check14_2.Checked = true; }
if (real[14] == "0") { check15_1.Checked = false; check15_2.Checked = false; }
else if (real[14] == "1") { check15_1.Checked = true; check15_2.Checked = false; }
else if (real[14] == "2") { check15_1.Checked = true; check15_2.Checked = true; }
if (real[15] == "0") { check16_1.Checked = false; check16_2.Checked = false; }
else if (real[15] == "1") { check16_1.Checked = true; check16_2.Checked = false; }
else if (real[15] == "2") { check16_1.Checked = true; check16_2.Checked = true; }
if (real[16] == "0") { check17_1.Checked = false; check17_2.Checked = false; }
else if (real[16] == "1") { check17_1.Checked = true; check17_2.Checked = false; }
else if (real[16] == "2") { check17_1.Checked = true; check17_2.Checked = true; }
if (real[17] == "0") { check18_1.Checked = false; check18_2.Checked = false; }
else if (real[17] == "1") { check18_1.Checked = true; check18_2.Checked = false; }
else if (real[17] == "2") { check18_1.Checked = true; check18_2.Checked = true; }
if (real[18] == "0") { check19_1.Checked = false; check19_2.Checked = false; }
else if (real[18] == "1") { check19_1.Checked = true; check19_2.Checked = false; }
else if (real[18] == "2") { check19_1.Checked = true; check19_2.Checked = true; }
if (real[19] == "0") { check20_1.Checked = false; check20_2.Checked = false; }
else if (real[19] == "1") { check20_1.Checked = true; check20_2.Checked = false; }
else if (real[19] == "2") { check20_1.Checked = true; check20_2.Checked = true; }
} // 열면 후회함 (권한 나눈거 체크체크)
tb_ID.Text = dataGridView1.Rows[e.RowIndex].Cells["ID"].Value.ToString();
tb_PW.Text = dataGridView1.Rows[e.RowIndex].Cells["PW"].Value.ToString();
tb_Name.Text = dataGridView1.Rows[e.RowIndex].Cells["Per_Name"].Value.ToString();
tb_Affil.Text = comp_name;
tb_position.Text = dataGridView1.Rows[e.RowIndex].Cells["Rank"].Value.ToString();
tb_Phone.Text = dataGridView1.Rows[e.RowIndex].Cells["Phone"].Value.ToString();
string[] real = dataGridView1.Rows[e.RowIndex].Cells["right"].Value.ToString().Split(',');
right_chk(real);
init_check();
}
private void check1_1_Click(object sender, EventArgs e)
@@ -176,7 +102,7 @@ namespace WindowsFormsApp1.Home
private void btn_Save_Click(object sender, EventArgs e)
{
string right = Return_right();
User_Manage();
btn_lookup_Click(null, null);
_DB.DB_Update(Table_User, "right", right, "ID", tempData[1]); //(Table_User, "right", right, tempData[1]);
}
private void btn_Add_Click(object sender, EventArgs e)
@@ -201,11 +127,9 @@ namespace WindowsFormsApp1.Home
else { create_DB += "'" + tb_position.Text + "',"; }
if (tb_Phone.Text == "") { create_DB += "null,"; }
else { create_DB += "'" + tb_Phone.Text + "',"; }
if (check_Away.Checked == true) { create_DB += "'외부업체');"; }
else { create_DB += "null);"; }
_DB.self_Made_Cmd(create_DB);
overlap = false;
User_Manage();
btn_lookup_Click(null, null);
}
else { MessageBox.Show("아이디 중복확인을 해주세요"); }
}
@@ -214,6 +138,8 @@ namespace WindowsFormsApp1.Home
_DB.DB_Delete(Table_User, "id", tempData[0], "PW", tempData[1]);
dataGridView1.Rows.Remove(dataGridView1.Rows[gridIndex]);
}
#region
/// <summary>
/// 체크박스로 권한(right)값 구하기
/// </summary>
@@ -305,6 +231,92 @@ namespace WindowsFormsApp1.Home
return right;
}
/// <summary>
/// 권한 나눈거 적용하는 함수
/// </summary>
/// <param name="real"></param>
private void right_chk(string[] real)
{
if (real[0] == "0") { check1_1.Checked = false; check1_2.Checked = false; }
else if (real[0] == "1") { check1_1.Checked = true; check1_2.Checked = false; }
else if (real[0] == "2") { check1_1.Checked = true; check1_2.Checked = true; }
if (real[1] == "0") { check2_1.Checked = false; check2_2.Checked = false; }
else if (real[1] == "1") { check2_1.Checked = true; check2_2.Checked = false; }
else if (real[1] == "2") { check2_1.Checked = true; check2_2.Checked = true; }
if (real[2] == "0") { check3_1.Checked = false; check3_2.Checked = false; }
else if (real[2] == "1") { check3_1.Checked = true; check3_2.Checked = false; }
else if (real[2] == "2") { check3_1.Checked = true; check3_2.Checked = true; }
if (real[3] == "0") { check4_1.Checked = false; check4_2.Checked = false; }
else if (real[3] == "1") { check4_1.Checked = true; check4_2.Checked = false; }
else if (real[3] == "2") { check4_1.Checked = true; check4_2.Checked = true; }
if (real[4] == "0") { check5_1.Checked = false; check5_2.Checked = false; }
else if (real[4] == "1") { check5_1.Checked = true; check5_2.Checked = false; }
else if (real[4] == "2") { check5_1.Checked = true; check5_2.Checked = true; }
if (real[5] == "0") { check6_1.Checked = false; check6_2.Checked = false; }
else if (real[5] == "1") { check6_1.Checked = true; check6_2.Checked = false; }
else if (real[5] == "2") { check6_1.Checked = true; check6_2.Checked = true; }
if (real[6] == "0") { check7_1.Checked = false; check7_2.Checked = false; }
else if (real[6] == "1") { check7_1.Checked = true; check7_2.Checked = false; }
else if (real[6] == "2") { check7_1.Checked = true; check7_2.Checked = true; }
if (real[7] == "0") { check8_1.Checked = false; check8_2.Checked = false; }
else if (real[7] == "1") { check8_1.Checked = true; check8_2.Checked = false; }
else if (real[7] == "2") { check8_1.Checked = true; check8_2.Checked = true; }
if (real[8] == "0") { check9_1.Checked = false; check9_2.Checked = false; }
else if (real[8] == "1") { check9_1.Checked = true; check9_2.Checked = false; }
else if (real[8] == "2") { check9_1.Checked = true; check9_2.Checked = true; }
if (real[9] == "0") { check10_1.Checked = false; check10_2.Checked = false; }
else if (real[9] == "1") { check10_1.Checked = true; check10_2.Checked = false; }
else if (real[9] == "2") { check10_1.Checked = true; check10_2.Checked = true; }
if (real[10] == "0") { check11_1.Checked = false; check11_2.Checked = false; }
else if (real[10] == "1") { check11_1.Checked = true; check11_2.Checked = false; }
else if (real[10] == "2") { check11_1.Checked = true; check11_2.Checked = true; }
if (real[11] == "0") { check12_1.Checked = false; check12_2.Checked = false; }
else if (real[11] == "1") { check12_1.Checked = true; check12_2.Checked = false; }
else if (real[11] == "2") { check12_1.Checked = true; check12_2.Checked = true; }
if (real[12] == "0") { check13_1.Checked = false; check13_2.Checked = false; }
else if (real[12] == "1") { check13_1.Checked = true; check13_2.Checked = false; }
else if (real[12] == "2") { check13_1.Checked = true; check13_2.Checked = true; }
if (real[13] == "0") { check14_1.Checked = false; check14_2.Checked = false; }
else if (real[13] == "1") { check14_1.Checked = true; check14_2.Checked = false; }
else if (real[13] == "2") { check14_1.Checked = true; check14_2.Checked = true; }
if (real[14] == "0") { check15_1.Checked = false; check15_2.Checked = false; }
else if (real[14] == "1") { check15_1.Checked = true; check15_2.Checked = false; }
else if (real[14] == "2") { check15_1.Checked = true; check15_2.Checked = true; }
if (real[15] == "0") { check16_1.Checked = false; check16_2.Checked = false; }
else if (real[15] == "1") { check16_1.Checked = true; check16_2.Checked = false; }
else if (real[15] == "2") { check16_1.Checked = true; check16_2.Checked = true; }
if (real[16] == "0") { check17_1.Checked = false; check17_2.Checked = false; }
else if (real[16] == "1") { check17_1.Checked = true; check17_2.Checked = false; }
else if (real[16] == "2") { check17_1.Checked = true; check17_2.Checked = true; }
if (real[17] == "0") { check18_1.Checked = false; check18_2.Checked = false; }
else if (real[17] == "1") { check18_1.Checked = true; check18_2.Checked = false; }
else if (real[17] == "2") { check18_1.Checked = true; check18_2.Checked = true; }
if (real[18] == "0") { check19_1.Checked = false; check19_2.Checked = false; }
else if (real[18] == "1") { check19_1.Checked = true; check19_2.Checked = false; }
else if (real[18] == "2") { check19_1.Checked = true; check19_2.Checked = true; }
if (real[19] == "0") { check20_1.Checked = false; check20_2.Checked = false; }
else if (real[19] == "1") { check20_1.Checked = true; check20_2.Checked = false; }
else if (real[19] == "2") { check20_1.Checked = true; check20_2.Checked = true; }
}
/// <summary>
/// 체크박스 초기화
/// </summary>
private void init_check()
@@ -454,5 +466,6 @@ namespace WindowsFormsApp1.Home
}
init_check();
}
#endregion
}
}

File diff suppressed because it is too large Load Diff