..
This commit is contained in:
@@ -615,7 +615,7 @@ namespace Project.Dialog
|
||||
{
|
||||
var sid = this.tbSID.Text.Trim();
|
||||
|
||||
var dr = taSID.GetBySID(PUB.MCCode, sid).FirstOrDefault();// db.Component_Reel_SID_Information.Where(t => t.SID == sid).FirstOrDefault();
|
||||
var dr = taSID.GetBySID(PUB.MCCode, sid).FirstOrDefault();
|
||||
var drP = taPRN.GetBySID(PUB.MCCode, sid).FirstOrDefault();
|
||||
|
||||
if (dr == null) return;
|
||||
@@ -701,11 +701,7 @@ namespace Project.Dialog
|
||||
var preDatas = DBHelper.Get(sql, ps);
|
||||
if (preDatas.Rows.Count > 0) preData = preDatas.Rows[0] as DataSet1.K4EE_Component_Reel_ResultRow;
|
||||
|
||||
//var preData = db2.Component_Reel_Result.AsNoTracking().Where(t =>
|
||||
//t.JTYPE == PUB.Result.JobType2 &&
|
||||
//t.SID == sid &&
|
||||
//string.IsNullOrEmpty(t.QR) == false &&
|
||||
//t.STIME >= sd).OrderByDescending(t => t.wdate).FirstOrDefault();
|
||||
|
||||
|
||||
//기존자료가 없다면 취소
|
||||
if (preData == null) return false;
|
||||
@@ -1625,7 +1621,7 @@ namespace Project.Dialog
|
||||
{
|
||||
//변경된 값만 저장여부를 확인할 것이므로 기존 값을 모두 가져온다
|
||||
var SQL = "select top 1 " + string.Join(",", columns.Select(t => "isnull([" + t.Key + "],'') as " + t.Key + "")) +
|
||||
" from Component_Reel_SID_Information WITH(NOLOCK)";
|
||||
" from K4EE_Component_Reel_SID_Information WITH(NOLOCK)";
|
||||
|
||||
var WSQL = $" where MC='{PUB.MCCode}'";
|
||||
for (int i = 0; i < wheres.Count; i++)
|
||||
@@ -1687,7 +1683,7 @@ namespace Project.Dialog
|
||||
{
|
||||
|
||||
//check double data 220706
|
||||
var CSQL = "select count(*) from Component_Reel_SID_Information WITH(NOLOCK) ";
|
||||
var CSQL = "select count(*) from K4EE_Component_Reel_SID_Information WITH(NOLOCK) ";
|
||||
CSQL += WSQL;
|
||||
CMD.CommandText = CSQL;
|
||||
var cnt = int.Parse(CMD.ExecuteScalar().ToString());
|
||||
@@ -1705,7 +1701,7 @@ namespace Project.Dialog
|
||||
}
|
||||
else
|
||||
{
|
||||
var USQL = $"update Component_Reel_SID_Information set [MC]='{PUB.MCCode}'," +
|
||||
var USQL = $"update K4EE_Component_Reel_SID_Information set [MC]='{PUB.MCCode}'," +
|
||||
string.Join(",", UpdateTarget.Select(t => "[" + t.Key + "]='" + t.Value + "'"));
|
||||
|
||||
USQL += WSQL;
|
||||
@@ -1735,7 +1731,7 @@ namespace Project.Dialog
|
||||
var dlg = UTIL.MsgQ(dlgMsg);
|
||||
if (dlg == DialogResult.Yes)
|
||||
{
|
||||
var ISQL = $"insert into Component_Reel_SID_Information ([MC],wdate," +
|
||||
var ISQL = $"insert into K4EE_Component_Reel_SID_Information ([MC],wdate," +
|
||||
string.Join(",", InsertTarget.Select(t => "[" + t.Key + "]")) + ") values(" +
|
||||
$"'{PUB.MCCode}',getdate()," +
|
||||
string.Join(",", InsertTarget.Select(t => "'" + t.Value.Replace("'", "''") + "'")) + ")";
|
||||
@@ -1766,7 +1762,7 @@ namespace Project.Dialog
|
||||
void ServerWriteCNV(Dictionary<string, string> columns, Dictionary<string, string> wheres)
|
||||
{
|
||||
//변경된 값만 저장여부를 확인할 것이므로 기존 값을 모두 가져온다
|
||||
var tableName = "Component_Reel_SID_Convert";
|
||||
var tableName = "K4EE_Component_Reel_SID_Convert";
|
||||
var SQL = "select top 1 " + string.Join(",", columns.Select(t => "isnull([" + t.Key + "],'') as " + t.Key + "")) +
|
||||
$" from {tableName} WITH(NOLOCK) ";
|
||||
|
||||
@@ -1916,7 +1912,7 @@ namespace Project.Dialog
|
||||
{
|
||||
//변경된 값만 저장여부를 확인할 것이므로 기존 값을 모두 가져온다
|
||||
var SQL = "select top 1 " + string.Join(",", columns.Select(t => "isnull([" + t.Key + "],'') as " + t.Key + "")) +
|
||||
" from Component_Reel_SID_Convert WITH(NOLOCK) ";
|
||||
" from K4EE_Component_Reel_SID_Convert WITH(NOLOCK) ";
|
||||
|
||||
var WSQL = $" where (MC is null or MC='{PUB.MCCode}')";
|
||||
for (int i = 0; i < wheres.Count; i++)
|
||||
@@ -1980,7 +1976,7 @@ namespace Project.Dialog
|
||||
{
|
||||
|
||||
//check double data 220706
|
||||
var CSQL = "select count(*) from Component_Reel_SID_Convert WITH(NOLOCK) ";
|
||||
var CSQL = "select count(*) from K4EE_Component_Reel_SID_Convert WITH(NOLOCK) ";
|
||||
CSQL += WSQL;
|
||||
CMD.CommandText = CSQL;
|
||||
var cnt = int.Parse(CMD.ExecuteScalar().ToString());
|
||||
@@ -1998,7 +1994,7 @@ namespace Project.Dialog
|
||||
}
|
||||
else
|
||||
{
|
||||
var USQL = $"update Component_Reel_SID_Convert set " +
|
||||
var USQL = $"update K4EE_Component_Reel_SID_Convert set " +
|
||||
string.Join(",", UpdateTarget.Select(t => "[" + t.Key + "]='" + t.Value + "'"));
|
||||
|
||||
USQL += WSQL;
|
||||
@@ -2029,7 +2025,7 @@ namespace Project.Dialog
|
||||
var dlg = UTIL.MsgQ(dlgMsg);
|
||||
if (dlg == DialogResult.Yes)
|
||||
{
|
||||
var ISQL = $"insert into Component_Reel_SID_Convert ([MC],wdate," +
|
||||
var ISQL = $"insert into K4EE_Component_Reel_SID_Convert ([MC],wdate," +
|
||||
string.Join(",", InsertTarget.Select(t => "[" + t.Key + "]")) + ") values(" +
|
||||
$"null,getdate()," +
|
||||
string.Join(",", InsertTarget.Select(t => "'" + t.Value.Replace("'", "''") + "'")) + ")";
|
||||
@@ -2080,7 +2076,7 @@ namespace Project.Dialog
|
||||
private void button1_Click_1(object sender, EventArgs e)
|
||||
{
|
||||
//데이터베이스 결과에서 자료를 추가한다.
|
||||
var result = new DataSet1.K4EE_Component_Reel_ResultDataTable();// new List<Component_Reel_Result>();
|
||||
var result = new DataSet1.K4EE_Component_Reel_ResultDataTable();
|
||||
|
||||
var tabName = "K4EE_Component_Reel_Result with (nolock)";
|
||||
|
||||
@@ -2105,10 +2101,6 @@ namespace Project.Dialog
|
||||
var sql = $"select top 5 * from {tabName} where QR like @search order by wdate desc";
|
||||
var list = DBHelper.Get(sql, new SqlParameter("search", $"%;{tbVLOT.Text}%"));
|
||||
if (list.Rows.Count > 0) result.Merge(list);
|
||||
//var list = db.Component_Reel_Result.AsNoTracking().
|
||||
// OrderByDescending(t => t.wdate).
|
||||
// Where(t => t.QR.Contains(";" + tbVLOT.Text + ";")).Take(5).ToList();
|
||||
///if (list != null && list.Count > 0) result.AddRange(list);
|
||||
}
|
||||
|
||||
//4.벤더이름
|
||||
@@ -2117,11 +2109,6 @@ namespace Project.Dialog
|
||||
var sql = $"select top 5 * from {tabName} where QR like @search order by wdate desc";
|
||||
var list = DBHelper.Get(sql, new SqlParameter("search", $"%;{tbVName.Text}%"));
|
||||
if (list.Rows.Count > 0) result.Merge(list);
|
||||
|
||||
//var list = db.Component_Reel_Result.AsNoTracking().
|
||||
// OrderByDescending(t => t.wdate).
|
||||
// Where(t => t.QR.Contains(";" + tbVName.Text + ";")).Take(5).ToList();
|
||||
//if (list != null && list.Count > 0) result.AddRange(list);
|
||||
}
|
||||
|
||||
//customer code
|
||||
|
||||
Reference in New Issue
Block a user