public static UpdateHistory GetLatest(int serverConfigId) { return(SqlServerHelper.Get <UpdateHistory>($"select top 1 * from MSCS_Update_History where ServerConfigId = {serverConfigId} order by Id desc ")); }
public static int Insert(UpdateHistory history) { string sql = "INSERT INTO MSCS_Update_History(ServerConfigId, ServerConfigName, FileCount) Values(@ServerConfigId, @ServerConfigName, @FileCount)"; return(SqlServerHelper.Execute(sql, history)); }
public static IEnumerable <UpdateHistory> GetList(int serverConfigId) { return(SqlServerHelper.GetList <UpdateHistory>($"select * from MSCS_Update_History where ServerConfigId = {serverConfigId} order by Id desc ")); }
public static int Insert(ServerConfig config) { string sql = "INSERT INTO MSCS_Server_Config(Name, ClientRootPath, ServerAddress, ServerRootPath, GroupId, SvnPath) Values(@Name, @ClientRootPath, @ServerAddress, @ServerRootPath, @GroupId, @SvnPath)"; return(SqlServerHelper.Execute(sql, config)); }
public static int Update(ServerConfig config) { string sql = "Update MSCS_Server_Config Set Name = @Name, ClientRootPath=@ClientRootPath, ServerAddress=@ServerAddress, ServerRootPath=@ServerRootPath, SvnPath=@SvnPath Where Id = @Id"; return(SqlServerHelper.Execute(sql, config)); }
public static int Delete(int id) { string sql = "Delete From MSCS_Weixin_Robot where Id = @Id"; return(SqlServerHelper.Execute(sql, new { Id = id })); }
public static IEnumerable <ServerConfig> GetList() { return(SqlServerHelper.GetList <ServerConfig>("select * from MSCS_Server_Config")); }
public static int Insert(WeixinRobot robot) { string sql = "INSERT INTO MSCS_Weixin_Robot(Name, Url) Values(@Name, @Url)"; return(SqlServerHelper.Execute(sql, robot)); }
public static IEnumerable <WeixinRobot> GetList() { return(SqlServerHelper.GetList <WeixinRobot>("select * from MSCS_Weixin_Robot")); }
public static WeixinRobot Get(int id) { return(SqlServerHelper.Get <WeixinRobot>($"select * from MSCS_Weixin_Robot where Id = {id}")); }
public static int Update(ServerGroup group) { string sql = "Update MSCS_Server_Group Set Name = @Name Where Id = @Id"; return(SqlServerHelper.Execute(sql, group)); }
public static int Insert(ServerGroup group) { string sql = "INSERT INTO MSCS_Server_Group(Name) Values(@Name)"; return(SqlServerHelper.Execute(sql, group)); }