예제 #1
0
 // Default contructor that set entity to field
 public TaskModel(Task task)
 {
     this._task = task;
     this._id = task.Id;
     this._title = task.Title;
     this._created_date = task.CreatedDate;
     this._created_by = task.CreatedBy;
     this._modified_date = task.ModifiedDate;
     this._modified_by = task.ModifiedBy;
     this._description = task.Description;
     this._assigned_to = task.AssignedTo;
     this._status = task.Status;
     this._estimated_or_effort = task.EstimatedOrEffort;
     this._priority = task.Priority;
     this._iteration = task.Iteration;
     this._block = task.Block;
     this._area = task.Area;
     this._task_id = task.TaskId;
     this._type = task.Type;
     this._originalTask = task.DeepClone();
 }
예제 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Task EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTask(Task task)
 {
     base.AddObject("Task", task);
 }
예제 #3
0
 /// <summary>
 /// Create a new Task object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="title">Initial value of the Title property.</param>
 /// <param name="assignedTo">Initial value of the AssignedTo property.</param>
 /// <param name="status">Initial value of the Status property.</param>
 /// <param name="iteration">Initial value of the Iteration property.</param>
 /// <param name="block">Initial value of the Block property.</param>
 /// <param name="area">Initial value of the Area property.</param>
 /// <param name="taskId">Initial value of the TaskId property.</param>
 /// <param name="type">Initial value of the Type property.</param>
 public static Task CreateTask(global::System.Guid id, global::System.String title, global::System.Guid assignedTo, global::System.Int32 status, global::System.Int32 iteration, global::System.Int32 block, global::System.Guid area, global::System.Int32 taskId, global::System.Int32 type)
 {
     Task task = new Task();
     task.Id = id;
     task.Title = title;
     task.AssignedTo = assignedTo;
     task.Status = status;
     task.Iteration = iteration;
     task.Block = block;
     task.Area = area;
     task.TaskId = taskId;
     task.Type = type;
     return task;
 }
예제 #4
0
 // Default contructor
 public TaskModel()
 {
     this.IsNewItem = true;
     this._task = new Task();
 }
예제 #5
0
 // Delete a existed Task
 public void DeleteTask(Task _task)
 {
     unitOfWork.Delete<Task>(_task);
 }
예제 #6
0
 // Add a new Task
 public Task AddTask(Task _task)
 {
     unitOfWork.Add<Task>(_task);
     return _task;
 }
예제 #7
0
 // Update a existed Task
 public Task UpdateTask(Task _task)
 {
     unitOfWork.Update<Task>(_task);
     return _task;
 }
예제 #8
0
 // Refresh an existed Task
 public Task RefeshTask(Task _task)
 {
     unitOfWork.Refresh<Task>(_task);
     return _task;
 }