Exemple #1
0
 public static new int Insert(Sys_Permission model)
 {
     if (model.SPParentId > 0)
     {
         var parent = PermissionAccess.Get(model.SPParentId);
         model.SPLayer = parent == null ? 0 : (parent.SPLayer + 1);
     }
     model.SPIsEnabled  = 1;
     model.SPDeleteMark = 0;
     model.SPCreateUser = OperatorProvider.Instance.Current.UserId;
     model.SPCreateTime = DateTime.Now;
     model.SPModifyUser = model.SPCreateUser;
     model.SPModifyTime = model.SPCreateTime;
     return(PermissionAccess.Insert(model));
 }
Exemple #2
0
 public int Insert(object data)
 {
     return(dataAccess.Insert(data));
 }