/// <summary> /// 批量删除操作 /// </summary> public static void DoBatchDelete(params object[] args) { SysDict[] tents = SysDict.FindAll(Expression.In("ID", args)); foreach (SysDict 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 = SysDict.FindFirstByProperties(SysDict.Prop_Code, Code); var Ents = SysDict.FindAllByProperty("ParentID", Ent.ID); if (SelfNode) { Dict.Add(Ent.Code, Ent.Value); } foreach (var item in Ents) { Dict.Add(item.Code, item.Value); } return(Dict); }