Exemplo n.º 1
0
        public bool DeltePath(int pathId, out string errorMsg)
        {
            errorMsg = string.Empty;

            try
            {
                var  existPath      = pathRep.GetById(pathId);
                bool isCategoryPath = false;
                if (existPath != null && existPath.IsCategory)
                {
                    isCategoryPath = true;
                }
                int delCount = pathRep.DeleteById(pathId);
                if (isCategoryPath)
                {
                    pathCache.Remove(PkPmCacheKeys.CategoryPaths);
                }
                else
                {
                    pathCache.Clear();
                }
                return(true);
            }
            catch (Exception ex)
            {
                errorMsg = ex.Message;
                return(false);
            }
        }
Exemplo n.º 2
0
 public bool DelTotalItemById(int id, out string errorMsg)
 {
     errorMsg = string.Empty;
     try
     {
         int delCount = totalItemRep.DeleteById(id);
         return(true);
     }
     catch (Exception ex)
     {
         errorMsg = ex.Message;
         return(false);
     }
 }
Exemplo n.º 3
0
 public bool DeleteUser(int userId, out string errorMsg)
 {
     errorMsg = string.Empty;
     try
     {
         int deleteCount = _repUser.DeleteById(userId);
         return(true);
     }
     catch (Exception ex)
     {
         errorMsg = ex.Message;
         return(false);
     }
 }
Exemplo n.º 4
0
 public bool DeleteRole(int roleId, out string errormsg)
 {
     errormsg = string.Empty;
     try
     {
         int deleteCount = roleRep.DeleteById(roleId);
         return(true);
     }
     catch (Exception ex)
     {
         errormsg = ex.Message;
         return(false);
     }
 }
Exemplo n.º 5
0
        public bool DeletePathAction(int actionId, out string errorMsg)
        {
            errorMsg = string.Empty;

            try
            {
                int delCount = actionRep.DeleteById(actionId);
                return(true);
            }
            catch (Exception ex)
            {
                errorMsg = ex.Message;
                return(false);
            }
        }