Compare commits
17 Commits
chi202506
...
f9d29c7629
| Author | SHA1 | Date | |
|---|---|---|---|
| f9d29c7629 | |||
| ad0be3fef5 | |||
| cfe68509f6 | |||
| 87dbe17ec9 | |||
| 92f36e78a5 | |||
| e3d5674b0a | |||
| 6c66cdb54a | |||
| b7a2474ec2 | |||
| 6e4e2eb982 | |||
| 47c443e9a3 | |||
| 568868602f | |||
| c44f40a651 | |||
| 4ffbb2fa2e | |||
| ed9afeab80 | |||
| 0f0f745964 | |||
| d40ffda4fd | |||
| 409317c099 |
@@ -56,12 +56,6 @@
|
||||
</runtime>
|
||||
<userSettings>
|
||||
<UniMarc.Properties.Settings>
|
||||
<setting name="compidx" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="User" serializeAs="String">
|
||||
<value />
|
||||
</setting>
|
||||
<setting name="IP" serializeAs="String">
|
||||
<value>1.11010111.11111010.10000010</value>
|
||||
</setting>
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace ExcelTest
|
||||
namespace UniMarc
|
||||
{
|
||||
public static class CExt
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Threading.Tasks;
|
||||
using System.Web.Mail;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
class Email
|
||||
{
|
||||
|
||||
@@ -1,20 +1,143 @@
|
||||
using System;
|
||||
using AR;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Renci.SshNet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Renci.SshNet;
|
||||
using UniMarc.BaroService_TI;
|
||||
using UniMarc.Properties;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
|
||||
public partial class Helper_DB
|
||||
{
|
||||
//static string cs = "";
|
||||
public enum eDbType
|
||||
{
|
||||
unimarc,
|
||||
cl_marc
|
||||
}
|
||||
public static MySqlConnection CreateConnection(eDbType dbtype)
|
||||
{
|
||||
var dbname = dbtype.ToString();
|
||||
string strConnection = string.Format(
|
||||
"Server={0};" +
|
||||
"Port={1};" +
|
||||
$"Database={dbname};" +
|
||||
"uid={2};" +
|
||||
"pwd={3};", ServerData[0], DBData[0], DBData[1], DBData[2]);
|
||||
return new MySqlConnection(strConnection);
|
||||
}
|
||||
|
||||
public static DataTable ExecuteQueryData(string query, MySqlConnection cn = null)
|
||||
{
|
||||
var bLocalCN = cn == null;
|
||||
DataTable dt = new DataTable();
|
||||
try
|
||||
{
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);// new MySqlConnection(cs);
|
||||
var cmd = new MySqlCommand(query, cn);
|
||||
cn.Open();
|
||||
using (MySqlDataAdapter adapter = new MySqlDataAdapter(cmd))
|
||||
{
|
||||
adapter.Fill(dt);
|
||||
}
|
||||
cmd.Dispose();
|
||||
cn.Close();
|
||||
if (bLocalCN) cn.Dispose();
|
||||
return dt;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.ToString(), "ExecuteQueryData Error");
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 오류발생시 null을 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="tableName"></param>
|
||||
/// <param name="columns"></param>
|
||||
/// <param name="wheres"></param>
|
||||
/// <param name="orders"></param>
|
||||
/// <returns></returns>
|
||||
public static DataTable GetDT(string tableName, string columns = "*", string wheres = "", string orders = "", MySqlConnection cn = null)
|
||||
{
|
||||
var sql = $"select {columns} from {tableName}";
|
||||
if (wheres.isEmpty() == false) sql += " where " + wheres;
|
||||
if (orders.isEmpty() == false) sql += " order by " + orders;
|
||||
return ExecuteQueryData(sql, cn);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 오류발생시 -1을 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="query"></param>
|
||||
/// <returns></returns>
|
||||
public static (int applyCount, string errorMessage) ExcuteNonQuery(string query, MySqlConnection cn = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var bLocalCN = cn == null;
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);//new MySqlConnection(cs);
|
||||
var cmd = new MySqlCommand(query, cn);
|
||||
cn.Open();
|
||||
var cnt = cmd.ExecuteNonQuery();
|
||||
cmd.Dispose();
|
||||
if (bLocalCN) cn.Dispose();
|
||||
return (cnt, string.Empty);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return (-1, ex.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Insert 명령을 수행한 후 자동 생성된 index값을 반환합니다.
|
||||
/// 오류발생시에는 -1을 반환합니다
|
||||
/// </summary>
|
||||
/// <param name="cmd"></param>
|
||||
/// <param name="cn"></param>
|
||||
/// <returns></returns>
|
||||
public long DB_Send_CMD_Insert_GetIdx(string cmd, MySqlConnection cn = null)
|
||||
{
|
||||
long lastId = -1;
|
||||
var bLocalCN = cn == null;
|
||||
try
|
||||
{
|
||||
|
||||
if (cn == null) cn = CreateConnection(eDbType.unimarc);//new MySqlConnection(cs);
|
||||
using (var sqlcmd = new MySqlCommand(cmd, cn))
|
||||
{
|
||||
cn.Open();
|
||||
sqlcmd.ExecuteNonQuery();
|
||||
lastId = sqlcmd.LastInsertedId;
|
||||
}
|
||||
if (bLocalCN) cn.Dispose();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
UTIL.MsgE($"데이터베이스 실행오류\n{ex.Message}");
|
||||
}
|
||||
return lastId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// DB접속을 도와주는 클래스
|
||||
/// </summary>
|
||||
public class Helper_DB
|
||||
public partial class Helper_DB
|
||||
{
|
||||
// 접속
|
||||
MySqlConnection conn;
|
||||
@@ -22,14 +145,14 @@ namespace WindowsFormsApp1
|
||||
/// <summary>
|
||||
/// IP / Port / Uid / pwd
|
||||
/// </summary>
|
||||
string[] ServerData = {
|
||||
static string[] ServerData = {
|
||||
Settings.Default.IP,
|
||||
Settings.Default.Uid,
|
||||
Settings.Default.pwd
|
||||
};
|
||||
int port = Settings.Default.Port;
|
||||
|
||||
string[] DBData = {
|
||||
static string[] DBData = {
|
||||
Settings.Default.dbPort,
|
||||
Settings.Default.dbUid,
|
||||
Settings.Default.dbPwd
|
||||
@@ -39,47 +162,12 @@ namespace WindowsFormsApp1
|
||||
MySqlCommand sqlcmd = new MySqlCommand();
|
||||
MySqlDataReader sd;
|
||||
|
||||
public string comp_idx { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
/// DB를 사용하고 싶을 때 미리 저장된 DB의 기본 접속정보를 이용하여 DB에 접근한다.
|
||||
/// </summary>
|
||||
public void DBcon() // DB접속 함수
|
||||
{
|
||||
//"Server=1.215.250.130;Port=3306;Database=unimarc;uid=root;pwd=Admin21234;"
|
||||
PasswordConnectionInfo connectionInfo = new PasswordConnectionInfo(ServerData[0], port, ServerData[1], ServerData[2]);
|
||||
connectionInfo.Timeout = TimeSpan.FromSeconds(30);
|
||||
using (var client = new SshClient(connectionInfo))
|
||||
{
|
||||
if (conn != null) {
|
||||
conn.Close();
|
||||
conn.Dispose();
|
||||
}
|
||||
client.Connect();
|
||||
if (client.IsConnected)
|
||||
{
|
||||
string strConnection = string.Format(
|
||||
"Server={0};" +
|
||||
"Port={1};" +
|
||||
"Database=unimarc;" +
|
||||
"uid={2};" +
|
||||
"pwd={3};", ServerData[0], DBData[0], DBData[1], DBData[2]);
|
||||
conn = new MySqlConnection(strConnection);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public MySql.Data.MySqlClient.MySqlConnection CreateConnection()
|
||||
public MySqlConnection CreateConnection()
|
||||
{
|
||||
PasswordConnectionInfo connectionInfo = new PasswordConnectionInfo(ServerData[0], port, ServerData[1], ServerData[2]);
|
||||
connectionInfo.Timeout = TimeSpan.FromSeconds(30);
|
||||
using (var client = new SshClient(connectionInfo))
|
||||
{
|
||||
if (conn != null)
|
||||
{
|
||||
conn.Close();
|
||||
conn.Dispose();
|
||||
}
|
||||
client.Connect();
|
||||
if (client.IsConnected)
|
||||
{
|
||||
@@ -96,6 +184,37 @@ namespace WindowsFormsApp1
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// DB를 사용하고 싶을 때 미리 저장된 DB의 기본 접속정보를 이용하여 DB에 접근한다.
|
||||
/// </summary>
|
||||
public void DBcon() // DB접속 함수
|
||||
{
|
||||
//"Server=1.215.250.130;Port=3306;Database=unimarc;uid=root;pwd=Admin21234;"
|
||||
PasswordConnectionInfo connectionInfo = new PasswordConnectionInfo(ServerData[0], port, ServerData[1], ServerData[2]);
|
||||
connectionInfo.Timeout = TimeSpan.FromSeconds(30);
|
||||
using (var client = new SshClient(connectionInfo))
|
||||
{
|
||||
if (conn != null)
|
||||
{
|
||||
conn.Close();
|
||||
conn.Dispose();
|
||||
}
|
||||
client.Connect();
|
||||
if (client.IsConnected)
|
||||
{
|
||||
var cs = string.Format(
|
||||
"Server={0};" +
|
||||
"Port={1};" +
|
||||
"Database=unimarc;" +
|
||||
"uid={2};" +
|
||||
"pwd={3};", ServerData[0], DBData[0], DBData[1], DBData[2]);
|
||||
conn = new MySqlConnection(cs);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 국중DB를 사용하고 싶을 때 미리 저장된 DB의 기본 접속정보를 이용하여 DB에 접근한다.
|
||||
/// </summary>
|
||||
@@ -123,8 +242,11 @@ namespace WindowsFormsApp1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public string DB_Send_CMD_Search(string cmd)
|
||||
{
|
||||
|
||||
// DB 연결
|
||||
conn.Open();
|
||||
// 쿼리 맵핑
|
||||
@@ -157,7 +279,7 @@ namespace WindowsFormsApp1
|
||||
sqlcmd.Connection = conn;
|
||||
// 쿼리 날리기, sqlDataReader에 결과값 저장
|
||||
sd = sqlcmd.ExecuteReader();
|
||||
|
||||
|
||||
int colCount = dgv.ColumnCount;
|
||||
string[] grid = new string[colCount];
|
||||
int AddCol = 0;
|
||||
@@ -184,7 +306,7 @@ namespace WindowsFormsApp1
|
||||
conn.Close();
|
||||
}
|
||||
|
||||
public void DB_Send_CMD_Search_GetGridData(string cmd,DataGridView pDgv)
|
||||
public void DB_Send_CMD_Search_GetGridData(string cmd, DataGridView pDgv)
|
||||
{
|
||||
// DB 연결
|
||||
conn.Open();
|
||||
@@ -209,7 +331,7 @@ namespace WindowsFormsApp1
|
||||
if (colCount - 1 == AddCol)
|
||||
{
|
||||
AddCol = 0;
|
||||
grid[colCount]="추가";
|
||||
grid[colCount] = "추가";
|
||||
pDgv.Rows.Add(grid);
|
||||
}
|
||||
else
|
||||
@@ -220,34 +342,8 @@ namespace WindowsFormsApp1
|
||||
}
|
||||
conn.Close();
|
||||
}
|
||||
public void DB_Send_CMD_reVoid(string cmd)
|
||||
{
|
||||
|
||||
|
||||
//using (conn)
|
||||
{
|
||||
conn.Open();
|
||||
MySqlTransaction tran = conn.BeginTransaction();
|
||||
sqlcmd.Connection = conn;
|
||||
sqlcmd.Transaction = tran;
|
||||
try
|
||||
{
|
||||
sqlcmd.CommandText = cmd;
|
||||
sqlcmd.ExecuteNonQuery();
|
||||
tran.Commit();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
tran.Rollback();
|
||||
MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||
}
|
||||
finally
|
||||
{
|
||||
if (conn != null && conn.State != System.Data.ConnectionState.Closed)
|
||||
conn.Close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// DBcon이 선진행되어야함.
|
||||
/// SELECT * FROM [DB_Table_Name] WHERE [DB_Where_Table] LIKE \"%DB_Search_Data%\"
|
||||
@@ -257,10 +353,10 @@ namespace WindowsFormsApp1
|
||||
/// <param name="DB_Where_Table">검색할 테이블</param>
|
||||
/// <param name="DB_Search_Data">검색할 텍스트</param>
|
||||
/// <returns>검색된 결과값이 반환됨.</returns>
|
||||
public string DB_Contains(string DB_Table_Name, string compidx,
|
||||
public string DB_Contains(string DB_Table_Name, string compidx,
|
||||
string DB_Where_Table = "", string DB_Search_Data = "",
|
||||
string Search_col = "",
|
||||
string DB_Where_Table1 = "", string DB_Search_Data1 = "" )
|
||||
string Search_col = "",
|
||||
string DB_Where_Table1 = "", string DB_Search_Data1 = "")
|
||||
{
|
||||
string cmd = "SELECT ";
|
||||
if (Search_col == "") { cmd += "*"; }
|
||||
@@ -270,16 +366,16 @@ namespace WindowsFormsApp1
|
||||
if (DB_Table_Name == "Obj_List") { cmd += " WHERE `comp_num` = \"" + compidx + "\""; }
|
||||
else if (DB_Table_Name == "Client") { cmd += " WHERE `campanyidx` = \"" + compidx + "\""; }
|
||||
else if (DB_Table_Name == "Purchase") { cmd += " WHERE `comparyidx` = \"" + compidx + "\""; }
|
||||
else if(compidx == "none") { cmd += " WHERE `grade` = \"2\""; }
|
||||
else if (compidx == "none") { cmd += " WHERE `grade` = \"2\""; }
|
||||
else { cmd += " WHERE `compidx` = \"" + compidx + "\""; }
|
||||
|
||||
if(DB_Search_Data != "")
|
||||
{
|
||||
cmd += " AND `"+ DB_Where_Table + "` LIKE \"%" + DB_Search_Data + "%\"";
|
||||
|
||||
if (DB_Search_Data != "")
|
||||
{
|
||||
cmd += " AND `" + DB_Where_Table + "` LIKE \"%" + DB_Search_Data + "%\"";
|
||||
}
|
||||
if(DB_Search_Data1 != "")
|
||||
{
|
||||
cmd += " AND `"+ DB_Where_Table1 + "` LIKE \"%" + DB_Search_Data1 + "%\"";
|
||||
if (DB_Search_Data1 != "")
|
||||
{
|
||||
cmd += " AND `" + DB_Where_Table1 + "` LIKE \"%" + DB_Search_Data1 + "%\"";
|
||||
}
|
||||
cmd += ";";
|
||||
return cmd;
|
||||
@@ -292,17 +388,17 @@ namespace WindowsFormsApp1
|
||||
/// <param name="DB_Where_Table">검색할 테이블</param>
|
||||
/// <param name="DB_Search_Data">검색할 텍스트</param>
|
||||
/// <returns>검색된 결과값이 반환됨.</returns>
|
||||
public string DB_Select_Search(string Search_Area, string DB_Table_Name,
|
||||
public string DB_Select_Search(string Search_Area, string DB_Table_Name,
|
||||
string DB_Where_Table = "", string DB_Search_Data = "",
|
||||
string DB_Where_Table1 = "", string DB_Search_Data1 = "")
|
||||
{
|
||||
string cmd = string.Format("SELECT {0} FROM ", Search_Area);
|
||||
cmd += DB_Table_Name;
|
||||
if(DB_Where_Table != "" && DB_Search_Data != "")
|
||||
if (DB_Where_Table != "" && DB_Search_Data != "")
|
||||
{
|
||||
cmd += string.Format(" WHERE `{0}` = \"{1}\"", DB_Where_Table, DB_Search_Data);
|
||||
}
|
||||
if(DB_Where_Table1 != "" && DB_Search_Data1 != "")
|
||||
if (DB_Where_Table1 != "" && DB_Search_Data1 != "")
|
||||
{
|
||||
cmd += string.Format(" AND `{0}` = \"{1}\"", DB_Where_Table1, DB_Search_Data1);
|
||||
}
|
||||
@@ -316,15 +412,15 @@ namespace WindowsFormsApp1
|
||||
/// <param name="DB_Where_Table">검색할 테이블</param>
|
||||
/// <param name="DB_Search_Data">검색할 텍스트</param>
|
||||
/// <returns>검색된 결과값이 반환됨.</returns>
|
||||
public string DB_Search(string DB_Table_Name,
|
||||
public string DB_Search(string DB_Table_Name,
|
||||
string DB_Where_Table = "", string DB_Search_Data = "",
|
||||
string DB_Where_Table1 = "", string DB_Search_Data1 = "")
|
||||
{
|
||||
string cmd = "SELECT * FROM ";
|
||||
cmd += DB_Table_Name;// + " where id=\"id\"";
|
||||
if(DB_Search_Data != "")
|
||||
{
|
||||
cmd += " WHERE "+ DB_Where_Table + "=\"" + DB_Search_Data +"\"";
|
||||
if (DB_Search_Data != "")
|
||||
{
|
||||
cmd += " WHERE " + DB_Where_Table + "=\"" + DB_Search_Data + "\"";
|
||||
}
|
||||
if (DB_Where_Table1 != "" && DB_Search_Data1 != "")
|
||||
{
|
||||
@@ -341,18 +437,18 @@ namespace WindowsFormsApp1
|
||||
/// <param name="DB_Search_Data"></param>
|
||||
/// <param name="Search_Table">추출할 열의 이름."`num1`, `num2`" 이런식으로</param>
|
||||
/// <returns></returns>
|
||||
public string More_DB_Search(String DB_Table_Name, String[] DB_Where_Table,
|
||||
public string More_DB_Search(String DB_Table_Name, String[] DB_Where_Table,
|
||||
String[] DB_Search_Data, String Search_Table = "")
|
||||
{
|
||||
if(DB_Where_Table.Length != DB_Search_Data.Length) { return "오류발생"; }
|
||||
if (DB_Where_Table.Length != DB_Search_Data.Length) { return "오류발생"; }
|
||||
string cmd = "SELECT ";
|
||||
if(Search_Table == "") { cmd += "*"; }
|
||||
if (Search_Table == "") { cmd += "*"; }
|
||||
else { cmd += Search_Table; }
|
||||
cmd += " FROM " + DB_Table_Name + " WHERE ";
|
||||
for(int a = 0; a < DB_Where_Table.Length; a++)
|
||||
for (int a = 0; a < DB_Where_Table.Length; a++)
|
||||
{
|
||||
cmd += "`" + DB_Where_Table[a] + "` = \"" + DB_Search_Data[a] + "\" ";
|
||||
if(a == DB_Where_Table.Length - 1) { cmd += ";"; }
|
||||
if (a == DB_Where_Table.Length - 1) { cmd += ";"; }
|
||||
else { cmd += " AND "; }
|
||||
}
|
||||
return cmd;
|
||||
@@ -367,7 +463,7 @@ namespace WindowsFormsApp1
|
||||
/// <param name="end_date">끝낼 날짜 0000-00-00</param>
|
||||
/// <param name="compidx">회사 인덱스 main.com_idx</param>
|
||||
/// <returns></returns>
|
||||
public string Search_Date(string Table_name, string Search_Table, string Search_date,
|
||||
public string Search_Date(string Table_name, string Search_Table, string Search_date,
|
||||
string start_date, string end_date, string compidx)
|
||||
{
|
||||
if (Search_Table == "") { Search_Table = "*"; }
|
||||
@@ -375,7 +471,7 @@ namespace WindowsFormsApp1
|
||||
string cmd = "SELECT " + Search_Table + " FROM `" + Table_name + "` " +
|
||||
"WHERE `comp_num` = '" + compidx + "' AND `" +
|
||||
Search_date + "` >= '" + start_date + "'";
|
||||
if(Table_name != "Obj_List") { cmd = cmd.Replace("`comp_num`", "`compidx`"); }
|
||||
if (Table_name != "Obj_List") { cmd = cmd.Replace("`comp_num`", "`compidx`"); }
|
||||
if (end_date != "") { cmd += " AND `" + Search_date + "` <= '" + end_date + "';"; }
|
||||
else { cmd += ";"; }
|
||||
return cmd;
|
||||
@@ -383,13 +479,13 @@ namespace WindowsFormsApp1
|
||||
public string DB_INSERT(String DB_Table_name, String[] DB_col_name, String[] setData)
|
||||
{
|
||||
string cmd = "INSERT INTO " + DB_Table_name + "(";
|
||||
for(int a = 0; a < DB_col_name.Length; a++)
|
||||
for (int a = 0; a < DB_col_name.Length; a++)
|
||||
{
|
||||
if (a == DB_col_name.Length - 1) { cmd += "`" + DB_col_name[a] + "`) "; }
|
||||
else { cmd += "`" + DB_col_name[a] + "`, "; }
|
||||
}
|
||||
cmd += "values(";
|
||||
for(int a = 0; a < setData.Length; a++)
|
||||
for (int a = 0; a < setData.Length; a++)
|
||||
{
|
||||
setData[a] = setData[a].Replace("\"", "\"\"");
|
||||
if (a == setData.Length - 1) { cmd += "\"" + setData[a] + "\")"; }
|
||||
@@ -427,8 +523,8 @@ namespace WindowsFormsApp1
|
||||
/// <param name="comp_idx">삭제할 대상의 인덱스</param>
|
||||
/// <param name="target_area">삭제할 대상이 있는 열명</param>
|
||||
/// <param name="target">삭제할 대상</param>
|
||||
public string DB_Delete(string DB_Table_Name,
|
||||
string target_idx, string comp_idx,
|
||||
public string DB_Delete(string DB_Table_Name,
|
||||
string target_idx, string comp_idx,
|
||||
string target_area, string target)
|
||||
{
|
||||
string cmd = "DELETE FROM " + DB_Table_Name + " WHERE " +
|
||||
@@ -444,12 +540,12 @@ namespace WindowsFormsApp1
|
||||
/// <param name="comp_idx">회사 인덱스</param>
|
||||
/// <param name="target_area">삭제 대상의 컬럼명</param>
|
||||
/// <param name="target">삭제 대상</param>
|
||||
public string DB_Delete_No_Limit(string DB_Table,
|
||||
string target_idx, string comp_idx,
|
||||
public string DB_Delete_No_Limit(string DB_Table,
|
||||
string target_idx, string comp_idx,
|
||||
string[] target_area, string[] target)
|
||||
{
|
||||
string cmd = string.Format("DELETE FROM {0} WHERE `{1}`= \"{2}\" AND", DB_Table, target_idx, comp_idx);
|
||||
for(int a= 0; a < target_area.Length; a++)
|
||||
for (int a = 0; a < target_area.Length; a++)
|
||||
{
|
||||
cmd += string.Format("`{0}`=\"{1}\"", target_area[a], target[a]);
|
||||
if (a != target_area.Length - 1) { cmd += " AND"; }
|
||||
@@ -460,13 +556,13 @@ namespace WindowsFormsApp1
|
||||
/// <summary>
|
||||
/// 대상 컬럼 삭제 / DELETE FROM "DB_Table_Name" WHERE "target_idx"="comp_idx" AND "target_area"="target";
|
||||
/// </summary>
|
||||
public string DB_Delete_More_term(string DB_Table_Name,
|
||||
string target_idx, string comp_idx,
|
||||
public string DB_Delete_More_term(string DB_Table_Name,
|
||||
string target_idx, string comp_idx,
|
||||
string[] target_area, string[] target)
|
||||
{
|
||||
string cmd = "DELETE FROM " + DB_Table_Name + " WHERE " +
|
||||
"`" + target_idx + "`=\"" + comp_idx + "\" AND";
|
||||
for(int a = 0; a < target_area.Length; a++)
|
||||
for (int a = 0; a < target_area.Length; a++)
|
||||
{
|
||||
cmd += " `" + target_area[a] + "`=\"" + target[a] + "\" ";
|
||||
if (a == target_area.Length - 1) { cmd += "LIMIT 1;"; }
|
||||
@@ -484,7 +580,7 @@ namespace WindowsFormsApp1
|
||||
/// <param name="Search_Data">검색할 데이터</param>
|
||||
public string DB_Update(string DB_Tabel_Name, string Edit_colum, string Edit_Name, string Search_Name, string Search_Data)
|
||||
{
|
||||
string cmd = "UPDATE `" + DB_Tabel_Name + "` SET `" + Edit_colum + "`=\"" + Edit_Name + "\" WHERE `"+Search_Name+"`=\"" + Search_Data + "\";";
|
||||
string cmd = "UPDATE `" + DB_Tabel_Name + "` SET `" + Edit_colum + "`=\"" + Edit_Name + "\" WHERE `" + Search_Name + "`=\"" + Search_Data + "\";";
|
||||
cmd = cmd.Replace("|", "");
|
||||
return cmd;
|
||||
}
|
||||
@@ -496,12 +592,12 @@ namespace WindowsFormsApp1
|
||||
/// <param name="Edit_name">바꿀 데이터값</param>
|
||||
/// <param name="Search_col">대상 테이블명</param>
|
||||
/// <param name="Search_Name">대상 데이터값</param>
|
||||
public string More_Update(String DB_Table_Name,
|
||||
String[] Edit_col, String[] Edit_name,
|
||||
public string More_Update(String DB_Table_Name,
|
||||
String[] Edit_col, String[] Edit_name,
|
||||
String[] Search_col, String[] Search_Name, int limit = 0)
|
||||
{
|
||||
string cmd = "UPDATE `" + DB_Table_Name + "` SET ";
|
||||
for(int a = 0; a < Edit_col.Length; a++)
|
||||
for (int a = 0; a < Edit_col.Length; a++)
|
||||
{
|
||||
Edit_name[a] = Edit_name[a].Replace("\"", "\"\"");
|
||||
cmd += "`" + Edit_col[a] + "` = \"" + Edit_name[a] + "\"";
|
||||
@@ -509,14 +605,14 @@ namespace WindowsFormsApp1
|
||||
else { cmd += " "; }
|
||||
}
|
||||
cmd += "WHERE ";
|
||||
for(int a = 0; a < Search_col.Length; a++)
|
||||
for (int a = 0; a < Search_col.Length; a++)
|
||||
{
|
||||
cmd += "`" + Search_col[a] + "` = \"" + Search_Name[a] + "\" ";
|
||||
if (a != Search_col.Length - 1) { cmd += "AND "; }
|
||||
}
|
||||
if(limit != 0) { cmd += string.Format("LIMIT {0}", limit); }
|
||||
if (limit != 0) { cmd += string.Format("LIMIT {0}", limit); }
|
||||
cmd += ";";
|
||||
cmd = cmd.Replace("|", "");
|
||||
cmd = cmd.Replace("|", "");
|
||||
return cmd;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -572,9 +668,9 @@ namespace WindowsFormsApp1
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
catch (Exception e)
|
||||
{
|
||||
MessageBox.Show("{0} Exception caught.\n"+ e.ToString());
|
||||
MessageBox.Show("{0} Exception caught.\n" + e.ToString());
|
||||
MessageBox.Show(cmd);
|
||||
}
|
||||
conn.Close();
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
using AR;
|
||||
using Microsoft.Vbe.Interop;
|
||||
using MySql.Data.MySqlClient;
|
||||
using OpenQA.Selenium.BiDi.Input;
|
||||
using Renci.SshNet;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO.Ports;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using UniMarc;
|
||||
using UniMarc.Properties;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
{
|
||||
public static class DB2
|
||||
{
|
||||
public static DataTable GetDT(string tableName, string columns="*" , string wheres="", string orders="")
|
||||
{
|
||||
var sql = $"select {columns} from {tableName}";
|
||||
if (wheres.isEmpty() == false) sql += " where " + wheres;
|
||||
if (orders.isEmpty() == false) sql += " order by " + orders;
|
||||
Helper_DB db = new Helper_DB();
|
||||
var cn = db.CreateConnection();
|
||||
var da = new MySql.Data.MySqlClient.MySqlDataAdapter(sql, cn);
|
||||
var dt = new DataTable();
|
||||
da.Fill(dt);
|
||||
dt.AcceptChanges();
|
||||
return dt;
|
||||
}
|
||||
|
||||
public static int ExcuteNonQuery(string query)
|
||||
{
|
||||
Helper_DB db = new Helper_DB();
|
||||
var cn = db.CreateConnection();
|
||||
var cmd = new MySqlCommand(query, cn);
|
||||
cn.Open();
|
||||
var cnt = cmd.ExecuteNonQuery();
|
||||
cmd.Dispose();
|
||||
cn.Dispose();
|
||||
return cnt;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
2
unimarc/unimarc/Login.Designer.cs
generated
2
unimarc/unimarc/Login.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class login
|
||||
{
|
||||
|
||||
@@ -12,7 +12,7 @@ using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using Application = System.Windows.Forms.Application;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class login : Form
|
||||
{
|
||||
@@ -25,7 +25,7 @@ namespace WindowsFormsApp1
|
||||
|
||||
private void login_Load(object sender, EventArgs e)
|
||||
{
|
||||
lbl_IP.Text = String.Format("{0}", ip.GetIP);
|
||||
lbl_IP.Text = String.Format("{0}", ip.GetIP());
|
||||
lbl_Version.Text = string.Format("Ver.{0}", ip.VersionInfo());
|
||||
|
||||
this.ActiveControl = ID_text;
|
||||
@@ -79,7 +79,7 @@ namespace WindowsFormsApp1
|
||||
return;
|
||||
}
|
||||
((Main)(this.Owner)).IPText.Text = string.Format("접속 아이피 : {0}", lbl_IP.Text);
|
||||
db.DB_Send_CMD_reVoid(
|
||||
Helper_DB.ExcuteNonQuery(
|
||||
string.Format("UPDATE `User_Data` SET `lastIP` = \"{0}\", `lastDate` = \"{2}\" WHERE `ID` = \"{1}\"",
|
||||
lbl_IP.Text, ID_text.Text, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))
|
||||
);
|
||||
|
||||
302
unimarc/unimarc/Main.Designer.cs
generated
302
unimarc/unimarc/Main.Designer.cs
generated
File diff suppressed because it is too large
Load Diff
@@ -12,32 +12,16 @@ using System.Runtime.CompilerServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using UniMarc;
|
||||
using UniMarc.Properties;
|
||||
using UniMarc.개발자용;
|
||||
using UniMarc.마크;
|
||||
using UniMarc.회계;
|
||||
using WindowsFormsApp1.Account;
|
||||
using WindowsFormsApp1.Convenience;
|
||||
using WindowsFormsApp1.Delivery;
|
||||
using WindowsFormsApp1.DLS;
|
||||
using WindowsFormsApp1.Home;
|
||||
using WindowsFormsApp1.Mac;
|
||||
using WindowsFormsApp1.Work_log;
|
||||
using WindowsFormsApp1.납품관리;
|
||||
using WindowsFormsApp1.마크;
|
||||
using WindowsFormsApp1.회계;
|
||||
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Main : Form
|
||||
{
|
||||
Helper_DB _DB = new Helper_DB();
|
||||
IP ip = new IP();
|
||||
public string DB_User_Data;
|
||||
public string User;
|
||||
public string com_idx;
|
||||
|
||||
|
||||
public Main()
|
||||
{
|
||||
@@ -47,7 +31,7 @@ namespace WindowsFormsApp1
|
||||
this.mdiTabControl.DrawItem += MdiTabControl_DrawItem;
|
||||
PUB.Init();
|
||||
this.btDevDb.Visible = System.Diagnostics.Debugger.IsAttached;
|
||||
if(System.Diagnostics.Debugger.IsAttached)
|
||||
if (System.Diagnostics.Debugger.IsAttached)
|
||||
{
|
||||
this.Size = new Size(1920, 1080);
|
||||
this.WindowState = FormWindowState.Normal;
|
||||
@@ -82,28 +66,33 @@ namespace WindowsFormsApp1
|
||||
{
|
||||
string[] result = DB_User_Data.Split('|');
|
||||
|
||||
if (result[3] == null) { }
|
||||
if (result[3] == null) {
|
||||
PUB.user.UserName = "";
|
||||
PUB.user.CompanyName = string.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
toolStripLabel2.Text = result[4];
|
||||
botUserLabel.Text = result[3];
|
||||
User = result[3];
|
||||
PUB.user.CompanyName = result[4];
|
||||
PUB.user.UserName = result[3];
|
||||
}
|
||||
|
||||
cmd = _DB.DB_Select_Search("`idx`", "Comp", "comp_name", result[4]);
|
||||
com_idx = _DB.DB_Send_CMD_Search(cmd).Replace("|", "");
|
||||
PUB.user.CompanyIdx = _DB.DB_Send_CMD_Search(cmd).Replace("|", "");
|
||||
|
||||
if (com_idx != "1")
|
||||
if (PUB.user.CompanyIdx != "1")
|
||||
{
|
||||
납품관리ToolStripMenuItem.Visible = false;
|
||||
회계ToolStripMenuItem.Visible = false;
|
||||
}
|
||||
if (result[5] != "관리자") { 마스터ToolStripMenuItem.Visible = false; }
|
||||
|
||||
Settings.Default.compidx = com_idx;
|
||||
Settings.Default.User = botUserLabel.Text;
|
||||
lbCompanyName.Text = PUB.user.CompanyName;
|
||||
botUserLabel.Text = PUB.user.UserName;
|
||||
|
||||
this.Text = "[ '" + com_idx + "' : " + result[4] + " - " + result[3] + "]";
|
||||
|
||||
|
||||
|
||||
this.Text = "[ '" + PUB.user.CompanyIdx + "' : " + result[4] + " - " + result[3] + "]";
|
||||
|
||||
isAccess();
|
||||
SetBtnName();
|
||||
@@ -660,7 +649,7 @@ namespace WindowsFormsApp1
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region DLS
|
||||
|
||||
// Fields removed
|
||||
@@ -668,14 +657,14 @@ namespace WindowsFormsApp1
|
||||
|
||||
private void dLS조회ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFormInTab(() => new School_Lookup(this));
|
||||
OpenFormInTab(() => new DLS_Lookup(this));
|
||||
}
|
||||
private void dLS복본조사ToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFormInTab(() => new DLS_Copy(this));
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 기타
|
||||
// Fields removed
|
||||
// Make_Document, Mac_Stat, Mac_equip_Manage removed
|
||||
@@ -787,7 +776,7 @@ namespace WindowsFormsApp1
|
||||
{
|
||||
OpenFormInTab(() => new Batch_processing(this));
|
||||
}
|
||||
|
||||
|
||||
private void 복본조사2_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFormInTab(() =>
|
||||
@@ -889,5 +878,10 @@ namespace WindowsFormsApp1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void 신규마크작성NewToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
OpenFormInTab<AddMarc2>(() => new AddMarc2(this));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,11 +8,17 @@ using UniMarc.Properties;
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
public class LoginInfo
|
||||
{
|
||||
public string UserName { get; set; }
|
||||
public string CompanyIdx { get; set; }
|
||||
public string CompanyName { get; set; }
|
||||
}
|
||||
public static class PUB
|
||||
{
|
||||
public static arUtil.Log log;
|
||||
public static UserSetting setting;
|
||||
|
||||
public static LoginInfo user;
|
||||
public static void Init()
|
||||
{
|
||||
#region "Log setting"
|
||||
@@ -25,6 +31,8 @@ namespace UniMarc
|
||||
|
||||
setting = new UserSetting();
|
||||
setting.Load();
|
||||
|
||||
user = new LoginInfo();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
static class Program
|
||||
{
|
||||
|
||||
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
|
||||
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 번호를
|
||||
// 기본값으로 할 수 있습니다.
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("2026.01.21.2318")]
|
||||
[assembly: AssemblyFileVersion("2026.01.21.2318")]
|
||||
[assembly: AssemblyVersion("2026.02.04.2230")]
|
||||
[assembly: AssemblyFileVersion("2026.02.04.2230")]
|
||||
|
||||
26
unimarc/unimarc/Properties/Settings.Designer.cs
generated
26
unimarc/unimarc/Properties/Settings.Designer.cs
generated
@@ -12,7 +12,7 @@ namespace UniMarc.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0")]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
|
||||
public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
@@ -23,30 +23,6 @@ namespace UniMarc.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string compidx {
|
||||
get {
|
||||
return ((string)(this["compidx"]));
|
||||
}
|
||||
set {
|
||||
this["compidx"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("")]
|
||||
public string User {
|
||||
get {
|
||||
return ((string)(this["User"]));
|
||||
}
|
||||
set {
|
||||
this["User"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("1.11010111.11111010.10000010")]
|
||||
|
||||
@@ -2,12 +2,6 @@
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="UniMarc.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="compidx" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="User" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)" />
|
||||
</Setting>
|
||||
<Setting Name="IP" Type="System.String" Scope="User">
|
||||
<Value Profile="(Default)">1.11010111.11111010.10000010</Value>
|
||||
</Setting>
|
||||
|
||||
@@ -17,7 +17,6 @@ using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Xml.Linq;
|
||||
using UniMarc.SearchModel;
|
||||
using UniMarc.마크;
|
||||
using WebDriverManager;
|
||||
using WebDriverManager.DriverConfigs.Impl;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using UniMarc.SearchModel;
|
||||
using UniMarc.마크;
|
||||
using WebDriverManager;
|
||||
using WebDriverManager.DriverConfigs.Impl;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using UniMarc.SearchModel;
|
||||
using UniMarc.마크;
|
||||
using WebDriverManager;
|
||||
using WebDriverManager.DriverConfigs.Impl;
|
||||
|
||||
|
||||
@@ -12,7 +12,6 @@ using System.Text.RegularExpressions;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using UniMarc.SearchModel;
|
||||
using UniMarc.마크;
|
||||
using WebDriverManager;
|
||||
using WebDriverManager.DriverConfigs.Impl;
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ using WebDriverManager.DriverConfigs.Impl;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using UniMarc.마크;
|
||||
using OpenQA.Selenium.Chromium;
|
||||
using UniMarc.SearchModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -9,7 +9,6 @@ using WebDriverManager.DriverConfigs.Impl;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using UniMarc.마크;
|
||||
using OpenQA.Selenium.Chromium;
|
||||
using UniMarc.SearchModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -9,7 +9,6 @@ using WebDriverManager.DriverConfigs.Impl;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using UniMarc.마크;
|
||||
using OpenQA.Selenium.Chromium;
|
||||
using UniMarc.SearchModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -9,7 +9,6 @@ using WebDriverManager.DriverConfigs.Impl;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using UniMarc.마크;
|
||||
using OpenQA.Selenium.Chromium;
|
||||
using UniMarc.SearchModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -15,7 +15,6 @@ using System.Threading.Tasks;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Xml.Linq;
|
||||
using UniMarc.SearchModel;
|
||||
using UniMarc.마크;
|
||||
using WebDriverManager;
|
||||
using WebDriverManager.DriverConfigs.Impl;
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ using WebDriverManager.DriverConfigs.Impl;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using UniMarc.마크;
|
||||
using OpenQA.Selenium.Chromium;
|
||||
using UniMarc.SearchModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -9,7 +9,6 @@ using WebDriverManager.DriverConfigs.Impl;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using UniMarc.마크;
|
||||
using OpenQA.Selenium.Chromium;
|
||||
using UniMarc.SearchModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -9,7 +9,6 @@ using WebDriverManager.DriverConfigs.Impl;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using UniMarc.마크;
|
||||
using OpenQA.Selenium.Chromium;
|
||||
using UniMarc.SearchModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -9,7 +9,6 @@ using WebDriverManager.DriverConfigs.Impl;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using UniMarc.마크;
|
||||
using OpenQA.Selenium.Chromium;
|
||||
using UniMarc.SearchModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -9,7 +9,6 @@ using WebDriverManager.DriverConfigs.Impl;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading;
|
||||
using UniMarc.마크;
|
||||
using OpenQA.Selenium.Chromium;
|
||||
using UniMarc.SearchModel;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
@@ -25,7 +25,7 @@ using System.Threading;
|
||||
using System.Data.SqlTypes;
|
||||
using AR;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
/// <summary>
|
||||
/// 여러 기능들이 추가될 예정.
|
||||
@@ -3005,21 +3005,49 @@ namespace WindowsFormsApp1
|
||||
|
||||
public class IP
|
||||
{
|
||||
/// <summary>
|
||||
/// 현 PC의 외부아이피를 가져옴
|
||||
/// 프로그램에서 가져올 방법이 딱히 없어 꼼수로 웹사이트 크롤링을 통해 가져옴
|
||||
/// </summary>
|
||||
public string GetIP
|
||||
|
||||
public string GetIP()
|
||||
{
|
||||
get
|
||||
{
|
||||
string externalIp = new WebClient().DownloadString("http://ipinfo.io/ip").Trim(); // http://icanhazip.com
|
||||
// 최신 사이트 접속을 위한 TLS 1.2 활성화 (강제 지정)
|
||||
// Windows 7 / .NET 4.0에서는 이 설정이 없으면 HTTPS 접속이 실패할 수 있습니다.
|
||||
try { ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072; } catch { }
|
||||
|
||||
if (string.IsNullOrWhiteSpace(externalIp))
|
||||
externalIp = GetIP;
|
||||
return externalIp;
|
||||
string[] urls = {
|
||||
"http://checkip.amazonaws.com",
|
||||
"http://ipinfo.io/ip",
|
||||
"https://api.ipify.org"
|
||||
};
|
||||
|
||||
foreach (var url in urls)
|
||||
{
|
||||
try
|
||||
{
|
||||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
|
||||
request.Timeout = 2000;
|
||||
// 브라우저처럼 보이게 하기 위해 User-Agent 추가 (많은 사이트가 이를 요구함)
|
||||
request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36";
|
||||
|
||||
using (HttpWebResponse response = (HttpWebResponse)request.GetResponse())
|
||||
using (Stream stream = response.GetResponseStream())
|
||||
using (StreamReader reader = new StreamReader(stream))
|
||||
{
|
||||
string ip = reader.ReadToEnd().Trim();
|
||||
// IP 형식인지 검증
|
||||
IPAddress address;
|
||||
if (IPAddress.TryParse(ip, out address))
|
||||
{
|
||||
// IPv4인 경우에만 반환 (필요시 IPv6 허용 가능)
|
||||
if (address.AddressFamily == System.Net.Sockets.AddressFamily.InterNetwork)
|
||||
return ip;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { continue; } // 다음 URL 시도
|
||||
}
|
||||
return "IP 확인 실패";
|
||||
}
|
||||
|
||||
|
||||
public string VersionInfo()
|
||||
{
|
||||
string version = "0";
|
||||
|
||||
@@ -224,7 +224,6 @@
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Reference.svcmap</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Helper_DB2.cs" />
|
||||
<Compile Include="Helper_LibraryDelaySettings.cs" />
|
||||
<Compile Include="ListOfValue\fSelectDT.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -280,6 +279,12 @@
|
||||
<Compile Include="마스터\From_User_manage_List.Designer.cs">
|
||||
<DependentUpon>From_User_manage_List.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\AddMarc2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="마크\AddMarc2.Designer.cs">
|
||||
<DependentUpon>AddMarc2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\AddMarc.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -340,6 +345,7 @@
|
||||
<Compile Include="마크\Check_Copy_Sub_Selector.Designer.cs">
|
||||
<DependentUpon>Check_Copy_Sub_Selector.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\FillBlankItem.cs" />
|
||||
<Compile Include="마크\Help_007.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -353,12 +359,20 @@
|
||||
<DependentUpon>Help_008.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\MacEditorParameter.cs" />
|
||||
<Compile Include="마크\MacListItem.cs" />
|
||||
<Compile Include="마크\Mac_List_Add.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="마크\Mac_List_Add.Designer.cs">
|
||||
<DependentUpon>Mac_List_Add.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\MarcBookItem.cs" />
|
||||
<Compile Include="마크\MarcCopySelect2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="마크\MarcCopySelect2.Designer.cs">
|
||||
<DependentUpon>MarcCopySelect2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\MarcCopySelect.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -377,6 +391,7 @@
|
||||
<Compile Include="마크\Marc.designer.cs">
|
||||
<DependentUpon>Marc.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\MarcPlanItem.cs" />
|
||||
<Compile Include="마크\Marc_FillBlank.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -488,6 +503,12 @@
|
||||
<DependentUpon>Mac_Stat_Stat.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\Marc_Macro_Sub.cs" />
|
||||
<Compile Include="마크\Marc_mkList2.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="마크\Marc_mkList2.Designer.cs">
|
||||
<DependentUpon>Marc_mkList2.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="마크\Marc_mkList.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
@@ -1032,6 +1053,9 @@
|
||||
<EmbeddedResource Include="마스터\From_User_manage_List.resx">
|
||||
<DependentUpon>From_User_manage_List.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="마크\AddMarc2.resx">
|
||||
<DependentUpon>AddMarc2.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="마크\AddMarc.resx">
|
||||
<DependentUpon>AddMarc.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -1071,6 +1095,9 @@
|
||||
<EmbeddedResource Include="마크\Mac_List_Add.resx">
|
||||
<DependentUpon>Mac_List_Add.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="마크\MarcCopySelect2.resx">
|
||||
<DependentUpon>MarcCopySelect2.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="마크\MarcCopySelect.resx">
|
||||
<DependentUpon>MarcCopySelect.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -1134,6 +1161,9 @@
|
||||
<EmbeddedResource Include="마크\Mac_Stat_Stat.resx">
|
||||
<DependentUpon>Mac_Stat_Stat.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="마크\Marc_mkList2.resx">
|
||||
<DependentUpon>Marc_mkList2.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="마크\Marc_mkList.resx">
|
||||
<DependentUpon>Marc_mkList.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
|
||||
23
unimarc/unimarc/recover_v2.ps1
Normal file
23
unimarc/unimarc/recover_v2.ps1
Normal file
@@ -0,0 +1,23 @@
|
||||
$path = "s:\Source\Gloria\Unimarc\unimarc\unimarc\Helper_LibraryDelaySettings.cs"
|
||||
$utf8 = [System.Text.Encoding]::GetEncoding(65001)
|
||||
$cp949 = [System.Text.Encoding]::GetEncoding(949)
|
||||
|
||||
# Read the CURRENT mangled file as UTF-8
|
||||
$mangledString = [System.IO.File]::ReadAllText($path, $utf8)
|
||||
|
||||
# Convert each character to its CP949 bytes
|
||||
# Note: This is tricky because some "characters" might be multiple bytes in CP949
|
||||
# but here each character in the string represents what CP949 read from the original UTF-8 bytes.
|
||||
$byteList = New-Object System.Collections.Generic.List[byte]
|
||||
foreach ($char in $mangledString.ToCharArray()) {
|
||||
$cBytes = $cp949.GetBytes($char)
|
||||
foreach ($b in $cBytes) {
|
||||
$byteList.Add($b)
|
||||
}
|
||||
}
|
||||
|
||||
# Now interpret these bytes as UTF-8 (the original encoding)
|
||||
$restored = $utf8.GetString($byteList.ToArray())
|
||||
|
||||
Write-Host "--- Attempted Restoration ---"
|
||||
Write-Host ($restored -split "`r`n" | select -First 10)
|
||||
2
unimarc/unimarc/개발자용/fDevDB.Designer.cs
generated
2
unimarc/unimarc/개발자용/fDevDB.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace UniMarc.개발자용
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class fDevDB
|
||||
{
|
||||
|
||||
@@ -8,9 +8,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1;
|
||||
|
||||
namespace UniMarc.개발자용
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class fDevDB : Form
|
||||
{
|
||||
|
||||
2
unimarc/unimarc/납품관리/Book_Lookup.Designer.cs
generated
2
unimarc/unimarc/납품관리/Book_Lookup.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Book_Lookup
|
||||
{
|
||||
|
||||
@@ -9,10 +9,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1.Mac;
|
||||
using WindowsFormsApp1.납품관리;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Book_Lookup : Form
|
||||
{
|
||||
@@ -22,7 +20,6 @@ namespace WindowsFormsApp1.Delivery
|
||||
List_Lookup ll;
|
||||
Bring_Back bb;
|
||||
Check_ISBN cisbn;
|
||||
string compidx;
|
||||
string list_name;
|
||||
int idx;
|
||||
public Book_Lookup(Order_input _oin)
|
||||
@@ -30,35 +27,30 @@ namespace WindowsFormsApp1.Delivery
|
||||
InitializeComponent();
|
||||
oin = _oin;
|
||||
idx = oin.grididx;
|
||||
compidx = oin.compidx;
|
||||
}
|
||||
public Book_Lookup(Purchase _pur)
|
||||
{
|
||||
InitializeComponent();
|
||||
pur = _pur;
|
||||
idx = pur.grididx;
|
||||
compidx = pur.compidx;
|
||||
}
|
||||
public Book_Lookup(List_Lookup _ll)
|
||||
{
|
||||
InitializeComponent();
|
||||
ll = _ll;
|
||||
idx = ll.grididx;
|
||||
compidx = ll.compidx;
|
||||
}
|
||||
public Book_Lookup(Bring_Back _bb)
|
||||
{
|
||||
InitializeComponent();
|
||||
bb = _bb;
|
||||
idx = bb.grididx;
|
||||
compidx = bb.compidx;
|
||||
}
|
||||
public Book_Lookup(Check_ISBN _isbn)
|
||||
{
|
||||
InitializeComponent();
|
||||
cisbn = _isbn;
|
||||
idx = cisbn.rowidx;
|
||||
compidx = cisbn.compidx;
|
||||
}
|
||||
private void Book_Lookup_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -72,7 +64,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
* idx 도서명 저자 출판사 isbn
|
||||
* 정가 수량 입고수 합계금액 비고
|
||||
* 주문처 주문일자 */
|
||||
string[] List_book = { compidx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text,
|
||||
string[] List_book = { PUB.user.CompanyIdx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text,
|
||||
tb_pay.Text, tb_count.Text, tb_stock.Text, tb_total.Text, tb_etc.Text,
|
||||
tb_order1.Text, tb_order_date.Text, tb_List_name.Text };
|
||||
}
|
||||
@@ -81,7 +73,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string Area = "`order`, `pay`, `count`, `persent`, " + // 0-3
|
||||
"`order_date`, `import_date`, `chk_date`, `export_date`"; // 4-7
|
||||
string[] Search_col = { "compidx", "list_name", "book_name", "author", "book_comp" };
|
||||
string[] Search_data = { compidx, tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text };
|
||||
string[] Search_data = { PUB.user.CompanyIdx, tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text };
|
||||
string cmd = db.More_DB_Search("Obj_List_Book", Search_col, Search_data, Area);
|
||||
string db_res = db.DB_Send_CMD_Search(cmd);
|
||||
string[] db_data = db_res.Split('|');
|
||||
@@ -125,7 +117,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
"`total`, `header`, `num`, `order`, `etc`, " +
|
||||
"`input_count`, `order_date`, `list_name`, `idx`";
|
||||
|
||||
string[] data = { compidx, book_name, author, book_comp, list_name };
|
||||
string[] data = { PUB.user.CompanyIdx, book_name, author, book_comp, list_name };
|
||||
string[] table = { "compidx", "book_name", "author", "book_comp", "list_name" };
|
||||
string cmd = db.More_DB_Search("Obj_List_Book", table, data, search);
|
||||
string db_res = db.DB_Send_CMD_Search(cmd);
|
||||
@@ -138,7 +130,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
"`total`, `header`, `num`, `order`, `etc`, " +
|
||||
"`input_count`, `order_date`, `list_name`, `idx`";
|
||||
|
||||
string[] data = { compidx, idx };
|
||||
string[] data = { PUB.user.CompanyIdx, idx };
|
||||
string[] table = { "compidx", "idx" };
|
||||
string cmd = db.More_DB_Search("Obj_List_Book", table, data, search);
|
||||
string db_res = db.DB_Send_CMD_Search(cmd);
|
||||
@@ -169,7 +161,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
private void list_db()
|
||||
{
|
||||
string[] where_table = { "comp_num", "list_name" };
|
||||
string[] search_data = { compidx, list_name };
|
||||
string[] search_data = { PUB.user.CompanyIdx, list_name };
|
||||
string cmd = db.More_DB_Search("Obj_List", where_table, search_data,
|
||||
"`clt`, `dly`, `charge`, `date`, `date_res`");
|
||||
cmd = db.DB_Send_CMD_Search(cmd);
|
||||
@@ -186,7 +178,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
private string isbn()
|
||||
{
|
||||
string[] where_table = { "compidx", "list_name", "book_name", "author", "book_comp" };
|
||||
string[] search_data = { compidx,
|
||||
string[] search_data = { PUB.user.CompanyIdx,
|
||||
list_name, tb_book_name.Text, tb_author.Text, tb_book_comp.Text };
|
||||
string cmd = db.More_DB_Search("Obj_List_Book", where_table, search_data, "`isbn`");
|
||||
string db_res = db.DB_Send_CMD_Search(cmd);
|
||||
@@ -211,14 +203,14 @@ namespace WindowsFormsApp1.Delivery
|
||||
"pay", "count", "input_count", "total", "etc",
|
||||
"order", "order_date", "list_name" };
|
||||
string[] List_book = {
|
||||
compidx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text,
|
||||
PUB.user.CompanyIdx, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text,
|
||||
tb_pay.Text, tb_count.Text, tb_stock.Text, tb_total.Text, tb_etc.Text,
|
||||
tb_order1.Text, tb_order_date.Text, tb_List_name.Text };
|
||||
string[] idx_table = { "idx" };
|
||||
string[] idx_col = { lbl_idx.Text };
|
||||
|
||||
string U_cmd = db.More_Update("Obj_List_Book", Table, List_book, idx_table, idx_col);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
MessageBox.Show("저장되었습니다.");
|
||||
}
|
||||
private void btn_close_Click(object sender, EventArgs e)
|
||||
@@ -232,10 +224,10 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] edit_tbl = { "input_count", "import", "import_date" };
|
||||
string[] edit_col = { tb_stock.Text, "입고", DateTime.Today.ToString("yyyy-MM-dd") };
|
||||
string[] search_tbl = { "compidx", "list_name", "book_name", "author", "book_comp", "isbn" };
|
||||
string[] search_col = { compidx,
|
||||
string[] search_col = { PUB.user.CompanyIdx,
|
||||
tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text };
|
||||
string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
MessageBox.Show(tb_book_name.Text + "가 입고처리되었습니다.");
|
||||
mk_Grid();
|
||||
}
|
||||
@@ -248,10 +240,10 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] edit_col = { tb_stock.Text, "미입고", "" };
|
||||
string[] search_tbl = { "compidx",
|
||||
"list_name", "book_name", "author", "book_comp", "isbn" };
|
||||
string[] search_col = { compidx,
|
||||
string[] search_col = { PUB.user.CompanyIdx,
|
||||
tb_List_name.Text, tb_book_name.Text, tb_author.Text, tb_book_comp.Text, tb_isbn.Text };
|
||||
string U_cmd = db.More_Update("Obj_List_Book", edit_tbl, edit_col, search_tbl, search_col);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
|
||||
MessageBox.Show(tb_book_name.Text + "가 미입고처리되었습니다.");
|
||||
mk_Grid();
|
||||
|
||||
2
unimarc/unimarc/납품관리/Bring_Back.Designer.cs
generated
2
unimarc/unimarc/납품관리/Bring_Back.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace WindowsFormsApp1.납품관리
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Bring_Back
|
||||
{
|
||||
|
||||
@@ -7,13 +7,11 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1.Delivery;
|
||||
|
||||
namespace WindowsFormsApp1.납품관리
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Bring_Back : Form
|
||||
{
|
||||
public string compidx;
|
||||
public int grididx;
|
||||
Main main;
|
||||
Helper_DB db = new Helper_DB();
|
||||
@@ -21,14 +19,13 @@ namespace WindowsFormsApp1.납품관리
|
||||
{
|
||||
InitializeComponent();
|
||||
main = _main;
|
||||
compidx = main.com_idx;
|
||||
}
|
||||
private void Bring_Back_Load(object sender, EventArgs e)
|
||||
{
|
||||
db.DBcon();
|
||||
string Area = "`list_name`";
|
||||
string[] sear_col = { "comp_num", "state" };
|
||||
string[] sear_data = { compidx, "진행" };
|
||||
string[] sear_data = { PUB.user.CompanyIdx, "진행" };
|
||||
string cmd = db.More_DB_Search("Obj_List", sear_col, sear_data, Area);
|
||||
string db_res = db.DB_Send_CMD_Search(cmd);
|
||||
string[] arr_data = db_res.Split('|');
|
||||
@@ -44,7 +41,7 @@ namespace WindowsFormsApp1.납품관리
|
||||
string Area = "`idx`, `num`, `book_name`, `author`, `book_comp`, " +
|
||||
"`isbn`, `price`, `count`, `total`, `list_name`, `etc`";
|
||||
string[] sear_col = { "compidx", "list_name" };
|
||||
string[] sear_data = { compidx, cb_list_name.Text };
|
||||
string[] sear_data = { PUB.user.CompanyIdx, cb_list_name.Text };
|
||||
string cmd = db.More_DB_Search("Obj_List_Book", sear_col, sear_data, Area);
|
||||
string db_res = db.DB_Send_CMD_Search(cmd);
|
||||
string[] arr_data = db_res.Split('|');
|
||||
@@ -92,11 +89,11 @@ namespace WindowsFormsApp1.납품관리
|
||||
private void Return(int a)
|
||||
{
|
||||
string[] sear_col = { "idx", "compidx" };
|
||||
string[] sear_data = { dataGridView1.Rows[a].Cells["idx"].Value.ToString(), compidx };
|
||||
string[] sear_data = { dataGridView1.Rows[a].Cells["idx"].Value.ToString(), PUB.user.CompanyIdx };
|
||||
string[] edit_col = { "import", "etc" };
|
||||
string[] edit_data = { "미입고", "반품처리 " + dataGridView1.Rows[a].Cells["etc"].Value.ToString() };
|
||||
string U_cmd = db.More_Update("Obj_List_Book", edit_col, edit_data, sear_col, sear_data);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
}
|
||||
#endregion
|
||||
private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
|
||||
|
||||
2
unimarc/unimarc/납품관리/Commodity_Edit.Designer.cs
generated
2
unimarc/unimarc/납품관리/Commodity_Edit.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Commodity_Edit
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Commodity_Edit : Form
|
||||
{
|
||||
@@ -60,7 +60,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] book_data = { date, New_Name.Text };
|
||||
|
||||
string U_cmd = DB.More_Update("Obj_List_Book", book_col, book_data, book_search_col, book_search_data);
|
||||
DB.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
@@ -71,7 +71,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] list_data = { date, New_Clit.Text, New_Dlv.Text, New_User.Text, New_Name.Text };
|
||||
|
||||
U_cmd = DB.More_Update("Obj_List", list_col, list_data, list_search_col, list_search_data);
|
||||
DB.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
|
||||
Close();
|
||||
}
|
||||
|
||||
2
unimarc/unimarc/납품관리/Commodity_Morge.Designer.cs
generated
2
unimarc/unimarc/납품관리/Commodity_Morge.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Commodity_Morge
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Commodity_Morge : Form
|
||||
{
|
||||
@@ -99,7 +99,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
|
||||
string cmd = "";
|
||||
cmd = DB.More_Update("Obj_List_Book", up_col, up_data1, up_col, up_data2);
|
||||
DB.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
int cout1 = Convert.ToInt32(list1[7]);
|
||||
int cout2 = Convert.ToInt32(list2[7]);
|
||||
int cout = cout1 + cout2;
|
||||
@@ -111,17 +111,17 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] edit_col = { "total", "compidx" };
|
||||
string[] edit_data = { tol.ToString(), com.comp_idx };
|
||||
cmd = DB.More_Update("Obj_List_Marc", edit_col, edit_data, up_col, up_data1);
|
||||
DB.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
cmd = DB.DB_Delete_More_term("Obj_List_Marc", "compidx", com.comp_idx, up_col, up_data2);
|
||||
DB.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
|
||||
edit_col[1] = "vol";
|
||||
edit_data[1] = cout.ToString();
|
||||
up_col[0] = "comp_num";
|
||||
cmd = DB.More_Update("Obj_List", edit_col, edit_data, up_col, up_data1);
|
||||
DB.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
cmd = DB.DB_Delete_More_term("Obj_List", "comp_num", com.comp_idx, up_col, up_data2);
|
||||
DB.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
}
|
||||
/// <summary>
|
||||
/// data1가 data2으로 적용됨. 1 => 2로
|
||||
@@ -133,7 +133,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] up_data2 = tmp2.ToArray();
|
||||
string cmd = "";
|
||||
cmd = DB.More_Update("Obj_List_Book", up_col, up_data2, up_col, up_data1);
|
||||
DB.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
int cout1 = Convert.ToInt32(list1[7]);
|
||||
int cout2 = Convert.ToInt32(list2[7]);
|
||||
int cout = cout1 + cout2;
|
||||
@@ -145,17 +145,17 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] edit_col = { "total", "compidx" };
|
||||
string[] edit_data = { tol.ToString(), com.comp_idx };
|
||||
cmd = DB.More_Update("Obj_List_Marc", edit_col, edit_data, up_col, up_data2);
|
||||
DB.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
cmd = DB.DB_Delete_More_term("Obj_List_Marc", "compidx", com.comp_idx, up_col, up_data1);
|
||||
DB.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
|
||||
edit_col[1] = "vol";
|
||||
edit_data[1] = cout.ToString();
|
||||
up_col[0] = "comp_num";
|
||||
cmd = DB.More_Update("Obj_List", edit_col, edit_data, up_col, up_data2);
|
||||
DB.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
cmd = DB.DB_Delete_More_term("Obj_List", "comp_num", com.comp_idx, up_col, up_data1);
|
||||
DB.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Commodity_Search
|
||||
{
|
||||
|
||||
@@ -7,12 +7,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1.Account;
|
||||
using WindowsFormsApp1.DLS;
|
||||
using WindowsFormsApp1.Home;
|
||||
using WindowsFormsApp1.회계;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Commodity_Search : Form
|
||||
{
|
||||
@@ -25,8 +21,8 @@ namespace WindowsFormsApp1.Delivery
|
||||
Sales_Lookup sb;
|
||||
Sales_In_Pay sip;
|
||||
List_Lookup ll;
|
||||
Mac.DLS_Copy dc;
|
||||
School_Lookup sl;
|
||||
DLS_Copy dc;
|
||||
DLS_Lookup sl;
|
||||
|
||||
public Commodity_Search(Purchase _pur)
|
||||
{
|
||||
@@ -68,12 +64,12 @@ namespace WindowsFormsApp1.Delivery
|
||||
InitializeComponent();
|
||||
ll = _ll;
|
||||
}
|
||||
public Commodity_Search(Mac.DLS_Copy _dc)
|
||||
public Commodity_Search(DLS_Copy _dc)
|
||||
{
|
||||
InitializeComponent();
|
||||
dc = _dc;
|
||||
}
|
||||
public Commodity_Search(School_Lookup _sl)
|
||||
public Commodity_Search(DLS_Lookup _sl)
|
||||
{
|
||||
InitializeComponent();
|
||||
sl = _sl;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Commodity_registration
|
||||
{
|
||||
|
||||
@@ -9,9 +9,8 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1.Mac;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Commodity_registration : Form
|
||||
{
|
||||
@@ -53,7 +52,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
}
|
||||
User_Data_temp = main.DB_User_Data;
|
||||
string[] User_Data = User_Data_temp.Split('|');
|
||||
comp_idx = main.com_idx;
|
||||
comp_idx = PUB.user.CompanyIdx;
|
||||
|
||||
tb_UserName.Text = User_Data[3];
|
||||
Add_Grid("진행");
|
||||
@@ -218,10 +217,10 @@ namespace WindowsFormsApp1.Delivery
|
||||
"chk_marc", "comp_num", "unstock" };
|
||||
string[] setData = { data[0], data[1], data[2], data[3], data[4],
|
||||
data[5], data[6], data[7], data[8], data[9],
|
||||
data[12], main.com_idx, data[7] };
|
||||
data[12], PUB.user.CompanyIdx, data[7] };
|
||||
|
||||
string Incmd = db.DB_INSERT("Obj_List", col_name, setData);
|
||||
db.DB_Send_CMD_reVoid(Incmd);
|
||||
Helper_DB.ExcuteNonQuery(Incmd);
|
||||
|
||||
Grid1_total();
|
||||
dataGridView2.Rows.Add(add_grid_data);
|
||||
@@ -288,10 +287,10 @@ namespace WindowsFormsApp1.Delivery
|
||||
dataGridView2.Rows[delcout].Cells["list_name"].Value.ToString() };
|
||||
string[] del_table = { "date", "list_name" };
|
||||
|
||||
string cmd = db.DB_Delete_More_term("Obj_List", "comp_num", main.com_idx, del_table, del_target);
|
||||
db.DB_Send_CMD_reVoid(cmd);
|
||||
string cmd = db.DB_Delete_More_term("Obj_List", "comp_num", PUB.user.CompanyIdx, del_table, del_target);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
cmd = db.DB_Delete_No_Limit("Obj_List_Book", "compidx", comp_idx, del_table, del_target);
|
||||
db.DB_Send_CMD_reVoid(cmd);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
|
||||
dataGridView2.Rows.Remove(dataGridView2.Rows[delcout]);
|
||||
}
|
||||
@@ -326,7 +325,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string getdata = "`date`, `clt`, `dly`, `charge`, `list_name`, " +
|
||||
"`vol`, `total`, `state`, `chk_marc`";
|
||||
string[] othertable = { "comp_num", "state" };
|
||||
string[] othercol = { main.com_idx, code };
|
||||
string[] othercol = { PUB.user.CompanyIdx, code };
|
||||
string cmd = db.More_DB_Search("Obj_List", othertable, othercol, getdata);
|
||||
string db_res = db.DB_Send_CMD_Search(cmd);
|
||||
|
||||
@@ -393,7 +392,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
}
|
||||
}
|
||||
string Incmd = db.DB_INSERT("Obj_List_Book", DB_col_name, setData);
|
||||
db.DB_Send_CMD_reVoid(Incmd);
|
||||
Helper_DB.ExcuteNonQuery(Incmd);
|
||||
}
|
||||
}
|
||||
private void dataGridView2_CellClick(object sender, DataGridViewCellEventArgs e)
|
||||
@@ -447,7 +446,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] sear_name = { dataGridView2.Rows[a].Cells["list_date"].Value.ToString(),
|
||||
dataGridView2.Rows[a].Cells["list_name"].Value.ToString() };
|
||||
string U_cmd = db.More_Update("Obj_List", edit_col, edit_name, seer_col, sear_name);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
dataGridView2.Rows[a].Cells["stat2"].Value = "진행";
|
||||
}
|
||||
}
|
||||
@@ -469,7 +468,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] sear_name = { dataGridView2.Rows[a].Cells["list_date"].Value.ToString(),
|
||||
dataGridView2.Rows[a].Cells["list_name"].Value.ToString() };
|
||||
string U_cmd = db.More_Update("Obj_List", edit_col, edit_name, seer_col, sear_name);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
dataGridView2.Rows[a].Cells["stat2"].Value = "완료";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Input_Lookup_Stock
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Input_Lookup_Stock : Form
|
||||
{
|
||||
@@ -21,7 +21,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
{
|
||||
InitializeComponent();
|
||||
main = _main;
|
||||
compidx = main.com_idx;
|
||||
compidx = PUB.user.CompanyIdx;
|
||||
}
|
||||
private void Input_Lookup_Stock_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -85,7 +85,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] where = { "book_name", "isbn", "book_comp", "author", "pay",
|
||||
"order", "count", "import_date", "compidx" };
|
||||
string Incmd = db.DB_INSERT(table_name, where, input);
|
||||
db.DB_Send_CMD_reVoid(Incmd);
|
||||
Helper_DB.ExcuteNonQuery(Incmd);
|
||||
MessageBox.Show("저장되었습니다!");
|
||||
}
|
||||
private bool grid_text_savechk()
|
||||
@@ -181,7 +181,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] edit_where = { "book_name", "isbn", "book_comp", "author", "pay",
|
||||
"order", "count" };
|
||||
string U_cmd = db.More_Update(table_name, edit_where, edit_data, ser_where, ser_data);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
|
||||
dataGridView1.Rows[rowidx].Cells["book_name"].Value = tb_book_name.Text;
|
||||
dataGridView1.Rows[rowidx].Cells["isbn"].Value = tb_isbn.Text;
|
||||
|
||||
2
unimarc/unimarc/납품관리/List_Chk_Work.Designer.cs
generated
2
unimarc/unimarc/납품관리/List_Chk_Work.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class List_Chk_Work
|
||||
{
|
||||
|
||||
@@ -11,7 +11,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class List_Chk_Work : Form
|
||||
{
|
||||
@@ -105,7 +105,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
dataGridView1.Rows[a].Cells["book_name"].Value.ToString() };
|
||||
|
||||
string U_cmd = db.More_Update("Obj_List_Book", edit_col, edit_data, search_col, search_data);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
2
unimarc/unimarc/납품관리/List_Lookup.Designer.cs
generated
2
unimarc/unimarc/납품관리/List_Lookup.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class List_Lookup
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@ using System.Windows.Forms;
|
||||
using System.Drawing.Printing;
|
||||
using System.IO;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class List_Lookup : Form
|
||||
{
|
||||
@@ -35,7 +35,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
{
|
||||
InitializeComponent();
|
||||
main = _main;
|
||||
compidx = main.com_idx;
|
||||
compidx = PUB.user.CompanyIdx;
|
||||
}
|
||||
private void List_Lookup_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class List_aggregation
|
||||
{
|
||||
|
||||
@@ -9,9 +9,8 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1.Mac;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class List_aggregation : Form
|
||||
{
|
||||
@@ -24,7 +23,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
{
|
||||
InitializeComponent();
|
||||
main = _main;
|
||||
compidx = main.com_idx;
|
||||
compidx = PUB.user.CompanyIdx;
|
||||
}
|
||||
/////// TODO:
|
||||
// 새로운 폼 작업 필요.
|
||||
@@ -62,7 +61,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
#endregion
|
||||
|
||||
combo_user.Items.Add("전체");
|
||||
string cmd = db.self_Made_Cmd("SELECT `name` FROM `User_Data` WHERE `affil` = '" + main.toolStripLabel2.Text + "';");
|
||||
string cmd = db.self_Made_Cmd("SELECT `name` FROM `User_Data` WHERE `affil` = '" + main.lbCompanyName.Text + "';");
|
||||
string[] user_name = cmd.Split('|');
|
||||
for(int a = 0; a < user_name.Length; a++)
|
||||
{
|
||||
@@ -245,7 +244,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
dataGridView1.Rows[a].Cells["idx"].Value.ToString()
|
||||
};
|
||||
string U_cmd = db.More_Update(table, Edit_col, Edit_Data, Search_col, Search_Data);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
}
|
||||
MessageBox.Show("저장되었습니다.");
|
||||
}
|
||||
@@ -273,10 +272,10 @@ namespace WindowsFormsApp1.Delivery
|
||||
Sales(db_res, value);
|
||||
|
||||
string U_cmd = db.More_Update("Obj_List_Marc", Edit_col, Edit_data, Search_col, Search_data);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
Search_col[0] = "comp_num";
|
||||
U_cmd = db.More_Update("Obj_List", Edit_col, Edit_data, Search_col, Search_data);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
|
||||
MessageBox.Show("정상적으로 완료처리 되었습니다.");
|
||||
}
|
||||
@@ -324,7 +323,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
book[5], out_per, total[0], total[1], total[2], book[6], etc };
|
||||
|
||||
string Incmd = db.DB_INSERT("Sales", col_name, insert_data);
|
||||
db.DB_Send_CMD_reVoid(Incmd);
|
||||
Helper_DB.ExcuteNonQuery(Incmd);
|
||||
}
|
||||
private string[] Cal_out_price(string price_st, string count_st, string out_per_st, string in_per_st)
|
||||
{
|
||||
|
||||
2
unimarc/unimarc/납품관리/Order_Send_Chk.Designer.cs
generated
2
unimarc/unimarc/납품관리/Order_Send_Chk.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace WindowsFormsApp1.납품관리
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Order_Send_Chk
|
||||
{
|
||||
|
||||
@@ -10,9 +10,8 @@ using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1.Delivery;
|
||||
|
||||
namespace WindowsFormsApp1.납품관리
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Order_Send_Chk : Form
|
||||
{
|
||||
|
||||
2
unimarc/unimarc/납품관리/Order_input.Designer.cs
generated
2
unimarc/unimarc/납품관리/Order_input.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Order_input
|
||||
{
|
||||
|
||||
@@ -10,9 +10,8 @@ using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1.납품관리;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Order_input : Form
|
||||
{
|
||||
@@ -31,7 +30,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
private void Order_input_Load(object sender, EventArgs e)
|
||||
{
|
||||
db.DBcon();
|
||||
compidx = main.com_idx;
|
||||
compidx = PUB.user.CompanyIdx;
|
||||
|
||||
dataGridView1.Columns["book_name"].DefaultCellStyle.Font = new Font("굴림", 8, FontStyle.Regular);
|
||||
dataGridView1.Columns["author"].DefaultCellStyle.Font = new Font("굴림", 8, FontStyle.Regular);
|
||||
@@ -47,7 +46,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
|
||||
// 사용자 구분
|
||||
cb_user.Items.Add("전체");
|
||||
string compName = main.toolStripLabel2.Text;
|
||||
string compName = main.lbCompanyName.Text;
|
||||
string cmd = db.self_Made_Cmd("SELECT `name` FROM `User_Data` WHERE `affil` = '" + compName + "';");
|
||||
string[] user_name = cmd.Split('|');
|
||||
for (int a = 0; a < user_name.Length; a++)
|
||||
@@ -280,7 +279,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
if (edit_data[1] == "") { edit_data[1] = "0"; }
|
||||
else if (edit_data[1] == "V") { edit_data[1] = "1"; }
|
||||
string U_cmd = db.More_Update("Obj_List_Book", edit_col, edit_data, sear_col, sear_data);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
}
|
||||
MessageBox.Show("저장되었습니다!");
|
||||
}
|
||||
@@ -639,12 +638,12 @@ namespace WindowsFormsApp1.Delivery
|
||||
string Fax_Key = fax.Send_BaroFax(filename, fax_param);
|
||||
|
||||
string U_cmd = db.DB_Update("Comp", "fax_Key", Fax_Key, "idx", compidx);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
|
||||
string[] col_Name = { "compidx", "구분", "팩스전송키", "날짜", "시간", "전송파일명" };
|
||||
string[] set_Data = { compidx, "팩스", Fax_Key, Date, Time, filename };
|
||||
string Incmd = db.DB_INSERT("Send_Order", col_Name, set_Data);
|
||||
db.DB_Send_CMD_reVoid(Incmd);
|
||||
Helper_DB.ExcuteNonQuery(Incmd);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -702,7 +701,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] col_Name = { "compidx", "구분", "거래처명", "날짜", "시간", "보낸이", "받는이", "전송파일명", "전송결과" };
|
||||
string[] set_Data = { compidx, "메일", pur, Date, Time, arr_db[0], m_send, filename, "성공" };
|
||||
string Incmd = db.DB_INSERT("Send_Order", col_Name, set_Data);
|
||||
db.DB_Send_CMD_reVoid(Incmd);
|
||||
Helper_DB.ExcuteNonQuery(Incmd);
|
||||
lbl_OrderStat.Text = "메일 전송 성공!";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Order_input_Search
|
||||
{
|
||||
|
||||
@@ -7,10 +7,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1.Account;
|
||||
using WindowsFormsApp1.Mac;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Order_input_Search : Form
|
||||
{
|
||||
|
||||
2
unimarc/unimarc/납품관리/Purchase.Designer.cs
generated
2
unimarc/unimarc/납품관리/Purchase.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Purchase
|
||||
{
|
||||
|
||||
@@ -9,9 +9,8 @@ using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using System.IO;
|
||||
using System.Windows.Forms.VisualStyles;
|
||||
using WindowsFormsApp1.Home;
|
||||
|
||||
namespace WindowsFormsApp1.Delivery
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Purchase : Form
|
||||
{
|
||||
@@ -25,7 +24,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
{
|
||||
InitializeComponent();
|
||||
main = _main;
|
||||
compidx = main.com_idx;
|
||||
compidx = PUB.user.CompanyIdx;
|
||||
}
|
||||
private void Purchase_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -652,7 +651,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] edit_Data = { "입고", dataGridView2.Rows[a].Cells["Date"].Value.ToString(),
|
||||
dataGridView2.Rows[a].Cells["isbn2"].Value.ToString() };
|
||||
string U_cmd = db.More_Update("Obj_List_Book", edit_Col, edit_Data, search_Col, search_Data);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
}
|
||||
/* 입고작업을 하려는 책이 재고에 있을 경우, 재고 -1이 되어야함.
|
||||
* 만약 재고수보다 입고수가 더 많을경우는?
|
||||
@@ -695,7 +694,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
string[] Edit_col = { "input_count" };
|
||||
string[] Edit_data = { Inven_count(db_data[0], dataGridView2.Rows[a].Cells["count2"].Value.ToString(), a) };
|
||||
string U_cmd = db.More_Update("Obj_List_Book", Edit_col, Edit_data, Search_col, Search_data);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
@@ -737,7 +736,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
dataGridView2.Rows[row].Cells["list_name2"].Value.ToString()
|
||||
};
|
||||
string U_cmd = db.More_Update("Obj_List_Book", Edit_Col, Edit_Data, Search_Name, Search_Data);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
|
||||
dataGridView2.Rows[row].Cells["edasd"].Value = res.ToString();
|
||||
}
|
||||
@@ -792,7 +791,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
if (db_res.Length < 3)
|
||||
{
|
||||
string Incmd = db.DB_INSERT("Inven", input_col, input_data);
|
||||
db.DB_Send_CMD_reVoid(Incmd);
|
||||
Helper_DB.ExcuteNonQuery(Incmd);
|
||||
MessageBox.Show("DB 새로 추가");
|
||||
return;
|
||||
}
|
||||
@@ -805,7 +804,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
count += data;
|
||||
MessageBox.Show("DB 수정");
|
||||
string U_cmd = db.DB_Update("Inven", "count", count.ToString(), "idx", cout[0]);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -834,7 +833,7 @@ namespace WindowsFormsApp1.Delivery
|
||||
tata[9] = "재고가감";
|
||||
}
|
||||
string Incmd = db.DB_INSERT("Buy_ledger", Area, tata);
|
||||
db.DB_Send_CMD_reVoid(Incmd);
|
||||
Helper_DB.ExcuteNonQuery(Incmd);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
|
||||
2
unimarc/unimarc/마스터/Batch_processing.Designer.cs
generated
2
unimarc/unimarc/마스터/Batch_processing.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Home
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Batch_processing
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1.Home
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Batch_processing : Form
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using AR;
|
||||
using ExcelTest;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -10,7 +9,6 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1;
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
@@ -72,13 +70,13 @@ namespace UniMarc
|
||||
,nudCompIDX.Value.ToString(),tbIP.Text
|
||||
}; // 15
|
||||
tCmd = mDb.DB_INSERT("Comp", tInsertCol, tInsertData);
|
||||
mDb.DB_Send_CMD_reVoid(tCmd);
|
||||
Helper_DB.ExcuteNonQuery(tCmd);
|
||||
|
||||
//// IP 적용
|
||||
//string[] IP_Col = { "compidx", "comp", "IP" };
|
||||
//string[] IP_Data = { mDb.chk_comp(tb_sangho.Text), tb_sangho.Text, tbIP.Text };//cb_IPList.Text
|
||||
//tCmd = mDb.DB_INSERT("Comp_IP", IP_Col, IP_Data);
|
||||
//mDb.DB_Send_CMD_reVoid(tCmd);
|
||||
//Helper_DB.ExcuteNonQuery(tCmd);
|
||||
|
||||
RefreshList();
|
||||
|
||||
@@ -108,7 +106,7 @@ namespace UniMarc
|
||||
string[] tSearch_col = { dgvList.SelectedRows[0].Cells["dbIDX"].Value.ToString() };
|
||||
string U_cmd = mDb.More_Update("Comp", tEdit_tbl, tEdit_col, tSearch_tbl, tSearch_col);
|
||||
|
||||
mDb.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
}
|
||||
RefreshList();
|
||||
}
|
||||
@@ -125,7 +123,7 @@ namespace UniMarc
|
||||
if (UTIL.MsgQ(tText) == DialogResult.Yes)
|
||||
{
|
||||
string tD_cmd = mDb.DB_Delete("Comp", "idx", dgvList.SelectedRows[0].Cells["dbIDX"].Value.ToString(), "comp_name", dgvList.SelectedRows[0].Cells["comp_name"].Value.ToString());
|
||||
mDb.DB_Send_CMD_reVoid(tD_cmd);
|
||||
Helper_DB.ExcuteNonQuery(tD_cmd);
|
||||
TextClear();
|
||||
}
|
||||
RefreshList();
|
||||
|
||||
2
unimarc/unimarc/마스터/Mac_Setting.Designer.cs
generated
2
unimarc/unimarc/마스터/Mac_Setting.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Mac_Setting
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Mac_Setting : Form
|
||||
{
|
||||
|
||||
2
unimarc/unimarc/마스터/Notice_Send.Designer.cs
generated
2
unimarc/unimarc/마스터/Notice_Send.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Notice_Send
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Notice_Send : Form
|
||||
{
|
||||
|
||||
2
unimarc/unimarc/마스터/Sales_Details.Designer.cs
generated
2
unimarc/unimarc/마스터/Sales_Details.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Sales_Details
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class Sales_Details : Form
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class User_account_inquiry
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class User_account_inquiry : Form
|
||||
{
|
||||
|
||||
2
unimarc/unimarc/마스터/User_manage.Designer.cs
generated
2
unimarc/unimarc/마스터/User_manage.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class User_manage
|
||||
{
|
||||
|
||||
@@ -8,7 +8,7 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace WindowsFormsApp1
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class User_manage : Form
|
||||
{
|
||||
@@ -28,7 +28,7 @@ namespace WindowsFormsApp1
|
||||
button1.ForeColor = Color.Red;
|
||||
|
||||
IP ip = new IP();
|
||||
string[] IPList = { "ALL", ip.GetIP };
|
||||
string[] IPList = { "ALL", ip.GetIP() };
|
||||
cb_IPList.Items.AddRange(IPList);
|
||||
cb_IPList.SelectedIndex = 0;
|
||||
}
|
||||
@@ -106,13 +106,13 @@ namespace WindowsFormsApp1
|
||||
tb_bank_comp.Text, tb_bank_no.Text, tb_email.Text, tb_barea.Text, "외부업체"
|
||||
}; // 15
|
||||
|
||||
db.DB_Send_CMD_reVoid(db.DB_INSERT("Comp", InsertCol, InsertData));
|
||||
Helper_DB.ExcuteNonQuery(db.DB_INSERT("Comp", InsertCol, InsertData));
|
||||
|
||||
// IP 적용
|
||||
string[] IP_Col = { "compidx","comp", "IP" };
|
||||
string[] IP_Data = { db.chk_comp(tb_sangho.Text), tb_sangho.Text,tbIP.Text };//cb_IPList.Text
|
||||
|
||||
db.DB_Send_CMD_reVoid(db.DB_INSERT("Comp_IP", IP_Col, IP_Data));
|
||||
Helper_DB.ExcuteNonQuery(db.DB_INSERT("Comp_IP", IP_Col, IP_Data));
|
||||
|
||||
InsertAccount(tb_sangho.Text);
|
||||
}
|
||||
@@ -129,11 +129,11 @@ namespace WindowsFormsApp1
|
||||
string[] InsertUserSubData = { ID };
|
||||
string[] InsertUserSubCol = { "id" };
|
||||
|
||||
db.DB_Send_CMD_reVoid(db.DB_INSERT("User_Data", InsertCol, InsertData));
|
||||
Helper_DB.ExcuteNonQuery(db.DB_INSERT("User_Data", InsertCol, InsertData));
|
||||
|
||||
// User_ShortCut, User_Access 추가.
|
||||
db.DB_Send_CMD_reVoid(db.DB_INSERT("User_ShortCut", InsertUserSubCol, InsertUserSubData));
|
||||
db.DB_Send_CMD_reVoid(db.DB_INSERT("User_Access", InsertUserSubCol, InsertUserSubData));
|
||||
Helper_DB.ExcuteNonQuery(db.DB_INSERT("User_ShortCut", InsertUserSubCol, InsertUserSubData));
|
||||
Helper_DB.ExcuteNonQuery(db.DB_INSERT("User_Access", InsertUserSubCol, InsertUserSubData));
|
||||
}
|
||||
|
||||
private void btn_close_Click(object sender, EventArgs e)
|
||||
|
||||
2
unimarc/unimarc/마크/AddMarc.Designer.cs
generated
2
unimarc/unimarc/마크/AddMarc.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class AddMarc
|
||||
{
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using ExcelTest;
|
||||
using SHDocVw;
|
||||
using SHDocVw;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@@ -10,31 +9,31 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1;
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class AddMarc : Form
|
||||
{
|
||||
Helper_DB db = new Helper_DB();
|
||||
String_Text st = new String_Text();
|
||||
Help008Tag tag008 = new Help008Tag();
|
||||
public string mUserName;
|
||||
public string mCompidx;
|
||||
private string mOldMarc = string.Empty;
|
||||
Main m;
|
||||
public AddMarc(Main _m)
|
||||
{
|
||||
InitializeComponent();
|
||||
m = _m;
|
||||
mUserName = m.User;
|
||||
mCompidx = m.com_idx;
|
||||
}
|
||||
public AddMarc()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
|
||||
{
|
||||
if (keyData == Keys.Alt || keyData == (Keys.Alt | Keys.Menu))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
return base.ProcessCmdKey(ref msg, keyData);
|
||||
}
|
||||
|
||||
private void AddMarc_Load(object sender, EventArgs e)
|
||||
{
|
||||
cb_SearchCol.SelectedIndex = 0;
|
||||
@@ -300,12 +299,12 @@ namespace UniMarc.마크
|
||||
};
|
||||
string[] EditColumn =
|
||||
{
|
||||
mCompidx, oriMarc, "1",mOldMarc, "0", etc1.Text,
|
||||
etc2.Text, tag056, text008.Text, date, mUserName,
|
||||
PUB.user.CompanyIdx, oriMarc, "1",mOldMarc, "0", etc1.Text,
|
||||
etc2.Text, tag056, text008.Text, date, PUB.user.UserName,
|
||||
grade.ToString()
|
||||
};
|
||||
string[] SearchTable = { "idx","compidx" };
|
||||
string[] SearchColumn = { MarcIndex, mCompidx };
|
||||
string[] SearchColumn = { MarcIndex, PUB.user.CompanyIdx };
|
||||
|
||||
//int marcChk = subMarcChk(Table, MarcIndex);
|
||||
//if (IsCovertDate)
|
||||
@@ -335,31 +334,10 @@ namespace UniMarc.마크
|
||||
// break;
|
||||
//}
|
||||
string UpCMD = db.More_Update(Table, EditTable, EditColumn, SearchTable, SearchColumn);
|
||||
PUB.log.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", mUserName, mCompidx, UpCMD.Replace("\r", " ").Replace("\n", " ")));
|
||||
db.DB_Send_CMD_reVoid(UpCMD);
|
||||
PUB.log.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, UpCMD.Replace("\r", " ").Replace("\n", " ")));
|
||||
Helper_DB.ExcuteNonQuery(UpCMD);
|
||||
}
|
||||
#region UpdateSub
|
||||
/// <summary>
|
||||
/// 어느곳이 최근 저장인지 확인
|
||||
/// </summary>
|
||||
/// <param name="table">테이블명</param>
|
||||
/// <param name="midx">idx</param>
|
||||
/// <returns>marcChk 번호</returns>
|
||||
private int subMarcChk(string table, string midx)
|
||||
{
|
||||
string Area = "`marc_chk`, `marc_chk1`, `marc_chk2`";
|
||||
string cmd = db.DB_Select_Search(Area, table, "idx", midx);
|
||||
string db_res = db.DB_Send_CMD_Search(cmd);
|
||||
string[] chk_ary = db_res.Split('|');
|
||||
|
||||
for (int a = 0; a < chk_ary.Length; a++)
|
||||
{
|
||||
if (chk_ary[a] == "1")
|
||||
return a;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 마크DB에 INSERT해주는 함수
|
||||
@@ -382,12 +360,12 @@ namespace UniMarc.마크
|
||||
{
|
||||
BookData[0], BookData[1], BookData[2], BookData[3], BookData[4],
|
||||
oriMarc, etc1.Text, etc2.Text, grade.ToString(), "1",
|
||||
mUserName, tag056, text008.Text, date, mCompidx
|
||||
PUB.user.UserName, tag056, text008.Text, date, PUB.user.CompanyIdx
|
||||
};
|
||||
|
||||
string InCMD = db.DB_INSERT(Table, InsertTable, InsertColumn);
|
||||
PUB.log.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", mUserName, mCompidx, InCMD.Replace("\r", " ").Replace("\n", " ")));
|
||||
db.DB_Send_CMD_reVoid(InCMD);
|
||||
PUB.log.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, InCMD.Replace("\r", " ").Replace("\n", " ")));
|
||||
Helper_DB.ExcuteNonQuery(InCMD);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -400,7 +378,7 @@ namespace UniMarc.마크
|
||||
{
|
||||
if (TimeSpanDaysValue < -1)
|
||||
return false;
|
||||
if (user != mUserName)
|
||||
if (user != PUB.user.UserName)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@@ -2787,21 +2765,22 @@ namespace UniMarc.마크
|
||||
{
|
||||
TextBox tb = sender as TextBox;
|
||||
|
||||
if (e.Alt && e.KeyCode >= Keys.A && e.KeyCode <= Keys.Z)
|
||||
{
|
||||
var letter = e.KeyCode.ToString().ToLower();
|
||||
tb.InvokeInsertText("▽" + letter);
|
||||
e.SuppressKeyPress = true;
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.KeyCode == Keys.F3)
|
||||
{
|
||||
tb.InvokeInsertText("▽");
|
||||
|
||||
//tb.Select(tb.Text.Length, 0);
|
||||
}
|
||||
else if (e.KeyCode == Keys.F4)
|
||||
{
|
||||
tb.InvokeInsertText("△");
|
||||
//tb.Select(tb.Text.Length, 0);
|
||||
}
|
||||
|
||||
|
||||
//tb.SelectionStart = tb.Text.Length;
|
||||
//tb.Select(tb.Text.Length, 0);
|
||||
}
|
||||
private void etc_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
|
||||
157
unimarc/unimarc/마크/AddMarc2.Designer.cs
generated
Normal file
157
unimarc/unimarc/마크/AddMarc2.Designer.cs
generated
Normal file
@@ -0,0 +1,157 @@
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class AddMarc2
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.btn_close = new System.Windows.Forms.Button();
|
||||
this.panel1 = new System.Windows.Forms.Panel();
|
||||
this.cb_SearchCol = new System.Windows.Forms.ComboBox();
|
||||
this.tb_Search = new System.Windows.Forms.TextBox();
|
||||
this.panel2 = new System.Windows.Forms.Panel();
|
||||
this.Btn_SearchKolis = new System.Windows.Forms.Button();
|
||||
this.btn_Empty = new System.Windows.Forms.Button();
|
||||
this.marcEditorControl1 = new MarcEditorControl();
|
||||
this.panel1.SuspendLayout();
|
||||
this.panel2.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// btn_close
|
||||
//
|
||||
this.btn_close.Location = new System.Drawing.Point(1168, 3);
|
||||
this.btn_close.Name = "btn_close";
|
||||
this.btn_close.Size = new System.Drawing.Size(77, 23);
|
||||
this.btn_close.TabIndex = 381;
|
||||
this.btn_close.Text = "닫 기";
|
||||
this.btn_close.UseVisualStyleBackColor = true;
|
||||
this.btn_close.Click += new System.EventHandler(this.btn_close_Click);
|
||||
//
|
||||
// panel1
|
||||
//
|
||||
this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.panel1.Controls.Add(this.Btn_SearchKolis);
|
||||
this.panel1.Controls.Add(this.cb_SearchCol);
|
||||
this.panel1.Controls.Add(this.btn_Empty);
|
||||
this.panel1.Controls.Add(this.tb_Search);
|
||||
this.panel1.Controls.Add(this.btn_close);
|
||||
this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.panel1.Location = new System.Drawing.Point(0, 0);
|
||||
this.panel1.Name = "panel1";
|
||||
this.panel1.Size = new System.Drawing.Size(1324, 32);
|
||||
this.panel1.TabIndex = 393;
|
||||
//
|
||||
// cb_SearchCol
|
||||
//
|
||||
this.cb_SearchCol.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
|
||||
this.cb_SearchCol.FormattingEnabled = true;
|
||||
this.cb_SearchCol.Items.AddRange(new object[] {
|
||||
"ISBN",
|
||||
"서명",
|
||||
"저자",
|
||||
"출판사"});
|
||||
this.cb_SearchCol.Location = new System.Drawing.Point(8, 5);
|
||||
this.cb_SearchCol.Name = "cb_SearchCol";
|
||||
this.cb_SearchCol.Size = new System.Drawing.Size(121, 20);
|
||||
this.cb_SearchCol.TabIndex = 395;
|
||||
//
|
||||
// tb_Search
|
||||
//
|
||||
this.tb_Search.Location = new System.Drawing.Point(135, 5);
|
||||
this.tb_Search.Name = "tb_Search";
|
||||
this.tb_Search.Size = new System.Drawing.Size(205, 21);
|
||||
this.tb_Search.TabIndex = 0;
|
||||
this.tb_Search.KeyDown += new System.Windows.Forms.KeyEventHandler(this.tb_ISBN_KeyDown);
|
||||
//
|
||||
// panel2
|
||||
//
|
||||
this.panel2.Controls.Add(this.marcEditorControl1);
|
||||
this.panel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.panel2.Location = new System.Drawing.Point(0, 32);
|
||||
this.panel2.Name = "panel2";
|
||||
this.panel2.Size = new System.Drawing.Size(1324, 907);
|
||||
this.panel2.TabIndex = 394;
|
||||
//
|
||||
// Btn_SearchKolis
|
||||
//
|
||||
this.Btn_SearchKolis.Location = new System.Drawing.Point(1002, 3);
|
||||
this.Btn_SearchKolis.Name = "Btn_SearchKolis";
|
||||
this.Btn_SearchKolis.Size = new System.Drawing.Size(77, 23);
|
||||
this.Btn_SearchKolis.TabIndex = 397;
|
||||
this.Btn_SearchKolis.Text = "코리스 검색";
|
||||
this.Btn_SearchKolis.UseVisualStyleBackColor = true;
|
||||
this.Btn_SearchKolis.Click += new System.EventHandler(this.Btn_SearchKolis_Click);
|
||||
//
|
||||
// btn_Empty
|
||||
//
|
||||
this.btn_Empty.Location = new System.Drawing.Point(1085, 3);
|
||||
this.btn_Empty.Name = "btn_Empty";
|
||||
this.btn_Empty.Size = new System.Drawing.Size(77, 23);
|
||||
this.btn_Empty.TabIndex = 396;
|
||||
this.btn_Empty.Text = "비 우 기";
|
||||
this.btn_Empty.UseVisualStyleBackColor = true;
|
||||
this.btn_Empty.Click += new System.EventHandler(this.btn_Empty_Click);
|
||||
//
|
||||
// marcEditorControl1
|
||||
//
|
||||
this.marcEditorControl1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.marcEditorControl1.Font = new System.Drawing.Font("돋움", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(129)));
|
||||
this.marcEditorControl1.Location = new System.Drawing.Point(0, 0);
|
||||
this.marcEditorControl1.Name = "marcEditorControl1";
|
||||
this.marcEditorControl1.Size = new System.Drawing.Size(1324, 907);
|
||||
this.marcEditorControl1.TabIndex = 394;
|
||||
//
|
||||
// AddMarc2
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 12F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.BackColor = System.Drawing.Color.Gray;
|
||||
this.ClientSize = new System.Drawing.Size(1324, 939);
|
||||
this.Controls.Add(this.panel2);
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Name = "AddMarc2";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.Text = "마크 작성(2-New)";
|
||||
this.Load += new System.EventHandler(this.AddMarc_Load);
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.panel1.PerformLayout();
|
||||
this.panel2.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
private System.Windows.Forms.Button btn_close;
|
||||
private System.Windows.Forms.Panel panel1;
|
||||
private System.Windows.Forms.Panel panel2;
|
||||
private System.Windows.Forms.TextBox tb_Search;
|
||||
private System.Windows.Forms.ComboBox cb_SearchCol;
|
||||
private System.Windows.Forms.Button btn_Empty;
|
||||
private System.Windows.Forms.Button Btn_SearchKolis;
|
||||
private MarcEditorControl marcEditorControl1;
|
||||
}
|
||||
}
|
||||
567
unimarc/unimarc/마크/AddMarc2.cs
Normal file
567
unimarc/unimarc/마크/AddMarc2.cs
Normal file
@@ -0,0 +1,567 @@
|
||||
using SHDocVw;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class AddMarc2 : Form
|
||||
{
|
||||
Helper_DB db = new Helper_DB();
|
||||
String_Text st = new String_Text();
|
||||
Help008Tag tag008 = new Help008Tag();
|
||||
private string mOldMarc = string.Empty;
|
||||
Main m;
|
||||
public AddMarc2(Main _m)
|
||||
{
|
||||
InitializeComponent();
|
||||
m = _m;
|
||||
}
|
||||
|
||||
private void AddMarc_Load(object sender, EventArgs e)
|
||||
{
|
||||
cb_SearchCol.SelectedIndex = 0;
|
||||
db.DBcon();
|
||||
TextReset();
|
||||
|
||||
marcEditorControl1.db = this.db;
|
||||
marcEditorControl1.BookSaved += MarcEditorControl1_BookSaved;
|
||||
marcEditorControl1.CloseButton += (s1,e1)=> { this.Close(); };
|
||||
marcEditorControl1.SetButtonKolist(false);
|
||||
marcEditorControl1.SetButtonNext(false);
|
||||
marcEditorControl1.SetButtonPrev(false);
|
||||
}
|
||||
public void SetKolisValueApply(string marc)
|
||||
{
|
||||
this.marcEditorControl1.SetMarcString(marc);
|
||||
}
|
||||
private void MarcEditorControl1_BookSaved(object sender, MarcEditorControl.BookSavedEventArgs e)
|
||||
{
|
||||
string tag056 = Tag056(e.DBMarc, e.Param);
|
||||
string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
string orimarc = st.made_Ori_marc(e.DBMarc).Replace(@"\", "₩");
|
||||
|
||||
if (!isMustTag(orimarc))
|
||||
{
|
||||
|
||||
return;
|
||||
}
|
||||
var MarcText = e.DBMarc;
|
||||
string midx = this.lbl_Midx;
|
||||
string[] BookData = GetBookData(MarcText);
|
||||
bool IsCoverDate = false;
|
||||
|
||||
if (e.Param.SaveDate != "")
|
||||
{
|
||||
// 마지막 수정일로부터 2일이 지났는지, 마지막 저장자가 사용자인지 확인
|
||||
TimeSpan sp = CheckDate(e.Param.SaveDate, date);
|
||||
IsCoverDate = IsCoverData(sp.Days, e.Param.User);
|
||||
//if (IsCoverDate)
|
||||
// etc2.Text = etc2.Text.Replace(SaveData[0], date);
|
||||
}
|
||||
//else
|
||||
// etc2.Text += string.Format("{0}\t{1}\n", date, mUserName);
|
||||
string Table = "Marc";
|
||||
bool isUpdate;
|
||||
if (lbl_Midx != "")
|
||||
isUpdate = true;
|
||||
else
|
||||
isUpdate = false;
|
||||
|
||||
var grade = int.Parse(e.Param.Grade);
|
||||
|
||||
if (isUpdate)
|
||||
UpdateMarc(Table, midx, orimarc, grade, tag056, date, IsCoverDate,e.Param);
|
||||
else
|
||||
InsertMarc(Table, BookData, orimarc, grade, tag056, date, e.Param);
|
||||
|
||||
MessageBox.Show("저장되었습니다.", "저장");
|
||||
}
|
||||
|
||||
|
||||
private void tb_ISBN_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
if (e.KeyCode != Keys.Enter)
|
||||
return;
|
||||
|
||||
TextReset();
|
||||
|
||||
string SearchText = tb_Search.Text;
|
||||
string SearchCol = cb_SearchCol.SelectedItem.ToString();
|
||||
var mcs = new MarcCopySelect2(this);
|
||||
mcs.Init(SearchCol, SearchText);
|
||||
mcs.Show();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ISBN 검색후 특정 마크 선택시 현재폼에 적용시키는 폼
|
||||
/// </summary>
|
||||
/// <param name="Marc">뷰형태 마크데이터</param>
|
||||
/// <param name="ISBN">ISBN</param>
|
||||
/// <param name="GridData">
|
||||
/// 0:idx <br></br>
|
||||
/// 1:compidx <br></br>
|
||||
/// 2:user <br></br>
|
||||
/// 3:date <br></br>
|
||||
/// 4:grade <br></br>
|
||||
/// 5:tag008 <br></br>
|
||||
/// 6:LineMarc</param>
|
||||
public void SelectMarc_Sub(string Marc, string ISBN, string[] GridData)
|
||||
{
|
||||
this.marcEditorControl1.LoadBookData(Marc, new MacEditorParameter
|
||||
{
|
||||
ISBN13 = ISBN,
|
||||
SaveDate = string.Format("[{0}] [{1}]", GridData[2], GridData[3]),
|
||||
Grade = GridData[4],
|
||||
Remark1 = string.Empty,
|
||||
Remark2 = string.Empty,
|
||||
NewMake = true
|
||||
});
|
||||
mOldMarc = GridData[6];
|
||||
lbl_Midx = GridData[0];
|
||||
}
|
||||
string lbl_Midx = "";
|
||||
|
||||
|
||||
private void btn_close_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.Close();
|
||||
}
|
||||
|
||||
private void btn_Empty_Click(object sender, EventArgs e)
|
||||
{
|
||||
TextReset();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 전체 초기화
|
||||
/// </summary>
|
||||
/// <param name="isDelete">탭 컨트롤에서 사용할 경우 false</param>
|
||||
public void TextReset(bool isDelete = true)
|
||||
{
|
||||
if (isDelete)
|
||||
{
|
||||
marcEditorControl1.LoadBookData(string.Empty, new MacEditorParameter
|
||||
{
|
||||
ISBN13 = string.Empty,
|
||||
SaveDate = string.Empty,
|
||||
Remark1 = string.Empty,
|
||||
Remark2 = string.Empty,
|
||||
NewMake=true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
string TextResetSub()
|
||||
{
|
||||
// 입력일자 (00-05)
|
||||
// 발행년유형 (6)
|
||||
// 발행년1 (07-10)
|
||||
// 발행년2 (11-14)
|
||||
// 발행국 (15-17)
|
||||
|
||||
// 삽화표시 (18-21)
|
||||
// 이용대상자수준 (22) v
|
||||
// 개별자료형태 (23) v
|
||||
// 내용형식1 (24) v
|
||||
// 내용형식2 (25) v
|
||||
|
||||
// 한국대학부호 (26-27)
|
||||
// 수정레코드 (28)
|
||||
// 회의간행물 (29) c
|
||||
// 기념논문집 (30) c
|
||||
// 색인 (31)
|
||||
|
||||
// 목록전거 (32)
|
||||
// 문학형식 (33) v
|
||||
// 전기 (34) v
|
||||
// 언어 (35-37) v
|
||||
// 한국정부기관부호 (38-39)
|
||||
string yyMMdd = DateTime.Now.ToString("yyMMdd");
|
||||
string yyyy = DateTime.Now.ToString("yyyy");
|
||||
string Empty_008 = yyMMdd + "s" + yyyy + " 000 kor ▲";
|
||||
string Empty_text = string.Format(
|
||||
$"008\t {Empty_008.Replace("▲", "")}" +
|
||||
"020\t \t▼a▼c▲\n" +
|
||||
"056\t \t▼a▼2▲\n" +
|
||||
"100\t \t▼a▲\n" +
|
||||
"245\t \t▼a▼d▲\n" +
|
||||
"260\t \t▼b▲\n" +
|
||||
"300\t \t▼a▼c▲\n" +
|
||||
"653\t \t▼a▲\n" +
|
||||
"700\t \t▼a▲\n" +
|
||||
"950\t \t▼b▲\n");
|
||||
|
||||
this.marcEditorControl1.SetRemark(string.Empty, string.Empty);
|
||||
return Empty_text;
|
||||
}
|
||||
|
||||
|
||||
#region SaveSub
|
||||
|
||||
/// <summary>
|
||||
/// 마크DB에 UPDATE해주는 함수
|
||||
/// </summary>
|
||||
/// <param name="Table">테이블 이름</param>
|
||||
/// <param name="MarcIndex">마크 인덱스 번호</param>
|
||||
/// <param name="oriMarc">한줄짜리 마크</param>
|
||||
/// <param name="grade">마크 등급</param>
|
||||
/// <param name="tag056">분류기호</param>
|
||||
/// <param name="date">저장시각 yyyy-MM-dd HH:mm:ss</param>
|
||||
/// <param name="IsCovertDate">덮어씌울지 유무</param>
|
||||
void UpdateMarc(string Table, string MarcIndex, string oriMarc, int grade, string tag056, string date, bool IsCovertDate, MacEditorParameter param)
|
||||
{
|
||||
string[] EditTable =
|
||||
{
|
||||
"compidx", "marc", "marc_chk","marc1", "marc_chk1", "비고1",
|
||||
"비고2", "division", "008tag", "date", "user",
|
||||
"grade"
|
||||
};
|
||||
string[] EditColumn =
|
||||
{
|
||||
PUB.user.CompanyIdx, oriMarc, "1",mOldMarc, "0", param.Remark1,
|
||||
param.Remark2, tag056, param.text008, date, PUB.user.UserName,
|
||||
grade.ToString()
|
||||
};
|
||||
string[] SearchTable = { "idx", "compidx" };
|
||||
string[] SearchColumn = { MarcIndex, PUB.user.CompanyIdx };
|
||||
|
||||
//int marcChk = subMarcChk(Table, MarcIndex);
|
||||
//if (IsCovertDate)
|
||||
// marcChk--;
|
||||
|
||||
//switch (marcChk)
|
||||
//{
|
||||
// case 0:
|
||||
// EditTable[1] = "marc1";
|
||||
// EditTable[2] = "marc_chk1";
|
||||
// EditTable[3] = "marc_chk";
|
||||
// break;
|
||||
// case 1:
|
||||
// EditTable[1] = "marc2";
|
||||
// EditTable[2] = "marc_chk2";
|
||||
// EditTable[3] = "marc_chk1";
|
||||
// break;
|
||||
// case 2:
|
||||
// EditTable[1] = "marc";
|
||||
// EditTable[2] = "marc_chk";
|
||||
// EditTable[3] = "marc_chk2";
|
||||
// break;
|
||||
// default:
|
||||
// EditTable[1] = "marc";
|
||||
// EditTable[2] = "marc_chk";
|
||||
// EditTable[3] = "marc_chk2";
|
||||
// break;
|
||||
//}
|
||||
string UpCMD = db.More_Update(Table, EditTable, EditColumn, SearchTable, SearchColumn);
|
||||
PUB.log.Add("ADDMarcUPDATE", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, UpCMD.Replace("\r", " ").Replace("\n", " ")));
|
||||
Helper_DB.ExcuteNonQuery(UpCMD);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 마크DB에 INSERT해주는 함수
|
||||
/// </summary>
|
||||
/// <param name="Table">테이블 이름</param>
|
||||
/// <param name="BookData">0:ISBN 1:서명 2:저자 3:출판사 4:정가</param>
|
||||
/// <param name="oriMarc">한줄짜리 마크</param>
|
||||
/// <param name="grade">마크 등급</param>
|
||||
/// <param name="tag056">분류기호</param>
|
||||
/// <param name="date">저장시각 yyyy-MM-dd HH:mm:ss</param>
|
||||
void InsertMarc(string Table, string[] BookData, string oriMarc, int grade, string tag056, string date, MacEditorParameter param)
|
||||
{
|
||||
string[] InsertTable =
|
||||
{
|
||||
"ISBN", "서명", "저자", "출판사", "가격",
|
||||
"marc", "비고1", "비고2", "grade", "marc_chk",
|
||||
"user", "division", "008tag", "date", "compidx"
|
||||
};
|
||||
string[] InsertColumn =
|
||||
{
|
||||
BookData[0], BookData[1], BookData[2], BookData[3], BookData[4],
|
||||
oriMarc, param.Remark1, param.Remark2, grade.ToString(), "1",
|
||||
PUB.user.UserName, tag056, param.text008, date, PUB.user.CompanyIdx
|
||||
};
|
||||
|
||||
string InCMD = db.DB_INSERT(Table, InsertTable, InsertColumn);
|
||||
PUB.log.Add("ADDMarcINSERT", string.Format("{0}({1}) : {2}", PUB.user.UserName, PUB.user.CompanyIdx, InCMD.Replace("\r", " ").Replace("\n", " ")));
|
||||
Helper_DB.ExcuteNonQuery(InCMD);
|
||||
}
|
||||
|
||||
/// <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 != PUB.user.UserName)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private TimeSpan CheckDate(string LastDate, string SaveDate)
|
||||
{
|
||||
DateTime Last = Convert.ToDateTime(LastDate);
|
||||
DateTime Save = Convert.ToDateTime(SaveDate);
|
||||
|
||||
return Last - Save;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 필수태그 검사
|
||||
/// </summary>
|
||||
/// <param name="orimarc">한줄짜리 마크</param>
|
||||
/// <returns>필수태그 없을시 false 반환</returns>
|
||||
private bool isMustTag(string orimarc)
|
||||
{
|
||||
string[] SearchTag = { "056a", "0562", "245a", "245d", "260a", "260c", "300a", "300c", "653a" };
|
||||
string[] Tag = st.Take_Tag(orimarc, SearchTag);
|
||||
|
||||
int count = 0;
|
||||
string msg = "";
|
||||
bool isTag = true;
|
||||
foreach (string tag in Tag)
|
||||
{
|
||||
if (tag == "")
|
||||
{
|
||||
msg += SearchTag[count] + " ";
|
||||
isTag = false;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
if (!isTag)
|
||||
{
|
||||
MessageBox.Show(msg + "태그가 없습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is1XX = false;
|
||||
string[] AuthorTag = { "100a", "110a", "111a" };
|
||||
Tag = st.Take_Tag(orimarc, AuthorTag);
|
||||
foreach (string author in Tag)
|
||||
{
|
||||
if (author != "")
|
||||
is1XX = true;
|
||||
}
|
||||
if (!is1XX)
|
||||
{
|
||||
MessageBox.Show("기본표목이 존재하지않습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is7XX = false;
|
||||
AuthorTag[0] = "700a";
|
||||
AuthorTag[1] = "710a";
|
||||
AuthorTag[2] = "711a";
|
||||
Tag = st.Take_Tag(orimarc, AuthorTag);
|
||||
|
||||
foreach (string author in Tag)
|
||||
{
|
||||
if (author != "")
|
||||
is7XX = true;
|
||||
}
|
||||
|
||||
if (!is7XX)
|
||||
{
|
||||
MessageBox.Show("부출표목이 존재하지않습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 관련 도서 정보를 가져옴
|
||||
/// </summary>
|
||||
/// <param name="ViewMarc">뷰형태의 마크</param>
|
||||
/// <returns>0:ISBN 1:서명 2:저자 3:출판사 4:정가</returns>
|
||||
string[] GetBookData(string ViewMarc)
|
||||
{
|
||||
// ISBN, BookName, Author, BookComp, Price
|
||||
string[] result = { "", "", "", "", "" };
|
||||
bool IsISBN = false;
|
||||
string[] TargetArr = ViewMarc.Split('\n');
|
||||
foreach (string Target in TargetArr)
|
||||
{
|
||||
string[] tmp = Target.Replace("▲", "").Split('\t');
|
||||
// 0:ISBN 4:Price
|
||||
if (tmp[0] == "020" && !IsISBN)
|
||||
{
|
||||
IsISBN = true;
|
||||
result[0] = GetMiddelString(tmp[2], "▼a", "▼");
|
||||
result[4] = GetMiddelString(tmp[2], "▼c", "▼");
|
||||
}
|
||||
|
||||
// 2:Author
|
||||
if (tmp[0] == "100")
|
||||
result[2] = GetMiddelString(tmp[2], "▼a", "▼");
|
||||
else if (tmp[0] == "110")
|
||||
result[2] = GetMiddelString(tmp[2], "▼a", "▼");
|
||||
else if (tmp[0] == "111")
|
||||
result[2] = GetMiddelString(tmp[2], "▼a", "▼");
|
||||
|
||||
// 1:BookName
|
||||
if (tmp[0] == "245")
|
||||
result[1] = GetMiddelString(tmp[2], "▼a", "▼");
|
||||
|
||||
// 3:BookComp
|
||||
if (tmp[0] == "300")
|
||||
result[3] = GetMiddelString(tmp[2], "▼b", "▼");
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
string Tag056(string marc,MacEditorParameter param)
|
||||
{
|
||||
// string marc = richTextBox1.Text;
|
||||
string[] temp = marc.Split('\n');
|
||||
List<string> target = temp.ToList();
|
||||
bool isEight = false;
|
||||
bool eight_chk = false;
|
||||
string tag056 = string.Empty;
|
||||
int count = 0;
|
||||
|
||||
for (int a = 0; a < target.Count - 1; a++)
|
||||
{
|
||||
string[] tmp = target[a].Split('\t');
|
||||
string tag = tmp[0];
|
||||
if (tag == "") break;
|
||||
int eight = Convert.ToInt32(tag.Substring(0, 3));
|
||||
if (eight == 008)
|
||||
{
|
||||
count = a;
|
||||
eight_chk = true;
|
||||
isEight = true;
|
||||
}
|
||||
else if (eight > 008 && !eight_chk)
|
||||
{
|
||||
count = a;
|
||||
eight_chk = true;
|
||||
}
|
||||
if (tag == "056")
|
||||
tag056 = GetMiddelString(tmp[2], "▼a", "▼");
|
||||
}
|
||||
if (!isEight)
|
||||
target.Insert(count, string.Format("{0}\t{1}\t{2}▲", "008", " ", param.text008));
|
||||
|
||||
//richTextBox1.Text = string.Join("\n", target.ToArray());
|
||||
return tag056;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 문자와 문자사이의 값 가져오기
|
||||
/// </summary>
|
||||
/// <param name="str">대상 문자열</param>
|
||||
/// <param name="begin">시작 문자열</param>
|
||||
/// <param name="end">마지막 문자열</param>
|
||||
/// <param name="TagNum">불러올 태그 번호</param>
|
||||
/// <returns>문자 사이값</returns>
|
||||
public string GetMiddelString(string str, string begin, string end, string TagNum = "")
|
||||
{
|
||||
string result = "";
|
||||
|
||||
if (string.IsNullOrEmpty(str) || str == "")
|
||||
return result;
|
||||
|
||||
int count = 0;
|
||||
bool loop = false;
|
||||
|
||||
for (int a = count; a < str.Length; a++)
|
||||
{
|
||||
count = str.IndexOf(begin);
|
||||
if (count > -1)
|
||||
{
|
||||
str = str.Substring(count + begin.Length);
|
||||
if (loop)
|
||||
// 여러 태그들 구분을 지어줌.
|
||||
result += "▽";
|
||||
|
||||
if (str.IndexOf(end) > -1)
|
||||
result += str.Substring(0, str.IndexOf(end));
|
||||
else
|
||||
result += str;
|
||||
|
||||
result = TrimEndGubun(result, TagNum);
|
||||
}
|
||||
else
|
||||
break;
|
||||
|
||||
loop = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
string TrimEndGubun(string str, string TagNum)
|
||||
{
|
||||
char[] gu = { '.', ',', ':', ';', '/', ' ' };
|
||||
if (TagNum == "300" || TagNum == "300a")
|
||||
{
|
||||
str = str.Trim();
|
||||
if (TagNum == "300a")
|
||||
{
|
||||
gu = new char[] { '.', ',', '=', ':', ';', '/', '+', ' ' };
|
||||
for (int i = 0; i < gu.Length; i++)
|
||||
{
|
||||
str = str.TrimEnd(gu[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (str.Contains("ill."))
|
||||
return str;
|
||||
if (str.Contains("p."))
|
||||
return str;
|
||||
}
|
||||
|
||||
if (TagNum == "710" || TagNum == "910")
|
||||
return str;
|
||||
|
||||
|
||||
if (TagNum == "245") gu = new char[] { '.', ':', ';', '/', ' ' };
|
||||
if (TagNum == "245a") gu = new char[] { '.', ',', '=', ':', ';', '/', ' ' };
|
||||
for (int i = 0; i < gu.Length; i++)
|
||||
{
|
||||
str = str.TrimEnd(gu[i]);
|
||||
}
|
||||
//foreach (char gubun in gu)
|
||||
//{
|
||||
// if (str.Length < 1) continue;
|
||||
// if (str[str.Length - 1] == gubun)
|
||||
// {
|
||||
// str = str.Remove(str.Length - 1);
|
||||
// str = str.Trim();
|
||||
// }
|
||||
//}
|
||||
|
||||
return str;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
private void Btn_SearchKolis_Click(object sender, EventArgs e)
|
||||
{
|
||||
AddMarc_FillBlank af = new AddMarc_FillBlank(this);
|
||||
af.Show();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
123
unimarc/unimarc/마크/AddMarc2.resx
Normal file
123
unimarc/unimarc/마크/AddMarc2.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>32</value>
|
||||
</metadata>
|
||||
</root>
|
||||
2
unimarc/unimarc/마크/AddMarc_FillBlank.Designer.cs
generated
2
unimarc/unimarc/마크/AddMarc_FillBlank.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class AddMarc_FillBlank
|
||||
{
|
||||
|
||||
@@ -8,19 +8,25 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class AddMarc_FillBlank : Form
|
||||
{
|
||||
AddMarc am;
|
||||
AddMarc2 am2;
|
||||
public AddMarc_FillBlank(AddMarc _am)
|
||||
{
|
||||
InitializeComponent();
|
||||
am = _am;
|
||||
}
|
||||
|
||||
public AddMarc_FillBlank(AddMarc2 _am)
|
||||
{
|
||||
InitializeComponent();
|
||||
am2 = _am;
|
||||
}
|
||||
private void AddMarc_FillBlank_Load(object sender, EventArgs e)
|
||||
{
|
||||
webBrowser1.ScriptErrorsSuppressed = true;
|
||||
webBrowser1.Navigate("https://nl.go.kr/kolisnet/search/searchResultAllList.do?");
|
||||
}
|
||||
|
||||
@@ -108,7 +114,10 @@ namespace UniMarc.마크
|
||||
if (ary[1].Length != 2) ary[1].PadRight(2);
|
||||
tmp += String.Join("\t", ary) + "\n";
|
||||
}
|
||||
if(am != null)
|
||||
am.richTextBox1.Text = tmp;
|
||||
if(am2 != null)
|
||||
am2.SetKolisValueApply(tmp);
|
||||
}
|
||||
|
||||
private void Btn_Close_Click(object sender, EventArgs e)
|
||||
|
||||
2
unimarc/unimarc/마크/All_Book_Detail.Designer.cs
generated
2
unimarc/unimarc/마크/All_Book_Detail.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class All_Book_Detail
|
||||
{
|
||||
|
||||
@@ -7,10 +7,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1.Mac;
|
||||
using WindowsFormsApp1;
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class All_Book_Detail : Form
|
||||
{
|
||||
@@ -22,14 +20,12 @@ namespace UniMarc.마크
|
||||
/// </summary>
|
||||
public string[] data = { "", "", "", "" };
|
||||
|
||||
string compidx;
|
||||
Helper_DB db = new Helper_DB();
|
||||
All_Book_manage manage;
|
||||
public All_Book_Detail(All_Book_manage _manage)
|
||||
{
|
||||
InitializeComponent();
|
||||
manage = _manage;
|
||||
compidx = manage.compidx;
|
||||
}
|
||||
|
||||
private void All_Book_Detail_Load(object sender, EventArgs e)
|
||||
|
||||
2
unimarc/unimarc/마크/All_Book_manage.Designer.cs
generated
2
unimarc/unimarc/마크/All_Book_manage.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace WindowsFormsApp1.Mac
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class All_Book_manage
|
||||
{
|
||||
|
||||
@@ -7,22 +7,17 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using UniMarc.마크;
|
||||
|
||||
namespace WindowsFormsApp1.Mac
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class All_Book_manage : Form
|
||||
{
|
||||
public string compidx;
|
||||
public string charge;
|
||||
Helper_DB db = new Helper_DB();
|
||||
Main main;
|
||||
public All_Book_manage(Main _main)
|
||||
{
|
||||
InitializeComponent();
|
||||
main = _main;
|
||||
compidx = main.com_idx;
|
||||
charge = main.User;
|
||||
}
|
||||
|
||||
private void All_Book_manage_Load(object sender, EventArgs e)
|
||||
@@ -36,7 +31,7 @@ namespace WindowsFormsApp1.Mac
|
||||
string text = textBox1.Text;
|
||||
// 세트명 세트ISBN 세트수량 세트정가 저자 출판사 추가자
|
||||
string Area_db = "`set_name`, `set_isbn`, `set_count`, `set_price`, `author`, `book_comp`, `charge`";
|
||||
string cmd = db.DB_Contains("Set_Book", compidx, "set_name", text, Area_db);
|
||||
string cmd = db.DB_Contains("Set_Book", PUB.user.CompanyIdx, "set_name", text, Area_db);
|
||||
string db_res = db.DB_Send_CMD_Search(cmd);
|
||||
string[] db_data = db_res.Split('|');
|
||||
input_Grid(db_data);
|
||||
@@ -176,8 +171,8 @@ namespace WindowsFormsApp1.Mac
|
||||
dataGridView1.Rows[V_idx].Cells["set_count"].Value.ToString(),
|
||||
dataGridView1.Rows[V_idx].Cells["set_price"].Value.ToString() };
|
||||
|
||||
string cmd = db.DB_Delete_No_Limit("Set_Book", "compidx", compidx, delete_area, delete_data);
|
||||
db.DB_Send_CMD_reVoid(cmd);
|
||||
string cmd = db.DB_Delete_No_Limit("Set_Book", "compidx", PUB.user.CompanyIdx, delete_area, delete_data);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
}
|
||||
|
||||
btn_Search_Click(null, null);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class All_Book_manage_Add
|
||||
{
|
||||
|
||||
@@ -7,10 +7,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1;
|
||||
using WindowsFormsApp1.Mac;
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class All_Book_manage_Add : Form
|
||||
{
|
||||
@@ -75,7 +73,7 @@ namespace UniMarc.마크
|
||||
"set_name", "set_count", "set_isbn", "set_price", "set_pubyear",
|
||||
"book_name", "series_title", "sub_title", "series_num", "author", "book_comp", "isbn", "price",
|
||||
"charge" };
|
||||
string[] insert_col = { manage.compidx,
|
||||
string[] insert_col = { PUB.user.CompanyIdx,
|
||||
tb_setName.Text, tb_setCount.Text, tb_setISBN.Text, tb_setPrice.Text, tb_setYear.Text,
|
||||
dataGridView1.Rows[a].Cells["book_name"].Value.ToString(),
|
||||
dataGridView1.Rows[a].Cells["series_title"].Value.ToString(),
|
||||
@@ -84,10 +82,10 @@ namespace UniMarc.마크
|
||||
dataGridView1.Rows[a].Cells["author"].Value.ToString(),
|
||||
dataGridView1.Rows[a].Cells["book_comp"].Value.ToString(),
|
||||
dataGridView1.Rows[a].Cells["ISBN"].Value.ToString(),
|
||||
dataGridView1.Rows[a].Cells["price"].Value.ToString(), manage.charge };
|
||||
dataGridView1.Rows[a].Cells["price"].Value.ToString(), PUB.user.UserName };
|
||||
|
||||
string Incmd = db.DB_INSERT("Set_Book", insert_tbl, insert_col);
|
||||
db.DB_Send_CMD_reVoid(Incmd);
|
||||
Helper_DB.ExcuteNonQuery(Incmd);
|
||||
}
|
||||
|
||||
MessageBox.Show("저장완료");
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class All_Book_manage_Edit
|
||||
{
|
||||
|
||||
@@ -7,21 +7,17 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1;
|
||||
using WindowsFormsApp1.Mac;
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class All_Book_manage_Edit : Form
|
||||
{
|
||||
All_Book_manage manage;
|
||||
Helper_DB db = new Helper_DB();
|
||||
string compidx;
|
||||
public All_Book_manage_Edit(All_Book_manage _manage)
|
||||
{
|
||||
InitializeComponent();
|
||||
manage = _manage;
|
||||
compidx = manage.compidx;
|
||||
}
|
||||
|
||||
private void All_Book_manage_Edit_Load(object sender, EventArgs e)
|
||||
@@ -48,7 +44,7 @@ namespace UniMarc.마크
|
||||
{
|
||||
string table = "Set_Book";
|
||||
string[] sear_tbl = { "compidx", "set_name", "set_isbn", "set_count", "set_price" };
|
||||
string[] sear_col = { compidx,
|
||||
string[] sear_col = { PUB.user.CompanyIdx,
|
||||
tb_set_name_old.Text,
|
||||
tb_set_isbn_old.Text,
|
||||
tb_set_count_old.Text,
|
||||
@@ -61,7 +57,7 @@ namespace UniMarc.마크
|
||||
tb_set_price_new.Text };
|
||||
|
||||
string U_cmd = db.More_Update(table, edit_tbl, edit_col, sear_tbl, sear_col);
|
||||
db.DB_Send_CMD_reVoid(U_cmd);
|
||||
Helper_DB.ExcuteNonQuery(U_cmd);
|
||||
MessageBox.Show("변경되었습니다!");
|
||||
manage.btn_Search_Click(null, null);
|
||||
this.Close();
|
||||
|
||||
2
unimarc/unimarc/마크/CD_LP.Designer.cs
generated
2
unimarc/unimarc/마크/CD_LP.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class CD_LP
|
||||
{
|
||||
|
||||
@@ -7,16 +7,13 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1;
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class CD_LP : Form
|
||||
{
|
||||
Main main;
|
||||
Helper_DB db = new Helper_DB();
|
||||
string compidx;
|
||||
string name;
|
||||
public CD_LP(Main _m)
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -26,8 +23,6 @@ namespace UniMarc.마크
|
||||
private void CD_LP_Load(object sender, EventArgs e)
|
||||
{
|
||||
db.DBcon();
|
||||
compidx = main.com_idx;
|
||||
name = main.User;
|
||||
|
||||
string[] Site = { "교보문고", "알라딘" };
|
||||
cb_SiteCon.Items.AddRange(Site);
|
||||
@@ -62,7 +57,7 @@ namespace UniMarc.마크
|
||||
{
|
||||
CD_LP_SelectList selectList = new CD_LP_SelectList(this);
|
||||
selectList.Show();
|
||||
selectList.LoadList(compidx);
|
||||
selectList.LoadList(PUB.user.CompanyIdx);
|
||||
dataGridView1.Rows.Clear();
|
||||
}
|
||||
|
||||
@@ -74,7 +69,7 @@ namespace UniMarc.마크
|
||||
string Table = "DVD_List_Product";
|
||||
string Area = "`idx`, `num`, `code`, `title`, `artist`, `comp`, `price`, `m_idx`";
|
||||
string[] Search_Table = { "compidx", "listname", "date" };
|
||||
string[] Search_Column = { compidx, ListName, date };
|
||||
string[] Search_Column = { PUB.user.CompanyIdx, ListName, date };
|
||||
|
||||
string cmd = db.More_DB_Search(Table, Search_Table, Search_Column, Area);
|
||||
string res = db.DB_Send_CMD_Search(cmd);
|
||||
@@ -143,7 +138,7 @@ namespace UniMarc.마크
|
||||
int row = dataGridView1.CurrentRow.Index;
|
||||
string midx = dataGridView1.Rows[row].Cells["m_idx"].Value.ToString();
|
||||
string code = dataGridView1.Rows[row].Cells["code"].Value.ToString();
|
||||
string user = Properties.Settings.Default.User;
|
||||
string user = PUB.user.UserName;
|
||||
string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
string etcData1 = etc1.Text;
|
||||
@@ -169,7 +164,7 @@ namespace UniMarc.마크
|
||||
string[] SearchCol = { "idx" };
|
||||
string[] SearchData = { midx };
|
||||
|
||||
db.DB_Send_CMD_reVoid(db.More_Update("DVD_Marc", EditCol, EditData, SearchCol, SearchData));
|
||||
Helper_DB.ExcuteNonQuery(db.More_Update("DVD_Marc", EditCol, EditData, SearchCol, SearchData));
|
||||
dataGridView1.Rows[row].Cells["marc"].Value = orimarc;
|
||||
}
|
||||
|
||||
@@ -301,7 +296,7 @@ namespace UniMarc.마크
|
||||
|
||||
int row = dataGridView1.CurrentRow.Index;
|
||||
string code = dataGridView1.Rows[row].Cells["code"].Value.ToString();
|
||||
string user = Properties.Settings.Default.User;
|
||||
string user = PUB.user.UserName;// Properties.Settings.Default.User;
|
||||
string date = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
|
||||
@@ -338,7 +333,7 @@ namespace UniMarc.마크
|
||||
|
||||
string[] InsertCol = { "Code", "user", "date", "Marc", "etc1", "etc2" };
|
||||
string[] InsertData = { code, user, date, orimarc, etcData1, etcData2 };
|
||||
db.DB_Send_CMD_reVoid(db.DB_INSERT("DVD_Marc", InsertCol, InsertData));
|
||||
Helper_DB.ExcuteNonQuery(db.DB_INSERT("DVD_Marc", InsertCol, InsertData));
|
||||
|
||||
dataGridView1.Rows[row].Cells["m_idx"].Value =
|
||||
db.DB_Send_CMD_Search(
|
||||
@@ -513,10 +508,10 @@ namespace UniMarc.마크
|
||||
string[] Insert_col = { "compidx", "listname", "date", "user", "num", "code", "title", "artist", "comp", "price" };
|
||||
string[] Insert_data =
|
||||
{
|
||||
compidx,
|
||||
PUB.user.CompanyIdx,
|
||||
lbl_ListTitle.Text,
|
||||
lbl_date.Text,
|
||||
Properties.Settings.Default.User,
|
||||
PUB.user.UserName,
|
||||
dataGridView1.Rows[a].Cells["num"].Value.ToString(),
|
||||
dataGridView1.Rows[a].Cells["code"].Value.ToString(),
|
||||
dataGridView1.Rows[a].Cells["title"].Value.ToString(),
|
||||
@@ -524,7 +519,7 @@ namespace UniMarc.마크
|
||||
dataGridView1.Rows[a].Cells["comp"].Value.ToString(),
|
||||
dataGridView1.Rows[a].Cells["price"].Value.ToString()
|
||||
};
|
||||
db.DB_Send_CMD_reVoid(db.DB_INSERT("DVD_List_Product", Insert_col, Insert_data));
|
||||
Helper_DB.ExcuteNonQuery(db.DB_INSERT("DVD_List_Product", Insert_col, Insert_data));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -532,7 +527,7 @@ namespace UniMarc.마크
|
||||
|
||||
for (int a = 0; a < DeleteIndex.Count; a++)
|
||||
{
|
||||
db.DB_Send_CMD_reVoid(db.DB_Delete("DVD_List_Product", "compidx", compidx, "idx", DeleteIndex[a]));
|
||||
Helper_DB.ExcuteNonQuery(db.DB_Delete("DVD_List_Product", "compidx", PUB.user.CompanyIdx, "idx", DeleteIndex[a]));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
unimarc/unimarc/마크/CD_LP_AddList.Designer.cs
generated
2
unimarc/unimarc/마크/CD_LP_AddList.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class CD_LP_AddList
|
||||
{
|
||||
|
||||
@@ -7,9 +7,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1;
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class CD_LP_AddList : Form
|
||||
{
|
||||
@@ -49,8 +48,8 @@ namespace UniMarc.마크
|
||||
{
|
||||
string listName = tb_ExpectList.Text;
|
||||
string date = DateTime.Now.ToString("yyyy-MM-dd");
|
||||
string compidx = Properties.Settings.Default.compidx;
|
||||
string user = Properties.Settings.Default.User;
|
||||
string compidx = PUB.user.CompanyIdx;// Properties.Settings.Default.compidx;
|
||||
string user = PUB.user.UserName;
|
||||
|
||||
if (listName == "") {
|
||||
MessageBox.Show("목록명이 비어있습니다!");
|
||||
@@ -85,8 +84,8 @@ namespace UniMarc.마크
|
||||
ProductCMD = ProductCMD.TrimEnd(',');
|
||||
ProductCMD += ";";
|
||||
|
||||
db.DB_Send_CMD_reVoid(listCMD);
|
||||
db.DB_Send_CMD_reVoid(ProductCMD);
|
||||
Helper_DB.ExcuteNonQuery(listCMD);
|
||||
Helper_DB.ExcuteNonQuery(ProductCMD);
|
||||
|
||||
MessageBox.Show("저장되었습니다.");
|
||||
}
|
||||
|
||||
2
unimarc/unimarc/마크/CD_LP_List.Designer.cs
generated
2
unimarc/unimarc/마크/CD_LP_List.Designer.cs
generated
@@ -1,4 +1,4 @@
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class CD_LP_List
|
||||
{
|
||||
|
||||
@@ -7,10 +7,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1;
|
||||
using WindowsFormsApp1.Mac;
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class CD_LP_List : Form
|
||||
{
|
||||
@@ -26,7 +24,7 @@ namespace UniMarc.마크
|
||||
private void CD_LP_List_Load(object sender, EventArgs e)
|
||||
{
|
||||
db.DBcon();
|
||||
compidx = Properties.Settings.Default.compidx;
|
||||
compidx = PUB.user.CompanyIdx;// Properties.Settings.Default.compidx;
|
||||
}
|
||||
|
||||
private void Btn_SelectList_Click(object sender, EventArgs e)
|
||||
@@ -365,7 +363,7 @@ namespace UniMarc.마크
|
||||
for (int a = SelectIndex.Count - 1; a >= 0; a--)
|
||||
{
|
||||
dataGridView1.Rows.RemoveAt(SelectIndex[a]);
|
||||
db.DB_Send_CMD_reVoid(
|
||||
Helper_DB.ExcuteNonQuery(
|
||||
db.DB_Delete("DVD_List_Product", "idx", dataGridView1.Rows[SelectIndex[a]].Cells["idx"].Value.ToString(), "compidx", compidx)
|
||||
);
|
||||
}
|
||||
|
||||
2
unimarc/unimarc/마크/CD_LP_SelectList.Designer.cs
generated
2
unimarc/unimarc/마크/CD_LP_SelectList.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class CD_LP_SelectList
|
||||
{
|
||||
|
||||
@@ -7,9 +7,8 @@ using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1;
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class CD_LP_SelectList : Form
|
||||
{
|
||||
@@ -58,8 +57,9 @@ namespace UniMarc.마크
|
||||
}
|
||||
}
|
||||
|
||||
public void LoadList(string compidx, int Filter, string Target)
|
||||
public void LoadList( int Filter, string Target)
|
||||
{
|
||||
var compidx = PUB.user.CompanyIdx;
|
||||
string Area = "`idx`, `listname`, `date`, `user`";
|
||||
string Table = "DVD_List";
|
||||
string FilterTable;
|
||||
@@ -103,10 +103,10 @@ namespace UniMarc.마크
|
||||
if (MessageBox.Show("정말 삭제하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.Yes)
|
||||
{
|
||||
string idx = dataGridView1.Rows[dataGridView1.CurrentRow.Index].Cells["idx"].Value.ToString();
|
||||
string compidx = Properties.Settings.Default.compidx;
|
||||
//string compidx = Properties.Settings.Default.compidx;
|
||||
|
||||
string cmd = db.DB_Delete("DVD_List", "compidx", compidx, "idx", idx);
|
||||
db.DB_Send_CMD_reVoid(cmd);
|
||||
string cmd = db.DB_Delete("DVD_List", "compidx", PUB.user.CompanyIdx, "idx", idx);
|
||||
Helper_DB.ExcuteNonQuery(cmd);
|
||||
|
||||
MessageBox.Show("삭제되었습니다.");
|
||||
}
|
||||
@@ -121,10 +121,10 @@ namespace UniMarc.마크
|
||||
{
|
||||
if (e.KeyCode == Keys.Enter)
|
||||
{
|
||||
string compidx = Properties.Settings.Default.compidx;
|
||||
//string compidx = Properties.Settings.Default.compidx;
|
||||
int ComboIndex = cb_Filter.SelectedIndex;
|
||||
string Target = tb_Search.Text;
|
||||
LoadList(compidx, ComboIndex, Target);
|
||||
LoadList( ComboIndex, Target);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
2
unimarc/unimarc/마크/CD_LP_Sub.Designer.cs
generated
2
unimarc/unimarc/마크/CD_LP_Sub.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class CD_LP_Sub
|
||||
{
|
||||
|
||||
@@ -10,9 +10,8 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using WindowsFormsApp1;
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
public partial class CD_LP_Sub : Form
|
||||
{
|
||||
|
||||
2
unimarc/unimarc/마크/Check_Copy_Login.Designer.cs
generated
2
unimarc/unimarc/마크/Check_Copy_Login.Designer.cs
generated
@@ -1,5 +1,5 @@
|
||||
|
||||
namespace UniMarc.마크
|
||||
namespace UniMarc
|
||||
{
|
||||
partial class Check_Copy_Login
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user