From 1d27d4ed55587e69b7f87feceb901cecaede7be3 Mon Sep 17 00:00:00 2001 From: amrita.vishnoi Date: Tue, 23 Jan 2018 16:09:26 +0530 Subject: [PATCH] Deleted .cs project --- 400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj | 192 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ 400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user | 36 ------------------------------------ 400-SOURCECODE/AIAHTML5.API/App_Start/WebApiConfig.cs | 24 ------------------------ 400-SOURCECODE/AIAHTML5.API/Constants/AIAConstants.cs | 45 --------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs | 31 ------------------------------- 400-SOURCECODE/AIAHTML5.API/Constants/ErrorHelper.cs | 137 ----------------------------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Controllers/AdminAccessController.cs | 36 ------------------------------------ 400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs | 284 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Controllers/ForgotUserController.cs | 106 ---------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Controllers/LicenseTermConditionController.cs | 99 --------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs | 41 ----------------------------------------- 400-SOURCECODE/AIAHTML5.API/Controllers/ResetPasswordController.cs | 100 ---------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Controllers/UnblockUserController.cs | 87 --------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs | 865 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs | 46 ---------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Models/User.cs | 116 -------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs | 301 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Models/Users.cs | 358 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Properties/AssemblyInfo.cs | 35 ----------------------------------- 400-SOURCECODE/AIAHTML5.API/Properties/Settings.Designer.cs | 44 -------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Properties/Settings.settings | 12 ------------ 400-SOURCECODE/AIAHTML5.API/Templates/Forgot-UserId.html | 67 ------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Templates/forgot-Password.html | 85 ------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html | 87 --------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs | 143 ----------------------------------------------------------------------------------------------------------------------------------------------- 400-SOURCECODE/AIAHTML5.API/Web.Debug.config | 30 ------------------------------ 400-SOURCECODE/AIAHTML5.API/Web.Release.config | 31 ------------------------------- 400-SOURCECODE/AIAHTML5.API/content/images/logo.png | Bin 11780 -> 0 bytes 400-SOURCECODE/AIAHTML5.API/index.html | 9 --------- 400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs | 0 400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs | 0 400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs | 0 400-SOURCECODE/AIAHTML5.API/packages.config | 9 --------- 33 files changed, 0 insertions(+), 3456 deletions(-) delete mode 100644 400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj delete mode 100644 400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user delete mode 100644 400-SOURCECODE/AIAHTML5.API/App_Start/WebApiConfig.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Constants/AIAConstants.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Constants/ErrorHelper.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Controllers/AdminAccessController.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Controllers/ForgotUserController.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Controllers/LicenseTermConditionController.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Controllers/ResetPasswordController.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Controllers/UnblockUserController.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Models/User.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Models/Users.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Properties/AssemblyInfo.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Properties/Settings.Designer.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Properties/Settings.settings delete mode 100644 400-SOURCECODE/AIAHTML5.API/Templates/Forgot-UserId.html delete mode 100644 400-SOURCECODE/AIAHTML5.API/Templates/forgot-Password.html delete mode 100644 400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html delete mode 100644 400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/Web.Debug.config delete mode 100644 400-SOURCECODE/AIAHTML5.API/Web.Release.config delete mode 100644 400-SOURCECODE/AIAHTML5.API/content/images/logo.png delete mode 100644 400-SOURCECODE/AIAHTML5.API/index.html delete mode 100644 400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs delete mode 100644 400-SOURCECODE/AIAHTML5.API/packages.config diff --git a/400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj b/400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj deleted file mode 100644 index efe73a1..0000000 --- a/400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj +++ /dev/null @@ -1,192 +0,0 @@ - - - - - Debug - AnyCPU - - - 2.0 - {29B2F1D1-8B39-4B74-9874-7CB659800E3F} - {349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc} - Library - Properties - AIAHTML5.API - AIAHTML5.API - v4.5 - true - - - - - - - - true - full - false - bin\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\ - TRACE - prompt - 4 - - - - ..\packages\DnsClient.1.0.7\lib\net45\DnsClient.dll - True - - - ..\packages\log4net.2.0.7\lib\net45-full\log4net.dll - True - - - - ..\packages\MongoDB.Bson.2.5.0\lib\net45\MongoDB.Bson.dll - True - - - ..\packages\MongoDB.Driver.2.5.0\lib\net45\MongoDB.Driver.dll - True - - - ..\packages\MongoDB.Driver.Core.2.5.0\lib\net45\MongoDB.Driver.Core.dll - True - - - False - ..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll - - - ..\packages\System.Buffers.4.3.0\lib\netstandard1.1\System.Buffers.dll - True - - - - ..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll - True - - - ..\packages\System.Runtime.InteropServices.RuntimeInformation.4.0.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll - True - - - - - - - - - - - - ..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll - True - - - ..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll - True - - - - - - - - - - - - - - - - - - Designer - - - - - - - - - - - - - - - - Global.asax - - - - - - - - - True - True - Settings.settings - - - - - - - - SettingsSingleFileGenerator - Settings.Designer.cs - - - Web.config - - - Web.config - - - - - - - 10.0 - $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) - - - - - - - - - True - True - 63874 - / - http://localhost:63874/ - False - False - http://182.19.10.91/AIAHTML5 - False - - - - - - \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user b/400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user deleted file mode 100644 index 8cc3090..0000000 --- a/400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user +++ /dev/null @@ -1,36 +0,0 @@ - - - - True - False - True - - False - ProjectFiles - - - - - - - - CurrentPage - True - False - False - False - - - - - - - - - True - True - - - - - \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/App_Start/WebApiConfig.cs b/400-SOURCECODE/AIAHTML5.API/App_Start/WebApiConfig.cs deleted file mode 100644 index 8c03032..0000000 --- a/400-SOURCECODE/AIAHTML5.API/App_Start/WebApiConfig.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web.Http; - -namespace AIAHTML5.API -{ - public static class WebApiConfig - { - public static void Register(HttpConfiguration config) - { - // Web API configuration and services - - // Web API routes - config.MapHttpAttributeRoutes(); - - config.Routes.MapHttpRoute( - name: "DefaultApi", - routeTemplate: "api/{controller}/{id}", - defaults: new { id = RouteParameter.Optional } - ); - } - } -} diff --git a/400-SOURCECODE/AIAHTML5.API/Constants/AIAConstants.cs b/400-SOURCECODE/AIAHTML5.API/Constants/AIAConstants.cs deleted file mode 100644 index ae8779e..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Constants/AIAConstants.cs +++ /dev/null @@ -1,45 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace AIAHTML5.API.Constants -{ - public class AIAConstants - { - public const string ERROR_IN_FECTHING_DETAILS = "Error in fecthing details."; - public const string USER_NOT_FOUND = "User not found."; - public const string MAIL_NOT_SENT = "Mail not sent."; - public const string MAIL_SENT = "Mail sent."; - public const string EXCEPTION_OCCURED = "We are facing some issue. Please try to login after sometime."; - public const string EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT = "Exception Occuredin AIAHTML5."; - public const string SQL_CONNECTION_ERROR = "We are unable to connect with database. Please contact customer support."; - public const string SQL_CONNECTION_ERROR_MAIL_SUBJECT = "SQL Connection error in AIAHTML5."; - public const string KEY_ID = "id"; - public const string KEY_TITLE = "title"; - public const string KEY_NAME = "name"; - public const string KEY_SLUG = "slug"; - public const string KEY_DESCRIPTION = "Description"; - - public const string PASSWORD_UPDATE_SUCCESS = "Password updated successfully"; - public const string PASSWORD_UPDATE_FAILED = "Password update failed"; - - public const string INVALID_USER = "Invalid UserID"; - - public const string LICENSE_TERM_CONDITION_UPDATE_SUCCESS = "License Term Accepted field updated successfully."; - public const string LICENSE_TERM_CONDITION_UPDATE_FAILED = "License Term Accepted field update failed."; - - public const string KEY_CONTENT = "content"; - - public const string LICENSE_KEY_ID = "LicenseId"; - public const string EDITION_KEY_ID = "EditionId"; - - public const string USER_UNBLOCK_SUCCESS = "User unblocked"; - public const string USER_UNBLOCK_FAILED = "Unblock operation failed"; - public const string UNABLE_TO_UNBLOCK = "We are unable to unblock. Please try after sometime."; - - public const string FORGOT_USERID_EMAIL_SUBJECT = "UserID recovery mail for:"; - public const string FORGOT_PASSWORD_EMAIL_SUBJECT = "Password recovery mail for:"; - public const string UNBLOCK_USER_EMAIL_SUBJECT = "Unblock user request mail for:"; - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs b/400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs deleted file mode 100644 index bde877d..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs +++ /dev/null @@ -1,31 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace AIAHTML5.API.Constants -{ - public class DBConstants - { - public const string GET_ALL_MODULES = "GetAllModuleStatusWithSlug"; - public const string GET_USER_DELAILS_BY_LOGIN_ID = "GetUserDetailsByLoginId"; - public const string GET_LICENSE_DETAILS_BY_USER_ID = "GetLicenseDetailByUserId"; - public const string GET_USER_MODULES_BY_LICENSE_ID = "GetUserModulesByLicenseId"; - public const string GET_USER_DETAILS_BY_EMAILID = "GetUserInfoByEmailId"; - - public const string UPDATE_USER_PASSWORD = "UpdateUserPassword"; - public const string GET_SUBSCRIPTION_DETAILS_BY_LICENSE_ID = "GetSubscriptionDetailsByLicenseId"; - public const string GET_LICENSE_DETAILS_BY_ID = "GetLicenseDetailsById"; - public const string UPDATE_LICENSE_TERM_STATUS = "UpdateLicenseTermAcceptedStatus"; - public const string GET_TERMS_AND_CONDITIONS = "GetTermsAndConditions"; - public const string INSERT_LOGIN_DETAIL = "InsertLoginDetail"; - public const string INSERT_INCORRECT_LOGIN_ATTEMPTS = "InsertIncorrectLoginAttempt"; - public const string GET_INCORRECT_LOGIN_ATTEMPTS = "GetIncorrectLoginAttempt"; - public const string UPDATE_INCORRECT_LOGIN_ATTEMPTS = "UpdateIncorrectLoginAttempts"; - public const string DELETE_INCORRECT_LOGIN_ATTEMPTS = "DeleteIncorrectLoginAttempts"; - public const string GET_ALL_LOGIN_FAILURE_CAUSES = "GetAllLoginFailureCauses"; - public const string INSERT_LOGIN_ERROR_LOG = "InsertLoginErrorLog"; - public const string GET_BLOCKED_USER_BY_USER_ID = "GetBlockedUserByUserId"; - public const string GET_BLOCKED_USERS_BY_USER_TYPE = "GetBlockedUserByUserType"; - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Constants/ErrorHelper.cs b/400-SOURCECODE/AIAHTML5.API/Constants/ErrorHelper.cs deleted file mode 100644 index ef97db0..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Constants/ErrorHelper.cs +++ /dev/null @@ -1,137 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Collections; -using System.Linq; -using System.Web; - -namespace AIAHTML5.API.Constants -{ - /// - /// This class is used to provide error description. This class contain - /// different type of error code and its description. - /// - public class ErrorHelper - { - private static ErrorHelper _instance; - private Hashtable objHash = new Hashtable(); - - - /* error Id Const */ - public const Int16 E_NO_ERROR = 0; - public const Int16 E_USER_NOT_EXIST = 1; - public const Int16 E_PASSWORD_NOT_MATCH = 2; - public const Int16 E_USER_ID_BLOCKED_24_HRS = 3; - public const Int16 E_USER_NOT_ACTIVE = 4; - public const Int16 E_USER_ID_WILL_BLOCKED = 5; - public const Int16 E_EMAIL_ID_NOT_EXIT = 6; - public const Int16 E_LICENCE_IS_INACTIVE = 7; - public const Int16 E_USER_NOT_MAP_TO_LICENCE_EDITION = 8; - public const Int16 E_NO_ROW_FOUND_LICENCE_TO_EDITION_TABLE = 9; - public const Int16 E_NO_ROW_FOUND_LICENCE_TABLE = 10; - public const Int16 E_SECURITY_QUEST_NOT_MATCH = 11; - public const Int16 E_SEQURITY_ANSWER_NOT_MATCH = 12; - public const Int16 E_FORGOT_USER_ID_EMAIL_ID_NOT_EXIT = 13; - public const Int16 E_TOTAL_NUMBER_LOGIN_EXCEED = 14; - public const Int16 E_FORGOT_PASSWORD_EMAIL_ID_NOT_EXIST = 15; - public const Int16 E_TEST_SETUP_ACCOUNT_USER_NAME_EXIST = 16; - public const Int16 E_TEST_SETUP_ACCOUNT_EMAILID_EXIST = 17; - public const Int16 E_SP_ERROR = 18; - public const Int16 E_ACCOUNT_NUMBER_NOT_EXIST = 19; - public const Int16 E_ACCOUNT_NUMBER_ALREADY_EXIST = 20; - public const Int16 E_TEST_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT = 21; - public const Int16 E_MAIL_COULD_NOT_SENT = 22; - public const Int16 E_RESELLER_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT = 23; - public const Int16 E_LICENSE_TERM_CONDITION = 24; - public const Int16 E_EDITION_NOT_LINKED_WITH_SITE = 25; - public const Int16 E_LOGIN_SESSION_EXPIRE = 26; - public const Int16 E_DISCOUNT_CODE_NOT_EXIST = 27; - public const Int16 E_DISCOUNT_CODE_ALREADY_EXIST = 28; - - public const Int16 E_SITE_IP_NOT_NULL = 29; - public const Int16 E_EDITION_ID_NOT_NULL = 30; - public const Int16 E_MASTER_SITEIP_NOT_EXIST = 31; - public const Int16 EDITION_ID_NOT_EXIST = 32; - public const Int16 E_ERROR_LOG = 33; - public const Int16 E_MASTER_SITE_ALREADY_EXIST = 34; - public const Int16 E_ACCOUNT_NUMBER_NOT_NULL = 35; - public const Int16 E_SITE_IP_ALREADY_EXIST = 36; - - - public const Int16 E_LICENCE_IS_EXPIRED = 37; - public const Int16 E_SINGLEACCOUNT_IS_BEING_USED = 38; - - - public const Int16 E_DATA_BASE_CONNECTION = 4060; - - - //login failure error constant - public const int ACCOUNT_NUMBER_NOT_NULL = 4; - public const int EDITION_ID_NOT_NULL = 5; - public const int ACCOUNT_NUMBER_NOT_EXIST = 1; - public const int EDITION_NOT_EXIST = 3; - public const int MASTER_SITEIP_NOT_EXIST = 2; - public const int LICENSE_INACTIVE = 6; - - - /// - /// constructor - /// - private ErrorHelper() - { - objHash.Add(E_NO_ERROR, "No Error."); - objHash.Add(E_USER_NOT_EXIST, "Invalid User ID."); - objHash.Add(E_PASSWORD_NOT_MATCH, "Invalid Password. User ID and password will be disabled if your password is entered incorrectly for five consecutive attempts. If you have forgotten your password, please click on the forgot password link. "); - objHash.Add(E_USER_ID_BLOCKED_24_HRS, "User Id is blocked."); - objHash.Add(E_USER_NOT_ACTIVE, "User Id is Inactive."); - objHash.Add(E_USER_ID_WILL_BLOCKED, "Invalid Password. Your login will be blocked for a day if you enter wrong password one more time. Click on forgot password link if you have forgotten your password. "); - objHash.Add(E_EMAIL_ID_NOT_EXIT, "Invalid e-mail ID. If you do not know your correct e-mail ID please contact A.D.A.M. technical support at techsupport@adamcorp.com or your institution's site administrator. "); - objHash.Add(E_LICENCE_IS_INACTIVE, "Your Licence Is inactive."); - objHash.Add(E_USER_NOT_MAP_TO_LICENCE_EDITION, "User is not mapped with licence edition."); - objHash.Add(E_NO_ROW_FOUND_LICENCE_TO_EDITION_TABLE, "No row found in Licence to edition table."); - objHash.Add(E_NO_ROW_FOUND_LICENCE_TABLE, "No row found in Licence table."); - objHash.Add(E_SECURITY_QUEST_NOT_MATCH, "Your security question is incorrect. "); - objHash.Add(E_SEQURITY_ANSWER_NOT_MATCH, "Your answer is incorrect. "); - objHash.Add(E_FORGOT_USER_ID_EMAIL_ID_NOT_EXIT, "Invalid e-mail ID. If you do not know your correct e-mail ID please contact A.D.A.M. technical support at {0} or your institution's site administrator. "); - //objHash.Add(E_TOTAL_NUMBER_LOGIN_EXCEED, "User ID and password has been accessed by another user. Your session is currently timed out."); - objHash.Add(E_TOTAL_NUMBER_LOGIN_EXCEED, "Currently all licenses are in use. Any account that improperly logged out should automatically reset within 5 minutes."); - objHash.Add(E_FORGOT_PASSWORD_EMAIL_ID_NOT_EXIST, "Invalid e-mail ID. Please be sure to enter the e-mail ID used when you registered your license. "); - objHash.Add(E_TEST_SETUP_ACCOUNT_USER_NAME_EXIST, "User Name already exist in system."); - objHash.Add(E_TEST_SETUP_ACCOUNT_EMAILID_EXIST, "Email Id already exist system."); - objHash.Add(E_SP_ERROR, "Error occured in store procedure."); - objHash.Add(E_ACCOUNT_NUMBER_NOT_EXIST, "Account Number does not exist in the system. "); - objHash.Add(E_ACCOUNT_NUMBER_ALREADY_EXIST, "Account Number already exist in the system."); - objHash.Add(E_TEST_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT, "Test account has been created. Account number is: {0}. Mail could not be sent due to some mail server error. "); - objHash.Add(E_MAIL_COULD_NOT_SENT, "Mail could not sent due to some mail server error."); - objHash.Add(E_RESELLER_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT, "Licenses Have been created. Mail could not be sent due to some mail server error. "); - objHash.Add(E_LICENSE_TERM_CONDITION, "Your license is not enabled yet. Please contact your administrator to accept the term & condition."); - objHash.Add(E_EDITION_NOT_LINKED_WITH_SITE, "Your credentials are invalid. Please contact the site administrator of your institution or contact A.D.A.M. technical support at techsupport@adamcorp.com. "); - objHash.Add(E_LOGIN_SESSION_EXPIRE, "Your session has expired. Please log in."); - objHash.Add(E_DISCOUNT_CODE_NOT_EXIST, "Discount code not exist in the system."); - objHash.Add(E_DISCOUNT_CODE_ALREADY_EXIST, "Discount code already exist in the system."); - objHash.Add(E_SITE_IP_NOT_NULL, "SiteIP cannot be null."); - objHash.Add(E_DATA_BASE_CONNECTION, "Could not connect to Database."); - objHash.Add(E_EDITION_ID_NOT_NULL, "Edition Id cannot be zero."); - objHash.Add(E_MASTER_SITEIP_NOT_EXIST, "Master Site IP does not exist in the system."); - objHash.Add(EDITION_ID_NOT_EXIST, "Edition ID does not exist in the system."); - objHash.Add(E_ERROR_LOG, "Problem in database."); - objHash.Add(E_MASTER_SITE_ALREADY_EXIST, "Account already created from this URL."); - objHash.Add(E_ACCOUNT_NUMBER_NOT_NULL, "Account number cannot be null."); - objHash.Add(E_SITE_IP_ALREADY_EXIST, "Site IP already exist."); - objHash.Add(E_LICENCE_IS_EXPIRED, "Your licence is expired since {licenseExpirationDate}."); - objHash.Add(E_SINGLEACCOUNT_IS_BEING_USED, "This account is currently locked due to improper logout or another active browser session. The account should automatically reset within 5 minutes."); - } - /// - /// This method checks if instance of ErrorHelper class is exist then it returns - /// the exist instance else it creates the ErrorHelper class instance and return it. - /// - /// ErrorHelper instance - public static ErrorHelper GetInstance() - { - if (_instance == null) - { - _instance = new ErrorHelper(); - } - return _instance; - } - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/AdminAccessController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/AdminAccessController.cs deleted file mode 100644 index e571377..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/AdminAccessController.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Web.Http; -using AIAHTML5.API.Constants; -using log4net; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using AIAHTML5.API.Models; -using AIAHTML5.API.Utility; - -namespace AIAHTML5.API.Controllers -{ - public class AdminAccessController : ApiController - { - public HttpResponseMessage Post([FromBody]JObject userInfo) - { - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); - - bool isMailSent = AIAHTML5.API.Models.UserUtility.SendAdminRequestEmail(userInfo); - - if (isMailSent) - { - logger.Debug("AdminAccessRequest mail sent for User: " + userInfo["firstName"] + " " + userInfo["lastName"] + "& mail id = " + userInfo["emailId"]); - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MAIL_SENT) }; - } - else - { - logger.Debug("AdminAccessRequest mail sent for User: " + userInfo["firstName"] + " " + userInfo["lastName"] + "& mail id = " + userInfo["emailId"]); - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MAIL_NOT_SENT) }; - } - } - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs deleted file mode 100644 index 01f66f5..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs +++ /dev/null @@ -1,284 +0,0 @@ -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Web.Http; -using log4net; -using AIAHTML5.API.Constants; -using AIAHTML5.API.Models; -using System.Collections; - -using System.Data.SqlClient;namespace AIAHTML5.API.Controllers -{ - public class AuthenticateController : ApiController - { - // GET api/authenticate - public IEnumerable Get() - { - return new string[] { "value1", "value2" }; - } - - // GET api/authenticate/5 - public string Get(int id) - { - return "value"; - } - - // POST api/authenticate - public HttpResponseMessage Post([FromBody]JObject credentials) - { - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); - logger.Debug("inside POST"); - - dynamic authenticationRepsonse; - DateTime blockTime; - bool isUserBlocked; - - try - { - - //01.get the user detail to autheticate the user - User userInfo = AIAHTML5.API.Models.Users.getUserDetails(credentials); - - if (userInfo != null) - { - // 02 Check user is authenticated or not by login credential match - bool isUserAuthenticated = AIAHTML5.API.Models.Users.checkUserAuthenticity(credentials, userInfo); - - if (isUserAuthenticated) - { - if (userInfo.IsActive) - { - //03. check if user is blocked - isUserBlocked = AIAHTML5.API.Models.Users.checkUserBlockStatus(userInfo.Id, out blockTime); - - if (!isUserBlocked) - { - //04.delete past wrong login attempts of user - int wrongAttemptDeteledCount = AIAHTML5.API.Models.Users.deletePastWrongAttempts(userInfo.Id); - if (wrongAttemptDeteledCount < 0) - { - logger.Fatal("Unable to delete past wrong login attempts for userId= " + userInfo.Id); - } - //05. - GetModulesBasedOnUserType(userInfo); - - // authenticationRepsonse = JsonConvert.SerializeObject(userInfo); - } - - else - { - - //compare block time of user with current time if user is blocked - DateTime blockDuration = blockTime.AddDays(1); - var difference = DateTime.Compare(DateTime.Now, blockDuration); - - //check if credentials are valid credentials - //bool isCorrectLoginId, isCorrectPassword; - //AIAHTML5.API.Models.Users.isCredentialCorrect(credentials, userInfo, out isCorrectLoginId, out isCorrectPassword); - - if (difference >= 0) - { - //means 24 hours block time is finished - userInfo.IsBlocked = false; - - int wrongAttemptDeteledCount = AIAHTML5.API.Models.Users.deletePastWrongAttempts(userInfo.Id); - if (wrongAttemptDeteledCount < 0) - { - logger.Fatal("Unable to delete past wrong login attempts for userId= " + userInfo.Id); - } - - //05. Now get the module list- for ADMIN (superadmin/ general admin) by default all module loads - GetModulesBasedOnUserType(userInfo); - - } - else - { - userInfo.LoginFailureCauseId = ErrorHelper.E_USER_ID_BLOCKED_24_HRS; - } - } - } - else - { - //CODE REVIW: validate that is this tarnslated by UI because we need to show message to user if he is inactive - userInfo.LoginFailureCauseId = ErrorHelper.E_USER_NOT_ACTIVE; - - //05.4 check the License expiration irespective of either user is active - //or not because on AIA, we shows the License expiration message - //for inactive users too - - CheckLicenseStatus(userInfo); - - } - } - - else - { - //this come in picture when user input wrong passowrd - - //get wrong attempt count of user - int previousIncorrectLoginAttempts = AIAHTML5.API.Models.Users.checkNoOfWrongAttempts(userInfo.Id); - userInfo.IncorrectLoginAttemptCount = previousIncorrectLoginAttempts + 1; - userInfo.LoginFailureCauseId = ErrorHelper.E_PASSWORD_NOT_MATCH; - - //01. insert wrong attempt in dtabase - int updateCount = AIAHTML5.API.Models.Users.saveWrongAttemptOfUser(userInfo.Id, previousIncorrectLoginAttempts); - - if (updateCount < 0) - { - - logger.Fatal("Unable to Update past wrong login attempts for userId= " + userInfo.Id); - } - //else - //{ - if (userInfo.IncorrectLoginAttemptCount > 4) - { - userInfo.IsBlocked = true; - userInfo.LoginFailureCauseId = ErrorHelper.E_USER_ID_BLOCKED_24_HRS; - } - - - } - - authenticationRepsonse = JsonConvert.SerializeObject(userInfo); - - } - - else - { - authenticationRepsonse = AIAConstants.USER_NOT_FOUND; - } - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(authenticationRepsonse) }; - } - catch(SqlException e){ - - logger.Fatal("SqlException occured for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace); - - ArrayList supportMailList = UserUtility.GetSupportMailList(); - string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT; - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace; - UserUtility.SendEmail(credentials, supportMailList, "", mailSubject, mailBody); - - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) }; - } - catch (Exception e) - { - - logger.Fatal("Exception occured for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace); - - ArrayList supportMailList = UserUtility.GetSupportMailList(); - string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT; - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace; - UserUtility.SendEmail(credentials, supportMailList, "", mailSubject, mailBody); - - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) }; - - } - - } - - private static void GetModulesBasedOnUserType(User userInfo) - { - //based on old .net code(AIA flex), we get modules based on licenseId if licenseid>0. - //we verified in database that only superadmin has no licenseid so getting all modules for supeadmin - int licenseId, editionId; - AIAHTML5.API.Models.Users.getLicenseIdForThisUser(userInfo.Id, out licenseId, out editionId); - - userInfo.LicenseId = licenseId; - userInfo.EditionId = editionId; - - //if (userInfo.UserType == AIAHTML5.API.Models.User.SUPER_ADMIN) - if(userInfo.LicenseId == 0) - { - userInfo.Modules = AIAHTML5.API.Models.Users.getAllModulesList(); - - //Insert user login detail - AIAHTML5.API.Models.Users.insertLoginDetails(userInfo.Id); - } - else - { - CheckLicenseStatus(userInfo); - - if(!userInfo.IsSubscriptionExpired){ - GetModulesBasedOnLicense(userInfo,false); - } - } - } - - private static void CheckLicenseStatus(User userInfo) - { - //05.1 For normal user need to get the license details, get the license id for authenticated user - //int licenseId, editionId; - //AIAHTML5.API.Models.Users.getLicenseIdForThisUser(userInfo.Id, out licenseId, out editionId); - - //userInfo.LicenseId = licenseId; - //userInfo.EditionId = editionId; - - //05.2 get license details - userInfo.LicenseInfo = AIAHTML5.API.Models.Users.getLicenseDetails(userInfo.LicenseId); - - if (userInfo.LicenseInfo != null) - { - //05.3 get licenseSubscription details - userInfo.LicenseSubscriptions = AIAHTML5.API.Models.Users.getLicenseSubscriptionDetails(userInfo.LicenseId); - - //05.4 check the License expiration irespective of either user is active or not because on AIA - //we shows the License expiration message for inactive users too - string expirationDate = null; - bool isLicenseExpired = false; - - if (userInfo.LicenseSubscriptions != null) - { - isLicenseExpired = AIAHTML5.API.Models.Users.checkIfLicenseExpired(userInfo.LicenseSubscriptions, out expirationDate); - } - - if (isLicenseExpired) - { - userInfo.IsSubscriptionExpired = isLicenseExpired; - userInfo.SubscriptionExpirationDate = expirationDate; - } - } - - else - { - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); - logger.Debug("userInfo.LicenseInfo is null for userInfo.LicenseId= "+userInfo.LicenseId); - } - } - - private static void GetModulesBasedOnLicense(User userInfo, bool isLicenseExpired) - { - - //05.6.1 - if (userInfo.LicenseInfo.IsActive) - { - if (!userInfo.LicenseInfo.IsTermAccepted) - { - ArrayList termsList = AIAHTML5.API.Models.Users.getTermsAndConditions(); - foreach (Hashtable item in termsList) - { - userInfo.TermsAndConditionsTitle = item[AIAConstants.KEY_TITLE].ToString(); - userInfo.TermsAndConditionsText = item[AIAConstants.KEY_CONTENT].ToString(); - } - } - else - { - userInfo.Modules = AIAHTML5.API.Models.Users.getModuleListByLicenseId(userInfo.LicenseId); - - //Insert user login detail - AIAHTML5.API.Models.Users.insertLoginDetails(userInfo.Id); - } - } - else - { - userInfo.LoginFailureCauseId = ErrorHelper.E_LICENCE_IS_INACTIVE; - - } - } - - - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/ForgotUserController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/ForgotUserController.cs deleted file mode 100644 index 1f7075d..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/ForgotUserController.cs +++ /dev/null @@ -1,106 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Web.Http; -using AIAHTML5.API.Constants; -using log4net; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using AIAHTML5.API.Models; -using AIAHTML5.API.Utility; -using System.Collections; -using System.Data.SqlClient; - -namespace AIAHTML5.API.Controllers -{ - public class ForgotUserController : ApiController - { - // GET api/ - public IEnumerable Get() - { - return new string[] { "value1", "value2" }; - } - - // GET api//5 - public string Get(int id) - { - return "value"; - } - - public HttpResponseMessage Post([FromBody]JObject userInfo) - { - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); - logger.Debug("inside POST in ForgotUserController for emailId = " + userInfo["emailId"]); - try - { - dynamic userData = AIAHTML5.API.Models.Users.GetUserByEmail(userInfo); - - if (Convert.ToString(userData) != AIAConstants.USER_NOT_FOUND) - { - //logger.Debug("inside if in ForgotUserController userData.loginId= " + userData.LoginId); - bool isMailSent = false; - - logger.Debug("1. inside if in ForgotUserController userDetails= " + userData.ToString()); - - if (Convert.ToBoolean(userInfo["isMailForForgotPassword"])) - { - if (Convert.ToBoolean(userInfo["unblockUser"])) - { - logger.Debug("2. unblockUser= " + Convert.ToBoolean(userInfo["unblockUser"])); - isMailSent = AIAHTML5.API.Models.UserUtility.SendEmail(userData, Convert.ToBoolean(userInfo["isMailForForgotPassword"]), Convert.ToBoolean(userInfo["unblockUser"])); - } - else - { - logger.Debug("2. isMailForForgotPassword= " + Convert.ToBoolean(userInfo["isMailForForgotPassword"])); - isMailSent = AIAHTML5.API.Models.UserUtility.SendEmail(userData, Convert.ToBoolean(userInfo["isMailForForgotPassword"])); - } - - } - else - { - logger.Debug("3. isMailForForgotPassword= " + Convert.ToBoolean(userInfo["isMailForForgotPassword"])); - - isMailSent = AIAHTML5.API.Models.UserUtility.SendEmail(userData, Convert.ToBoolean(userInfo["isMailForForgotPassword"])); - } - logger.Debug("isMailSent= " + isMailSent); - if (isMailSent) - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MAIL_SENT) }; - else - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MAIL_NOT_SENT) }; - } - else - { - logger.Debug("inside else in ForgotUserController userData= " + userData); - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.USER_NOT_FOUND) }; - } - } - catch (SqlException e) - { - - logger.Fatal("SqlException occured for emailId =" + userInfo["emailId"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace); - - ArrayList supportMailList = UserUtility.GetSupportMailList(); - string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT; - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace; - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody); - - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) }; - } - catch (Exception e) - { - logger.Fatal("Exception occured for emailId =" + userInfo["emailId"].ToString()+ "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace); - - ArrayList supportMailList = UserUtility.GetSupportMailList(); - string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT; - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace; - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody); - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) }; - - } - } - - - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/LicenseTermConditionController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/LicenseTermConditionController.cs deleted file mode 100644 index 809c870..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/LicenseTermConditionController.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Web.Http; -using log4net; -using AIAHTML5.API.Constants; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using AIAHTML5.API.Models; -using System.Collections; -using System.Data.SqlClient; - -namespace AIAHTML5.API.Controllers -{ - public class LicenseTermConditionController : ApiController - { - // GET api/licensetermcondition - public IEnumerable Get() - { - return new string[] { "value1", "value2" }; - } - - // GET api/licensetermcondition/5 - public string Get(int id) - { - return "value"; - } - - // POST api/licensetermcondition - public HttpResponseMessage Post([FromBody]JObject userLicenseInfo) - { - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); - logger.Debug("inside POST"); - HttpResponseMessage response = null; - Newtonsoft.Json.Linq.JObject userInfo = new Newtonsoft.Json.Linq.JObject(); - userInfo.Add("accountNumber", userLicenseInfo["licenseeAccountNumber"]); - - try - { - int licenseId = Convert.ToInt32(userLicenseInfo["userLicenseId"]); - User user = new User(); - dynamic userModules = null; // assigned to avoid unassigned local variable compilation error; - - dynamic result = AIAHTML5.API.Models.Users.UpdateLicenseTerm(userLicenseInfo); - - if (Convert.ToInt32(result) > 0) - { - user.Modules = Users.getModuleListByLicenseId(licenseId); - userModules = JsonConvert.SerializeObject(user); - - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(userModules) }; - } - else - { - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.LICENSE_TERM_CONDITION_UPDATE_FAILED) }; - } - - return response; - } - catch (SqlException e) - { - - logger.Fatal("SqlException occured for licenseeAccountNumber =" + userLicenseInfo["licenseeAccountNumber"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace); - - ArrayList supportMailList = UserUtility.GetSupportMailList(); - string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT; - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace; - UserUtility.SendEmail(userLicenseInfo, supportMailList, "", mailSubject, mailBody); - - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) }; - } - catch (Exception ex) - { - logger.Fatal("Exception in UpdateLicenseTerm for AccountNumber =" + userLicenseInfo["licenseeAccountNumber"] + " Exception= " + ex.Message + ", STACKTRACE: " + ex.StackTrace); - - ArrayList supportMailList = UserUtility.GetSupportMailList(); - string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT; - string mailBody = "MESSAGE: " + ex.Message + ", STACKTRACE: " + ex.StackTrace; - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody); - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) }; - return response; - } - - } - - - // PUT api/licensetermcondition/5 - public void Put(int id, [FromBody]string value) - { - } - - // DELETE api/licensetermcondition/5 - public void Delete(int id) - { - } - } -} diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs deleted file mode 100644 index 5954563..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs +++ /dev/null @@ -1,41 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Web.Http; -using AIAHTML5.API.Models; - -namespace AIAHTML5.API.Controllers -{ - public class PixelLocationsController : ApiController - { - // GET: api/PixelLocations - public IEnumerable Get() - { - return new string[] { "value1", "value2" }; - } - - // GET: api/PixelLocations/5 - public HttpResponseMessage Get(string layerNumber, string bodyViewIndex, string systemNumber, string zoomLevel) - { - dynamic bodyRegions = PixelLocator.GetBodyRegionsPixelData(layerNumber, bodyViewIndex, systemNumber, zoomLevel); - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(bodyRegions) }; - } - - // POST: api/PixelLocations - public void Post([FromBody]string value) - { - } - - // PUT: api/PixelLocations/5 - public void Put(int id, [FromBody]string value) - { - } - - // DELETE: api/PixelLocations/5 - public void Delete(int id) - { - } - } -} diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/ResetPasswordController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/ResetPasswordController.cs deleted file mode 100644 index 84d86c2..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/ResetPasswordController.cs +++ /dev/null @@ -1,100 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Web.Http; -using AIAHTML5.API.Constants; -using log4net; -using Newtonsoft.Json; -using Newtonsoft.Json.Linq; -using AIAHTML5.API.Models; -using AIAHTML5.API.Utility; -using System.Collections; -using System.Data.SqlClient; - -namespace AIAHTML5.API.Controllers -{ - public class ResetPasswordController : ApiController - { - // GET api/ - public IEnumerable Get() - { - return new string[] { "value1", "value2" }; - } - - // GET api//5 - public string Get(int id) - { - return "value"; - } - - // POST api/ - //public void Post([FromBody]string value) - //{ - //} - public HttpResponseMessage Post([FromBody]JObject userInfo) - { - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); - logger.Debug("inside POST"); - HttpResponseMessage response = null; - try - { - dynamic userData = AIAHTML5.API.Models.Users.GetUserByEmail(userInfo); - - if (Convert.ToString(userData) != AIAConstants.USER_NOT_FOUND) - { - int result = 0; - if (!String.IsNullOrEmpty(userInfo["newPassword"].ToString())) - { - result = AIAHTML5.API.Models.Users.UpdatePassword(userInfo, userData.LoginId, userData.EmailId); - if (result > 0) - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.PASSWORD_UPDATE_SUCCESS) }; - else - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.PASSWORD_UPDATE_FAILED) }; - } - } - else - { - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.USER_NOT_FOUND) }; - } - return response; - } - catch (SqlException e) - { - - logger.Fatal("SqlException occured for loginId =" + userInfo["emailId"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace); - - ArrayList supportMailList = UserUtility.GetSupportMailList(); - string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT; - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace; - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody); - - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) }; - } - catch (Exception e) - { - logger.Fatal("Exception occured for loginId =" + userInfo["emailId"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace); - - ArrayList supportMailList = UserUtility.GetSupportMailList(); - string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT; - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace; - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody); - response = new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) }; - return response; - } - - - } - - // PUT api//5 - public void Put(int id, [FromBody]string value) - { - } - - // DELETE api//5 - public void Delete(int id) - { - } - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Controllers/UnblockUserController.cs b/400-SOURCECODE/AIAHTML5.API/Controllers/UnblockUserController.cs deleted file mode 100644 index 57f7164..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Controllers/UnblockUserController.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Net; -using System.Net.Http; -using System.Web.Http; -using AIAHTML5.API.Constants; -using AIAHTML5.API.Models; -using AIAHTML5.API.Utility; -using log4net; -using System.Collections; -using System.Data.SqlClient; - -namespace AIAHTML5.API.Controllers -{ - public class UnblockUserController : ApiController - { - // GET api/unblockuser - public IEnumerable Get() - { - return new string[] { "value1", "value2" }; - } - - // GET api/unblockuser/5 - public string Get(int id) - { - return "value"; - } - - // POST api/unblockuser - public HttpResponseMessage Post([FromBody]string emailId) - { - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); - logger.Debug("inside POST in UnblockUserController for emailId = " + emailId); - - HttpResponseMessage response = null; - Newtonsoft.Json.Linq.JObject userInfo = new Newtonsoft.Json.Linq.JObject(); - userInfo.Add("emailId", emailId); - - try - { - User user = AIAHTML5.API.Models.DBModel.GetUserDetailsByEmailId(emailId); - - if (user!=null) - { - int result = 0; - - logger.Debug("1. inside if in UnblockUserController userDetails= " + user.ToString()); - - result = AIAHTML5.API.Models.DBModel.UnblockUser(user.Id); - - if (result > 0) - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.USER_UNBLOCK_SUCCESS) }; - else - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.UNABLE_TO_UNBLOCK) }; - } - return response; - } - catch (SqlException e) - { - - logger.Fatal("SqlException occured for emailId =" + emailId + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace); - - ArrayList supportMailList = UserUtility.GetSupportMailList(); - string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT; - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace; - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody); - - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) }; - } - catch (Exception e) - { - - logger.Fatal("Exception occured for emailId =" + emailId + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace); - - ArrayList supportMailList = UserUtility.GetSupportMailList(); - string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT; - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace; - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody); - response = new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) }; - return response; - } - - } - - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs b/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs deleted file mode 100644 index 96df1b4..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs +++ /dev/null @@ -1,865 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using AIAHTML5.API.Properties; -using AIAHTML5.API.Constants; -using log4net; -using System.Data; -using System.Data.SqlClient; -using Newtonsoft.Json; -using System.Collections; - -namespace AIAHTML5.API.Models -{ - public class DBModel - { - static string dbConnectionString = System.Configuration.ConfigurationManager.AppSettings["AIADatabaseV5Context"]; - - - private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - - - public DBModel() { } - - - protected static DataSet GetDataFromStoredProcedure(string commandText) - { - - logger.Debug(" Inside GetSQLData for command text = " + commandText); - DataSet ds = null; - SqlConnection conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(commandText, conn); - cmd.CommandType = CommandType.StoredProcedure; - SqlDataAdapter da = new SqlDataAdapter(); - da.SelectCommand = cmd; - ds = new DataSet(); - da.Fill(ds); - - return ds; - } - - internal ArrayList GetAllModules() - { - logger.Debug(" Inside GetAllModules"); - - ArrayList arrUserModules = new ArrayList(); - - Hashtable userModuleHash = new Hashtable(); - - string sp = DBConstants.GET_ALL_MODULES; - - DataSet ds = DBModel.GetDataFromStoredProcedure(sp); - - if (ds != null && ds.Tables.Count > 0) - { - DataTable dt = ds.Tables[0]; - - foreach (DataRow drModule in dt.Rows) - { - userModuleHash = new Hashtable(); - userModuleHash.Add(AIAConstants.KEY_ID, drModule["Id"]); - userModuleHash.Add(AIAConstants.KEY_NAME, drModule["Name"]); - userModuleHash.Add(AIAConstants.KEY_SLUG, drModule["Slug"]); - arrUserModules.Add(userModuleHash); - } - } - - return arrUserModules; - } - - internal static User GetUserDetailsByLoginId(string loginId) - { - logger.Debug(" Inside GetUserDetailsByLoginId for LoginId = " + loginId); - - User objUser = null; - DBModel objModel = new DBModel(); - - - SqlConnection conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - SqlDataAdapter da = new SqlDataAdapter(); - SqlParameter param; - DataSet ds = new DataSet(); - - cmd.Connection = conn; - cmd.CommandText = DBConstants.GET_USER_DELAILS_BY_LOGIN_ID; - cmd.CommandType = CommandType.StoredProcedure; - - param = new SqlParameter("@sLoginId", loginId); - param.Direction = ParameterDirection.Input; - param.DbType = DbType.String; - cmd.Parameters.Add(param); - - da.SelectCommand = cmd; - DataTable dt = new DataTable(); - da.Fill(dt); - - - if (dt != null && dt.Rows.Count > 0) - { - foreach (DataRow dr in dt.Rows) - { - int tempVal; - DateTime date; - objUser = new User(); - - objUser.Id = Convert.ToInt32(dr["Id"]); - objUser.FirstName = dr["FirstName"].ToString(); - objUser.LastName = dr["LastName"].ToString(); - objUser.EmailId = dr["EmailId"].ToString(); - objUser.LoginId = dr["LoginId"].ToString(); - objUser.Password = dr["Password"].ToString(); - objUser.SecurityQuestionId = Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null; - objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ; - objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null; - objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]); - objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null; - objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null; - objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null; - objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]); - objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"])); - objUser.IsActive = Convert.ToBoolean(dr["IsActive"]); - } - } - - - return objUser; - } - - internal Hashtable GetLicenseDetailByUserId(int userId) - { - logger.Debug(" Inside GetUserLicenseDetailByUserId for UserId = " + userId); - - Hashtable hash = new Hashtable(); - - SqlConnection conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - SqlDataAdapter adapter; - SqlParameter param; - DataSet ds = new DataSet(); - - cmd.Connection = conn; - cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_USER_ID; - cmd.CommandType = CommandType.StoredProcedure; - - param = new SqlParameter("@iUserId", userId); - param.Direction = ParameterDirection.Input; - param.DbType = DbType.Int32; - cmd.Parameters.Add(param); - - adapter = new SqlDataAdapter(cmd); - adapter.Fill(ds); - - if (ds != null && ds.Tables.Count > 0) - { - if (ds.Tables[0].Rows.Count > 0) - { - hash.Add(AIAConstants.LICENSE_KEY_ID, ds.Tables[0].Rows[0][0]); - hash.Add(AIAConstants.EDITION_KEY_ID, ds.Tables[0].Rows[0][1]); - } - } - - return hash; - } - - internal ArrayList GetUserModulesByLicenseId(int licenseId) - { - logger.Debug(" Inside GetUserModulesByLicenseId for LicenseId = " + licenseId); - - ArrayList userModulelist = new ArrayList(); - - Hashtable modulesHash; - DataSet ds = new DataSet(); - - SqlConnection conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - SqlDataAdapter adapter; - SqlParameter param; - - cmd.Connection = conn; - cmd.CommandText = DBConstants.GET_USER_MODULES_BY_LICENSE_ID; - cmd.CommandType = CommandType.StoredProcedure; - - param = new SqlParameter("@iLicenseId", licenseId); - param.Direction = ParameterDirection.Input; - param.DbType = DbType.Int32; - cmd.Parameters.Add(param); - - adapter = new SqlDataAdapter(cmd); - adapter.Fill(ds); - - - if (ds != null && ds.Tables.Count > 0) - { - DataTable dt = ds.Tables[0]; - - if (dt.Rows.Count > 0) - { - foreach (DataRow dr in dt.Rows) - { - modulesHash = new Hashtable(); - modulesHash.Add(AIAConstants.KEY_ID, dr["Id"]); - modulesHash.Add(AIAConstants.KEY_NAME, dr["Title"]); - modulesHash.Add(AIAConstants.KEY_SLUG, dr["Slug"]); - userModulelist.Add(modulesHash); - } - } - } - - - return userModulelist; - } - - protected string GetUserTypeStringById(int userTypeId) - { - string userType = string.Empty; - - switch (userTypeId) - { - case (int)UserType.SUPER_ADMIN: - userType = User.SUPER_ADMIN; - break; - case (int)UserType.GENERAL_ADMIN: - userType = User.GENERAL_ADMIN; - break; - case (int)UserType.DISTRICT_ADMIN: - userType = User.DISTRICT_ADMIN; - break; - case (int)UserType.CLIENT_ADMIN: - userType = User.CLIENT_ADMIN; - break; - case (int)UserType.SINGLE_USER: - userType = User.SINGLE_USER; - break; - case (int)UserType.CONCURRENT_USER: - userType = User.CONCURRENT_USER; - break; - case (int)UserType.RESELLER: - userType = User.RESELLER; - break; - case (int)UserType.TEST_ACCOUNT: - userType = User.TEST_ACCOUNT; - break; - case (int)UserType.SITE_USER: - userType = User.SITE_USER; - break; - } - return userType; - } - - internal static User GetUserDetailsByEmailId(string emailId) - { - logger.Debug(" Inside GetUserDetailsByEmailId for emailId = " + emailId); - - User objUser = null; - DBModel objModel = new DBModel(); - - SqlConnection conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - SqlDataAdapter adapter; - SqlParameter param; - DataSet ds = new DataSet(); - - cmd.Connection = conn; - cmd.CommandText = DBConstants.GET_USER_DETAILS_BY_EMAILID; - cmd.CommandType = CommandType.StoredProcedure; - - param = new SqlParameter("@sEmailId", emailId); - param.Direction = ParameterDirection.Input; - param.DbType = DbType.String; - cmd.Parameters.Add(param); - - adapter = new SqlDataAdapter(cmd); - adapter.Fill(ds); - - - if (ds != null && ds.Tables.Count > 0) - { - DataTable dt = ds.Tables[0]; - - if (dt.Rows.Count > 0) - { - foreach (DataRow dr in dt.Rows) - { - int tempVal; - DateTime date; - objUser = new User(); - - objUser.Id = Convert.ToInt32(dr["Id"]); - objUser.FirstName = dr["FirstName"].ToString(); - objUser.LastName = dr["LastName"].ToString(); - objUser.EmailId = dr["EmailId"].ToString(); - objUser.LoginId = dr["LoginId"].ToString(); - objUser.Password = dr["Password"].ToString(); - objUser.SecurityQuestionId = Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null; - objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ; - objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null; - objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]); - objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null; - objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null; - objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null; - objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]); - objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"])); - objUser.IsActive = Convert.ToBoolean(dr["IsActive"]); - } - } - } - - return objUser; - } - - internal static int UpdateUserPassword(dynamic userInfo, string loginId, string emailId) - { - logger.Debug(" Inside UpdateUserPassword for LoginId: " + loginId + ", EmailId: " + emailId); - - int result = 0; - - SqlConnection conn = null; - try - { - conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - conn.Open(); - cmd.Connection = conn; - cmd.CommandText = DBConstants.UPDATE_USER_PASSWORD; - cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@sLoginId", loginId); - cmd.Parameters.AddWithValue("@sEmailId", emailId); - cmd.Parameters.AddWithValue("@sNewPassword", userInfo["newPassword"].ToString()); - result = cmd.ExecuteNonQuery(); - - } - catch (SqlException ex) - { - conn.Close(); - logger.Fatal("Exception in UpdateUserPassword for LoginId: " + loginId + ", EmailId: " + emailId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace); - throw; - } - finally - { - conn.Dispose(); - } - return result; - } - - internal LicenseSubscriptionDetails GetLicenseSubscriptionDetailsByLicenseId(int licenseId) - { - logger.Debug(" Inside GetLicenseSubscriptionDetailsByLicenseId for LicenseId = " + licenseId); - - LicenseSubscriptionDetails licenseSubscriptionDetails = null; - - SqlConnection conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - SqlDataAdapter adapter; - SqlParameter param; - DataSet ds = new DataSet(); - - cmd.Connection = conn; - cmd.CommandText = DBConstants.GET_SUBSCRIPTION_DETAILS_BY_LICENSE_ID; - cmd.CommandType = CommandType.StoredProcedure; - - param = new SqlParameter("@iLicenseId", licenseId); - param.Direction = ParameterDirection.Input; - param.DbType = DbType.Int32; - cmd.Parameters.Add(param); - - adapter = new SqlDataAdapter(cmd); - adapter.Fill(ds); - - if (ds != null && ds.Tables.Count > 0) - { - licenseSubscriptionDetails = new LicenseSubscriptionDetails(); - DataTable dt = ds.Tables[0]; - - if (dt.Rows.Count > 0) - { - foreach (DataRow dr in dt.Rows) - { - int tempVal; - DateTime date; - licenseSubscriptionDetails.Id = Convert.ToInt32(dr["Id"]); - licenseSubscriptionDetails.LicenseId = Convert.ToInt32(dr["LicenseId"]); - licenseSubscriptionDetails.SubscriptionPlanId = Int32.TryParse(dr["SubscriptionPlanId"].ToString(), out tempVal) ? tempVal : (int?)null; - licenseSubscriptionDetails.SubscriptionValidFrom = DateTime.TryParse(dr["SubscriptionValidFrom"].ToString(), out date) ? date : (DateTime?)null; - licenseSubscriptionDetails.SubscriptionValidThrough = DateTime.TryParse(dr["SubscriptionValidThrough"].ToString(), out date) ? date : (DateTime?)null; - licenseSubscriptionDetails.RenewalDate = DateTime.TryParse(dr["RenewalDate"].ToString(), out date) ? date : (DateTime?)null; - licenseSubscriptionDetails.PaymentMode = dr["PaymentMode"].ToString(); - licenseSubscriptionDetails.TotalAmount = Convert.ToDouble(dr["TotalAmount"]); - licenseSubscriptionDetails.AmountPaid = Convert.ToDouble(dr["AmountPaid"]); - licenseSubscriptionDetails.AmountPending = Convert.ToDouble(dr["AmountPending"]); - licenseSubscriptionDetails.NoOfImages = Convert.ToInt32(dr["NoofImages"]); - } - } - } - - - - return licenseSubscriptionDetails; - } - - internal License GetLicenseDetailsByLicenseId(int licenseId) - { - logger.Debug(" inside GetLicenseDetailsByLicenseId for LicenseId = " + licenseId); - - License license = null; - - SqlConnection conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - SqlDataAdapter adapter; - SqlParameter param; - DataSet ds = new DataSet(); - - cmd.Connection = conn; - cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_ID; - cmd.CommandType = CommandType.StoredProcedure; - - param = new SqlParameter("@Id", licenseId); - param.Direction = ParameterDirection.Input; - param.DbType = DbType.Int32; - cmd.Parameters.Add(param); - - adapter = new SqlDataAdapter(cmd); - adapter.Fill(ds); - - if (ds != null && ds.Tables.Count > 0) - { - - DataTable dt = ds.Tables[0]; - if (dt.Rows.Count > 0) - { - license = new License(); - - foreach (DataRow dr in dt.Rows) - { - DateTime date; - license.Id = Convert.ToInt32(dr["Id"]); - license.AccountNumber = dr["AccountNumber"].ToString(); - license.LicenseeFirstName = dr["LicenseeFirstName"].ToString(); - license.LicenseeLastName = dr["LicenseeLastName"].ToString(); - license.LicenseTypeId = Convert.ToInt32(dr["LicenseTypeId"]); - license.InstitutionName = dr["InstitutionName"].ToString(); - license.Address1 = dr["Address1"].ToString(); - license.Address2 = dr["Address2"].ToString(); - license.CountryId = Convert.ToInt32(dr["CountryId"]); - license.StateId = Convert.ToInt32(dr["StateId"]); - license.City = dr["City"].ToString(); - license.Zip = dr["Zip"].ToString(); - license.Phone = dr["Phone"].ToString(); - license.EmailId = dr["EmailId"].ToString(); - license.TotalLogins = Convert.ToInt32(dr["TotalLogins"]); - license.AccountTypeId = Convert.ToInt32(dr["AccountTypeId"]); - license.IsActive = Convert.ToBoolean(dr["IsActive"]); - license.IsDistrictSiteLicense = Convert.ToBoolean(dr["IsDistrictSiteLicense"]); - license.CreationDate = Convert.ToDateTime(dr["CreationDate"]); - license.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null; - license.NoOfRenewals = Convert.ToInt32(dr["NoOfRenewals"]); - license.IsTermAccepted = Convert.ToBoolean(dr["IsTermsAccepted"]); - license.ProductId = dr["ProductId"].ToString(); - } - } - } - - - - return license; - } - - internal static int UpdateLicenseTermStatus(string accountNumber) - { - logger.Debug(" inside UpdateLicenseTermStatus for AccountNumber = " + accountNumber); - - int result = 0; - SqlConnection conn = null; - try - { - conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - conn.Open(); - cmd.Connection = conn; - cmd.CommandText = DBConstants.UPDATE_LICENSE_TERM_STATUS; - cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@sAccountNumber", accountNumber); - result = cmd.ExecuteNonQuery(); - - } - catch (SqlException ex) - { - logger.Fatal("Exception in UpdateLicenseTermStatus for AccountNumber =" + accountNumber + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace); - throw; - } - finally - { - conn.Dispose(); - } - return result; - } - - internal static ArrayList GetTermsAndConditions() - { - logger.Debug(" inside GetTermsAndConditions"); - - ArrayList arrTermsAndConditions = new ArrayList(); - - - Hashtable contentHash = null; - string str = string.Empty; - string spName = DBConstants.GET_TERMS_AND_CONDITIONS; - DataSet ds = DBModel.GetDataFromStoredProcedure(spName); - - if (ds != null && ds.Tables.Count > 0) - { - DataTable dt = ds.Tables[0]; - if (dt.Rows.Count > 0) - { - foreach (DataRow dr in dt.Rows) - { - contentHash = new Hashtable(); - contentHash.Add(AIAConstants.KEY_TITLE, dr["Title"]); - contentHash.Add(AIAConstants.KEY_CONTENT, dr["Content"]); - arrTermsAndConditions.Add(contentHash); - } - } - } - - - return arrTermsAndConditions; - } - - internal int InsertLoginDetails(int userId) - { - logger.Debug(" inside InsertLoginDetails for UserId= " + userId); - - int result = 0; - SqlConnection conn = null; - try - { - conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - conn.Open(); - cmd.Connection = conn; - cmd.CommandText = DBConstants.INSERT_LOGIN_DETAIL; - cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@iUserId", userId); - result = cmd.ExecuteNonQuery(); - } - catch (SqlException ex) - { - logger.Fatal("Exception in InsertLoginDetails for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE=" + ex.StackTrace); - throw; - } - finally - { - conn.Dispose(); - } - - return result; - } - - internal int InsertIncorrectLoginAttempts(int userId) - { - logger.Debug(" inside InsertIncorrectLoginAttempts for UserId= " + userId); - - int result = 0; - SqlConnection conn = null; - try - { - conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - conn.Open(); - cmd.Connection = conn; - cmd.CommandText = DBConstants.INSERT_INCORRECT_LOGIN_ATTEMPTS; - cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@iUserId", userId); - result = cmd.ExecuteNonQuery(); - } - catch (SqlException ex) - { - logger.Fatal("Exception in InsertIncorrectLoginAttempts for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace); - throw; - } - finally - { - conn.Dispose(); - } - return result; - } - - internal int GetIncorrectLoginAttempts(int userId) - { - logger.Debug(" inside GetIncorrectLoginAttempts for UserId = " + userId); - - int count = 0; - - SqlConnection conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - cmd.Connection = conn; - cmd.CommandText = DBConstants.GET_INCORRECT_LOGIN_ATTEMPTS; - cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@iUserId", userId); - SqlDataAdapter da = new SqlDataAdapter(); - da.SelectCommand = cmd; - DataSet ds = new DataSet(); - da.Fill(ds); - - if (ds != null && ds.Tables.Count > 0) - { - DataTable dt = ds.Tables[0]; - - if (dt.Rows.Count > 0) - { - foreach (DataRow dr in dt.Rows) - { - foreach (DataColumn dc in dt.Columns) - { - count = Convert.ToInt32(dr[dc]); - } - } - } - } - - - return count; - } - - internal int UpdateIncorrectLoginAttempts(int userId) - { - logger.Debug(" inside UpdateIncorrectLoginAttempts for UserId= " + userId); - - int result = 0; - SqlConnection conn = null; - try - { - conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - conn.Open(); - cmd.Connection = conn; - cmd.CommandText = DBConstants.UPDATE_INCORRECT_LOGIN_ATTEMPTS; - cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@iUserId", userId); - result = cmd.ExecuteNonQuery(); - } - catch (SqlException ex) - { - logger.Fatal("Exception in UpdateIncorrectLoginAttempts for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE=" + ex.StackTrace); - throw; - } - finally - { - conn.Dispose(); - } - return result; - } - - public int DeleteIncorrectLoginAttempts(int userId) - { - logger.Debug(" inside DeleteIncorrectLoginAttempts for UserId= " + userId); - - int result = 0; - SqlConnection conn = null; - try - { - conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - conn.Open(); - cmd.Connection = conn; - cmd.CommandText = DBConstants.DELETE_INCORRECT_LOGIN_ATTEMPTS; - cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@iUserId", userId); - result = cmd.ExecuteNonQuery(); - } - catch (SqlException ex) - { - logger.Fatal("Exception in DeleteIncorrectLoginAttempts for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace); - throw; - } - finally - { - conn.Dispose(); - } - return result; - } - - protected ArrayList GetLoginFailureCauses() - { - logger.Debug(" Inside GetLoginFailureCauses"); - - ArrayList failureCauseList = new ArrayList(); - - Hashtable fcHash = null; - - string sp = DBConstants.GET_ALL_LOGIN_FAILURE_CAUSES; - - DataSet ds = DBModel.GetDataFromStoredProcedure(sp); - - if (ds.Tables.Count > 0) - { - DataTable dt = ds.Tables[0]; - - if (dt.Rows.Count > 0) - { - foreach (DataRow drFailureCause in dt.Rows) - { - fcHash = new Hashtable(); - fcHash.Add(AIAConstants.KEY_ID, drFailureCause["Id"]); - fcHash.Add(AIAConstants.KEY_DESCRIPTION, drFailureCause["Description"]); - failureCauseList.Add(fcHash); - } - } - } - - return failureCauseList; - } - - internal int InsertUserLoginLog(string accountNumber, Int16 failureId, string referalUrl, string edition, string httpReferer) - { - logger.Debug(" inside InsertUserLoginLog for AccountNumber= " + accountNumber); - - int result = 0; - SqlConnection conn = null; - try - { - conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - conn.Open(); - cmd.Connection = conn; - cmd.CommandText = DBConstants.INSERT_LOGIN_ERROR_LOG; - cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@nvAccountNumber", accountNumber); - cmd.Parameters.AddWithValue("@dtLogDate", DateTime.Now); - cmd.Parameters.AddWithValue("@tiFailureId", failureId); - cmd.Parameters.AddWithValue("@nvReferalUrl", referalUrl); - cmd.Parameters.AddWithValue("@nvEdition", edition); - cmd.Parameters.AddWithValue("@nvHttpReferer", httpReferer); - result = cmd.ExecuteNonQuery(); - } - catch (SqlException ex) - { - logger.Fatal("Exception in InsertUserLoginLog for AccountNumber= " + accountNumber + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace); - throw; - } - finally - { - conn.Dispose(); - } - return result; - } - - internal BlockedUser GetUserBlockedStatusByUserId(int userId) - { - logger.Debug(" inside GetUserBlockedStatusByUserId for UserId= " + userId); - - BlockedUser blockedUser = null; - DataTable dt = null; - - SqlConnection conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - cmd.Connection = conn; - cmd.CommandText = DBConstants.GET_BLOCKED_USER_BY_USER_ID; - cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@userId", userId); - SqlDataAdapter da = new SqlDataAdapter(); - da.SelectCommand = cmd; - dt = new DataTable(); - da.Fill(dt); - - if (dt != null && dt.Rows.Count > 0) - { - blockedUser = new BlockedUser(); - foreach (DataRow dr in dt.Rows) - { - blockedUser.Id = Convert.ToInt32(dr["Id"]); - blockedUser.FirstName = dr["FirstName"].ToString(); - blockedUser.LastName = dr["LastName"].ToString(); - blockedUser.EmailId = dr["EmailId"].ToString(); - blockedUser.LoginId = dr["LoginId"].ToString(); - blockedUser.Password = dr["Password"].ToString(); - blockedUser.AccountNumber = dr["AccountNumber"].ToString(); - blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]); - } - } - - - return blockedUser; - } - - protected ArrayList GetBlockedUsersByUserType(int userTypeId) - { - logger.Debug(" inside GetBlockedUsersByUserType for UserTypeId= " + userTypeId); - - ArrayList blockedUsersList = new ArrayList(); - BlockedUser blockedUser = null; - DataTable dt = null; - - SqlConnection conn = new SqlConnection(dbConnectionString); - SqlCommand cmd = new SqlCommand(); - cmd.Connection = conn; - cmd.CommandText = DBConstants.GET_BLOCKED_USERS_BY_USER_TYPE; - cmd.CommandType = CommandType.StoredProcedure; - cmd.Parameters.AddWithValue("@iUserTypeId", userTypeId); - SqlDataAdapter da = new SqlDataAdapter(); - da.SelectCommand = cmd; - dt = new DataTable(); - da.Fill(dt); - - if (dt.Rows.Count > 0) - { - foreach (DataRow dr in dt.Rows) - { - blockedUser = new BlockedUser(); - - blockedUser.Id = Convert.ToInt32(dr["Id"]); - blockedUser.FirstName = dr["FirstName"].ToString(); - blockedUser.LastName = dr["LastName"].ToString(); - blockedUser.EmailId = dr["EmailId"].ToString(); - blockedUser.LoginId = dr["LoginId"].ToString(); - blockedUser.Password = dr["Password"].ToString(); - blockedUser.AccountNumber = dr["AccountNumber"].ToString(); - blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]); - - blockedUsersList.Add(blockedUser); - } - } - - - - return blockedUsersList; - } - - internal static int UnblockUser(int userId) - { - int result = 0; - DBModel objModel = new DBModel(); - - result = objModel.DeleteIncorrectLoginAttempts(userId); - - return result; - } - - internal static bool ValidateUserAuthenticity(string username, string password, User user) - { - logger.Debug(" Inside ValidateUserAuthenticity for Username = " + username + ", Password: " + password); - - bool result = false; - - try - { - if ((string.Equals(username.ToUpper(), user.LoginId.ToUpper())) && (string.Equals(password, user.Password))) - { - result = true; - } - else - { - result = false; - } - } - catch (SqlException ex) - { - logger.Fatal("Exception in ValidateUserAuthenticity for Username = " + username + ", Password: " + password + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace); - throw; - } - - return result; - } - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs b/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs deleted file mode 100644 index e4b2562..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs +++ /dev/null @@ -1,46 +0,0 @@ -using MongoDB.Bson; -using MongoDB.Driver; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace AIAHTML5.API.Models -{ - public class PixelLocator - { - - internal static dynamic GetBodyRegionsPixelData(string layerNumber, string bodyViewIndex, string systemNumber, string zoom) - { - try - { - //var client = new MongoClient("mongodb://192.168.90.43:27017"); - var client = new MongoClient(); - var db = client.GetDatabase("AIAHTML5"); - - var col = db.GetCollection("DAImages"); - - var pipeline = new BsonDocument[] - { - new BsonDocument{{"$unwind", "$terms"}}, - new BsonDocument{ { "$match", new BsonDocument("terms.SystemNumbers", Convert.ToInt32(systemNumber)).Add("bodyViewIndex", Convert.ToInt32(bodyViewIndex)).Add("layerNumber", Convert.ToInt32(layerNumber)).Add("zoom", Convert.ToInt32(zoom)) }}, - new BsonDocument { {"$project", new BsonDocument() - .Add("_id", 0) - .Add("terms", 1) - .Add("bodyRegionId", 1) - } } - }; - - - var pixelData = col.Aggregate(pipeline).ToList(); - - return pixelData.ToJson(); - } - catch (Exception e) - { - string error = e.Message + "..STACKTRACE: " + e.StackTrace; - return error; - } - } - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Models/User.cs b/400-SOURCECODE/AIAHTML5.API/Models/User.cs deleted file mode 100644 index ba34df4..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Models/User.cs +++ /dev/null @@ -1,116 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Web; - -namespace AIAHTML5.API.Models -{ - public class User - { - public int Id { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string EmailId { get; set; } - public string LoginId { get; set; } - public string Password { get; set; } - public int? SecurityQuestionId { get; set; } - public string SecurityAnswer { get; set; } - public int? CreatorId { get; set; } - public DateTime CreationDate { get; set; } - public DateTime? DeactivationDate { get; set; } - public int? ModifierId { get; set; } - public DateTime? ModifiedDate { get; set; } - public string UserType { get; set; } - public int UserTypeId { get; set; } - public bool IsActive { get; set; } - public bool IsCorrectPassword { get; set; } - public int IncorrectLoginAttemptCount { get; set; } - public bool IsBlocked { get; set; } - public int LicenseId { get; set; } - public int EditionId { get; set; } - public Int16 LoginFailureCauseId { get; set; } - - public ArrayList Modules { get; set; } - - public License LicenseInfo { get; set; } - public LicenseSubscriptionDetails LicenseSubscriptions { get; set; } - public bool IsSubscriptionExpired { get; set; } - public string SubscriptionExpirationDate { get; set; } - public string TermsAndConditionsTitle { get; set; } - public string TermsAndConditionsText { get; set; } - - public const string SUPER_ADMIN = "Super Admin"; - public const string GENERAL_ADMIN = "General Admin"; - public const string DISTRICT_ADMIN = "District Admin"; - public const string CLIENT_ADMIN = "Client Admin"; - public const string SINGLE_USER = "Single User"; - public const string CONCURRENT_USER = "Concurrent User"; - public const string RESELLER = "Reseller"; - public const string TEST_ACCOUNT = "Test Account"; - public const string SITE_USER = "Site User"; - } - - public enum UserType - { - SUPER_ADMIN = 1, GENERAL_ADMIN, DISTRICT_ADMIN, CLIENT_ADMIN, SINGLE_USER, CONCURRENT_USER, RESELLER, TEST_ACCOUNT, SITE_USER - } - - public class License - { - public int Id { get; set; } - public string AccountNumber { get; set; } - public string LicenseeFirstName { get; set; } - public string LicenseeLastName { get; set; } - public int LicenseTypeId { get; set; } - public string InstitutionName { get; set; } - public string Address1 { get; set; } - public string Address2 { get; set; } - public int CountryId { get; set; } - public int StateId { get; set; } - public string City { get; set; } - public string Zip { get; set; } - public string Phone { get; set; } - public string EmailId { get; set; } - public int TotalLogins { get; set; } - public int AccountTypeId { get; set; } - public bool IsActive { get; set; } - public bool IsDistrictSiteLicense { get; set; } - public DateTime CreationDate { get; set; } - public DateTime? ModifiedDate { get; set; } - public DateTime? CancellationDate { get; set; } - public int NoOfRenewals { get; set; } - public bool IsTermAccepted { get; set; } - public int CardNumber { get; set; } - public string ProductId { get; set; } - - - } - - public class LicenseSubscriptionDetails - { - public int Id { get; set; } - public int LicenseId { get; set; } - public int? SubscriptionPlanId { get; set; } - public DateTime? SubscriptionValidFrom { get; set; } - public DateTime? SubscriptionValidThrough { get; set; } - public DateTime? RenewalDate { get; set; } - public string PaymentMode { get; set; } - public double TotalAmount { get; set; } - public double AmountPaid { get; set; } - public double AmountPending { get; set; } - public int NoOfImages { get; set; } - } - - public class BlockedUser - { - public int Id { get; set; } - public string FirstName { get; set; } - public string LastName { get; set; } - public string LoginId { get; set; } - public string Password { get; set; } - public string EmailId { get; set; } - public string AccountNumber { get; set; } - public DateTime LoginTime { get; set; } - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs b/400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs deleted file mode 100644 index 2db67e8..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs +++ /dev/null @@ -1,301 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using MongoDB.Driver; -using MongoDB.Bson; -using AIAHTML5.API.Properties; -using AIAHTML5.API.Constants; -using log4net; -using System.Net.Mail; -using AIAHTML5.API.Utility; -using System.Text; -using System.IO; -using System.Net.Mime; -using System.Configuration; -using System.Collections; - -namespace AIAHTML5.API.Models -{ - public class UserUtility - { - - public static bool SendEmail(dynamic UserDetails, bool isMailForForgotPassword, bool unblockUser = false) - { - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); - logger.Debug("inside SendEmail in for isMailForForgotPassword =" + isMailForForgotPassword); - - string mailSubject = string.Empty; - string userEmailId = string.Empty; - try - { - List lstLinkedResource = new List(); - EmailUtility emailUtility = new EmailUtility(); - List lstToAddress = new List(); - List lstBccAddress = new List(); - - string emailText = string.Empty; - string userId = string.Empty; - - string userName = string.Empty; - string fName = string.Empty; - string lName = string.Empty; - string site_url = Convert.ToString(ConfigurationManager.AppSettings["Site_URL"]); - - - if (UserDetails.LoginId != "") - userId = UserDetails.LoginId.ToString(); - if (UserDetails.EmailId != "") - userEmailId = UserDetails.EmailId.ToString(); - if (UserDetails.FirstName != "") - fName = UserDetails.FirstName.ToString(); - if (UserDetails.LastName != "") - lName = UserDetails.LastName.ToString(); - - string fullName = fName + " " + lName; - - string logoPath = HttpContext.Current.Server.MapPath(Convert.ToString(ConfigurationManager.AppSettings["LogoPath"])); - - string templatePath = string.Empty; - string resetPasswordLink = string.Empty; - - if (isMailForForgotPassword) - { - if (unblockUser) - { - templatePath = Convert.ToString(ConfigurationManager.AppSettings["UnblockUserEmailTemplate"]); - resetPasswordLink = site_url + "?unb:" + HttpUtility.UrlEncode(userEmailId); - } - else - { - templatePath = Convert.ToString(ConfigurationManager.AppSettings["ForgotPasswordEmailTemplate"]); - resetPasswordLink = site_url + "?em:" + HttpUtility.UrlEncode(userEmailId); - } - } - else - templatePath = Convert.ToString(ConfigurationManager.AppSettings["ForgotUserIdEmailTemplate"]); - - logger.Debug("inside SendEmail for templatePath= " + templatePath + ", userId= " + userId + ", userEmailId= " + userEmailId + ",fullName= " + fullName + ",resetPasswordLink= " + resetPasswordLink); - string mailBody = UserUtility.GetMailBodyTextFromTemplate(templatePath, userId, userEmailId, fullName, resetPasswordLink); - - lstToAddress.Add(userEmailId); - - emailText = mailBody; - - logger.Debug("emailText= " + emailText); - // for embedding images in email - if (emailText.Contains(" lstToAddress = new List(); - List lstBccAddress = new List(); - - string userEmailId = string.Empty; - string fullName = string.Empty; - string emailMessage = string.Empty; - - string[] mailToArr = (ConfigurationManager.AppSettings["AdminSupport"]).Split(','); - if (mailToArr.Length > 0) - { - for (int i = 0; i < mailToArr.Length; i++) - { - lstToAddress.Add(mailToArr[i].ToString()); - } - } - - fullName = userInfo["firstName"].ToString() + " " + userInfo["lastName"].ToString(); - userEmailId = userInfo["emailId"].ToString(); - emailMessage = userInfo["userMessage"].ToString(); - - lstToAddress.Add(userEmailId); - - emailMessage = emailMessage.Replace("\n", "
"); - - emailMessage += "

