Ejemplo n.º 1
0
 public CRMLinkSynchedOrganizations(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 2
0
 public ReportFields(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 3
0
 public ChatParticipants(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 4
0
 public SlaPausedTimes(LoginUser loginUser) : base(loginUser)
 {
 }
 public CRMLinkErrors(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 6
0
 public static int ExecuteNonQuery(LoginUser loginUser, string commandText)
 {
     return(ExecuteNonQuery(loginUser, new SqlCommand(commandText)));
 }
Ejemplo n.º 7
0
 public static string GetJson(LoginUser loginUser, SqlCommand command)
 {
     return(JsonConvert.SerializeObject(GetExpandoObject(loginUser, command)));
 }
Ejemplo n.º 8
0
        public static string GetDefaultPath(LoginUser loginUser, Folder folder, int filePathID)
        {
            string root = GetDefaultRoot(loginUser, filePathID);

            return(Path.Combine(root, GetFolderName(folder)));
        }
Ejemplo n.º 9
0
 public AgentRatings(LoginUser loginUser) : base(loginUser)
 {
 }
 public Products(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 11
0
 public ReportConditions(LoginUser loginUser)
 {
     _loginUser = loginUser;
     _items     = new List <ReportCondition>();
 }
Ejemplo n.º 12
0
 public Reminders(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 13
0
 public TicketRelationships(LoginUser loginUser) : base(loginUser)
 {
 }
 public DeletedIndexItems(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 15
0
 public TicketQueue(LoginUser loginUser) : base(loginUser)
 {
 }
 public UsersView(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 17
0
        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)
 {
 }
Ejemplo n.º 19
0
 public static ExpandoObject[] GetExpandoObject(LoginUser loginUser, SqlCommand command)
 {
     return(DataUtils.DataTableToExpandoObject(ExecuteQuery(loginUser, command)));
 }
 public ProductFamilies(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 21
0
 public static object ExecuteScalar(LoginUser loginUser, string commandText)
 {
     return(ExecuteScalar(loginUser, new SqlCommand(commandText)));
 }
 public AssetAssignmentsView(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 23
0
 public Subscriptions(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 24
0
 public SourceCommitLogs(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 25
0
        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)
 {
 }
Ejemplo n.º 27
0
 public CustomerHubFeatureSettings(LoginUser loginUser) : base(loginUser)
 {
 }
Ejemplo n.º 28
0
 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)
 {
 }