..
This commit is contained in:
30
Handler/Project/Manager/DatabaseManager.cs
Normal file
30
Handler/Project/Manager/DatabaseManager.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user