You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.0 KiB
C#
73 lines
2.0 KiB
C#
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<base_product_feature> productFeature = new ObservableCollection<base_product_feature>();
|
|
|
|
[ObservableProperty]
|
|
public ObservableCollection<base_product_describe> productDescribe = new ObservableCollection<base_product_describe>();
|
|
|
|
[ObservableProperty]
|
|
public ObservableCollection<base_product_param> productParams = new ObservableCollection<base_product_param>();
|
|
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|