public IEnumerable <Hall> GetParents() { try { var getParents = new HallBO().GetParents(this.ConnectionHandler); return(getParents); } catch (KnownException knownException) { Log.Save(knownException.Message, LogType.ApplicationError, knownException.Source, knownException.StackTrace); throw new KnownException(knownException.Message, knownException); } catch (Exception ex) { Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace); throw new KnownException(ex.Message, ex); } }
//('Row','Column','Status','Number','Amount') public Hall GetHallWithChairs(Guid hallId) { try { var hall = new HallBO().Get(this.ConnectionHandler, hallId); hall.Chairs = new ChairBO().GetHallChairs(this.ConnectionHandler, hallId); var chairTypeBo = new ChairTypeBO(); var chairs = hall.Chairs.Where(x => x.Status != (byte)Enums.ReservStatus.None); foreach (var chair in chairs) { if (chair.ChairTypeId.HasValue) { chair.ChairType = chairTypeBo.Get(base.ConnectionHandler, chair.ChairTypeId); } if (!chair.OwnerId.HasValue) { continue; } if (chair.Owner != null) { chair.ColumValue += "," + chair.Owner.DescriptionField + "-" + chair.Owner.Email; } } return(hall); } catch (KnownException knownException) { Log.Save(knownException.Message, LogType.ApplicationError, knownException.Source, knownException.StackTrace); throw new KnownException(knownException.Message, knownException); } catch (Exception ex) { Log.Save(ex.Message, LogType.ApplicationError, ex.Source, ex.StackTrace); throw new KnownException(ex.Message, ex); } }