public CRMLinkSynchedOrganizations(LoginUser loginUser) : base(loginUser) { }
public ReportFields(LoginUser loginUser) : base(loginUser) { }
public ChatParticipants(LoginUser loginUser) : base(loginUser) { }
public SlaPausedTimes(LoginUser loginUser) : base(loginUser) { }
public CRMLinkErrors(LoginUser loginUser) : base(loginUser) { }
public static int ExecuteNonQuery(LoginUser loginUser, string commandText) { return(ExecuteNonQuery(loginUser, new SqlCommand(commandText))); }
public static string GetJson(LoginUser loginUser, SqlCommand command) { return(JsonConvert.SerializeObject(GetExpandoObject(loginUser, command))); }
public static string GetDefaultPath(LoginUser loginUser, Folder folder, int filePathID) { string root = GetDefaultRoot(loginUser, filePathID); return(Path.Combine(root, GetFolderName(folder))); }
public AgentRatings(LoginUser loginUser) : base(loginUser) { }
public Products(LoginUser loginUser) : base(loginUser) { }
public ReportConditions(LoginUser loginUser) { _loginUser = loginUser; _items = new List <ReportCondition>(); }
public Reminders(LoginUser loginUser) : base(loginUser) { }
public TicketRelationships(LoginUser loginUser) : base(loginUser) { }
public DeletedIndexItems(LoginUser loginUser) : base(loginUser) { }
public TicketQueue(LoginUser loginUser) : base(loginUser) { }
public UsersView(LoginUser loginUser) : base(loginUser) { }
public static int ExecuteInt(LoginUser loginUser, SqlCommand command) { int?result = (int?)ExecuteScalar(loginUser, command); return(result == null ? -1 : (int)result); }
public UserNoteSettings(LoginUser loginUser) : base(loginUser) { }
public static ExpandoObject[] GetExpandoObject(LoginUser loginUser, SqlCommand command) { return(DataUtils.DataTableToExpandoObject(ExecuteQuery(loginUser, command))); }
public ProductFamilies(LoginUser loginUser) : base(loginUser) { }
public static object ExecuteScalar(LoginUser loginUser, string commandText) { return(ExecuteScalar(loginUser, new SqlCommand(commandText))); }
public AssetAssignmentsView(LoginUser loginUser) : base(loginUser) { }
public Subscriptions(LoginUser loginUser) : base(loginUser) { }
public SourceCommitLogs(LoginUser loginUser) : base(loginUser) { }
public static List <string> GetOrganizationJiraProjectKeys(int organizationId, LoginUser login) { List <string> jiraProjectKeys = new List <string>(); using (SqlCommand command = new SqlCommand()) { command.CommandText = @"SELECT JiraProjectKey FROM Products WHERE organizationId = @organizationId AND JiraProjectKey IS NOT NULL AND JiraProjectKey != '' UNION SELECT JiraProjectKey FROM ProductVersions WHERE productId IN (SELECT productId FROM Products WHERE organizationId = @organizationId AND JiraProjectKey IS NOT NULL AND JiraProjectKey != '') AND JiraProjectKey IS NOT NULL AND JiraProjectKey != '' UNION SELECT DefaultProject FROM CrmLinkTable WHERE organizationId = @organizationId AND crmType = 'Jira' AND DefaultProject IS NOT NULL AND DefaultProject != '' "; command.CommandType = CommandType.Text; command.Parameters.AddWithValue("@organizationId", organizationId); using (SqlConnection connection = new SqlConnection(login.ConnectionString)) { connection.Open(); SqlTransaction transaction = connection.BeginTransaction(IsolationLevel.ReadUncommitted); command.Connection = connection; command.Transaction = transaction; command.CommandTimeout = 300; SqlDataReader reader = command.ExecuteReader(CommandBehavior.CloseConnection); while (reader.Read()) { string jiraProjectKey = reader["JiraProjectKey"].ToString(); jiraProjectKeys.Add(jiraProjectKey); } } } return(jiraProjectKeys.ToList()); }
public ActionTypes(LoginUser loginUser) : base(loginUser) { }
public CustomerHubFeatureSettings(LoginUser loginUser) : base(loginUser) { }
public LoginHistory(LoginUser loginUser) : base(loginUser) { }
public static bool DownloadImage(string imageUrl, string savePath, int organizationId, AttachmentProxy.References refType, TeamSupport.Data.LoginUser user, out string resultMessage) { resultMessage = string.Empty; Image imageDownloaded = null; try { HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(imageUrl); using (HttpWebResponse httpWebResponse = (HttpWebResponse)httpWebRequest.GetResponse()) { using (Stream stream = httpWebResponse.GetResponseStream()) { if (httpWebResponse.StatusCode == HttpStatusCode.OK && httpWebResponse.ContentType.Contains("image")) { imageDownloaded = Image.FromStream(stream); if (imageDownloaded != null) { if (!DownloadCheckingIfDifferent(imageDownloaded, savePath, ImageFormat.Png)) { resultMessage = "The image is the same as the current one. It was not downloaded."; imageDownloaded = null; } else { resultMessage = string.Format("Image saved: {0}", savePath); //ModelAPI.AttachmentAPI.CreateAttachment(savePath, organizationId, refType, user.UserID, httpWebResponse); TeamSupport.Data.Quarantine.ServiceQ.CreateAttachment(savePath, organizationId, refType, user, httpWebResponse); } } else { resultMessage = "The image was not downloaded, but no error was thrown."; } } } } } catch (Exception ex) { resultMessage = string.Format("{0}\n{1}", ex.Message, ex.StackTrace); } return(imageDownloaded != null); }
public WebHooksPending(LoginUser loginUser) : base(loginUser) { }