This commit is contained in:
Vitaliy
2017-01-10 21:06:47 +03:00
parent 6ead62af6e
commit 2bbf0580f7
44 changed files with 565 additions and 893 deletions

View File

@@ -1,6 +1,4 @@
using AppleJobs.Data.Models.ModelsJobs;
using System.Windows.Controls;
using System.Windows.Input;
using System.Windows.Controls;
namespace JetFrames.AppleJobs.Editor.Views
{
@@ -12,21 +10,7 @@ namespace JetFrames.AppleJobs.Editor.Views
public ModelJobPriceTemplates()
{
InitializeComponent();
}
private void DataGrid_PreviewCanExecute(object sender, CanExecuteRoutedEventArgs e)
{
if (e.Command == DataGrid.DeleteCommand)
e.Handled = App.Locator.Editor.DeleteEntity(((DataGrid)sender).SelectedItems, true);
}
private void DataGrid_InitializingNewItem(object sender, InitializingNewItemEventArgs e)
{
if (e.NewItem is ModelJobPriceTemplate)
{
var mjpt = (ModelJobPriceTemplate)e.NewItem;
mjpt.Customers_Id = 1;
}
App.Locator.Editor.AddEntity(e.NewItem);
EditorViewModel.InitGrid(dg);
}
}
}