diff --git a/SlnMesnac.Generate/Templates/Service/IServiceCreate.cs b/SlnMesnac.Generate/Templates/Service/IServiceCreate.cs
index 1306e4c..bed0d36 100644
--- a/SlnMesnac.Generate/Templates/Service/IServiceCreate.cs
+++ b/SlnMesnac.Generate/Templates/Service/IServiceCreate.cs
@@ -33,7 +33,7 @@ namespace SlnMesnac.Generate.Templates.Service
{
public class IServiceCreate
{
- private static readonly string templateDir = @"F:\桌面\SlnMesnac\SlnMesnac.Generate\Templates\Service";
+ private static readonly string templateDir = @"C:\WorkSpace\Mesnac\RFID 展会软件\程序设计\RFID.Exhibition\SlnMesnac.Generate\Templates\Service";
public bool Create(string tableName, string NameSpace, string outdir)
{
diff --git a/SlnMesnac.Generate/Templates/Service/Impl/ServiceCreate.cs b/SlnMesnac.Generate/Templates/Service/Impl/ServiceCreate.cs
index 0aa6838..17b40b5 100644
--- a/SlnMesnac.Generate/Templates/Service/Impl/ServiceCreate.cs
+++ b/SlnMesnac.Generate/Templates/Service/Impl/ServiceCreate.cs
@@ -33,7 +33,7 @@ namespace SlnMesnac.Generate.Templates.Service.Impl
{
public class ServiceCreate
{
- private static readonly string templateDir = @"F:\桌面\SlnMesnac\SlnMesnac.Generate\Templates\Service\Impl\";
+ private static readonly string templateDir = @"C:\WorkSpace\Mesnac\RFID 展会软件\程序设计\RFID.Exhibition\SlnMesnac.Generate\Templates\Service\Impl\";
public bool Create(string tableName, string NameSpace, string outdir)
{
diff --git a/SlnMesnac.Model/domain/base_product_describe.cs b/SlnMesnac.Model/domain/base_product_describe.cs
new file mode 100644
index 0000000..8de9908
--- /dev/null
+++ b/SlnMesnac.Model/domain/base_product_describe.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Model.domain
+{
+ ///
+ ///产品描述
+ ///
+ [SugarTable("base_product_describe"), TenantAttribute("iot")]
+ public partial class base_product_describe
+ {
+ public base_product_describe(){
+
+
+ }
+ ///
+ /// Desc:标识
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="objId")]
+ public int objid {get;set;}
+
+ ///
+ /// Desc:产品标识
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_code")]
+ public string productCode {get;set;}
+
+ ///
+ /// Desc:描述标题
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="describe_title")]
+ public string describeTitle {get;set;}
+
+ ///
+ /// Desc:描述内容
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="describe_content")]
+ public string describeContent {get;set;}
+
+ ///
+ /// Desc:创建人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="created_by")]
+ public string createdBy {get;set;}
+
+ ///
+ /// Desc:创建时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="created_time")]
+ public DateTime? createdTime {get;set;}
+
+ ///
+ /// Desc:更新人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="updated_by")]
+ public string updatedBy {get;set;}
+
+ ///
+ /// Desc:更新时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="updated_time")]
+ public DateTime? updatedTime {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Model/domain/base_product_feature.cs b/SlnMesnac.Model/domain/base_product_feature.cs
new file mode 100644
index 0000000..7fe2493
--- /dev/null
+++ b/SlnMesnac.Model/domain/base_product_feature.cs
@@ -0,0 +1,75 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Model.domain
+{
+ ///
+ ///产品特点
+ ///
+ [SugarTable("base_product_feature"), TenantAttribute("iot")]
+ public partial class base_product_feature
+ {
+ public base_product_feature(){
+
+
+ }
+ ///
+ /// Desc:标识
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="objId")]
+ public int objid {get;set;}
+
+ ///
+ /// Desc:产品标识
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_code")]
+ public string productCode {get;set;}
+
+ ///
+ /// Desc:产品特点
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_feature")]
+ public string productFeature {get;set;}
+
+ ///
+ /// Desc:创建人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="created_by")]
+ public string createdBy {get;set;}
+
+ ///
+ /// Desc:创建时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="created_time")]
+ public DateTime? createdTime {get;set;}
+
+ ///
+ /// Desc:更新人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="updated_by")]
+ public string updatedBy {get;set;}
+
+ ///
+ /// Desc:更新时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="updated_time")]
+ public DateTime? updatedTime {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Model/domain/base_product_info.cs b/SlnMesnac.Model/domain/base_product_info.cs
new file mode 100644
index 0000000..c558fcf
--- /dev/null
+++ b/SlnMesnac.Model/domain/base_product_info.cs
@@ -0,0 +1,115 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Model.domain
+{
+ ///
+ ///产品信息
+ ///
+ [SugarTable("base_product_info"), TenantAttribute("iot")]
+ public partial class base_product_info
+ {
+ public base_product_info(){
+
+
+ }
+ ///
+ /// Desc:标识
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="objId")]
+ public int objid {get;set;}
+
+ ///
+ /// Desc:产品标识
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_code")]
+ public string productCode {get;set;}
+
+ ///
+ /// Desc:产品系列
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_series")]
+ public string productSeries {get;set;}
+
+ ///
+ /// Desc:产品名称
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_name")]
+ public string productName {get;set;}
+
+ ///
+ /// Desc:产品特点
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_feature")]
+ public string productFeature {get;set;}
+
+ ///
+ /// Desc:产品描述
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_describe")]
+ public string productDescribe {get;set;}
+
+ ///
+ /// Desc:产品参数
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_param")]
+ public string productParam {get;set;}
+
+ ///
+ /// Desc:产品尺寸
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_size")]
+ public string productSize {get;set;}
+
+ ///
+ /// Desc:创建人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="created_by")]
+ public string createdBy {get;set;}
+
+ ///
+ /// Desc:创建时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="created_time")]
+ public DateTime? createdTime {get;set;}
+
+ ///
+ /// Desc:更新人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="updated_by")]
+ public string updatedBy {get;set;}
+
+ ///
+ /// Desc:更新时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="updated_time")]
+ public DateTime? updatedTime {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Model/domain/base_product_param.cs b/SlnMesnac.Model/domain/base_product_param.cs
new file mode 100644
index 0000000..3669a62
--- /dev/null
+++ b/SlnMesnac.Model/domain/base_product_param.cs
@@ -0,0 +1,83 @@
+using System;
+using System.Linq;
+using System.Text;
+using SqlSugar;
+
+namespace SlnMesnac.Model.domain
+{
+ ///
+ ///产品参数
+ ///
+ [SugarTable("base_product_param"), TenantAttribute("iot")]
+ public partial class base_product_param
+ {
+ public base_product_param(){
+
+
+ }
+ ///
+ /// Desc:标识
+ /// Default:
+ /// Nullable:False
+ ///
+ [SugarColumn(IsPrimaryKey=true,IsIdentity=true,ColumnName="objId")]
+ public int objid {get;set;}
+
+ ///
+ /// Desc:产品标识
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="product_code")]
+ public string productCode {get;set;}
+
+ ///
+ /// Desc:参数标题
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="param_title")]
+ public string paramTitle {get;set;}
+
+ ///
+ /// Desc:参数内容
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="param_content")]
+ public string paramContent {get;set;}
+
+ ///
+ /// Desc:创建人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="created_by")]
+ public string createdBy {get;set;}
+
+ ///
+ /// Desc:创建时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="created_time")]
+ public DateTime? createdTime {get;set;}
+
+ ///
+ /// Desc:更新人
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="updated_by")]
+ public string updatedBy {get;set;}
+
+ ///
+ /// Desc:更新时间
+ /// Default:
+ /// Nullable:True
+ ///
+ [SugarColumn(ColumnName="updated_time")]
+ public DateTime? updatedTime {get;set;}
+
+ }
+}
diff --git a/SlnMesnac.Repository/service/IBase_product_describeService.cs b/SlnMesnac.Repository/service/IBase_product_describeService.cs
new file mode 100644
index 0000000..869b519
--- /dev/null
+++ b/SlnMesnac.Repository/service/IBase_product_describeService.cs
@@ -0,0 +1,13 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface Ibase_product_describeServices: IBaseService
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/IBase_product_featureService.cs b/SlnMesnac.Repository/service/IBase_product_featureService.cs
new file mode 100644
index 0000000..2dc4a6e
--- /dev/null
+++ b/SlnMesnac.Repository/service/IBase_product_featureService.cs
@@ -0,0 +1,13 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface Ibase_product_featureServices: IBaseService
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/IBase_product_infoService.cs b/SlnMesnac.Repository/service/IBase_product_infoService.cs
new file mode 100644
index 0000000..70384d7
--- /dev/null
+++ b/SlnMesnac.Repository/service/IBase_product_infoService.cs
@@ -0,0 +1,13 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface Ibase_product_infoServices: IBaseService
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/IBase_product_paramService.cs b/SlnMesnac.Repository/service/IBase_product_paramService.cs
new file mode 100644
index 0000000..05a7f36
--- /dev/null
+++ b/SlnMesnac.Repository/service/IBase_product_paramService.cs
@@ -0,0 +1,13 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+using System.Text;
+
+namespace SlnMesnac.Repository.service
+{
+ public interface Ibase_product_paramServices: IBaseService
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/Base_product_describeServiceImpl.cs b/SlnMesnac.Repository/service/Impl/Base_product_describeServiceImpl.cs
new file mode 100644
index 0000000..27eec30
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/Base_product_describeServiceImpl.cs
@@ -0,0 +1,14 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class base_product_describeServiceImpl : BaseServiceImpl, Ibase_product_describeServices
+ {
+ public base_product_describeServiceImpl(Repository repository):base(repository)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/Base_product_featureServiceImpl.cs b/SlnMesnac.Repository/service/Impl/Base_product_featureServiceImpl.cs
new file mode 100644
index 0000000..dabe690
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/Base_product_featureServiceImpl.cs
@@ -0,0 +1,14 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class base_product_featureServiceImpl : BaseServiceImpl, Ibase_product_featureServices
+ {
+ public base_product_featureServiceImpl(Repository repository):base(repository)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/Base_product_infoServiceImpl.cs b/SlnMesnac.Repository/service/Impl/Base_product_infoServiceImpl.cs
new file mode 100644
index 0000000..e9caebc
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/Base_product_infoServiceImpl.cs
@@ -0,0 +1,14 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class base_product_infoServiceImpl : BaseServiceImpl, Ibase_product_infoServices
+ {
+ public base_product_infoServiceImpl(Repository repository):base(repository)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.Repository/service/Impl/Base_product_paramServiceImpl.cs b/SlnMesnac.Repository/service/Impl/Base_product_paramServiceImpl.cs
new file mode 100644
index 0000000..9b9c280
--- /dev/null
+++ b/SlnMesnac.Repository/service/Impl/Base_product_paramServiceImpl.cs
@@ -0,0 +1,14 @@
+using SlnMesnac.Model.domain;
+using SlnMesnac.Repository.service.@base;
+using System;
+using System.Collections.Generic;
+
+namespace SlnMesnac.Repository.service.Impl
+{
+ public class base_product_paramServiceImpl : BaseServiceImpl, Ibase_product_paramServices
+ {
+ public base_product_paramServiceImpl(Repository repository):base(repository)
+ {
+ }
+ }
+}
\ No newline at end of file
diff --git a/SlnMesnac.WPF/MainWindow.xaml b/SlnMesnac.WPF/MainWindow.xaml
index 95d24c2..1610f81 100644
--- a/SlnMesnac.WPF/MainWindow.xaml
+++ b/SlnMesnac.WPF/MainWindow.xaml
@@ -34,16 +34,26 @@
-
-
-
-
+
-
-
-
-
+
diff --git a/SlnMesnac.WPF/Page/Generate/GenerateControl.xaml b/SlnMesnac.WPF/Page/Generate/GenerateControl.xaml
index 1c8cbe5..006c427 100644
--- a/SlnMesnac.WPF/Page/Generate/GenerateControl.xaml
+++ b/SlnMesnac.WPF/Page/Generate/GenerateControl.xaml
@@ -18,11 +18,11 @@
-
+
-
-
+
+
@@ -30,11 +30,11 @@
+ Foreground="Black" >
diff --git a/SlnMesnac.WPF/Page/IndexControl.xaml b/SlnMesnac.WPF/Page/IndexControl.xaml
index 0c77723..d3f9670 100644
--- a/SlnMesnac.WPF/Page/IndexControl.xaml
+++ b/SlnMesnac.WPF/Page/IndexControl.xaml
@@ -9,7 +9,7 @@
-
+
@@ -63,7 +63,7 @@
-
+
@@ -73,7 +73,7 @@
-
+
@@ -81,9 +81,10 @@
+
-
+
@@ -93,7 +94,7 @@
-
+
@@ -103,7 +104,7 @@
-
+
@@ -111,5 +112,30 @@
+
+
diff --git a/SlnMesnac.WPF/Page/IndexControl.xaml.cs b/SlnMesnac.WPF/Page/IndexControl.xaml.cs
index 8e31aa1..1e89c99 100644
--- a/SlnMesnac.WPF/Page/IndexControl.xaml.cs
+++ b/SlnMesnac.WPF/Page/IndexControl.xaml.cs
@@ -1,4 +1,5 @@
using SlnMesnac.WPF.Attribute;
+using SlnMesnac.WPF.ViewModel.Index;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -22,9 +23,11 @@ namespace SlnMesnac.WPF.Page
[RegisterAsSingletonAttribute]
public partial class IndexControl : UserControl
{
- public IndexControl()
+ public IndexControl(IndexViewModel indexViewModel)
{
InitializeComponent();
+
+ this.DataContext = indexViewModel;
}
}
}
diff --git a/SlnMesnac.WPF/Page/ProductDetails/DetailsEditControl.xaml b/SlnMesnac.WPF/Page/ProductDetails/DetailsEditControl.xaml
index 55c3b1b..3e7d2e4 100644
--- a/SlnMesnac.WPF/Page/ProductDetails/DetailsEditControl.xaml
+++ b/SlnMesnac.WPF/Page/ProductDetails/DetailsEditControl.xaml
@@ -22,18 +22,28 @@
-
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
@@ -45,35 +55,31 @@
-
-
-
+
-
+
-
+
-
+
@@ -86,14 +92,53 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -102,11 +147,108 @@
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SlnMesnac.WPF/Page/ProductDetails/DetailsEditControl.xaml.cs b/SlnMesnac.WPF/Page/ProductDetails/DetailsEditControl.xaml.cs
index 7b3e7e1..c3525d9 100644
--- a/SlnMesnac.WPF/Page/ProductDetails/DetailsEditControl.xaml.cs
+++ b/SlnMesnac.WPF/Page/ProductDetails/DetailsEditControl.xaml.cs
@@ -1,4 +1,5 @@
using SlnMesnac.WPF.Attribute;
+using SlnMesnac.WPF.ViewModel.ProductDetails;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -23,9 +24,15 @@ namespace SlnMesnac.WPF.Page.ProductDetails
[RegisterAsSingletonAttribute]
public partial class DetailsEditControl : UserControl
{
- public DetailsEditControl()
+ public DetailsEditControl(ProductDetailsEditViewModel productDetailsEditViewModel)
{
InitializeComponent();
+
+ this.DataContext = productDetailsEditViewModel;
}
+
+
}
+
+
}
diff --git a/SlnMesnac.WPF/Page/ProductDetails/ProductDetailsControl.xaml b/SlnMesnac.WPF/Page/ProductDetails/ProductDetailsControl.xaml
index 86b14a1..a1848bb 100644
--- a/SlnMesnac.WPF/Page/ProductDetails/ProductDetailsControl.xaml
+++ b/SlnMesnac.WPF/Page/ProductDetails/ProductDetailsControl.xaml
@@ -5,8 +5,231 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:SlnMesnac.WPF.Page.ProductDetails"
mc:Ignorable="d"
- d:DesignHeight="450" d:DesignWidth="800">
-
-
+ d:DesignHeight="450" d:DesignWidth="800" Background="Transparent">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/SlnMesnac.WPF/ViewModel/Index/IndexViewModel.cs b/SlnMesnac.WPF/ViewModel/Index/IndexViewModel.cs
new file mode 100644
index 0000000..0dc7ee6
--- /dev/null
+++ b/SlnMesnac.WPF/ViewModel/Index/IndexViewModel.cs
@@ -0,0 +1,34 @@
+using CommunityToolkit.Mvvm.Input;
+using Microsoft.VisualBasic;
+using SlnMesnac.Serilog;
+using SlnMesnac.WPF.Attribute;
+using SlnMesnac.WPF.ViewModel.Base;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.WPF.ViewModel.Index
+{
+ [RegisterAsSingletonAttribute]
+ public partial class IndexViewModel : BaseViewModel
+ {
+ public readonly SerilogHelper _logger;
+
+ public IndexViewModel(SerilogHelper logger)
+ {
+ _logger = logger;
+ }
+
+ ///
+ /// 加载产品信息
+ ///
+ ///
+ [RelayCommand]
+ private void LoadProductInfo(string deviceCode)
+ {
+ string code = deviceCode as string;
+ }
+ }
+}
diff --git a/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs b/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs
index 5211f24..09723ba 100644
--- a/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs
+++ b/SlnMesnac.WPF/ViewModel/MainWindowViewModel.cs
@@ -64,7 +64,7 @@ namespace SlnMesnac.WPF.ViewModel
_generateControl = generateControl;
_indexControl = indexControl;
_detailsEditControl = detailsEditControl;
- this.UserContent = _detailsEditControl;
+ this.UserContent = _generateControl;
}
///
@@ -125,7 +125,18 @@ namespace SlnMesnac.WPF.ViewModel
try
{
string info = obj as string;
- //UserContent = inStoreInfoControl;
+ switch (info)
+ {
+ case "Index":
+ UserContent = _indexControl;
+ break;
+ case "Set":
+ UserContent = _detailsEditControl;
+ break;
+ default:
+ UserContent = _indexControl;
+ break;
+ }
}
catch (Exception ex)
{
diff --git a/SlnMesnac.WPF/ViewModel/ProductDetails/ProductDetailsEditViewModel.cs b/SlnMesnac.WPF/ViewModel/ProductDetails/ProductDetailsEditViewModel.cs
new file mode 100644
index 0000000..b236529
--- /dev/null
+++ b/SlnMesnac.WPF/ViewModel/ProductDetails/ProductDetailsEditViewModel.cs
@@ -0,0 +1,72 @@
+using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
+using SlnMesnac.Model.domain;
+using SlnMesnac.WPF.Attribute;
+using SlnMesnac.WPF.ViewModel.Base;
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace SlnMesnac.WPF.ViewModel.ProductDetails
+{
+ [RegisterAsSingletonAttribute]
+ public partial class ProductDetailsEditViewModel : BaseViewModel
+ {
+
+ [ObservableProperty]
+ public ObservableCollection productFeature = new ObservableCollection();
+
+ [ObservableProperty]
+ public ObservableCollection productDescribe = new ObservableCollection();
+
+ [ObservableProperty]
+ public ObservableCollection productParams = new ObservableCollection();
+
+
+ public ProductDetailsEditViewModel()
+ {
+ Init();
+ }
+
+
+ private void Init()
+ {
+ for(int i = 0; i < 2; i++)
+ {
+ ProductFeature.Add(new base_product_feature()
+ {
+ productFeature = string.Empty
+ });
+ }
+
+ for (int i = 0; i < 3; i++)
+ {
+ ProductDescribe.Add(new base_product_describe()
+ {
+ describeTitle = string.Empty,
+ describeContent = string.Empty
+ });
+ }
+ for (int i = 0; i < 19; i++)
+ {
+ ProductParams.Add(new base_product_param()
+ {
+ paramContent = string.Empty,
+ });
+ }
+ }
+
+ [RelayCommand]
+ private void SavePrdouctInfo()
+ {
+ var productFeatureInfo = ProductFeature;
+
+ var productDescribeInfo = ProductDescribe;
+
+ var productParamsInfo = ProductParams;
+ }
+ }
+}
diff --git a/SlnMesnac.WPF/appsettings.json b/SlnMesnac.WPF/appsettings.json
index 9346894..6005a25 100644
--- a/SlnMesnac.WPF/appsettings.json
+++ b/SlnMesnac.WPF/appsettings.json
@@ -11,14 +11,10 @@
"logPath": "E:\\桌面\\SlnMesnac\\SlnMesnac.WPF\\bin\\Debug\\net6.0-windows",
"SqlConfig": [
{
- "configId": "mes",
- "dbType": 1,
- "connStr": "server=.;uid=sa;pwd=123456;database=JiangYinMENS"
- },
- {
- "configId": "mcs",
- "dbType": 3,
- "connStr": "Data Source=175.27.215.92/helowin;User ID=aucma_scada;Password=aucma"
+ "configId": "iot",
+ "dbType": 0,
+ "isFlag": true,
+ "connStr": "server=1.13.177.47;Port=3306;Database=rfid_exhibition;Uid=root;Pwd=Haiwei123456;"
}
],
"PlcConfig": [