2023-03-15 13:38:06 +00:00
|
|
|
using InnovEnergy.App.Backend.DataTypes;
|
|
|
|
|
|
|
|
namespace InnovEnergy.App.Backend.Database;
|
|
|
|
|
|
|
|
|
|
|
|
public static partial class Db
|
|
|
|
{
|
|
|
|
public static Boolean Update(Folder folder)
|
|
|
|
{
|
2023-03-21 10:45:50 +00:00
|
|
|
return Connection.Update(folder) > 0;
|
2023-03-15 13:38:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static Boolean Update(Installation installation)
|
|
|
|
{
|
2023-03-21 10:45:50 +00:00
|
|
|
return Connection.Update(installation) > 0;
|
2023-03-15 13:38:06 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public static Boolean Update(User user)
|
|
|
|
{
|
|
|
|
var originalUser = GetUserById(user.Id);
|
2023-04-06 06:32:47 +00:00
|
|
|
if (originalUser is null) return false;
|
|
|
|
|
|
|
|
// these columns must not be modified!
|
|
|
|
user.ParentId = originalUser.ParentId;
|
|
|
|
user.Name = originalUser.Name;
|
|
|
|
|
|
|
|
return Connection.Update(user) > 0;
|
2023-03-15 13:38:06 +00:00
|
|
|
}
|
|
|
|
|
2023-03-21 10:45:50 +00:00
|
|
|
|
2023-03-15 13:38:06 +00:00
|
|
|
|
|
|
|
}
|