[NewEditor] 저장기능 확인, 목록다시불러오기 기능추가

[2601152030] v- 마크편집 마크칸 채우기를 왔다갔다 하면 300 p.에 .이 없어져서 p로만 남음 (300 p. <-> 300) ,  p. 에 공백없게
[2601152030] v- 미소장마크 불러오기 할때 코리스에서 보이는 창 넓게(부차적)
[2601152030] v- D등급 저장이 필요 -> 그냥 저장할 수 있게 -> 데이터가 부족하더라도 저장이 되게
[2601152030] v- db에 저장된 isbn과 마크에 저장된 이 다를 경우 저장을 하면 저장 전에 오류표시 및 저장 가능하게
[2601152030] v- 사진 더블클릭시 미리보기 나오게, 오류창 제거요망
This commit is contained in:
2026-01-15 21:28:17 +09:00
parent 66e4392d7c
commit d5aa0fe59d
7 changed files with 281 additions and 160 deletions

View File

@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
// 기본값으로 할 수 있습니다.
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2026.01.09.2120")]
[assembly: AssemblyFileVersion("2026.01.09.2120")]
[assembly: AssemblyVersion("2026.01.15.2015")]
[assembly: AssemblyFileVersion("2026.01.15.2015")]

View File

@@ -435,11 +435,11 @@ namespace ExcelTest
MessageBox.Show("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!");
return;
}
if (grade == 3)
{
MessageBox.Show("등급을 설정해주세요. (C 이상)");
return;
}
//if (grade == 3)
//{
// MessageBox.Show("등급을 설정해주세요. (C 이상)");
// return;
//}
string table_name = "Marc";
string BaseText = richTextBox1.Text;
string lblisbn = lbl_ISBN.Text.Replace("[", "").Replace("]", "");
@@ -455,9 +455,11 @@ namespace ExcelTest
if (BaseText.IndexOf(lblisbn) < 0)
{
MessageBox.Show("ISBN 상태를 확인해주세요.");
var dlg = UTIL.MsgQ("저장된 ISBN이 마크데이터에 없습니다.\nISBN값이 변경되었습니다\n그래도 저장 할까요?");
if (dlg != DialogResult.Yes) return;
return;
}
string tag056 = Tag056();
string[] grid_data = {
List_Book.Rows[SaveRowIdx].Cells["ISBN13"].Value.ToString(),
@@ -469,6 +471,7 @@ namespace ExcelTest
string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
string orimarc = st.made_Ori_marc(richTextBox1).Replace(@"\", "₩");
string Midx = List_Book.Rows[SaveRowIdx].Cells["marc_idx"].Value.ToString();
// 필수태그 확인
if (!isMustTag(orimarc))
{
@@ -485,24 +488,11 @@ namespace ExcelTest
// 마지막 수정일로부터 2일이 지났는지, 마지막 저장자가 사용자인지 확인
TimeSpan sp = spspsp(SaveDate, date);
IsCoverDate = IsCoverData(sp.Days, SaveUser);
// if (IsCoverDate) {
// etc2.Text = etc2.Text.Replace(SaveDate, date);
// }
// else {
// etc2.Text += string.Format("{0}\t{1}\n", date, mUserName);
// }
}
//else
//{
// etc2.Text += string.Format("{0}\t{1}\n", date, mUserName);
//}
// true일 경우 INSERT, false일 경우 UPDATE
bool isNewData = true;
bool isNewData = Midx != "" ? false : true;
if (Midx != "")
isNewData = false;
if (List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor == Color.Orange ||
List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor == Color.Red)
@@ -540,36 +530,7 @@ namespace ExcelTest
MessageBox.Show("ISBN 데이터가 없습니다.");
return;
}
//if (grid_data[0] != null && grid_data[0] != "")
//{
// int marcChk = Sub_marc_chk(grid_data[0]);
// if (IsCoverDate)
// marcChk--;
// switch (marcChk)
// {
// case 0:
// Edit_tbl[1] = "marc1";
// Edit_tbl[2] = "marc_chk1";
// Edit_tbl[3] = "marc_chk";
// break;
// case 1:
// Edit_tbl[1] = "marc2";
// Edit_tbl[2] = "marc_chk2";
// Edit_tbl[3] = "marc_chk1";
// break;
// case 2:
// Edit_tbl[1] = "marc";
// Edit_tbl[2] = "marc_chk";
// Edit_tbl[3] = "marc_chk2";
// break;
// default:
// Edit_tbl[1] = "marc";
// Edit_tbl[2] = "marc_chk";
// Edit_tbl[3] = "marc_chk2";
// break;
// }
//}
string U_cmd = db.More_Update(table_name, Edit_tbl, Edit_col, Sear_tbl, Sear_col);
PUB.log.Add("Update", string.Format("{0}({1},{2}) : {3}", mUserName, mCompidx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, U_cmd.Replace("\r", " ").Replace("\n", " ")));
db.DB_Send_CMD_reVoid(U_cmd);
@@ -2266,6 +2227,7 @@ namespace ExcelTest
str = str.Trim();
if (TagNum == "300a")
{
//gu = new char[] { ',', '=', ':', ';', '/', '+', ' ' };
gu = new char[] { '.', ',', '=', ':', ';', '/', '+', ' ' };
for (int i = 0; i < gu.Length; i++)
{

View File

@@ -1,6 +1,7 @@
//using Microsoft.Office.Interop.Excel;
using AR;
using OpenQA.Selenium.DevTools.V136.Animation;
using Org.BouncyCastle.Asn1.CryptoPro;
using System;
using System.Collections.Generic;
using System.Drawing;
@@ -44,6 +45,13 @@ namespace ExcelTest
String_Text st = new String_Text();
Mac_List ml;
//목록다시불러오기를 위해서 임시로 추가
string p_lidx = "";
string p_value = "";
string p_cidx = "";
string p_cust = "";
string p_name = "";
public Marc2()
{
InitializeComponent();
@@ -74,6 +82,15 @@ namespace ExcelTest
comboBox8.SelectedIndex = 0;
}
public void input_list()
{
var dlg = UTIL.MsgQ("데이터베이스 내용을 다시 불러옵니다\n저장되지 않은 사항은 손실됩니다.다시 불러올까요?");
if (dlg != DialogResult.Yes) return;
input_list(p_lidx, p_value, p_cidx, p_cust, p_name);
}
/// <summary>
/// 가져온 목록을 책목록과 연동하여 Grid에 집어넣음.
/// </summary>
@@ -81,7 +98,14 @@ namespace ExcelTest
/// <param name="value">목록명</param>
public void input_list(string l_idx, string value, string C_idx, string custidx, string custname)
{
p_lidx = l_idx;
p_value = value;
p_cidx = C_idx;
p_cust = custidx;
p_name = custname;
db.DBcon();
this.List_Book.Rows.Clear();
if (value.isEmpty() == false)
{
if (value.IndexOf("]") != -1)
@@ -457,24 +481,132 @@ namespace ExcelTest
private void MarcEditorControl_BookSaved(object sender, ExcelTest.MarcEditorControl.BookSavedEventArgs e)
{
if (SaveRowIdx >= 0 && SaveRowIdx < List_Book.Rows.Count)
{
string currentListIdx = List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value?.ToString();
// If list_idx column name differs, check input_list. Assuming "list_idx" or "idx".
// In input_list: grid[0] = db_data[a]; (idx).
// And MarcEditorControl uses "list_idx" passed from List_Book_SelectionChanged.
// We need to match what we passed.
string table_name = "Marc";
//string[] grid_data = {
// e.griddata[0],// List_Book.Rows[SaveRowIdx].Cells["ISBN13"].Value.ToString(),
// e.griddata[1],//List_Book.Rows[SaveRowIdx].Cells["book_name"].Value.ToString(),
// e.griddata[2],//List_Book.Rows[SaveRowIdx].Cells["author"].Value.ToString(),
// e.griddata[3],//List_Book.Rows[SaveRowIdx].Cells["book_comp"].Value.ToString(),
// e.griddata[4],//List_Book.Rows[SaveRowIdx].Cells["pay"].Value.ToString(),
// e.griddata[5]//List_Book.Rows[SaveRowIdx].Cells["url"].Value.ToString()
//};
string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
string orimarc = e.DBMarc;// st.made_Ori_marc(richTextBox1).Replace(@"\", "₩");
string Midx = List_Book.Rows[SaveRowIdx].Cells["marc_idx"].Value.ToString();
string SaveDate = List_Book.Rows[SaveRowIdx].Cells["SaveDate"].Value.ToString();
string SaveUser = List_Book.Rows[SaveRowIdx].Cells["user"].Value.ToString();
bool IsCoverDate = false;
if (SaveDate != "")
{
// 마지막 수정일로부터 2일이 지났는지, 마지막 저장자가 사용자인지 확인
TimeSpan sp = spspsp(SaveDate, date);
IsCoverDate = IsCoverData(sp.Days, SaveUser);
}
// true일 경우 INSERT, false일 경우 UPDATE
bool isNewData = Midx != "" ? false : true;
if (List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor == Color.Orange ||
List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor == Color.Red)
{
string[] Insert_tbl = {
"ISBN", "서명", "저자", "출판사",
"가격", "marc", "비고1", "비고2", "url",
"grade", "marc_chk", "user", "division", "008tag",
"date", "compidx" };
string[] Insert_col = {
e.griddata[0], e.griddata[1], e.griddata[2], e.griddata[3],
e.griddata[4], orimarc, e.etc1, e.etc2, e.griddata[5],
e.Grade, "1", mUserName, e.tag056, e.text008,
date, mCompidx };
string Incmd = db.DB_INSERT(table_name, Insert_tbl, Insert_col);
PUB.log.Add("INSERT", string.Format("{0}({1},{2}) : {3}", mUserName, mCompidx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, Incmd));
db.DB_Send_CMD_reVoid(Incmd);
isNewData = true;
}
else
{
string[] Edit_tbl = {
"compidx", "marc", "marc_chk", "marc1", "marc_chk1", "비고1",
"비고2", "url", "division", "008tag", "date",
"user", "grade" };
string[] Edit_col = {
mCompidx, orimarc, "1", mOldMarc , "0", e.etc1,
e.etc2, e.griddata[5], e.tag056,e.text008, date,
mUserName, e.Grade };
string[] Sear_tbl = { "idx", "compidx" };
string[] Sear_col = { Midx, mCompidx };
if (e.griddata[0] == null || e.griddata[0] == "")
{
MessageBox.Show("ISBN 데이터가 없습니다.");
return;
}
string U_cmd = db.More_Update(table_name, Edit_tbl, Edit_col, Sear_tbl, Sear_col);
PUB.log.Add("Update", string.Format("{0}({1},{2}) : {3}", mUserName, mCompidx, List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor, U_cmd.Replace("\r", " ").Replace("\n", " ")));
db.DB_Send_CMD_reVoid(U_cmd);
isNewData = false;
}
// Just update based on SaveRowIdx for now, assuming modal blocking or single user interaction.
List_Book.Rows[SaveRowIdx].Cells["grade"].Value = e.Grade;
List_Book.Rows[SaveRowIdx].Cells["SaveDate"].Value = e.SaveDate;
List_Book.Rows[SaveRowIdx].Cells["user"].Value = e.User;
List_Book.Rows[SaveRowIdx].Cells["db_marc"].Value = e.DBMarc;
List_Book.Rows[SaveRowIdx].Cells["marc_idx"].Value = e.MarcIdx;
List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor = SetGradeColor(e.Grade);
List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor = SetGradeColor(grade.ToString());
if (isNewData)
{
string MidxQuery = string.Format("SELECT `idx` FROM Marc WHERE isbn = {0} AND `compidx` = {1};", e.griddata[0], mCompidx);
PUB.log.Add("MarcInsert", string.Format("{0}({1}) : {2}", mUserName, mCompidx, MidxQuery));
Midx = db.DB_Send_CMD_Search(MidxQuery).Replace("|", "");
List_Book.Rows[SaveRowIdx].Cells["marc_idx"].Value = Midx;
}
string UpdateListIndex = string.Format("UPDATE `Obj_List_Book` SET `m_idx` = {0} WHERE `idx` = {1} AND 'compidx' ={2};",
Midx, List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value.ToString(), mCompidx);
PUB.log.Add("MarcUpdate", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpdateListIndex));
db.DB_Send_CMD_reVoid(UpdateListIndex);
MessageBox.Show("저장되었습니다!");
}
#region Save_Click_Sub
/// <summary>
/// 마크 저장시 사용하며, 마지막 수정일과 수정자를 가져와 덮어씌울지 백업데이터를 만들지 구분
/// </summary>
/// <param name="TimeSpanDaysValue">저장할 마크의 마지막 수정일</param>
/// <param name="user">저장할 마크의 마지막 수정자</param>
/// <returns>마지막 수정일로부터 2일이 지나지않고, 마지막 수정자와 해당 유저가 동일 할 경우 true 반환</returns>
private bool IsCoverData(int TimeSpanDaysValue, string user)
{
if (TimeSpanDaysValue < -1)
return false;
if (user != mUserName)
return false;
return true;
}
private TimeSpan spspsp(string LastDate, string SaveDate)
{
DateTime date1 = Convert.ToDateTime(LastDate);
DateTime date2 = Convert.ToDateTime(SaveDate);
TimeSpan result = date1 - date2;
return result;
}
#endregion
private void MarcEditorControl_FillBlankClicked(object sender, EventArgs e)
{
if (List_Book.CurrentRow == null) return;
@@ -777,6 +909,15 @@ namespace ExcelTest
comboBox9.Enabled = false;
}
private void marcEditorControl1_Load(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
//re load data
input_list();
}
}
}

View File

@@ -73,10 +73,10 @@
this.btCopy = new System.Windows.Forms.Button();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.lbl_BookList = new System.Windows.Forms.ToolStripStatusLabel();
this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel();
this.btClose = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.panel3 = new System.Windows.Forms.Panel();
this.button1 = new System.Windows.Forms.Button();
this.marcEditorControl1 = new ExcelTest.MarcEditorControl();
label31 = new System.Windows.Forms.Label();
label30 = new System.Windows.Forms.Label();
@@ -170,7 +170,6 @@
this.List_Book.AllowDrop = true;
this.List_Book.AllowUserToAddRows = false;
this.List_Book.AllowUserToDeleteRows = false;
this.List_Book.AllowUserToResizeColumns = false;
this.List_Book.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
@@ -477,9 +476,9 @@
//
this.tbCustName.BackColor = System.Drawing.Color.LightGray;
this.tbCustName.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold);
this.tbCustName.Location = new System.Drawing.Point(5, 6);
this.tbCustName.Location = new System.Drawing.Point(115, 6);
this.tbCustName.Name = "tbCustName";
this.tbCustName.Size = new System.Drawing.Size(385, 26);
this.tbCustName.Size = new System.Drawing.Size(275, 26);
this.tbCustName.TabIndex = 33;
this.tbCustName.Text = " ";
this.tbCustName.UseVisualStyleBackColor = false;
@@ -514,8 +513,7 @@
this.statusStrip1.Font = new System.Drawing.Font("굴림체", 14.25F, System.Drawing.FontStyle.Bold);
this.statusStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.lbl_BookList,
this.toolStripStatusLabel1});
this.lbl_BookList});
this.statusStrip1.Location = new System.Drawing.Point(0, 634);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Padding = new System.Windows.Forms.Padding(1, 0, 12, 0);
@@ -529,12 +527,6 @@
this.lbl_BookList.Size = new System.Drawing.Size(119, 19);
this.lbl_BookList.Text = "{booklist}";
//
// toolStripStatusLabel1
//
this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
this.toolStripStatusLabel1.Size = new System.Drawing.Size(240, 19);
this.toolStripStatusLabel1.Text = "toolStripStatusLabel1";
//
// btClose
//
this.btClose.Location = new System.Drawing.Point(460, 6);
@@ -558,6 +550,7 @@
// panel3
//
this.panel3.BackColor = System.Drawing.Color.White;
this.panel3.Controls.Add(this.button1);
this.panel3.Controls.Add(this.checkBox3);
this.panel3.Controls.Add(this.tbCustName);
this.panel3.Controls.Add(this.panel1);
@@ -571,6 +564,16 @@
this.panel3.Size = new System.Drawing.Size(555, 634);
this.panel3.TabIndex = 325;
//
// button1
//
this.button1.Location = new System.Drawing.Point(9, 7);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(100, 23);
this.button1.TabIndex = 324;
this.button1.Text = "다시불러오기";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click_1);
//
// marcEditorControl1
//
this.marcEditorControl1.BackColor = System.Drawing.Color.Gray;
@@ -592,6 +595,7 @@
this.marcEditorControl1.Name = "marcEditorControl1";
this.marcEditorControl1.Size = new System.Drawing.Size(1083, 634);
this.marcEditorControl1.TabIndex = 0;
this.marcEditorControl1.Load += new System.EventHandler(this.marcEditorControl1_Load);
//
// Marc2
//
@@ -661,6 +665,6 @@
private System.Windows.Forms.Button btClose;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1;
private System.Windows.Forms.Button button1;
}
}

