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 ClickOnSave(object sender, RoutedEventArgs e) { ReadData(_productCategory); if (_productCategory.Id > 0) { using (var dbContext = new FarnahadManufacturingDbContext()) { dbContext.Entry(_productCategory).State = EntityState.Modified; dbContext.SaveChanges(); } } else { using (var dbContext = new FarnahadManufacturingDbContext()) { _productCategory.CreatedByUserId = ApplicationSessionService.GetActiveUserId(); _productCategory.CreatedDateTime = ApplicationSessionService.GetNowDateTime(); dbContext.ProductCategories.Add(_productCategory); dbContext.SaveChanges(); } } WindowService.CloseUserControlDialogWindow(this); }
private void CloseWindow() { WindowService.CloseUserControlDialogWindow(this); }
private void ClickOnCancel(object sender, RoutedEventArgs e) { WindowService.CloseUserControlDialogWindow(this); }
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); }