Commit 41ae1eb1621cccac40f0a9a2d313ab642afeb289

Authored by Harpreet Banwait
2 parents 3912d150 0b600801

Merge branch 'Develop-IPAD-MAC' of http://52.6.196.163/ADAM/AIAHTML5 into AIAAdminDiscountCode

150-DOCUMENTATION/ADAM-InteractiveAnatomySummary.docx 0 → 100644
No preview for this file type
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs
1   -using System;
  1 +using System;
2 2 using System.Collections.Generic;
3 3 using System.Linq;
4 4 using System.Web;
... ... @@ -16,35 +16,26 @@ namespace AIAHTML5.API.Models
16 16 {
17 17 static string dbConnectionString = System.Configuration.ConfigurationManager.AppSettings["AIADatabaseV5Context"];
18 18  
19   - static SqlConnection conn;
20   - static SqlCommand cmd;
21 19  
22 20 private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
23 21  
24 22  
25 23 public DBModel() { }
26 24  
27   - public static void OpenConnection()
28   - {
29   - SqlConnection conn = new SqlConnection(dbConnectionString);
30   -
31   - if (conn.State == ConnectionState.Closed)
32   - conn.Open();
33   - }
34 25  
35 26 protected static DataSet GetDataFromStoredProcedure(string commandText)
36 27 {
37 28  
38 29 logger.Debug(" Inside GetSQLData for command text = " + commandText);
39 30 DataSet ds = null;
40   - SqlConnection conn = new SqlConnection(dbConnectionString);
41   - cmd = new SqlCommand(commandText, conn);
42   - cmd.CommandType = CommandType.StoredProcedure;
43   - SqlDataAdapter da = new SqlDataAdapter();
44   - da.SelectCommand = cmd;
45   - ds = new DataSet();
46   - da.Fill(ds);
47   -
  31 + SqlConnection conn = new SqlConnection(dbConnectionString);
  32 + SqlCommand cmd = new SqlCommand(commandText, conn);
  33 + cmd.CommandType = CommandType.StoredProcedure;
  34 + SqlDataAdapter da = new SqlDataAdapter();
  35 + da.SelectCommand = cmd;
  36 + ds = new DataSet();
  37 + da.Fill(ds);
  38 +
48 39 return ds;
49 40 }
50 41  
... ... @@ -54,26 +45,26 @@ namespace AIAHTML5.API.Models
54 45  
55 46 ArrayList arrUserModules = new ArrayList();
56 47  
57   - Hashtable userModuleHash = new Hashtable();
  48 + Hashtable userModuleHash = new Hashtable();
58 49  
59   - string sp = DBConstants.GET_ALL_MODULES;
  50 + string sp = DBConstants.GET_ALL_MODULES;
60 51  
61   - DataSet ds = DBModel.GetDataFromStoredProcedure(sp);
  52 + DataSet ds = DBModel.GetDataFromStoredProcedure(sp);
62 53  
63   - if (ds!= null && ds.Tables.Count > 0)
64   - {
65   - DataTable dt = ds.Tables[0];
  54 + if (ds != null && ds.Tables.Count > 0)
  55 + {
  56 + DataTable dt = ds.Tables[0];
66 57  
67   - foreach (DataRow drModule in dt.Rows)
68   - {
69   - userModuleHash = new Hashtable();
70   - userModuleHash.Add(AIAConstants.KEY_ID, drModule["Id"]);
71   - userModuleHash.Add(AIAConstants.KEY_NAME, drModule["Name"]);
72   - userModuleHash.Add(AIAConstants.KEY_SLUG, drModule["Slug"]);
73   - arrUserModules.Add(userModuleHash);
74   - }
  58 + foreach (DataRow drModule in dt.Rows)
  59 + {
  60 + userModuleHash = new Hashtable();
  61 + userModuleHash.Add(AIAConstants.KEY_ID, drModule["Id"]);
  62 + userModuleHash.Add(AIAConstants.KEY_NAME, drModule["Name"]);
  63 + userModuleHash.Add(AIAConstants.KEY_SLUG, drModule["Slug"]);
  64 + arrUserModules.Add(userModuleHash);
75 65 }
76   -
  66 + }
  67 +
77 68 return arrUserModules;
78 69 }
79 70  
... ... @@ -84,55 +75,55 @@ namespace AIAHTML5.API.Models
84 75 User objUser = null;
85 76 DBModel objModel = new DBModel();
86 77  
87   -
88   - conn = new SqlConnection(dbConnectionString);
89   - cmd = new SqlCommand();
90   - SqlDataAdapter da = new SqlDataAdapter();
91   - SqlParameter param;
92   - DataSet ds = new DataSet();
93 78  
94   - cmd.Connection = conn;
95   - cmd.CommandText = DBConstants.GET_USER_DELAILS_BY_LOGIN_ID;
96   - cmd.CommandType = CommandType.StoredProcedure;
  79 + SqlConnection conn = new SqlConnection(dbConnectionString);
  80 + SqlCommand cmd = new SqlCommand();
  81 + SqlDataAdapter da = new SqlDataAdapter();
  82 + SqlParameter param;
  83 + DataSet ds = new DataSet();
97 84  
98   - param = new SqlParameter("@sLoginId", loginId);
99   - param.Direction = ParameterDirection.Input;
100   - param.DbType = DbType.String;
101   - cmd.Parameters.Add(param);
102   -
103   - da.SelectCommand = cmd;
104   - DataTable dt = new DataTable();
105   - da.Fill(dt);
106   -
107   -
108   - if (dt!= null && dt.Rows.Count > 0)
109   - {
110   - foreach (DataRow dr in dt.Rows)
111   - {
112   - int tempVal;
113   - DateTime date;
114   - objUser = new User();
  85 + cmd.Connection = conn;
  86 + cmd.CommandText = DBConstants.GET_USER_DELAILS_BY_LOGIN_ID;
  87 + cmd.CommandType = CommandType.StoredProcedure;
115 88  
116   - objUser.Id = Convert.ToInt32(dr["Id"]);
117   - objUser.FirstName = dr["FirstName"].ToString();
118   - objUser.LastName = dr["LastName"].ToString();
119   - objUser.EmailId = dr["EmailId"].ToString();
120   - objUser.LoginId = dr["LoginId"].ToString();
121   - objUser.Password = dr["Password"].ToString();
122   - objUser.SecurityQuestionId =Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null;
123   - objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ;
124   - objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null;
125   - objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
126   - objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null;
127   - objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null;
128   - objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
129   - objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
130   - objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
131   - objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
132   - }
  89 + param = new SqlParameter("@sLoginId", loginId);
  90 + param.Direction = ParameterDirection.Input;
  91 + param.DbType = DbType.String;
  92 + cmd.Parameters.Add(param);
  93 +
  94 + da.SelectCommand = cmd;
  95 + DataTable dt = new DataTable();
  96 + da.Fill(dt);
  97 +
  98 +
  99 + if (dt != null && dt.Rows.Count > 0)
  100 + {
  101 + foreach (DataRow dr in dt.Rows)
  102 + {
  103 + int tempVal;
  104 + DateTime date;
  105 + objUser = new User();
  106 +
  107 + objUser.Id = Convert.ToInt32(dr["Id"]);
  108 + objUser.FirstName = dr["FirstName"].ToString();
  109 + objUser.LastName = dr["LastName"].ToString();
  110 + objUser.EmailId = dr["EmailId"].ToString();
  111 + objUser.LoginId = dr["LoginId"].ToString();
  112 + objUser.Password = dr["Password"].ToString();
  113 + objUser.SecurityQuestionId = Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null;
  114 + objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ;
  115 + objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null;
  116 + objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
  117 + objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null;
  118 + objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null;
  119 + objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
  120 + objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
  121 + objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
  122 + objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
133 123 }
134   -
135   -
  124 + }
  125 +
  126 +
136 127 return objUser;
137 128 }
138 129  
... ... @@ -142,33 +133,33 @@ namespace AIAHTML5.API.Models
142 133  
143 134 Hashtable hash = new Hashtable();
144 135  
145   - conn = new SqlConnection(dbConnectionString);
146   - cmd = new SqlCommand();
147   - SqlDataAdapter adapter;
148   - SqlParameter param;
149   - DataSet ds = new DataSet();
  136 + SqlConnection conn = new SqlConnection(dbConnectionString);
  137 + SqlCommand cmd = new SqlCommand();
  138 + SqlDataAdapter adapter;
  139 + SqlParameter param;
  140 + DataSet ds = new DataSet();
150 141  
151   - cmd.Connection = conn;
152   - cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_USER_ID;
153   - cmd.CommandType = CommandType.StoredProcedure;
  142 + cmd.Connection = conn;
  143 + cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_USER_ID;
  144 + cmd.CommandType = CommandType.StoredProcedure;
154 145  
155   - param = new SqlParameter("@iUserId", userId);
156   - param.Direction = ParameterDirection.Input;
157   - param.DbType = DbType.Int32;
158   - cmd.Parameters.Add(param);
  146 + param = new SqlParameter("@iUserId", userId);
  147 + param.Direction = ParameterDirection.Input;
  148 + param.DbType = DbType.Int32;
  149 + cmd.Parameters.Add(param);
159 150  
160   - adapter = new SqlDataAdapter(cmd);
161   - adapter.Fill(ds);
  151 + adapter = new SqlDataAdapter(cmd);
  152 + adapter.Fill(ds);
162 153  
163   - if (ds!= null && ds.Tables.Count > 0)
  154 + if (ds != null && ds.Tables.Count > 0)
  155 + {
  156 + if (ds.Tables[0].Rows.Count > 0)
164 157 {
165   - if (ds.Tables[0].Rows.Count > 0)
166   - {
167   - hash.Add(AIAConstants.LICENSE_KEY_ID, ds.Tables[0].Rows[0][0]);
168   - hash.Add(AIAConstants.EDITION_KEY_ID, ds.Tables[0].Rows[0][1]);
169   - }
  158 + hash.Add(AIAConstants.LICENSE_KEY_ID, ds.Tables[0].Rows[0][0]);
  159 + hash.Add(AIAConstants.EDITION_KEY_ID, ds.Tables[0].Rows[0][1]);
170 160 }
171   -
  161 + }
  162 +
172 163 return hash;
173 164 }
174 165  
... ... @@ -178,45 +169,45 @@ namespace AIAHTML5.API.Models
178 169  
179 170 ArrayList userModulelist = new ArrayList();
180 171  
181   - Hashtable modulesHash;
182   - DataSet ds = new DataSet();
  172 + Hashtable modulesHash;
  173 + DataSet ds = new DataSet();
183 174  
184   - conn = new SqlConnection(dbConnectionString);
185   - cmd = new SqlCommand();
186   - SqlDataAdapter adapter;
187   - SqlParameter param;
  175 + SqlConnection conn = new SqlConnection(dbConnectionString);
  176 + SqlCommand cmd = new SqlCommand();
  177 + SqlDataAdapter adapter;
  178 + SqlParameter param;
188 179  
189   - cmd.Connection = conn;
190   - cmd.CommandText = DBConstants.GET_USER_MODULES_BY_LICENSE_ID;
191   - cmd.CommandType = CommandType.StoredProcedure;
  180 + cmd.Connection = conn;
  181 + cmd.CommandText = DBConstants.GET_USER_MODULES_BY_LICENSE_ID;
  182 + cmd.CommandType = CommandType.StoredProcedure;
192 183  
193   - param = new SqlParameter("@iLicenseId", licenseId);
194   - param.Direction = ParameterDirection.Input;
195   - param.DbType = DbType.Int32;
196   - cmd.Parameters.Add(param);
  184 + param = new SqlParameter("@iLicenseId", licenseId);
  185 + param.Direction = ParameterDirection.Input;
  186 + param.DbType = DbType.Int32;
  187 + cmd.Parameters.Add(param);
197 188  
198   - adapter = new SqlDataAdapter(cmd);
199   - adapter.Fill(ds);
200   -
  189 + adapter = new SqlDataAdapter(cmd);
  190 + adapter.Fill(ds);
