Files
ATV_STDLabelAttach/Handler/Project/Manager/DatabaseManager.cs
atvstdla 1273ca8236 ..
2025-09-30 17:35:11 +09:00

31 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Project
{
public static class DB
{
public static int ChangeRegExName(string oldname, string newname)
{
var sql = DBHelper.UpdateWhere("K4EE_Component_Reel_RegExRule",
new Dictionary<string, object>(){
{ "CustCode",newname }
}, new Dictionary<string, object>()
{
{ "CustCode",oldname }
});
return sql;
}
public static int CopyRegEx(string oldname, string newname)
{
var sql = "insert into K4EE_Component_Reel_RegExRule(custcode,seq,description,symbol,pattern,groups,isenable,istrust,isamkstd,isignore)" +
$" select '{newname}',seq,description,symbol,pattern,groups,isenable,istrust,isamkstd,isignore " +
$" from K4EE_Component_Reel_RegExRule" +
$" where custcode = '{oldname}'";
return DBHelper.ExecuteNonQuery(sql);
}
}
}