public ActionResult Delete(Guid id, ViewModels.Tasks.TaskTagViewModel viewModel) { Common.Models.Account.Users currentUser; Common.Models.Tasks.TaskTag model; currentUser = Data.Account.Users.Get(User.Identity.Name); model = Mapper.Map <Common.Models.Tasks.TaskTag>(viewModel); model = Data.Tasks.TaskTag.Disable(model, currentUser); return(RedirectToAction("Tags", "Tasks", new { Id = model.Task.Id.Value.ToString() })); }
public ActionResult Edit(Guid id, ViewModels.Tasks.TaskTagViewModel viewModel) { Common.Models.Account.Users currentUser; Common.Models.Tasks.TaskTag model; currentUser = Data.Account.Users.Get(User.Identity.Name); model = Mapper.Map <Common.Models.Tasks.TaskTag>(viewModel); model.TagCategory = Mapper.Map <Common.Models.Tagging.TagCategory>(viewModel.TagCategory); model.Task = Data.Tasks.TaskTag.Get(id).Task; model = Data.Tasks.TaskTag.Edit(model, currentUser); return(RedirectToAction("Tags", "Tasks", new { Id = model.Task.Id.Value.ToString() })); }
public ActionResult Create(ViewModels.Tasks.TaskTagViewModel viewModel) { Common.Models.Account.Users currentUser; Common.Models.Tasks.TaskTag model; currentUser = Data.Account.Users.Get(User.Identity.Name); model = Mapper.Map <Common.Models.Tasks.TaskTag>(viewModel); model.Task = new Common.Models.Tasks.Task() { Id = long.Parse(RouteData.Values["Id"].ToString()) }; model.TagCategory = Mapper.Map <Common.Models.Tagging.TagCategory>(viewModel.TagCategory); model = Data.Tasks.TaskTag.Create(model, currentUser); return(RedirectToAction("Tags", "Tasks", new { Id = model.Task.Id.Value.ToString() })); }