"; - - string mailSubject = "Admin Support request initiated for:"; - - emailUtility.sHostName = Convert.ToString(ConfigurationManager.AppSettings["HostAddress"]); - emailUtility.sFromAddress = Convert.ToString(ConfigurationManager.AppSettings["SenderEmailAddress"]); - emailUtility.bIsBodyHtml = true; - emailUtility.bEnableSsl = false; - emailUtility.sSubject = mailSubject + " " + userEmailId; - emailUtility.sBodyText = emailMessage; - emailUtility.iPort = 25; - emailUtility.sToAddresses = lstToAddress; - emailUtility.sBccAddresses = lstBccAddress; - - emailUtility.SendSmtpEmail(); - return true; - } - catch (Exception ex) - { - logger.Fatal("exception in SendAdminRequestEmail for email =" + userInfo["emailId"] + ". msg= " + ex.Message + ", stacktrace= " + ex.StackTrace); - return false; - } - } - - public static bool SendEmail(Newtonsoft.Json.Linq.JObject userInfo, ArrayList mailToList, string sender, string mailSubject = "", string mailBody = "") - { - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); - logger.Debug("Inside SendEmail with UserInfo =" + userInfo); - - try - { - EmailUtility emailUtility = new EmailUtility(); - List lstToAddress = new List(); - List lstBccAddress = new List(); - - string emailMessage = string.Empty; - string senderEmailId = string.Empty; - - foreach (string email in mailToList) - { - lstToAddress.Add(email); - } - - emailMessage = "Unable to process request for "; - - if (UserUtility.CheckIfPropertyExists(userInfo, "username") && !string.IsNullOrEmpty(userInfo["username"].ToString())) - emailMessage += "username: " + userInfo["username"].ToString() + ""; - if (UserUtility.CheckIfPropertyExists(userInfo, "password") && !string.IsNullOrEmpty(userInfo["password"].ToString())) - emailMessage += "& password: " + userInfo["password"].ToString() + "