201 191  
202   - if (ds!=null && ds.Tables.Count > 0)
203   - {
204   - DataTable dt = ds.Tables[0];
205 192  
206   - if (dt.Rows.Count > 0)
  193 + if (ds != null && ds.Tables.Count > 0)
  194 + {
  195 + DataTable dt = ds.Tables[0];
  196 +
  197 + if (dt.Rows.Count > 0)
  198 + {
  199 + foreach (DataRow dr in dt.Rows)
207 200 {
208   - foreach (DataRow dr in dt.Rows)
209   - {
210   - modulesHash = new Hashtable();
211   - modulesHash.Add(AIAConstants.KEY_ID, dr["Id"]);
212   - modulesHash.Add(AIAConstants.KEY_NAME, dr["Title"]);
213   - modulesHash.Add(AIAConstants.KEY_SLUG, dr["Slug"]);
214   - userModulelist.Add(modulesHash);
215   - }
  201 + modulesHash = new Hashtable();
  202 + modulesHash.Add(AIAConstants.KEY_ID, dr["Id"]);
  203 + modulesHash.Add(AIAConstants.KEY_NAME, dr["Title"]);
  204 + modulesHash.Add(AIAConstants.KEY_SLUG, dr["Slug"]);
  205 + userModulelist.Add(modulesHash);
216 206 }
217 207 }
218   -
219   -
  208 + }
  209 +
  210 +
220 211 return userModulelist;
221 212 }
222 213  
... ... @@ -264,57 +255,57 @@ namespace AIAHTML5.API.Models
264 255 User objUser = null;
265 256 DBModel objModel = new DBModel();
266 257  
267   - conn = new SqlConnection(dbConnectionString);
268   - cmd = new SqlCommand();
269   - SqlDataAdapter adapter;
270   - SqlParameter param;
271   - DataSet ds = new DataSet();
  258 + SqlConnection conn = new SqlConnection(dbConnectionString);
  259 + SqlCommand cmd = new SqlCommand();
  260 + SqlDataAdapter adapter;
  261 + SqlParameter param;
  262 + DataSet ds = new DataSet();
272 263  
273   - cmd.Connection = conn;
274   - cmd.CommandText = DBConstants.GET_USER_DETAILS_BY_EMAILID;
275   - cmd.CommandType = CommandType.StoredProcedure;
  264 + cmd.Connection = conn;
  265 + cmd.CommandText = DBConstants.GET_USER_DETAILS_BY_EMAILID;
  266 + cmd.CommandType = CommandType.StoredProcedure;
276 267  
277   - param = new SqlParameter("@sEmailId", emailId);
278   - param.Direction = ParameterDirection.Input;
279   - param.DbType = DbType.String;
280   - cmd.Parameters.Add(param);
  268 + param = new SqlParameter("@sEmailId", emailId);
  269 + param.Direction = ParameterDirection.Input;
  270 + param.DbType = DbType.String;
  271 + cmd.Parameters.Add(param);
281 272  
282   - adapter = new SqlDataAdapter(cmd);
283   - adapter.Fill(ds);
  273 + adapter = new SqlDataAdapter(cmd);
  274 + adapter.Fill(ds);
284 275  
285 276  
286   - if (ds!= null && ds.Tables.Count > 0)
287   - {
288   - DataTable dt = ds.Tables[0];
  277 + if (ds != null && ds.Tables.Count > 0)
  278 + {
  279 + DataTable dt = ds.Tables[0];
289 280  
290   - if (dt.Rows.Count > 0)
  281 + if (dt.Rows.Count > 0)
  282 + {
  283 + foreach (DataRow dr in dt.Rows)
291 284 {
292   - foreach (DataRow dr in dt.Rows)
293   - {
294   - int tempVal;
295   - DateTime date;
296   - objUser = new User();
297   -
298   - objUser.Id = Convert.ToInt32(dr["Id"]);
299   - objUser.FirstName = dr["FirstName"].ToString();
300   - objUser.LastName = dr["LastName"].ToString();
301   - objUser.EmailId = dr["EmailId"].ToString();
302   - objUser.LoginId = dr["LoginId"].ToString();
303   - objUser.Password = dr["Password"].ToString();
304   - objUser.SecurityQuestionId = Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null;
305   - objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ;
306   - objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null;
307   - objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
308   - objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null;
309   - objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null;
310   - objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
311   - objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
312   - objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
313   - objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
314   - }
  285 + int tempVal;
  286 + DateTime date;
  287 + objUser = new User();
  288 +
  289 + objUser.Id = Convert.ToInt32(dr["Id"]);
  290 + objUser.FirstName = dr["FirstName"].ToString();
  291 + objUser.LastName = dr["LastName"].ToString();
  292 + objUser.EmailId = dr["EmailId"].ToString();
  293 + objUser.LoginId = dr["LoginId"].ToString();
  294 + objUser.Password = dr["Password"].ToString();
  295 + objUser.SecurityQuestionId = Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null;
  296 + objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ;
  297 + objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null;
  298 + objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
  299 + objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null;
  300 + objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null;
  301 + objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
  302 + objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
  303 + objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
  304 + objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
315 305 }
316 306 }
317   -
  307 + }
  308 +
318 309 return objUser;
319 310 }
320 311  
... ... @@ -324,19 +315,20 @@ namespace AIAHTML5.API.Models
324 315  
325 316 int result = 0;
326 317  
  318 + SqlConnection conn = null;
