Exemplo n.º 1
0
 public ActionResult AddGroup(GroupDomain model, HttpPostedFileBase file)
 {
     var group = Mapper.Map<Group>(model);
     _groupService.AddGroup(group);
     group.Description.MainImageUrl = _groupService.SaveFile(group.Id, file);
     _groupService.UpdateGroup(group);
     return RedirectToAction("GroupManagement", "Admin");
 }
Exemplo n.º 2
0
 public ActionResult AddGroup()
 {
     var groupDomain = new GroupDomain();
     groupDomain.Categories = new SelectList(_groupService.GetCategoriesByOrder(),"Id","Name");
     return View(groupDomain);
 }