예제 #1
0
 //新增或修改字典数据
 public string EditOrUpdateDict(Dict dictInfo)
 {
     if (dictInfo.DictId != 0)
     {
         if (Limits.Contains(2))
         {
             DbOp.Update(dictInfo);
         }
         else
             return "你没有权限进行修改";
     }
     else
     {
         if (Limits.Contains(3))
         {
             dictInfo.IsUsable = true;
             DbOp.Add(dictInfo);
         }
         else
             return "你没有权限新增数据";
     }
     return "True";
 }
예제 #2
0
파일: DictOp.cs 프로젝트: wangscript/sunmvc
 public int Update(Dict entity, string[] columns)
 {
     var r = Context.Instance.Update(entity,columns);
     if (r > 0) CacheOp.UpdateAll();
     return r;
 }
예제 #3
0
파일: DictOp.cs 프로젝트: wangscript/sunmvc
 public object Add(Dict entity)
 {
     var r = Convert.ToInt32(Context.Instance.Insert(entity));
     if (r > 0) CacheOp.UpdateAll();
     return r;
 }
예제 #4
0
파일: DictOp.cs 프로젝트: wangscript/sunmvc
 public int Update(Dict entity)
 {
     var r = Context.Instance.Update(entity);
     if (r > 0) CacheOp.UpdateAll();
     return r;
 }