327 319 try
328 320 {
329 321 conn = new SqlConnection(dbConnectionString);
330   - cmd = new SqlCommand();
331   - cmd.Connection = conn;
  322 + SqlCommand cmd = new SqlCommand();
332 323 conn.Open();
  324 + cmd.Connection = conn;
333 325 cmd.CommandText = DBConstants.UPDATE_USER_PASSWORD;
334 326 cmd.CommandType = CommandType.StoredProcedure;
335 327 cmd.Parameters.AddWithValue("@sLoginId", loginId);
336 328 cmd.Parameters.AddWithValue("@sEmailId", emailId);
337 329 cmd.Parameters.AddWithValue("@sNewPassword", userInfo["newPassword"].ToString());
338 330 result = cmd.ExecuteNonQuery();
339   -
  331 +
340 332 }
341 333 catch (SqlException ex)
342 334 {
... ... @@ -356,53 +348,53 @@ namespace AIAHTML5.API.Models
356 348 logger.Debug(" Inside GetLicenseSubscriptionDetailsByLicenseId for LicenseId = " + licenseId);
357 349  
358 350 LicenseSubscriptionDetails licenseSubscriptionDetails = null;
359   -
360   - conn = new SqlConnection(dbConnectionString);
361   - cmd = new SqlCommand();
362   - SqlDataAdapter adapter;
363   - SqlParameter param;
364   - DataSet ds = new DataSet();
365 351  
366   - cmd.Connection = conn;
367   - cmd.CommandText = DBConstants.GET_SUBSCRIPTION_DETAILS_BY_LICENSE_ID;
368   - cmd.CommandType = CommandType.StoredProcedure;
  352 + SqlConnection conn = new SqlConnection(dbConnectionString);
  353 + SqlCommand cmd = new SqlCommand();
  354 + SqlDataAdapter adapter;
  355 + SqlParameter param;
  356 + DataSet ds = new DataSet();
369 357  
370   - param = new SqlParameter("@iLicenseId", licenseId);
371   - param.Direction = ParameterDirection.Input;
372   - param.DbType = DbType.Int32;
373   - cmd.Parameters.Add(param);
  358 + cmd.Connection = conn;
  359 + cmd.CommandText = DBConstants.GET_SUBSCRIPTION_DETAILS_BY_LICENSE_ID;
  360 + cmd.CommandType = CommandType.StoredProcedure;
374 361  
375   - adapter = new SqlDataAdapter(cmd);
376   - adapter.Fill(ds);
  362 + param = new SqlParameter("@iLicenseId", licenseId);
  363 + param.Direction = ParameterDirection.Input;
  364 + param.DbType = DbType.Int32;
  365 + cmd.Parameters.Add(param);
377 366  
378   - if (ds!= null && ds.Tables.Count > 0)
379   - {
380   - licenseSubscriptionDetails = new LicenseSubscriptionDetails();
381   - DataTable dt = ds.Tables[0];
  367 + adapter = new SqlDataAdapter(cmd);
  368 + adapter.Fill(ds);
382 369  
383   - if (dt.Rows.Count > 0)
  370 + if (ds != null && ds.Tables.Count > 0)
  371 + {
  372 + licenseSubscriptionDetails = new LicenseSubscriptionDetails();
  373 + DataTable dt = ds.Tables[0];
  374 +
  375 + if (dt.Rows.Count > 0)
  376 + {
  377 + foreach (DataRow dr in dt.Rows)
384 378 {
385   - foreach (DataRow dr in dt.Rows)
386   - {
387   - int tempVal;
388   - DateTime date;
389   - licenseSubscriptionDetails.Id = Convert.ToInt32(dr["Id"]);
390   - licenseSubscriptionDetails.LicenseId = Convert.ToInt32(dr["LicenseId"]);
391   - licenseSubscriptionDetails.SubscriptionPlanId = Int32.TryParse(dr["SubscriptionPlanId"].ToString(), out tempVal) ? tempVal : (int?)null;
392   - licenseSubscriptionDetails.SubscriptionValidFrom = DateTime.TryParse(dr["SubscriptionValidFrom"].ToString(), out date) ? date : (DateTime?)null;
393   - licenseSubscriptionDetails.SubscriptionValidThrough = DateTime.TryParse(dr["SubscriptionValidThrough"].ToString(), out date) ? date : (DateTime?)null;
394   - licenseSubscriptionDetails.RenewalDate = DateTime.TryParse(dr["RenewalDate"].ToString(), out date) ? date : (DateTime?)null;
395   - licenseSubscriptionDetails.PaymentMode = dr["PaymentMode"].ToString();
396   - licenseSubscriptionDetails.TotalAmount = Convert.ToDouble(dr["TotalAmount"]);
397   - licenseSubscriptionDetails.AmountPaid = Convert.ToDouble(dr["AmountPaid"]);
398   - licenseSubscriptionDetails.AmountPending = Convert.ToDouble(dr["AmountPending"]);
399   - licenseSubscriptionDetails.NoOfImages = Convert.ToInt32(dr["NoofImages"]);
400   - }
  379 + int tempVal;
  380 + DateTime date;
  381 + licenseSubscriptionDetails.Id = Convert.ToInt32(dr["Id"]);
  382 + licenseSubscriptionDetails.LicenseId = Convert.ToInt32(dr["LicenseId"]);
  383 + licenseSubscriptionDetails.SubscriptionPlanId = Int32.TryParse(dr["SubscriptionPlanId"].ToString(), out tempVal) ? tempVal : (int?)null;
  384 + licenseSubscriptionDetails.SubscriptionValidFrom = DateTime.TryParse(dr["SubscriptionValidFrom"].ToString(), out date) ? date : (DateTime?)null;
  385 + licenseSubscriptionDetails.SubscriptionValidThrough = DateTime.TryParse(dr["SubscriptionValidThrough"].ToString(), out date) ? date : (DateTime?)null;
  386 + licenseSubscriptionDetails.RenewalDate = DateTime.TryParse(dr["RenewalDate"].ToString(), out date) ? date : (DateTime?)null;
  387 + licenseSubscriptionDetails.PaymentMode = dr["PaymentMode"].ToString();
  388 + licenseSubscriptionDetails.TotalAmount = Convert.ToDouble(dr["TotalAmount"]);
  389 + licenseSubscriptionDetails.AmountPaid = Convert.ToDouble(dr["AmountPaid"]);
  390 + licenseSubscriptionDetails.AmountPending = Convert.ToDouble(dr["AmountPending"]);
  391 + licenseSubscriptionDetails.NoOfImages = Convert.ToInt32(dr["NoofImages"]);
401 392 }
402 393 }
403   -
404   -
405   -
  394 + }
  395 +
  396 +
  397 +
406 398 return licenseSubscriptionDetails;
407 399 }
408 400  
... ... @@ -411,65 +403,65 @@ namespace AIAHTML5.API.Models
411 403 logger.Debug(" inside GetLicenseDetailsByLicenseId for LicenseId = " + licenseId);
412 404  
413 405 License license = null;
414   -
415   - conn = new SqlConnection(dbConnectionString);
416   - cmd = new SqlCommand();
417   - SqlDataAdapter adapter;
418   - SqlParameter param;
419   - DataSet ds = new DataSet();
420 406  
421   - cmd.Connection = conn;
422   - cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_ID;
423   - cmd.CommandType = CommandType.StoredProcedure;
  407 + SqlConnection conn = new SqlConnection(dbConnectionString);
  408 + SqlCommand cmd = new SqlCommand();
  409 + SqlDataAdapter adapter;
  410 + SqlParameter param;
  411 + DataSet ds = new DataSet();
  412 +
  413 + cmd.Connection = conn;
  414 + cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_ID;
  415 + cmd.CommandType = CommandType.StoredProcedure;
424 416  
425   - param = new SqlParameter("@Id", licenseId);
426   - param.Direction = ParameterDirection.Input;
427   - param.DbType = DbType.Int32;
428   - cmd.Parameters.Add(param);
  417 + param = new SqlParameter("@Id", licenseId);
  418 + param.Direction = ParameterDirection.Input;
  419 + param.DbType = DbType.Int32;
  420 + cmd.Parameters.Add(param);
429 421  
430   - adapter = new SqlDataAdapter(cmd);
431   - adapter.Fill(ds);
  422 + adapter = new SqlDataAdapter(cmd);
  423 + adapter.Fill(ds);
432 424  
433   - if (ds!= null && ds.Tables.Count > 0)
  425 + if (ds != null && ds.Tables.Count > 0)
  426 + {
  427 +
  428 + DataTable dt = ds.Tables[0];
  429 + if (dt.Rows.Count > 0)
434 430 {
435   -
436   - DataTable dt = ds.Tables[0];
437   - if (dt.Rows.Count > 0)
438   - {
439   - license = new License();
  431 + license = new License();
440 432  
441   - foreach (DataRow dr in dt.Rows)
442   - {
443   - DateTime date;
444   - license.Id = Convert.ToInt32(dr["Id"]);
445   - license.AccountNumber = dr["AccountNumber"].ToString();
446   - license.LicenseeFirstName = dr["LicenseeFirstName"].ToString();
447   - license.LicenseeLastName = dr["LicenseeLastName"].ToString();
448   - license.LicenseTypeId = Convert.ToInt32(dr["LicenseTypeId"]);
449   - license.InstitutionName = dr["InstitutionName"].ToString();
450   - license.Address1 = dr["Address1"].ToString();
451   - license.Address2 = dr["Address2"].ToString();
452   - license.CountryId = Convert.ToInt32(dr["CountryId"]);
453   - license.StateId = Convert.ToInt32(dr["StateId"]);
454   - license.City = dr["City"].ToString();
455   - license.Zip = dr["Zip"].ToString();
456   - license.Phone = dr["Phone"].ToString();
457   - license.EmailId = dr["EmailId"].ToString();
458   - license.TotalLogins = Convert.ToInt32(dr["TotalLogins"]);
459   - license.AccountTypeId = Convert.ToInt32(dr["AccountTypeId"]);
460   - license.IsActive = Convert.ToBoolean(dr["IsActive"]);
461   - license.IsDistrictSiteLicense = Convert.ToBoolean(dr["IsDistrictSiteLicense"]);
462   - license.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
463   - license.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
464   - license.NoOfRenewals = Convert.ToInt32(dr["NoOfRenewals"]);
465   - license.IsTermAccepted = Convert.ToBoolean(dr["IsTermsAccepted"]);
466   - license.ProductId = dr["ProductId"].ToString();
467   - }
  433 + foreach (DataRow dr in dt.Rows)
  434 + {
  435 + DateTime date;
  436 + license.Id = Convert.ToInt32(dr["Id"]);
  437 + license.AccountNumber = dr["AccountNumber"].ToString();
  438 + license.LicenseeFirstName = dr["LicenseeFirstName"].ToString();
  439 + license.LicenseeLastName = dr["LicenseeLastName"].ToString();
  440 + license.LicenseTypeId = Convert.ToInt32(dr["LicenseTypeId"]);
  441 + license.InstitutionName = dr["InstitutionName"].ToString();
  442 + license.Address1 = dr["Address1"].ToString();
  443 + license.Address2 = dr["Address2"].ToString();
  444 + license.CountryId = Convert.ToInt32(dr["CountryId"]);
  445 + license.StateId = Convert.ToInt32(dr["StateId"]);
  446 + license.City = dr["City"].ToString();
  447 + license.Zip = dr["Zip"].ToString();
  448 + license.Phone = dr["Phone"].ToString();
  449 + license.EmailId = dr["EmailId"].ToString();
  450 + license.TotalLogins = Convert.ToInt32(dr["TotalLogins"]);
  451 + license.AccountTypeId = Convert.ToInt32(dr["AccountTypeId"]);
  452 + license.IsActive = Convert.ToBoolean(dr["IsActive"]);
  453 + license.IsDistrictSiteLicense = Convert.ToBoolean(dr["IsDistrictSiteLicense"]);
  454 + license.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
  455 + license.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
  456 + license.NoOfRenewals = Convert.ToInt32(dr["NoOfRenewals"]);
  457 + license.IsTermAccepted = Convert.ToBoolean(dr["IsTermsAccepted"]);
  458 + license.ProductId = dr["ProductId"].ToString();
468 459 }
469 460 }
470   -
471   -
472   -
  461 + }
  462 +
  463 +
  464 +
473 465 return license;
474 466 }
475 467  
... ... @@ -478,18 +470,18 @@ namespace AIAHTML5.API.Models
478 470 logger.Debug(" inside UpdateLicenseTermStatus for AccountNumber = " + accountNumber);
479 471  
480 472 int result = 0;
481   -
  473 + SqlConnection conn = null;
482 474 try
483   - {
  475 + {
484 476 conn = new SqlConnection(dbConnectionString);
485   - cmd = new SqlCommand();
486   - cmd.Connection = conn;
  477 + SqlCommand cmd = new SqlCommand();
487 478 conn.Open();
  479 + cmd.Connection = conn;
488 480 cmd.CommandText = DBConstants.UPDATE_LICENSE_TERM_STATUS;
489 481 cmd.CommandType = CommandType.StoredProcedure;
490 482 cmd.Parameters.AddWithValue("@sAccountNumber", accountNumber);
491 483 result = cmd.ExecuteNonQuery();
492   -
  484 +
493 485 }
494 486 catch (SqlException ex)
495 487 {
... ... @@ -509,28 +501,28 @@ namespace AIAHTML5.API.Models
509 501  
510 502 ArrayList arrTermsAndConditions = new ArrayList();
511 503  
512   -
513   - Hashtable contentHash = null;
514   - string str = string.Empty;
515   - string spName = DBConstants.GET_TERMS_AND_CONDITIONS;
516   - DataSet ds = DBModel.GetDataFromStoredProcedure(spName);
517 504  
518   - if (ds!= null && ds.Tables.Count > 0)
  505 + Hashtable contentHash = null;
  506 + string str = string.Empty;
  507 + string spName = DBConstants.GET_TERMS_AND_CONDITIONS;
  508 + DataSet ds = DBModel.GetDataFromStoredProcedure(spName);
  509 +
  510 + if (ds != null && ds.Tables.Count > 0)
  511 + {
  512 + DataTable dt = ds.Tables[0];
  513 + if (dt.Rows.Count > 0)
519 514 {
520   - DataTable dt = ds.Tables[0];
521   - if (dt.Rows.Count > 0)
  515 + foreach (DataRow dr in dt.Rows)
522 516 {
523   - foreach (DataRow dr in dt.Rows)
524   - {
525   - contentHash = new Hashtable();
526   - contentHash.Add(AIAConstants.KEY_TITLE, dr["Title"]);
527   - contentHash.Add(AIAConstants.KEY_CONTENT, dr["Content"]);
528   - arrTermsAndConditions.Add(contentHash);
529   - }
  517 + contentHash = new Hashtable();
  518 + contentHash.Add(AIAConstants.KEY_TITLE, dr["Title"]);
  519 + contentHash.Add(AIAConstants.KEY_CONTENT, dr["Content"]);
  520 + arrTermsAndConditions.Add(contentHash);
530 521 }
531 522 }
532   -
533   -
  523 + }
  524 +
  525 +
534 526 return arrTermsAndConditions;
535 527 }
536 528  
... ... @@ -539,12 +531,13 @@ namespace AIAHTML5.API.Models
539 531 logger.Debug(" inside InsertLoginDetails for UserId= " + userId);
540 532  
541 533 int result = 0;
  534 + SqlConnection conn = null;
542 535 try
543 536 {
544 537 conn = new SqlConnection(dbConnectionString);
545   - cmd = new SqlCommand();
546   - cmd.Connection = conn;
  538 + SqlCommand cmd = new SqlCommand();
547 539 conn.Open();
  540 + cmd.Connection = conn;
548 541 cmd.CommandText = DBConstants.INSERT_LOGIN_DETAIL;
549 542 cmd.CommandType = CommandType.StoredProcedure;
550 543 cmd.Parameters.AddWithValue("@iUserId", userId);
... ... @@ -568,12 +561,13 @@ namespace AIAHTML5.API.Models
568 561 logger.Debug(" inside InsertIncorrectLoginAttempts for UserId= " + userId);
569 562  
570 563 int result = 0;
  564 + SqlConnection conn = null;
571 565 try
572 566 {
573 567 conn = new SqlConnection(dbConnectionString);
574   - cmd = new SqlCommand();
575   - cmd.Connection = conn;
  568 + SqlCommand cmd = new SqlCommand();
576 569 conn.Open();
  570 + cmd.Connection = conn;
577 571 cmd.CommandText = DBConstants.INSERT_INCORRECT_LOGIN_ATTEMPTS;
578 572 cmd.CommandType = CommandType.StoredProcedure;
579 573 cmd.Parameters.AddWithValue("@iUserId", userId);
... ... @@ -596,35 +590,35 @@ namespace AIAHTML5.API.Models
596 590 logger.Debug(" inside GetIncorrectLoginAttempts for UserId = " + userId);
597 591  
598 592 int count = 0;
599   -
600   - conn = new SqlConnection(dbConnectionString);
601   - cmd = new SqlCommand();
602   - cmd.Connection = conn;
603   - cmd.CommandText = DBConstants.GET_INCORRECT_LOGIN_ATTEMPTS;
604   - cmd.CommandType = CommandType.StoredProcedure;
605   - cmd.Parameters.AddWithValue("@iUserId", userId);
606   - SqlDataAdapter da = new SqlDataAdapter();
607   - da.SelectCommand = cmd;
608   - DataSet ds = new DataSet();
609   - da.Fill(ds);
610 593  
611   - if (ds!= null && ds.Tables.Count > 0)
612   - {
613   - DataTable dt = ds.Tables[0];
  594 + SqlConnection conn = new SqlConnection(dbConnectionString);
  595 + SqlCommand cmd = new SqlCommand();
  596 + cmd.Connection = conn;
  597 + cmd.CommandText = DBConstants.GET_INCORRECT_LOGIN_ATTEMPTS;
  598 + cmd.CommandType = CommandType.StoredProcedure;
  599 + cmd.Parameters.AddWithValue("@iUserId", userId);
  600 + SqlDataAdapter da = new SqlDataAdapter();
  601 + da.SelectCommand = cmd;
  602 + DataSet ds = new DataSet();
  603 + da.Fill(ds);
  604 +
  605 + if (ds != null && ds.Tables.Count > 0)
  606 + {
  607 + DataTable dt = ds.Tables[0];
614 608  
615   - if (dt.Rows.Count > 0)
  609 + if (dt.Rows.Count > 0)
  610 + {
  611 + foreach (DataRow dr in dt.Rows)
616 612 {
617   - foreach (DataRow dr in dt.Rows)
  613 + foreach (DataColumn dc in dt.Columns)
618 614 {
619   - foreach (DataColumn dc in dt.Columns)
620   - {
621   - count = Convert.ToInt32(dr[dc]);
622   - }
  615 + count = Convert.ToInt32(dr[dc]);
623 616 }
624 617 }
625 618 }
626   -
627   -
  619 + }
  620 +
  621 +
628 622 return count;
629 623 }
630 624  
... ... @@ -633,12 +627,13 @@ namespace AIAHTML5.API.Models
633 627 logger.Debug(" inside UpdateIncorrectLoginAttempts for UserId= " + userId);
634 628  
635 629 int result = 0;
  630 + SqlConnection conn = null;
636 631 try
637 632 {
638 633 conn = new SqlConnection(dbConnectionString);
639   - cmd = new SqlCommand();
640   - cmd.Connection = conn;
  634 + SqlCommand cmd = new SqlCommand();
641 635 conn.Open();
  636 + cmd.Connection = conn;
642 637 cmd.CommandText = DBConstants.UPDATE_INCORRECT_LOGIN_ATTEMPTS;
643 638 cmd.CommandType = CommandType.StoredProcedure;
644 639 cmd.Parameters.AddWithValue("@iUserId", userId);
... ... @@ -661,12 +656,13 @@ namespace AIAHTML5.API.Models
661 656 logger.Debug(" inside DeleteIncorrectLoginAttempts for UserId= " + userId);
662 657  
663 658 int result = 0;
  659 + SqlConnection conn = null;
664 660 try
665 661 {
666 662 conn = new SqlConnection(dbConnectionString);
667   - cmd = new SqlCommand();
668   - cmd.Connection = conn;
  663 + SqlCommand cmd = new SqlCommand();
669 664 conn.Open();
  665 + cmd.Connection = conn;
670 666 cmd.CommandText = DBConstants.DELETE_INCORRECT_LOGIN_ATTEMPTS;
671 667 cmd.CommandType = CommandType.StoredProcedure;
672 668 cmd.Parameters.AddWithValue("@iUserId", userId);
... ... @@ -690,28 +686,28 @@ namespace AIAHTML5.API.Models
690 686  
691 687 ArrayList failureCauseList = new ArrayList();
692 688  
693   - Hashtable fcHash = null;
  689 + Hashtable fcHash = null;
694 690  
695   - string sp = DBConstants.GET_ALL_LOGIN_FAILURE_CAUSES;
  691 + string sp = DBConstants.GET_ALL_LOGIN_FAILURE_CAUSES;
696 692  
697   - DataSet ds = DBModel.GetDataFromStoredProcedure(sp);
  693 + DataSet ds = DBModel.GetDataFromStoredProcedure(sp);
698 694  
699   - if (ds.Tables.Count > 0)
700   - {
701   - DataTable dt = ds.Tables[0];
  695 + if (ds.Tables.Count > 0)
  696 + {
  697 + DataTable dt = ds.Tables[0];
702 698  
703   - if (dt.Rows.Count > 0)
  699 + if (dt.Rows.Count > 0)
  700 + {
  701 + foreach (DataRow drFailureCause in dt.Rows)
704 702 {
705   - foreach (DataRow drFailureCause in dt.Rows)
706   - {
707   - fcHash = new Hashtable();
708   - fcHash.Add(AIAConstants.KEY_ID, drFailureCause["Id"]);
709   - fcHash.Add(AIAConstants.KEY_DESCRIPTION, drFailureCause["Description"]);
710   - failureCauseList.Add(fcHash);
711   - }
  703 + fcHash = new Hashtable();
  704 + fcHash.Add(AIAConstants.KEY_ID, drFailureCause["Id"]);
  705 + fcHash.Add(AIAConstants.KEY_DESCRIPTION, drFailureCause["Description"]);
  706 + failureCauseList.Add(fcHash);
712 707 }
713 708 }
714   -
  709 + }
  710 +
715 711 return failureCauseList;
716 712 }
717 713  
... ... @@ -720,12 +716,13 @@ namespace AIAHTML5.API.Models
720 716 logger.Debug(" inside InsertUserLoginLog for AccountNumber= " + accountNumber);
721 717  
722 718 int result = 0;
  719 + SqlConnection conn = null;
723 720 try
724 721 {
725 722 conn = new SqlConnection(dbConnectionString);
726   - cmd = new SqlCommand();
727   - cmd.Connection = conn;
  723 + SqlCommand cmd = new SqlCommand();
728 724 conn.Open();
  725 + cmd.Connection = conn;
729 726 cmd.CommandText = DBConstants.INSERT_LOGIN_ERROR_LOG;
730 727 cmd.CommandType = CommandType.StoredProcedure;
731 728 cmd.Parameters.AddWithValue("@nvAccountNumber", accountNumber);
... ... @@ -754,35 +751,35 @@ namespace AIAHTML5.API.Models
754 751  
755 752 BlockedUser blockedUser = null;
756 753 DataTable dt = null;
757   -
758   - conn = new SqlConnection(dbConnectionString);
759   - cmd = new SqlCommand();
760   - cmd.Connection = conn;
761   - cmd.CommandText = DBConstants.GET_BLOCKED_USER_BY_USER_ID;
762   - cmd.CommandType = CommandType.StoredProcedure;
763   - cmd.Parameters.AddWithValue("@userId", userId);
764   - SqlDataAdapter da = new SqlDataAdapter();
765   - da.SelectCommand = cmd;
766   - dt = new DataTable();
767   - da.Fill(dt);
768 754  
769   - if (dt!= null && dt.Rows.Count > 0)
  755 + SqlConnection conn = new SqlConnection(dbConnectionString);
  756 + SqlCommand cmd = new SqlCommand();
  757 + cmd.Connection = conn;
  758 + cmd.CommandText = DBConstants.GET_BLOCKED_USER_BY_USER_ID;
  759 + cmd.CommandType = CommandType.StoredProcedure;
  760 + cmd.Parameters.AddWithValue("@userId", userId);
  761 + SqlDataAdapter da = new SqlDataAdapter();
  762 + da.SelectCommand = cmd;
  763 + dt = new DataTable();
  764 + da.Fill(dt);
  765 +
  766 + if (dt != null && dt.Rows.Count > 0)
  767 + {
  768 + blockedUser = new BlockedUser();
  769 + foreach (DataRow dr in dt.Rows)
770 770 {
771   - blockedUser = new BlockedUser();
772   - foreach (DataRow dr in dt.Rows)
773   - {
774   - blockedUser.Id = Convert.ToInt32(dr["Id"]);
775   - blockedUser.FirstName = dr["FirstName"].ToString();
776   - blockedUser.LastName = dr["LastName"].ToString();
777   - blockedUser.EmailId = dr["EmailId"].ToString();
778   - blockedUser.LoginId = dr["LoginId"].ToString();
779   - blockedUser.Password = dr["Password"].ToString();
780   - blockedUser.AccountNumber = dr["AccountNumber"].ToString();
781   - blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]);
782   - }
  771 + blockedUser.Id = Convert.ToInt32(dr["Id"]);
  772 + blockedUser.FirstName = dr["FirstName"].ToString();
  773 + blockedUser.LastName = dr["LastName"].ToString();
  774 + blockedUser.EmailId = dr["EmailId"].ToString();
  775 + blockedUser.LoginId = dr["LoginId"].ToString();
  776 + blockedUser.Password = dr["Password"].ToString();
  777 + blockedUser.AccountNumber = dr["AccountNumber"].ToString();
  778 + blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]);
783 779 }
784   -
785   -
  780 + }
  781 +
  782 +
786 783 return blockedUser;
787 784 }
788 785  
... ... @@ -793,39 +790,39 @@ namespace AIAHTML5.API.Models
793 790 ArrayList blockedUsersList = new ArrayList();
794 791 BlockedUser blockedUser = null;
795 792 DataTable dt = null;
796   -
797   - conn = new SqlConnection(dbConnectionString);
798   - cmd = new SqlCommand();
799   - cmd.Connection = conn;
800   - cmd.CommandText = DBConstants.GET_BLOCKED_USERS_BY_USER_TYPE;
801   - cmd.CommandType = CommandType.StoredProcedure;
802   - cmd.Parameters.AddWithValue("@iUserTypeId", userTypeId);
803   - SqlDataAdapter da = new SqlDataAdapter();
804   - da.SelectCommand = cmd;
805   - dt = new DataTable();
806   - da.Fill(dt);
807 793  
808   - if (dt.Rows.Count > 0)
  794 + SqlConnection conn = new SqlConnection(dbConnectionString);
  795 + SqlCommand cmd = new SqlCommand();
  796 + cmd.Connection = conn;
  797 + cmd.CommandText = DBConstants.GET_BLOCKED_USERS_BY_USER_TYPE;
  798 + cmd.CommandType = CommandType.StoredProcedure;
  799 + cmd.Parameters.AddWithValue("@iUserTypeId", userTypeId);
  800 + SqlDataAdapter da = new SqlDataAdapter();
  801 + da.SelectCommand = cmd;
  802 + dt = new DataTable();
  803 + da.Fill(dt);
  804 +
  805 + if (dt.Rows.Count > 0)
  806 + {
  807 + foreach (DataRow dr in dt.Rows)
809 808 {
810   - foreach (DataRow dr in dt.Rows)
811   - {
812   - blockedUser = new BlockedUser();
813   -
814   - blockedUser.Id = Convert.ToInt32(dr["Id"]);
815   - blockedUser.FirstName = dr["FirstName"].ToString();
816   - blockedUser.LastName = dr["LastName"].ToString();
817   - blockedUser.EmailId = dr["EmailId"].ToString();
818   - blockedUser.LoginId = dr["LoginId"].ToString();
819   - blockedUser.Password = dr["Password"].ToString();
820   - blockedUser.AccountNumber = dr["AccountNumber"].ToString();
821   - blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]);
822   -
823   - blockedUsersList.Add(blockedUser);
824   - }
  809 + blockedUser = new BlockedUser();
  810 +
  811 + blockedUser.Id = Convert.ToInt32(dr["Id"]);
  812 + blockedUser.FirstName = dr["FirstName"].ToString();
  813 + blockedUser.LastName = dr["LastName"].ToString();
  814 + blockedUser.EmailId = dr["EmailId"].ToString();
  815 + blockedUser.LoginId = dr["LoginId"].ToString();
  816 + blockedUser.Password = dr["Password"].ToString();
  817 + blockedUser.AccountNumber = dr["AccountNumber"].ToString();
  818 + blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]);
  819 +
  820 + blockedUsersList.Add(blockedUser);
