初始化项目
This commit is contained in:
38
AUTS.Domain/Application/NurseScheduleStatisticsModel.cs
Normal file
38
AUTS.Domain/Application/NurseScheduleStatisticsModel.cs
Normal file
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Dynamic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace AUTS.Domain
|
||||
{
|
||||
public class NurseScheduleStatisticsModel : DynamicObject
|
||||
{
|
||||
public string EmpName { get; set; }
|
||||
public string TotalHour { get; set; }
|
||||
public string TotalWork { get; set; }
|
||||
|
||||
Dictionary<string, object> Properties = new Dictionary<string, object>();
|
||||
|
||||
public override bool TrySetMember(SetMemberBinder binder, object value)
|
||||
{
|
||||
if (!Properties.Keys.Contains(binder.Name))
|
||||
{
|
||||
//在此可以做一些小动作
|
||||
//if (binder.Name == "Col")
|
||||
// Properties.Add(binder.Name + (Properties.Count), value.ToString());
|
||||
//else
|
||||
// Properties.Add(binder.Name, value.ToString());
|
||||
|
||||
|
||||
Properties.Add(binder.Name, value.ToString());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public override bool TryGetMember(GetMemberBinder binder, out object result)
|
||||
{
|
||||
return Properties.TryGetValue(binder.Name, out result);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user