예제 #1
0
        public DTO.PutUpdateToDoDataResponse UpdateToDo(DTO.PutUpdateToDoDataRequest request)
        {
            PutUpdateToDoDataResponse response = new PutUpdateToDoDataResponse();
            ISchedulingRepository     repo     = Factory.GetRepository(request, RepositoryType.ToDo);
            bool success = (bool)repo.Update(request);

            if (success)
            {
                ToDoData data = (ToDoData)repo.FindByID(request.ToDoData.Id, true);
                response.ToDoData = data;
            }
            return(response);
        }
예제 #2
0
        public DTO.PutInsertToDoDataResponse InsertToDo(DTO.PutInsertToDoDataRequest request)
        {
            PutInsertToDoDataResponse respone = new PutInsertToDoDataResponse();
            ISchedulingRepository     repo    = Factory.GetRepository(request, RepositoryType.ToDo);
            string toDoId = (string)repo.Insert(request);

            if (!string.IsNullOrEmpty(toDoId))
            {
                ToDoData data = (ToDoData)repo.FindByID(toDoId);
                respone.ToDoData = data;
            }
            return(respone);
        }
예제 #3
0
        public PutUpdateToDoDataResponse UpdateToDo(PutUpdateToDoDataRequest request)
        {
            PutUpdateToDoDataResponse response = new PutUpdateToDoDataResponse();

            try
            {
                ISchedulingRepository repo = Factory.GetRepository(request, RepositoryType.ToDo);
                bool success = (bool)repo.Update(request);
                if (success)
                {
                    ToDoData data = (ToDoData)repo.FindByID(request.ToDoData.Id, true);
                    response.ToDoData = data;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(response);;
        }
예제 #4
0
        public PutInsertToDoDataResponse InsertToDo(PutInsertToDoDataRequest request)
        {
            PutInsertToDoDataResponse respone = new PutInsertToDoDataResponse();

            try
            {
                ISchedulingRepository repo = Factory.GetRepository(request, RepositoryType.ToDo);
                string toDoId = (string)repo.Insert(request);
                if (!string.IsNullOrEmpty(toDoId))
                {
                    ToDoData data = (ToDoData)repo.FindByID(toDoId);
                    respone.ToDoData = data;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(respone);
        }