public void OnSubmit() { Operation = new Operation { CompanyId = SelectedCompany.Id, LocationId = SelectedLocation.Id, Name = ToUserFromStore.Name, Surname = ToUserFromStore.Surname, OperationTypeId = OperationTypeEnums.DepodanKullaniciya, StoreId = ToUserFromStore.StoreId, UserId = LoggedInUser.LoggedUser.Id, UpdatededDate = DateTime.Now, Guncel = true }; var result = OperationBll.AddOrUpdate(Operation); if (result) { MessageBox.Show("Kayıt Girildi", "Bilgilendirme Mesajı", MessageBoxButton.OK, MessageBoxImage.Information); var store = StoreBll.GetByFilter(x => x.InventoryNumber == ToUserFromStore.InventoryNumber); store.Kullanimda = true; store.StatusId = StatusEnums.Kullanimda; result = StoreBll.AddOrUpdate(store); } }
public void OnSubmit() { if (ChangeUserModel.Name != _searchOperation.Name || ChangeUserModel.Surname != _searchOperation.Surname) { Operation = new Operation { CompanyId = SelectedCompany.Id, LocationId = SelectedLocation.Id, Name = ChangeUserModel.Name, Surname = ChangeUserModel.Surname, OperationTypeId = OperationTypeEnums.KullaniciDegistir, StoreId = ChangeUserModel.StoreId, UserId = LoggedInUser.LoggedUser.Id, UpdatededDate = DateTime.Now, Guncel = true }; } var result = OperationBll.AddOrUpdate(Operation); if (result) { MessageBox.Show("Kayıt Girildi", "Bilgilendirme Mesajı", MessageBoxButton.OK, MessageBoxImage.Information); var oldOperation = OperationBll.GetByFilter(x => x.Id == _searchOperation.Id); oldOperation.Guncel = false; result = OperationBll.AddOrUpdate(oldOperation); onClean(); } }