示例#1
0
        public JsonResult CreateTask(MainTaskViewModel taskDetails)
        {
            MainTask taskDetailsResults = new MainTask(taskDetails);

            _taskRepo.Insert(taskDetailsResults);
            var json = _taskRepo.GetAll();

            return(Json(json));
        }
示例#2
0
 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);
            }
        }