Merge
This commit is contained in:
commit
44dc6ec334
242 changed files with 53628 additions and 345 deletions
|
@ -4486,6 +4486,45 @@ namespace WebsitePanel.EnterpriseServer
|
|||
);
|
||||
}
|
||||
|
||||
public static IDataReader GetWebDavPortalUserSettingsByAccountId(int accountId)
|
||||
{
|
||||
return SqlHelper.ExecuteReader(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"GetWebDavPortalUsersSettingsByAccountId",
|
||||
new SqlParameter("@AccountId", accountId)
|
||||
);
|
||||
}
|
||||
|
||||
public static int AddWebDavPortalUsersSettings(int accountId, string settings)
|
||||
{
|
||||
SqlParameter settingsId = new SqlParameter("@WebDavPortalUsersSettingsId", SqlDbType.Int);
|
||||
settingsId.Direction = ParameterDirection.Output;
|
||||
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"AddWebDavPortalUsersSettings",
|
||||
settingsId,
|
||||
new SqlParameter("@AccountId", accountId),
|
||||
new SqlParameter("@Settings", settings)
|
||||
);
|
||||
|
||||
// read identity
|
||||
return Convert.ToInt32(settingsId.Value);
|
||||
}
|
||||
|
||||
public static void UpdateWebDavPortalUsersSettings(int accountId, string settings)
|
||||
{
|
||||
SqlHelper.ExecuteNonQuery(
|
||||
ConnectionString,
|
||||
CommandType.StoredProcedure,
|
||||
"UpdateWebDavPortalUsersSettings",
|
||||
new SqlParameter("@AccountId", accountId),
|
||||
new SqlParameter("@Settings", settings)
|
||||
);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Support Service Levels
|
||||
|
|
|
@ -1210,6 +1210,37 @@ namespace WebsitePanel.EnterpriseServer
|
|||
return null;
|
||||
}
|
||||
|
||||
#region WebDav portal
|
||||
|
||||
public static string GetWebDavPortalUserSettingsByAccountId(int accountId)
|
||||
{
|
||||
var dataReader = DataProvider.GetWebDavPortalUserSettingsByAccountId(accountId);
|
||||
|
||||
while (dataReader.Read())
|
||||
{
|
||||
return (string)dataReader["Settings"];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void UpdateUserSettings(int accountId, string settings)
|
||||
{
|
||||
var oldSettings = GetWebDavPortalUserSettingsByAccountId(accountId);
|
||||
|
||||
if (string.IsNullOrEmpty(oldSettings))
|
||||
{
|
||||
DataProvider.AddWebDavPortalUsersSettings(accountId, settings);
|
||||
}
|
||||
else
|
||||
{
|
||||
DataProvider.UpdateWebDavPortalUsersSettings(accountId, settings);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region Statistics
|
||||
|
||||
public static OrganizationStatistics GetStatistics(int itemId)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue