init
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Database
|
||||
{
|
||||
public interface IDatabaseCopyView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Enums.Database;
|
||||
|
||||
namespace DTS.Common.Interface.Database
|
||||
{
|
||||
/// <summary>
|
||||
/// this viewmodel provides a way for transferring a remote database to a local database
|
||||
/// it clears the local database and populates it with the remote databse
|
||||
/// it requires a local database that has the right tables and stored procedures already
|
||||
/// </summary>
|
||||
public interface IDatabaseCopyViewModel : IBaseViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// the view associated with the model
|
||||
/// </summary>
|
||||
IDatabaseCopyView View { get; set; }
|
||||
/// <summary>
|
||||
/// frees up any memory associated with viewmodel
|
||||
/// </summary>
|
||||
void Unset();
|
||||
/// <summary>
|
||||
/// copies from remote database to local database
|
||||
/// uses DTS.Common.Storage to determine local and remote
|
||||
/// </summary>
|
||||
void CopyDatabase();
|
||||
/// <summary>
|
||||
/// initializes viewmodel state
|
||||
/// </summary>
|
||||
void InitializeState(DbType dbType, string dbName);
|
||||
string DbName { get; }
|
||||
/// <summary>
|
||||
/// the overall status/progress
|
||||
/// </summary>
|
||||
IStatusAndProgressBarView OverallProgressBarView { get; }
|
||||
/// <summary>
|
||||
/// current task status/progress
|
||||
/// </summary>
|
||||
IStatusAndProgressBarView CurrentTaskProgressBarView { get; }
|
||||
DbType DatabaseType { get; }
|
||||
|
||||
bool CopyEnabled { get; }
|
||||
bool IsCopyVisible { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Database
|
||||
{
|
||||
public interface IDatabaseStatusBarView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System.Windows.Media;
|
||||
using DTS.Common.Base;
|
||||
using DTS.Common.Enums.Database;
|
||||
|
||||
namespace DTS.Common.Interface.Database
|
||||
{
|
||||
/// <summary>
|
||||
/// this viewmodel handles the logic for database status in a UI
|
||||
/// it handles the current connection and status
|
||||
/// </summary>
|
||||
public interface IDatabaseStatusBarViewModel : IBaseViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// the associated view for the model
|
||||
/// </summary>
|
||||
IDatabaseStatusBarView View { get; set; }
|
||||
//frees up any memory associated with viewmodel
|
||||
void Unset();
|
||||
/// <summary>
|
||||
/// gets the database type
|
||||
/// use initializevalues to populate
|
||||
/// </summary>
|
||||
DbType DatabaseType { get; }
|
||||
/// <summary>
|
||||
/// gets whether the remote database is connected
|
||||
/// use initializevalues to populate
|
||||
/// </summary>
|
||||
bool RemoteConnected { get; }
|
||||
/// <summary>
|
||||
/// the server (not db) name
|
||||
/// use initialize values to populate
|
||||
/// </summary>
|
||||
string ServerName { get; }
|
||||
/// <summary>
|
||||
/// sets the initial values for db type, server name, and remote connection status
|
||||
/// </summary>
|
||||
/// <param name="dbType"></param>
|
||||
/// <param name="serverName"></param>
|
||||
/// <param name="remoteConnected"></param>
|
||||
void InitializeValues(DbType dbType, string serverName, bool remoteConnected);
|
||||
/// <summary>
|
||||
/// returns the current active db name (either server name or local depending on db type and remote connection status)
|
||||
/// </summary>
|
||||
string ActiveDbName { get; }
|
||||
/// <summary>
|
||||
/// returns the background brush for the active db name
|
||||
/// </summary>
|
||||
Brush BackgroundBrush { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Database
|
||||
{
|
||||
public interface IDatabaseSwitchView : IBaseView { }
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using DTS.Common.Base;
|
||||
|
||||
namespace DTS.Common.Interface.Database
|
||||
{
|
||||
/// <summary>
|
||||
/// this viewmodel provides a way for transferring a remote database to a local database
|
||||
/// it clears the local database and populates it with the remote databse
|
||||
/// it requires a local database that has the right tables and stored procedures already
|
||||
/// </summary>
|
||||
public interface IDatabaseSwitchViewModel : IBaseViewModel
|
||||
{
|
||||
/// <summary>
|
||||
/// the view associated with the model
|
||||
/// </summary>
|
||||
IDatabaseSwitchView View { get; set; }
|
||||
/// <summary>
|
||||
/// frees up any memory associated with viewmodel
|
||||
/// </summary>
|
||||
void Unset();
|
||||
|
||||
bool RemoteIsActive { get; }
|
||||
|
||||
string DefaultDbName { get; }
|
||||
//void SetDefaultDbName(string defaultDbName);
|
||||
void InitializeDbSettings(string defaultDbName, string dbHost, bool ntlmAuthentication, string dbUser,
|
||||
string dbPassword);
|
||||
void SwitchRemote();
|
||||
void SwitchLocal();
|
||||
|
||||
string DbHost { get; }
|
||||
bool NTLMAuthentication { get; }
|
||||
string DbUser { get; }
|
||||
string DbPassword { get; }
|
||||
}
|
||||
}
|
||||
44
Common/DTS.Common/Interface/Database/IUserDbRecord.cs
Normal file
44
Common/DTS.Common/Interface/Database/IUserDbRecord.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
|
||||
namespace DTS.Common.Interface.Database
|
||||
{
|
||||
public interface IUserDbRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// Database Id of user
|
||||
/// </summary>
|
||||
int ID { get; set; }
|
||||
/// <summary>
|
||||
/// User name of user
|
||||
/// Must be unique
|
||||
/// </summary>
|
||||
string UserName { get; set; }
|
||||
/// <summary>
|
||||
/// string to use when displaying user in UI
|
||||
/// </summary>
|
||||
string DisplayName { get; set; }
|
||||
/// <summary>
|
||||
/// Password for user
|
||||
/// Password is a hashed and salted value, passwords are not
|
||||
/// stored in database
|
||||
/// </summary>
|
||||
string Password { get; set; }
|
||||
/// <summary>
|
||||
/// Role of user
|
||||
/// </summary>
|
||||
short Role { get; set; }
|
||||
/// <summary>
|
||||
/// DateTime user was last modified
|
||||
/// </summary>
|
||||
DateTime LastModified { get; set; }
|
||||
/// <summary>
|
||||
/// User that last modified user
|
||||
/// </summary>
|
||||
string LastModifiedBy { get; set; }
|
||||
/// <summary>
|
||||
/// whether user should be synchronized between local and remote databases
|
||||
/// deprecated
|
||||
/// </summary>
|
||||
bool LocalOnly { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user