825 821 }
826   -
827   -
828   -
  822 + }
  823 +
  824 +
  825 +
829 826 return blockedUsersList;
830 827 }
831 828  
... ... @@ -862,7 +859,7 @@ namespace AIAHTML5.API.Models
862 859 throw;
863 860 }
864 861  
865   - return result;
  862 + return result;
866 863 }
867 864 }
868 865 }
869 866 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... ... @@ -560,7 +560,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
560 560 theme: 'success',
561 561 currentController: 'CAController',
562 562 parentSlug: 'clinical-animations',
563   - content: '<script src="' + $scope.playerScript + '"></script><script>$(document).ready(function(){var $ua = navigator.userAgent; if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { var jspanelContainerWidth = $(".jsPanel-content").css("width"); $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth}); $("#caVideoPanel").css("width", "100%"); }videojs("#playerinlineVideo").pause();$("#btnTxtOnOff").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid").css("visibility","visible");}});});</script><div id="pid" class="row"><div id="divplayerinlineVideo" class="col-sm-12" align="center" width="640" height="480"><video width="640" height="360"' +
  563 + content: '<script src="' + $scope.playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo").pause();$("#btnTxtOnOff").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid").css("visibility","visible");}});});</script><div id="pid" class="row"><div id="divplayerinlineVideo" class="col-sm-12" align="center" width="640" height="480"><video width="640" height="360"' +
564 564 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo"' +
565 565 ' poster="' + $scope.poster + '"' +
566 566 'controls="true" preload="none" allowfullscreen="true" allowscriptaccess="always" ' +
... ... @@ -575,7 +575,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
575 575 ' kind="captions" srclang="en" label="On"><object width="640" height="360"' +
576 576 ' type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf"><param name="allowfullscreen" value="true">' +
577 577 ' <param name="allowscriptaccess" value="always"><param name="movie" value="//vjs.zencdn.net/3.2/video-js.swf">' +
578   - ' <param name="flashvars" ng-value="controls=true&amp;file=' + $scope.clickedCAVideo + '"><img ng-src="content/images/common/player/frameaccuracy_logo.jpg" style="height:80%;" alt="Here we are" title="No video playback capabilities"></object></video><div class="col-sm-12 well video-subtitle"><div id="sid" align="left" style="height:40px;overflow-y:scroll !important"><p>' + $scope.clickedCASummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button></div></div></div>',
  578 + ' <param name="flashvars" ng-value="controls=true&amp;file=' + $scope.clickedCAVideo + '"><img ng-src="content/images/common/player/frameaccuracy_logo.jpg" style="height:80%;" alt="Here we are" title="No video playback capabilities"></object></video><div class="col-sm-12 well video-subtitle"><div id="sid" align="left" style="height:40px;overflow-y:scroll !important;-webkit-overflow-scrolling:touch !important;"><p>' + $scope.clickedCASummary + '</p></div><button id="btnTxtOnOff" class="btn btn-primary pull-right">Text Off</button></div></div></div>',
579 579  
580 580 //ajax: {
581 581 // url: 'app/views/ca/ca-view-detail.html'
... ... @@ -611,6 +611,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
611 611 if ($('.jsPanel-content').length > 0) {
612 612 $('.video-subtitle').css('margin-bottom', blackBorderHeight);
613 613 $('#divplayerinlineVideo').css('background', '#fff');
  614 + //Android > Clinical Animations > The animation does not fit to the screen in the Landscape mode.
  615 + var $ua = navigator.userAgent;
  616 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { $('.jsPanel-content').css("width", "100%"); }
614 617 }
615 618  
616 619 }
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -113,7 +113,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
113 113 $scope.IsSearchVisible = false;
114 114 $scope.shapesize = 1;
115 115  
116   -
  116 + $scope.CurrentStructure = "active";
117 117 //array for bodyviewid correspoing to male female(used for gender change)
118 118 $scope.correspondingBodyViewIds = {
119 119 '1': '5',
... ... @@ -290,6 +290,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
290 290 }
291 291 //to disbale layer change slider
292 292 $('.ui-slider').slider('disable');
  293 + // document.getElementById('txtlayerNumber').style.pointerEvents = "none";
  294 + $("#txtlayerNumber").prop('disabled', true);
  295 +
293 296  
294 297 $scope.isLoading = true;
295 298 $('#spinner').css('visibility', 'visible');
... ... @@ -304,7 +307,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
304 307 }
305 308 //to enable layer change slider
306 309 $('.ui-slider').slider('enable');
307   -
  310 + // document.getElementById('txtlayerNumber').style.pointerEvents = "auto";
  311 + $("#txtlayerNumber").prop('disabled', false);
