복본검사시 오류발생한 항목의 수량을 -1 로 설정하도록 함 (해당 자료가 오류가 되도록)
마크생성화면에서 업체명 검색시 SQL오류 수정
This commit is contained in:
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
|||||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||||
// 기본값으로 할 수 있습니다.
|
// 기본값으로 할 수 있습니다.
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("2025.11.10.2200")]
|
[assembly: AssemblyVersion("2025.12.25.2200")]
|
||||||
[assembly: AssemblyFileVersion("2025.11.10.2200")]
|
[assembly: AssemblyFileVersion("2025.12.25.2200")]
|
||||||
|
|||||||
@@ -672,15 +672,15 @@ namespace WindowsFormsApp1.Mac
|
|||||||
if (cntValue.Equals("-1") == false)
|
if (cntValue.Equals("-1") == false)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (radTargetEmpty.Checked) //빈데이터만 처리
|
else if (radTargetEmpty.Checked) //빈데이터만 처리 (검사된 수량이 0이라면 동작한다)
|
||||||
{
|
{
|
||||||
if (int.TryParse(cntValue, out int cntvalue) && cntvalue > 0)
|
if (int.TryParse(cntValue, out int cntvalue) && cntvalue > 0)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
else if (radTargetErrEmpty.Checked) //오류+빈데이터처리
|
else if (radTargetErrEmpty.Checked) //오류+빈데이터처리
|
||||||
{
|
{
|
||||||
if (cntValue.Equals("-1") == false && int.TryParse(cntValue, out int cntvalue) && cntvalue > 0)
|
if (cntValue.Equals("-1") == false) continue;
|
||||||
continue;
|
if (int.TryParse(cntValue, out int cntvalue) && cntvalue > 0) continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cnt_totalcnt += 1;
|
cnt_totalcnt += 1;
|
||||||
@@ -711,8 +711,9 @@ namespace WindowsFormsApp1.Mac
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cnt_er += 1;
|
cnt_er += 1;
|
||||||
drow.Cells["dvc_remark"].Value = $"Error|{rlt.ErrorMessage}";
|
drow.Cells["dvc_remark"].Value = $"Error|{rlt.ErrorMessage}";
|
||||||
|
drow.Cells["Count"].Value = "-1"; //오류발생시에는 -1이 입력되도록한다
|
||||||
|
|
||||||
// 오류시에도 ResultHtml이 있으면 저장 (디버깅용)
|
// 오류시에도 ResultHtml이 있으면 저장 (디버깅용)
|
||||||
if (dv1.Columns.Contains("dvc_resulthtml"))
|
if (dv1.Columns.Contains("dvc_resulthtml"))
|
||||||
|
|||||||
@@ -280,7 +280,7 @@ namespace UniMarc.마크
|
|||||||
var where = $"campanyidx={compidx}";
|
var where = $"campanyidx={compidx}";
|
||||||
if (inputsearch.isEmpty() == false)
|
if (inputsearch.isEmpty() == false)
|
||||||
{
|
{
|
||||||
where = $" and c_sangho like '%{inputsearch.Replace("'", "''")}%'";
|
where += $" and c_sangho like '%{inputsearch.Replace("'", "''")}%'";
|
||||||
}
|
}
|
||||||
var dt = DB2.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where);
|
var dt = DB2.GetDT("Client", columns: "idx,c_sangho", orders: "c_sangho", wheres: where);
|
||||||
using (var f = new fSelectDT(dt))
|
using (var f = new fSelectDT(dt))
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ namespace ExcelTest
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="date">목록일자</param>
|
/// <param name="date">목록일자</param>
|
||||||
/// <param name="value">목록명</param>
|
/// <param name="value">목록명</param>
|
||||||
public void input_list(string l_idx, string value, string C_idx,string custidx,string custname)
|
public void input_list(string l_idx, string value, string C_idx, string custidx, string custname)
|
||||||
{
|
{
|
||||||
db.DBcon();
|
db.DBcon();
|
||||||
this.l_idx = l_idx;
|
this.l_idx = l_idx;
|
||||||
@@ -232,7 +232,7 @@ namespace ExcelTest
|
|||||||
|
|
||||||
|
|
||||||
mLoadCompleted = false;
|
mLoadCompleted = false;
|
||||||
for (int a = 0; a < db_data.Length-1; a += 11)
|
for (int a = 0; a < db_data.Length - 1; a += 11)
|
||||||
{
|
{
|
||||||
|
|
||||||
grid[0] = db_data[a]; // 0: idx
|
grid[0] = db_data[a]; // 0: idx
|
||||||
@@ -301,18 +301,19 @@ namespace ExcelTest
|
|||||||
string[] Chk_Arr = Chk_Res.Split('|');
|
string[] Chk_Arr = Chk_Res.Split('|');
|
||||||
|
|
||||||
bool isMyData = true;
|
bool isMyData = true;
|
||||||
if (Chk_Arr.Length < 2) {
|
if (Chk_Arr.Length < 2)
|
||||||
|
{
|
||||||
List_Book.Rows[a].Cells["grade"].Value = "3";
|
List_Book.Rows[a].Cells["grade"].Value = "3";
|
||||||
List_Book.Rows[a].DefaultCellStyle.ForeColor = Color.Red;
|
List_Book.Rows[a].DefaultCellStyle.ForeColor = Color.Red;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Chk_Arr[1] != mCompidx)
|
if (Chk_Arr[1] != mCompidx)
|
||||||
isMyData = false;
|
isMyData = false;
|
||||||
|
|
||||||
string[] MarcData = { Chk_Arr[2], Chk_Arr[4], Chk_Arr[6] };
|
string[] MarcData = { Chk_Arr[2], Chk_Arr[4], Chk_Arr[6] };
|
||||||
string[] CheckData = { Chk_Arr[3], Chk_Arr[5], Chk_Arr[7] };
|
string[] CheckData = { Chk_Arr[3], Chk_Arr[5], Chk_Arr[7] };
|
||||||
|
|
||||||
List_Book.Rows[a].DefaultCellStyle.ForeColor = SetGradeColor(Chk_Arr[8], isMyData);
|
List_Book.Rows[a].DefaultCellStyle.ForeColor = SetGradeColor(Chk_Arr[8], isMyData);
|
||||||
List_Book.Rows[a].Cells["marc_idx"].Value = Chk_Arr[0];
|
List_Book.Rows[a].Cells["marc_idx"].Value = Chk_Arr[0];
|
||||||
List_Book.Rows[a].Cells["db_marc"].Value = MarcData[0];//NewestMarc(MarcData, CheckData);
|
List_Book.Rows[a].Cells["db_marc"].Value = MarcData[0];//NewestMarc(MarcData, CheckData);
|
||||||
@@ -320,11 +321,12 @@ namespace ExcelTest
|
|||||||
text008.Text = Chk_Arr[9];
|
text008.Text = Chk_Arr[9];
|
||||||
List_Book.Rows[a].Cells["user"].Value = Chk_Arr[10];
|
List_Book.Rows[a].Cells["user"].Value = Chk_Arr[10];
|
||||||
List_Book.Rows[a].Cells["SaveDate"].Value = Chk_Arr[11];
|
List_Book.Rows[a].Cells["SaveDate"].Value = Chk_Arr[11];
|
||||||
|
|
||||||
if (isMyData)
|
if (isMyData)
|
||||||
SaveDateCheck(Chk_Arr[11], a);
|
SaveDateCheck(Chk_Arr[11], a);
|
||||||
|
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
string FindCompCmd = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", Chk_Arr[1]);
|
string FindCompCmd = string.Format("SELECT `comp_name` FROM `Comp` WHERE `idx` = {0}", Chk_Arr[1]);
|
||||||
List_Book.Rows[a].Cells["user"].Value = db.DB_Send_CMD_Search(FindCompCmd).Replace("|", "");
|
List_Book.Rows[a].Cells["user"].Value = db.DB_Send_CMD_Search(FindCompCmd).Replace("|", "");
|
||||||
List_Book.Rows[a].DefaultCellStyle.BackColor = Color.LightGray;
|
List_Book.Rows[a].DefaultCellStyle.BackColor = Color.LightGray;
|
||||||
@@ -332,7 +334,7 @@ namespace ExcelTest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private string NewestMarc(string[] marc, string[] marc_chk )
|
private string NewestMarc(string[] marc, string[] marc_chk)
|
||||||
{
|
{
|
||||||
string result = "";
|
string result = "";
|
||||||
int count = 0;
|
int count = 0;
|
||||||
@@ -355,13 +357,13 @@ namespace ExcelTest
|
|||||||
{
|
{
|
||||||
case "0": // A
|
case "0": // A
|
||||||
return Color.Blue;
|
return Color.Blue;
|
||||||
|
|
||||||
case "1": // B
|
case "1": // B
|
||||||
return Color.Black;
|
return Color.Black;
|
||||||
|
|
||||||
case "2": // C
|
case "2": // C
|
||||||
return Color.Gray;
|
return Color.Gray;
|
||||||
|
|
||||||
case "3": // D
|
case "3": // D
|
||||||
return Color.Red;
|
return Color.Red;
|
||||||
|
|
||||||
@@ -382,7 +384,7 @@ namespace ExcelTest
|
|||||||
DateTime TargetDate = DateTime.Today.AddDays(-14);
|
DateTime TargetDate = DateTime.Today.AddDays(-14);
|
||||||
|
|
||||||
int result = DateTime.Compare(SaveDate, TargetDate);
|
int result = DateTime.Compare(SaveDate, TargetDate);
|
||||||
|
|
||||||
if (result >= 0) // SaveDate가 같거나 큼
|
if (result >= 0) // SaveDate가 같거나 큼
|
||||||
List_Book.Rows[row].DefaultCellStyle.BackColor = Color.Yellow;
|
List_Book.Rows[row].DefaultCellStyle.BackColor = Color.Yellow;
|
||||||
|
|
||||||
@@ -396,7 +398,8 @@ namespace ExcelTest
|
|||||||
call = ((RichTextBox)sender).Name;
|
call = ((RichTextBox)sender).Name;
|
||||||
richTextBox1.LanguageOption = 0;
|
richTextBox1.LanguageOption = 0;
|
||||||
|
|
||||||
if (e.Control) {
|
if (e.Control)
|
||||||
|
{
|
||||||
switch (e.KeyValue)
|
switch (e.KeyValue)
|
||||||
{
|
{
|
||||||
case 70: // f
|
case 70: // f
|
||||||
@@ -497,7 +500,8 @@ namespace ExcelTest
|
|||||||
}
|
}
|
||||||
private void Btn_Save_Click(object sender, EventArgs e)
|
private void Btn_Save_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (SaveRowIdx < 0) {
|
if (SaveRowIdx < 0)
|
||||||
|
{
|
||||||
MessageBox.Show("마크가 선택되지않았습니다.");
|
MessageBox.Show("마크가 선택되지않았습니다.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -508,7 +512,8 @@ namespace ExcelTest
|
|||||||
MessageBox.Show("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!");
|
MessageBox.Show("[칸채우기]가 아닌 [마크 편집] 탭에서 저장해주세요!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (grade == 3) {
|
if (grade == 3)
|
||||||
|
{
|
||||||
MessageBox.Show("등급을 설정해주세요. (C 이상)");
|
MessageBox.Show("등급을 설정해주세요. (C 이상)");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -519,12 +524,14 @@ namespace ExcelTest
|
|||||||
if (!BaseText.EndsWith("\n"))
|
if (!BaseText.EndsWith("\n"))
|
||||||
BaseText += "\n";
|
BaseText += "\n";
|
||||||
|
|
||||||
if (!isPass(BaseText)) {
|
if (!isPass(BaseText))
|
||||||
|
{
|
||||||
MessageBox.Show("입력된 마크의 상태를 확인해주세요.");
|
MessageBox.Show("입력된 마크의 상태를 확인해주세요.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (BaseText.IndexOf(lblisbn) < 0) {
|
if (BaseText.IndexOf(lblisbn) < 0)
|
||||||
|
{
|
||||||
MessageBox.Show("ISBN 상태를 확인해주세요.");
|
MessageBox.Show("ISBN 상태를 확인해주세요.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -563,13 +570,13 @@ namespace ExcelTest
|
|||||||
// etc2.Text += string.Format("{0}\t{1}\n", date, mUserName);
|
// etc2.Text += string.Format("{0}\t{1}\n", date, mUserName);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
//else
|
//else
|
||||||
//{
|
//{
|
||||||
// etc2.Text += string.Format("{0}\t{1}\n", date, mUserName);
|
// etc2.Text += string.Format("{0}\t{1}\n", date, mUserName);
|
||||||
//}
|
//}
|
||||||
|
|
||||||
// true일 경우 INSERT, false일 경우 UPDATE
|
// true일 경우 INSERT, false일 경우 UPDATE
|
||||||
bool isNewData = true;
|
bool isNewData = true;
|
||||||
|
|
||||||
if (Midx != "")
|
if (Midx != "")
|
||||||
isNewData = false;
|
isNewData = false;
|
||||||
@@ -589,7 +596,7 @@ namespace ExcelTest
|
|||||||
date, mCompidx };
|
date, mCompidx };
|
||||||
|
|
||||||
string Incmd = db.DB_INSERT(table_name, Insert_tbl, Insert_col);
|
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));
|
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);
|
db.DB_Send_CMD_reVoid(Incmd);
|
||||||
isNewData = true;
|
isNewData = true;
|
||||||
}
|
}
|
||||||
@@ -641,7 +648,7 @@ namespace ExcelTest
|
|||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
string U_cmd = db.More_Update(table_name, Edit_tbl, Edit_col, Sear_tbl, Sear_col);
|
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", " ")));
|
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);
|
db.DB_Send_CMD_reVoid(U_cmd);
|
||||||
isNewData = false;
|
isNewData = false;
|
||||||
}
|
}
|
||||||
@@ -653,16 +660,17 @@ namespace ExcelTest
|
|||||||
|
|
||||||
List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor = SetGradeColor(grade.ToString());
|
List_Book.Rows[SaveRowIdx].DefaultCellStyle.ForeColor = SetGradeColor(grade.ToString());
|
||||||
|
|
||||||
if (isNewData) {
|
if (isNewData)
|
||||||
|
{
|
||||||
string MidxQuery = string.Format("SELECT `idx` FROM Marc WHERE isbn = {0} AND `compidx` = {1};", grid_data[0], mCompidx);
|
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));
|
PUB.log.Add("MarcInsert", string.Format("{0}({1}) : {2}", mUserName, mCompidx, MidxQuery));
|
||||||
Midx = db.DB_Send_CMD_Search(MidxQuery).Replace("|", "");
|
Midx = db.DB_Send_CMD_Search(MidxQuery).Replace("|", "");
|
||||||
List_Book.Rows[SaveRowIdx].Cells["marc_idx"].Value = Midx;
|
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};",
|
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);
|
Midx, List_Book.Rows[SaveRowIdx].Cells["list_idx"].Value.ToString(), mCompidx);
|
||||||
PUB.log.Add("MarcUpdate", string.Format( "{0}({1}) : {2}", mUserName, mCompidx, UpdateListIndex));
|
PUB.log.Add("MarcUpdate", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpdateListIndex));
|
||||||
db.DB_Send_CMD_reVoid(UpdateListIndex);
|
db.DB_Send_CMD_reVoid(UpdateListIndex);
|
||||||
MessageBox.Show("저장되었습니다!");
|
MessageBox.Show("저장되었습니다!");
|
||||||
}
|
}
|
||||||
@@ -845,7 +853,8 @@ namespace ExcelTest
|
|||||||
|
|
||||||
for (int a = 0; a < chk_ary.Length; a++)
|
for (int a = 0; a < chk_ary.Length; a++)
|
||||||
{
|
{
|
||||||
if (chk_ary[a] == "1") {
|
if (chk_ary[a] == "1")
|
||||||
|
{
|
||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -904,7 +913,7 @@ namespace ExcelTest
|
|||||||
Create_008();
|
Create_008();
|
||||||
st.Color_change("▼", richTextBox1);
|
st.Color_change("▼", richTextBox1);
|
||||||
st.Color_change("▲", richTextBox1);
|
st.Color_change("▲", richTextBox1);
|
||||||
|
|
||||||
int grade = 2;
|
int grade = 2;
|
||||||
if (List_Book.Rows[row_idx].Cells["grade"].Value != null || List_Book.Rows[row_idx].Cells["grade"].Value.ToString() != "")
|
if (List_Book.Rows[row_idx].Cells["grade"].Value != null || List_Book.Rows[row_idx].Cells["grade"].Value.ToString() != "")
|
||||||
{
|
{
|
||||||
@@ -985,7 +994,8 @@ namespace ExcelTest
|
|||||||
string res = db.DB_Send_CMD_Search(cmd);
|
string res = db.DB_Send_CMD_Search(cmd);
|
||||||
|
|
||||||
string[] ary = res.Split('|');
|
string[] ary = res.Split('|');
|
||||||
if (res.Length < 1) {
|
if (res.Length < 1)
|
||||||
|
{
|
||||||
etc1.Text = res;
|
etc1.Text = res;
|
||||||
etc2.Text = "";
|
etc2.Text = "";
|
||||||
return;
|
return;
|
||||||
@@ -1037,7 +1047,7 @@ namespace ExcelTest
|
|||||||
string[] data = Marc_data.Substring(24).Split('▲'); // 리더부를 제외한 디렉터리, 가변길이필드 저장
|
string[] data = Marc_data.Substring(24).Split('▲'); // 리더부를 제외한 디렉터리, 가변길이필드 저장
|
||||||
|
|
||||||
// List에 필요한 데이터 집어넣는 작업.
|
// List에 필요한 데이터 집어넣는 작업.
|
||||||
for (int a = 1; a < data.Length - 1&& data[0].Length> startidx ; a++)
|
for (int a = 1; a < data.Length - 1 && data[0].Length > startidx; a++)
|
||||||
{
|
{
|
||||||
TagNum.Add(data[0].Substring(startidx, 3));
|
TagNum.Add(data[0].Substring(startidx, 3));
|
||||||
startidx += 12;
|
startidx += 12;
|
||||||
@@ -1208,7 +1218,7 @@ namespace ExcelTest
|
|||||||
|
|
||||||
private void btn_Reflesh008_Click(object sender, EventArgs e)
|
private void btn_Reflesh008_Click(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
string data =text008.Text;
|
string data = text008.Text;
|
||||||
//data =data.PadRight(40,' ');
|
//data =data.PadRight(40,' ');
|
||||||
string oriMarc = st.made_Ori_marc(richTextBox1).Replace("\\", "₩");
|
string oriMarc = st.made_Ori_marc(richTextBox1).Replace("\\", "₩");
|
||||||
|
|
||||||
@@ -1265,11 +1275,11 @@ namespace ExcelTest
|
|||||||
Publication(checkBox2.Checked, 30);// 기념논문집 (30) c
|
Publication(checkBox2.Checked, 30);// 기념논문집 (30) c
|
||||||
Publication(checkBox4.Checked, 31);// 색인 (31)
|
Publication(checkBox4.Checked, 31);// 색인 (31)
|
||||||
|
|
||||||
textArray = text008.Text.ToCharArray() ;
|
textArray = text008.Text.ToCharArray();
|
||||||
|
|
||||||
textArray[26] = col008res.Text[0]; //대학코드
|
textArray[26] = col008res.Text[0]; //대학코드
|
||||||
textArray[27] = col008res.Text[1];
|
textArray[27] = col008res.Text[1];
|
||||||
|
|
||||||
textArray[38] = gov008res.Text[0];// 정부코드
|
textArray[38] = gov008res.Text[0];// 정부코드
|
||||||
textArray[39] = gov008res.Text[1];
|
textArray[39] = gov008res.Text[1];
|
||||||
|
|
||||||
@@ -1291,7 +1301,8 @@ namespace ExcelTest
|
|||||||
|
|
||||||
string pubDate = Regex.Replace(ContentTag, @"[^0-9]", "");
|
string pubDate = Regex.Replace(ContentTag, @"[^0-9]", "");
|
||||||
|
|
||||||
if (pubDate.Length < 3) {
|
if (pubDate.Length < 3)
|
||||||
|
{
|
||||||
MessageBox.Show("260c가 인식되지않습니다.");
|
MessageBox.Show("260c가 인식되지않습니다.");
|
||||||
return "false";
|
return "false";
|
||||||
}
|
}
|
||||||
@@ -1319,7 +1330,8 @@ namespace ExcelTest
|
|||||||
"SELECT `Code` FROM `Tag008_Country` WHERE `Area` <= \"{0}\" ORDER BY `Area` DESC LIMIT 1;", ContentTag);
|
"SELECT `Code` FROM `Tag008_Country` WHERE `Area` <= \"{0}\" ORDER BY `Area` DESC LIMIT 1;", ContentTag);
|
||||||
string res = db.DB_Send_CMD_Search(cmd).Replace("|", "");
|
string res = db.DB_Send_CMD_Search(cmd).Replace("|", "");
|
||||||
|
|
||||||
if (res == "") {
|
if (res == "")
|
||||||
|
{
|
||||||
MessageBox.Show("260a가 인식되지않습니다.");
|
MessageBox.Show("260a가 인식되지않습니다.");
|
||||||
return "false";
|
return "false";
|
||||||
}
|
}
|
||||||
@@ -1474,21 +1486,27 @@ namespace ExcelTest
|
|||||||
bool isSort = rb_Sort.Checked;
|
bool isSort = rb_Sort.Checked;
|
||||||
int combo = comboBox8.SelectedIndex; // 0: 등급 / 1: 복본
|
int combo = comboBox8.SelectedIndex; // 0: 등급 / 1: 복본
|
||||||
|
|
||||||
if (isSort) {
|
if (isSort)
|
||||||
if (combo == 0) {
|
{
|
||||||
|
if (combo == 0)
|
||||||
|
{
|
||||||
List_Book.Sort(List_Book.Columns["grade"], System.ComponentModel.ListSortDirection.Ascending);
|
List_Book.Sort(List_Book.Columns["grade"], System.ComponentModel.ListSortDirection.Ascending);
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
List_Book.Sort(List_Book.Columns["ISBN13"], System.ComponentModel.ListSortDirection.Ascending);
|
List_Book.Sort(List_Book.Columns["ISBN13"], System.ComponentModel.ListSortDirection.Ascending);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else
|
||||||
|
{
|
||||||
int comboIdx;
|
int comboIdx;
|
||||||
if (combo == 0) {
|
if (combo == 0)
|
||||||
|
{
|
||||||
comboIdx = comboBox9.SelectedIndex;
|
comboIdx = comboBox9.SelectedIndex;
|
||||||
Search_Filter("grade", comboIdx);
|
Search_Filter("grade", comboIdx);
|
||||||
}
|
}
|
||||||
else { // 수정필요
|
else
|
||||||
|
{ // 수정필요
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1508,7 +1526,8 @@ namespace ExcelTest
|
|||||||
{
|
{
|
||||||
int count = List_Book.Rows.Count;
|
int count = List_Book.Rows.Count;
|
||||||
DataGridViewBand band;
|
DataGridViewBand band;
|
||||||
if (comboIdx == 0) {
|
if (comboIdx == 0)
|
||||||
|
{
|
||||||
for (int a = 0; a < count; a++)
|
for (int a = 0; a < count; a++)
|
||||||
{
|
{
|
||||||
band = List_Book.Rows[a];
|
band = List_Book.Rows[a];
|
||||||
@@ -1520,7 +1539,8 @@ namespace ExcelTest
|
|||||||
comboIdx--;
|
comboIdx--;
|
||||||
for (int a = 0; a < count; a++)
|
for (int a = 0; a < count; a++)
|
||||||
{
|
{
|
||||||
if (List_Book.Rows[a].Cells[target].Value.ToString() != comboIdx.ToString()) {
|
if (List_Book.Rows[a].Cells[target].Value.ToString() != comboIdx.ToString())
|
||||||
|
{
|
||||||
band = List_Book.Rows[a];
|
band = List_Book.Rows[a];
|
||||||
band.Visible = false;
|
band.Visible = false;
|
||||||
}
|
}
|
||||||
@@ -1554,10 +1574,10 @@ namespace ExcelTest
|
|||||||
text008.Text = GridData[5];
|
text008.Text = GridData[5];
|
||||||
List_Book.Rows[row].Cells["db_marc"].Value = GridData[6];
|
List_Book.Rows[row].Cells["db_marc"].Value = GridData[6];
|
||||||
mOldMarc = GridData[6];
|
mOldMarc = GridData[6];
|
||||||
List_Book.Rows[row].DefaultCellStyle.ForeColor= SetGradeColor(GridData[4]);
|
List_Book.Rows[row].DefaultCellStyle.ForeColor = SetGradeColor(GridData[4]);
|
||||||
List_Book.Rows[row].DefaultCellStyle.BackColor = Color.Yellow;
|
List_Book.Rows[row].DefaultCellStyle.BackColor = Color.Yellow;
|
||||||
|
|
||||||
|
|
||||||
bool checkMarc = click_Marc(row);
|
bool checkMarc = click_Marc(row);
|
||||||
if (checkMarc)
|
if (checkMarc)
|
||||||
{
|
{
|
||||||
@@ -1573,7 +1593,8 @@ namespace ExcelTest
|
|||||||
comboBox9.Items.Clear();
|
comboBox9.Items.Clear();
|
||||||
|
|
||||||
ComboBox cb = sender as ComboBox;
|
ComboBox cb = sender as ComboBox;
|
||||||
if (cb.SelectedIndex == 0) {
|
if (cb.SelectedIndex == 0)
|
||||||
|
{
|
||||||
comboBox9.Enabled = true;
|
comboBox9.Enabled = true;
|
||||||
string[] grade = { "전체", "A", "B", "C", "D" };
|
string[] grade = { "전체", "A", "B", "C", "D" };
|
||||||
comboBox9.Items.AddRange(grade);
|
comboBox9.Items.AddRange(grade);
|
||||||
@@ -1674,7 +1695,7 @@ namespace ExcelTest
|
|||||||
//tb.SelectionStart = tb.Text.Length;
|
//tb.SelectionStart = tb.Text.Length;
|
||||||
//tb.Select(tb.Text.Length, 0);
|
//tb.Select(tb.Text.Length, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#region DataGridView 드래그 행이동 이벤트 함수
|
#region DataGridView 드래그 행이동 이벤트 함수
|
||||||
|
|
||||||
@@ -1869,10 +1890,11 @@ namespace ExcelTest
|
|||||||
|
|
||||||
for (int count = 0; count < GridView020.Rows.Count; count++)
|
for (int count = 0; count < GridView020.Rows.Count; count++)
|
||||||
{
|
{
|
||||||
if (GridView020.Rows[count].Cells["CheckSet"].Value == null &&
|
if (GridView020.Rows[count].Cells["CheckSet"].Value == null &&
|
||||||
GridView020.Rows[count].Cells["Text020a"].Value == null &&
|
GridView020.Rows[count].Cells["Text020a"].Value == null &&
|
||||||
GridView020.Rows[count].Cells["Text020g"].Value == null &&
|
GridView020.Rows[count].Cells["Text020g"].Value == null &&
|
||||||
GridView020.Rows[count].Cells["Text020c"].Value == null) {
|
GridView020.Rows[count].Cells["Text020c"].Value == null)
|
||||||
|
{
|
||||||
|
|
||||||
GridView020.Rows[count].Cells["CheckSet"].Value = Grid[0];
|
GridView020.Rows[count].Cells["CheckSet"].Value = Grid[0];
|
||||||
GridView020.Rows[count].Cells["Text020a"].Value = Grid[1];
|
GridView020.Rows[count].Cells["Text020a"].Value = Grid[1];
|
||||||
@@ -1946,7 +1968,7 @@ namespace ExcelTest
|
|||||||
GridView440.Rows[count].Cells["text440vTxt"].Value == null &&
|
GridView440.Rows[count].Cells["text440vTxt"].Value == null &&
|
||||||
GridView440.Rows[count].Cells["text440x"].Value == null)
|
GridView440.Rows[count].Cells["text440x"].Value == null)
|
||||||
{
|
{
|
||||||
|
|
||||||
GridView440.Rows[count].Cells["text440a"].Value = Grid[0];
|
GridView440.Rows[count].Cells["text440a"].Value = Grid[0];
|
||||||
GridView440.Rows[count].Cells["text440n"].Value = Grid[1];
|
GridView440.Rows[count].Cells["text440n"].Value = Grid[1];
|
||||||
GridView440.Rows[count].Cells["text440p"].Value = Grid[2];
|
GridView440.Rows[count].Cells["text440p"].Value = Grid[2];
|
||||||
@@ -2038,7 +2060,8 @@ namespace ExcelTest
|
|||||||
Before = After;
|
Before = After;
|
||||||
for (int a = 0; a < Symbol.Length; a++)
|
for (int a = 0; a < Symbol.Length; a++)
|
||||||
{
|
{
|
||||||
if (Tag[0] == Symbol[a]) {
|
if (Tag[0] == Symbol[a])
|
||||||
|
{
|
||||||
After = a;
|
After = a;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2174,7 +2197,7 @@ namespace ExcelTest
|
|||||||
text245d, text245e
|
text245d, text245e
|
||||||
};
|
};
|
||||||
|
|
||||||
string a = GetMiddelString(SplitTag, "▼a", "▼","245a");
|
string a = GetMiddelString(SplitTag, "▼a", "▼", "245a");
|
||||||
string b = GetMiddelString(SplitTag, "▼b", "▼");
|
string b = GetMiddelString(SplitTag, "▼b", "▼");
|
||||||
string x = GetMiddelString(SplitTag, "▼x", "▼");
|
string x = GetMiddelString(SplitTag, "▼x", "▼");
|
||||||
string n = GetMiddelString(SplitTag, "▼n", "▼");
|
string n = GetMiddelString(SplitTag, "▼n", "▼");
|
||||||
@@ -2274,20 +2297,30 @@ namespace ExcelTest
|
|||||||
/// <param name="Marc">텍스트박스에 들어갈 값 배열</param>
|
/// <param name="Marc">텍스트박스에 들어갈 값 배열</param>
|
||||||
private void InputMoreTextBox(TextBox[] box, string[] Marc)
|
private void InputMoreTextBox(TextBox[] box, string[] Marc)
|
||||||
{
|
{
|
||||||
int count = 0;
|
//int count = 0;
|
||||||
|
|
||||||
foreach (string marc in Marc)
|
for (int i = 0; i < box.Length; i++)
|
||||||
{
|
{
|
||||||
if (box[count].Text == "")
|
if (i >= Marc.Length) continue;
|
||||||
box[count].InvokeText(marc);
|
var marc = Marc[i];
|
||||||
//box[count].Text = marc;
|
if (box[i].Text == "")
|
||||||
|
box[i].InvokeText(marc);
|
||||||
else
|
else
|
||||||
box[count].InvokeADDText("▽" + marc);
|
box[i].InvokeADDText("▽" + marc);
|
||||||
//box[count].Text += "▽" + marc;
|
|
||||||
|
|
||||||
count++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//foreach (string marc in Marc)
|
||||||
|
//{
|
||||||
|
// if (box[count].Text == "")
|
||||||
|
// box[count].InvokeText(marc);
|
||||||
|
// //box[count].Text = marc;
|
||||||
|
|
||||||
|
// else
|
||||||
|
// box[count].InvokeADDText("▽" + marc);
|
||||||
|
// //box[count].Text += "▽" + marc;
|
||||||
|
|
||||||
|
// count++;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -2356,33 +2389,33 @@ namespace ExcelTest
|
|||||||
string TrimEndGubun(string str, string TagNum)
|
string TrimEndGubun(string str, string TagNum)
|
||||||
{
|
{
|
||||||
char[] gu = { '.', ',', ':', ';', '/', ' ' };
|
char[] gu = { '.', ',', ':', ';', '/', ' ' };
|
||||||
if (TagNum == "300"||TagNum == "300a")
|
if (TagNum == "300" || TagNum == "300a")
|
||||||
{
|
{
|
||||||
str = str.Trim();
|
str = str.Trim();
|
||||||
if (TagNum == "300a")
|
if (TagNum == "300a")
|
||||||
{
|
{
|
||||||
gu = new char[] { '.', ',', '=', ':', ';', '/','+', ' ' };
|
gu = new char[] { '.', ',', '=', ':', ';', '/', '+', ' ' };
|
||||||
for (int i = 0; i < gu.Length; i++)
|
for (int i = 0; i < gu.Length; i++)
|
||||||
{
|
{
|
||||||
str = str.TrimEnd(gu[i]);
|
str = str.TrimEnd(gu[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (str.Contains("ill."))
|
if (str.Contains("ill."))
|
||||||
return str;
|
return str;
|
||||||
if (str.Contains("p."))
|
if (str.Contains("p."))
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (TagNum == "710" || TagNum == "910" )
|
if (TagNum == "710" || TagNum == "910")
|
||||||
return str;
|
return str;
|
||||||
|
|
||||||
|
|
||||||
if (TagNum == "245") gu = new char[] { '.',':', ';', '/', ' ' };
|
if (TagNum == "245") gu = new char[] { '.', ':', ';', '/', ' ' };
|
||||||
if (TagNum == "245a") gu = new char[] { '.', ',', '=', ':', ';', '/', ' ' };
|
if (TagNum == "245a") gu = new char[] { '.', ',', '=', ':', ';', '/', ' ' };
|
||||||
for (int i = 0; i < gu.Length; i++)
|
for (int i = 0; i < gu.Length; i++)
|
||||||
{
|
{
|
||||||
str=str.TrimEnd(gu[i]);
|
str = str.TrimEnd(gu[i]);
|
||||||
}
|
}
|
||||||
//foreach (char gubun in gu)
|
//foreach (char gubun in gu)
|
||||||
//{
|
//{
|
||||||
@@ -2416,7 +2449,7 @@ namespace ExcelTest
|
|||||||
"653", "700", "710", "900", "910",
|
"653", "700", "710", "900", "910",
|
||||||
"940"
|
"940"
|
||||||
};
|
};
|
||||||
|
|
||||||
List<string> RemainTag = new List<string>(); // 메모장으로 출력되는 최종 리스트
|
List<string> RemainTag = new List<string>(); // 메모장으로 출력되는 최종 리스트
|
||||||
|
|
||||||
List<string> BlankTag = MakeMarcLine(); // 칸채우기의 값들이 여기로 저장이 되어 들어옴
|
List<string> BlankTag = MakeMarcLine(); // 칸채우기의 값들이 여기로 저장이 되어 들어옴
|
||||||
@@ -2426,15 +2459,15 @@ namespace ExcelTest
|
|||||||
AllTag.AddRange(TextTag);
|
AllTag.AddRange(TextTag);
|
||||||
|
|
||||||
AllTag.Sort();
|
AllTag.Sort();
|
||||||
AllTag.RemoveAll(x => x.Length < 3 || x =="");
|
AllTag.RemoveAll(x => x.Length < 3 || x == "");
|
||||||
for(int i=0; i<AllTag.Count;i++)
|
for (int i = 0; i < AllTag.Count; i++)
|
||||||
{
|
{
|
||||||
string tTagNum = AllTag[i].Substring(0, 3);
|
string tTagNum = AllTag[i].Substring(0, 3);
|
||||||
bool isCopy = false;
|
bool isCopy = false;
|
||||||
List<string> tTag = Tag.ToList();
|
List<string> tTag = Tag.ToList();
|
||||||
List<string> tFindTag =tTag.FindAll(x => x == tTagNum);
|
List<string> tFindTag = tTag.FindAll(x => x == tTagNum);
|
||||||
if (tFindTag.Count > 0) isCopy = true;
|
if (tFindTag.Count > 0) isCopy = true;
|
||||||
|
|
||||||
if (isCopy)
|
if (isCopy)
|
||||||
{
|
{
|
||||||
string AddText = "";
|
string AddText = "";
|
||||||
@@ -2475,7 +2508,7 @@ namespace ExcelTest
|
|||||||
if (tEndIDX == -1) tEndIDX = AllTag[i].IndexOf("▲", tStartIDX - 1);
|
if (tEndIDX == -1) tEndIDX = AllTag[i].IndexOf("▲", tStartIDX - 1);
|
||||||
if (tEndIDX == -1) tEndIDX = AllTag[i].Length;
|
if (tEndIDX == -1) tEndIDX = AllTag[i].Length;
|
||||||
|
|
||||||
AllTag[i]=AllTag[i].Remove(tStartIDX, tEndIDX - tStartIDX);
|
AllTag[i] = AllTag[i].Remove(tStartIDX, tEndIDX - tStartIDX);
|
||||||
string tNewText = string.Format("{0}{1}", AllTag[i], tTagText020);
|
string tNewText = string.Format("{0}{1}", AllTag[i], tTagText020);
|
||||||
tNewText.TrimEnd('\n');
|
tNewText.TrimEnd('\n');
|
||||||
RemainTag.Add(tNewText + "▲");
|
RemainTag.Add(tNewText + "▲");
|
||||||
@@ -2752,7 +2785,7 @@ namespace ExcelTest
|
|||||||
{
|
{
|
||||||
if (dgv.Rows[a].Cells[0].Value == null)
|
if (dgv.Rows[a].Cells[0].Value == null)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
for (int b = 0; b < dgv.ColumnCount; b++)
|
for (int b = 0; b < dgv.ColumnCount; b++)
|
||||||
{
|
{
|
||||||
if (dgv.Rows[a].Cells[b].Value == null)
|
if (dgv.Rows[a].Cells[b].Value == null)
|
||||||
@@ -3032,7 +3065,8 @@ namespace ExcelTest
|
|||||||
|
|
||||||
if (boxText[0] != "") result += "▼a" + boxText[0];
|
if (boxText[0] != "") result += "▼a" + boxText[0];
|
||||||
if (boxText[1] != "") result += "▼n" + boxText[1];
|
if (boxText[1] != "") result += "▼n" + boxText[1];
|
||||||
if (boxText[3] != "") {
|
if (boxText[3] != "")
|
||||||
|
{
|
||||||
string[] splitText245b = boxText[3].Split('▽');
|
string[] splitText245b = boxText[3].Split('▽');
|
||||||
foreach (string text in splitText245b)
|
foreach (string text in splitText245b)
|
||||||
result += "▼b" + text;
|
result += "▼b" + text;
|
||||||
@@ -3100,7 +3134,8 @@ namespace ExcelTest
|
|||||||
|
|
||||||
if (boxText[0] != "") result += "▼a" + Tag300a_Sub(boxText[0]);
|
if (boxText[0] != "") result += "▼a" + Tag300a_Sub(boxText[0]);
|
||||||
if (boxText[1] != "") result += "▼b" + boxText[1];
|
if (boxText[1] != "") result += "▼b" + boxText[1];
|
||||||
if (boxText[2] != "") {
|
if (boxText[2] != "")
|
||||||
|
{
|
||||||
result += "▼c" + boxText[2];
|
result += "▼c" + boxText[2];
|
||||||
if (boxText[3] == "") result += "cm";
|
if (boxText[3] == "") result += "cm";
|
||||||
}
|
}
|
||||||
@@ -3130,9 +3165,9 @@ namespace ExcelTest
|
|||||||
else if (Regex.IsMatch(GetMiddelString(result, "[", "]"), @"^[0-9]+$"))
|
else if (Regex.IsMatch(GetMiddelString(result, "[", "]"), @"^[0-9]+$"))
|
||||||
{
|
{
|
||||||
string tTest = GetMiddelString(result, "[", "]");
|
string tTest = GetMiddelString(result, "[", "]");
|
||||||
return result.Replace("p","").Trim()+ " p."; ;
|
return result.Replace("p", "").Trim() + " p."; ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -3532,15 +3567,18 @@ namespace ExcelTest
|
|||||||
a041 = a041.Replace("▽", ", ");
|
a041 = a041.Replace("▽", ", ");
|
||||||
|
|
||||||
// k로 번역된 h 원작을 a로 중역
|
// k로 번역된 h 원작을 a로 중역
|
||||||
if (a041 != "" && k041 != "" && h041 != "") {
|
if (a041 != "" && k041 != "" && h041 != "")
|
||||||
|
{
|
||||||
result = string.Format("{0}로 번역된 {1} 원작을 {2}로 중역", k041, h041, a041);
|
result = string.Format("{0}로 번역된 {1} 원작을 {2}로 중역", k041, h041, a041);
|
||||||
}
|
}
|
||||||
// h 원작을 a로 번역
|
// h 원작을 a로 번역
|
||||||
else if (a041 != "" && k041 == "" && h041 != "") {
|
else if (a041 != "" && k041 == "" && h041 != "")
|
||||||
|
{
|
||||||
result = string.Format("{0} 원작을 {1}로 번역", h041, a041);
|
result = string.Format("{0} 원작을 {1}로 번역", h041, a041);
|
||||||
}
|
}
|
||||||
// 본문은 a1, a2 혼합수록됨.
|
// 본문은 a1, a2 혼합수록됨.
|
||||||
else if (a041.IndexOf(",") > 0) {
|
else if (a041.IndexOf(",") > 0)
|
||||||
|
{
|
||||||
result = string.Format("본문은 {0} 혼합수록 됨.", a041);
|
result = string.Format("본문은 {0} 혼합수록 됨.", a041);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3685,14 +3723,14 @@ namespace ExcelTest
|
|||||||
lbCustIDX.Text = dr["idx"]?.ToString() ?? string.Empty;
|
lbCustIDX.Text = dr["idx"]?.ToString() ?? string.Empty;
|
||||||
tbCustName.Text = dr["c_sangho"]?.ToString() ?? string.Empty;
|
tbCustName.Text = dr["c_sangho"]?.ToString() ?? string.Empty;
|
||||||
|
|
||||||
if(int.TryParse(lbCustIDX.Text,out int custidx) && custidx >= 0)
|
if (int.TryParse(lbCustIDX.Text, out int custidx) && custidx >= 0)
|
||||||
{
|
{
|
||||||
var sql = $"update Obj_List set customer={custidx} where idx = {l_idx} and comp_num={c_idx}";
|
var sql = $"update Obj_List set customer={custidx} where idx = {l_idx} and comp_num={c_idx}";
|
||||||
var cnt = DB2.ExcuteNonQuery(sql);
|
var cnt = DB2.ExcuteNonQuery(sql);
|
||||||
if (cnt != 1)
|
if (cnt != 1)
|
||||||
UTIL.MsgE($"데이터 저장시 오류가 발생했습니다. 영향을 받은 행 수 = {cnt}");
|
UTIL.MsgE($"데이터 저장시 오류가 발생했습니다. 영향을 받은 행 수 = {cnt}");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user