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); } }
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); } }
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); } }
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); } }
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); } }