"; - if (UserUtility.CheckIfPropertyExists(userInfo, "emailId") && !string.IsNullOrEmpty(userInfo["emailId"].ToString())) - emailMessage += "emailId: " + userInfo["emailId"].ToString() + "

"; - if (UserUtility.CheckIfPropertyExists(userInfo, "accountNumber") && !string.IsNullOrEmpty(userInfo["accountNumber"].ToString())) - emailMessage += "accountNumber: " + userInfo["accountNumber"].ToString() + "

"; - - if (string.IsNullOrEmpty(sender)) - senderEmailId = Convert.ToString(ConfigurationManager.AppSettings["SenderEmailAddress"]); - else - senderEmailId = sender; - - emailMessage += mailBody; - - emailMessage = emailMessage.Replace("\n", "
"); - - emailMessage += "

"; - - emailUtility.sHostName = Convert.ToString(ConfigurationManager.AppSettings["HostAddress"]); - emailUtility.sFromAddress = senderEmailId; - emailUtility.bIsBodyHtml = true; - emailUtility.bEnableSsl = false; - emailUtility.sSubject = mailSubject; - emailUtility.sBodyText = emailMessage; - emailUtility.iPort = 25; - emailUtility.sToAddresses = lstToAddress; - emailUtility.sBccAddresses = lstBccAddress; - - emailUtility.SendSmtpEmail(); - return true; - } - catch (Exception ex) - { - logger.Fatal("exception in SendEmail for username: " + userInfo["username"].ToString() + " & password: " + userInfo["password"].ToString() + " email =" + userInfo["emailId"] + ". msg= " + ex.Message + ", stacktrace= " + ex.StackTrace); - return false; - } - } - - public static ArrayList GetSupportMailList() - { - ArrayList supoortMailList = new ArrayList(); - string[] mailToArr = (ConfigurationManager.AppSettings["AdminSupport"]).Split(','); - if (mailToArr.Length > 0) - { - for (int i = 0; i < mailToArr.Length; i++) - { - supoortMailList.Add(mailToArr[i].ToString()); - } - } - return supoortMailList; - } - - protected static bool CheckIfPropertyExists(dynamic dynamicObject, string propertyName) - { - var res = dynamicObject[propertyName]; - if (res != null) - return true; - else - return false; - } - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Models/Users.cs b/400-SOURCECODE/AIAHTML5.API/Models/Users.cs deleted file mode 100644 index f070dcc..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Models/Users.cs +++ /dev/null @@ -1,358 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using MongoDB.Driver; -using MongoDB.Bson; -using AIAHTML5.API.Properties; -using AIAHTML5.API.Constants; -using log4net; -using AIAHTML5.API.Models; -using Newtonsoft.Json; -using System.Collections; -using System.Data.SqlClient; - -namespace AIAHTML5.API.Models -{ - public class Users - { - private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); - internal static dynamic GetUserDetailsForAuthenticatedUser(Newtonsoft.Json.Linq.JObject credentials) - { - logger.Debug("inside AuthenticateUser for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString()); - dynamic userDetails = null; - - - User user = DBModel.GetUserDetailsByLoginId(credentials["username"].ToString()); - //string userDetails = DBModel.GetUserDetailsByLoginId2(credentials["username"].ToString()); - - if (user != null) - { - logger.Debug("userDetails.loginId= " + user.LoginId); // .loginId); - - userDetails = JsonConvert.SerializeObject(user); - } - else - { - userDetails = AIAConstants.USER_NOT_FOUND; - } - - - return userDetails; - } - - internal static dynamic GetUserByEmail(Newtonsoft.Json.Linq.JObject userInfo) - { - logger.Debug(" inside GetUserByEmail for emailId = " + userInfo["emailId"]); - - - User objUser = DBModel.GetUserDetailsByEmailId(userInfo["emailId"].ToString()); - - //dynamic userDetails; - - if (objUser!= null) - { - logger.Debug("userDetails.loginId= " + objUser.LoginId); - //return userDetails = JsonConvert.SerializeObject(objUser); - return objUser; - } - else - { - return AIAConstants.USER_NOT_FOUND; - } - - - } - - internal static dynamic UpdatePassword(Newtonsoft.Json.Linq.JObject userInfo, string sLoginId, string sEmailId) - { - - int result = DBModel.UpdateUserPassword(userInfo, sLoginId, sEmailId); - - return result; - - } - - internal static dynamic UpdateLicenseTerm(Newtonsoft.Json.Linq.JObject userLicenseInfo) - { - logger.Debug(" inside UpdateLicenseTerm for AccountNumber = " + userLicenseInfo["licenseeAccountNumber"].ToString() + ", LicenseId: " + userLicenseInfo["userLicenseId"].ToString()); - Newtonsoft.Json.Linq.JObject userInfo = new Newtonsoft.Json.Linq.JObject(); - - dynamic result; - string accountNumber = userLicenseInfo["licenseeAccountNumber"].ToString(); - - userInfo.Add("accountNumber", accountNumber); - - - result = DBModel.UpdateLicenseTermStatus(accountNumber); - - if (result < 0) - { - logger.Fatal("Unable to update LicenseTermAccepted status for AccountNumber =" + accountNumber); - } - - return result; - } - - internal static bool checkUserAuthenticity(Newtonsoft.Json.Linq.JObject credentials, User user) - { - bool isAuthenticatedUser = DBModel.ValidateUserAuthenticity(credentials["username"].ToString(), credentials["password"].ToString(), user); - - return isAuthenticatedUser; - } - - internal static User getUserDetails(Newtonsoft.Json.Linq.JObject credentials) - { - logger.Debug("inside getUserDetails for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString()); - User userDetails = null; - - - userDetails = DBModel.GetUserDetailsByLoginId(credentials["username"].ToString()); - - return userDetails; - } - - internal static void getLicenseIdForThisUser(int userId, out int licenseId, out int editionId) - { - logger.Debug("inside getLicenseIdForThisUser for UserId =" + userId); - - //assigning below variable to avoid compiler error for unassignd out params - licenseId = 0; - editionId = 0; - - - - DBModel objModel = new DBModel(); - Hashtable licenseEditionHash = objModel.GetLicenseDetailByUserId(userId); - - if (licenseEditionHash.ContainsKey(AIAConstants.LICENSE_KEY_ID)) - licenseId = Convert.ToInt32(licenseEditionHash[AIAConstants.LICENSE_KEY_ID]); - - if (licenseEditionHash.ContainsKey(AIAConstants.EDITION_KEY_ID)) - editionId = Convert.ToInt32(licenseEditionHash[AIAConstants.EDITION_KEY_ID]); - - - } - - internal static int insertLoginDetails(int userId) - { - logger.Debug("inside insertLoginDetails for UserId =" + userId); - - int result = 0; - - DBModel objModel = new DBModel(); - - result = objModel.InsertLoginDetails(userId); - - return result; - } - - internal static bool isUSerActive(User user) - { - if (user.IsActive) - return true; - else - return false; - } - - internal static bool checkIfLicenseExpired(LicenseSubscriptionDetails subscriptionDetail, out string expirationDate) - { - expirationDate = string.Empty; - bool isLicenseExpired = false; - - if (subscriptionDetail!= null) - { - DateTime? subscriptionValidThrough = subscriptionDetail.SubscriptionValidThrough; - if (subscriptionValidThrough != null && subscriptionValidThrough.Value.Date >= DateTime.Now.Date) - { - isLicenseExpired = false; - } - else - { - isLicenseExpired = true; - expirationDate = subscriptionDetail.SubscriptionValidThrough.Value.Date.ToString("MM/dd/yyyy").ToString(); - } - } - return isLicenseExpired; - } - - internal static ArrayList getModuleListByLicenseId(int licenseId) - { - logger.Debug("inside getModuleListByLicenseId for LicenseId =" + licenseId); - - ArrayList licensedModulesList = new ArrayList(); - - - - DBModel objModel = new DBModel(); - licensedModulesList = objModel.GetUserModulesByLicenseId(licenseId); - - - return licensedModulesList; - } - - internal static int deletePastWrongAttempts(int userId) - { - logger.Debug("inside deletePastWrongAttempts for UserId =" + userId); - - int result = 0; - - - DBModel objModel = new DBModel(); - result = objModel.DeleteIncorrectLoginAttempts(userId); - return result; - } - - internal static int checkNoOfWrongAttempts(int userId) - { - logger.Debug("inside checkNoOfWrongAttempts for UserId =" + userId); - - int incorrectLoginAttemptCount = 0; - - - DBModel objModel = new DBModel(); - incorrectLoginAttemptCount = objModel.GetIncorrectLoginAttempts(userId); - return incorrectLoginAttemptCount; - } - - internal static int saveWrongAttemptOfUser(int userId, int previousIncorrectLoginAttempts) - { - logger.Debug("inside saveWrongAttemptofUser for UserId =" + userId); - int result = 0; - - - DBModel objModel = new DBModel(); - - if (previousIncorrectLoginAttempts < 1) - { - result = objModel.InsertIncorrectLoginAttempts(userId); - } - else - { - result = objModel.UpdateIncorrectLoginAttempts(userId); - } - - - return result; - } - - internal static bool isLicenseActive(int licenseId) - { - logger.Debug("inside isLicenseActive for LicenseId =" + licenseId); - bool result = false; - - DBModel objModel = new DBModel(); - License userLicense = objModel.GetLicenseDetailsByLicenseId(licenseId); - - - if (userLicense.IsActive) - result = true; - else - result = false; - - return result; - } - - internal static License getLicenseDetails(int licenseId) - { - logger.Debug("inside getLicenseDetails for LicenseId =" + licenseId); - - License userLicense = null; - - - DBModel objModel = new DBModel(); - userLicense = objModel.GetLicenseDetailsByLicenseId(licenseId); - - return userLicense; - } - - internal static LicenseSubscriptionDetails getLicenseSubscriptionDetails(int licenseId) - { - logger.Debug("inside getLicenseSubscriptionDetails for LicenseId =" + licenseId); - - LicenseSubscriptionDetails userSubscriptionDetail = null; - - - DBModel objModel = new DBModel(); - userSubscriptionDetail = objModel.GetLicenseSubscriptionDetailsByLicenseId(licenseId); - - return userSubscriptionDetail; - } - - internal static void isCredentialCorrect(Newtonsoft.Json.Linq.JObject credentials, User userInfo, out bool isCorrectLoginId, out bool isCorrectPassword) - { - isCorrectLoginId = false; - isCorrectPassword = false; - - if (userInfo.Id> 0) - { - if (string.Equals(credentials["username"].ToString().ToUpper(), userInfo.LoginId.ToUpper())) - isCorrectLoginId = true; - - if (string.Equals(credentials["password"].ToString(), userInfo.Password)) - { - isCorrectPassword = true; - } - } - } - - internal static int insertUserLoginLog(string accountNumber, Int16 failureId, string referalUrl, string edition, string httpReferer) - { - logger.Debug("inside insertUserLoginLog for accountNumber =" + accountNumber); - - int result = 0; - - - DBModel objModel = new DBModel(); - result = objModel.InsertUserLoginLog(accountNumber, failureId, null, edition, null); - - return result; - } - - - internal static ArrayList getTermsAndConditions() - { - logger.Debug("inside getTermsOfServiceText"); - - ArrayList arrTermsOfService = new ArrayList(); - - DBModel objModel = new DBModel(); - arrTermsOfService = DBModel.GetTermsAndConditions(); - - return arrTermsOfService; - } - - internal static ArrayList getAllModulesList() - { - logger.Debug("inside getAllModulesList"); - ArrayList modulesList = new ArrayList (); - - - DBModel objModel = new DBModel(); - modulesList = objModel.GetAllModules(); - - return modulesList; - } - - internal static bool checkUserBlockStatus(int userId, out DateTime blockTime) - { - logger.Debug("inside isUserBlocked for UserId =" + userId); - bool isUserBlocked = false; - blockTime = new DateTime(); - - - DBModel objModel = new DBModel(); - BlockedUser blockedUser = objModel.GetUserBlockedStatusByUserId(userId); - - if (blockedUser!= null) - { - blockTime = blockedUser.LoginTime; - isUserBlocked = true; - } - else - isUserBlocked = false; - - return isUserBlocked; - } - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Properties/AssemblyInfo.cs b/400-SOURCECODE/AIAHTML5.API/Properties/AssemblyInfo.cs deleted file mode 100644 index 112a8fe..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("AIAHTML5.API")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("AIAHTML5.API")] -[assembly: AssemblyCopyright("Copyright © 2016")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("a3c323d1-d9fd-4583-8b2b-71815c74dce6")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/400-SOURCECODE/AIAHTML5.API/Properties/Settings.Designer.cs b/400-SOURCECODE/AIAHTML5.API/Properties/Settings.Designer.cs deleted file mode 100644 index 945cacb..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Properties/Settings.Designer.cs +++ /dev/null @@ -1,44 +0,0 @@ -//------------------------------------------------------------------------------ -// -// This code was generated by a tool. -// Runtime Version:4.0.30319.42000 -// -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. -// -//------------------------------------------------------------------------------ - -namespace AIAHTML5.API.Properties { - - - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")] - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { - - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); - - public static Settings Default { - get { - return defaultInstance; - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("localhost:27017")] - public string AIAConnectionString { - get { - return ((string)(this["AIAConnectionString"])); - } - } - - [global::System.Configuration.ApplicationScopedSettingAttribute()] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("AIA")] - public string database { - get { - return ((string)(this["database"])); - } - } - } -} diff --git a/400-SOURCECODE/AIAHTML5.API/Properties/Settings.settings b/400-SOURCECODE/AIAHTML5.API/Properties/Settings.settings deleted file mode 100644 index 3dc06c8..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Properties/Settings.settings +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - localhost:27017 - - - AIA - - - \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Templates/Forgot-UserId.html b/400-SOURCECODE/AIAHTML5.API/Templates/Forgot-UserId.html deleted file mode 100644 index 33441a3..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Templates/Forgot-UserId.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - - - - - - - - - -
- AIA -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Forgot UserID
 
