-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUtils.cs
More file actions
124 lines (109 loc) · 3.98 KB
/
Copy pathUtils.cs
File metadata and controls
124 lines (109 loc) · 3.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
namespace RuleDConversion;
internal static class Utils
{
internal static string FormatQueryText(string queryToRun)
{
if (!string.IsNullOrEmpty(queryToRun))
{
if (queryToRun.StartsWith("UD_RUNSQLD('"))
{
queryToRun = queryToRun.Replace("UD_RUNSQLD('", "");
queryToRun = queryToRun[..^2].Trim();
}
}
return queryToRun;
}
internal static SqlConnectionStringBuilder GetSqlServerConnectionSB()
{
return new()
{
DataSource = "localhost", //"USENKMSQL013D.global.ul.com",
InitialCatalog = "GoldenStaging",
IntegratedSecurity = true
};
}
internal static OracleConnectionStringBuilder GetOracleConnectionSB()
{
//Golden
return new()
{
DataSource = "STUDCONT-DB:1521/STUDCONT",
UserID = "WERCS",
Password = "TYtxtvEm#092" //CUST4 = "MPtotvEo#862"
};
//CS
//return new()
//{
// DataSource = "STUDCS-db.global.ul.com:1521/STUDCS",
// UserID = "WERCS",
// Password = "TheWercs1" //CUST4 = "MPtotvEo#862"
//};
}
internal static string ModifyForRun(string queryToRun)
{
queryToRun = queryToRun.ToUpper();
if (queryToRun.Contains("{FN NOW()}"))
{
queryToRun = queryToRun.Replace("{FN NOW()}", "sysdate");
}
if (queryToRun.Contains("{ FN NOW()}"))
{
queryToRun = queryToRun.Replace("{ FN NOW()}", "sysdate");
}
if (queryToRun.Contains("{FN NOW() }"))
{
queryToRun = queryToRun.Replace("{FN NOW() }", "sysdate");
}
return queryToRun;
}
public class RegionalStream
{
public RegionalStream() { }
public int Id { get; set; }
public string Name { get; set; }
public int Total { get; set; }
public int Converted { get; set; }
public int UnConverted { get; set; }
}
public static List<RegionalStream> GetRegionalRuleStreamList()
{
/*
reference for this
https://ul.sharepoint.com/:x:/r/sites/collab/622/GoldenGCS/_layouts/15/Doc.aspx?sourcedoc=%7BAB250C01-57F7-45F0-95CE-0288C9F0945C%7D&file=GCS%20Subformats%20&%20Rules%20Licensing.xlsx=&action=default&mobileredirect=true
*/
return
[
new() { Id = 86, Name = "GHS Wizard Shared" },
new() { Id = 74, Name = "Post-CA DB" },
new() { Id = 104, Name = "Argentina" },
new() { Id = 101, Name = "Australia" },
new() { Id = 89, Name = "Brazil" },
new() { Id = 93, Name = "Canada" },
new() { Id = 108, Name = "Chile" },
new() { Id = 90, Name = "China" },
new() { Id = 107, Name = "Colombia" },
new() { Id = 92, Name = "Europe" },
new() { Id = 94, Name = "Indonesia" },
new() { Id = 97, Name = "Israel" },
new() { Id = 95, Name = "Japan" },
new() { Id = 96, Name = "Korea" },
new() { Id = 102, Name = "Malaysia" },
new() { Id = 106, Name = "Mexico" },
new() { Id = 103, Name = "New Zealand" },
new() { Id = 98, Name = "North America" },
new() { Id = 75, Name = "PCN A" },
new() { Id = 83, Name = "PCN B" },
new() { Id = 84, Name = "PCN C" },
new() { Id = 99, Name = "Philipines" },
new() { Id = 105, Name = "Russia" },
new() { Id = 109, Name = "Singapore" },
new() { Id = 121, Name = "South Africa" },
new() { Id = 115, Name = "Taiwan" },
new() { Id = 100, Name = "Thailand" },
new() { Id = 111, Name = "Turkiye" },
new() { Id = 87, Name = "United States" },
new() { Id = 91, Name = "Vietnam" },
new() { Id = 117, Name = "United Kingom" },
];
}
}