添加项目文件。
This commit is contained in:
1 parent
05e131ca4e
commit
514d6f5255
1162 files changed
+81255
No files matched your search
@@ -0,0 +1,53 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using HHWMS.Web.Models;
|
||||
using WalkingTec.Mvvm.Core;
|
||||
using WalkingTec.Mvvm.Core.Support.Quartz;
|
||||
|
||||
namespace HHWMS.Web
|
||||
{
|
||||
public partial class SysJobVM : BaseCRUDVM<SysJob>
|
||||
{
|
||||
public List<ComboSelectListItem> AllJob { get; set; }
|
||||
|
||||
public SysJobVM()
|
||||
{
|
||||
}
|
||||
|
||||
protected override void InitVM()
|
||||
{
|
||||
List<ComboSelectListItem> rv = new List<ComboSelectListItem>();
|
||||
|
||||
var test = Assembly.Load("HHWMS.Web").GetExportedTypes().Where(x => x.FullName.Contains("HHWMS.Web"));
|
||||
var t = test.Where(x => typeof(WtmJob).IsAssignableFrom(x) && x.Name != "WtmJob");
|
||||
foreach (var st in t)
|
||||
{
|
||||
var ci = st.GetConstructor(Type.EmptyTypes);
|
||||
var job = ci?.Invoke(null) as WtmJob;
|
||||
if (job != null)
|
||||
{
|
||||
string jobName = st.Name;
|
||||
rv.Add(new ComboSelectListItem { Text = jobName, Value = jobName });
|
||||
}
|
||||
}
|
||||
AllJob = rv;
|
||||
}
|
||||
|
||||
public override void DoAdd()
|
||||
{
|
||||
base.DoAdd();
|
||||
}
|
||||
|
||||
public override void DoEdit(bool updateAllFields = false)
|
||||
{
|
||||
base.DoEdit(updateAllFields);
|
||||
}
|
||||
|
||||
public override void DoDelete()
|
||||
{
|
||||
base.DoDelete();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user