public SupplierViewModel() { this.supplierRepository = new SupplierRepository(); this.supplierView = SupplierFactory.createNew(); this.userRepository = new UserRepository(); selectedUser = UserFactory.CreateNewUser(); }
/// <summary> /// Creates the notification email. /// </summary> /// <param name="registrationInfo">The registration information.</param> /// <param name="registrationId">The registration identifier.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">registrationInfo</exception> public IEmailDetail CreateNotificationEmail(IUserView registrationInfo, int registrationId) { if (registrationInfo == null) { throw new ArgumentNullException(nameof(registrationInfo)); } // var token = string.Format("{0},{1},{2}", registrationInfo.FirstName.First(), registrationId, registrationInfo.LastName.Last()); var theSubject = "Confirm your Pitalytics Registration Request"; var recipient = registrationInfo.Email; var theBody = "You are now registered for Pitalytics services."; theBody = string.Format("{0} {1}{2}", theBody, "<br><br> Hello, .", registrationInfo.FirstName); theBody = string.Format("{0} {1}", theBody, "<br><br> You have a new Notification From ADit Scripting Service"); theBody = string.Format("{0} {1}", theBody, "<br><br> Click on the link below to login and view your message"); theBody = string.Format("{0} {1}", theBody, "<br><br> <a href='www.automataassociates.com'>ADit Login</a>"); theBody = string.Format("{0} {1}", theBody, "<br><br> Thank you"); var mailDetail = new EmailDetail { Body = theBody, Recipients = recipient, Subject = theSubject }; return(mailDetail); }
public virtual void Release() { m_UserModel.Release(); m_UserModel = null; m_UserView.Release(); m_UserView = null; }
public UserPresenter(IUserView view, Usuario usuario, IUnityContainer container) { if (view == null) { throw new ArgumentNullException("view"); } if (usuario == null) { throw new ArgumentNullException("usuario"); } if (container == null) { throw new ArgumentNullException("container"); } this._container = container; this.SubmitCommand = new DelegateCommand <object>(this.Submit, this.CanSubmit); this.CancelCommand = new DelegateCommand <object>(this.Cancel); this.SearchUserGroupCommand = new DelegateCommand <object>(this.SearchUserGroup); this.Usuario = usuario; this.SenhaConfirmacao = usuario.Senha; this._view = view; this._view.SetPresenter(this); this._view.PasswordChanged += PasswordChangedHandler; OnPropertyChanged("Usuario"); // para executar a validação dos dados }
public UserPresenter(IUserView view) { _view = view; userService = Program.GetService <IUserService>(); // request service object from ServiceProvider JustDoIt(); // quick sample for calling method from presenter }
/// Saves the registration information. /// </summary> /// <param name="registrationInfo">The registration information.</param> /// <param name="registrationId">The registration identifier.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">registrationInfo</exception> /// string SaveRegistrationInfo(IRegistrationView registrationInfo, out int registrationId); public string SaveRegistrationInfo(IUserView registrationInfo, out int registrationId) { if (registrationInfo == null) { throw new ArgumentNullException(nameof(registrationInfo)); } var result = string.Empty; var newRecord = new UserRegistration { Password = registrationInfo.Password, FirstName = registrationInfo.FirstName, Email = registrationInfo.Email, DateVerified = DateTime.Now, LastName = registrationInfo.LastName, IsActive = registrationInfo.IsActive, PhoneNumber = registrationInfo.PhoneNumber, DateCreated = DateTime.Now, IsUserVerified = false, }; using ( var dbContext = (PitalyticsEntities)dbContextFactory.GetDbContext()) { dbContext.UserRegistrations.Add(newRecord); dbContext.SaveChanges(); } registrationId = newRecord.UserRegistrationId; return(result); ; }
public UserController(IStoreReader storeReader, IUserView userView, IUsersView usersView) { _userView = userView; _usersView = usersView; _storeReader = storeReader; this.Initialize(); }
public UserController(IUserView userView, IList <UserViewModel> users) { _userView = userView ?? throw new ArgumentNullException(nameof(userView)); _users = users ?? throw new ArgumentNullException(nameof(users)); _userView.SetController(this); }
public UserCommand(IUserView view, IUnitOfWork unitOfWork) { this.view = view; this.unitOfWork = unitOfWork; userRepository = unitOfWork.GetRepository <IUserRepository>(); messageRepository = unitOfWork.GetRepository <IMessageRepository>(); }
/// <summary> /// Add a UserView to the collection. /// </summary> /// <param name="uv">The UserView to add.</param> public IUserView Add(IUserView uv) { Debug.Assert(uv != null); IUserView uvAdd = (IUserView)ValidateObject(uv); List.Add(uvAdd); return(uvAdd); }
protected SideForm(IUserView view, UserInfo userInfo) { InitializeSideForm(view); oldUser = userInfo; nameBox.Text = userInfo.Name; surnameBox.Text = userInfo.Surname; phoneBox.Text = userInfo.Phone; }
public ApplicationViews(IUserView users, IUserLevelView levels, IProfileView profiles, IPlaceView places, IChartTypeView chartTypes) { Users = users; Levels = levels; Profiles = profiles; Places = places; ChartTypes = chartTypes; }
private void InitializeSideForm(IUserView view) { InitializeComponent(); phoneBox.Validating += PhoneValidating; nameBox.Validating += NameValidating; surnameBox.Validating += SurnameValidating; mainView = view; }
/// ------------------------------------------------------------------------------------ /// <summary> /// Initializes a new instance of the <see cref="NotesDataEntryView"/> class. /// </summary> /// <param name="cache">Duh</param> /// <param name="userView">The UserView that this view displays</param> /// <param name="notesWnd">The notes window.</param> /// ------------------------------------------------------------------------------------ public NotesDataEntryView(FdoCache cache, IUserView userView, FwMainWnd notesWnd) : base(cache) { m_scr = Cache.LangProject.TranslatedScriptureOA; m_UserView = userView; m_notesMainWnd = notesWnd; BaseInfoBarCaption = userView.ViewNameShort; ReadOnlyView = true; }
public UserController(IUserView userView, IUserAddView addView, IUserService service) { this.view = userView; this.addView = addView; this.service = service; this.view.SetController(this); this.addView.SetController(this); }
public UserPresenter(IUserView view, UserModel model) { _view = view; _model = model; _roleRepository = _model.RoleRepository; _userRepository = _model.UserRepository; var roles = _roleRepository.GetAll(); RoleList = new List<Role>(roles); }
/// Gets the updated registration view. /// </summary> /// <param name="userAgentofDeductionView">The user agentof deduction view.</param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> /// <exception cref="System.ArgumentNullException">userAgentofDeductionView</exception> public IUserView GetUpdatedRegistrationView(IUserView userView, string processingMessage) { if (userView == null) { throw new ArgumentNullException(nameof(userView)); } return(this.accountViewsModelFactory.CreateUpdatedRegistraionView(userView, processingMessage)); }
public UserPresenter(IUserView view, List<CreditRequest> allRequests) { _view = view; _allRequests = allRequests; _view.CreditRequestSelected += OnCreditRequestSelected; _view.CreateNew += OnCreateNew; _view.Abandon += OnAbandon; }
public void UpdateUser(IUserView usr) { tbl_Usr User = (from u in MerpDatabase().tbl_Usr where u.Usr_ == usr.UsrId select u).Single(); User.Usr_ = usr.UsrId; User.UsrName = usr.UsrName; User.UsrLogedin = usr.UsrLogedIn; User.UsrPassword = usr.UsrPassword; User.UsrIdent = usr.UsrIdent; MerpDatabase().SaveChanges(); }
public UserPresenter(IKernel kernel, IUserView view, IUser_sUpdateService user_SUpdateService, UserProfiler userProfiler) { this.kernel = kernel; this.view = view; this.userProfiler = userProfiler; this.user_SUpdateService = user_SUpdateService; this.user_SUpdateService.ChangeSelectedUser(userProfiler.Id); view.Show(); }
public UserPresenter(IUserView view, UserModel model) { _view = view; _model = model; _roleRepository = _model.RoleRepository; _userRepository = _model.UserRepository; var roles = _roleRepository.GetAll(); RoleList = new List <Role>(roles); }
public UserViewModel(IUserView view, CompositionContainer compositionContainer) { View = view; View.ViewModel = this; ShellContainer = compositionContainer; NewHardwareCommand = new CommandHandler <object, object>(NewHardwareCommandAction); EditHardwareCommand = new CommandHandler <object, object>(EditHardwareCommandAction); DeleteHardwareCommand = new CommandHandler <object, object>(DeleteHardwareCommandAction); _userCollection = new Lazy <OptimizedObservableCollection <User> >(); }
public UserPresenter(IUserModel model, IUserView view) { this._model = model; this._view = view; this.SetViewPropertiesFromModel(); this.WireUpViewEvents(); }
public BlogController(ViewManager viewManager, IAuthenticationService authenticationService, ICommandBus commandBus, IEventBus eventBus, IEventStore eventStore) : base(commandBus) { _viewManager = viewManager; _authenticationService = authenticationService; _eventBus = eventBus; _eventStore = eventStore; _blogView = _viewManager.GetView<IBlogView>(); _userView = _viewManager.GetView<IUserView>(); }
/// <summary> /// Creates the updated registraion view. /// </summary> /// <param name="userAgentofDeductionView">The user agentof deduction view.</param> /// <param name="processingMessage">The processing message.</param> /// <returns></returns> /// <exception cref="ArgumentNullException">userAgentofDeductionView</exception> public IUserView CreateUpdatedRegistraionView(IUserView userView, string processingMessage) { if (userView == null) { throw new ArgumentNullException(nameof(userView)); } userView.ProcessingMessage = processingMessage; return(userView); }
public static void Login(string userNo, string userPwd, IUserView view) { if (userNo == "wangyb" && userPwd == "123456") { HttpContext.Current.Session[UserConfig.SESSION_NAME] = userNo; view.LoginSuccess(); } else { view.UserNoOrPasswordInvlid(); } }
public UserController(IUser model, IUserView view, IManager <Character> characterManager, IUnityContainer container, World world) { _model = model; _view = view; _characterManager = characterManager; _container = container; _world = world; _machine = new UserControllerStateMachine(this); }
public UserPresenter() { _view = new UserView(); _services = new UserServices(new UserRepository(), new ModelDataAnnotationCheck()); _view.OnLoadData += _view_LoadData; _view.OnButtonTambahClick += _view_OnCreateData; _view.OnButtonUbahClick += _view_OnUpdateData; _view.OnButtonHapusClick += _view_OnDeleteData; _view.OnButtonRefreshClick += _view_OnRefreshData; _view.OnDataGridCellDoubleClick += OnDataGrid_CellDoubleClick; }
/// <summary> /// Get a collection of UserView objects with the given application Guid. /// </summary> /// <param name="app">Guid for an application.</param> /// <returns> /// UserViewCollection which contains UserView objects that match the /// given Guid, if any. /// </returns> public UserViewCollection GetUserViews(Guid app) { UserViewCollection uvc = new UserViewCollection(m_fdoCache); for (int i = 0; i < List.Count; i++) { IUserView uv = Item(i); if (uv.App == app) { uvc.Add(uv); } } return(uvc); }
public static IUserView UserByIdent(string usrident) { var query = (from usr in MerpDatabase().tbl_Usr where usr.UsrIdent == usrident select usr); tbl_Usr usre = query.FirstOrDefault(); if (usre != null) { IUserView Userli2 = UserFactory.CreateUser(usre.Usr_, usre.UsrNumber, usre.UsrName, usre.UsrIdent, usre.UsrIsEmployer, usre.UsrPassword, usre.UsrLogedin); return(Userli2); } return(null); }
public void AddUser(IUserView usr) { tbl_Usr User = new tbl_Usr(); User.Usr_ = usr.UsrId; User.UsrName = usr.UsrName; User.UsrLogedin = usr.UsrLogedIn; User.UsrPassword = usr.UsrPassword; User.UsrIdent = usr.UsrIdent; MerpDatabase().tbl_Usr.AddObject(User); try { MerpDatabase().SaveChanges(); } catch(Exception e) { } }
public void AddUser(IUserView usr) { tbl_Usr User = new tbl_Usr(); User.Usr_ = usr.UsrId; User.UsrName = usr.UsrName; User.UsrLogedin = usr.UsrLogedIn; User.UsrPassword = usr.UsrPassword; User.UsrIdent = usr.UsrIdent; MerpDatabase().tbl_Usr.AddObject(User); try { MerpDatabase().SaveChanges(); } catch (Exception e) { } }
public UserOperations(IUserView view, DataAccess userData) { this.view = view; this.userData = userData; view.AdminUser += () => { UserOperations op = new UserOperations(); User user = new User(); user = view.AddUser(); op.AddUser(user); }; }
public GamePresenter(string name) { gameModel = new Game(name); userForm = new Player1Form(name); logForm = new LogForm(); compForm = new Player2Form(); userForm.FormLoad += () => LoadForm(); userForm.Shown += PlaceForms; compForm.FormLoad += () => LoadForm(); userForm.Block += UserBlock; userForm.Attack += UserAttack; gameModel.Bind(UserWound, CompWound, UserDeath, CompDeath, UserBlock, CompBlock); }
public WriteableUserView(IUserView readonlyUserView) { this.AccessLevel = readonlyUserView.AccessLevel; this.AccessLevelId = readonlyUserView.AccessLevelId; this.ActivationDate = readonlyUserView.ActivationDate; this.Active = readonlyUserView.Active; this.AlarmUser = readonlyUserView.AlarmUser; this.AntiPassbackUser = readonlyUserView.AntiPassbackUser; this.Department = readonlyUserView.Department; this.DepartmentId = readonlyUserView.DepartmentId; this.DisplayName = readonlyUserView.DisplayName; this.ExpiryDate = readonlyUserView.ExpiryDate; this.Extension = readonlyUserView.Extension; this.Fax = readonlyUserView.Fax; this.Field10_50 = readonlyUserView.Field10_50; this.Field11_50 = readonlyUserView.Field11_50; this.Field12_50 = readonlyUserView.Field12_50; this.Field13_Memo = readonlyUserView.Field13_Memo; this.Field14_50 = readonlyUserView.Field14_50; this.Field1_100 = readonlyUserView.Field1_100; this.Field2_100 = readonlyUserView.Field2_100; this.Field3_50 = readonlyUserView.Field3_50; this.Field4_50 = readonlyUserView.Field4_50; this.Field5_50 = readonlyUserView.Field5_50; this.Field6_50 = readonlyUserView.Field6_50; this.Field7_50 = readonlyUserView.Field7_50; this.Field8_50 = readonlyUserView.Field8_50; this.Field9_50 = readonlyUserView.Field9_50; this.FirstName = readonlyUserView.FirstName; this.Global = readonlyUserView.Global; this.LastAccessTime = readonlyUserView.LastAccessTime; this.LastArea = readonlyUserView.LastArea; this.LastAreaId = readonlyUserView.LastAreaId; this.LastUpdated = readonlyUserView.LastUpdated; this.MiddleName = readonlyUserView.MiddleName; this.Picture = readonlyUserView.Picture; this.PIN = readonlyUserView.PIN; this.Surname = readonlyUserView.Surname; this.Telephone = readonlyUserView.Telephone; this.UserGuid = readonlyUserView.UserGuid; this.UserId = readonlyUserView.UserId; this.UserImage = readonlyUserView.UserImage; }
public void UpdateUser(IUserView usr) { _dataLayerManager.UpdateUser(usr); }
public PaxtonUser(IUserView user) { _wrappedUser = user; }
private bool UpdateUserView(IOemClient client, IUserView source) { return client.UpdateUserRecord( userId: source.UserId, accessLevelId: source.AccessLevelId, departmentId: source.DepartmentId, antiPassbackInd: source.AntiPassbackUser, alarmUserInd: source.AlarmUser, firstName: source.FirstName, middleName: source.MiddleName, surname: source.Surname, telephoneNo: source.Telephone, telephoneExtension: source.Extension, pinCode: source.PIN, pictureFileName: source.Picture, activationDate: source.ActivationDate, activeInd: source.Active, faxNo: source.Fax, expiryDate: source.ExpiryDate, customFields: null); }
/******* C++ methods. FldSpec * AddField(bool fTopLevel, int stidLabel, int flid, FldType ft, int ws = kwsAnal, int stidHelp = 0, FldVis vis = kFTVisAlways, FldReq req = kFTReqNotReq, LPCOLESTR pszSty = L"", bool fCustFld = false, bool fHideLabel = false); void AddPossField(bool fTopLevel, int stidLabel, int flid, FldType ft, int stidHelp, HVO hvoPssl, PossNameType pnt = kpntName, bool fHier = false, bool fVert = false, int ws = kwsAnal, FldVis vis = kFTVisAlways, FldReq req = kFTReqNotReq, LPCOLESTR pszSty = L"", bool fCustFld = false, bool fHideLabel = false); void AddHierField(bool fTopLevel, int stidLabel, int flid, int ws = kwsAnal, int stidHelp = 0, OutlineNumSty ons = konsNone, bool fExpand = false, FldVis vis = kFTVisAlways, FldReq req = kFTReqNotReq, LPCOLESTR pszSty = L"", bool fCustFld = false, bool fHideLabel = false); *******/ /// <summary> /// Make a deep copy of a UserViewRec. /// </summary> /// <returns>A deep copy of a UserViewRec, but with new database IDs for all objects.</returns> internal IUserViewRec Clone(IUserView uvCloneOwner) { UserViewRec uvrClone = (UserViewRec)uvCloneOwner.RecordsOC.Add(new UserViewRec()); Debug.Assert(uvrClone != null); uvrClone.Clsid = Clsid; // Not used yet. uvrClone.Details = Details; uvrClone.Level = Level; uvrClone.ViewType = ViewType; // Clone each "BlockSpec". foreach (UserViewField uvfBlock in BlockSpecs) { IUserViewField uvfBlockClone = uvfBlock.Clone(uvrClone); foreach (UserViewField uvfSubfield in uvfBlock.Subfields) { IUserViewField uvfSfClone = uvfSubfield.Clone(uvrClone, uvfBlockClone.Hvo); } } return uvrClone as IUserViewRec; }
public void AddUser(IUserView usr) { UserDataFactory.AddUser(usr); }
// // GET: /Admin/Account/ public AccountController(IAuthenticationService authenticationService, ICommandBus commandBus, IUserView userView) { _authenticationService = authenticationService; _commandBus = commandBus; _userView = userView; }
/// <summary> /// Add a UserView to the collection. /// </summary> /// <param name="uv">The UserView to add.</param> public IUserView Add(IUserView uv) { Debug.Assert(uv != null); IUserView uvAdd = (IUserView)ValidateObject(uv); List.Add(uvAdd); return uvAdd; }
/// <summary> /// Initializes a new instance of the <see cref="Userpresenter"/> class. /// </summary> /// <param name="view"> /// The view. /// </param> /// <param name="model"> /// The model. /// </param> public Userpresenter(IUserView view,IUserModel model) { this.m_view = view; this.m_model = model; }
/// ------------------------------------------------------------------------------------ /// <summary> /// /// </summary> /// <param name="disposing"></param> /// ------------------------------------------------------------------------------------ protected override void Dispose(bool disposing) { if (IsDisposed) return; base.Dispose (disposing); if (disposing) { if (m_vc != null) m_vc.Dispose(); } m_vc = null; m_baseInfoBarCaption = null; m_scr = null; m_UserView = null; }
public UserViewModel(IUserView view, CompositionContainer compositionContainer) { View = view; View.ViewModel = this; ShellContainer = compositionContainer; NewHardwareCommand = new CommandHandler<object, object>(NewHardwareCommandAction); EditHardwareCommand = new CommandHandler<object, object>(EditHardwareCommandAction); DeleteHardwareCommand = new CommandHandler<object, object>(DeleteHardwareCommandAction); _userCollection = new Lazy<OptimizedObservableCollection<User>>(); }
public void AddUser(IUserView usr) { _dataLayerManager.AddUser(usr); }
public AuthenticationService(IUserView userView) { _userView = userView; }