1. ISBN조회에서 검색조건중 ISBN이 없음
ㄴ> 완료
2. ISBN조회에서 수동으로 내용 바꾸기 불가능, 붙여넣기등
ㄴ> 완료
3. 마크목록에서 줄 추가, 삭제, 내용수정(대체를 그자리에 넣는경우 필요)기능
1) 저장시마다 008 늘어남 오류
저장시 필수태그 없으면 오류체크문구뜨게
040태그 삭제
저장한사람 누구인지 저장일시 분초까지
4. 마크편집창 (칸채우기)
1) 245d에서 100(기본표목) 반영할것.
2) 메모장이랑 칸채우기 왔다갔다 하면 653이 650으로 저장 됩니다!
3) 기본표목 245d로 생성 안됨, 저자도치체크가능하게끔
4) 440v - 2개인 경우가 문제되므로 후에 - 를 ◐로 바꿀것
나중에 반출시에 ◐를 다시 - 로 되돌리도록(일괄처리구현시 기본에 넣기) -나중개발
5) 100태그 제곱으로 늘어나는 버그.
5. DLS조회+DLS입력, 마크정리+반출 각각 통합
6. 소장자료검색 필터에 날짜와 작성자, 등급필터추가, 원래있던 조건에 도서명 등말고도 총서명추가
ㄴ> Marc DB의 총서명 컬럼 불러오면 될듯.
7. 소장자료검색에서 더블클릭시 Search_Infor_Sub에서 -> 마크편집폼으로 전환.
8. 마크편집
저장시각, 작성자, 비고, 등급 표시 필요함.
9. 복본조사
1) 복본조사쪽 지연시간은 따로 피드백해드리면되는지?
2) 불용어랑, 괄호처리 옵션
ㄴ> 특수문자, 괄호안의 문자제거.
3) DLS복본조사 항목에 총서명(2개)추가
10. 저자기호 일괄로 만들기
11. 목록병합작업(흩어져서 작업한 것이나, 추가분등 합쳐서 작업하기 편하게 + 도서관쪽에서 마크 반입 안했을 때 복본체크 위하기도함)
-> 마크 정리에서 병합기능을 추가할것.
-> 마크 정리에서 선택한 셀 체크박스 반전시킬것. True->False / False->True
204 lines
7.3 KiB
C#
204 lines
7.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.IO;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace WindowsFormsApp1.Mac
|
|
{
|
|
public partial class Mac_Output : Form
|
|
{
|
|
Helper_DB db = new Helper_DB();
|
|
Main main;
|
|
string compidx = string.Empty;
|
|
List<string> save_date = new List<string>();
|
|
public Mac_Output(Main _main)
|
|
{
|
|
InitializeComponent();
|
|
main = _main;
|
|
compidx = main.com_idx;
|
|
}
|
|
|
|
private void Mac_Output_Load(object sender, EventArgs e)
|
|
{
|
|
db.DBcon();
|
|
|
|
string[] state = { "진행", "완료" };
|
|
cb_state.Items.AddRange(state);
|
|
cb_state.SelectedIndex = 0;
|
|
}
|
|
|
|
private void cb_state_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
if (cb_state.SelectedIndex == 0)
|
|
{
|
|
cb_years.Enabled = false;
|
|
}
|
|
else
|
|
{
|
|
cb_years.Enabled = true;
|
|
|
|
int start_years = 2009;
|
|
int now_years = Convert.ToInt32(DateTime.Now.ToString("yyyy"));
|
|
int years_count = now_years - start_years;
|
|
List<string> l_years = new List<string>();
|
|
for (int a = 0; a <= years_count; a++)
|
|
{
|
|
l_years.Add(start_years.ToString());
|
|
start_years += 1;
|
|
}
|
|
string[] years = l_years.ToArray();
|
|
cb_years.Items.AddRange(years);
|
|
cb_years.SelectedIndex = cb_years.Items.Count - 1;
|
|
}
|
|
Input_list_combo();
|
|
}
|
|
|
|
#region cb_state 선택 시 Sub함수
|
|
private void Input_list_combo()
|
|
{
|
|
cb_list.Items.Clear();
|
|
string area = "`date`, `list_name`, `connect_data`";
|
|
string[] table = { "compidx", "state" };
|
|
string[] data = { compidx, cb_state.Text };
|
|
string cmd = db.More_DB_Search("Obj_List_Marc", table, data, area);
|
|
string db_res = db.DB_Send_CMD_Search(cmd);
|
|
string[] marc_list = db_res.Split('|');
|
|
|
|
string[] tmp = { "", "", "" };
|
|
bool years = true;
|
|
|
|
for(int a = 0; a < marc_list.Length - 1; a++)
|
|
{
|
|
if (a % 3 == 0) { tmp[0] = marc_list[a];
|
|
years = years_UpAndDown(tmp[0]);
|
|
if (cb_state.SelectedIndex == 0) years = true;
|
|
}
|
|
if (a % 3 == 1) { tmp[1] = marc_list[a]; }
|
|
if (a % 3 == 2) { tmp[2] = marc_list[a];
|
|
if (years) {
|
|
save_date.Add(tmp[0]);
|
|
cb_list.Items.Add(tmp[1]);
|
|
connect_list.Items.Add(tmp[2]);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
private bool years_UpAndDown(string years)
|
|
{
|
|
if(cb_years.Text == "") { return false; }
|
|
int select = Convert.ToInt32(cb_years.Text);
|
|
int year = Convert.ToInt32(years.Substring(0, 4));
|
|
|
|
if (select != year)
|
|
return false;
|
|
else
|
|
return true;
|
|
}
|
|
#endregion
|
|
|
|
private void cb_list_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
dataGridView1.Rows.Clear();
|
|
connect_list.SelectedIndex = cb_list.SelectedIndex;
|
|
string area = "`isbn`, `book_name`, `author`, `book_comp`, `price`";
|
|
string[] col = { "compidx", "list_name", "date" };
|
|
string[] data = { compidx, connect_list.Text, save_date[cb_list.SelectedIndex] };
|
|
string cmd = db.More_DB_Search("Obj_List_Book", col, data, area);
|
|
string db_res = db.DB_Send_CMD_Search(cmd);
|
|
string[] tmp_ary = db_res.Split('|');
|
|
Input_Grid(tmp_ary);
|
|
Search_Marc();
|
|
}
|
|
|
|
#region cb_list 선택 시 Sub함수
|
|
private void Input_Grid(string[] db_data)
|
|
{
|
|
string[] grid = { "", "", "", "", "", "", "" }; // isbn, 도서명, 총서명, 저자, 출판사, 정가, 마크
|
|
for (int a = 0; a < db_data.Length; a++)
|
|
{
|
|
if (a % 5 == 0) { grid[0] = db_data[a]; }
|
|
if (a % 5 == 1) { grid[1] = db_data[a]; }
|
|
if (a % 5 == 2) { grid[3] = db_data[a]; }
|
|
if (a % 5 == 3) { grid[4] = db_data[a]; }
|
|
if (a % 5 == 4) { grid[5] = db_data[a];
|
|
dataGridView1.Rows.Add(grid);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void Search_Marc()
|
|
{
|
|
string area = "`총서명`, `marc`, `marc_chk`, `marc1`, `marc_chk1`, `marc2`, `marc_chk2`";
|
|
string[] col = { "ISBN" };
|
|
for(int a = 0; a < dataGridView1.Rows.Count; a++)
|
|
{
|
|
string[] data = { dataGridView1.Rows[a].Cells["isbn"].Value.ToString() };
|
|
|
|
string cmd = db.More_DB_Search("Marc", col, data, area);
|
|
string db_res = db.DB_Send_CMD_Search(cmd);
|
|
if (db_res.Length < 7) { continue; }
|
|
string[] tmp_ary = db_res.Split('|');
|
|
Add_Marc(tmp_ary, a);
|
|
}
|
|
}
|
|
private void Add_Marc(string[] db_data, int idx)
|
|
{
|
|
if (db_data[2] == "1") {
|
|
dataGridView1.Rows[idx].Cells["series"].Value = db_data[0];
|
|
dataGridView1.Rows[idx].Cells["Marc"].Value = db_data[1];
|
|
}
|
|
else if (db_data[4] == "1") {
|
|
dataGridView1.Rows[idx].Cells["series"].Value = db_data[0];
|
|
dataGridView1.Rows[idx].Cells["Marc"].Value = db_data[3];
|
|
}
|
|
else if (db_data[6] == "1") {
|
|
dataGridView1.Rows[idx].Cells["series"].Value = db_data[0];
|
|
dataGridView1.Rows[idx].Cells["Marc"].Value = db_data[5];
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
private void dataGridView1_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
|
|
{
|
|
Skill_Grid sg = new Skill_Grid();
|
|
sg.Print_Grid_Num(sender, e);
|
|
}
|
|
|
|
private void btn_file_save_Click(object sender, EventArgs e)
|
|
{
|
|
string Marc_data = string.Empty;
|
|
for (int a = 0; a < dataGridView1.Rows.Count; a++)
|
|
{
|
|
if (dataGridView1.Rows[a].Cells["Marc"].Value.ToString() == "" &&
|
|
dataGridView1.Rows[a].Cells["Marc"].Value == null)
|
|
continue;
|
|
|
|
Marc_data += dataGridView1.Rows[a].Cells["Marc"].Value.ToString().Replace("₩", "\\");
|
|
}
|
|
|
|
string FileName;
|
|
SaveFileDialog saveFileDialog = new SaveFileDialog();
|
|
saveFileDialog.Title = "저장 경로를 지정하세요.";
|
|
saveFileDialog.OverwritePrompt = true;
|
|
saveFileDialog.Filter = "마크 파일 (*.mrc)|*.mrc|모든 파일 (*.*)|*.*";
|
|
|
|
if (saveFileDialog.ShowDialog() == DialogResult.OK)
|
|
{
|
|
FileName = saveFileDialog.FileName;
|
|
File.WriteAllText(FileName, Marc_data, Encoding.Default);
|
|
}
|
|
}
|
|
|
|
private void btn_close_Click(object sender, EventArgs e)
|
|
{
|
|
Close();
|
|
}
|
|
}
|
|
}
|