コード例 #1
0
        private void Save(TaskItemEditVM.EditInput input)
        {
            TaskItem taskitem;

            if (input.Id == 0)
            {
                taskitem = new TaskItem();
            }
            else
            {
                taskitem = TaskItemBD.Get(input.Id);
            }

            taskitem.Task        = input.Task.ToReferencedDO(TaskBD);
            taskitem.Brief       = input.Brief;
            taskitem.User        = input.User.ToReferencedDO(UserBD);
            taskitem.Requirement = input.Requirement;
            taskitem.Record      = input.Record;
            taskitem.KeyInfo     = input.KeyInfo;
            taskitem.CreateDate  = input.CreateDate;
            taskitem.ActionDate  = input.ActionDate;
            taskitem.Status      = input.Status;
            taskitem.OrderNum    = input.OrderNum;


            TaskItemBD.Save(taskitem);
        }
コード例 #2
0
        public ActionResult Edit(int id)
        {
            var m = new TaskItemEditVM
            {
                Input = Map <TaskItem, TaskItemEditVM.EditInput>(TaskItemBD.Get(id))
            };

            return(ForView(m));
        }