Hello {userFullName}
 
You have requested your 'Login ID' for following account: {emailId}
 
Your login ID is: {loginId}
 
 
 
-
- - - - - - - - - - - - -
A.D.A.M. – the company that pioneered online health content – is dedicated to creating and offering the most effective and innovative educational solutions possible for teaching medical science and improving health literacy.
 
Give us a call toll-free at 1-888-278-9614 or send us an email if you have any questions or if you need help. It will be our pleasure to help you.
 
 
© 2017 Ebix, Inc. All Rights Reserved.
-
\ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Templates/forgot-Password.html b/400-SOURCECODE/AIAHTML5.API/Templates/forgot-Password.html deleted file mode 100644 index 99a9102..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Templates/forgot-Password.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - -
- AIA -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Forgot Password
 
Hi,
 
You have requested password reset for your account: {emailId}
 
Click the Reset Password button below to reset your A.D.A.M. Interactive Anatomy™ account password
 
- Reset Password -  
 
If you have not requested for password reset, please ignore this mail.
 
 
 
-
- - - - - - - - - - - - -
A.D.A.M. – the company that pioneered online health content – is dedicated to creating and offering the most effective and innovative educational solutions possible for teaching medical science and improving health literacy.
 
Give us a call toll-free at 1-888-278-9614 or send us an email if you have any questions or if you need help. It will be our pleasure to help you.
 
 
© 2017 Ebix, Inc. All Rights Reserved.
-
\ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html b/400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html deleted file mode 100644 index a076de8..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - - - - - - - - - -
- AIA -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Unblock Account
 
