public IHttpActionResult UpdateCompanyIssues(CompanyIssueComment model) { if (model == null) { return(BadRequest()); } var result = jiraservice.GetIssuesByJQL(model.JQL); if (result == null) { return(InternalServerError(new Exception("Gabim ne marrjen e issue"))); } jiraservice.AddComentsIntoIssues(result, model.Comment, model.customField_10075); return(Ok("Issues u perditsuan me sukes")); }
public static List <CompanyIssueComment> GetCompanyComments() { List <CompanyIssueComment> companycomm = new List <CompanyIssueComment>(); try { using (SqlConnection conn = new SqlConnection(ConnectionString)) { conn.Open(); SqlCommand comm = new SqlCommand("logical_Jira_GetComments", conn); var reader = comm.ExecuteReader(); while (reader.Read()) { var o = new CompanyIssueComment { Company = reader["JIRAOrganizationName"].ToString(), Comment = reader["JiraComment"].ToString(), JQL = reader["JQL"].ToString(), OrganizationId = reader["Id"].ToString(), customField_10075 = Convert.ToInt32(reader["customField_10075"].ToString()) }; companycomm.Add(o); } return(companycomm); } } catch (Exception e) { return(companycomm); } }