private void SaveButtonOnClick(object sender, RoutedEventArgs e) { ReadData(_activeCarrierService); if (_activeCarrierService.Id <= 0) { _activeCarrierService.CreatedByUserId = ApplicationSessionService.GetActiveUserId(); _activeCarrierService.CreatedDateTime = ApplicationSessionService.GetNowDateTime(); } ApplicationDataStore.SendData("CarrierService", _activeCarrierService); WindowService.CloseUserControlDialogWindow(this); }
private void SaveButtonOnClick(object sender, RoutedEventArgs e) { if (NewPasswordTextEdit.Text == RepeatNewPasswordTextEdit.Text) { if (_activeUserId > 0) { using (var dbContext = new FarnahadManufacturingDbContext()) { var user = dbContext.Users.Find(_activeUserId); var password = EncryptionUtility.EncryptPassword(CurrentPasswordTextEdit.Text, user.PasswordSalt); if (user.Password == password) { ApplicationDataStore.SendData("CurrentPassword", password); ApplicationDataStore.SendData("CurrentPasswordSalt", user.PasswordSalt); CloseWindow(); } else { MessageBox.Show("رمز عبور اشتباه است."); } } } else { var passwordSalt = Guid.NewGuid().ToString(); var password = EncryptionUtility.EncryptPassword(NewPasswordTextEdit.Text, passwordSalt); ApplicationDataStore.SendData("CurrentPassword", password); ApplicationDataStore.SendData("CurrentPasswordSalt", passwordSalt); } } else { MessageBox.Show("رمز عبور غیر یکسان است."); } }
private void ClickOnSave(object sender, RoutedEventArgs e) { ReadData(_productSubstitute); ApplicationDataStore.SendData("IsAddedOrChanged", true); WindowService.CloseUserControlDialogWindow(this); }
private void SaveButtonOnClick(object sender, RoutedEventArgs e) { ReadData(_partReorderInformation); ApplicationDataStore.SendData("IsAddedOrChanged", true); WindowService.CloseUserControlDialogWindow(this); }