Hi,
 
You have requested to unblock your account for emailId: {emailId}
 
Click the Unblock button below to unblock your A.D.A.M. Interactive Anatomy™ account
 
- Unblock -  
 
 
 
 
-
- - - - - - - - - - - - - - - - - -
A.D.A.M. – the company that pioneered online health content – is dedicated to creating and offering the most effective and innovative educational solutions possible for teaching medical science and improving health literacy.
 
Give us a call toll-free at 1-888-278-9614 or send us an email if you have any questions or if you need help. It will be our pleasure to help you.
 
 
© 2017 Ebix, Inc. All Rights Reserved.
-
\ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs b/400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs deleted file mode 100644 index b18eeda..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs +++ /dev/null @@ -1,143 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Web; -using System.Configuration; -using System.Collections; -using System.Xml; -using System.Text; -using System.IO; -using System.Net.Mail; -using log4net; - -namespace AIAHTML5.API.Utility -{ - - public class EmailUtility - { - public string sFromAddress { get; set; } - public List sToAddresses { get; set; } - public List sBccAddresses { get; set; } - public string sHostName { get; set; } - public string sSubject { get; set; } - public int iPort { get; set; } - public bool bEnableSsl { get; set; } - public string sUserName { get; set; } - public string sPassword { get; set; } - public bool bIsBodyHtml { get; set; } - public List sAttachments { get; set; } - public string sBodyText { get; set; } - public AlternateView sAlternateView { get; set; } - - public void SendMail(MailMessage mm) - { - try - { - SmtpClient smtp = new SmtpClient(); - smtp.Host = ConfigurationManager.AppSettings["SMTPAddress"]; - smtp.EnableSsl = Convert.ToBoolean(ConfigurationManager.AppSettings["EnableSSL"]); - System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential(mm.From.ToString(), ConfigurationManager.AppSettings["SenderPassword"]); - smtp.Credentials = NetworkCred; - smtp.Port = Convert.ToInt32(ConfigurationManager.AppSettings["SMTPPort"]); - - smtp.Send(mm); - } - catch (Exception e) - { - throw; - } - } - - public void SendSmtpEmail() - { - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType)); - logger.Debug("inside SendSmtpEmail"); - - try - { - MailMessage sMail = new MailMessage(); - SmtpClient SmtpServer = new SmtpClient(sHostName); - string recipientEmailAddress = string.Empty; - - - if (sToAddresses != null) - { - foreach (var sItem in sToAddresses) - { - sMail.To.Add(sItem); - logger.Debug("sToAddresses= " + sItem); - } - } - - if (sBccAddresses != null) - { - foreach (var sItem in sBccAddresses) - { - sMail.Bcc.Add(sItem); - logger.Debug("sBccAddresses= " + sItem); - - } - } - - sMail.IsBodyHtml = bIsBodyHtml; - - if (sAlternateView != null) - { - sMail.AlternateViews.Add(sAlternateView); - logger.Debug("sAlternateView= " + sAlternateView); - - } - else - { - sMail.Body = sBodyText; - logger.Debug("sMail.Body= " + sBodyText); - - } - - sMail.Subject = sSubject; - logger.Debug("sMail.Subject= " + sSubject); - - if (sAttachments != null) - { - foreach (var sItem in sAttachments) - { - sMail.Attachments.Add(sItem); - logger.Debug("sAttachments= " + sAttachments); - - - } - } - logger.Debug("sUserName= " + sUserName + ", sPassword= " + sPassword); - - SmtpServer.Port = iPort; - SmtpServer.Credentials = new System.Net.NetworkCredential(sUserName, sPassword); - SmtpServer.EnableSsl = bEnableSsl; - - using (MailMessage mm = new MailMessage(sFromAddress, sMail.To.ToString())) - { - mm.Subject = sSubject; - mm.IsBodyHtml = bIsBodyHtml; - - if (sAlternateView != null) - { - mm.AlternateViews.Add(sAlternateView); - } - else - { - mm.Body = sBodyText; - } - - mm.IsBodyHtml = true; - SendMail(mm); - logger.Debug("after sending email"); - } - - } - catch (Exception ex) - { - logger.Fatal("exception in SendSmtpEmail.msg= " + ex.Message + ", stacktarce= " + ex.StackTrace); - throw ex; - } - } - } -} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Web.Debug.config b/400-SOURCECODE/AIAHTML5.API/Web.Debug.config deleted file mode 100644 index 24f336c..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Web.Debug.config +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/Web.Release.config b/400-SOURCECODE/AIAHTML5.API/Web.Release.config deleted file mode 100644 index a657981..0000000 --- a/400-SOURCECODE/AIAHTML5.API/Web.Release.config +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.API/content/images/logo.png b/400-SOURCECODE/AIAHTML5.API/content/images/logo.png deleted file mode 100644 index efe029c..0000000 Binary files a/400-SOURCECODE/AIAHTML5.API/content/images/logo.png and /dev/null differ diff --git a/400-SOURCECODE/AIAHTML5.API/index.html b/400-SOURCECODE/AIAHTML5.API/index.html deleted file mode 100644 index a2988c3..0000000 --- a/400-SOURCECODE/AIAHTML5.API/index.html +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - HELLO API - - diff --git a/400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs deleted file mode 100644 index e69de29..0000000 --- a/400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs +++ /dev/null diff --git a/400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs deleted file mode 100644 index e69de29..0000000 --- a/400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs +++ /dev/null diff --git a/400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs deleted file mode 100644 index e69de29..0000000 --- a/400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs +++ /dev/null diff --git a/400-SOURCECODE/AIAHTML5.API/packages.config b/400-SOURCECODE/AIAHTML5.API/packages.config deleted file mode 100644 index d8d11b7..0000000 --- a/400-SOURCECODE/AIAHTML5.API/packages.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file -- libgit2 0.21.4