Ejemplo n.º 1
0
 public void CreateTask(Task NewTask)
 {
     using (var Manager = new DataManager())
     {
         Manager.Context.Tasks.AddObject(NewTask);
         Manager.Context.SaveChanges();
     }
 }
Ejemplo n.º 2
0
 public void EditTask(Task Task)
 {
     using (var Manager = new DataManager())
     {
         Task EditedTask = new Task { TaskId = Task.TaskId };
         Manager.Context.Tasks.Attach(EditedTask);
         EditedTask.AssigneeId = Task.AssigneeId;
         EditedTask.VersionId = Task.VersionId;
         EditedTask.Description = Task.Description;
         EditedTask.IsFixed = Task.IsFixed;
         EditedTask.Name = Task.Name;
         Manager.Context.SaveChanges();
     }
 }
Ejemplo n.º 3
0
 public ActionResult Edit(Task Task, string UsersList, string Version)
 {
     Task.AssigneeId = _userServise.GetUser(UsersList).UserId;
      InoSoft.TeamStudio.Core.Entities.Version Versions= _versionServise.GetVersion(Version);
      if (Versions != null)
      {
          Task.VersionId = Versions.VersionId;
      }
      else
      {
          //create version.....
      }
     if (ModelState.IsValid)
     {
         _tasksServise.EditTask(Task);
         return RedirectToAction("Index");
     }
     return View(Task);
 }
Ejemplo n.º 4
0
        private void FixupTask1(Task previousValue)
        {
            if (previousValue != null && previousValue.Tasks1.Contains(this))
            {
                previousValue.Tasks1.Remove(this);
            }

            if (Task1 != null)
            {
                if (!Task1.Tasks1.Contains(this))
                {
                    Task1.Tasks1.Add(this);
                }
                if (ParentTaskId != Task1.TaskId)
                {
                    ParentTaskId = Task1.TaskId;
                }
            }
            else if (!_settingFK)
            {
                ParentTaskId = null;
            }
        }