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); }
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); }
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);; }
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); }