Ejemplo n.º 1
0
 public virtual void AddLane(Lanes lane)
 {
     if (!_lanes.Contains(lane))
     {
         _lanes.Add(lane);
     }
 }
Ejemplo n.º 2
0
        public ReturnModel GetOrganizations(long boardId, string accessToken)
        {
            ReturnModel remodel = new ReturnModel();
            try
            {
                var account = _readOnlyRepository.First<Account>(account1 => account1.Token == accessToken);

                if (account != null)
                {
                    if (account.VerifyToken(account))
                    {
                        var board = _readOnlyRepository.GetById<Board>(boardId);
                        if (board != null)
                        {
                            ReturnLanesModel boardsModel = _mappingEngine.Map<Board, ReturnLanesModel>(board);
                            var lanes = new ReturnLanesModel();
                            lanes.Lanes = new List<Lanes>();
                            foreach (var or in boardsModel.Lanes)
                            {
                                if (!or.IsArchived)
                                {
                                    var o = new Lanes();
                                    o.Title = or.Title;
                                    o.Id = or.Id;
                                    lanes.Lanes.Add(o);
                                }
                            }
                            return lanes.ConfigureModel("Successfull", "", lanes);
                        }
                    }
                    return remodel.ConfigureModel("Error", "Su session ya expiro", remodel);
                }
                return remodel.ConfigureModel("Error", "No se pudo acceder a su cuenta", remodel);
            }
            catch (Exception e)
            {
                return remodel.ConfigureModel("Error", e.Message, remodel);
            }
        }