public ServerProductActivationViewModel() { CleanUp(); var iDbContext = new ServerDbContextFactory().Create(); _unitOfWork = new UnitOfWorkServer(iDbContext); SelectedProductActivation = new ProductActivationDTO(); ProductActivations = new ObservableCollection <ProductActivationDTO>(); GetLiveProductActivations(); EditCommandVisibility = false; }
public ServerAgentViewModel() { CleanUp(); var iDbContext = new ServerDbContextFactory().Create(); _unitOfWork = new UnitOfWorkServer(iDbContext); SelectedAgent = new AgentDTO(); Agents = new ObservableCollection <AgentDTO>(); GetLiveAgents(); EditCommandVisibility = false; }
public ServerSettingViewModel() { CleanUp(); var iDbContext = new ServerDbContextFactory().Create(); _unitOfWork = new UnitOfWorkServer(iDbContext); SelectedSetting = new SettingDTO(); Settings = new ObservableCollection <SettingDTO>(); GetLiveSettings(); EditCommandVisibility = false; }
public UserAgencyAgentViewModel() { CleanUp(); var iDbContext = new ServerDbContextFactory().Create(); _unitOfWork = new UnitOfWorkServer(iDbContext); Load(); Messenger.Default.Register <UserDTO>(this, message => { SelectedUser = message; }); }
public ServerUserViewModel() { CleanUp(); var iDbContext = new ServerDbContextFactory().Create(); _unitOfWork = new UnitOfWorkServer(iDbContext); _userService = new UserService(iDbContext); Load(); SelectedUser = new UserDTO(); SelectedRole = new RoleDTO(); SelectedRoleToAdd = new RoleDTO(); Users = new ObservableCollection <UserDTO>(); Roles = new ObservableCollection <RoleDTO>(); SelectedRoles = new ObservableCollection <RoleDTO>(); FilteredRoles = new ObservableCollection <RoleDTO>(); GetLiveRoles(); GetLiveUsers(); EditCommandVisibility = false; NewPasswordExpandibility = false; //#region Web Security //const string serverName = "."; //const string sqlceFileName = "PinnaFaceDbWeb"; //const string sQlServConString = "data source=" + serverName + ";initial catalog=" + sqlceFileName + // ";user id=sa;password=amihan"; //const string connectionStringName = sQlServConString; //const string providerName = "System.Data.SqlClient"; //if (!WebSecurity.Initialized) // WebSecurity.InitializeDatabaseConnection(connectionStringName, providerName, "Users", // "UserId", "UserName", false); //#endregion }