diff --git a/AppleJobs.Data/AppleJobs.Data.csproj b/AppleJobs.Data/AppleJobs.Data.csproj
index 3a02a15..99a68b9 100644
--- a/AppleJobs.Data/AppleJobs.Data.csproj
+++ b/AppleJobs.Data/AppleJobs.Data.csproj
@@ -77,8 +77,10 @@
+
+
-
+
diff --git a/AppleJobs.Data/AppleJobsContext.cs b/AppleJobs.Data/AppleJobsContext.cs
index 25a699d..f9118f1 100644
--- a/AppleJobs.Data/AppleJobsContext.cs
+++ b/AppleJobs.Data/AppleJobsContext.cs
@@ -1,8 +1,10 @@
-using AppleJobs.Data.Models;
+using AppleJobs.Data.Models.Articles;
+using AppleJobs.Data.Models.Common;
+using AppleJobs.Data.Models.Inventory;
using AppleJobs.Data.Models.ModelsJobs;
+using AppleJobs.Data.Models.Orders;
using Microsoft.AspNet.Identity.EntityFramework;
using MySql.Data.Entity;
-using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
namespace AppleJobs.Data
@@ -41,6 +43,13 @@ namespace AppleJobs.Data
#endregion
+ #region Articles / News
+
+ public DbSet News { get; set; }
+ public DbSet NewsCategories { get; set; }
+
+ #endregion
+
public AppleJobsContext(string connection = "Default") : base(connection)
{
}
diff --git a/AppleJobs.Data/Models/Articles/News.cs b/AppleJobs.Data/Models/Articles/News.cs
new file mode 100644
index 0000000..ca71eb9
--- /dev/null
+++ b/AppleJobs.Data/Models/Articles/News.cs
@@ -0,0 +1,25 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace AppleJobs.Data.Models.Articles
+{
+ [Table("ApjNews")]
+ public class News
+ {
+ [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int Id { get; set; }
+ public string Title { get; set; }
+ public string Content { get; set; }
+ public int OrderIndex { get; set; }
+ public int CharCount { get; set; }
+ public DateTime Date { get; set; }
+ public string State { get; set; }
+ public int CategoryId { get; set; }
+
+ [ForeignKey(nameof(CategoryId))]
+ public virtual NewsCategory NewsCategory { get; set; }
+
+ public string FilterString { get { return string.Join(",", Title, Content, OrderIndex, CharCount, Date, State, NewsCategory.CategoryDescription); } }
+ }
+}
diff --git a/AppleJobs.Data/Models/Articles/NewsCategory.cs b/AppleJobs.Data/Models/Articles/NewsCategory.cs
new file mode 100644
index 0000000..7e30bec
--- /dev/null
+++ b/AppleJobs.Data/Models/Articles/NewsCategory.cs
@@ -0,0 +1,15 @@
+using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations.Schema;
+
+namespace AppleJobs.Data.Models.Articles
+{
+ [Table("ApjNewsCategory")]
+ public class NewsCategory
+ {
+ [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
+ public int Id { get; set; }
+ public string CategoryName { get; set; }
+ public string CategoryDescription { get; set; }
+
+ }
+}
diff --git a/AppleJobs.Data/Models/Customer.cs b/AppleJobs.Data/Models/Common/Customer.cs
similarity index 89%
rename from AppleJobs.Data/Models/Customer.cs
rename to AppleJobs.Data/Models/Common/Customer.cs
index 690d2e7..40eed64 100644
--- a/AppleJobs.Data/Models/Customer.cs
+++ b/AppleJobs.Data/Models/Common/Customer.cs
@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-namespace AppleJobs.Data.Models.ModelsJobs
+namespace AppleJobs.Data.Models.Common
{
public class Customer
{
@@ -10,5 +10,6 @@ namespace AppleJobs.Data.Models.ModelsJobs
public string Name { get; set; }
public string Code { get; set; }
public string MainEmail { get; set; }
+
}
}
diff --git a/AppleJobs.Data/Models/Inventory/Accessories.cs b/AppleJobs.Data/Models/Inventory/Accessories.cs
index be9f2ed..129c80f 100644
--- a/AppleJobs.Data/Models/Inventory/Accessories.cs
+++ b/AppleJobs.Data/Models/Inventory/Accessories.cs
@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-namespace AppleJobs.Data.Models
+namespace AppleJobs.Data.Models.Inventory
{
public class Accessories
{
diff --git a/AppleJobs.Data/Models/Inventory/Employee.cs b/AppleJobs.Data/Models/Inventory/Employee.cs
index cddaf4d..1516625 100644
--- a/AppleJobs.Data/Models/Inventory/Employee.cs
+++ b/AppleJobs.Data/Models/Inventory/Employee.cs
@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-namespace AppleJobs.Data.Models
+namespace AppleJobs.Data.Models.Inventory
{
public class Employee
{
diff --git a/AppleJobs.Data/Models/ModelsJobs/Model.cs b/AppleJobs.Data/Models/ModelsJobs/Model.cs
index 2146ff5..c988b03 100644
--- a/AppleJobs.Data/Models/ModelsJobs/Model.cs
+++ b/AppleJobs.Data/Models/ModelsJobs/Model.cs
@@ -4,6 +4,7 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace AppleJobs.Data.Models.ModelsJobs
{
+ [TsModel]
public class Model
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
diff --git a/AppleJobs.Data/Models/ModelsJobs/ModelCategory.cs b/AppleJobs.Data/Models/ModelsJobs/ModelCategory.cs
index 3d3ca20..6fd9234 100644
--- a/AppleJobs.Data/Models/ModelsJobs/ModelCategory.cs
+++ b/AppleJobs.Data/Models/ModelsJobs/ModelCategory.cs
@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace AppleJobs.Data.Models.ModelsJobs
{
+ [TsModel]
public class ModelCategory
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
diff --git a/AppleJobs.Data/Models/ModelsJobs/ModelJob.cs b/AppleJobs.Data/Models/ModelsJobs/ModelJob.cs
index 0ecd89f..863a509 100644
--- a/AppleJobs.Data/Models/ModelsJobs/ModelJob.cs
+++ b/AppleJobs.Data/Models/ModelsJobs/ModelJob.cs
@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations.Schema;
namespace AppleJobs.Data.Models.ModelsJobs
{
+ [TsModel]
public class ModelJob
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
diff --git a/AppleJobs.Data/Models/ModelsJobs/ModelJobPriceTemplate.cs b/AppleJobs.Data/Models/ModelsJobs/ModelJobPriceTemplate.cs
index 8430e9d..14078c9 100644
--- a/AppleJobs.Data/Models/ModelsJobs/ModelJobPriceTemplate.cs
+++ b/AppleJobs.Data/Models/ModelsJobs/ModelJobPriceTemplate.cs
@@ -1,8 +1,10 @@
-using System.ComponentModel.DataAnnotations;
+using AppleJobs.Data.Models.Common;
+using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace AppleJobs.Data.Models.ModelsJobs
{
+ [TsModel]
public class ModelJobPriceTemplate
{
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
diff --git a/AppleJobs.Data/Models/Orders/Order.cs b/AppleJobs.Data/Models/Orders/Order.cs
index ca6a356..c539a6a 100644
--- a/AppleJobs.Data/Models/Orders/Order.cs
+++ b/AppleJobs.Data/Models/Orders/Order.cs
@@ -1,9 +1,11 @@
-using AppleJobs.Data.Models.ModelsJobs;
+using AppleJobs.Data.Models.Common;
+using AppleJobs.Data.Models.Inventory;
+using AppleJobs.Data.Models.ModelsJobs;
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-namespace AppleJobs.Data.Models
+namespace AppleJobs.Data.Models.Orders
{
[TsModel]
public class OrderView
@@ -60,12 +62,14 @@ namespace AppleJobs.Data.Models
public bool? IsDrive { get; set; }
public int? Price { get; set; }
+ #region ForeignKeys
public int OrderStatuses_Id { get; set; }
public int Models_Id { get; set; }
public int? ModelJobs_Id { get; set; }
public int Customers_Id { get; set; }
public int? Accessories_Id { get; set; }
public int? Employees_Id { get; set; }
+ #endregion
[ForeignKey(nameof(OrderStatuses_Id))]
@@ -90,14 +94,8 @@ namespace AppleJobs.Data.Models
{
get
{
- return string.Format("{0},{1},{2},{3},{4},{5},{6},{7},{8},{9},{10}",
- Contact, Comment, DateCreated, DateClosed, DateUpdated,
- OrderStatus?.Name,
- Model.FilterString,
- JobModel.FilterString,
- Customer?.Name,
- Accessories?.Name,
- Employee?.Name);
+ return string.Join(",", Contact, Comment, DateCreated, DateClosed, DateUpdated,
+ OrderStatus?.Name, Model.FilterString, JobModel.FilterString, Customer?.Name, Accessories?.Name, Employee?.Name, Price);
}
}
}
diff --git a/AppleJobs.Data/Models/Orders/OrderCategory.cs b/AppleJobs.Data/Models/Orders/OrderCategory.cs
index 8910a62..e6596ec 100644
--- a/AppleJobs.Data/Models/Orders/OrderCategory.cs
+++ b/AppleJobs.Data/Models/Orders/OrderCategory.cs
@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-namespace AppleJobs.Data.Models
+namespace AppleJobs.Data.Models.Orders
{
[TsModel]
public class OrderCategory
diff --git a/AppleJobs.Data/Models/Orders/OrderStatus.cs b/AppleJobs.Data/Models/Orders/OrderStatus.cs
index 3f3004a..190f14b 100644
--- a/AppleJobs.Data/Models/Orders/OrderStatus.cs
+++ b/AppleJobs.Data/Models/Orders/OrderStatus.cs
@@ -1,7 +1,7 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
-namespace AppleJobs.Data.Models
+namespace AppleJobs.Data.Models.Orders
{
[TsModel]
[Table("OrderStatuses")]
diff --git a/BrightSharp/Behaviors/FiterGridTextBoxBehavior.cs b/BrightSharp/Behaviors/FiterGridTextBoxBehavior.cs
index 350765e..108e337 100644
--- a/BrightSharp/Behaviors/FiterGridTextBoxBehavior.cs
+++ b/BrightSharp/Behaviors/FiterGridTextBoxBehavior.cs
@@ -17,7 +17,8 @@ namespace BrightSharp.Behaviors
{
timer.Tick += Timer_Tick;
FilterDelay = TimeSpan.FromSeconds(1);
- IgnoreCase = null;
+ IgnoreCase = null; //Case sensitive if any char upper case
+ FilterStringPropertyName = "FilterString";
}
@@ -36,7 +37,7 @@ namespace BrightSharp.Behaviors
}
}
-
+ public string FilterStringPropertyName { get; set; }
public bool HasFilterText
{
@@ -59,12 +60,12 @@ namespace BrightSharp.Behaviors
public static readonly DependencyProperty ItemsSourceProperty =
DependencyProperty.Register("ItemsSource", typeof(IEnumerable), typeof(FilterDefaultViewTextBoxBehavior), new PropertyMetadata(null));
-
+
public bool? IgnoreCase { get; set; }
private Predicate
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/JetFrames.AppleJobs.Editor/MainWindow.xaml.cs b/JetFrames.AppleJobs.Editor/MainWindow.xaml.cs
index eadf379..f2a94cd 100644
--- a/JetFrames.AppleJobs.Editor/MainWindow.xaml.cs
+++ b/JetFrames.AppleJobs.Editor/MainWindow.xaml.cs
@@ -1,50 +1,34 @@
-using AppleJobs.Data.Models.ModelsJobs;
-using System.ComponentModel;
+using BrightSharp;
using System.Windows;
using System.Windows.Controls;
-using System.Windows.Input;
namespace JetFrames.AppleJobs.Editor
{
- ///
- /// Interaction logic for MainWindow.xaml
- ///
public partial class MainWindow : Window
{
public MainWindow()
{
- DataContext = App.Locator;
InitializeComponent();
- Loaded += (s, e) => App.Locator.Editor.OnLoaded();
}
- private void DataGrid_PreviewCanExecute(object sender, CanExecuteRoutedEventArgs e)
- {
- var dg = (DataGrid)sender;
- if (e.Command == DataGrid.DeleteCommand)
- e.Handled = App.Locator.Editor.DeleteEntity(dg.SelectedValue, true);
+ private void MenuItem_Click(object sender, RoutedEventArgs e)
+ {
+ ThemeManager.Theme = (ColorThemes)((FrameworkElement)e.OriginalSource).DataContext;
}
- private void DataGrid_InitializingNewItem(object sender, InitializingNewItemEventArgs e)
+ private void TreeView_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs e)
{
- if (e.NewItem is ModelJobPriceTemplate)
+ var item = (TreeViewItem)e.NewValue;
+ var tabitem = (TabItem)item.Tag;
+ if (tabitem != null)
{
- var mjpt = (ModelJobPriceTemplate)e.NewItem;
- mjpt.Customers_Id = 1;
+ if (!tabs.Items.Contains(tabitem))
+ {
+ tabs.Items.Add(tabitem);
+ }
+ tabs.SelectedItem = tabitem;
}
- App.Locator.Editor.AddEntity(e.NewItem);
- }
-
- protected override void OnClosing(CancelEventArgs e)
- {
- Properties.Settings.Default.Save();
- base.OnClosing(e);
- }
-
- private void TabControl_SelectionChanged(object sender, SelectionChangedEventArgs e)
- {
- ((TabItem)((TabControl)sender).SelectedItem).DataContext = App.Locator;
}
}
}
diff --git a/JetFrames.AppleJobs.Editor/Properties/Settings.Designer.cs b/JetFrames.AppleJobs.Editor/Properties/Settings.Designer.cs
index 6732eed..9fc9388 100644
--- a/JetFrames.AppleJobs.Editor/Properties/Settings.Designer.cs
+++ b/JetFrames.AppleJobs.Editor/Properties/Settings.Designer.cs
@@ -22,341 +22,5 @@ namespace JetFrames.AppleJobs.Editor.Properties {
return defaultInstance;
}
}
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0")]
- public double Grid01LayoutX {
- get {
- return ((double)(this["Grid01LayoutX"]));
- }
- set {
- this["Grid01LayoutX"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0")]
- public double Grid01LayoutY {
- get {
- return ((double)(this["Grid01LayoutY"]));
- }
- set {
- this["Grid01LayoutY"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("NaN")]
- public double Grid01LayoutWidth {
- get {
- return ((double)(this["Grid01LayoutWidth"]));
- }
- set {
- this["Grid01LayoutWidth"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("NaN")]
- public double Grid01LayoutHeight {
- get {
- return ((double)(this["Grid01LayoutHeight"]));
- }
- set {
- this["Grid01LayoutHeight"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("100")]
- public double Grid02LayoutX {
- get {
- return ((double)(this["Grid02LayoutX"]));
- }
- set {
- this["Grid02LayoutX"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("200")]
- public double Grid03LayoutX {
- get {
- return ((double)(this["Grid03LayoutX"]));
- }
- set {
- this["Grid03LayoutX"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("300")]
- public double Grid04LayoutX {
- get {
- return ((double)(this["Grid04LayoutX"]));
- }
- set {
- this["Grid04LayoutX"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("100")]
- public double Grid02LayoutY {
- get {
- return ((double)(this["Grid02LayoutY"]));
- }
- set {
- this["Grid02LayoutY"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("200")]
- public double Grid03LayoutY {
- get {
- return ((double)(this["Grid03LayoutY"]));
- }
- set {
- this["Grid03LayoutY"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("300")]
- public double Grid04LayoutY {
- get {
- return ((double)(this["Grid04LayoutY"]));
- }
- set {
- this["Grid04LayoutY"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("NaN")]
- public double Grid02LayoutWidth {
- get {
- return ((double)(this["Grid02LayoutWidth"]));
- }
- set {
- this["Grid02LayoutWidth"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("NaN")]
- public double Grid03LayoutWidth {
- get {
- return ((double)(this["Grid03LayoutWidth"]));
- }
- set {
- this["Grid03LayoutWidth"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("NaN")]
- public double Grid04LayoutWidth {
- get {
- return ((double)(this["Grid04LayoutWidth"]));
- }
- set {
- this["Grid04LayoutWidth"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("NaN")]
- public double Grid02LayoutHeight {
- get {
- return ((double)(this["Grid02LayoutHeight"]));
- }
- set {
- this["Grid02LayoutHeight"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("NaN")]
- public double Grid03LayoutHeight {
- get {
- return ((double)(this["Grid03LayoutHeight"]));
- }
- set {
- this["Grid03LayoutHeight"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("NaN")]
- public double Grid04LayoutHeight {
- get {
- return ((double)(this["Grid04LayoutHeight"]));
- }
- set {
- this["Grid04LayoutHeight"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool Grid01Expanded {
- get {
- return ((bool)(this["Grid01Expanded"]));
- }
- set {
- this["Grid01Expanded"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool Grid02Expanded {
- get {
- return ((bool)(this["Grid02Expanded"]));
- }
- set {
- this["Grid02Expanded"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool Grid03Expanded {
- get {
- return ((bool)(this["Grid03Expanded"]));
- }
- set {
- this["Grid03Expanded"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool Grid04Expanded {
- get {
- return ((bool)(this["Grid04Expanded"]));
- }
- set {
- this["Grid04Expanded"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0")]
- public double ZoomPadX {
- get {
- return ((double)(this["ZoomPadX"]));
- }
- set {
- this["ZoomPadX"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0")]
- public double ZoomPadY {
- get {
- return ((double)(this["ZoomPadY"]));
- }
- set {
- this["ZoomPadY"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("1")]
- public double Zoom {
- get {
- return ((double)(this["Zoom"]));
- }
- set {
- this["Zoom"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("True")]
- public bool Grid05Expanded {
- get {
- return ((bool)(this["Grid05Expanded"]));
- }
- set {
- this["Grid05Expanded"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("400")]
- public double Grid05LayoutX {
- get {
- return ((double)(this["Grid05LayoutX"]));
- }
- set {
- this["Grid05LayoutX"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("0")]
- public double Grid05LayoutY {
- get {
- return ((double)(this["Grid05LayoutY"]));
- }
- set {
- this["Grid05LayoutY"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("NaN")]
- public double Grid05LayoutWidth {
- get {
- return ((double)(this["Grid05LayoutWidth"]));
- }
- set {
- this["Grid05LayoutWidth"] = value;
- }
- }
-
- [global::System.Configuration.UserScopedSettingAttribute()]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Configuration.DefaultSettingValueAttribute("NaN")]
- public double Grid05LayoutHeight {
- get {
- return ((double)(this["Grid05LayoutHeight"]));
- }
- set {
- this["Grid05LayoutHeight"] = value;
- }
- }
}
}
diff --git a/JetFrames.AppleJobs.Editor/Properties/Settings.settings b/JetFrames.AppleJobs.Editor/Properties/Settings.settings
index 4e5b8df..8e615f2 100644
--- a/JetFrames.AppleJobs.Editor/Properties/Settings.settings
+++ b/JetFrames.AppleJobs.Editor/Properties/Settings.settings
@@ -1,90 +1,5 @@
-
+
-
-
- 0
-
-
- 0
-
-
- NaN
-
-
- NaN
-
-
- 100
-
-
- 200
-
-
- 300
-
-
- 100
-
-
- 200
-
-
- 300
-
-
- NaN
-
-
- NaN
-
-
- NaN
-
-
- NaN
-
-
- NaN
-
-
- NaN
-
-
- True
-
-
- True
-
-
- True
-
-
- True
-
-
- 0
-
-
- 0
-
-
- 1
-
-
- True
-
-
- 400
-
-
- 0
-
-
- NaN
-
-
- NaN
-
-
+
\ No newline at end of file
diff --git a/JetFrames.AppleJobs.Editor/Settings.cs b/JetFrames.AppleJobs.Editor/Settings.cs
deleted file mode 100644
index be6c31a..0000000
--- a/JetFrames.AppleJobs.Editor/Settings.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-namespace JetFrames.AppleJobs.Editor.Properties {
-
-
- // This class allows you to handle specific events on the settings class:
- // The SettingChanging event is raised before a setting's value is changed.
- // The PropertyChanged event is raised after a setting's value is changed.
- // The SettingsLoaded event is raised after the setting values are loaded.
- // The SettingsSaving event is raised before the setting values are saved.
- public sealed partial class Settings {
-
- public Settings() {
- // // To add event handlers for saving and changing settings, uncomment the lines below:
- //
- // this.SettingChanging += this.SettingChangingEventHandler;
- //
- // this.SettingsSaving += this.SettingsSavingEventHandler;
- //
- }
-
- private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) {
- // Add code to handle the SettingChangingEvent event here.
- }
-
- private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) {
- // Add code to handle the SettingsSaving event here.
- }
- }
-}
diff --git a/JetFrames.AppleJobs.Editor/ViewModelLocator.cs b/JetFrames.AppleJobs.Editor/ViewModelLocator.cs
index b2377b6..350a8ed 100644
--- a/JetFrames.AppleJobs.Editor/ViewModelLocator.cs
+++ b/JetFrames.AppleJobs.Editor/ViewModelLocator.cs
@@ -27,7 +27,6 @@ namespace JetFrames.AppleJobs.Editor
}
public EditorViewModel Editor { get; private set; }
-
- public Properties.Settings Settings { get { return Properties.Settings.Default; } }
+
}
}
diff --git a/JetFrames.AppleJobs.Editor/Views/Accessories.xaml b/JetFrames.AppleJobs.Editor/Views/Accessories.xaml
new file mode 100644
index 0000000..d0fca06
--- /dev/null
+++ b/JetFrames.AppleJobs.Editor/Views/Accessories.xaml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
diff --git a/JetFrames.AppleJobs.Editor/Views/Accessories.xaml.cs b/JetFrames.AppleJobs.Editor/Views/Accessories.xaml.cs
new file mode 100644
index 0000000..793063b
--- /dev/null
+++ b/JetFrames.AppleJobs.Editor/Views/Accessories.xaml.cs
@@ -0,0 +1,27 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace JetFrames.AppleJobs.Editor.Views
+{
+ public partial class Accessories : UserControl
+ {
+ public Accessories()
+ {
+ InitializeComponent();
+ EditorViewModel.InitGrid(dg);
+ }
+
+ }
+}
diff --git a/JetFrames.AppleJobs.Editor/Views/ModelCategories.xaml b/JetFrames.AppleJobs.Editor/Views/ModelCategories.xaml
index a8148c9..2667c13 100644
--- a/JetFrames.AppleJobs.Editor/Views/ModelCategories.xaml
+++ b/JetFrames.AppleJobs.Editor/Views/ModelCategories.xaml
@@ -7,8 +7,7 @@
mc:Ignorable="d" d:DataContext="{StaticResource ViewModelLocator}"
d:DesignHeight="300" d:DesignWidth="300">
-
diff --git a/JetFrames.AppleJobs.Editor/Views/ModelCategories.xaml.cs b/JetFrames.AppleJobs.Editor/Views/ModelCategories.xaml.cs
index 2b5f7f4..5c838ee 100644
--- a/JetFrames.AppleJobs.Editor/Views/ModelCategories.xaml.cs
+++ b/JetFrames.AppleJobs.Editor/Views/ModelCategories.xaml.cs
@@ -11,17 +11,7 @@ namespace JetFrames.AppleJobs.Editor.Views
public ModelCategories()
{
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)
- {
- App.Locator.Editor.AddEntity(e.NewItem);
+ EditorViewModel.InitGrid(dg);
}
}
}
diff --git a/JetFrames.AppleJobs.Editor/Views/ModelJobPriceTemplates.xaml b/JetFrames.AppleJobs.Editor/Views/ModelJobPriceTemplates.xaml
index 0bf3678..d935e4b 100644
--- a/JetFrames.AppleJobs.Editor/Views/ModelJobPriceTemplates.xaml
+++ b/JetFrames.AppleJobs.Editor/Views/ModelJobPriceTemplates.xaml
@@ -7,7 +7,7 @@
mc:Ignorable="d" d:DataContext="{StaticResource ViewModelLocator}"
d:DesignHeight="300" d:DesignWidth="774">
-
+ ClipboardContentBinding="{Binding IsPriceFrom}" />
diff --git a/JetFrames.AppleJobs.Editor/Views/ModelJobPriceTemplates.xaml.cs b/JetFrames.AppleJobs.Editor/Views/ModelJobPriceTemplates.xaml.cs
index dfb9dd8..b5a41e2 100644
--- a/JetFrames.AppleJobs.Editor/Views/ModelJobPriceTemplates.xaml.cs
+++ b/JetFrames.AppleJobs.Editor/Views/ModelJobPriceTemplates.xaml.cs
@@ -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);
}
}
}
diff --git a/JetFrames.AppleJobs.Editor/Views/ModelJobs.xaml b/JetFrames.AppleJobs.Editor/Views/ModelJobs.xaml
index ea5dd9e..a82d71b 100644
--- a/JetFrames.AppleJobs.Editor/Views/ModelJobs.xaml
+++ b/JetFrames.AppleJobs.Editor/Views/ModelJobs.xaml
@@ -7,16 +7,16 @@
mc:Ignorable="d" d:DataContext="{StaticResource ViewModelLocator}"
d:DesignHeight="300" d:DesignWidth="527">
-
+ ClipboardContentBinding="{Binding Model.Name}"
+ ItemsSource="{Binding Source={StaticResource ViewModelLocator}, Path=Editor.Models}"
+ DisplayMemberPath="Name" Header="Модель" Width="120" SortMemberPath="Model.Name"
+ EditingElementStyle="{StaticResource {x:Type ComboBox}}"/>
diff --git a/JetFrames.AppleJobs.Editor/Views/ModelJobs.xaml.cs b/JetFrames.AppleJobs.Editor/Views/ModelJobs.xaml.cs
index 4f90342..a912f5f 100644
--- a/JetFrames.AppleJobs.Editor/Views/ModelJobs.xaml.cs
+++ b/JetFrames.AppleJobs.Editor/Views/ModelJobs.xaml.cs
@@ -23,16 +23,7 @@ namespace JetFrames.AppleJobs.Editor.Views
public ModelJobs()
{
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)
- {
- App.Locator.Editor.AddEntity(e.NewItem);
+ EditorViewModel.InitGrid(dg);
}
}
}
diff --git a/JetFrames.AppleJobs.Editor/Views/Models.xaml b/JetFrames.AppleJobs.Editor/Views/Models.xaml
index 85ebe60..e1d9f5c 100644
--- a/JetFrames.AppleJobs.Editor/Views/Models.xaml
+++ b/JetFrames.AppleJobs.Editor/Views/Models.xaml
@@ -7,15 +7,15 @@
mc:Ignorable="d" d:DataContext="{StaticResource ViewModelLocator}"
d:DesignHeight="300" d:DesignWidth="300">
-
+
+ ClipboardContentBinding="{Binding ModelCategory.Name}"
+ ItemsSource="{Binding Source={StaticResource ViewModelLocator}, Path=Editor.Categories}"
+ DisplayMemberPath="Name" Header="Категория" Width="120" SortMemberPath="ModelCategory.Name"
+ EditingElementStyle="{StaticResource {x:Type ComboBox}}" />
diff --git a/JetFrames.AppleJobs.Editor/Views/Models.xaml.cs b/JetFrames.AppleJobs.Editor/Views/Models.xaml.cs
index 91734ed..241b4f7 100644
--- a/JetFrames.AppleJobs.Editor/Views/Models.xaml.cs
+++ b/JetFrames.AppleJobs.Editor/Views/Models.xaml.cs
@@ -23,16 +23,7 @@ namespace JetFrames.AppleJobs.Editor.Views
public Models()
{
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)
- {
- App.Locator.Editor.AddEntity(e.NewItem);
+ EditorViewModel.InitGrid(dg);
}
}
}
diff --git a/JetFrames.AppleJobs.Editor/Views/NewPriceTemplateDialog.xaml b/JetFrames.AppleJobs.Editor/Views/NewPriceTemplateDialog.xaml
index 5e148d9..a429eaa 100644
--- a/JetFrames.AppleJobs.Editor/Views/NewPriceTemplateDialog.xaml
+++ b/JetFrames.AppleJobs.Editor/Views/NewPriceTemplateDialog.xaml
@@ -4,7 +4,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:JetFrames.AppleJobs.Editor.Views"
- WindowStartupLocation="CenterScreen"
+ WindowStartupLocation="CenterScreen" ResizeMode="NoResize"
mc:Ignorable="d" WindowStyle="ToolWindow" ShowInTaskbar="False" Title="Новая расценка"
Height="239" Width="324">
diff --git a/JetFrames.AppleJobs.Editor/Views/News.xaml b/JetFrames.AppleJobs.Editor/Views/News.xaml
new file mode 100644
index 0000000..05619c1
--- /dev/null
+++ b/JetFrames.AppleJobs.Editor/Views/News.xaml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/JetFrames.AppleJobs.Editor/Views/News.xaml.cs b/JetFrames.AppleJobs.Editor/Views/News.xaml.cs
new file mode 100644
index 0000000..a8afa14
--- /dev/null
+++ b/JetFrames.AppleJobs.Editor/Views/News.xaml.cs
@@ -0,0 +1,17 @@
+using System.Windows.Controls;
+using System.Windows.Input;
+
+namespace JetFrames.AppleJobs.Editor.Views
+{
+ ///
+ /// Interaction logic for News.xaml
+ ///
+ public partial class News : UserControl
+ {
+ public News()
+ {
+ InitializeComponent();
+ EditorViewModel.InitGrid(dg);
+ }
+ }
+}
diff --git a/JetFrames.AppleJobs.Editor/Views/NewsCategories.xaml b/JetFrames.AppleJobs.Editor/Views/NewsCategories.xaml
new file mode 100644
index 0000000..eaf7361
--- /dev/null
+++ b/JetFrames.AppleJobs.Editor/Views/NewsCategories.xaml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/JetFrames.AppleJobs.Editor/Views/NewsCategories.xaml.cs b/JetFrames.AppleJobs.Editor/Views/NewsCategories.xaml.cs
new file mode 100644
index 0000000..30d57e7
--- /dev/null
+++ b/JetFrames.AppleJobs.Editor/Views/NewsCategories.xaml.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace JetFrames.AppleJobs.Editor.Views
+{
+ ///
+ /// Interaction logic for NewsCategories.xaml
+ ///
+ public partial class NewsCategories : UserControl
+ {
+ public NewsCategories()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff --git a/JetFrames.AppleJobs.Editor/Views/Orders.xaml b/JetFrames.AppleJobs.Editor/Views/Orders.xaml
index 27ddeb5..94a7dc9 100644
--- a/JetFrames.AppleJobs.Editor/Views/Orders.xaml
+++ b/JetFrames.AppleJobs.Editor/Views/Orders.xaml
@@ -5,26 +5,27 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:JetFrames.AppleJobs.Editor.Views"
mc:Ignorable="d" d:DataContext="{StaticResource ViewModelLocator}"
- d:DesignHeight="300" d:DesignWidth="1084">
+ d:DesignHeight="300" d:DesignWidth="1204">
-
+
-
+
@@ -42,12 +43,40 @@
+ ClipboardContentBinding="{Binding Accessories.Name}"
+ EditingElementStyle="{StaticResource {x:Type ComboBox}}" Header="Инвентарь" Width="120" />
+ Header="Мастер" Width="120" />
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/JetFrames.AppleJobs.Editor/Views/Orders.xaml.cs b/JetFrames.AppleJobs.Editor/Views/Orders.xaml.cs
index 0c3efc8..e79c7d6 100644
--- a/JetFrames.AppleJobs.Editor/Views/Orders.xaml.cs
+++ b/JetFrames.AppleJobs.Editor/Views/Orders.xaml.cs
@@ -1,5 +1,6 @@
using AppleJobs.Data.Models;
using AppleJobs.Data.Models.ModelsJobs;
+using AppleJobs.Data.Models.Orders;
using System.Windows.Controls;
using System.Windows.Input;
@@ -13,21 +14,8 @@ namespace JetFrames.AppleJobs.Editor.Views
public Orders()
{
InitializeComponent();
+ EditorViewModel.InitGrid(dg);
}
- 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 Order)
- {
- var mjpt = (Order)e.NewItem;
- mjpt.Customers_Id = 1;
- }
- App.Locator.Editor.AddEntity(e.NewItem);
- }
+
}
}