-
after converting data into json, need to validate it.
-
this will be imported in mongo DB
-
now just need to remove sapce before name and slug in modules array. we can do that by using indexof..
Showing
24 changed files
350-UTILITIES/Parser/XMLtoJSON_utility/XMLtoJSON_utility.v12.suo
No preview for this file type
350-UTILITIES/SQL_To_Json/Newtonsof_Json_Net45.rar
0 → 100644
No preview for this file type
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON.sln
0 → 100644
1 | + | |
2 | +Microsoft Visual Studio Solution File, Format Version 12.00 | |
3 | +# Visual Studio 2013 | |
4 | +VisualStudioVersion = 12.0.21005.1 | |
5 | +MinimumVisualStudioVersion = 10.0.40219.1 | |
6 | +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SQLToJSON", "SQLToJSON\SQLToJSON.csproj", "{5D1182EE-1620-4BFE-BAE7-60408309DF55}" | |
7 | +EndProject | |
8 | +Global | |
9 | + GlobalSection(SolutionConfigurationPlatforms) = preSolution | |
10 | + Debug|Any CPU = Debug|Any CPU | |
11 | + Release|Any CPU = Release|Any CPU | |
12 | + EndGlobalSection | |
13 | + GlobalSection(ProjectConfigurationPlatforms) = postSolution | |
14 | + {5D1182EE-1620-4BFE-BAE7-60408309DF55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | |
15 | + {5D1182EE-1620-4BFE-BAE7-60408309DF55}.Debug|Any CPU.Build.0 = Debug|Any CPU | |
16 | + {5D1182EE-1620-4BFE-BAE7-60408309DF55}.Release|Any CPU.ActiveCfg = Release|Any CPU | |
17 | + {5D1182EE-1620-4BFE-BAE7-60408309DF55}.Release|Any CPU.Build.0 = Release|Any CPU | |
18 | + EndGlobalSection | |
19 | + GlobalSection(SolutionProperties) = preSolution | |
20 | + HideSolutionNode = FALSE | |
21 | + EndGlobalSection | |
22 | +EndGlobal | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/App.config
0 → 100644
1 | +<?xml version="1.0" encoding="utf-8" ?> | |
2 | +<configuration> | |
3 | + <startup> | |
4 | + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" /> | |
5 | + </startup> | |
6 | +<appSettings> | |
7 | + <add key ="connectionString" value ="Initial Catalog=AIADatabaseV5; Data Source= 192.168.90.53; Uid=AIA_Dev; Password=india123;"/> | |
8 | + <add key ="Dissectible Anatomy" value ="da-view-list"/> | |
9 | + <add key ="Atlas Anatomy" value ="aa-view-list"/> | |
10 | + <add key ="3D Anatomy" value ="3d-anatomy-list"/> | |
11 | + <add key ="Clinical Illustrations" value ="ci-list"/> | |
12 | + <add key ="Clinical Animations" value ="ca-list"/> | |
13 | + <add key ="Encyclopedia" value ="Link/encyclopedia"/> | |
14 | + <add key ="Curriculum Builder" value ="cb-list"/> | |
15 | + <add key ="Anatomy Test" value ="at-list"/> | |
16 | + <add key ="IP 10" value ="Link/IP-10"/> | |
17 | + <add key ="Lab Exercises" value ="le-list"/> | |
18 | + <add key ="In-Depth Reports" value ="Link/indepth-reports"/> | |
19 | + <add key ="CAM" value ="Link/complementary-and-alternate-medicine"/> | |
20 | + <add key ="A.D.A.M. Images" value ="ai-list"/> | |
21 | + <add key ="Body Guide" value ="Link/bodyguide"/> | |
22 | + <add key ="Symptom Navigator" value ="Link/symptom-navigator"/> | |
23 | + <add key ="The Wellness Tools" value ="Link/wellness-tools"/> | |
24 | + <add key ="A.D.A.M. OnDemand" value ="aod-list"/> | |
25 | + | |
26 | + | |
27 | +</appSettings> | |
28 | +</configuration> | |
0 | 29 | \ No newline at end of file | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Custom.cs
0 → 100644
1 | +using System; | |
2 | +using System.Collections.Generic; | |
3 | +using System.Data; | |
4 | +using System.Linq; | |
5 | +using System.Text; | |
6 | +using System.Threading.Tasks; | |
7 | +using Newtonsoft.Json; | |
8 | +using System.Configuration; | |
9 | +using System.Data.SqlClient; | |
10 | +using System.Configuration; | |
11 | +using Newtonsoft.Json.Linq; | |
12 | +using System.Text.RegularExpressions; | |
13 | +using System.Web; | |
14 | + | |
15 | +namespace SQLToJSON | |
16 | +{ | |
17 | + class Custom | |
18 | + { | |
19 | + string connString = string.Empty; | |
20 | + public Custom() | |
21 | + { | |
22 | + connString = Convert.ToString(ConfigurationManager.AppSettings["connectionString"]); | |
23 | + } | |
24 | + | |
25 | + public DataTable FetchDataFromTable(string cmd) | |
26 | + { | |
27 | + DataTable resultTable; | |
28 | + SqlDataAdapter da = new SqlDataAdapter(cmd, connString); | |
29 | + DataSet ds = new DataSet(); | |
30 | + da.Fill(ds); | |
31 | + resultTable = ds.Tables[0]; | |
32 | + return resultTable; | |
33 | + } | |
34 | + //nbh | |
35 | + public string DataTableToJSONWithJSONNet(dynamic table) | |
36 | + { | |
37 | + string JSONString = string.Empty; | |
38 | + JSONString = JsonConvert.SerializeObject(table); | |
39 | + string replacedString = JSONString.Replace(@"\r", ""); | |
40 | + string replacedString1 = replacedString.Replace(@"\n", ""); | |
41 | + string replacedString2 = replacedString1.Replace(@"\", ""); | |
42 | + | |
43 | + string finalString = Regex.Replace(replacedString2, "\\s+\"", ""); | |
44 | + | |
45 | + return finalString; | |
46 | + } | |
47 | + | |
48 | + public dynamic GetModifiedTableWithUserModules(DataTable userTable, DataTable moduleTable) | |
49 | + { | |
50 | + List<User> data2 = null; | |
51 | + List<dynamic> RESULT = new List<dynamic>(); | |
52 | + try | |
53 | + { | |
54 | + Dictionary<string,string> moduleIds = new Dictionary<string,string>(); | |
55 | + moduleIds.Add("Dissectible Anatomy", "1"); | |
56 | + moduleIds.Add("Atlas Anatomy", "2"); | |
57 | + moduleIds.Add("3D Anatomy", "3"); | |
58 | + moduleIds.Add("Clinical Illustrations", "4"); | |
59 | + moduleIds.Add("Clinical Animations", "5"); | |
60 | + moduleIds.Add("Encyclopedia", "6"); | |
61 | + moduleIds.Add("Curriculum Builder", "7"); | |
62 | + moduleIds.Add("Anatomy Test", "8"); | |
63 | + moduleIds.Add("IP 10", "9"); | |
64 | + moduleIds.Add("Lab Exercises", "10"); | |
65 | + moduleIds.Add("In-Depth Reports", "11"); | |
66 | + moduleIds.Add("CAM", "12"); | |
67 | + moduleIds.Add("A.D.A.M. Images", "13"); | |
68 | + moduleIds.Add("Body Guide", "14"); | |
69 | + moduleIds.Add("Symptom Navigator", "15"); | |
70 | + moduleIds.Add("The Wellness Tools", "16"); | |
71 | + moduleIds.Add("A.D.A.M. OnDemand", "1017"); | |
72 | + // moduleIds.Add("Dissectible Anatomy", "1"); | |
73 | + | |
74 | + | |
75 | + List<User> data = (from d in userTable.AsEnumerable() | |
76 | + join e in moduleTable.AsEnumerable() | |
77 | + on d.Field<int>("Id") equals | |
78 | + e.Field<int>("UserId") | |
79 | + select new User | |
80 | + { | |
81 | + loginId = d.Field<string>("loginId"), | |
82 | + password = d.Field<string>("password"), | |
83 | + firstName = d.Field<string>("firstName"), | |
84 | + lastName = d.Field<string>("lastName"), | |
85 | + UserType = d.Field<string>("userType"), | |
86 | + emailId = d.Field<string>("emailId"), | |
87 | + isActive = d.Field<Boolean>("isActive"), | |
88 | + securityQuestion = d.Field<string>("securityQuestion"), | |
89 | + securityAnswer = d.Field<string>("securityAnswer"), | |
90 | + creatorId = d.Field<int>("creatorId"), | |
91 | + creationDate = d.Field<DateTime?>("creationDate"), | |
92 | + modifierId = d.Field<int>("modifierId"), | |
93 | + modifiedDate = d.Field<DateTime?>("modifiedDate"), | |
94 | + deactivationDate = d.Field<DateTime?>("deactivationDate"), | |
95 | + module = e.Field<string>("Title"), | |
96 | + //JsonConvert.SerializeObject(e.Field<string>("Title")), | |
97 | + }).ToList(); | |
98 | + | |
99 | + | |
100 | + data2 = data.ToList(); | |
101 | + string previousUserId =""; | |
102 | + List<UserModules> userMods = new List<UserModules>(); | |
103 | + string modId=null; | |
104 | + string modName = null; | |
105 | + string modSlug = null; | |
106 | + foreach (var row in data) | |
107 | + { | |
108 | + | |
109 | + string userloginId = row.loginId; | |
110 | + if (userloginId != previousUserId) | |
111 | + { | |
112 | + previousUserId = userloginId; | |
113 | + | |
114 | + var Modules = (from m in data | |
115 | + where m.loginId == userloginId | |
116 | + select m.module).ToList(); | |
117 | + | |
118 | + string modu = JsonConvert.SerializeObject(Modules); | |
119 | + | |
120 | + var jsonObj = new JObject(); | |
121 | + dynamic mo = jsonObj; | |
122 | + mo.modules = new JArray(); | |
123 | + | |
124 | + foreach (var mods in Modules) | |
125 | + { | |
126 | + dynamic modul = new JObject(); | |
127 | + string MO = mods.ToString().Replace(@"\", ""); | |
128 | + modul.id = moduleIds[mods]; | |
129 | + modId = moduleIds[mods]; | |
130 | + if (MO == "CAM") | |
131 | + { | |
132 | + modul.name = "Complementary and Alternative Medicine"; | |
133 | + modName = "Complementary and Alternative Medicine"; | |
134 | + } | |
135 | + else if (MO == "Anatomy Test") | |
136 | + { | |
137 | + modul.name = "Anatomy Tests"; | |
138 | + modName = "Anatomy Tests"; | |
139 | + | |
140 | + } | |
141 | + else | |
142 | + { | |
143 | + modul.name = mods; | |
144 | + modName= mods; | |
145 | + } | |
146 | + modul.slug = ConfigurationManager.AppSettings[(mods.ToString()).Replace(@"\", "")]; | |
147 | + modSlug = ConfigurationManager.AppSettings[(mods.ToString()).Replace(@"\", "")]; | |
148 | + new UserModules { id = moduleIds[mods], name = modName, slug = modSlug }; | |
149 | + mo.modules.Add(modul); | |
150 | + | |
151 | + } | |
152 | + | |
153 | + previousUserId = userloginId; | |
154 | + | |
155 | + | |
156 | + | |
157 | + var lst = data2.Where(w => w.loginId == userloginId).Select(r => { r.module = (mo).ToString(); return r; }).ToList(); | |
158 | + string moddd = ((from mod in lst | |
159 | + select mod.module).FirstOrDefault().ToString()).Replace(@"\", ""); | |
160 | + string abc = Regex.Unescape(moddd); | |
161 | + var lst2 = data2.Where(w => w.loginId == userloginId).Select(r => { r.module = ((moddd)).ToString(); return r; }).ToList(); | |
162 | + | |
163 | + var reultantRow = lst2.FirstOrDefault(); | |
164 | + //to create array of userType | |
165 | + List<string> userTypes = new List<string>(); | |
166 | + var userType1 = (reultantRow.UserType); | |
167 | + userTypes.Add(userType1); | |
168 | + //userTypes.Add("Admin"); | |
169 | + reultantRow.userType = userTypes; | |
170 | + RESULT.Add(reultantRow); | |
171 | + } | |
172 | + } | |
173 | + | |
174 | + return RESULT; | |
175 | + } | |
176 | + catch (Exception e) | |
177 | + { | |
178 | + return e.Message; | |
179 | + } | |
180 | + | |
181 | + } | |
182 | + | |
183 | + } | |
184 | +} | |
185 | +; | |
0 | 186 | \ No newline at end of file | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/DBConstants.cs
0 → 100644
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/DataAccess.cs
0 → 100644
1 | +using System; | |
2 | +using System.Collections.Generic; | |
3 | +using System.Data; | |
4 | +using System.Linq; | |
5 | +using System.Text; | |
6 | +using System.Threading.Tasks; | |
7 | +using Newtonsoft.Json; | |
8 | +using System.Configuration; | |
9 | +using System.Data.SqlClient; | |
10 | +using System.Configuration; | |
11 | +using Newtonsoft.Json.Linq; | |
12 | +using System.Text.RegularExpressions; | |
13 | +using System.Web; | |
14 | + | |
15 | +namespace SQLToJSON | |
16 | +{ | |
17 | + class DataAccess | |
18 | + { | |
19 | + string connString = string.Empty; | |
20 | + public DataAccess() | |
21 | + { | |
22 | + connString = Convert.ToString(ConfigurationManager.AppSettings["connectionString"]); | |
23 | + } | |
24 | + | |
25 | + public DataTable FetchDataFromTable(string cmd) | |
26 | + { | |
27 | + DataTable resultTable; | |
28 | + SqlDataAdapter da = new SqlDataAdapter(cmd, connString); | |
29 | + DataSet ds = new DataSet(); | |
30 | + da.Fill(ds); | |
31 | + resultTable = ds.Tables[0]; | |
32 | + return resultTable; | |
33 | + } | |
34 | + //nbh | |
35 | + public string DataTableToJSONWithJSONNet(dynamic table) | |
36 | + { | |
37 | + string JSONString = string.Empty; | |
38 | + JSONString = JsonConvert.SerializeObject(table); | |
39 | + // string replacedString = JSONString.Replace(@"\r", ""); | |
40 | + // string replacedString1 = replacedString.Replace(@"\n", ""); | |
41 | + // string replacedString2 = replacedString1.Replace(@"\", ""); | |
42 | + | |
43 | + // string finalString = Regex.Replace(replacedString2, "\\s+\"", ""); | |
44 | + | |
45 | + //return finalString; | |
46 | + return JSONString; | |
47 | + } | |
48 | + | |
49 | + public dynamic GetModifiedTableWithUserModules(DataTable userTable, DataTable moduleTable) | |
50 | + { | |
51 | + List<User> data2 = null; | |
52 | + List<dynamic> RESULT = new List<dynamic>(); | |
53 | + try | |
54 | + { | |
55 | + Dictionary<string,string> moduleIds = new Dictionary<string,string>(); | |
56 | + moduleIds.Add("Dissectible Anatomy", "1"); | |
57 | + moduleIds.Add("Atlas Anatomy", "2"); | |
58 | + moduleIds.Add("3D Anatomy", "3"); | |
59 | + moduleIds.Add("Clinical Illustrations", "4"); | |
60 | + moduleIds.Add("Clinical Animations", "5"); | |
61 | + moduleIds.Add("Encyclopedia", "6"); | |
62 | + moduleIds.Add("Curriculum Builder", "7"); | |
63 | + moduleIds.Add("Anatomy Test", "8"); | |
64 | + moduleIds.Add("IP 10", "9"); | |
65 | + moduleIds.Add("Lab Exercises", "10"); | |
66 | + moduleIds.Add("In-Depth Reports", "11"); | |
67 | + moduleIds.Add("CAM", "12"); | |
68 | + moduleIds.Add("A.D.A.M. Images", "13"); | |
69 | + moduleIds.Add("Body Guide", "14"); | |
70 | + moduleIds.Add("Symptom Navigator", "15"); | |
71 | + moduleIds.Add("The Wellness Tools", "16"); | |
72 | + moduleIds.Add("A.D.A.M. OnDemand", "1017"); | |
73 | + // moduleIds.Add("Dissectible Anatomy", "1"); | |
74 | + | |
75 | + | |
76 | + List<User> data = (from d in userTable.AsEnumerable() | |
77 | + join e in moduleTable.AsEnumerable() | |
78 | + on d.Field<int>("Id") equals | |
79 | + e.Field<int>("UserId") | |
80 | + select new User | |
81 | + { | |
82 | + oldId = d.Field<int>("id"), | |
83 | + loginId = d.Field<string>("loginId"), | |
84 | + password = d.Field<string>("password"), | |
85 | + firstName = d.Field<string>("firstName"), | |
86 | + lastName = d.Field<string>("lastName"), | |
87 | + UserType = d.Field<string>("userType"), | |
88 | + emailId = d.Field<string>("emailId"), | |
89 | + isActive = d.Field<Boolean>("isActive"), | |
90 | + securityQuestion = d.Field<string>("securityQuestion"), | |
91 | + securityAnswer = d.Field<string>("securityAnswer"), | |
92 | + creatorId = d.Field<int>("creatorId"), | |
93 | + creationDate = d.Field<DateTime?>("creationDate"), | |
94 | + modifierId = d.Field<int>("modifierId"), | |
95 | + modifiedDate = d.Field<DateTime?>("modifiedDate"), | |
96 | + deactivationDate = d.Field<DateTime?>("deactivationDate"), | |
97 | + module = e.Field<string>("Title"), | |
98 | + //JsonConvert.SerializeObject(e.Field<string>("Title")), | |
99 | + }).ToList(); | |
100 | + | |
101 | + | |
102 | + data2 = data.ToList(); | |
103 | + string previousUserId =""; | |
104 | + string previousUserType=""; | |
105 | + | |
106 | + string modId=null; | |
107 | + string modName = null; | |
108 | + string modSlug = null; | |
109 | + | |
110 | + foreach (var row in data) | |
111 | + { | |
112 | + string userloginId = row.loginId; | |
113 | + if (userloginId != previousUserId) | |
114 | + { | |
115 | + List<UserModules> userMods = new List<UserModules>(); | |
116 | + List<string> userTypes = new List<string>(); | |
117 | + | |
118 | + previousUserId = userloginId; | |
119 | + | |
120 | + | |
121 | + string userT = row.UserType; | |
122 | + if (previousUserType != userT) | |
123 | + { | |
124 | + userTypes.Add(userT); | |
125 | + previousUserType = userT; | |
126 | + | |
127 | + } | |
128 | + | |
129 | + var Modules = (from m in data | |
130 | + where m.loginId == userloginId | |
131 | + select m.module).ToList(); | |
132 | + | |
133 | + | |
134 | + foreach (var mods in Modules) | |
135 | + { | |
136 | + string MO = mods.ToString().Replace(@"\", ""); | |
137 | + if (MO == "CAM") | |
138 | + { | |
139 | + modName = "Complementary and Alternative Medicine"; | |
140 | + } | |
141 | + else if (MO == "Anatomy Test") | |
142 | + { | |
143 | + modName = "Anatomy Tests"; | |
144 | + | |
145 | + } | |
146 | + else | |
147 | + { | |
148 | + modName= mods; | |
149 | + } | |
150 | + modSlug = ConfigurationManager.AppSettings[(mods.ToString()).Replace(@"\", "")]; | |
151 | + userMods.Add(new UserModules { id = moduleIds[mods], name = modName, slug = modSlug }); | |
152 | + | |
153 | + | |
154 | + } | |
155 | + | |
156 | + previousUserId = userloginId; | |
157 | + | |
158 | + | |
159 | + var lst2 = data2.Where(w => w.loginId == userloginId).Select(r => new User | |
160 | + { | |
161 | + oldId = row.oldId, | |
162 | + loginId = row.loginId, | |
163 | + password = row.password, | |
164 | + firstName = row.firstName, | |
165 | + lastName = row.lastName, | |
166 | + UserType = row.UserType, | |
167 | + emailId = row.emailId, | |
168 | + isActive = row.isActive, | |
169 | + securityQuestion = row.securityQuestion, | |
170 | + securityAnswer = row.securityAnswer, | |
171 | + creatorId = row.creatorId, | |
172 | + creationDate = row.creationDate, | |
173 | + modifierId = row.modifierId, | |
174 | + modifiedDate = row.modifiedDate, | |
175 | + deactivationDate = row.deactivationDate, | |
176 | + modules = userMods, | |
177 | + userType = userTypes | |
178 | + }).ToList(); | |
179 | + | |
180 | + | |
181 | + | |
182 | + var reultantRow = lst2.Take(1).Select(a=>new{ | |
183 | + oldId = a.oldId, | |
184 | + loginId = a.loginId, | |
185 | + password = a.password, | |
186 | + firstName = a.firstName, | |
187 | + lastName = a.lastName, | |
188 | + userType = a.userType, | |
189 | + emailId = a.emailId, | |
190 | + isActive = a.isActive, | |
191 | + securityQuestion = a.securityQuestion, | |
192 | + securityAnswer = a.securityAnswer, | |
193 | + creatorId = a.creatorId, | |
194 | + creationDate = a.creationDate, | |
195 | + modifierId = a.modifierId, | |
196 | + modifiedDate = a.modifiedDate, | |
197 | + deactivationDate = a.deactivationDate, | |
198 | + modules = a.modules | |
199 | + }).ToList(); | |
200 | + | |
201 | + RESULT.Add(reultantRow); | |
202 | + } | |
203 | + } | |
204 | + | |
205 | + return RESULT; | |
206 | + } | |
207 | + catch (Exception e) | |
208 | + { | |
209 | + return e.Message; | |
210 | + } | |
211 | + | |
212 | + } | |
213 | + } | |
214 | +} | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Form1.Designer.cs
0 → 100644
1 | +namespace SQLToJSON | |
2 | +{ | |
3 | + partial class Form1 | |
4 | + { | |
5 | + /// <summary> | |
6 | + /// Required designer variable. | |
7 | + /// </summary> | |
8 | + private System.ComponentModel.IContainer components = null; | |
9 | + | |
10 | + /// <summary> | |
11 | + /// Clean up any resources being used. | |
12 | + /// </summary> | |
13 | + /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> | |
14 | + protected override void Dispose(bool disposing) | |
15 | + { | |
16 | + if (disposing && (components != null)) | |
17 | + { | |
18 | + components.Dispose(); | |
19 | + } | |
20 | + base.Dispose(disposing); | |
21 | + } | |
22 | + | |
23 | + #region Windows Form Designer generated code | |
24 | + | |
25 | + /// <summary> | |
26 | + /// Required method for Designer support - do not modify | |
27 | + /// the contents of this method with the code editor. | |
28 | + /// </summary> | |
29 | + private void InitializeComponent() | |
30 | + { | |
31 | + this.button1 = new System.Windows.Forms.Button(); | |
32 | + this.label1 = new System.Windows.Forms.Label(); | |
33 | + this.SuspendLayout(); | |
34 | + // | |
35 | + // button1 | |
36 | + // | |
37 | + this.button1.Location = new System.Drawing.Point(79, 30); | |
38 | + this.button1.Name = "button1"; | |
39 | + this.button1.Size = new System.Drawing.Size(119, 23); | |
40 | + this.button1.TabIndex = 0; | |
41 | + this.button1.Text = "ConvertToJson"; | |
42 | + this.button1.UseVisualStyleBackColor = true; | |
43 | + this.button1.Click += new System.EventHandler(this.button1_Click); | |
44 | + // | |
45 | + // label1 | |
46 | + // | |
47 | + this.label1.AutoSize = true; | |
48 | + this.label1.Location = new System.Drawing.Point(115, 97); | |
49 | + this.label1.Name = "label1"; | |
50 | + this.label1.Size = new System.Drawing.Size(0, 13); | |
51 | + this.label1.TabIndex = 1; | |
52 | + // | |
53 | + // Form1 | |
54 | + // | |
55 | + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); | |
56 | + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; | |
57 | + this.ClientSize = new System.Drawing.Size(284, 261); | |
58 | + this.Controls.Add(this.label1); | |
59 | + this.Controls.Add(this.button1); | |
60 | + this.Name = "Form1"; | |
61 | + this.Text = "Form1"; | |
62 | + this.ResumeLayout(false); | |
63 | + this.PerformLayout(); | |
64 | + | |
65 | + } | |
66 | + | |
67 | + #endregion | |
68 | + | |
69 | + private System.Windows.Forms.Button button1; | |
70 | + private System.Windows.Forms.Label label1; | |
71 | + } | |
72 | +} | |
73 | + | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Form1.cs
0 → 100644
1 | +using Newtonsoft.Json.Linq; | |
2 | +using System; | |
3 | +using System.Collections.Generic; | |
4 | +using System.ComponentModel; | |
5 | +using System.Data; | |
6 | +using System.Drawing; | |
7 | +using System.IO; | |
8 | +using System.Linq; | |
9 | +using System.Text; | |
10 | +using System.Threading.Tasks; | |
11 | +using System.Windows.Forms; | |
12 | + | |
13 | +namespace SQLToJSON | |
14 | +{ | |
15 | + public partial class Form1 : Form | |
16 | + { | |
17 | + DataAccess objClass; | |
18 | + public Form1() | |
19 | + { | |
20 | + InitializeComponent(); | |
21 | + objClass = new DataAccess(); | |
22 | + } | |
23 | + | |
24 | + private void button1_Click(object sender, EventArgs e) | |
25 | + { | |
26 | + try | |
27 | + { | |
28 | + string userProfileQuery = "SELECT U.Id, U.LoginId as loginId, U.Password as password, U.FirstName as firstName, U.LastName as lastName, UT.Title AS userType," | |
29 | + + " U.EmailId as emailId, cast(U.IsActive as Bit) as isActive, sq.Title as securityQuestion, U.SecurityAnswer as securityAnswer, U.CreatorId as creatorId, U.CreationDate as creationDate, U.ModifierId as modifierId," | |
30 | + + " U.ModifiedDate as modifiedDate, U.DeactivationDate as deactivationDate FROM AIAUser U,UserType UT, SecurityQuestion sq" | |
31 | + + " WHERE U.UserTypeId = UT.Id and U.SecurityQuestionId = sq.Id"; | |
32 | + | |
33 | + string userModulesQuery = "select distinct ule.UserId,mt.ModuleId,rm.Title,rm.Id as id from LicenseToEdition le,AIAUserToLicenseEdition ule," | |
34 | + + " ModuleToLicense mt, ResourceModule rm where le.LicenseId = ule.LicenseEditionId and le.LicenseId=mt.LicenseId" | |
35 | + + " and rm.Id = mt.ModuleId order by ule.UserId,mt.ModuleId"; | |
36 | + | |
37 | + DataTable userTable = objClass.FetchDataFromTable(userProfileQuery); | |
38 | + userTable.Columns.Add("modules", typeof(System.String)); | |
39 | + DataTable moduleTable = objClass.FetchDataFromTable(userModulesQuery); | |
40 | + | |
41 | + dynamic resultTable = objClass.GetModifiedTableWithUserModules(userTable, moduleTable); | |
42 | + string aiaUserJson = objClass.DataTableToJSONWithJSONNet(resultTable); | |
43 | + if (File.Exists(@"D:/AIAUser.json")) | |
44 | + { | |
45 | + File.Delete(@"D:/AIAUser.json"); | |
46 | + } | |
47 | + System.IO.File.WriteAllText("D:/AIAUser.json", aiaUserJson); | |
48 | + | |
49 | + label1.Text = "Conversion Successfull."; | |
50 | + } | |
51 | + catch (Exception ex) | |
52 | + { | |
53 | + System.IO.File.WriteAllText("D:/AIAUser.json", "EXCEPTION:"+ex.Message); | |
54 | + } | |
55 | + | |
56 | + | |
57 | + } | |
58 | + } | |
59 | +} | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Form1.resx
0 → 100644
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<root> | |
3 | + <!-- | |
4 | + Microsoft ResX Schema | |
5 | + | |
6 | + Version 2.0 | |
7 | + | |
8 | + The primary goals of this format is to allow a simple XML format | |
9 | + that is mostly human readable. The generation and parsing of the | |
10 | + various data types are done through the TypeConverter classes | |
11 | + associated with the data types. | |
12 | + | |
13 | + Example: | |
14 | + | |
15 | + ... ado.net/XML headers & schema ... | |
16 | + <resheader name="resmimetype">text/microsoft-resx</resheader> | |
17 | + <resheader name="version">2.0</resheader> | |
18 | + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | |
19 | + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | |
20 | + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | |
21 | + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | |
22 | + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | |
23 | + <value>[base64 mime encoded serialized .NET Framework object]</value> | |
24 | + </data> | |
25 | + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |
26 | + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | |
27 | + <comment>This is a comment</comment> | |
28 | + </data> | |
29 | + | |
30 | + There are any number of "resheader" rows that contain simple | |
31 | + name/value pairs. | |
32 | + | |
33 | + Each data row contains a name, and value. The row also contains a | |
34 | + type or mimetype. Type corresponds to a .NET class that support | |
35 | + text/value conversion through the TypeConverter architecture. | |
36 | + Classes that don't support this are serialized and stored with the | |
37 | + mimetype set. | |
38 | + | |
39 | + The mimetype is used for serialized objects, and tells the | |
40 | + ResXResourceReader how to depersist the object. This is currently not | |
41 | + extensible. For a given mimetype the value must be set accordingly: | |
42 | + | |
43 | + Note - application/x-microsoft.net.object.binary.base64 is the format | |
44 | + that the ResXResourceWriter will generate, however the reader can | |
45 | + read any of the formats listed below. | |
46 | + | |
47 | + mimetype: application/x-microsoft.net.object.binary.base64 | |
48 | + value : The object must be serialized with | |
49 | + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter | |
50 | + : and then encoded with base64 encoding. | |
51 | + | |
52 | + mimetype: application/x-microsoft.net.object.soap.base64 | |
53 | + value : The object must be serialized with | |
54 | + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | |
55 | + : and then encoded with base64 encoding. | |
56 | + | |
57 | + mimetype: application/x-microsoft.net.object.bytearray.base64 | |
58 | + value : The object must be serialized into a byte array | |
59 | + : using a System.ComponentModel.TypeConverter | |
60 | + : and then encoded with base64 encoding. | |
61 | + --> | |
62 | + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | |
63 | + <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> | |
64 | + <xsd:element name="root" msdata:IsDataSet="true"> | |
65 | + <xsd:complexType> | |
66 | + <xsd:choice maxOccurs="unbounded"> | |
67 | + <xsd:element name="metadata"> | |
68 | + <xsd:complexType> | |
69 | + <xsd:sequence> | |
70 | + <xsd:element name="value" type="xsd:string" minOccurs="0" /> | |
71 | + </xsd:sequence> | |
72 | + <xsd:attribute name="name" use="required" type="xsd:string" /> | |
73 | + <xsd:attribute name="type" type="xsd:string" /> | |
74 | + <xsd:attribute name="mimetype" type="xsd:string" /> | |
75 | + <xsd:attribute ref="xml:space" /> | |
76 | + </xsd:complexType> | |
77 | + </xsd:element> | |
78 | + <xsd:element name="assembly"> | |
79 | + <xsd:complexType> | |
80 | + <xsd:attribute name="alias" type="xsd:string" /> | |
81 | + <xsd:attribute name="name" type="xsd:string" /> | |
82 | + </xsd:complexType> | |
83 | + </xsd:element> | |
84 | + <xsd:element name="data"> | |
85 | + <xsd:complexType> | |
86 | + <xsd:sequence> | |
87 | + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |
88 | + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | |
89 | + </xsd:sequence> | |
90 | + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> | |
91 | + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | |
92 | + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | |
93 | + <xsd:attribute ref="xml:space" /> | |
94 | + </xsd:complexType> | |
95 | + </xsd:element> | |
96 | + <xsd:element name="resheader"> | |
97 | + <xsd:complexType> | |
98 | + <xsd:sequence> | |
99 | + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |
100 | + </xsd:sequence> | |
101 | + <xsd:attribute name="name" type="xsd:string" use="required" /> | |
102 | + </xsd:complexType> | |
103 | + </xsd:element> | |
104 | + </xsd:choice> | |
105 | + </xsd:complexType> | |
106 | + </xsd:element> | |
107 | + </xsd:schema> | |
108 | + <resheader name="resmimetype"> | |
109 | + <value>text/microsoft-resx</value> | |
110 | + </resheader> | |
111 | + <resheader name="version"> | |
112 | + <value>2.0</value> | |
113 | + </resheader> | |
114 | + <resheader name="reader"> | |
115 | + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |
116 | + </resheader> | |
117 | + <resheader name="writer"> | |
118 | + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |
119 | + </resheader> | |
120 | +</root> | |
0 | 121 | \ No newline at end of file | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Modules.cs
0 → 100644
1 | +using System; | |
2 | +using System.Collections.Generic; | |
3 | +using System.Linq; | |
4 | +using System.Text; | |
5 | +using System.Threading.Tasks; | |
6 | + | |
7 | +namespace SQLToJSON | |
8 | +{ | |
9 | + public class UseModules | |
10 | + { | |
11 | + | |
12 | + public string id { get; set; } | |
13 | + public string name { get; set; } | |
14 | + public string slug { get; set; } | |
15 | + } | |
16 | +} | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Program.cs
0 → 100644
1 | +using System; | |
2 | +using System.Collections.Generic; | |
3 | +using System.Linq; | |
4 | +using System.Threading.Tasks; | |
5 | +using System.Windows.Forms; | |
6 | + | |
7 | +namespace SQLToJSON | |
8 | +{ | |
9 | + static class Program | |
10 | + { | |
11 | + /// <summary> | |
12 | + /// The main entry point for the application. | |
13 | + /// </summary> | |
14 | + [STAThread] | |
15 | + static void Main() | |
16 | + { | |
17 | + Application.EnableVisualStyles(); | |
18 | + Application.SetCompatibleTextRenderingDefault(false); | |
19 | + Application.Run(new Form1()); | |
20 | + } | |
21 | + } | |
22 | +} | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Properties/AssemblyInfo.cs
0 → 100644
1 | +using System.Reflection; | |
2 | +using System.Runtime.CompilerServices; | |
3 | +using System.Runtime.InteropServices; | |
4 | + | |
5 | +// General Information about an assembly is controlled through the following | |
6 | +// set of attributes. Change these attribute values to modify the information | |
7 | +// associated with an assembly. | |
8 | +[assembly: AssemblyTitle("SQLToJSON")] | |
9 | +[assembly: AssemblyDescription("")] | |
10 | +[assembly: AssemblyConfiguration("")] | |
11 | +[assembly: AssemblyCompany("")] | |
12 | +[assembly: AssemblyProduct("SQLToJSON")] | |
13 | +[assembly: AssemblyCopyright("Copyright © 2017")] | |
14 | +[assembly: AssemblyTrademark("")] | |
15 | +[assembly: AssemblyCulture("")] | |
16 | + | |
17 | +// Setting ComVisible to false makes the types in this assembly not visible | |
18 | +// to COM components. If you need to access a type in this assembly from | |
19 | +// COM, set the ComVisible attribute to true on that type. | |
20 | +[assembly: ComVisible(false)] | |
21 | + | |
22 | +// The following GUID is for the ID of the typelib if this project is exposed to COM | |
23 | +[assembly: Guid("9c41cb92-c47d-4501-b7ba-423410194cf7")] | |
24 | + | |
25 | +// Version information for an assembly consists of the following four values: | |
26 | +// | |
27 | +// Major Version | |
28 | +// Minor Version | |
29 | +// Build Number | |
30 | +// Revision | |
31 | +// | |
32 | +// You can specify all the values or you can default the Build and Revision Numbers | |
33 | +// by using the '*' as shown below: | |
34 | +// [assembly: AssemblyVersion("1.0.*")] | |
35 | +[assembly: AssemblyVersion("1.0.0.0")] | |
36 | +[assembly: AssemblyFileVersion("1.0.0.0")] | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Properties/Resources.Designer.cs
0 → 100644
1 | +//------------------------------------------------------------------------------ | |
2 | +// <auto-generated> | |
3 | +// This code was generated by a tool. | |
4 | +// Runtime Version:4.0.30319.42000 | |
5 | +// | |
6 | +// Changes to this file may cause incorrect behavior and will be lost if | |
7 | +// the code is regenerated. | |
8 | +// </auto-generated> | |
9 | +//------------------------------------------------------------------------------ | |
10 | + | |
11 | +namespace SQLToJSON.Properties | |
12 | +{ | |
13 | + | |
14 | + | |
15 | + /// <summary> | |
16 | + /// A strongly-typed resource class, for looking up localized strings, etc. | |
17 | + /// </summary> | |
18 | + // This class was auto-generated by the StronglyTypedResourceBuilder | |
19 | + // class via a tool like ResGen or Visual Studio. | |
20 | + // To add or remove a member, edit your .ResX file then rerun ResGen | |
21 | + // with the /str option, or rebuild your VS project. | |
22 | + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] | |
23 | + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] | |
24 | + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |
25 | + internal class Resources | |
26 | + { | |
27 | + | |
28 | + private static global::System.Resources.ResourceManager resourceMan; | |
29 | + | |
30 | + private static global::System.Globalization.CultureInfo resourceCulture; | |
31 | + | |
32 | + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] | |
33 | + internal Resources() | |
34 | + { | |
35 | + } | |
36 | + | |
37 | + /// <summary> | |
38 | + /// Returns the cached ResourceManager instance used by this class. | |
39 | + /// </summary> | |
40 | + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] | |
41 | + internal static global::System.Resources.ResourceManager ResourceManager | |
42 | + { | |
43 | + get | |
44 | + { | |
45 | + if ((resourceMan == null)) | |
46 | + { | |
47 | + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("SQLToJSON.Properties.Resources", typeof(Resources).Assembly); | |
48 | + resourceMan = temp; | |
49 | + } | |
50 | + return resourceMan; | |
51 | + } | |
52 | + } | |
53 | + | |
54 | + /// <summary> | |
55 | + /// Overrides the current thread's CurrentUICulture property for all | |
56 | + /// resource lookups using this strongly typed resource class. | |
57 | + /// </summary> | |
58 | + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] | |
59 | + internal static global::System.Globalization.CultureInfo Culture | |
60 | + { | |
61 | + get | |
62 | + { | |
63 | + return resourceCulture; | |
64 | + } | |
65 | + set | |
66 | + { | |
67 | + resourceCulture = value; | |
68 | + } | |
69 | + } | |
70 | + } | |
71 | +} | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Properties/Resources.resx
0 → 100644
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<root> | |
3 | + <!-- | |
4 | + Microsoft ResX Schema | |
5 | + | |
6 | + Version 2.0 | |
7 | + | |
8 | + The primary goals of this format is to allow a simple XML format | |
9 | + that is mostly human readable. The generation and parsing of the | |
10 | + various data types are done through the TypeConverter classes | |
11 | + associated with the data types. | |
12 | + | |
13 | + Example: | |
14 | + | |
15 | + ... ado.net/XML headers & schema ... | |
16 | + <resheader name="resmimetype">text/microsoft-resx</resheader> | |
17 | + <resheader name="version">2.0</resheader> | |
18 | + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> | |
19 | + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> | |
20 | + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> | |
21 | + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> | |
22 | + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> | |
23 | + <value>[base64 mime encoded serialized .NET Framework object]</value> | |
24 | + </data> | |
25 | + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> | |
26 | + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> | |
27 | + <comment>This is a comment</comment> | |
28 | + </data> | |
29 | + | |
30 | + There are any number of "resheader" rows that contain simple | |
31 | + name/value pairs. | |
32 | + | |
33 | + Each data row contains a name, and value. The row also contains a | |
34 | + type or mimetype. Type corresponds to a .NET class that support | |
35 | + text/value conversion through the TypeConverter architecture. | |
36 | + Classes that don't support this are serialized and stored with the | |
37 | + mimetype set. | |
38 | + | |
39 | + The mimetype is used for serialized objects, and tells the | |
40 | + ResXResourceReader how to depersist the object. This is currently not | |
41 | + extensible. For a given mimetype the value must be set accordingly: | |
42 | + | |
43 | + Note - application/x-microsoft.net.object.binary.base64 is the format | |
44 | + that the ResXResourceWriter will generate, however the reader can | |
45 | + read any of the formats listed below. | |
46 | + | |
47 | + mimetype: application/x-microsoft.net.object.binary.base64 | |
48 | + value : The object must be serialized with | |
49 | + : System.Serialization.Formatters.Binary.BinaryFormatter | |
50 | + : and then encoded with base64 encoding. | |
51 | + | |
52 | + mimetype: application/x-microsoft.net.object.soap.base64 | |
53 | + value : The object must be serialized with | |
54 | + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter | |
55 | + : and then encoded with base64 encoding. | |
56 | + | |
57 | + mimetype: application/x-microsoft.net.object.bytearray.base64 | |
58 | + value : The object must be serialized into a byte array | |
59 | + : using a System.ComponentModel.TypeConverter | |
60 | + : and then encoded with base64 encoding. | |
61 | + --> | |
62 | + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> | |
63 | + <xsd:element name="root" msdata:IsDataSet="true"> | |
64 | + <xsd:complexType> | |
65 | + <xsd:choice maxOccurs="unbounded"> | |
66 | + <xsd:element name="metadata"> | |
67 | + <xsd:complexType> | |
68 | + <xsd:sequence> | |
69 | + <xsd:element name="value" type="xsd:string" minOccurs="0" /> | |
70 | + </xsd:sequence> | |
71 | + <xsd:attribute name="name" type="xsd:string" /> | |
72 | + <xsd:attribute name="type" type="xsd:string" /> | |
73 | + <xsd:attribute name="mimetype" type="xsd:string" /> | |
74 | + </xsd:complexType> | |
75 | + </xsd:element> | |
76 | + <xsd:element name="assembly"> | |
77 | + <xsd:complexType> | |
78 | + <xsd:attribute name="alias" type="xsd:string" /> | |
79 | + <xsd:attribute name="name" type="xsd:string" /> | |
80 | + </xsd:complexType> | |
81 | + </xsd:element> | |
82 | + <xsd:element name="data"> | |
83 | + <xsd:complexType> | |
84 | + <xsd:sequence> | |
85 | + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |
86 | + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> | |
87 | + </xsd:sequence> | |
88 | + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> | |
89 | + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> | |
90 | + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> | |
91 | + </xsd:complexType> | |
92 | + </xsd:element> | |
93 | + <xsd:element name="resheader"> | |
94 | + <xsd:complexType> | |
95 | + <xsd:sequence> | |
96 | + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> | |
97 | + </xsd:sequence> | |
98 | + <xsd:attribute name="name" type="xsd:string" use="required" /> | |
99 | + </xsd:complexType> | |
100 | + </xsd:element> | |
101 | + </xsd:choice> | |
102 | + </xsd:complexType> | |
103 | + </xsd:element> | |
104 | + </xsd:schema> | |
105 | + <resheader name="resmimetype"> | |
106 | + <value>text/microsoft-resx</value> | |
107 | + </resheader> | |
108 | + <resheader name="version"> | |
109 | + <value>2.0</value> | |
110 | + </resheader> | |
111 | + <resheader name="reader"> | |
112 | + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |
113 | + </resheader> | |
114 | + <resheader name="writer"> | |
115 | + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> | |
116 | + </resheader> | |
117 | +</root> | |
0 | 118 | \ No newline at end of file | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Properties/Settings.Designer.cs
0 → 100644
1 | +//------------------------------------------------------------------------------ | |
2 | +// <auto-generated> | |
3 | +// This code was generated by a tool. | |
4 | +// Runtime Version:4.0.30319.42000 | |
5 | +// | |
6 | +// Changes to this file may cause incorrect behavior and will be lost if | |
7 | +// the code is regenerated. | |
8 | +// </auto-generated> | |
9 | +//------------------------------------------------------------------------------ | |
10 | + | |
11 | +namespace SQLToJSON.Properties | |
12 | +{ | |
13 | + | |
14 | + | |
15 | + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] | |
16 | + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] | |
17 | + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase | |
18 | + { | |
19 | + | |
20 | + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); | |
21 | + | |
22 | + public static Settings Default | |
23 | + { | |
24 | + get | |
25 | + { | |
26 | + return defaultInstance; | |
27 | + } | |
28 | + } | |
29 | + } | |
30 | +} | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/Properties/Settings.settings
0 → 100644
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/SQLToJSON.csproj
0 → 100644
1 | +<?xml version="1.0" encoding="utf-8"?> | |
2 | +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
3 | + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> | |
4 | + <PropertyGroup> | |
5 | + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | |
6 | + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | |
7 | + <ProjectGuid>{5D1182EE-1620-4BFE-BAE7-60408309DF55}</ProjectGuid> | |
8 | + <OutputType>WinExe</OutputType> | |
9 | + <AppDesignerFolder>Properties</AppDesignerFolder> | |
10 | + <RootNamespace>SQLToJSON</RootNamespace> | |
11 | + <AssemblyName>SQLToJSON</AssemblyName> | |
12 | + <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> | |
13 | + <FileAlignment>512</FileAlignment> | |
14 | + </PropertyGroup> | |
15 | + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> | |
16 | + <PlatformTarget>AnyCPU</PlatformTarget> | |
17 | + <DebugSymbols>true</DebugSymbols> | |
18 | + <DebugType>full</DebugType> | |
19 | + <Optimize>false</Optimize> | |
20 | + <OutputPath>bin\Debug\</OutputPath> | |
21 | + <DefineConstants>DEBUG;TRACE</DefineConstants> | |
22 | + <ErrorReport>prompt</ErrorReport> | |
23 | + <WarningLevel>4</WarningLevel> | |
24 | + </PropertyGroup> | |
25 | + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | |
26 | + <PlatformTarget>AnyCPU</PlatformTarget> | |
27 | + <DebugType>pdbonly</DebugType> | |
28 | + <Optimize>true</Optimize> | |
29 | + <OutputPath>bin\Release\</OutputPath> | |
30 | + <DefineConstants>TRACE</DefineConstants> | |
31 | + <ErrorReport>prompt</ErrorReport> | |
32 | + <WarningLevel>4</WarningLevel> | |
33 | + </PropertyGroup> | |
34 | + <ItemGroup> | |
35 | + <Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> | |
36 | + <SpecificVersion>False</SpecificVersion> | |
37 | + <HintPath>..\..\..\Newtonsof_Json_Net45\Net45\Newtonsoft.Json.dll</HintPath> | |
38 | + </Reference> | |
39 | + <Reference Include="System" /> | |
40 | + <Reference Include="System.Configuration" /> | |
41 | + <Reference Include="System.Core" /> | |
42 | + <Reference Include="System.Web.Extensions" /> | |
43 | + <Reference Include="System.Xml.Linq" /> | |
44 | + <Reference Include="System.Data.DataSetExtensions" /> | |
45 | + <Reference Include="Microsoft.CSharp" /> | |
46 | + <Reference Include="System.Data" /> | |
47 | + <Reference Include="System.Deployment" /> | |
48 | + <Reference Include="System.Drawing" /> | |
49 | + <Reference Include="System.Windows.Forms" /> | |
50 | + <Reference Include="System.Xml" /> | |
51 | + </ItemGroup> | |
52 | + <ItemGroup> | |
53 | + <Compile Include="Custom.cs" /> | |
54 | + <Compile Include="DataAccess.cs" /> | |
55 | + <Compile Include="Form1.cs"> | |
56 | + <SubType>Form</SubType> | |
57 | + </Compile> | |
58 | + <Compile Include="Form1.Designer.cs"> | |
59 | + <DependentUpon>Form1.cs</DependentUpon> | |
60 | + </Compile> | |
61 | + <Compile Include="Modules.cs" /> | |
62 | + <Compile Include="Program.cs" /> | |
63 | + <Compile Include="Properties\AssemblyInfo.cs" /> | |
64 | + <Compile Include="StringContent.cs" /> | |
65 | + <Compile Include="StringContent_2.cs" /> | |
66 | + <Compile Include="User.cs" /> | |
67 | + <Compile Include="UserModules.cs" /> | |
68 | + <EmbeddedResource Include="Form1.resx"> | |
69 | + <DependentUpon>Form1.cs</DependentUpon> | |
70 | + </EmbeddedResource> | |
71 | + <EmbeddedResource Include="Properties\Resources.resx"> | |
72 | + <Generator>ResXFileCodeGenerator</Generator> | |
73 | + <LastGenOutput>Resources.Designer.cs</LastGenOutput> | |
74 | + <SubType>Designer</SubType> | |
75 | + </EmbeddedResource> | |
76 | + <Compile Include="Properties\Resources.Designer.cs"> | |
77 | + <AutoGen>True</AutoGen> | |
78 | + <DependentUpon>Resources.resx</DependentUpon> | |
79 | + </Compile> | |
80 | + <None Include="Properties\Settings.settings"> | |
81 | + <Generator>SettingsSingleFileGenerator</Generator> | |
82 | + <LastGenOutput>Settings.Designer.cs</LastGenOutput> | |
83 | + </None> | |
84 | + <Compile Include="Properties\Settings.Designer.cs"> | |
85 | + <AutoGen>True</AutoGen> | |
86 | + <DependentUpon>Settings.settings</DependentUpon> | |
87 | + <DesignTimeSharedInput>True</DesignTimeSharedInput> | |
88 | + </Compile> | |
89 | + </ItemGroup> | |
90 | + <ItemGroup> | |
91 | + <None Include="App.config" /> | |
92 | + </ItemGroup> | |
93 | + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> | |
94 | + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. | |
95 | + Other similar extension points exist, see Microsoft.Common.targets. | |
96 | + <Target Name="BeforeBuild"> | |
97 | + </Target> | |
98 | + <Target Name="AfterBuild"> | |
99 | + </Target> | |
100 | + --> | |
101 | +</Project> | |
0 | 102 | \ No newline at end of file | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/StringContent.cs
0 → 100644
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/StringContent_2.cs
0 → 100644
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/User.cs
0 → 100644
1 | +using System; | |
2 | +using System.Collections.Generic; | |
3 | +using System.Linq; | |
4 | +using System.Text; | |
5 | +using System.Threading.Tasks; | |
6 | + | |
7 | +namespace SQLToJSON | |
8 | +{ | |
9 | + public class User | |
10 | + { | |
11 | + | |
12 | + public int oldId { get; set; } | |
13 | + public string loginId{get;set;} | |
14 | + public string password { get; set; } | |
15 | + public string firstName { get; set; } | |
16 | + public string lastName { get; set; } | |
17 | + public string UserType { get; set; } | |
18 | + public string emailId { get; set; } | |
19 | + public bool isActive { get; set; } | |
20 | + public string securityQuestion { get; set; } | |
21 | + public string securityAnswer { get; set; } | |
22 | + public int creatorId { get; set; } | |
23 | + public DateTime? creationDate{ get; set; } | |
24 | + public int modifierId { get; set; } | |
25 | + public DateTime? modifiedDate { get; set; } | |
26 | + public DateTime? deactivationDate { get; set; } | |
27 | + public string module { get; set; } | |
28 | + public List<UserModules> modules { get; set; } | |
29 | + public List<string> userType { get; set; } | |
30 | + | |
31 | + } | |
32 | +} | ... | ... |
350-UTILITIES/SQL_To_Json/SQLToJSON/SQLToJSON/UserModules.cs
0 → 100644
1 | +using System; | |
2 | +using System.Collections.Generic; | |
3 | +using System.Linq; | |
4 | +using System.Text; | |
5 | +using System.Threading.Tasks; | |
6 | + | |
7 | +namespace SQLToJSON | |
8 | +{ | |
9 | + public class UserModules | |
10 | + { | |
11 | + | |
12 | + public string id { get; set; } | |
13 | + public string name { get; set; } | |
14 | + public string slug { get; set; } | |
15 | + | |
16 | + } | |
17 | +} | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/main/AIA.js
... | ... | @@ -27,7 +27,7 @@ AIA.constant('pages', [ |
27 | 27 | }, |
28 | 28 | { // id:3, |
29 | 29 | name: 'Clinical Illustrations', |
30 | - pageSlug: 'clinical-illustrations', | |
30 | + pageSlug: 'ci-list', | |
31 | 31 | pageUrl: 'app/views/ci/ci-view.html', |
32 | 32 | pageController: 'CIController' |
33 | 33 | |
... | ... | @@ -35,7 +35,7 @@ AIA.constant('pages', [ |
35 | 35 | { |
36 | 36 | // id:4, |
37 | 37 | name: 'Clinical Animations', |
38 | - pageSlug: 'clinical-animations', | |
38 | + pageSlug: 'ca-list', | |
39 | 39 | pageUrl: 'app/views/ca/ca-view.html', |
40 | 40 | pageController: 'CAController' |
41 | 41 | |
... | ... | @@ -49,35 +49,35 @@ AIA.constant('pages', [ |
49 | 49 | }, |
50 | 50 | { //id:6, |
51 | 51 | name: 'Curriculum Builder', |
52 | - pageSlug: 'curriculum-builder', | |
52 | + pageSlug: 'cb-list', | |
53 | 53 | pageUrl: 'app/views/CBuild/CBuild-view.html', |
54 | 54 | pageController: 'CurrBuildController' |
55 | 55 | |
56 | 56 | }, |
57 | 57 | { //id:7, |
58 | 58 | name: 'Anatomy Tests', |
59 | - pageSlug: 'anatomy-test', | |
59 | + pageSlug: 'at-list', | |
60 | 60 | pageUrl: 'app/views/AnatTest/AnatTest-view.html', |
61 | 61 | pageController: 'AnatTestController' |
62 | 62 | |
63 | 63 | }, |
64 | 64 | { //id:8, |
65 | 65 | name: 'Lab Exercises', |
66 | - pageSlug: 'lab-exercises', | |
66 | + pageSlug: 'le-list', | |
67 | 67 | pageUrl: 'app/views/LabExerc/LabExerc-view.html', |
68 | 68 | pageController: 'LabExercController' |
69 | 69 | |
70 | 70 | }, |
71 | 71 | { //id:9, |
72 | 72 | name: 'ADAM Images', |
73 | - pageSlug: 'ADAM-images', | |
73 | + pageSlug: 'ai-list', | |
74 | 74 | pageUrl: 'app/views/ADAMImg/ADAMImg-view.html', |
75 | 75 | pageController: 'ADAMImgController' |
76 | 76 | |
77 | 77 | }, |
78 | 78 | { //id:10, |
79 | 79 | name: 'ADAM On Demand', |
80 | - pageSlug: 'ADAM-on-demand', | |
80 | + pageSlug: 'aod-list', | |
81 | 81 | pageUrl: 'app/views/AOD/AOD-view.html', |
82 | 82 | pageController: 'AODController' |
83 | 83 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
... | ... | @@ -24,26 +24,8 @@ |
24 | 24 | </div> |
25 | 25 | <!--Sidebar--> |
26 | 26 | <div class="sidebar pull-left mCustomScrollbar _mCS_1 mCS-autoHide "> |
27 | - <!--{{name}}--> | |
28 | 27 | <ul class="nav nav-sidebar" ng-init="hideScrollbar()"> |
29 | - <!--<li ng-repeat="module in userModules"><a id="{{module.slug}}" href="{{module.slug}}" ng-click="IsVisible()">{{module.name}}</a></li>--> | |
30 | - <li><a href="da-view-list" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/da-view-list')}">Dissectible Anatomy</a></li> | |
31 | - <li ><a href="3d-anatomy-list" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/3d-anatomy-list')}">3D Anatomy</a></li> | |
32 | - <li ><a href="clinical-illustrations" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/clinical-illustrations')}">Clinical Illustrations</a></li> | |
33 | - <li ><a href="clinical-animations" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/clinical-animations')}">Clinical Animations</a></li> | |
34 | - <li><a href="Link/encyclopedia" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/encyclopedia')}">Encyclopedia</a></li> | |
35 | - <li><a href="curriculum-builder" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/curriculum-builder')}">Curriculum Builder</a></li> | |
36 | - <li><a href="anatomy-test" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/anatomy-test')}">Anatomy Tests</a></li> | |
37 | - <li><a href="Link/IP-10" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/IP-10')}">IP 10</a></li> | |
38 | - <li><a href="lab-exercises" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/lab-exercises')}">Lab Exercises</a></li> | |
39 | - <li><a href="Link/indepth-reports" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/indepth-reports')}">In-Depth Reports</a></li> | |
40 | - <li><a href="Link/complementary-and-alternate-medicine" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/complementary-and-alternate-medicine')}">Complementary and Alternative Medicine</a></li> | |
41 | - <li><a href="ADAM-Images" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/ADAM-Images')}">A.D.A.M Images</a></li> | |
42 | - <li><a href="Link/bodyguide" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/bodyguide')}">Body Guide</a></li> | |
43 | - <li><a href="Link/symptom-navigator" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/symptom-navigator')}">Symptom Navigator</a></li> | |
44 | - <li><a href="Link/wellness-tools" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/Link/wellness-tools')}">The Wellness Tools</a></li> | |
45 | - <li><a href="ADAM-on-demand" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/ADAM-on-demand')}">A.D.A.M OnDemand</a></li> | |
46 | - | |
28 | + <li ng-repeat="module in userModules"><a id="{{module.slug}}" href="{{module.slug}}" ng-click="IsVisible()" ng-class="{active:isLeftMenuActive('/{{module.slug}}')}">{{module.name}}</a></li> | |
47 | 29 | </ul> |
48 | 30 | </div> |
49 | 31 | ... | ... |