public string AddTask(ManagementTeam.Task task)
 {
     using (SqlConnection con = new SqlConnection
                                    (ConfigurationManager.ConnectionStrings["SQLProviderConnectionString"].ConnectionString))
     {
         SqlCommand cmd = new SqlCommand("dbo.AddTask", con);
         cmd.CommandType = CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("Id", task.Id);
         cmd.Parameters.AddWithValue("@PlannedStart", ((object)task.PlannedStart) ?? DBNull.Value);
         cmd.Parameters.AddWithValue("@PlannedEnd", ((object)task.PlannedEnd) ?? DBNull.Value);
         cmd.Parameters.AddWithValue("@ActualStart", ((object)task.ActualStart) ?? DBNull.Value);
         cmd.Parameters.AddWithValue("@ActualEnd", ((object)task.ActualEnd) ?? DBNull.Value);
         cmd.Parameters.AddWithValue("@Description", ((object)task.Description) ?? DBNull.Value);
         cmd.Parameters.AddWithValue("@Source", ((object)task.Source) ?? DBNull.Value);
         cmd.Parameters.AddWithValue("@Revision", ((object)task.Revision) ?? DBNull.Value);
         cmd.Parameters.AddWithValue("@ReporterId", task.ReporterId);
         cmd.Parameters.AddWithValue("@AssigneeId", task.AssigneeId);
         cmd.Parameters.AddWithValue("@ProjectId", task.ProjectId);
         cmd.Parameters.AddWithValue("@Comments", ((Object)task.Comments) ?? DBNull.Value);
         cmd.Parameters.AddWithValue("@StateId", task.StateId);
         if (task.severity == Severity.Task)
         {
             cmd.Parameters.AddWithValue("@SeverityId", (int)Severity.Task + 1);
         }
         else
         {
             cmd.Parameters.AddWithValue("@SeverityId", (int)Severity.Bug + 1);
         }
         con.Open();
         cmd.ExecuteNonQuery();
     }
     return("Added.");
 }
Ejemplo n.º 2
0
        public string AddTask(byte[] bytes)
        {
            MemoryStream stream = new MemoryStream(bytes);

            ManagementTeam.Task task = Communicator.ParseResponse <ManagementTeam.Task>(stream);
            _sqlProvider.AddTask(task);
            return("Added.");
        }
Ejemplo n.º 3
0
        public string AddTask(byte[] bytes)
        {
            string baseUrl = ConfigurationManager.ConnectionStrings["DALServerUrl"].ConnectionString;
            string url     = baseUrl + DestinationNames.AddTask;

            ManagementTeam.Task deserialized = Communicator.SendRequest <ManagementTeam.Task>
                                                   (bytes, url, "POST");
            return("Success");
        }
Ejemplo n.º 4
0
        public string AddTask(TaskModel task)
        {
            ManagementTeam.Task Task = this.CreateTask(task);
            string baseUrl           = ConfigurationManager.ConnectionStrings["ManagementServerName"].ConnectionString;
            string url = baseUrl + DestinationNames.AddTask;

            ManagementTeam.Task deserialized = Communicator.SendRequest <ManagementTeam.Task, ManagementTeam.Task>
                                                   (Task, url, "POST", "application/octet-stream");
            return("Success");
        }
Ejemplo n.º 5
0
 public ManagementTeam.Task CreateTask(TaskModel Task)
 {
     ManagementTeam.Task task = new ManagementTeam.Task();
     task.Id           = Task.Id;
     task.StateId      = Task.StateId;
     task.PlannedStart = Task.PlannedStart;
     task.PlannedEnd   = Task.PlannedEnd;
     task.ActualStart  = Task.ActualStart;
     task.ActualEnd    = Task.ActualEnd;
     task.Description  = Task.Description;
     task.Source       = Task.Source;
     task.Comments     = Task.Comments;
     task.Revision     = Task.Revision;
     task.ProjectId    = Task.ProjectId;
     task.ReporterId   = Task.ReporterId;
     task.AssigneeId   = Task.AssigneeId;
     return(task);
 }
Ejemplo n.º 6
0
 public string AddTask(ManagementTeam.Task task)
 {
     throw new NotImplementedException();
 }