308 312 $scope.isLoading = false;
309 313  
310 314 $('#spinner').css('visibility', 'hidden');
... ... @@ -3012,7 +3016,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3012 3016  
3013 3017 $scope.highlightedBR = [];
3014 3018  
3015   - // if ($scope.layerNumber == 224) {
3016 3019  
3017 3020 var matchedTermListPath = '~/../content/data/json/da/body-views/1/BodySystem_' + $rootScope.systemNumber + '.json';
3018 3021 var grayImageDataVar = null;
... ... @@ -3029,19 +3032,8 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
3029 3032 $('#spinner').css('visibility', 'hidden');
3030 3033  
3031 3034 //remove existing data and draw fresh data
3032   - for (var i = 0; i < $rootScope.grayImageDataList.length; i++) {
3033   - var grayCanvasID = 'imageCanvas' + parseInt(i + 1);
3034   - var grayCanvas = document.getElementById(grayCanvasID);
  3035 + $scope.removeCurrentHighlightedBodySystem();
3035 3036  
3036   - if (grayCanvas != null) {
3037   - var grayCanvasContext = grayCanvas.getContext("2d");
3038   -
3039   - var canvasHeight = grayCanvas.height;
3040   - var canvasWidth = grayCanvas.width;
3041   - grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth)
3042   - grayCanvasContext.putImageData($rootScope.grayImageDataList[parseInt(i)], 0, 0);
3043   - }
3044   - }
3045 3037  
3046 3038  
3047 3039 $scope.message = AIAConstants.NO_BODY_SYSTEM_AVAILABLE;
... ... @@ -4920,10 +4912,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
4920 4912  
4921 4913  
4922 4914 //0. get current layer number
4923   - if (isResized) {
  4915 + if (isResized || isLayerChanged) {
4924 4916 //do nothing
4925   - }
4926   - else if (isLayerChanged) {
  4917 + $scope.transNumber = 100;
  4918 + $(".slider").slider('value', 100);
4927 4919  
4928 4920 }
4929 4921 else {
... ... @@ -5439,8 +5431,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5439 5431  
5440 5432 $scope.DrawOnTBWithSelectedTransparency = function (tempCanvasID, XforCopyImage, YforCopyImage, WidthforCopyImage, HeightforCopyImage, XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage, Height, Width, bodyRegionId, isLayerChanged, isResized) {
5441 5433  
5442   -
5443   -
5444 5434 var transNumber = $scope.transNumber;//txtTransparencyChange.value;
5445 5435 //this changes the transparency when transparency is already activated and user resizes or chage the layer
5446 5436  
... ... @@ -5465,12 +5455,17 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5465 5455 tempCtx.putImageData(imageD, 0, 0);
5466 5456 //}
5467 5457 }
  5458 +
  5459 +
  5460 +
5468 5461 // set every fourth value to the desired number of transparency
5469 5462 var imageD1 = tempCtx.getImageData(0, 0, Width, Height);
5470 5463 var imageData1 = imageD1.data;
5471 5464 var length = imageData.length;
5472 5465  
5473 5466 for (var i = 3; i < length; i += 4) {
  5467 +
  5468 +
5474 5469 if ($scope.voId == "9" || $scope.voId == "11") {
5475 5470  
5476 5471 if (imageData1[i] == 0) {
... ... @@ -8492,89 +8487,120 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
8492 8487  
8493 8488 $rootScope.systemNumber = event.currentTarget.id;
8494 8489  
  8490 + if ($rootScope.systemNumber == 0) {
8495 8491  
8496   - //NIKITA
8497   - $rootScope.isHighlightBodyByBodySystem = true;
8498   - $scope.systemMatchedTermList = new jinqJs()
8499   - .from($rootScope.BodySystemData.BodySystem.BodySystemTerm)
8500   - .where('_SystemNumber == ' + event.currentTarget.id)
8501   - .select();
8502   -
8503   - if ($rootScope.isHighLight == false) {
8504   - //color the body gray
8505   - $rootScope.isHighLight = true
8506   - console.log('highLightBody from HighlightBodyByBodySystem')
8507   - $scope.highLightBody();
  8492 + console.log("inside HighlightBodyByBodySystem ..came inside current structure");
  8493 + //clear highlighted system
  8494 + $scope.removeCurrentHighlightedBodySystem();
  8495 + $scope.EnableUI();
8508 8496 }
  8497 +
8509 8498 else {
8510   - //This else is when user seraced anything then change the view and clicked on highlight options
8511   - //in this case body is already highlihted(gray) so no need to
8512   - if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
8513   - if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
8514   - $scope.isAlreadyHighlighted = true;
8515   - }
8516   - else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
8517   - $scope.isAlreadyHighlighted = true;
8518   - }
8519   - else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
8520   - $scope.isAlreadyHighlighted = true;
8521   - }
8522   - else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
8523   - $scope.isAlreadyHighlighted = true;
8524   - }
8525   - if (($scope.isAlreadyHighlighted == true && $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined && $scope.systemMatchedTermList.length > 0)) {
  8499 + //NIKITA
  8500 + $rootScope.isHighlightBodyByBodySystem = true;
  8501 + $scope.systemMatchedTermList = new jinqJs()
  8502 + .from($rootScope.BodySystemData.BodySystem.BodySystemTerm)
  8503 + .where('_SystemNumber == ' + event.currentTarget.id)
  8504 + .select();
  8505 +
  8506 + if ($rootScope.isHighLight == false) {
  8507 + //color the body gray
  8508 + $rootScope.isHighLight = true
  8509 + console.log('highLightBody from HighlightBodyByBodySystem')
  8510 + $scope.highLightBody();
  8511 + }
  8512 + else {
  8513 + //This else is when user seraced anything then change the view and clicked on highlight options
  8514 + //in this case body is already highlihted(gray) so no need to
  8515 + if ($scope.grayedBR != null || $scope.grayedBR != undefined) {
  8516 + if ((($rootScope.viewOrientationId == '1') || ($rootScope.viewOrientationId == '4')) && ($scope.grayedBR.length == 9)) {
  8517 + $scope.isAlreadyHighlighted = true;
  8518 + }
  8519 + else if ((($rootScope.viewOrientationId == '2') || ($rootScope.viewOrientationId == '3')) && ($scope.grayedBR.length == 5)) {
  8520 + $scope.isAlreadyHighlighted = true;
  8521 + }
  8522 + else if ((($rootScope.viewOrientationId == '5')) && ($scope.grayedBR.length == 4)) {
  8523 + $scope.isAlreadyHighlighted = true;
  8524 + }
  8525 + else if ((($rootScope.viewOrientationId == '6')) && ($scope.grayedBR.length == 1)) {
  8526 + $scope.isAlreadyHighlighted = true;
  8527 + }
  8528 + if (($scope.isAlreadyHighlighted == true && $rootScope.isHighlightBodyByBodySystem == true) && ($scope.systemMatchedTermList != null || $scope.systemMatchedTermList != undefined && $scope.systemMatchedTermList.length > 0)) {
8526 8529  
8527   - $scope.isLoading = true;
  8530 + $scope.isLoading = true;
8528 8531  
8529   - $('#spinner').css('visibility', 'visible');
8530   - $timeout(function () { $scope.HighlightBodyByTermListForBodySystem($scope.systemMatchedTermList) }, 100);
  8532 + $('#spinner').css('visibility', 'visible');
  8533 + $timeout(function () { $scope.HighlightBodyByTermListForBodySystem($scope.systemMatchedTermList) }, 100);
  8534 + }
8531 8535 }
8532 8536 }
8533   - }
8534 8537  
8535 8538  
8536   - //$rootScope.isLoading = true;
8537   - $('#spinner').css('visibility', 'visible');
8538   -
8539   - //NIKITA
8540   - // $rootScope.isHighlightBodyByBodySystem = true;
  8539 + //$rootScope.isLoading = true;
  8540 + $('#spinner').css('visibility', 'visible');
8541 8541  
8542   - //if (systemMatchedTermList != null || systemMatchedTermList != undefined) {
  8542 +
  8543 + var viewtarget_highlightbody = angular.element(event.currentTarget);
  8544 + var title_highlightbody = viewtarget_highlightbody.attr('title');
8543 8545  
8544   - // $timeout(function () { $scope.HighlightBodyByTermList(systemMatchedTermList) }, 100);
8545   - //}
  8546 + $scope.removeBodySyetemSelectionClass(title_highlightbody);
8546 8547  
  8548 + //Highlight button should be active
  8549 + $("#btnHighLight").addClass("btn-primary");
  8550 + $("#btnHighLight").removeClass("btn-black");
8547 8551  
8548   - var viewtarget_highlightbody = angular.element(event.currentTarget);
8549   - var title_highlightbody = viewtarget_highlightbody.attr('title');
  8552 + if (!$("#btnNormalMode").hasClass("btn-black")) {
  8553 + $("#btnNormalMode").addClass("btn-black");
  8554 + }
8550 8555  
8551   - $scope.removeBodySyetemSelectionClass(title_highlightbody);
  8556 + if (!$("#btnExtract").hasClass("btn-black")) {
  8557 + $("#btnExtract").addClass("btn-black");
  8558 + }
8552 8559  
8553   - //Highlight button should be active
8554   - $("#btnHighLight").addClass("btn-primary");
8555   - $("#btnHighLight").removeClass("btn-black");
  8560 + if ($("#btnExtract").hasClass("btn-primary")) {
  8561 + $("#btnExtract").removeClass("btn-primary");
  8562 + }
8556 8563  
8557   - if (!$("#btnNormalMode").hasClass("btn-black")) {
8558   - $("#btnNormalMode").addClass("btn-black");
  8564 + if ($("#btnNormalMode").hasClass("btn-primary")) {
  8565 + $("#btnNormalMode").removeClass("btn-primary");
  8566 + }
8559 8567 }
  8568 + }
8560 8569  
8561   - if (!$("#btnExtract").hasClass("btn-black")) {
8562   - $("#btnExtract").addClass("btn-black");
8563   - }
  8570 + $scope.removeCurrentHighlightedBodySystem = function(){
8564 8571  
8565   - if ($("#btnExtract").hasClass("btn-primary")) {
8566   - $("#btnExtract").removeClass("btn-primary");
8567   - }
  8572 + for (var i = 0; i < $rootScope.grayImageDataList.length; i++) {
  8573 + var grayCanvasID = 'imageCanvas' + parseInt(i + 1);
  8574 + var grayCanvas = document.getElementById(grayCanvasID);
8568 8575  
8569   - if ($("#btnNormalMode").hasClass("btn-primary")) {
8570   - $("#btnNormalMode").removeClass("btn-primary");
8571   - }
  8576 + if (grayCanvas != null) {
  8577 + var grayCanvasContext = grayCanvas.getContext("2d");
8572 8578  
  8579 + var canvasHeight = grayCanvas.height;
  8580 + var canvasWidth = grayCanvas.width;
  8581 + grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth)
  8582 + grayCanvasContext.putImageData($rootScope.grayImageDataList[parseInt(i)], 0, 0);
  8583 + }
  8584 + }
8573 8585 }
8574 8586  
8575 8587 $scope.removeBodySyetemSelectionClass = function (title_highlightbody) {
8576   -
8577   - if (title_highlightbody == "Cardiovascular") {
  8588 + if (title_highlightbody == "CurrentStructure") {
  8589 + $scope.CurrentStructure = "active";
  8590 + $scope.Cardiovascular = "";
  8591 + $scope.Digestive = "";
  8592 + $scope.Endocrine = "";
  8593 + $scope.Immune = "";
  8594 + $scope.Integumentary = "";
  8595 + $scope.Lymphatic = "";
  8596 + $scope.Muscular = "";
  8597 + $scope.Nervous = "";
  8598 + $scope.Reproductive = "";
  8599 + $scope.Respiratory = "";
  8600 + $scope.Skeletal = "";
  8601 + $scope.Urinary = "";
  8602 + }
  8603 + else if (title_highlightbody == "Cardiovascular") {
8578 8604 $scope.CurrentStructure = "";
8579 8605 $scope.Cardiovascular = "active";
8580 8606 $scope.Digestive = "";
... ... @@ -9410,6 +9436,9 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9410 9436 $rootScope.refreshTermListOnSystemSelection = function (bodysystemId) {
9411 9437 $rootScope.selectedBodySystemId = bodysystemId;
9412 9438 $rootScope.selectedBodySystemName = $('#bodySystems option[id="' + bodysystemId + '"]').val();
  9439 + $("#bodySystems").find("option").css({ "background-color": "#ffffff", "color": "#000000" });
  9440 + $("#bodySystems").find("option[id=" + bodysystemId + "]").css({ "background-color": "#3399FF", "color": "#ffffff" });
  9441 +
9413 9442 $('#termList').empty();
9414 9443 // $('#termList').innerHTML = '';
9415 9444  
... ... @@ -9517,33 +9546,23 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9517 9546 }
9518 9547  
9519 9548 $scope.LayerChangeBasedOnKeyPressed = function (e) {
9520   - // Dissectible Anatomy > Should not display blank page if no layer is selected.
9521   -
9522   -
9523   - if (e.keyCode == 13) {
9524   -
9525   - if ($("#txtlayerNumber").val() == '') {
9526   -
9527   - $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr);
9528   - }
9529   - else {
9530   - $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val();
9531   - $scope.LayerChange();
9532   - }
9533   -
9534   -
9535   - }
9536 9549  
9537 9550 // 'x' button is displaying inside the input box in IE browser.
9538 9551 if (e.keyCode == 38) {
9539 9552  
9540   -
9541 9553 var layerInputVal = $("#txtlayerNumber").val();
9542   - if (layerInputVal != $rootScope.totalLayers) {
  9554 +
  9555 + if (layerInputVal < $rootScope.totalLayers) {
  9556 +
9543 9557 var layerInputValInc = parseInt(layerInputVal) + 1;
9544 9558 $scope.layerNumber = parseInt(layerInputValInc);
9545 9559 $("#txtlayerNumber").val($scope.layerNumber);
9546 9560 $rootScope.PreviouslayerNumbr = $scope.layerNumber;
  9561 +
  9562 + }
  9563 + else {
  9564 +
  9565 + $("#txtlayerNumber").val($rootScope.totalLayers);
9547 9566 }
9548 9567  
9549 9568  
... ... @@ -9551,12 +9570,14 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9551 9570  
9552 9571 // 'x' button is displaying inside the input box in IE browser.
9553 9572 if (e.keyCode == 40) {
  9573 +
9554 9574 var layerInputVal = $("#txtlayerNumber").val();
9555 9575 if (layerInputVal > 0) {
9556 9576 var layerInputValDec = parseInt(layerInputVal) - 1;
9557 9577 $scope.layerNumber = parseInt(layerInputValDec);
9558 9578 $("#txtlayerNumber").val($scope.layerNumber);
9559 9579 $rootScope.PreviouslayerNumbr = $scope.layerNumber;
  9580 +
9560 9581 }
9561 9582 }
9562 9583  
... ... @@ -9565,31 +9586,54 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9565 9586  
9566 9587 $scope.LayerValueChangeBasedOnKeyUp = function (e) {
9567 9588  
9568   - var keyUplayerNumber = parseInt($("#txtlayerNumber").val());
9569   -
9570   - if (isNaN(keyUplayerNumber))
9571   - {
9572   - document.getElementById("txtlayerNumber").value = "";
9573   - }
9574   - else {
9575   -
9576   - if (keyUplayerNumber > $rootScope.totalLayers) {
  9589 +
  9590 + if (e.keyCode == 13) {
9577 9591  
9578   - $("#txtlayerNumber").val($rootScope.totalLayers);
9579   - $scope.layerNumber = parseInt($rootScope.totalLayers);
  9592 + if ($("#txtlayerNumber").val() == '') {
9580 9593  
  9594 + $("#txtlayerNumber").val($rootScope.PreviouslayerNumbr);
9581 9595 }
9582 9596 else {
9583 9597  
9584   - $("#txtlayerNumber").val(keyUplayerNumber);
9585   - $scope.layerNumber = parseInt(keyUplayerNumber);
  9598 + $rootScope.PreviouslayerNumbr = $("#txtlayerNumber").val();
9586 9599  
  9600 + var keyUplayerNumber = parseInt($("#txtlayerNumber").val());
9587 9601  
9588   - }
  9602 + if (isNaN(keyUplayerNumber)) {
  9603 + document.getElementById("txtlayerNumber").value = "";
  9604 + }
  9605 + else {
9589 9606  
9590   - }
  9607 + if (keyUplayerNumber > $rootScope.totalLayers) {
  9608 +
  9609 + $("#txtlayerNumber").val($rootScope.totalLayers);
  9610 + $scope.layerNumber = parseInt($rootScope.totalLayers);
  9611 +
  9612 + }
  9613 + else {
  9614 +
  9615 + $("#txtlayerNumber").val(keyUplayerNumber);
  9616 + $scope.layerNumber = parseInt(keyUplayerNumber);
9591 9617  
9592 9618  
  9619 + }
  9620 + $scope.LayerChange();
  9621 + }
  9622 + }
  9623 + }
  9624 + else {
  9625 + var layerInputVal = $("#txtlayerNumber").val();
  9626 +
  9627 + if (layerInputVal <= $rootScope.totalLayers) {
  9628 +
  9629 + $("#txtlayerNumber").val(layerInputVal);
  9630 +
  9631 + }
  9632 + else {
  9633 +
  9634 + $("#txtlayerNumber").val($rootScope.totalLayers);
  9635 + }
  9636 + }
9593 9637 }
9594 9638  
9595 9639  
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -2504,7 +2504,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2504 2504 $(".btn-annotation").removeClass("activebtncolor");
2505 2505 $('.btnCursor').addClass('activebtncolor');
2506 2506 }
2507   -
  2507 + var isDoubleTouch = null;
2508 2508 $rootScope.TextEditorFunctionality = function (canvasId, TextNumber, offsetX1, offsetY1, resetTextRect, shapestyleOpacity, shapestyleborderColor, shapestyleborderWidth, shapestyleFillColor, x, y) {
2509 2509 if ($rootScope.isTextAreaPreviewCompleted == true) {
2510 2510 $rootScope.isTextAreaPreviewCompleted = false;
... ... @@ -2647,6 +2647,80 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2647 2647 layer.draggable = false;
2648 2648 }
2649 2649 },
  2650 + touchstart: function (layer)
  2651 + {
  2652 + if (isDoubleTouch == null) {
  2653 + isDoubleTouch = setTimeout(function () {
  2654 + isDoubleTouch = null;
  2655 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
  2656 + //jcanvas property
  2657 + layer.draggable = true;
  2658 + $rootScope.canvasLayerNameCollection = [];
  2659 + $rootScope.canvasLayerNameCollection.push(layer.name);
  2660 + $('#canvas').setLayer(layer.name, {
  2661 + handle: {
  2662 + type: 'rectangle',
  2663 + fillStyle: '#fff',
  2664 + strokeStyle: '#c33',
  2665 + strokeWidth: 2,
  2666 + width: 5, height: 5,
  2667 + cornerRadius: 3,
  2668 +
  2669 + }
  2670 + }).drawLayers();
  2671 + }
  2672 + else {
  2673 + //jcanvas property
  2674 + layer.draggable = false;
  2675 + }
  2676 +
  2677 + }, 1000)
  2678 + } else {
  2679 + clearTimeout(isDoubleTouch);
  2680 + isDoubleTouch = null;
  2681 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
  2682 + //jcanvas property
  2683 + layer.draggable = true;
  2684 + $rootScope.IsTextAlreadySave = false;
  2685 + var RectNameArray = (layer.name).split("_");
  2686 +
  2687 + var TextAreaRectangleName = "TextArea_";
  2688 + var TextAreaRectNameConcat = TextAreaRectangleName.concat(RectNameArray[1]);
  2689 + $rootScope.TextAreaRectID = layer.name;
  2690 + $rootScope.TextID = TextAreaRectNameConcat;
  2691 +
  2692 + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
  2693 + $("#annotationTextModal").css("padding-right", "0px");
  2694 + document.getElementById('modelbackground').style.display = "block";
  2695 + $("#annotationTextModal").modal("toggle");
  2696 +
  2697 + $("#text_area").val('');
  2698 + $("#text_area").css({ "font-family": "Arial", "font-size": "14px", "font-weight": "normal", "font-style": "normal", "color": "#000", "text-align": "left", "text-decoration": "none" });
  2699 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": "#000000" });
  2700 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
  2701 +
  2702 + $("#selected-font-family option:eq(0)").prop('selected', true);
  2703 + $("#selected-font-size option:eq(0)").prop('selected', true);
  2704 +
  2705 + $("#text-italic").removeClass("ActiveFormattingButtonClass");
  2706 +
  2707 + $("#text-bold").removeClass("ActiveFormattingButtonClass");
  2708 +
  2709 + $("#text-underline").removeClass("ActiveFormattingButtonClass");
  2710 +
  2711 + $("#text-left").removeClass("ActiveFormattingButtonClass");
  2712 +
  2713 + $("#text-right").removeClass("ActiveFormattingButtonClass");
  2714 +
  2715 + $("#text-center").removeClass("ActiveFormattingButtonClass");
  2716 + }
  2717 + else {
  2718 + //jcanvas property
  2719 + layer.draggable = false;
  2720 + }
  2721 +
  2722 + }
  2723 + },
2650 2724 mouseout: function (layer) {
2651 2725 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
2652 2726 //jcanvas property
... ... @@ -2943,6 +3017,9 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2943 3017 }
2944 3018  
2945 3019 ///-----
  3020 +
  3021 + var isDoubleTouchSaveText = null;
  3022 + var isDoubleTouchSaveTextAgain = null;
2946 3023 $rootScope.saveText = function () {
2947 3024  
2948 3025 document.getElementById('modelbackground').style.display = "none";
... ... @@ -3189,6 +3266,182 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3189 3266 }
3190 3267  
3191 3268 },
  3269 + touchstart: function (layer) {
  3270 +
  3271 + if (isDoubleTouchSaveText == null) {
  3272 + isDoubleTouchSaveText = setTimeout(function () {
  3273 + isDoubleTouchSaveText = null;
  3274 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
  3275 + //jcanvas property
  3276 + layer.draggable = true;
  3277 + $rootScope.shapeTypeText = "textAreaRect";
  3278 + var layerName = layer.name;
  3279 + var splitedName = layerName.split("_");
  3280 + var textValName = "TextAreaNew_";
  3281 + var concatinateResult = textValName.concat(splitedName[1]);
  3282 + $rootScope.canvasLayerNameCollection = [];
  3283 + $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
  3284 + $('#canvas').setLayer(layer.name, {
  3285 + handle: {
  3286 + type: 'rectangle',
  3287 + fillStyle: '#fff',
  3288 + strokeStyle: '#c33',
  3289 + strokeWidth: 2,
  3290 + width: 5, height: 5,
  3291 + cornerRadius: 3,
  3292 + }
  3293 + }).drawLayers();
  3294 +
  3295 + }
  3296 + else {
  3297 + //jcanvas property
  3298 + layer.draggable = false;
  3299 + }
  3300 +
  3301 + }, 1000)
  3302 + } else {
  3303 + clearTimeout(isDoubleTouchSaveText);
  3304 + isDoubleTouchSaveText = null;
  3305 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
  3306 + //jcanvas property
  3307 + layer.draggable = true;
  3308 + $rootScope.isTextAreaClosedButtonActive = false;
  3309 + $rootScope.IsTextAlreadySave = true;
  3310 +
  3311 + var _rectLayerOnSave = layer.name;
  3312 + var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
  3313 + var TextAreaRectName = "TextAreaNew_";
  3314 + var TextAreaRectNameConcatenated = TextAreaRectName.concat(_rectLayerOnSaveSplit[1]);
  3315 +
  3316 + $rootScope.layerNameArr = layer.name;
  3317 + $rootScope.rectTextArr = TextAreaRectNameConcatenated;
  3318 +
  3319 +
  3320 + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
  3321 +
  3322 + for (var i = 0; i <= $rootScope.TextPropertyArray.length - 1; i++) {
  3323 + if ($rootScope.TextPropertyArray[i].layerName == TextAreaRectNameConcatenated) {
  3324 +
  3325 + var textArrVal = $rootScope.TextPropertyArray[i].Rect_Text;
  3326 + $("#text_area").val(textArrVal);
  3327 + var fontStyleProp = $rootScope.TextPropertyArray[i].FontStyle;
  3328 + var fontWeightProp = fontStyleProp.split(" ");
  3329 +
  3330 + $("#text_area").css("font-size", $rootScope.TextPropertyArray[i].FontSize);
  3331 + $("#text_area").css("font-weight", fontWeightProp[0]);
  3332 + $("#text_area").css("font-style", fontWeightProp[1]);
  3333 + $("#text_area").css("text-align", $rootScope.TextPropertyArray[i].Align);
  3334 + $("#text_area").css("color", $rootScope.TextPropertyArray[i].FontColor);
  3335 + $("#text_area").css("font-family", $rootScope.TextPropertyArray[i].FontFamily);
  3336 + $("#text_area").css("text-decoration", $rootScope.TextPropertyArray[i].TextDecoration);
  3337 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": $rootScope.TextPropertyArray[i].FontColor });
  3338 +
  3339 + var CurrentFontFamily = $rootScope.TextPropertyArray[i].FontFamily;
  3340 + var CurrentFontSize = parseInt($rootScope.TextPropertyArray[i].FontSize);
  3341 + $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
  3342 + $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
  3343 +
  3344 + CurrentFontFamily = '';
  3345 + CurrentFontSize = '';
  3346 +
  3347 +
  3348 + if ($rootScope.TextPropertyArray[i].TextDecoration == "underline") {
  3349 +
  3350 + $("#text-underline").addClass("ActiveFormattingButtonClass");
  3351 +
  3352 + }
  3353 +
  3354 + else {
  3355 +
  3356 + $("#text-underline").removeClass("ActiveFormattingButtonClass");
  3357 +
  3358 + }
  3359 +
  3360 + //adding text font weight active class in text edit pop-up
  3361 +
  3362 + if (fontWeightProp[0] == 700) {
  3363 +
  3364 + $("#text-bold").addClass("ActiveFormattingButtonClass");
  3365 +
  3366 + }
  3367 +
  3368 + else {
  3369 +
  3370 + $("#text-bold").removeClass("ActiveFormattingButtonClass");
  3371 +
  3372 + }
  3373 +
  3374 + //adding text font style active class in text edit pop-up
  3375 +
  3376 + if (fontWeightProp[1] == "italic") {
  3377 +
  3378 +
  3379 + $("#text-italic").addClass("ActiveFormattingButtonClass");
  3380 + }
  3381 + else {
  3382 + $("#text-italic").removeClass("ActiveFormattingButtonClass");
  3383 +
  3384 +
  3385 + }
  3386 +
  3387 + //adding text alignment active class in text edit pop-up
  3388 +
  3389 + if ($rootScope.TextPropertyArray[i].Align == "left") {
  3390 +
  3391 + $("#text-right").removeClass("ActiveFormattingButtonClass");
  3392 +
  3393 + $("#text-center").removeClass("ActiveFormattingButtonClass")
  3394 +
  3395 + $("#text-left").addClass("ActiveFormattingButtonClass");
  3396 +
  3397 + }
  3398 +
  3399 + else if ($rootScope.TextPropertyArray[i].Align == "right") {
  3400 +
  3401 +
  3402 +
  3403 + $("#text-center").removeClass("ActiveFormattingButtonClass")
  3404 +
  3405 + $("#text-left").removeClass("ActiveFormattingButtonClass");
  3406 +
  3407 + $("#text-right").addClass("ActiveFormattingButtonClass");
  3408 + }
  3409 +
  3410 + else if ($rootScope.TextPropertyArray[i].Align == "center") {
  3411 +
  3412 + $("#text-left").removeClass("ActiveFormattingButtonClass");
  3413 +
  3414 + $("#text-right").removeClass("ActiveFormattingButtonClass");
  3415 +
  3416 + $("#text-center").addClass("ActiveFormattingButtonClass");
  3417 +
  3418 + }
  3419 +
  3420 + }
  3421 + else {
  3422 + // alert("no");
  3423 +
  3424 + }
  3425 +
  3426 + }
  3427 +
  3428 +
  3429 + // _rectLayerOnSaveSplitInt = '';
  3430 + textArrVal = '';
  3431 + $("#annotationTextModal").css("padding-right", "0px");
  3432 + document.getElementById('modelbackground').style.display = "block";
  3433 + $("#annotationTextModal").modal("toggle");
  3434 +
  3435 + // $("#selected-font-family").val(CurrentFontFamily);
  3436 + // $("#selected-font-size").val(CurrentFontSize);
  3437 + }
  3438 + else {
  3439 + //jcanvas property
  3440 + layer.draggable = false;
  3441 + }
  3442 +
  3443 + }
  3444 + },
