using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Threading.Tasks;
|
using System.ComponentModel.DataAnnotations;
|
using WalkingTec.Mvvm.Core;
|
using WalkingTec.Mvvm.Core.Extensions;
|
using cy_scdz.Model.Set;
|
using Microsoft.EntityFrameworkCore;
|
|
namespace cy_scdz.ViewModel.Setting.PriceSettingVMs
|
{
|
public partial class PriceSettingVM : BaseCRUDVM<PriceSetting>
|
{
|
|
public PriceSettingVM()
|
{
|
}
|
|
protected override async void InitVM()
|
{
|
Entity = DC.Set<PriceSetting>().FirstOrDefault();
|
if(Entity == null)
|
{
|
var fist= new PriceSetting();
|
DC.Set<PriceSetting>().Add(fist);
|
await DC.SaveChangesAsync();
|
Entity = DC.Set<PriceSetting>().FirstOrDefault();
|
}
|
}
|
|
public override void DoAdd()
|
{
|
base.DoAdd();
|
}
|
|
public override void DoEdit(bool updateAllFields = false)
|
{
|
base.DoEdit(updateAllFields);
|
}
|
|
public override void DoDelete()
|
{
|
base.DoDelete();
|
}
|
}
|
}
|