Exemplo n.º 1
0
        public string Edit(JObject json)
        {
            SetDefaultValue(json);
            SYS_FunctionTree model = JsonToObject <SYS_FunctionTree>(json);

            return(DPBase.Update(model) ? "修改成功!" : "修改失败");
        }
Exemplo n.º 2
0
 /// <summary>
 /// 验证菜单属性
 /// </summary>
 /// <returns></returns>
 public static string DPValMenuAttribute(SYS_FunctionTree Btn)
 {
     try
     {
         using (NERPEntities context = new NERPEntities())
         {
             string flag = string.Empty;
             IQueryable <SYS_FunctionTree> _valbBtn = context.SYS_FunctionTree;
             if (Btn.FT_Id != 0)
             {
                 _valbBtn = _valbBtn.Where(c => c.FT_Id != Btn.FT_Id);
             }
             var _valName = _valbBtn.Where(c => c.FT_Name == Btn.FT_Name);
             if (_valName.Count() > 0)
             {
                 flag = "0";
             }
             return(flag);
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message + "转换的过程中发生了错误!");
     }
 }