View File

@@ -1,5 +1,6 @@
//using Microsoft.Office.Interop.Excel;
using AR;
using Microsoft.VisualBasic.ApplicationServices;
using System;
using System.Collections.Generic;
using System.Drawing;
@@ -220,6 +221,7 @@ namespace ExcelTest
CurrentSaveDate = saveDate;
CurrentListIdx = listIdx;
lbl_SaveData.Text = $"[{user}] [{saveDate}]";
lbl_ISBN.Text = $"[{CurrentISBN13}]";
// Update data_book for Create_008 or Empty logic
@@ -419,6 +421,11 @@ namespace ExcelTest
public string User { get; set; }
public string DBMarc { get; set; }
public string MarcIdx { get; set; }
public string etc1 { get; set; } //remark1
public string etc2 { get; set; } //remark2
public string tag056 { get; set; }
public string text008 { get; set; }
public string[] griddata { get; set; }
}
public event EventHandler<BookSavedEventArgs> BookSaved;
@@ -438,11 +445,11 @@ namespace ExcelTest
MessageBox.Show("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!");
return;
}
if (grade == 3)
{
MessageBox.Show("등급을 설정해주세요. (C 이상)");
return;
}
//if (grade == 3)
//{
// MessageBox.Show("등급을 설정해주세요. (C 이상)");
// return;
//}
string table_name = "Marc";
string BaseText = richTextBox1.Text;
string lblisbn = CurrentISBN13; // lbl_ISBN.Text.Replace("[", "").Replace("]", "");
@@ -456,10 +463,12 @@ namespace ExcelTest
return;
}
//ISBN이 변경되었다면 저장하지 못하게 한다
if (BaseText.IndexOf(lblisbn) < 0)
{
MessageBox.Show("ISBN 상태를 확인해주세요.");
return;
var dlg = UTIL.MsgQ("저장된 ISBN이 마크데이터에 없습니다.\nISBN값이 변경되었습니다\n그래도 저장 할까요?");
if (dlg != DialogResult.Yes) return;
//return;
}
string tag056 = Tag056();
string[] grid_data = {
@@ -491,66 +500,63 @@ namespace ExcelTest
}
// true일 경우 INSERT, false일 경우 UPDATE
bool isNewData = true;
bool isNewData = Midx != "" ? false : true;
if (Midx != "")
isNewData = false;
//// If not my data, or no data (implied by Midx check but explicit check helps), force Insert (Copy)
//if (!IsMyData)
//{
// string[] Insert_tbl = {
// "ISBN", "서명", "저자", "출판사",
// "가격", "marc", "비고1", "비고2", "url",
// "grade", "marc_chk", "user", "division", "008tag",
// "date", "compidx" };
// string[] Insert_col = {
// grid_data[0], grid_data[1], grid_data[2], grid_data[3],
// grid_data[4], orimarc, etc1.Text, etc2.Text, grid_data[5],
// grade.ToString(), "1", mUserName, tag056, text008.Text,
// date, mCompidx };
// If not my data, or no data (implied by Midx check but explicit check helps), force Insert (Copy)
if (!IsMyData)
{
string[] Insert_tbl = {
"ISBN", "서명", "저자", "출판사",
"가격", "marc", "비고1", "비고2", "url",
"grade", "marc_chk", "user", "division", "008tag",
"date", "compidx" };
string[] Insert_col = {
grid_data[0], grid_data[1], grid_data[2], grid_data[3],
grid_data[4], orimarc, etc1.Text, etc2.Text, grid_data[5],
grade.ToString(), "1", mUserName, tag056, text008.Text,
date, mCompidx };
// string Incmd = db.DB_INSERT(table_name, Insert_tbl, Insert_col);
// PUB.log.Add("INSERT", string.Format("{0}({1}) : {2}", mUserName, mCompidx, Incmd));
// db.DB_Send_CMD_reVoid(Incmd);
// isNewData = true;
//}
//else
//{
// string[] Edit_tbl = {
// "compidx", "marc", "marc_chk", "marc1", "marc_chk1", "비고1",
// "비고2", "url", "division", "008tag", "date",
// "user", "grade" };
// string[] Edit_col = {
// mCompidx, orimarc, "1", CurrentDBMarc , "0", etc1.Text,
// etc2.Text, grid_data[5], tag056, text008.Text, date,
// mUserName, grade.ToString() };
// string[] Sear_tbl = { "idx", "compidx" };
// string[] Sear_col = { Midx, mCompidx };
// if (grid_data[0] == null || grid_data[0] == "")
// {
// MessageBox.Show("ISBN 데이터가 없습니다.");
// return;
// }
string Incmd = db.DB_INSERT(table_name, Insert_tbl, Insert_col);
PUB.log.Add("INSERT", string.Format("{0}({1}) : {2}", mUserName, mCompidx, Incmd));
db.DB_Send_CMD_reVoid(Incmd);
isNewData = true;
}
else
{
string[] Edit_tbl = {
"compidx", "marc", "marc_chk", "marc1", "marc_chk1", "비고1",
"비고2", "url", "division", "008tag", "date",
"user", "grade" };
string[] Edit_col = {
mCompidx, orimarc, "1", CurrentDBMarc , "0", etc1.Text,
etc2.Text, grid_data[5], tag056, text008.Text, date,
mUserName, grade.ToString() };
string[] Sear_tbl = { "idx", "compidx" };
string[] Sear_col = { Midx, mCompidx };
if (grid_data[0] == null || grid_data[0] == "")
{
MessageBox.Show("ISBN 데이터가 없습니다.");
return;
}
// string U_cmd = db.More_Update(table_name, Edit_tbl, Edit_col, Sear_tbl, Sear_col);
// PUB.log.Add("Update", string.Format("{0}({1}) : {2}", mUserName, mCompidx, U_cmd.Replace("\r", " ").Replace("\n", " ")));
// db.DB_Send_CMD_reVoid(U_cmd);
// isNewData = false;
//}
string U_cmd = db.More_Update(table_name, Edit_tbl, Edit_col, Sear_tbl, Sear_col);
PUB.log.Add("Update", string.Format("{0}({1}) : {2}", mUserName, mCompidx, U_cmd.Replace("\r", " ").Replace("\n", " ")));
db.DB_Send_CMD_reVoid(U_cmd);
isNewData = false;
}
//if (isNewData)
//{
// string MidxQuery = string.Format("SELECT `idx` FROM Marc WHERE isbn = {0} AND `compidx` = {1};", grid_data[0], mCompidx);
// PUB.log.Add("MarcInsert", string.Format("{0}({1}) : {2}", mUserName, mCompidx, MidxQuery));
// Midx = db.DB_Send_CMD_Search(MidxQuery).Replace("|", "");
// CurrentMarcIdx = Midx; // Update local
//}
if (isNewData)
{
string MidxQuery = string.Format("SELECT `idx` FROM Marc WHERE isbn = {0} AND `compidx` = {1};", grid_data[0], mCompidx);
PUB.log.Add("MarcInsert", string.Format("{0}({1}) : {2}", mUserName, mCompidx, MidxQuery));
Midx = db.DB_Send_CMD_Search(MidxQuery).Replace("|", "");
CurrentMarcIdx = Midx; // Update local
}
string UpdateListIndex = string.Format("UPDATE `Obj_List_Book` SET `m_idx` = {0} WHERE `idx` = {1} AND 'compidx' ={2};",
Midx, CurrentListIdx, mCompidx);
PUB.log.Add("MarcUpdate", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpdateListIndex));
db.DB_Send_CMD_reVoid(UpdateListIndex);
//string UpdateListIndex = string.Format("UPDATE `Obj_List_Book` SET `m_idx` = {0} WHERE `idx` = {1} AND 'compidx' ={2};",
// Midx, CurrentListIdx, mCompidx);
//PUB.log.Add("MarcUpdate", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpdateListIndex));
//db.DB_Send_CMD_reVoid(UpdateListIndex);
// Raise Event to Update List_Book in Parent
BookSaved?.Invoke(this, new BookSavedEventArgs
@@ -560,10 +566,15 @@ namespace ExcelTest
SaveDate = date,
User = mUserName,
DBMarc = orimarc,
MarcIdx = Midx
MarcIdx = Midx,
etc1 = etc1.Text,
etc2 = etc2.Text,
tag056 = tag056,
text008 = text008.Text,
griddata = grid_data
});
MessageBox.Show("저장되었습니다!");
}
#region Save_Click_Sub
@@ -2025,7 +2036,8 @@ namespace ExcelTest
str = str.Trim();
if (TagNum == "300a")
{
gu = new char[] { '.', ',', '=', ':', ';', '/', '+', ' ' };
gu = new char[] { ',', '=', ':', ';', '/', '+', ' ' };
//gu = new char[] { '.', ',', '=', ':', ';', '/', '+', ' ' };
for (int i = 0; i < gu.Length; i++)
{
str = str.TrimEnd(gu[i]);

View File

@@ -301,6 +301,7 @@ namespace UniMarc
this.Controls.Add(this.panel2);
this.Name = "Marc_FillBlank";
this.Text = "칸채우기";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.Marc_FillBlank_Load);
this.panel6.ResumeLayout(false);
this.panel6.PerformLayout();

View File

@@ -28,6 +28,7 @@ namespace UniMarc.마크
string.Format("http://preview.kyobobook.co.kr/preview.jsp?siteGb=INK&ejkGb=KOR&barcode={0}&loginYn=N&orderClick=JAW",
ISBN);
webBrowser1.ScriptErrorsSuppressed = true;
webBrowser1.Navigate(PreViewURL);
}