/// <summary> /// 批量删除操作 /// </summary> public static void DoBatchDelete(params object[] args) { SysRegister[] tents = SysRegister.FindAll(Expression.In("ID", args)); foreach (SysRegister tent in tents) { tent.DoDelete(); } }
/// <summary> /// 获取字典项,SelfNode自己是否作为字典项 /// </summary> /// <param name="Code">Code</param> public static Dictionary <string, string> GetDictByCode(string Code, bool SelfNode = false) { Dictionary <string, string> Dict = new Dictionary <string, string>(); var Ent = SysRegister.FindFirstByProperties(SysRegister.Prop_RegisterKey, Code); var Ents = SysRegister.FindAllByProperty("ParentID", Ent.ID); if (SelfNode) { Dict.Add(Ent.RegisterKey, Ent.RegisterValue); } foreach (var item in Ents) { Dict.Add(item.RegisterKey, item.RegisterValue); } return(Dict); }