public JsonResult CreateTask(MainTaskViewModel taskDetails) { MainTask taskDetailsResults = new MainTask(taskDetails); _taskRepo.Insert(taskDetailsResults); var json = _taskRepo.GetAll(); return(Json(json)); }
public MainTask(MainTaskViewModel mainTaskVM) { TaskId = mainTaskVM.Id; Title = mainTaskVM.Title; Description = mainTaskVM.Description; Assignee = mainTaskVM.Assignee; Reporter = mainTaskVM.Reporter; Comments = mainTaskVM.Comments; Duration = mainTaskVM.Duration; }
public MainTaskWindow(string topic) { InitializeComponent(); var vm = new MainTaskViewModel(topic); this.DataContext = vm; if (vm.CloseAction == null) { vm.CloseAction = new Action(this.Close); } }