3192 3445 mouseout: function (layer) {
3193 3446  
3194 3447 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
... ... @@ -3521,6 +3774,138 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3521 3774 layer.draggable = false;
3522 3775 }
3523 3776 },
  3777 + touchstart: function (layer) {
  3778 +
  3779 + if (isDoubleTouchSaveTextAgain == null) {
  3780 + isDoubleTouchSaveTextAgain = setTimeout(function () {
  3781 + isDoubleTouchSaveTextAgain = null;
  3782 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
  3783 + //jcanvas property
  3784 + layer.draggable = true;
  3785 + $rootScope.shapeTypeText = "textAreaRect";
  3786 + var layerName = layer.name;
  3787 + var splitedName = layerName.split("_");
  3788 + var textValName = "TextAreaAfterEdit_";
  3789 + var concatinateResult = textValName.concat(splitedName[1]);
  3790 + $rootScope.canvasLayerNameCollection = [];
  3791 + $rootScope.canvasLayerNameCollection.push({ textareaRectangle: layer.name, textareaString: concatinateResult });
  3792 +
  3793 + $('#canvas').setLayer(layer.name, {
  3794 + handle: {
  3795 + type: 'rectangle',
  3796 + fillStyle: '#fff',
  3797 + strokeStyle: '#c33',
  3798 + strokeWidth: 2,
  3799 + width: 5, height: 5,
  3800 + cornerRadius: 3,
  3801 + }
  3802 + }).drawLayers();
  3803 + }
  3804 + else {
  3805 + //jcanvas property
  3806 + layer.draggable = false;
  3807 + }
  3808 +
  3809 + }, 1000)
  3810 + } else {
  3811 + clearTimeout(isDoubleTouchSaveTextAgain);
  3812 + isDoubleTouchSaveTextAgain = null;
  3813 + if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
  3814 + //jcanvas property
  3815 + layer.draggable = true;
  3816 + $rootScope.isTextAreaClosedButtonActive = false;
  3817 + $rootScope.IsTextAlreadySave = true;
  3818 + var _rectLayerOnSave = layer.name;
  3819 + var _rectLayerOnSaveSplit = _rectLayerOnSave.split("_");
  3820 + var RectNameAfterEdit = "TextAreaAfterEdit_";
  3821 + var RectNameAfterEditResult = RectNameAfterEdit.concat(_rectLayerOnSaveSplit[1]);
  3822 + $rootScope.modifySavedTextIndexNumber = _rectLayerOnSaveSplit[1];
  3823 +
  3824 + $rootScope.layerNameArr = layer.name;
  3825 + $rootScope.rectTextArr = RectNameAfterEditResult;
  3826 +
  3827 + $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
  3828 + $("#text_area").val(_modifiedText);
  3829 + $("#text_area").css("font-size", _modifiedFontSize);
  3830 + $("#text_area").css("font-weight", _modifiedFontWeight);
  3831 + $("#text_area").css("font-style", _modifiedFontStyle);
  3832 + $("#text_area").css("text-align", _modifiedTextAlign);
  3833 + $("#text_area").css("color", _modifiedFontColor);
  3834 + $("#text_area").css("font-family", _modifiedFontFamily);
  3835 + $("#text_area").css("text-decoration", _modifiedFontDecoration);
  3836 + $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").css({ "background-color": _modifiedFontColor });
  3837 +
  3838 + // $(".ActiveDefaultColorAnnotation").css({ "background-color": _modifiedFontColor + "!important" });
  3839 + // $("#font-color .minicolors .minicolors-swatch .minicolors-swatch-color").addClass("ActiveDefaultColorAnnotation");
  3840 +
  3841 + //khushbu
  3842 + var CurrentFontFamily = _modifiedFontFamily;
  3843 + // alert(CurrentFontFamily);
  3844 + // CurrentFontFamily = CurrentFontFamily.replace(/'/g, "");
  3845 + var CurrentFontSize = parseInt(_modifiedFontSize);
  3846 + $("#selected-font-family option[value=" + CurrentFontFamily + "]").prop('selected', true);
  3847 + $("#selected-font-size option[value=" + CurrentFontSize + "]").prop('selected', true);
  3848 + CurrentFontFamily = '';
  3849 + CurrentFontSize = '';
  3850 + //adding text text decoration active class in text edit pop-up
  3851 + if (_modifiedFontDecoration == "underline") {
  3852 + $("#text-underline").addClass("ActiveFormattingButtonClass");
  3853 + }
  3854 + else {
  3855 + $("#text-underline").removeClass("ActiveFormattingButtonClass");
  3856 + }
  3857 +
  3858 + //adding text font weight active class in text edit pop-up
  3859 + if (_modifiedFontWeight == 700) {
  3860 +
  3861 + $("#text-bold").addClass("ActiveFormattingButtonClass");
  3862 + }
  3863 + else {
  3864 +
  3865 + $("#text-bold").removeClass("ActiveFormattingButtonClass");
  3866 +
  3867 + }
  3868 +
  3869 + //adding text font style active class in text edit pop-up
  3870 + if (_modifiedFontStyle == "italic") {
  3871 +
  3872 + $("#text-italic").addClass("ActiveFormattingButtonClass");
  3873 + }
  3874 + else {
  3875 + $("#text-italic").removeClass("ActiveFormattingButtonClass");
  3876 +
  3877 + }
  3878 +
  3879 + //adding text alignment active class in text edit pop-up
  3880 + if (_modifiedTextAlign == "left") {
  3881 + $("#text-right").removeClass("ActiveFormattingButtonClass");
  3882 + $("#text-center").removeClass("ActiveFormattingButtonClass")
  3883 + $("#text-left").addClass("ActiveFormattingButtonClass");
  3884 + }
  3885 + else if (_modifiedTextAlign == "right") {
  3886 +
  3887 + $("#text-center").removeClass("ActiveFormattingButtonClass")
  3888 + $("#text-left").removeClass("ActiveFormattingButtonClass");
  3889 + $("#text-right").addClass("ActiveFormattingButtonClass");
  3890 +
  3891 + }
  3892 + else if (_modifiedTextAlign == "center") {
  3893 + $("#text-left").removeClass("ActiveFormattingButtonClass");
  3894 + $("#text-right").removeClass("ActiveFormattingButtonClass");
  3895 + $("#text-center").addClass("ActiveFormattingButtonClass");
  3896 +
  3897 + }
  3898 +
  3899 + document.getElementById('modelbackground').style.display = "block";
  3900 + $("#annotationTextModal").modal("toggle");
  3901 + }
  3902 + else {
  3903 + //jcanvas property
  3904 + layer.draggable = false;
  3905 + }
  3906 +
  3907 + }
  3908 + },
