public void CreateRegion(Region entity, User currentUser) { if (partyDao.LoadParty(entity.Code) == null) { base.CreateRegion(entity); } else { CreateRegionOnly(entity); } Permission permission = new Permission(); permission.Category = permissionCategoryMgr.LoadPermissionCategory(BusinessConstants.CODE_MASTER_PERMISSION_CATEGORY_TYPE_VALUE_REGION); permission.Code = entity.Code; permission.Description = entity.Name; permissionMgr.CreatePermission(permission); UserPermission userPermission = new UserPermission(); userPermission.User = currentUser; userPermission.Permission = permission; userPermissionMgr.CreateUserPermission(userPermission); }
public int CreateRegionOnly(Region entity) { string sql = "insert into Region(code) values(@code) "; SqlParameter[] param = new SqlParameter[1]; param[0] = new SqlParameter("@code", SqlDbType.NVarChar, 50); param[0].Value = entity.Code; return sqlHelperDao.Create(sql, param); }
public override void DeleteRegion(Region region) { DeleteRegion(region.Code); }
public override void CreateRegion(Region entity) { CreateRegion(entity, userMgr.GetMonitorUser()); }
public virtual void UpdateRegion(Region entity) { entityDao.UpdateRegion(entity); }
public virtual void DeleteRegion(Region entity) { entityDao.DeleteRegion(entity); }
public IList<WorkCenter> GetWorkCenter(Region region, bool includeInactive) { return GetWorkCenter(region.Code, includeInactive); }
public virtual void UpdateRegion(Region entity) { Update(entity); }
public void UpdateRegion(Region region) { RegionMgr.UpdateRegion(region); }
public IList<WorkCenter> GetWorkCenter(Region region) { return GetWorkCenter(region.Code, false); }
public void DeleteRegion(Region region) { RegionMgr.DeleteRegion(region); }
public void CreateRegion(Region region) { RegionMgr.CreateRegion(region); }
public virtual void DeleteRegion(Region entity) { Delete(entity); }
public IList<Location> GetLocation(Region region) { return GetLocation(region.Code, false); }
public virtual void CreateRegion(Region entity) { entityDao.CreateRegion(entity); }
public IList<Location> GetLocation(Region region, bool includeInactive) { return GetLocation(region.Code, includeInactive); }
public virtual void CreateRegion(Region entity) { Create(entity); }