/// <summary> /// 修改数据字典节点名称 /// </summary> /// <param name="model"></param> /// <returns></returns> public CustomResult DicUpdate(NodeViewModel model) { OT_Dic modelDic = new OT_Dic(); modelDic.Id = model.DictId; modelDic.Name = model.Name; modelDic.Belong = (byte)EDicParentId.Holiday; return(dataDictionary.Update(modelDic)); }
/// <summary> /// 增加数据字典节点 /// </summary> /// <param name="id">父节点编号,根节点传0</param> /// <param name="name">子节点名称</param> /// <returns></returns> public CustomResult DicAdd(int id, string name) { OT_Dic model = new OT_Dic(); model.Belong = id; model.IsDelete = (byte)EDataStatus.Normal; model.Name = name; return(dataDictionary.Add(model, id)); }