3524 3909 mouseout: function (layer) {
3525 3910 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
3526 3911 //jcanvas property
... ... @@ -4652,7 +5037,15 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
4652 5037 $("#cursor-block").html();
4653 5038  
4654 5039 }
  5040 + var $ue = navigator.userAgent;
  5041 + if (($ue.match(/(iPod|iPhone|iPad|android)/i))) {
4655 5042  
  5043 + $("#text_area").click(function () {
  5044 + $("#annotationTextModal").draggable('disable');
  5045 + }).blur(function () {
  5046 + $("#annotationTextModal").draggable('enable');
  5047 + });
  5048 + }
4656 5049 $rootScope.CheckRefresh = function (e) {
4657 5050 //Checking if 'REFRESHED' or 'RELOADED'
4658 5051 if ((e.keyCode === 116) || (e.keyCode == 82 && e.ctrlKey))
... ...
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -260,6 +260,112 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
260 260 //7. Highlight all system body list in left side
261 261 $scope.highlightBodySystemList();
262 262 }
  263 + $(".slider").slider({
  264 + min: 25,
  265 + max: 100,
  266 + value: 100,
  267 + range: "min",
  268 + orientation: "vertical",
  269 + slide: function (event, ui) {
  270 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  271 + scope.$apply(function () {
  272 + scope.sliderVal = ui.value;
  273 + scope.removeSpeechBubble();
  274 + var relativeWidth = 0;
  275 + var relativeHeight = 0;
  276 + if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
  277 + if (ui.value == 100) {
  278 + relativeWidth = scope.ViewImageWidth;
  279 + relativeHeight = scope.ViewImageHeight
  280 + scope.sliderPercentValue = 1.0;
  281 + }
  282 + else if (ui.value == 85) {
  283 + relativeWidth = scope.ViewImageWidth * 0.85;
  284 + relativeHeight = scope.ViewImageHeight * 0.85;
  285 + scope.sliderPercentValue = 0.85;
  286 +
  287 + } else if (ui.value == 70) {
  288 + relativeWidth = scope.ViewImageWidth * 0.70;
  289 + relativeHeight = scope.ViewImageHeight * 0.70;
  290 + scope.sliderPercentValue = 0.70;
  291 + } else if (ui.value == 55) {
  292 +
  293 + relativeWidth = scope.ViewImageWidth * 0.55;
  294 + relativeHeight = scope.ViewImageHeight * 0.55;
  295 + scope.sliderPercentValue = 0.55;
  296 +
  297 + } else if (ui.value == 40) {
  298 +
  299 + relativeWidth = scope.ViewImageWidth * 0.40;
  300 + relativeHeight = scope.ViewImageHeight * 0.40;
  301 + scope.sliderPercentValue = 0.40;
  302 +
  303 + } else if (ui.value == 25) {
  304 +
  305 + relativeWidth = scope.ViewImageWidth * 0.25;
  306 + relativeHeight = scope.ViewImageHeight * 0.25;
  307 + scope.sliderPercentValue = 0.25;
  308 +
  309 + }
  310 + }
  311 +
  312 + if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
  313 + $("#modItemImage").css("width", relativeWidth + "px");
  314 + $("#modItemImage").css("height", relativeHeight + "px");
  315 + $("#aaDetailViewCanvas").css("width", relativeWidth + "px");
  316 + $("#modItemImage").css("height", relativeHeight + "px");
  317 +
  318 + $("#modItemImage").attr('src', '');
  319 +
  320 +
  321 + $("#aaDetailViewCanvas").remove();
  322 + //0.5 create canvas on the top of image so that I can draw a line over the canvas.
  323 + var canvas = document.createElement('canvas');
  324 + canvas.id = 'aaDetailViewCanvas';
  325 + canvas.className = 'aaCanvas';
  326 + canvas.height = relativeHeight;
  327 + canvas.width = relativeWidth;
  328 + canvas.style.left = '0px';
  329 + canvas.style.top = '0px';
  330 + canvas.style.position = "absolute";
  331 +
  332 + $("#canvasDiv").append(canvas);
  333 + scope.context = canvas.getContext("2d")
  334 + $("#modItemImage").attr('src', scope.OpenItemImagePath);
  335 + scope.isSliderChange = true;
  336 + var btnID = '';
  337 + $("div.tools div:eq(1) div").each(function () {
  338 + if ($(this).find("button").hasClass("btn-primary")) {
  339 + btnID = $(this).find("button").attr("id");
  340 + $('#' + btnID).removeClass("btn-black");
  341 + $('#' + btnID).addClass("btn-primary");
  342 + }
  343 + });
  344 + scope.isSelectedPinBtnClickedAftrSliderCange = true;
  345 + switch (btnID) {
  346 +
  347 + case "hidePinBtn":
  348 + break;
  349 + case "allPinBtn":
  350 + scope.showAllPins();
  351 + break;
  352 + case "selectedPin":
  353 + scope.showAllPins();
  354 + setTimeout(function () {
  355 + console.log(scope.allPinDataArray);
  356 + scope.activePinOnSliderChange();
  357 + }, 1000);
  358 + break;
  359 + }
  360 + }
  361 +
  362 + });
  363 + }
  364 + })
  365 + .slider("pips", {
  366 + rest: "label",
  367 + step: "15"
  368 + });
