Пример #1
0
 public ActionResult AddMenuItem(MenuItemDto data, Guid gridid)
 {
     using (var db = SessionProvider.CreateSession())
     {
         var newgrid = db.Session.Menu.AddMenuItem(data, gridid);
         return new JSONNetResult(newgrid);
     }
 }
Пример #2
0
        public override MenuItemDto AddMenuItem(MenuItemDto item, Guid gridId)
        {
            var grid = GetGrid(gridId);

            grid.UpdateResourceList(item.ResourcesLoc, CurrentCulture, Repository);

            var a = new GridElement
                        {
                            Position = item.Position,
                            Content = item.Content,
                            Type = item.Type,
                            Skin = item.Skin,
                            Parent = Repository.GridElements.Single(x => x.Id == new Guid(item.ParentId)),
                        };
            grid.GridElements.Add(a);
            Repository.SaveChanges();
            return a.ToMenuItemDto(grid.GridElements);
        }
Пример #3
0
 public abstract MenuItemDto UpdateMenuItem(MenuItemDto menuItem);
Пример #4
0
 public abstract MenuItemDto AddMenuItem(MenuItemDto menuItem, Guid menuId);
Пример #5
0
 public override MenuItemDto UpdateMenuItem(MenuItemDto menuItem)
 {
     throw new NotImplementedException();
 }