コード例 #1
0
 public static UpdateHistory GetLatest(int serverConfigId)
 {
     return(SqlServerHelper.Get <UpdateHistory>($"select top 1 * from MSCS_Update_History where ServerConfigId = {serverConfigId} order by Id desc "));
 }
コード例 #2
0
        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));
        }
コード例 #3
0
 public static IEnumerable <UpdateHistory> GetList(int serverConfigId)
 {
     return(SqlServerHelper.GetList <UpdateHistory>($"select * from MSCS_Update_History where ServerConfigId = {serverConfigId} order by Id desc "));
 }
コード例 #4
0
        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));
        }
コード例 #5
0
        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));
        }
コード例 #6
0
        public static int Delete(int id)
        {
            string sql = "Delete From MSCS_Weixin_Robot where Id = @Id";

            return(SqlServerHelper.Execute(sql, new { Id = id }));
        }
コード例 #7
0
 public static IEnumerable <ServerConfig> GetList()
 {
     return(SqlServerHelper.GetList <ServerConfig>("select * from MSCS_Server_Config"));
 }
コード例 #8
0
        public static int Insert(WeixinRobot robot)
        {
            string sql = "INSERT INTO MSCS_Weixin_Robot(Name, Url) Values(@Name, @Url)";

            return(SqlServerHelper.Execute(sql, robot));
        }
コード例 #9
0
 public static IEnumerable <WeixinRobot> GetList()
 {
     return(SqlServerHelper.GetList <WeixinRobot>("select * from MSCS_Weixin_Robot"));
 }
コード例 #10
0
 public static WeixinRobot Get(int id)
 {
     return(SqlServerHelper.Get <WeixinRobot>($"select * from MSCS_Weixin_Robot where Id = {id}"));
 }
コード例 #11
0
        public static int Update(ServerGroup group)
        {
            string sql = "Update MSCS_Server_Group Set Name = @Name Where Id = @Id";

            return(SqlServerHelper.Execute(sql, group));
        }
コード例 #12
0
        public static int Insert(ServerGroup group)
        {
            string sql = "INSERT INTO MSCS_Server_Group(Name) Values(@Name)";

            return(SqlServerHelper.Execute(sql, group));
        }