263 369 }, 500);
264 370 }
265 371  
... ... @@ -1745,6 +1851,51 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1745 1851 }
1746 1852 }
1747 1853 }
  1854 + $(document).ready(function () {
  1855 + var $ua = navigator.userAgent;
  1856 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  1857 +
  1858 + var jspanelContainerWidth = $(".jsPanel-content").css("width");
  1859 + $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
  1860 + $("#ImagePanel").css("width", "100%");
  1861 +
  1862 + //hide pin button clicked
  1863 + $("#hidePinBtn").removeAttr("onclick");
  1864 + $("#hidePinBtn").on("touchstart", function () {
  1865 + var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1866 + rootScope.$apply(function () {
  1867 + rootScope.hidePins(event);
  1868 + });
  1869 + });
  1870 + //selected pin button clicked
  1871 + $("#selectedPin").removeAttr("onclick");
  1872 + $("#selectedPin").on("touchstart", function () {
  1873 + console.log('showSelectedPins is called')
  1874 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1875 + scope.$apply(function () {
  1876 + scope.showSelectedPins(event);
  1877 + });
  1878 + });
  1879 + //all pin button clicked
  1880 + $("#allPinBtn").removeAttr("onclick");
  1881 + $("#allPinBtn").on("touchstart", function () {
  1882 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1883 + scope.$apply(function () {
  1884 + scope.showAllPinsAfterHide(event);
  1885 + });
  1886 + });
  1887 + //comment-box button clicked
  1888 + $("#comment-box").removeAttr("onclick");
  1889 + $("#comment-box").on("touchstart", function () {
  1890 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1891 + scope.$apply(function () {
  1892 + scope.ShowHideAnnotation(event);
  1893 + });
  1894 + });
  1895 +
  1896 + }
  1897 +
  1898 + });
1748 1899 }]);
1749 1900  
1750 1901  
... ... @@ -1883,153 +2034,3 @@ function onZoom(scope) {
1883 2034 }
1884 2035  
1885 2036  
1886   -$(document).ready(function () {
1887   - var $ua = navigator.userAgent;
1888   - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
1889   -
1890   - var jspanelContainerWidth = $(".jsPanel-content").css("width");
1891   - $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
1892   - $("#ImagePanel").css("width", "100%");
1893   -
1894   - //hide pin button clicked
1895   - $("#hidePinBtn").removeAttr("onclick");
1896   - $("#hidePinBtn").on("touchstart", function () {
1897   - var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
1898   - rootScope.$apply(function () {
1899   - rootScope.hidePins(event);
1900   - });
1901   - });
1902   - //selected pin button clicked
1903   - $("#selectedPin").removeAttr("onclick");
1904   - $("#selectedPin").on("touchstart", function () {
1905   - console.log('showSelectedPins is called')
1906   - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
1907   - scope.$apply(function () {
1908   - scope.showSelectedPins(event);
1909   - });
1910   - });
1911   - //all pin button clicked
1912   - $("#allPinBtn").removeAttr("onclick");
1913   - $("#allPinBtn").on("touchstart", function () {
1914   - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
1915   - scope.$apply(function () {
1916   - scope.showAllPinsAfterHide(event);
1917   - });
1918   - });
1919   - //comment-box button clicked
1920   - $("#comment-box").removeAttr("onclick");
1921   - $("#comment-box").on("touchstart", function () {
1922   - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
1923   - scope.$apply(function () {
1924   - scope.ShowHideAnnotation(event);
1925   - });
1926   - });
1927   -
1928   - }
1929   - $(".slider").slider({
1930   - min: 25,
1931   - max: 100,
1932   - value: 100,
1933   - range: "min",
1934   - orientation: "vertical",
1935   - slide: function (event, ui) {
1936   - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
1937   - scope.$apply(function () {
1938   - scope.sliderVal = ui.value;
1939   - scope.removeSpeechBubble();
1940   - var relativeWidth = 0;
1941   - var relativeHeight = 0;
1942   - if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
1943   - if (ui.value == 100) {
1944   - relativeWidth = scope.ViewImageWidth;
1945   - relativeHeight = scope.ViewImageHeight
1946   - scope.sliderPercentValue = 1.0;
1947   - }
1948   - else if (ui.value == 85) {
1949   - relativeWidth = scope.ViewImageWidth * 0.85;
1950   - relativeHeight = scope.ViewImageHeight * 0.85;
1951   - scope.sliderPercentValue = 0.85;
1952   -
1953   - } else if (ui.value == 70) {
1954   - relativeWidth = scope.ViewImageWidth * 0.70;
1955   - relativeHeight = scope.ViewImageHeight * 0.70;
1956   - scope.sliderPercentValue = 0.70;
1957   - } else if (ui.value == 55) {
1958   -
1959   - relativeWidth = scope.ViewImageWidth * 0.55;
1960   - relativeHeight = scope.ViewImageHeight * 0.55;
1961   - scope.sliderPercentValue = 0.55;
1962   -
1963   - } else if (ui.value == 40) {
1964   -
1965   - relativeWidth = scope.ViewImageWidth * 0.40;
1966   - relativeHeight = scope.ViewImageHeight * 0.40;
1967   - scope.sliderPercentValue = 0.40;
1968   -
1969   - } else if (ui.value == 25) {
1970   -
1971   - relativeWidth = scope.ViewImageWidth * 0.25;
1972   - relativeHeight = scope.ViewImageHeight * 0.25;
1973   - scope.sliderPercentValue = 0.25;
1974   -
1975   - }
1976   - }
1977   -
1978   - if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
1979   - $("#modItemImage").css("width", relativeWidth + "px");
1980   - $("#modItemImage").css("height", relativeHeight + "px");
1981   - $("#aaDetailViewCanvas").css("width", relativeWidth + "px");
1982   - $("#modItemImage").css("height", relativeHeight + "px");
1983   -
1984   - $("#modItemImage").attr('src', '');
1985   -
1986   -
1987   - $("#aaDetailViewCanvas").remove();
1988   - //0.5 create canvas on the top of image so that I can draw a line over the canvas.
1989   - var canvas = document.createElement('canvas');
1990   - canvas.id = 'aaDetailViewCanvas';
1991   - canvas.className = 'aaCanvas';
1992   - canvas.height = relativeHeight;
1993   - canvas.width = relativeWidth;
1994   - canvas.style.left = '0px';
1995   - canvas.style.top = '0px';
1996   - canvas.style.position = "absolute";
1997   -
1998   - $("#canvasDiv").append(canvas);
1999   - scope.context = canvas.getContext("2d")
2000   - $("#modItemImage").attr('src', scope.OpenItemImagePath);
2001   - scope.isSliderChange = true;
2002   - var btnID = '';
2003   - $("div.tools div:eq(1) div").each(function () {
2004   - if ($(this).find("button").hasClass("btn-primary")) {
2005   - btnID = $(this).find("button").attr("id");
2006   - $('#' + btnID).removeClass("btn-black");
2007   - $('#' + btnID).addClass("btn-primary");
2008   - }
2009   - });
2010   - scope.isSelectedPinBtnClickedAftrSliderCange = true;
2011   - switch (btnID) {
2012   -
2013   - case "hidePinBtn":
2014   - break;
2015   - case "allPinBtn":
2016   - scope.showAllPins();
2017   - break;
2018   - case "selectedPin":
2019   - scope.showAllPins();
2020   - setTimeout(function () {
2021   - console.log(scope.allPinDataArray);
2022   - scope.activePinOnSliderChange();
2023   - }, 1000);
2024   - break;
2025   - }
2026   - }
2027   -
2028   - });
2029   - }
2030   - })
2031   - .slider("pips", {
2032   - rest: "label",
2033   - step: "15"
2034   - });
2035   -});
2036 2037 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... ... @@ -241,12 +241,10 @@
241 241 });
242 242 });
243 243 </script>
244   -<script src="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.js"></script>
  244 +
245 245  
246 246 <script>
247 247 $(function () {
248 248 $("#draggable").draggable();
249 249 });
250 250 </script>
251   -
252   -<script src="app/controllers/TileViewListController.js"></script>
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... ... @@ -168,7 +168,10 @@
168 168 <div class="custom-tooltip">Highlight Options</div>
169 169 <button class="btn btn-black btn-sm pull-right marginTop5 dropdown-toggle" type="button" id="dropdownMenu2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" ng-click="LoadBodySystemData()"><img src="content/images/icon-highlight.png" alt="" title=""></button>
170 170 <ul class="dropdown-menu" aria-labelledby="dropdownMenu2">
171   - <li ng-class="CurrentStructure"><a href="#" title="Current Structure">Current Structure</a></li>
  171 + <li ng-class="CurrentStructure" ><a href="#" title="Current Structure"
  172 + ng-click="removeBodySyetemSelectionClass('CurrentStructure')">Current Structure</a></li>
  173 +
  174 +
172 175 <li role="separator" class="divider"></li>
173 176 <!--<li ng-class="Cardiovascular"><a href="#" title="Cardiovascular" id="1" ng-click="HighlightBodyByBodySystem($event)">Cardiovascular</a></li>
174 177 <li ng-class="Digestive"><a href="#" title="Digestive" id="2" ng-click="HighlightBodyByBodySystem($event)">Digestive</a></li>
... ...
400-SOURCECODE/AIAHTML5.Web/app/widget/TopMenu.html
... ... @@ -55,7 +55,7 @@
55 55 <li class="visible-xs"><a href="" ng-click="LogoutUser()">Logout</a></li>
56 56 <li class="hidden-xs marginR5 logOut" data-toggle="tooltip" data-placement="top" title="Logout"><a href="" ng-click="LogoutUser()"><i class="fa fa-power-off"></i></a></li>
57 57 </ul>
58   - <div id="imaginary_container">
  58 + <div id="imaginary_container" style="visibility:hidden">
59 59 <div class="input-group stylish-input-group paddTop5 hidden-sm">
60 60 <input type="text" class="form-control width120" placeholder="Search">
61 61 <span class="input-group-addon">
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -301,7 +301,7 @@
301 301 <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#topFixedNavbar1" aria-expanded="false">
302 302 <span class="sr-only">Toggle navigation</span><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span>
303 303 </button>
304   - <a class="frameLogo navbar-brand" href="home"><img src="content/images/logo-main.png" class="img-responsive" alt=""></a>
  304 + <a class="frameLogo navbar-brand"><img src="content/images/logo-main.png" class="img-responsive" alt=""></a>
305 305 </div>
306 306 <div ng-include="'app/widget/TopMenu.html'"></div>
307 307 </div>
... ... @@ -1448,7 +1448,6 @@
1448 1448 <script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js"></script>
1449 1449 <script src="libs/video_4_12_11/video_4_12_11.js"></script>
1450 1450 <script src="libs/jquery/jquery_plugin/SpeechBubble/bubble.js"></script>
1451   - <script src="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.js"></script>
1452 1451 <!--<script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.min.js"></script>-->
1453 1452 <script src="app/main/AIA.js"></script>
1454 1453 <script src="app/main/Link.js"></script>
... ... @@ -1479,6 +1478,7 @@
1479 1478 <script src="app/services/DataService.js"></script>
1480 1479 <script src="app/services/TermService.js"></script>
1481 1480 <script src="libs/jquery/jquery_plugin/jqueryui.js"></script>
  1481 + <script src="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.js"></script>
1482 1482  
1483 1483 <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
1484 1484  
... ...