Exemple #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 "));
 }
Exemple #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));
        }
Exemple #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 "));
 }
        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));
        }
Exemple #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 }));
        }
 public static IEnumerable <ServerConfig> GetList()
 {
     return(SqlServerHelper.GetList <ServerConfig>("select * from MSCS_Server_Config"));
 }
Exemple #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));
        }
Exemple #9
0
 public static IEnumerable <WeixinRobot> GetList()
 {
     return(SqlServerHelper.GetList <WeixinRobot>("select * from MSCS_Weixin_Robot"));
 }
Exemple #10
0
 public static WeixinRobot Get(int id)
 {
     return(SqlServerHelper.Get <WeixinRobot>($"select * from MSCS_Weixin_Robot where Id = {id}"));
 }
Exemple #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));
        }
Exemple #12
0
        public static int Insert(ServerGroup group)
        {
            string sql = "INSERT INTO MSCS_Server_Group(Name) Values(@Name)";

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