Exemplo n.º 1
0
        private String GetTables(Int32 id)
        {
            try {
                List <Services.Table> tables = _floorService.GetTables(id);
                var result = (from var in tables
                              let attributes = _orderService.GetTableAttributes(var.id, true)
                                               select new {
                    var.Top,
                    var.FloorId,
                    var.id,
                    var.Name,
                    var.Left,
                    var.Type,
                    var.Width,
                    var.Height,
                    Checks = attributes.Item1,
                    Status = attributes.Item2,
                    DateModified = attributes.Item3
                }).ToList();
                return(result.OrderByDescending(m => m.DateModified).ToJson());
            }
            catch (Exception ex) {
                base.Log(ex);
            }
            finally {
            }

            return(null);
        }
Exemplo n.º 2
0
        public String GetTables(Int32 id)
        {
            List <Services.Table> tables = _floorService.GetTables(id);

            var result = (from var in tables
                          where var.FloorId == id
                          select new {
                var.Top,
                var.FloorId,
                var.id,
                var.Name,
                var.Left,
                var.Type,
                var.Width,
                var.Height
            }).ToList();

            return(result.ToJson());
        }