using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Linq; using System.Threading.Tasks; using WalkingTec.Mvvm.Core; using WalkingTec.Mvvm.Core.Extensions; using cy_scdz.Model.Oder; using cy_scdz.Model.Set; using Microsoft.EntityFrameworkCore; namespace cy_scdz.ViewModel.BidOrder.OrderInfoVMs { public partial class OrderInfoSearcher : BaseSearcher { [Display(Name = "项目名称")] public String Title { get; set; } [Display(Name = "中标时间")] public DateRange WinBidTime { get; set; } = new DateRange(DateTime.Now.AddYears(-2), DateTime.Now); public List AllSuppliers { get; set; } [Display(Name = "中标供应商")] public Guid? SupplierId { get; set; } public List AllBidTypes { get; set; } [Display(Name = "订单类别")] public Guid? BidTypeId { get; set; } protected override void InitVM() { AllSuppliers = DC.Set().Include(x=>x.Parent).Where(x=>x.Parent.Key=="zbgys").GetSelectListItems(Wtm, y => y.Name); AllBidTypes = DC.Set().Include(x => x.Parent).Where(x => x.Parent.Key == "ddlb").GetSelectListItems(Wtm, y => y.Name); } } }