Commit 1d27d4ed55587e69b7f87feceb901cecaede7be3

Authored by Amrita Vishnoi
1 parent ef349347

Deleted .cs project

Showing 33 changed files with 0 additions and 3456 deletions
400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj deleted
1   -<?xml version="1.0" encoding="utf-8"?>
2   -<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   - <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4   - <PropertyGroup>
5   - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6   - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7   - <ProductVersion>
8   - </ProductVersion>
9   - <SchemaVersion>2.0</SchemaVersion>
10   - <ProjectGuid>{29B2F1D1-8B39-4B74-9874-7CB659800E3F}</ProjectGuid>
11   - <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
12   - <OutputType>Library</OutputType>
13   - <AppDesignerFolder>Properties</AppDesignerFolder>
14   - <RootNamespace>AIAHTML5.API</RootNamespace>
15   - <AssemblyName>AIAHTML5.API</AssemblyName>
16   - <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
17   - <UseIISExpress>true</UseIISExpress>
18   - <IISExpressSSLPort />
19   - <IISExpressAnonymousAuthentication />
20   - <IISExpressWindowsAuthentication />
21   - <IISExpressUseClassicPipelineMode />
22   - <UseGlobalApplicationHostFile />
23   - </PropertyGroup>
24   - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
25   - <DebugSymbols>true</DebugSymbols>
26   - <DebugType>full</DebugType>
27   - <Optimize>false</Optimize>
28   - <OutputPath>bin\</OutputPath>
29   - <DefineConstants>DEBUG;TRACE</DefineConstants>
30   - <ErrorReport>prompt</ErrorReport>
31   - <WarningLevel>4</WarningLevel>
32   - </PropertyGroup>
33   - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
34   - <DebugType>pdbonly</DebugType>
35   - <Optimize>true</Optimize>
36   - <OutputPath>bin\</OutputPath>
37   - <DefineConstants>TRACE</DefineConstants>
38   - <ErrorReport>prompt</ErrorReport>
39   - <WarningLevel>4</WarningLevel>
40   - </PropertyGroup>
41   - <ItemGroup>
42   - <Reference Include="DnsClient, Version=1.0.7.0, Culture=neutral, PublicKeyToken=4574bb5573c51424, processorArchitecture=MSIL">
43   - <HintPath>..\packages\DnsClient.1.0.7\lib\net45\DnsClient.dll</HintPath>
44   - <Private>True</Private>
45   - </Reference>
46   - <Reference Include="log4net, Version=2.0.7.0, Culture=neutral, PublicKeyToken=669e0ddf0bb1aa2a, processorArchitecture=MSIL">
47   - <HintPath>..\packages\log4net.2.0.7\lib\net45-full\log4net.dll</HintPath>
48   - <Private>True</Private>
49   - </Reference>
50   - <Reference Include="Microsoft.CSharp" />
51   - <Reference Include="MongoDB.Bson, Version=2.5.0.0, Culture=neutral, processorArchitecture=MSIL">
52   - <HintPath>..\packages\MongoDB.Bson.2.5.0\lib\net45\MongoDB.Bson.dll</HintPath>
53   - <Private>True</Private>
54   - </Reference>
55   - <Reference Include="MongoDB.Driver, Version=2.5.0.0, Culture=neutral, processorArchitecture=MSIL">
56   - <HintPath>..\packages\MongoDB.Driver.2.5.0\lib\net45\MongoDB.Driver.dll</HintPath>
57   - <Private>True</Private>
58   - </Reference>
59   - <Reference Include="MongoDB.Driver.Core, Version=2.5.0.0, Culture=neutral, processorArchitecture=MSIL">
60   - <HintPath>..\packages\MongoDB.Driver.Core.2.5.0\lib\net45\MongoDB.Driver.Core.dll</HintPath>
61   - <Private>True</Private>
62   - </Reference>
63   - <Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
64   - <SpecificVersion>False</SpecificVersion>
65   - <HintPath>..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
66   - </Reference>
67   - <Reference Include="System.Buffers, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
68   - <HintPath>..\packages\System.Buffers.4.3.0\lib\netstandard1.1\System.Buffers.dll</HintPath>
69   - <Private>True</Private>
70   - </Reference>
71   - <Reference Include="System.Net.Http" />
72   - <Reference Include="System.Net.Http.Formatting, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
73   - <HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.3\lib\net45\System.Net.Http.Formatting.dll</HintPath>
74   - <Private>True</Private>
75   - </Reference>
76   - <Reference Include="System.Runtime.InteropServices.RuntimeInformation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
77   - <HintPath>..\packages\System.Runtime.InteropServices.RuntimeInformation.4.0.0\lib\net45\System.Runtime.InteropServices.RuntimeInformation.dll</HintPath>
78   - <Private>True</Private>
79   - </Reference>
80   - <Reference Include="System.Web.DynamicData" />
81   - <Reference Include="System.Web.Entity" />
82   - <Reference Include="System.Web.ApplicationServices" />
83   - <Reference Include="System.ComponentModel.DataAnnotations" />
84   - <Reference Include="System" />
85   - <Reference Include="System.Data" />
86   - <Reference Include="System.Core" />
87   - <Reference Include="System.Data.DataSetExtensions" />
88   - <Reference Include="System.Web.Extensions" />
89   - <Reference Include="System.Web.Http, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
90   - <HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.3\lib\net45\System.Web.Http.dll</HintPath>
91   - <Private>True</Private>
92   - </Reference>
93   - <Reference Include="System.Web.Http.WebHost, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
94   - <HintPath>..\packages\Microsoft.AspNet.WebApi.WebHost.5.2.3\lib\net45\System.Web.Http.WebHost.dll</HintPath>
95   - <Private>True</Private>
96   - </Reference>
97   - <Reference Include="System.Xml.Linq" />
98   - <Reference Include="System.Drawing" />
99   - <Reference Include="System.Web" />
100   - <Reference Include="System.Xml" />
101   - <Reference Include="System.Configuration" />
102   - <Reference Include="System.Web.Services" />
103   - <Reference Include="System.EnterpriseServices" />
104   - </ItemGroup>
105   - <ItemGroup>
106   - <Content Include="Global.asax" />
107   - <Content Include="content\images\logo.png" />
108   - <Content Include="index.html" />
109   - <Content Include="Templates\forgot-Password.html" />
110   - <Content Include="Templates\forgot-UserId.html" />
111   - <Content Include="Templates\unblock-User.html" />
112   - <Content Include="Web.config">
113   - <SubType>Designer</SubType>
114   - </Content>
115   - </ItemGroup>
116   - <ItemGroup>
117   - <Compile Include="App_Start\WebApiConfig.cs" />
118   - <Compile Include="Constants\AIAConstants.cs" />
119   - <Compile Include="Constants\DBConstants.cs" />
120   - <Compile Include="Constants\ErrorHelper.cs" />
121   - <Compile Include="Controllers\AdminAccessController.cs" />
122   - <Compile Include="Controllers\AuthenticateController.cs" />
123   - <Compile Include="Controllers\ForgotUserController.cs" />
124   - <Compile Include="Controllers\LicenseTermConditionController.cs" />
125   - <Compile Include="Controllers\PixelLocationsController.cs" />
126   - <Compile Include="Controllers\ResetPasswordController.cs" />
127   - <Compile Include="Controllers\UnblockUserController.cs" />
128   - <Compile Include="Global.asax.cs">
129   - <DependentUpon>Global.asax</DependentUpon>
130   - </Compile>
131   - <Compile Include="Models\DBModel.cs" />
132   - <Compile Include="Models\PixelLocator.cs" />
133   - <Compile Include="Models\User.cs" />
134   - <Compile Include="Models\UserUtility.cs" />
135   - <Compile Include="Models\Users.cs" />
136   - <Compile Include="Properties\AssemblyInfo.cs" />
137   - <Compile Include="Properties\Settings.Designer.cs">
138   - <AutoGen>True</AutoGen>
139   - <DesignTimeSharedInput>True</DesignTimeSharedInput>
140   - <DependentUpon>Settings.settings</DependentUpon>
141   - </Compile>
142   - <Compile Include="Utility\EmailUtility.cs" />
143   - </ItemGroup>
144   - <ItemGroup>
145   - <Content Include="Logs\AIALogs.log" />
146   - <Content Include="packages.config" />
147   - <None Include="Properties\Settings.settings">
148   - <Generator>SettingsSingleFileGenerator</Generator>
149   - <LastGenOutput>Settings.Designer.cs</LastGenOutput>
150   - </None>
151   - <None Include="Web.Debug.config">
152   - <DependentUpon>Web.config</DependentUpon>
153   - </None>
154   - <None Include="Web.Release.config">
155   - <DependentUpon>Web.config</DependentUpon>
156   - </None>
157   - </ItemGroup>
158   - <ItemGroup>
159   - <Folder Include="App_Data\" />
160   - </ItemGroup>
161   - <PropertyGroup>
162   - <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
163   - <VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
164   - </PropertyGroup>
165   - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
166   - <Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" />
167   - <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" />
168   - <ProjectExtensions>
169   - <VisualStudio>
170   - <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
171   - <WebProjectProperties>
172   - <UseIIS>True</UseIIS>
173   - <AutoAssignPort>True</AutoAssignPort>
174   - <DevelopmentServerPort>63874</DevelopmentServerPort>
175   - <DevelopmentServerVPath>/</DevelopmentServerVPath>
176   - <IISUrl>http://localhost:63874/</IISUrl>
177   - <NTLMAuthentication>False</NTLMAuthentication>
178   - <UseCustomServer>False</UseCustomServer>
179   - <CustomServerUrl>http://182.19.10.91/AIAHTML5</CustomServerUrl>
180   - <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
181   - </WebProjectProperties>
182   - </FlavorProperties>
183   - </VisualStudio>
184   - </ProjectExtensions>
185   - <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
186   - Other similar extension points exist, see Microsoft.Common.targets.
187   - <Target Name="BeforeBuild">
188   - </Target>
189   - <Target Name="AfterBuild">
190   - </Target>
191   - -->
192   -</Project>
193 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/AIAHTML5.API.csproj.user deleted
1   -<?xml version="1.0" encoding="utf-8"?>
2   -<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3   - <PropertyGroup>
4   - <WebStackScaffolding_IsLayoutPageSelected>True</WebStackScaffolding_IsLayoutPageSelected>
5   - <WebStackScaffolding_IsPartialViewSelected>False</WebStackScaffolding_IsPartialViewSelected>
6   - <WebStackScaffolding_IsReferencingScriptLibrariesSelected>True</WebStackScaffolding_IsReferencingScriptLibrariesSelected>
7   - <WebStackScaffolding_LayoutPageFile />
8   - <WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
9   - <ProjectView>ProjectFiles</ProjectView>
10   - </PropertyGroup>
11   - <ProjectExtensions>
12   - <VisualStudio>
13   - <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
14   - <WebProjectProperties>
15   - <StartPageUrl>
16   - </StartPageUrl>
17   - <StartAction>CurrentPage</StartAction>
18   - <AspNetDebugging>True</AspNetDebugging>
19   - <SilverlightDebugging>False</SilverlightDebugging>
20   - <NativeDebugging>False</NativeDebugging>
21   - <SQLDebugging>False</SQLDebugging>
22   - <ExternalProgram>
23   - </ExternalProgram>
24   - <StartExternalURL>
25   - </StartExternalURL>
26   - <StartCmdLineArguments>
27   - </StartCmdLineArguments>
28   - <StartWorkingDirectory>
29   - </StartWorkingDirectory>
30   - <EnableENC>True</EnableENC>
31   - <AlwaysStartWebServerOnDebug>True</AlwaysStartWebServerOnDebug>
32   - </WebProjectProperties>
33   - </FlavorProperties>
34   - </VisualStudio>
35   - </ProjectExtensions>
36   -</Project>
37 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/App_Start/WebApiConfig.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Web.Http;
5   -
6   -namespace AIAHTML5.API
7   -{
8   - public static class WebApiConfig
9   - {
10   - public static void Register(HttpConfiguration config)
11   - {
12   - // Web API configuration and services
13   -
14   - // Web API routes
15   - config.MapHttpAttributeRoutes();
16   -
17   - config.Routes.MapHttpRoute(
18   - name: "DefaultApi",
19   - routeTemplate: "api/{controller}/{id}",
20   - defaults: new { id = RouteParameter.Optional }
21   - );
22   - }
23   - }
24   -}
400-SOURCECODE/AIAHTML5.API/Constants/AIAConstants.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Web;
5   -
6   -namespace AIAHTML5.API.Constants
7   -{
8   - public class AIAConstants
9   - {
10   - public const string ERROR_IN_FECTHING_DETAILS = "Error in fecthing details.";
11   - public const string USER_NOT_FOUND = "User not found.";
12   - public const string MAIL_NOT_SENT = "Mail not sent.";
13   - public const string MAIL_SENT = "Mail sent.";
14   - public const string EXCEPTION_OCCURED = "We are facing some issue. Please try to login after sometime.";
15   - public const string EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT = "Exception Occuredin AIAHTML5.";
16   - public const string SQL_CONNECTION_ERROR = "We are unable to connect with database. Please contact customer support.";
17   - public const string SQL_CONNECTION_ERROR_MAIL_SUBJECT = "SQL Connection error in AIAHTML5.";
18   - public const string KEY_ID = "id";
19   - public const string KEY_TITLE = "title";
20   - public const string KEY_NAME = "name";
21   - public const string KEY_SLUG = "slug";
22   - public const string KEY_DESCRIPTION = "Description";
23   -
24   - public const string PASSWORD_UPDATE_SUCCESS = "Password updated successfully";
25   - public const string PASSWORD_UPDATE_FAILED = "Password update failed";
26   -
27   - public const string INVALID_USER = "Invalid UserID";
28   -
29   - public const string LICENSE_TERM_CONDITION_UPDATE_SUCCESS = "License Term Accepted field updated successfully.";
30   - public const string LICENSE_TERM_CONDITION_UPDATE_FAILED = "License Term Accepted field update failed.";
31   -
32   - public const string KEY_CONTENT = "content";
33   -
34   - public const string LICENSE_KEY_ID = "LicenseId";
35   - public const string EDITION_KEY_ID = "EditionId";
36   -
37   - public const string USER_UNBLOCK_SUCCESS = "User unblocked";
38   - public const string USER_UNBLOCK_FAILED = "Unblock operation failed";
39   - public const string UNABLE_TO_UNBLOCK = "We are unable to unblock. Please try after sometime.";
40   -
41   - public const string FORGOT_USERID_EMAIL_SUBJECT = "UserID recovery mail for:";
42   - public const string FORGOT_PASSWORD_EMAIL_SUBJECT = "Password recovery mail for:";
43   - public const string UNBLOCK_USER_EMAIL_SUBJECT = "Unblock user request mail for:";
44   - }
45   -}
46 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Constants/DBConstants.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Web;
5   -
6   -namespace AIAHTML5.API.Constants
7   -{
8   - public class DBConstants
9   - {
10   - public const string GET_ALL_MODULES = "GetAllModuleStatusWithSlug";
11   - public const string GET_USER_DELAILS_BY_LOGIN_ID = "GetUserDetailsByLoginId";
12   - public const string GET_LICENSE_DETAILS_BY_USER_ID = "GetLicenseDetailByUserId";
13   - public const string GET_USER_MODULES_BY_LICENSE_ID = "GetUserModulesByLicenseId";
14   - public const string GET_USER_DETAILS_BY_EMAILID = "GetUserInfoByEmailId";
15   -
16   - public const string UPDATE_USER_PASSWORD = "UpdateUserPassword";
17   - public const string GET_SUBSCRIPTION_DETAILS_BY_LICENSE_ID = "GetSubscriptionDetailsByLicenseId";
18   - public const string GET_LICENSE_DETAILS_BY_ID = "GetLicenseDetailsById";
19   - public const string UPDATE_LICENSE_TERM_STATUS = "UpdateLicenseTermAcceptedStatus";
20   - public const string GET_TERMS_AND_CONDITIONS = "GetTermsAndConditions";
21   - public const string INSERT_LOGIN_DETAIL = "InsertLoginDetail";
22   - public const string INSERT_INCORRECT_LOGIN_ATTEMPTS = "InsertIncorrectLoginAttempt";
23   - public const string GET_INCORRECT_LOGIN_ATTEMPTS = "GetIncorrectLoginAttempt";
24   - public const string UPDATE_INCORRECT_LOGIN_ATTEMPTS = "UpdateIncorrectLoginAttempts";
25   - public const string DELETE_INCORRECT_LOGIN_ATTEMPTS = "DeleteIncorrectLoginAttempts";
26   - public const string GET_ALL_LOGIN_FAILURE_CAUSES = "GetAllLoginFailureCauses";
27   - public const string INSERT_LOGIN_ERROR_LOG = "InsertLoginErrorLog";
28   - public const string GET_BLOCKED_USER_BY_USER_ID = "GetBlockedUserByUserId";
29   - public const string GET_BLOCKED_USERS_BY_USER_TYPE = "GetBlockedUserByUserType";
30   - }
31   -}
32 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Constants/ErrorHelper.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Collections;
4   -using System.Linq;
5   -using System.Web;
6   -
7   -namespace AIAHTML5.API.Constants
8   -{
9   - /// <summary>
10   - /// This class is used to provide error description. This class contain
11   - /// different type of error code and its description.
12   - /// </summary>
13   - public class ErrorHelper
14   - {
15   - private static ErrorHelper _instance;
16   - private Hashtable objHash = new Hashtable();
17   -
18   -
19   - /* error Id Const */
20   - public const Int16 E_NO_ERROR = 0;
21   - public const Int16 E_USER_NOT_EXIST = 1;
22   - public const Int16 E_PASSWORD_NOT_MATCH = 2;
23   - public const Int16 E_USER_ID_BLOCKED_24_HRS = 3;
24   - public const Int16 E_USER_NOT_ACTIVE = 4;
25   - public const Int16 E_USER_ID_WILL_BLOCKED = 5;
26   - public const Int16 E_EMAIL_ID_NOT_EXIT = 6;
27   - public const Int16 E_LICENCE_IS_INACTIVE = 7;
28   - public const Int16 E_USER_NOT_MAP_TO_LICENCE_EDITION = 8;
29   - public const Int16 E_NO_ROW_FOUND_LICENCE_TO_EDITION_TABLE = 9;
30   - public const Int16 E_NO_ROW_FOUND_LICENCE_TABLE = 10;
31   - public const Int16 E_SECURITY_QUEST_NOT_MATCH = 11;
32   - public const Int16 E_SEQURITY_ANSWER_NOT_MATCH = 12;
33   - public const Int16 E_FORGOT_USER_ID_EMAIL_ID_NOT_EXIT = 13;
34   - public const Int16 E_TOTAL_NUMBER_LOGIN_EXCEED = 14;
35   - public const Int16 E_FORGOT_PASSWORD_EMAIL_ID_NOT_EXIST = 15;
36   - public const Int16 E_TEST_SETUP_ACCOUNT_USER_NAME_EXIST = 16;
37   - public const Int16 E_TEST_SETUP_ACCOUNT_EMAILID_EXIST = 17;
38   - public const Int16 E_SP_ERROR = 18;
39   - public const Int16 E_ACCOUNT_NUMBER_NOT_EXIST = 19;
40   - public const Int16 E_ACCOUNT_NUMBER_ALREADY_EXIST = 20;
41   - public const Int16 E_TEST_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT = 21;
42   - public const Int16 E_MAIL_COULD_NOT_SENT = 22;
43   - public const Int16 E_RESELLER_ACCOUNT_CREATED_MAIL_COULD_NOT_SENT = 23;
44   - public const Int16 E_LICENSE_TERM_CONDITION = 24;
45   - public const Int16 E_EDITION_NOT_LINKED_WITH_SITE = 25;
46   - public const Int16 E_LOGIN_SESSION_EXPIRE = 26;
47   - public const Int16 E_DISCOUNT_CODE_NOT_EXIST = 27;
48   - public const Int16 E_DISCOUNT_CODE_ALREADY_EXIST = 28;
49   -
50   - public const Int16 E_SITE_IP_NOT_NULL = 29;
51   - public const Int16 E_EDITION_ID_NOT_NULL = 30;
52   - public const Int16 E_MASTER_SITEIP_NOT_EXIST = 31;
53   - public const Int16 EDITION_ID_NOT_EXIST = 32;
54   - public const Int16 E_ERROR_LOG = 33;
55   - public const Int16 E_MASTER_SITE_ALREADY_EXIST = 34;
56   - public const Int16 E_ACCOUNT_NUMBER_NOT_NULL = 35;
57   - public const Int16 E_SITE_IP_ALREADY_EXIST = 36;
58   -
59   -
60   - public const Int16 E_LICENCE_IS_EXPIRED = 37;
61   - public const Int16 E_SINGLEACCOUNT_IS_BEING_USED = 38;
62   -
63   -
64   - public const Int16 E_DATA_BASE_CONNECTION = 4060;
65   -
66   -
67   - //login failure error constant
68   - public const int ACCOUNT_NUMBER_NOT_NULL = 4;
69   - public const int EDITION_ID_NOT_NULL = 5;
70   - public const int ACCOUNT_NUMBER_NOT_EXIST = 1;
71   - public const int EDITION_NOT_EXIST = 3;
72   - public const int MASTER_SITEIP_NOT_EXIST = 2;
73   - public const int LICENSE_INACTIVE = 6;
74   -
75   -
76   - /// <summary>
77   - /// constructor
78   - /// </summary>
79   - private ErrorHelper()
80   - {
81   - objHash.Add(E_NO_ERROR, "No Error.");
82   - objHash.Add(E_USER_NOT_EXIST, "Invalid User ID.");
83   - 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. ");
84   - objHash.Add(E_USER_ID_BLOCKED_24_HRS, "User Id is blocked.");
85   - objHash.Add(E_USER_NOT_ACTIVE, "User Id is Inactive.");
86   - 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. ");
87   - 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. ");
88   - objHash.Add(E_LICENCE_IS_INACTIVE, "Your Licence Is inactive.");
89   - objHash.Add(E_USER_NOT_MAP_TO_LICENCE_EDITION, "User is not mapped with licence edition.");
90   - objHash.Add(E_NO_ROW_FOUND_LICENCE_TO_EDITION_TABLE, "No row found in Licence to edition table.");
91   - objHash.Add(E_NO_ROW_FOUND_LICENCE_TABLE, "No row found in Licence table.");
92   - objHash.Add(E_SECURITY_QUEST_NOT_MATCH, "Your security question is incorrect. ");
93   - objHash.Add(E_SEQURITY_ANSWER_NOT_MATCH, "Your answer is incorrect. ");
94   - 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. ");
95   - //objHash.Add(E_TOTAL_NUMBER_LOGIN_EXCEED, "User ID and password has been accessed by another user. Your session is currently timed out.");
96   - 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.");
97   - 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. ");
98   - objHash.Add(E_TEST_SETUP_ACCOUNT_USER_NAME_EXIST, "User Name already exist in system.");
99   - objHash.Add(E_TEST_SETUP_ACCOUNT_EMAILID_EXIST, "Email Id already exist system.");
100   - objHash.Add(E_SP_ERROR, "Error occured in store procedure.");
101   - objHash.Add(E_ACCOUNT_NUMBER_NOT_EXIST, "Account Number does not exist in the system. ");
102   - objHash.Add(E_ACCOUNT_NUMBER_ALREADY_EXIST, "Account Number already exist in the system.");
103   - 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. ");
104   - objHash.Add(E_MAIL_COULD_NOT_SENT, "Mail could not sent due to some mail server error.");
105   - 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. ");
106   - objHash.Add(E_LICENSE_TERM_CONDITION, "Your license is not enabled yet. Please contact your administrator to accept the term & condition.");
107   - 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. ");
108   - objHash.Add(E_LOGIN_SESSION_EXPIRE, "Your session has expired. Please log in.");
109   - objHash.Add(E_DISCOUNT_CODE_NOT_EXIST, "Discount code not exist in the system.");
110   - objHash.Add(E_DISCOUNT_CODE_ALREADY_EXIST, "Discount code already exist in the system.");
111   - objHash.Add(E_SITE_IP_NOT_NULL, "SiteIP cannot be null.");
112   - objHash.Add(E_DATA_BASE_CONNECTION, "Could not connect to Database.");
113   - objHash.Add(E_EDITION_ID_NOT_NULL, "Edition Id cannot be zero.");
114   - objHash.Add(E_MASTER_SITEIP_NOT_EXIST, "Master Site IP does not exist in the system.");
115   - objHash.Add(EDITION_ID_NOT_EXIST, "Edition ID does not exist in the system.");
116   - objHash.Add(E_ERROR_LOG, "Problem in database.");
117   - objHash.Add(E_MASTER_SITE_ALREADY_EXIST, "Account already created from this URL.");
118   - objHash.Add(E_ACCOUNT_NUMBER_NOT_NULL, "Account number cannot be null.");
119   - objHash.Add(E_SITE_IP_ALREADY_EXIST, "Site IP already exist.");
120   - objHash.Add(E_LICENCE_IS_EXPIRED, "Your licence is expired since {licenseExpirationDate}.");
121   - 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.");
122   - }
123   - /// <summary>
124   - /// This method checks if instance of ErrorHelper class is exist then it returns
125   - /// the exist instance else it creates the ErrorHelper class instance and return it.
126   - /// </summary>
127   - /// <returns>ErrorHelper instance</returns>
128   - public static ErrorHelper GetInstance()
129   - {
130   - if (_instance == null)
131   - {
132   - _instance = new ErrorHelper();
133   - }
134   - return _instance;
135   - }
136   - }
137   -}
138 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Controllers/AdminAccessController.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Net;
5   -using System.Net.Http;
6   -using System.Web.Http;
7   -using AIAHTML5.API.Constants;
8   -using log4net;
9   -using Newtonsoft.Json;
10   -using Newtonsoft.Json.Linq;
11   -using AIAHTML5.API.Models;
12   -using AIAHTML5.API.Utility;
13   -
14   -namespace AIAHTML5.API.Controllers
15   -{
16   - public class AdminAccessController : ApiController
17   - {
18   - public HttpResponseMessage Post([FromBody]JObject userInfo)
19   - {
20   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
21   -
22   - bool isMailSent = AIAHTML5.API.Models.UserUtility.SendAdminRequestEmail(userInfo);
23   -
24   - if (isMailSent)
25   - {
26   - logger.Debug("AdminAccessRequest mail sent for User: " + userInfo["firstName"] + " " + userInfo["lastName"] + "& mail id = " + userInfo["emailId"]);
27   - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MAIL_SENT) };
28   - }
29   - else
30   - {
31   - logger.Debug("AdminAccessRequest mail sent for User: " + userInfo["firstName"] + " " + userInfo["lastName"] + "& mail id = " + userInfo["emailId"]);
32   - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MAIL_NOT_SENT) };
33   - }
34   - }
35   - }
36   -}
37 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Controllers/AuthenticateController.cs deleted
1   -using Newtonsoft.Json;
2   -using Newtonsoft.Json.Linq;
3   -using System;
4   -using System.Collections.Generic;
5   -using System.Linq;
6   -using System.Net;
7   -using System.Net.Http;
8   -using System.Web.Http;
9   -using log4net;
10   -using AIAHTML5.API.Constants;
11   -using AIAHTML5.API.Models;
12   -using System.Collections;
13   -
14   -using System.Data.SqlClient;namespace AIAHTML5.API.Controllers
15   -{
16   - public class AuthenticateController : ApiController
17   - {
18   - // GET api/authenticate
19   - public IEnumerable<string> Get()
20   - {
21   - return new string[] { "value1", "value2" };
22   - }
23   -
24   - // GET api/authenticate/5
25   - public string Get(int id)
26   - {
27   - return "value";
28   - }
29   -
30   - // POST api/authenticate
31   - public HttpResponseMessage Post([FromBody]JObject credentials)
32   - {
33   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
34   - logger.Debug("inside POST");
35   -
36   - dynamic authenticationRepsonse;
37   - DateTime blockTime;
38   - bool isUserBlocked;
39   -
40   - try
41   - {
42   -
43   - //01.get the user detail to autheticate the user
44   - User userInfo = AIAHTML5.API.Models.Users.getUserDetails(credentials);
45   -
46   - if (userInfo != null)
47   - {
48   - // 02 Check user is authenticated or not by login credential match
49   - bool isUserAuthenticated = AIAHTML5.API.Models.Users.checkUserAuthenticity(credentials, userInfo);
50   -
51   - if (isUserAuthenticated)
52   - {
53   - if (userInfo.IsActive)
54   - {
55   - //03. check if user is blocked
56   - isUserBlocked = AIAHTML5.API.Models.Users.checkUserBlockStatus(userInfo.Id, out blockTime);
57   -
58   - if (!isUserBlocked)
59   - {
60   - //04.delete past wrong login attempts of user
61   - int wrongAttemptDeteledCount = AIAHTML5.API.Models.Users.deletePastWrongAttempts(userInfo.Id);
62   - if (wrongAttemptDeteledCount < 0)
63   - {
64   - logger.Fatal("Unable to delete past wrong login attempts for userId= " + userInfo.Id);
65   - }
66   - //05.
67   - GetModulesBasedOnUserType(userInfo);
68   -
69   - // authenticationRepsonse = JsonConvert.SerializeObject(userInfo);
70   - }
71   -
72   - else
73   - {
74   -
75   - //compare block time of user with current time if user is blocked
76   - DateTime blockDuration = blockTime.AddDays(1);
77   - var difference = DateTime.Compare(DateTime.Now, blockDuration);
78   -
79   - //check if credentials are valid credentials
80   - //bool isCorrectLoginId, isCorrectPassword;
81   - //AIAHTML5.API.Models.Users.isCredentialCorrect(credentials, userInfo, out isCorrectLoginId, out isCorrectPassword);
82   -
83   - if (difference >= 0)
84   - {
85   - //means 24 hours block time is finished
86   - userInfo.IsBlocked = false;
87   -
88   - int wrongAttemptDeteledCount = AIAHTML5.API.Models.Users.deletePastWrongAttempts(userInfo.Id);
89   - if (wrongAttemptDeteledCount < 0)
90   - {
91   - logger.Fatal("Unable to delete past wrong login attempts for userId= " + userInfo.Id);
92   - }
93   -
94   - //05. Now get the module list- for ADMIN (superadmin/ general admin) by default all module loads
95   - GetModulesBasedOnUserType(userInfo);
96   -
97   - }
98   - else
99   - {
100   - userInfo.LoginFailureCauseId = ErrorHelper.E_USER_ID_BLOCKED_24_HRS;
101   - }
102   - }
103   - }
104   - else
105   - {
106   - //CODE REVIW: validate that is this tarnslated by UI because we need to show message to user if he is inactive
107   - userInfo.LoginFailureCauseId = ErrorHelper.E_USER_NOT_ACTIVE;
108   -
109   - //05.4 check the License expiration irespective of either user is active
110   - //or not because on AIA, we shows the License expiration message
111   - //for inactive users too
112   -
113   - CheckLicenseStatus(userInfo);
114   -
115   - }
116   - }
117   -
118   - else
119   - {
120   - //this come in picture when user input wrong passowrd
121   -
122   - //get wrong attempt count of user
123   - int previousIncorrectLoginAttempts = AIAHTML5.API.Models.Users.checkNoOfWrongAttempts(userInfo.Id);
124   - userInfo.IncorrectLoginAttemptCount = previousIncorrectLoginAttempts + 1;
125   - userInfo.LoginFailureCauseId = ErrorHelper.E_PASSWORD_NOT_MATCH;
126   -
127   - //01. insert wrong attempt in dtabase
128   - int updateCount = AIAHTML5.API.Models.Users.saveWrongAttemptOfUser(userInfo.Id, previousIncorrectLoginAttempts);
129   -
130   - if (updateCount < 0)
131   - {
132   -
133   - logger.Fatal("Unable to Update past wrong login attempts for userId= " + userInfo.Id);
134   - }
135   - //else
136   - //{
137   - if (userInfo.IncorrectLoginAttemptCount > 4)
138   - {
139   - userInfo.IsBlocked = true;
140   - userInfo.LoginFailureCauseId = ErrorHelper.E_USER_ID_BLOCKED_24_HRS;
141   - }
142   -
143   -
144   - }
145   -
146   - authenticationRepsonse = JsonConvert.SerializeObject(userInfo);
147   -
148   - }
149   -
150   - else
151   - {
152   - authenticationRepsonse = AIAConstants.USER_NOT_FOUND;
153   - }
154   - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(authenticationRepsonse) };
155   - }
156   - catch(SqlException e){
157   -
158   - logger.Fatal("SqlException occured for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
159   -
160   - ArrayList supportMailList = UserUtility.GetSupportMailList();
161   - string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT;
162   - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
163   - UserUtility.SendEmail(credentials, supportMailList, "", mailSubject, mailBody);
164   -
165   - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) };
166   - }
167   - catch (Exception e)
168   - {
169   -
170   - logger.Fatal("Exception occured for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
171   -
172   - ArrayList supportMailList = UserUtility.GetSupportMailList();
173   - string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT;
174   - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
175   - UserUtility.SendEmail(credentials, supportMailList, "", mailSubject, mailBody);
176   -
177   - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) };
178   -
179   - }
180   -
181   - }
182   -
183   - private static void GetModulesBasedOnUserType(User userInfo)
184   - {
185   - //based on old .net code(AIA flex), we get modules based on licenseId if licenseid>0.
186   - //we verified in database that only superadmin has no licenseid so getting all modules for supeadmin
187   - int licenseId, editionId;
188   - AIAHTML5.API.Models.Users.getLicenseIdForThisUser(userInfo.Id, out licenseId, out editionId);
189   -
190   - userInfo.LicenseId = licenseId;
191   - userInfo.EditionId = editionId;
192   -
193   - //if (userInfo.UserType == AIAHTML5.API.Models.User.SUPER_ADMIN)
194   - if(userInfo.LicenseId == 0)
195   - {
196   - userInfo.Modules = AIAHTML5.API.Models.Users.getAllModulesList();
197   -
198   - //Insert user login detail
199   - AIAHTML5.API.Models.Users.insertLoginDetails(userInfo.Id);
200   - }
201   - else
202   - {
203   - CheckLicenseStatus(userInfo);
204   -
205   - if(!userInfo.IsSubscriptionExpired){
206   - GetModulesBasedOnLicense(userInfo,false);
207   - }
208   - }
209   - }
210   -
211   - private static void CheckLicenseStatus(User userInfo)
212   - {
213   - //05.1 For normal user need to get the license details, get the license id for authenticated user
214   - //int licenseId, editionId;
215   - //AIAHTML5.API.Models.Users.getLicenseIdForThisUser(userInfo.Id, out licenseId, out editionId);
216   -
217   - //userInfo.LicenseId = licenseId;
218   - //userInfo.EditionId = editionId;
219   -
220   - //05.2 get license details
221   - userInfo.LicenseInfo = AIAHTML5.API.Models.Users.getLicenseDetails(userInfo.LicenseId);
222   -
223   - if (userInfo.LicenseInfo != null)
224   - {
225   - //05.3 get licenseSubscription details
226   - userInfo.LicenseSubscriptions = AIAHTML5.API.Models.Users.getLicenseSubscriptionDetails(userInfo.LicenseId);
227   -
228   - //05.4 check the License expiration irespective of either user is active or not because on AIA
229   - //we shows the License expiration message for inactive users too
230   - string expirationDate = null;
231   - bool isLicenseExpired = false;
232   -
233   - if (userInfo.LicenseSubscriptions != null)
234   - {
235   - isLicenseExpired = AIAHTML5.API.Models.Users.checkIfLicenseExpired(userInfo.LicenseSubscriptions, out expirationDate);
236   - }
237   -
238   - if (isLicenseExpired)
239   - {
240   - userInfo.IsSubscriptionExpired = isLicenseExpired;
241   - userInfo.SubscriptionExpirationDate = expirationDate;
242   - }
243   - }
244   -
245   - else
246   - {
247   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
248   - logger.Debug("userInfo.LicenseInfo is null for userInfo.LicenseId= "+userInfo.LicenseId);
249   - }
250   - }
251   -
252   - private static void GetModulesBasedOnLicense(User userInfo, bool isLicenseExpired)
253   - {
254   -
255   - //05.6.1
256   - if (userInfo.LicenseInfo.IsActive)
257   - {
258   - if (!userInfo.LicenseInfo.IsTermAccepted)
259   - {
260   - ArrayList termsList = AIAHTML5.API.Models.Users.getTermsAndConditions();
261   - foreach (Hashtable item in termsList)
262   - {
263   - userInfo.TermsAndConditionsTitle = item[AIAConstants.KEY_TITLE].ToString();
264   - userInfo.TermsAndConditionsText = item[AIAConstants.KEY_CONTENT].ToString();
265   - }
266   - }
267   - else
268   - {
269   - userInfo.Modules = AIAHTML5.API.Models.Users.getModuleListByLicenseId(userInfo.LicenseId);
270   -
271   - //Insert user login detail
272   - AIAHTML5.API.Models.Users.insertLoginDetails(userInfo.Id);
273   - }
274   - }
275   - else
276   - {
277   - userInfo.LoginFailureCauseId = ErrorHelper.E_LICENCE_IS_INACTIVE;
278   -
279   - }
280   - }
281   -
282   -
283   - }
284   -}
285 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Controllers/ForgotUserController.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Net;
5   -using System.Net.Http;
6   -using System.Web.Http;
7   -using AIAHTML5.API.Constants;
8   -using log4net;
9   -using Newtonsoft.Json;
10   -using Newtonsoft.Json.Linq;
11   -using AIAHTML5.API.Models;
12   -using AIAHTML5.API.Utility;
13   -using System.Collections;
14   -using System.Data.SqlClient;
15   -
16   -namespace AIAHTML5.API.Controllers
17   -{
18   - public class ForgotUserController : ApiController
19   - {
20   - // GET api/<controller>
21   - public IEnumerable<string> Get()
22   - {
23   - return new string[] { "value1", "value2" };
24   - }
25   -
26   - // GET api/<controller>/5
27   - public string Get(int id)
28   - {
29   - return "value";
30   - }
31   -
32   - public HttpResponseMessage Post([FromBody]JObject userInfo)
33   - {
34   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
35   - logger.Debug("inside POST in ForgotUserController for emailId = " + userInfo["emailId"]);
36   - try
37   - {
38   - dynamic userData = AIAHTML5.API.Models.Users.GetUserByEmail(userInfo);
39   -
40   - if (Convert.ToString(userData) != AIAConstants.USER_NOT_FOUND)
41   - {
42   - //logger.Debug("inside if in ForgotUserController userData.loginId= " + userData.LoginId);
43   - bool isMailSent = false;
44   -
45   - logger.Debug("1. inside if in ForgotUserController userDetails= " + userData.ToString());
46   -
47   - if (Convert.ToBoolean(userInfo["isMailForForgotPassword"]))
48   - {
49   - if (Convert.ToBoolean(userInfo["unblockUser"]))
50   - {
51   - logger.Debug("2. unblockUser= " + Convert.ToBoolean(userInfo["unblockUser"]));
52   - isMailSent = AIAHTML5.API.Models.UserUtility.SendEmail(userData, Convert.ToBoolean(userInfo["isMailForForgotPassword"]), Convert.ToBoolean(userInfo["unblockUser"]));
53   - }
54   - else
55   - {
56   - logger.Debug("2. isMailForForgotPassword= " + Convert.ToBoolean(userInfo["isMailForForgotPassword"]));
57   - isMailSent = AIAHTML5.API.Models.UserUtility.SendEmail(userData, Convert.ToBoolean(userInfo["isMailForForgotPassword"]));
58   - }
59   -
60   - }
61   - else
62   - {
63   - logger.Debug("3. isMailForForgotPassword= " + Convert.ToBoolean(userInfo["isMailForForgotPassword"]));
64   -
65   - isMailSent = AIAHTML5.API.Models.UserUtility.SendEmail(userData, Convert.ToBoolean(userInfo["isMailForForgotPassword"]));
66   - }
67   - logger.Debug("isMailSent= " + isMailSent);
68   - if (isMailSent)
69   - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MAIL_SENT) };
70   - else
71   - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.MAIL_NOT_SENT) };
72   - }
73   - else
74   - {
75   - logger.Debug("inside else in ForgotUserController userData= " + userData);
76   - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.USER_NOT_FOUND) };
77   - }
78   - }
79   - catch (SqlException e)
80   - {
81   -
82   - logger.Fatal("SqlException occured for emailId =" + userInfo["emailId"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
83   -
84   - ArrayList supportMailList = UserUtility.GetSupportMailList();
85   - string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT;
86   - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
87   - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody);
88   -
89   - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) };
90   - }
91   - catch (Exception e)
92   - {
93   - logger.Fatal("Exception occured for emailId =" + userInfo["emailId"].ToString()+ "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
94   -
95   - ArrayList supportMailList = UserUtility.GetSupportMailList();
96   - string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT;
97   - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
98   - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody);
99   - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) };
100   -
101   - }
102   - }
103   -
104   -
105   - }
106   -}
107 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Controllers/LicenseTermConditionController.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Net;
5   -using System.Net.Http;
6   -using System.Web.Http;
7   -using log4net;
8   -using AIAHTML5.API.Constants;
9   -using Newtonsoft.Json;
10   -using Newtonsoft.Json.Linq;
11   -using AIAHTML5.API.Models;
12   -using System.Collections;
13   -using System.Data.SqlClient;
14   -
15   -namespace AIAHTML5.API.Controllers
16   -{
17   - public class LicenseTermConditionController : ApiController
18   - {
19   - // GET api/licensetermcondition
20   - public IEnumerable<string> Get()
21   - {
22   - return new string[] { "value1", "value2" };
23   - }
24   -
25   - // GET api/licensetermcondition/5
26   - public string Get(int id)
27   - {
28   - return "value";
29   - }
30   -
31   - // POST api/licensetermcondition
32   - public HttpResponseMessage Post([FromBody]JObject userLicenseInfo)
33   - {
34   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
35   - logger.Debug("inside POST");
36   - HttpResponseMessage response = null;
37   - Newtonsoft.Json.Linq.JObject userInfo = new Newtonsoft.Json.Linq.JObject();
38   - userInfo.Add("accountNumber", userLicenseInfo["licenseeAccountNumber"]);
39   -
40   - try
41   - {
42   - int licenseId = Convert.ToInt32(userLicenseInfo["userLicenseId"]);
43   - User user = new User();
44   - dynamic userModules = null; // assigned to avoid unassigned local variable compilation error;
45   -
46   - dynamic result = AIAHTML5.API.Models.Users.UpdateLicenseTerm(userLicenseInfo);
47   -
48   - if (Convert.ToInt32(result) > 0)
49   - {
50   - user.Modules = Users.getModuleListByLicenseId(licenseId);
51   - userModules = JsonConvert.SerializeObject(user);
52   -
53   - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(userModules) };
54   - }
55   - else
56   - {
57   - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.LICENSE_TERM_CONDITION_UPDATE_FAILED) };
58   - }
59   -
60   - return response;
61   - }
62   - catch (SqlException e)
63   - {
64   -
65   - logger.Fatal("SqlException occured for licenseeAccountNumber =" + userLicenseInfo["licenseeAccountNumber"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
66   -
67   - ArrayList supportMailList = UserUtility.GetSupportMailList();
68   - string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT;
69   - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
70   - UserUtility.SendEmail(userLicenseInfo, supportMailList, "", mailSubject, mailBody);
71   -
72   - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) };
73   - }
74   - catch (Exception ex)
75   - {
76   - logger.Fatal("Exception in UpdateLicenseTerm for AccountNumber =" + userLicenseInfo["licenseeAccountNumber"] + " Exception= " + ex.Message + ", STACKTRACE: " + ex.StackTrace);
77   -
78   - ArrayList supportMailList = UserUtility.GetSupportMailList();
79   - string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT;
80   - string mailBody = "MESSAGE: " + ex.Message + ", STACKTRACE: " + ex.StackTrace;
81   - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody);
82   - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) };
83   - return response;
84   - }
85   -
86   - }
87   -
88   -
89   - // PUT api/licensetermcondition/5
90   - public void Put(int id, [FromBody]string value)
91   - {
92   - }
93   -
94   - // DELETE api/licensetermcondition/5
95   - public void Delete(int id)
96   - {
97   - }
98   - }
99   -}
400-SOURCECODE/AIAHTML5.API/Controllers/PixelLocationsController.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Net;
5   -using System.Net.Http;
6   -using System.Web.Http;
7   -using AIAHTML5.API.Models;
8   -
9   -namespace AIAHTML5.API.Controllers
10   -{
11   - public class PixelLocationsController : ApiController
12   - {
13   - // GET: api/PixelLocations
14   - public IEnumerable<string> Get()
15   - {
16   - return new string[] { "value1", "value2" };
17   - }
18   -
19   - // GET: api/PixelLocations/5
20   - public HttpResponseMessage Get(string layerNumber, string bodyViewIndex, string systemNumber, string zoomLevel)
21   - {
22   - dynamic bodyRegions = PixelLocator.GetBodyRegionsPixelData(layerNumber, bodyViewIndex, systemNumber, zoomLevel);
23   - return new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(bodyRegions) };
24   - }
25   -
26   - // POST: api/PixelLocations
27   - public void Post([FromBody]string value)
28   - {
29   - }
30   -
31   - // PUT: api/PixelLocations/5
32   - public void Put(int id, [FromBody]string value)
33   - {
34   - }
35   -
36   - // DELETE: api/PixelLocations/5
37   - public void Delete(int id)
38   - {
39   - }
40   - }
41   -}
400-SOURCECODE/AIAHTML5.API/Controllers/ResetPasswordController.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Net;
5   -using System.Net.Http;
6   -using System.Web.Http;
7   -using AIAHTML5.API.Constants;
8   -using log4net;
9   -using Newtonsoft.Json;
10   -using Newtonsoft.Json.Linq;
11   -using AIAHTML5.API.Models;
12   -using AIAHTML5.API.Utility;
13   -using System.Collections;
14   -using System.Data.SqlClient;
15   -
16   -namespace AIAHTML5.API.Controllers
17   -{
18   - public class ResetPasswordController : ApiController
19   - {
20   - // GET api/<controller>
21   - public IEnumerable<string> Get()
22   - {
23   - return new string[] { "value1", "value2" };
24   - }
25   -
26   - // GET api/<controller>/5
27   - public string Get(int id)
28   - {
29   - return "value";
30   - }
31   -
32   - // POST api/<controller>
33   - //public void Post([FromBody]string value)
34   - //{
35   - //}
36   - public HttpResponseMessage Post([FromBody]JObject userInfo)
37   - {
38   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
39   - logger.Debug("inside POST");
40   - HttpResponseMessage response = null;
41   - try
42   - {
43   - dynamic userData = AIAHTML5.API.Models.Users.GetUserByEmail(userInfo);
44   -
45   - if (Convert.ToString(userData) != AIAConstants.USER_NOT_FOUND)
46   - {
47   - int result = 0;
48   - if (!String.IsNullOrEmpty(userInfo["newPassword"].ToString()))
49   - {
50   - result = AIAHTML5.API.Models.Users.UpdatePassword(userInfo, userData.LoginId, userData.EmailId);
51   - if (result > 0)
52   - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.PASSWORD_UPDATE_SUCCESS) };
53   - else
54   - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.PASSWORD_UPDATE_FAILED) };
55   - }
56   - }
57   - else
58   - {
59   - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.USER_NOT_FOUND) };
60   - }
61   - return response;
62   - }
63   - catch (SqlException e)
64   - {
65   -
66   - logger.Fatal("SqlException occured for loginId =" + userInfo["emailId"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
67   -
68   - ArrayList supportMailList = UserUtility.GetSupportMailList();
69   - string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT;
70   - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
71   - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody);
72   -
73   - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) };
74   - }
75   - catch (Exception e)
76   - {
77   - logger.Fatal("Exception occured for loginId =" + userInfo["emailId"].ToString() + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
78   -
79   - ArrayList supportMailList = UserUtility.GetSupportMailList();
80   - string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT;
81   - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
82   - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody);
83   - response = new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) };
84   - return response;
85   - }
86   -
87   -
88   - }
89   -
90   - // PUT api/<controller>/5
91   - public void Put(int id, [FromBody]string value)
92   - {
93   - }
94   -
95   - // DELETE api/<controller>/5
96   - public void Delete(int id)
97   - {
98   - }
99   - }
100   -}
101 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Controllers/UnblockUserController.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Net;
5   -using System.Net.Http;
6   -using System.Web.Http;
7   -using AIAHTML5.API.Constants;
8   -using AIAHTML5.API.Models;
9   -using AIAHTML5.API.Utility;
10   -using log4net;
11   -using System.Collections;
12   -using System.Data.SqlClient;
13   -
14   -namespace AIAHTML5.API.Controllers
15   -{
16   - public class UnblockUserController : ApiController
17   - {
18   - // GET api/unblockuser
19   - public IEnumerable<string> Get()
20   - {
21   - return new string[] { "value1", "value2" };
22   - }
23   -
24   - // GET api/unblockuser/5
25   - public string Get(int id)
26   - {
27   - return "value";
28   - }
29   -
30   - // POST api/unblockuser
31   - public HttpResponseMessage Post([FromBody]string emailId)
32   - {
33   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
34   - logger.Debug("inside POST in UnblockUserController for emailId = " + emailId);
35   -
36   - HttpResponseMessage response = null;
37   - Newtonsoft.Json.Linq.JObject userInfo = new Newtonsoft.Json.Linq.JObject();
38   - userInfo.Add("emailId", emailId);
39   -
40   - try
41   - {
42   - User user = AIAHTML5.API.Models.DBModel.GetUserDetailsByEmailId(emailId);
43   -
44   - if (user!=null)
45   - {
46   - int result = 0;
47   -
48   - logger.Debug("1. inside if in UnblockUserController userDetails= " + user.ToString());
49   -
50   - result = AIAHTML5.API.Models.DBModel.UnblockUser(user.Id);
51   -
52   - if (result > 0)
53   - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.USER_UNBLOCK_SUCCESS) };
54   - else
55   - response = new HttpResponseMessage { StatusCode = HttpStatusCode.OK, Content = new StringContent(AIAConstants.UNABLE_TO_UNBLOCK) };
56   - }
57   - return response;
58   - }
59   - catch (SqlException e)
60   - {
61   -
62   - logger.Fatal("SqlException occured for emailId =" + emailId + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
63   -
64   - ArrayList supportMailList = UserUtility.GetSupportMailList();
65   - string mailSubject = AIAConstants.SQL_CONNECTION_ERROR_MAIL_SUBJECT;
66   - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
67   - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody);
68   -
69   - return new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.SQL_CONNECTION_ERROR) };
70   - }
71   - catch (Exception e)
72   - {
73   -
74   - logger.Fatal("Exception occured for emailId =" + emailId + "Exception= " + e.Message + ", STACKTRACE: " + e.StackTrace);
75   -
76   - ArrayList supportMailList = UserUtility.GetSupportMailList();
77   - string mailSubject = AIAConstants.EXCEPTION_IN_AIAHTML5_MAIL_SUBJECT;
78   - string mailBody = "MESSAGE: " + e.Message + ", STACKTRACE: " + e.StackTrace;
79   - UserUtility.SendEmail(userInfo, supportMailList, "", mailSubject, mailBody);
80   - response = new HttpResponseMessage { StatusCode = HttpStatusCode.InternalServerError, Content = new StringContent(AIAConstants.EXCEPTION_OCCURED) };
81   - return response;
82   - }
83   -
84   - }
85   -
86   - }
87   -}
88 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Models/DBModel.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Web;
5   -using AIAHTML5.API.Properties;
6   -using AIAHTML5.API.Constants;
7   -using log4net;
8   -using System.Data;
9   -using System.Data.SqlClient;
10   -using Newtonsoft.Json;
11   -using System.Collections;
12   -
13   -namespace AIAHTML5.API.Models
14   -{
15   - public class DBModel
16   - {
17   - static string dbConnectionString = System.Configuration.ConfigurationManager.AppSettings["AIADatabaseV5Context"];
18   -
19   -
20   - private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
21   -
22   -
23   - public DBModel() { }
24   -
25   -
26   - protected static DataSet GetDataFromStoredProcedure(string commandText)
27   - {
28   -
29   - logger.Debug(" Inside GetSQLData for command text = " + commandText);
30   - DataSet ds = null;
31   - SqlConnection conn = new SqlConnection(dbConnectionString);
32   - SqlCommand cmd = new SqlCommand(commandText, conn);
33   - cmd.CommandType = CommandType.StoredProcedure;
34   - SqlDataAdapter da = new SqlDataAdapter();
35   - da.SelectCommand = cmd;
36   - ds = new DataSet();
37   - da.Fill(ds);
38   -
39   - return ds;
40   - }
41   -
42   - internal ArrayList GetAllModules()
43   - {
44   - logger.Debug(" Inside GetAllModules");
45   -
46   - ArrayList arrUserModules = new ArrayList();
47   -
48   - Hashtable userModuleHash = new Hashtable();
49   -
50   - string sp = DBConstants.GET_ALL_MODULES;
51   -
52   - DataSet ds = DBModel.GetDataFromStoredProcedure(sp);
53   -
54   - if (ds != null && ds.Tables.Count > 0)
55   - {
56   - DataTable dt = ds.Tables[0];
57   -
58   - foreach (DataRow drModule in dt.Rows)
59   - {
60   - userModuleHash = new Hashtable();
61   - userModuleHash.Add(AIAConstants.KEY_ID, drModule["Id"]);
62   - userModuleHash.Add(AIAConstants.KEY_NAME, drModule["Name"]);
63   - userModuleHash.Add(AIAConstants.KEY_SLUG, drModule["Slug"]);
64   - arrUserModules.Add(userModuleHash);
65   - }
66   - }
67   -
68   - return arrUserModules;
69   - }
70   -
71   - internal static User GetUserDetailsByLoginId(string loginId)
72   - {
73   - logger.Debug(" Inside GetUserDetailsByLoginId for LoginId = " + loginId);
74   -
75   - User objUser = null;
76   - DBModel objModel = new DBModel();
77   -
78   -
79   - SqlConnection conn = new SqlConnection(dbConnectionString);
80   - SqlCommand cmd = new SqlCommand();
81   - SqlDataAdapter da = new SqlDataAdapter();
82   - SqlParameter param;
83   - DataSet ds = new DataSet();
84   -
85   - cmd.Connection = conn;
86   - cmd.CommandText = DBConstants.GET_USER_DELAILS_BY_LOGIN_ID;
87   - cmd.CommandType = CommandType.StoredProcedure;
88   -
89   - param = new SqlParameter("@sLoginId", loginId);
90   - param.Direction = ParameterDirection.Input;
91   - param.DbType = DbType.String;
92   - cmd.Parameters.Add(param);
93   -
94   - da.SelectCommand = cmd;
95   - DataTable dt = new DataTable();
96   - da.Fill(dt);
97   -
98   -
99   - if (dt != null && dt.Rows.Count > 0)
100   - {
101   - foreach (DataRow dr in dt.Rows)
102   - {
103   - int tempVal;
104   - DateTime date;
105   - objUser = new User();
106   -
107   - objUser.Id = Convert.ToInt32(dr["Id"]);
108   - objUser.FirstName = dr["FirstName"].ToString();
109   - objUser.LastName = dr["LastName"].ToString();
110   - objUser.EmailId = dr["EmailId"].ToString();
111   - objUser.LoginId = dr["LoginId"].ToString();
112   - objUser.Password = dr["Password"].ToString();
113   - objUser.SecurityQuestionId = Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null;
114   - objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ;
115   - objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null;
116   - objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
117   - objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null;
118   - objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null;
119   - objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
120   - objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
121   - objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
122   - objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
123   - }
124   - }
125   -
126   -
127   - return objUser;
128   - }
129   -
130   - internal Hashtable GetLicenseDetailByUserId(int userId)
131   - {
132   - logger.Debug(" Inside GetUserLicenseDetailByUserId for UserId = " + userId);
133   -
134   - Hashtable hash = new Hashtable();
135   -
136   - SqlConnection conn = new SqlConnection(dbConnectionString);
137   - SqlCommand cmd = new SqlCommand();
138   - SqlDataAdapter adapter;
139   - SqlParameter param;
140   - DataSet ds = new DataSet();
141   -
142   - cmd.Connection = conn;
143   - cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_USER_ID;
144   - cmd.CommandType = CommandType.StoredProcedure;
145   -
146   - param = new SqlParameter("@iUserId", userId);
147   - param.Direction = ParameterDirection.Input;
148   - param.DbType = DbType.Int32;
149   - cmd.Parameters.Add(param);
150   -
151   - adapter = new SqlDataAdapter(cmd);
152   - adapter.Fill(ds);
153   -
154   - if (ds != null && ds.Tables.Count > 0)
155   - {
156   - if (ds.Tables[0].Rows.Count > 0)
157   - {
158   - hash.Add(AIAConstants.LICENSE_KEY_ID, ds.Tables[0].Rows[0][0]);
159   - hash.Add(AIAConstants.EDITION_KEY_ID, ds.Tables[0].Rows[0][1]);
160   - }
161   - }
162   -
163   - return hash;
164   - }
165   -
166   - internal ArrayList GetUserModulesByLicenseId(int licenseId)
167   - {
168   - logger.Debug(" Inside GetUserModulesByLicenseId for LicenseId = " + licenseId);
169   -
170   - ArrayList userModulelist = new ArrayList();
171   -
172   - Hashtable modulesHash;
173   - DataSet ds = new DataSet();
174   -
175   - SqlConnection conn = new SqlConnection(dbConnectionString);
176   - SqlCommand cmd = new SqlCommand();
177   - SqlDataAdapter adapter;
178   - SqlParameter param;
179   -
180   - cmd.Connection = conn;
181   - cmd.CommandText = DBConstants.GET_USER_MODULES_BY_LICENSE_ID;
182   - cmd.CommandType = CommandType.StoredProcedure;
183   -
184   - param = new SqlParameter("@iLicenseId", licenseId);
185   - param.Direction = ParameterDirection.Input;
186   - param.DbType = DbType.Int32;
187   - cmd.Parameters.Add(param);
188   -
189   - adapter = new SqlDataAdapter(cmd);
190   - adapter.Fill(ds);
191   -
192   -
193   - if (ds != null && ds.Tables.Count > 0)
194   - {
195   - DataTable dt = ds.Tables[0];
196   -
197   - if (dt.Rows.Count > 0)
198   - {
199   - foreach (DataRow dr in dt.Rows)
200   - {
201   - modulesHash = new Hashtable();
202   - modulesHash.Add(AIAConstants.KEY_ID, dr["Id"]);
203   - modulesHash.Add(AIAConstants.KEY_NAME, dr["Title"]);
204   - modulesHash.Add(AIAConstants.KEY_SLUG, dr["Slug"]);
205   - userModulelist.Add(modulesHash);
206   - }
207   - }
208   - }
209   -
210   -
211   - return userModulelist;
212   - }
213   -
214   - protected string GetUserTypeStringById(int userTypeId)
215   - {
216   - string userType = string.Empty;
217   -
218   - switch (userTypeId)
219   - {
220   - case (int)UserType.SUPER_ADMIN:
221   - userType = User.SUPER_ADMIN;
222   - break;
223   - case (int)UserType.GENERAL_ADMIN:
224   - userType = User.GENERAL_ADMIN;
225   - break;
226   - case (int)UserType.DISTRICT_ADMIN:
227   - userType = User.DISTRICT_ADMIN;
228   - break;
229   - case (int)UserType.CLIENT_ADMIN:
230   - userType = User.CLIENT_ADMIN;
231   - break;
232   - case (int)UserType.SINGLE_USER:
233   - userType = User.SINGLE_USER;
234   - break;
235   - case (int)UserType.CONCURRENT_USER:
236   - userType = User.CONCURRENT_USER;
237   - break;
238   - case (int)UserType.RESELLER:
239   - userType = User.RESELLER;
240   - break;
241   - case (int)UserType.TEST_ACCOUNT:
242   - userType = User.TEST_ACCOUNT;
243   - break;
244   - case (int)UserType.SITE_USER:
245   - userType = User.SITE_USER;
246   - break;
247   - }
248   - return userType;
249   - }
250   -
251   - internal static User GetUserDetailsByEmailId(string emailId)
252   - {
253   - logger.Debug(" Inside GetUserDetailsByEmailId for emailId = " + emailId);
254   -
255   - User objUser = null;
256   - DBModel objModel = new DBModel();
257   -
258   - SqlConnection conn = new SqlConnection(dbConnectionString);
259   - SqlCommand cmd = new SqlCommand();
260   - SqlDataAdapter adapter;
261   - SqlParameter param;
262   - DataSet ds = new DataSet();
263   -
264   - cmd.Connection = conn;
265   - cmd.CommandText = DBConstants.GET_USER_DETAILS_BY_EMAILID;
266   - cmd.CommandType = CommandType.StoredProcedure;
267   -
268   - param = new SqlParameter("@sEmailId", emailId);
269   - param.Direction = ParameterDirection.Input;
270   - param.DbType = DbType.String;
271   - cmd.Parameters.Add(param);
272   -
273   - adapter = new SqlDataAdapter(cmd);
274   - adapter.Fill(ds);
275   -
276   -
277   - if (ds != null && ds.Tables.Count > 0)
278   - {
279   - DataTable dt = ds.Tables[0];
280   -
281   - if (dt.Rows.Count > 0)
282   - {
283   - foreach (DataRow dr in dt.Rows)
284   - {
285   - int tempVal;
286   - DateTime date;
287   - objUser = new User();
288   -
289   - objUser.Id = Convert.ToInt32(dr["Id"]);
290   - objUser.FirstName = dr["FirstName"].ToString();
291   - objUser.LastName = dr["LastName"].ToString();
292   - objUser.EmailId = dr["EmailId"].ToString();
293   - objUser.LoginId = dr["LoginId"].ToString();
294   - objUser.Password = dr["Password"].ToString();
295   - objUser.SecurityQuestionId = Int32.TryParse(dr["SecurityQuestionId"].ToString(), out tempVal) ? tempVal : (int?)null;
296   - objUser.SecurityAnswer = dr["SecurityAnswer"].ToString(); ;
297   - objUser.CreatorId = Int32.TryParse(dr["CreatorId"].ToString(), out tempVal) ? tempVal : (int?)null;
298   - objUser.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
299   - objUser.DeactivationDate = DateTime.TryParse(dr["DeactivationDate"].ToString(), out date) ? date : (DateTime?)null;
300   - objUser.ModifierId = Int32.TryParse(dr["ModifierId"].ToString(), out tempVal) ? tempVal : (int?)null;
301   - objUser.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
302   - objUser.UserTypeId = Convert.ToInt32(dr["UserTypeId"]);
303   - objUser.UserType = objModel.GetUserTypeStringById(Convert.ToInt32(dr["UserTypeId"]));
304   - objUser.IsActive = Convert.ToBoolean(dr["IsActive"]);
305   - }
306   - }
307   - }
308   -
309   - return objUser;
310   - }
311   -
312   - internal static int UpdateUserPassword(dynamic userInfo, string loginId, string emailId)
313   - {
314   - logger.Debug(" Inside UpdateUserPassword for LoginId: " + loginId + ", EmailId: " + emailId);
315   -
316   - int result = 0;
317   -
318   - SqlConnection conn = null;
319   - try
320   - {
321   - conn = new SqlConnection(dbConnectionString);
322   - SqlCommand cmd = new SqlCommand();
323   - conn.Open();
324   - cmd.Connection = conn;
325   - cmd.CommandText = DBConstants.UPDATE_USER_PASSWORD;
326   - cmd.CommandType = CommandType.StoredProcedure;
327   - cmd.Parameters.AddWithValue("@sLoginId", loginId);
328   - cmd.Parameters.AddWithValue("@sEmailId", emailId);
329   - cmd.Parameters.AddWithValue("@sNewPassword", userInfo["newPassword"].ToString());
330   - result = cmd.ExecuteNonQuery();
331   -
332   - }
333   - catch (SqlException ex)
334   - {
335   - conn.Close();
336   - logger.Fatal("Exception in UpdateUserPassword for LoginId: " + loginId + ", EmailId: " + emailId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
337   - throw;
338   - }
339   - finally
340   - {
341   - conn.Dispose();
342   - }
343   - return result;
344   - }
345   -
346   - internal LicenseSubscriptionDetails GetLicenseSubscriptionDetailsByLicenseId(int licenseId)
347   - {
348   - logger.Debug(" Inside GetLicenseSubscriptionDetailsByLicenseId for LicenseId = " + licenseId);
349   -
350   - LicenseSubscriptionDetails licenseSubscriptionDetails = null;
351   -
352   - SqlConnection conn = new SqlConnection(dbConnectionString);
353   - SqlCommand cmd = new SqlCommand();
354   - SqlDataAdapter adapter;
355   - SqlParameter param;
356   - DataSet ds = new DataSet();
357   -
358   - cmd.Connection = conn;
359   - cmd.CommandText = DBConstants.GET_SUBSCRIPTION_DETAILS_BY_LICENSE_ID;
360   - cmd.CommandType = CommandType.StoredProcedure;
361   -
362   - param = new SqlParameter("@iLicenseId", licenseId);
363   - param.Direction = ParameterDirection.Input;
364   - param.DbType = DbType.Int32;
365   - cmd.Parameters.Add(param);
366   -
367   - adapter = new SqlDataAdapter(cmd);
368   - adapter.Fill(ds);
369   -
370   - if (ds != null && ds.Tables.Count > 0)
371   - {
372   - licenseSubscriptionDetails = new LicenseSubscriptionDetails();
373   - DataTable dt = ds.Tables[0];
374   -
375   - if (dt.Rows.Count > 0)
376   - {
377   - foreach (DataRow dr in dt.Rows)
378   - {
379   - int tempVal;
380   - DateTime date;
381   - licenseSubscriptionDetails.Id = Convert.ToInt32(dr["Id"]);
382   - licenseSubscriptionDetails.LicenseId = Convert.ToInt32(dr["LicenseId"]);
383   - licenseSubscriptionDetails.SubscriptionPlanId = Int32.TryParse(dr["SubscriptionPlanId"].ToString(), out tempVal) ? tempVal : (int?)null;
384   - licenseSubscriptionDetails.SubscriptionValidFrom = DateTime.TryParse(dr["SubscriptionValidFrom"].ToString(), out date) ? date : (DateTime?)null;
385   - licenseSubscriptionDetails.SubscriptionValidThrough = DateTime.TryParse(dr["SubscriptionValidThrough"].ToString(), out date) ? date : (DateTime?)null;
386   - licenseSubscriptionDetails.RenewalDate = DateTime.TryParse(dr["RenewalDate"].ToString(), out date) ? date : (DateTime?)null;
387   - licenseSubscriptionDetails.PaymentMode = dr["PaymentMode"].ToString();
388   - licenseSubscriptionDetails.TotalAmount = Convert.ToDouble(dr["TotalAmount"]);
389   - licenseSubscriptionDetails.AmountPaid = Convert.ToDouble(dr["AmountPaid"]);
390   - licenseSubscriptionDetails.AmountPending = Convert.ToDouble(dr["AmountPending"]);
391   - licenseSubscriptionDetails.NoOfImages = Convert.ToInt32(dr["NoofImages"]);
392   - }
393   - }
394   - }
395   -
396   -
397   -
398   - return licenseSubscriptionDetails;
399   - }
400   -
401   - internal License GetLicenseDetailsByLicenseId(int licenseId)
402   - {
403   - logger.Debug(" inside GetLicenseDetailsByLicenseId for LicenseId = " + licenseId);
404   -
405   - License license = null;
406   -
407   - SqlConnection conn = new SqlConnection(dbConnectionString);
408   - SqlCommand cmd = new SqlCommand();
409   - SqlDataAdapter adapter;
410   - SqlParameter param;
411   - DataSet ds = new DataSet();
412   -
413   - cmd.Connection = conn;
414   - cmd.CommandText = DBConstants.GET_LICENSE_DETAILS_BY_ID;
415   - cmd.CommandType = CommandType.StoredProcedure;
416   -
417   - param = new SqlParameter("@Id", licenseId);
418   - param.Direction = ParameterDirection.Input;
419   - param.DbType = DbType.Int32;
420   - cmd.Parameters.Add(param);
421   -
422   - adapter = new SqlDataAdapter(cmd);
423   - adapter.Fill(ds);
424   -
425   - if (ds != null && ds.Tables.Count > 0)
426   - {
427   -
428   - DataTable dt = ds.Tables[0];
429   - if (dt.Rows.Count > 0)
430   - {
431   - license = new License();
432   -
433   - foreach (DataRow dr in dt.Rows)
434   - {
435   - DateTime date;
436   - license.Id = Convert.ToInt32(dr["Id"]);
437   - license.AccountNumber = dr["AccountNumber"].ToString();
438   - license.LicenseeFirstName = dr["LicenseeFirstName"].ToString();
439   - license.LicenseeLastName = dr["LicenseeLastName"].ToString();
440   - license.LicenseTypeId = Convert.ToInt32(dr["LicenseTypeId"]);
441   - license.InstitutionName = dr["InstitutionName"].ToString();
442   - license.Address1 = dr["Address1"].ToString();
443   - license.Address2 = dr["Address2"].ToString();
444   - license.CountryId = Convert.ToInt32(dr["CountryId"]);
445   - license.StateId = Convert.ToInt32(dr["StateId"]);
446   - license.City = dr["City"].ToString();
447   - license.Zip = dr["Zip"].ToString();
448   - license.Phone = dr["Phone"].ToString();
449   - license.EmailId = dr["EmailId"].ToString();
450   - license.TotalLogins = Convert.ToInt32(dr["TotalLogins"]);
451   - license.AccountTypeId = Convert.ToInt32(dr["AccountTypeId"]);
452   - license.IsActive = Convert.ToBoolean(dr["IsActive"]);
453   - license.IsDistrictSiteLicense = Convert.ToBoolean(dr["IsDistrictSiteLicense"]);
454   - license.CreationDate = Convert.ToDateTime(dr["CreationDate"]);
455   - license.ModifiedDate = DateTime.TryParse(dr["ModifiedDate"].ToString(), out date) ? date : (DateTime?)null;
456   - license.NoOfRenewals = Convert.ToInt32(dr["NoOfRenewals"]);
457   - license.IsTermAccepted = Convert.ToBoolean(dr["IsTermsAccepted"]);
458   - license.ProductId = dr["ProductId"].ToString();
459   - }
460   - }
461   - }
462   -
463   -
464   -
465   - return license;
466   - }
467   -
468   - internal static int UpdateLicenseTermStatus(string accountNumber)
469   - {
470   - logger.Debug(" inside UpdateLicenseTermStatus for AccountNumber = " + accountNumber);
471   -
472   - int result = 0;
473   - SqlConnection conn = null;
474   - try
475   - {
476   - conn = new SqlConnection(dbConnectionString);
477   - SqlCommand cmd = new SqlCommand();
478   - conn.Open();
479   - cmd.Connection = conn;
480   - cmd.CommandText = DBConstants.UPDATE_LICENSE_TERM_STATUS;
481   - cmd.CommandType = CommandType.StoredProcedure;
482   - cmd.Parameters.AddWithValue("@sAccountNumber", accountNumber);
483   - result = cmd.ExecuteNonQuery();
484   -
485   - }
486   - catch (SqlException ex)
487   - {
488   - logger.Fatal("Exception in UpdateLicenseTermStatus for AccountNumber =" + accountNumber + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
489   - throw;
490   - }
491   - finally
492   - {
493   - conn.Dispose();
494   - }
495   - return result;
496   - }
497   -
498   - internal static ArrayList GetTermsAndConditions()
499   - {
500   - logger.Debug(" inside GetTermsAndConditions");
501   -
502   - ArrayList arrTermsAndConditions = new ArrayList();
503   -
504   -
505   - Hashtable contentHash = null;
506   - string str = string.Empty;
507   - string spName = DBConstants.GET_TERMS_AND_CONDITIONS;
508   - DataSet ds = DBModel.GetDataFromStoredProcedure(spName);
509   -
510   - if (ds != null && ds.Tables.Count > 0)
511   - {
512   - DataTable dt = ds.Tables[0];
513   - if (dt.Rows.Count > 0)
514   - {
515   - foreach (DataRow dr in dt.Rows)
516   - {
517   - contentHash = new Hashtable();
518   - contentHash.Add(AIAConstants.KEY_TITLE, dr["Title"]);
519   - contentHash.Add(AIAConstants.KEY_CONTENT, dr["Content"]);
520   - arrTermsAndConditions.Add(contentHash);
521   - }
522   - }
523   - }
524   -
525   -
526   - return arrTermsAndConditions;
527   - }
528   -
529   - internal int InsertLoginDetails(int userId)
530   - {
531   - logger.Debug(" inside InsertLoginDetails for UserId= " + userId);
532   -
533   - int result = 0;
534   - SqlConnection conn = null;
535   - try
536   - {
537   - conn = new SqlConnection(dbConnectionString);
538   - SqlCommand cmd = new SqlCommand();
539   - conn.Open();
540   - cmd.Connection = conn;
541   - cmd.CommandText = DBConstants.INSERT_LOGIN_DETAIL;
542   - cmd.CommandType = CommandType.StoredProcedure;
543   - cmd.Parameters.AddWithValue("@iUserId", userId);
544   - result = cmd.ExecuteNonQuery();
545   - }
546   - catch (SqlException ex)
547   - {
548   - logger.Fatal("Exception in InsertLoginDetails for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE=" + ex.StackTrace);
549   - throw;
550   - }
551   - finally
552   - {
553   - conn.Dispose();
554   - }
555   -
556   - return result;
557   - }
558   -
559   - internal int InsertIncorrectLoginAttempts(int userId)
560   - {
561   - logger.Debug(" inside InsertIncorrectLoginAttempts for UserId= " + userId);
562   -
563   - int result = 0;
564   - SqlConnection conn = null;
565   - try
566   - {
567   - conn = new SqlConnection(dbConnectionString);
568   - SqlCommand cmd = new SqlCommand();
569   - conn.Open();
570   - cmd.Connection = conn;
571   - cmd.CommandText = DBConstants.INSERT_INCORRECT_LOGIN_ATTEMPTS;
572   - cmd.CommandType = CommandType.StoredProcedure;
573   - cmd.Parameters.AddWithValue("@iUserId", userId);
574   - result = cmd.ExecuteNonQuery();
575   - }
576   - catch (SqlException ex)
577   - {
578   - logger.Fatal("Exception in InsertIncorrectLoginAttempts for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
579   - throw;
580   - }
581   - finally
582   - {
583   - conn.Dispose();
584   - }
585   - return result;
586   - }
587   -
588   - internal int GetIncorrectLoginAttempts(int userId)
589   - {
590   - logger.Debug(" inside GetIncorrectLoginAttempts for UserId = " + userId);
591   -
592   - int count = 0;
593   -
594   - SqlConnection conn = new SqlConnection(dbConnectionString);
595   - SqlCommand cmd = new SqlCommand();
596   - cmd.Connection = conn;
597   - cmd.CommandText = DBConstants.GET_INCORRECT_LOGIN_ATTEMPTS;
598   - cmd.CommandType = CommandType.StoredProcedure;
599   - cmd.Parameters.AddWithValue("@iUserId", userId);
600   - SqlDataAdapter da = new SqlDataAdapter();
601   - da.SelectCommand = cmd;
602   - DataSet ds = new DataSet();
603   - da.Fill(ds);
604   -
605   - if (ds != null && ds.Tables.Count > 0)
606   - {
607   - DataTable dt = ds.Tables[0];
608   -
609   - if (dt.Rows.Count > 0)
610   - {
611   - foreach (DataRow dr in dt.Rows)
612   - {
613   - foreach (DataColumn dc in dt.Columns)
614   - {
615   - count = Convert.ToInt32(dr[dc]);
616   - }
617   - }
618   - }
619   - }
620   -
621   -
622   - return count;
623   - }
624   -
625   - internal int UpdateIncorrectLoginAttempts(int userId)
626   - {
627   - logger.Debug(" inside UpdateIncorrectLoginAttempts for UserId= " + userId);
628   -
629   - int result = 0;
630   - SqlConnection conn = null;
631   - try
632   - {
633   - conn = new SqlConnection(dbConnectionString);
634   - SqlCommand cmd = new SqlCommand();
635   - conn.Open();
636   - cmd.Connection = conn;
637   - cmd.CommandText = DBConstants.UPDATE_INCORRECT_LOGIN_ATTEMPTS;
638   - cmd.CommandType = CommandType.StoredProcedure;
639   - cmd.Parameters.AddWithValue("@iUserId", userId);
640   - result = cmd.ExecuteNonQuery();
641   - }
642   - catch (SqlException ex)
643   - {
644   - logger.Fatal("Exception in UpdateIncorrectLoginAttempts for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE=" + ex.StackTrace);
645   - throw;
646   - }
647   - finally
648   - {
649   - conn.Dispose();
650   - }
651   - return result;
652   - }
653   -
654   - public int DeleteIncorrectLoginAttempts(int userId)
655   - {
656   - logger.Debug(" inside DeleteIncorrectLoginAttempts for UserId= " + userId);
657   -
658   - int result = 0;
659   - SqlConnection conn = null;
660   - try
661   - {
662   - conn = new SqlConnection(dbConnectionString);
663   - SqlCommand cmd = new SqlCommand();
664   - conn.Open();
665   - cmd.Connection = conn;
666   - cmd.CommandText = DBConstants.DELETE_INCORRECT_LOGIN_ATTEMPTS;
667   - cmd.CommandType = CommandType.StoredProcedure;
668   - cmd.Parameters.AddWithValue("@iUserId", userId);
669   - result = cmd.ExecuteNonQuery();
670   - }
671   - catch (SqlException ex)
672   - {
673   - logger.Fatal("Exception in DeleteIncorrectLoginAttempts for UserId= " + userId + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
674   - throw;
675   - }
676   - finally
677   - {
678   - conn.Dispose();
679   - }
680   - return result;
681   - }
682   -
683   - protected ArrayList GetLoginFailureCauses()
684   - {
685   - logger.Debug(" Inside GetLoginFailureCauses");
686   -
687   - ArrayList failureCauseList = new ArrayList();
688   -
689   - Hashtable fcHash = null;
690   -
691   - string sp = DBConstants.GET_ALL_LOGIN_FAILURE_CAUSES;
692   -
693   - DataSet ds = DBModel.GetDataFromStoredProcedure(sp);
694   -
695   - if (ds.Tables.Count > 0)
696   - {
697   - DataTable dt = ds.Tables[0];
698   -
699   - if (dt.Rows.Count > 0)
700   - {
701   - foreach (DataRow drFailureCause in dt.Rows)
702   - {
703   - fcHash = new Hashtable();
704   - fcHash.Add(AIAConstants.KEY_ID, drFailureCause["Id"]);
705   - fcHash.Add(AIAConstants.KEY_DESCRIPTION, drFailureCause["Description"]);
706   - failureCauseList.Add(fcHash);
707   - }
708   - }
709   - }
710   -
711   - return failureCauseList;
712   - }
713   -
714   - internal int InsertUserLoginLog(string accountNumber, Int16 failureId, string referalUrl, string edition, string httpReferer)
715   - {
716   - logger.Debug(" inside InsertUserLoginLog for AccountNumber= " + accountNumber);
717   -
718   - int result = 0;
719   - SqlConnection conn = null;
720   - try
721   - {
722   - conn = new SqlConnection(dbConnectionString);
723   - SqlCommand cmd = new SqlCommand();
724   - conn.Open();
725   - cmd.Connection = conn;
726   - cmd.CommandText = DBConstants.INSERT_LOGIN_ERROR_LOG;
727   - cmd.CommandType = CommandType.StoredProcedure;
728   - cmd.Parameters.AddWithValue("@nvAccountNumber", accountNumber);
729   - cmd.Parameters.AddWithValue("@dtLogDate", DateTime.Now);
730   - cmd.Parameters.AddWithValue("@tiFailureId", failureId);
731   - cmd.Parameters.AddWithValue("@nvReferalUrl", referalUrl);
732   - cmd.Parameters.AddWithValue("@nvEdition", edition);
733   - cmd.Parameters.AddWithValue("@nvHttpReferer", httpReferer);
734   - result = cmd.ExecuteNonQuery();
735   - }
736   - catch (SqlException ex)
737   - {
738   - logger.Fatal("Exception in InsertUserLoginLog for AccountNumber= " + accountNumber + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
739   - throw;
740   - }
741   - finally
742   - {
743   - conn.Dispose();
744   - }
745   - return result;
746   - }
747   -
748   - internal BlockedUser GetUserBlockedStatusByUserId(int userId)
749   - {
750   - logger.Debug(" inside GetUserBlockedStatusByUserId for UserId= " + userId);
751   -
752   - BlockedUser blockedUser = null;
753   - DataTable dt = null;
754   -
755   - SqlConnection conn = new SqlConnection(dbConnectionString);
756   - SqlCommand cmd = new SqlCommand();
757   - cmd.Connection = conn;
758   - cmd.CommandText = DBConstants.GET_BLOCKED_USER_BY_USER_ID;
759   - cmd.CommandType = CommandType.StoredProcedure;
760   - cmd.Parameters.AddWithValue("@userId", userId);
761   - SqlDataAdapter da = new SqlDataAdapter();
762   - da.SelectCommand = cmd;
763   - dt = new DataTable();
764   - da.Fill(dt);
765   -
766   - if (dt != null && dt.Rows.Count > 0)
767   - {
768   - blockedUser = new BlockedUser();
769   - foreach (DataRow dr in dt.Rows)
770   - {
771   - blockedUser.Id = Convert.ToInt32(dr["Id"]);
772   - blockedUser.FirstName = dr["FirstName"].ToString();
773   - blockedUser.LastName = dr["LastName"].ToString();
774   - blockedUser.EmailId = dr["EmailId"].ToString();
775   - blockedUser.LoginId = dr["LoginId"].ToString();
776   - blockedUser.Password = dr["Password"].ToString();
777   - blockedUser.AccountNumber = dr["AccountNumber"].ToString();
778   - blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]);
779   - }
780   - }
781   -
782   -
783   - return blockedUser;
784   - }
785   -
786   - protected ArrayList GetBlockedUsersByUserType(int userTypeId)
787   - {
788   - logger.Debug(" inside GetBlockedUsersByUserType for UserTypeId= " + userTypeId);
789   -
790   - ArrayList blockedUsersList = new ArrayList();
791   - BlockedUser blockedUser = null;
792   - DataTable dt = null;
793   -
794   - SqlConnection conn = new SqlConnection(dbConnectionString);
795   - SqlCommand cmd = new SqlCommand();
796   - cmd.Connection = conn;
797   - cmd.CommandText = DBConstants.GET_BLOCKED_USERS_BY_USER_TYPE;
798   - cmd.CommandType = CommandType.StoredProcedure;
799   - cmd.Parameters.AddWithValue("@iUserTypeId", userTypeId);
800   - SqlDataAdapter da = new SqlDataAdapter();
801   - da.SelectCommand = cmd;
802   - dt = new DataTable();
803   - da.Fill(dt);
804   -
805   - if (dt.Rows.Count > 0)
806   - {
807   - foreach (DataRow dr in dt.Rows)
808   - {
809   - blockedUser = new BlockedUser();
810   -
811   - blockedUser.Id = Convert.ToInt32(dr["Id"]);
812   - blockedUser.FirstName = dr["FirstName"].ToString();
813   - blockedUser.LastName = dr["LastName"].ToString();
814   - blockedUser.EmailId = dr["EmailId"].ToString();
815   - blockedUser.LoginId = dr["LoginId"].ToString();
816   - blockedUser.Password = dr["Password"].ToString();
817   - blockedUser.AccountNumber = dr["AccountNumber"].ToString();
818   - blockedUser.LoginTime = Convert.ToDateTime(dr["LoginTime"]);
819   -
820   - blockedUsersList.Add(blockedUser);
821   - }
822   - }
823   -
824   -
825   -
826   - return blockedUsersList;
827   - }
828   -
829   - internal static int UnblockUser(int userId)
830   - {
831   - int result = 0;
832   - DBModel objModel = new DBModel();
833   -
834   - result = objModel.DeleteIncorrectLoginAttempts(userId);
835   -
836   - return result;
837   - }
838   -
839   - internal static bool ValidateUserAuthenticity(string username, string password, User user)
840   - {
841   - logger.Debug(" Inside ValidateUserAuthenticity for Username = " + username + ", Password: " + password);
842   -
843   - bool result = false;
844   -
845   - try
846   - {
847   - if ((string.Equals(username.ToUpper(), user.LoginId.ToUpper())) && (string.Equals(password, user.Password)))
848   - {
849   - result = true;
850   - }
851   - else
852   - {
853   - result = false;
854   - }
855   - }
856   - catch (SqlException ex)
857   - {
858   - logger.Fatal("Exception in ValidateUserAuthenticity for Username = " + username + ", Password: " + password + ", Exception= " + ex.Message + ", STACKTRACE= " + ex.StackTrace);
859   - throw;
860   - }
861   -
862   - return result;
863   - }
864   - }
865   -}
866 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Models/PixelLocator.cs deleted
1   -using MongoDB.Bson;
2   -using MongoDB.Driver;
3   -using System;
4   -using System.Collections.Generic;
5   -using System.Linq;
6   -using System.Web;
7   -
8   -namespace AIAHTML5.API.Models
9   -{
10   - public class PixelLocator
11   - {
12   -
13   - internal static dynamic GetBodyRegionsPixelData(string layerNumber, string bodyViewIndex, string systemNumber, string zoom)
14   - {
15   - try
16   - {
17   - //var client = new MongoClient("mongodb://192.168.90.43:27017");
18   - var client = new MongoClient();
19   - var db = client.GetDatabase("AIAHTML5");
20   -
21   - var col = db.GetCollection<BsonDocument>("DAImages");
22   -
23   - var pipeline = new BsonDocument[]
24   - {
25   - new BsonDocument{{"$unwind", "$terms"}},
26   - 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)) }},
27   - new BsonDocument { {"$project", new BsonDocument()
28   - .Add("_id", 0)
29   - .Add("terms", 1)
30   - .Add("bodyRegionId", 1)
31   - } }
32   - };
33   -
34   -
35   - var pixelData = col.Aggregate<BsonDocument>(pipeline).ToList();
36   -
37   - return pixelData.ToJson();
38   - }
39   - catch (Exception e)
40   - {
41   - string error = e.Message + "..STACKTRACE: " + e.StackTrace;
42   - return error;
43   - }
44   - }
45   - }
46   -}
47 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Models/User.cs deleted
1   -using System;
2   -using System.Collections;
3   -using System.Collections.Generic;
4   -using System.Linq;
5   -using System.Web;
6   -
7   -namespace AIAHTML5.API.Models
8   -{
9   - public class User
10   - {
11   - public int Id { get; set; }
12   - public string FirstName { get; set; }
13   - public string LastName { get; set; }
14   - public string EmailId { get; set; }
15   - public string LoginId { get; set; }
16   - public string Password { get; set; }
17   - public int? SecurityQuestionId { get; set; }
18   - public string SecurityAnswer { get; set; }
19   - public int? CreatorId { get; set; }
20   - public DateTime CreationDate { get; set; }
21   - public DateTime? DeactivationDate { get; set; }
22   - public int? ModifierId { get; set; }
23   - public DateTime? ModifiedDate { get; set; }
24   - public string UserType { get; set; }
25   - public int UserTypeId { get; set; }
26   - public bool IsActive { get; set; }
27   - public bool IsCorrectPassword { get; set; }
28   - public int IncorrectLoginAttemptCount { get; set; }
29   - public bool IsBlocked { get; set; }
30   - public int LicenseId { get; set; }
31   - public int EditionId { get; set; }
32   - public Int16 LoginFailureCauseId { get; set; }
33   -
34   - public ArrayList Modules { get; set; }
35   -
36   - public License LicenseInfo { get; set; }
37   - public LicenseSubscriptionDetails LicenseSubscriptions { get; set; }
38   - public bool IsSubscriptionExpired { get; set; }
39   - public string SubscriptionExpirationDate { get; set; }
40   - public string TermsAndConditionsTitle { get; set; }
41   - public string TermsAndConditionsText { get; set; }
42   -
43   - public const string SUPER_ADMIN = "Super Admin";
44   - public const string GENERAL_ADMIN = "General Admin";
45   - public const string DISTRICT_ADMIN = "District Admin";
46   - public const string CLIENT_ADMIN = "Client Admin";
47   - public const string SINGLE_USER = "Single User";
48   - public const string CONCURRENT_USER = "Concurrent User";
49   - public const string RESELLER = "Reseller";
50   - public const string TEST_ACCOUNT = "Test Account";
51   - public const string SITE_USER = "Site User";
52   - }
53   -
54   - public enum UserType
55   - {
56   - SUPER_ADMIN = 1, GENERAL_ADMIN, DISTRICT_ADMIN, CLIENT_ADMIN, SINGLE_USER, CONCURRENT_USER, RESELLER, TEST_ACCOUNT, SITE_USER
57   - }
58   -
59   - public class License
60   - {
61   - public int Id { get; set; }
62   - public string AccountNumber { get; set; }
63   - public string LicenseeFirstName { get; set; }
64   - public string LicenseeLastName { get; set; }
65   - public int LicenseTypeId { get; set; }
66   - public string InstitutionName { get; set; }
67   - public string Address1 { get; set; }
68   - public string Address2 { get; set; }
69   - public int CountryId { get; set; }
70   - public int StateId { get; set; }
71   - public string City { get; set; }
72   - public string Zip { get; set; }
73   - public string Phone { get; set; }
74   - public string EmailId { get; set; }
75   - public int TotalLogins { get; set; }
76   - public int AccountTypeId { get; set; }
77   - public bool IsActive { get; set; }
78   - public bool IsDistrictSiteLicense { get; set; }
79   - public DateTime CreationDate { get; set; }
80   - public DateTime? ModifiedDate { get; set; }
81   - public DateTime? CancellationDate { get; set; }
82   - public int NoOfRenewals { get; set; }
83   - public bool IsTermAccepted { get; set; }
84   - public int CardNumber { get; set; }
85   - public string ProductId { get; set; }
86   -
87   -
88   - }
89   -
90   - public class LicenseSubscriptionDetails
91   - {
92   - public int Id { get; set; }
93   - public int LicenseId { get; set; }
94   - public int? SubscriptionPlanId { get; set; }
95   - public DateTime? SubscriptionValidFrom { get; set; }
96   - public DateTime? SubscriptionValidThrough { get; set; }
97   - public DateTime? RenewalDate { get; set; }
98   - public string PaymentMode { get; set; }
99   - public double TotalAmount { get; set; }
100   - public double AmountPaid { get; set; }
101   - public double AmountPending { get; set; }
102   - public int NoOfImages { get; set; }
103   - }
104   -
105   - public class BlockedUser
106   - {
107   - public int Id { get; set; }
108   - public string FirstName { get; set; }
109   - public string LastName { get; set; }
110   - public string LoginId { get; set; }
111   - public string Password { get; set; }
112   - public string EmailId { get; set; }
113   - public string AccountNumber { get; set; }
114   - public DateTime LoginTime { get; set; }
115   - }
116   -}
117 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Models/UserUtility.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Web;
5   -using MongoDB.Driver;
6   -using MongoDB.Bson;
7   -using AIAHTML5.API.Properties;
8   -using AIAHTML5.API.Constants;
9   -using log4net;
10   -using System.Net.Mail;
11   -using AIAHTML5.API.Utility;
12   -using System.Text;
13   -using System.IO;
14   -using System.Net.Mime;
15   -using System.Configuration;
16   -using System.Collections;
17   -
18   -namespace AIAHTML5.API.Models
19   -{
20   - public class UserUtility
21   - {
22   -
23   - public static bool SendEmail(dynamic UserDetails, bool isMailForForgotPassword, bool unblockUser = false)
24   - {
25   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
26   - logger.Debug("inside SendEmail in for isMailForForgotPassword =" + isMailForForgotPassword);
27   -
28   - string mailSubject = string.Empty;
29   - string userEmailId = string.Empty;
30   - try
31   - {
32   - List<LinkedResource> lstLinkedResource = new List<LinkedResource>();
33   - EmailUtility emailUtility = new EmailUtility();
34   - List<string> lstToAddress = new List<string>();
35   - List<string> lstBccAddress = new List<string>();
36   -
37   - string emailText = string.Empty;
38   - string userId = string.Empty;
39   -
40   - string userName = string.Empty;
41   - string fName = string.Empty;
42   - string lName = string.Empty;
43   - string site_url = Convert.ToString(ConfigurationManager.AppSettings["Site_URL"]);
44   -
45   -
46   - if (UserDetails.LoginId != "")
47   - userId = UserDetails.LoginId.ToString();
48   - if (UserDetails.EmailId != "")
49   - userEmailId = UserDetails.EmailId.ToString();
50   - if (UserDetails.FirstName != "")
51   - fName = UserDetails.FirstName.ToString();
52   - if (UserDetails.LastName != "")
53   - lName = UserDetails.LastName.ToString();
54   -
55   - string fullName = fName + " " + lName;
56   -
57   - string logoPath = HttpContext.Current.Server.MapPath(Convert.ToString(ConfigurationManager.AppSettings["LogoPath"]));
58   -
59   - string templatePath = string.Empty;
60   - string resetPasswordLink = string.Empty;
61   -
62   - if (isMailForForgotPassword)
63   - {
64   - if (unblockUser)
65   - {
66   - templatePath = Convert.ToString(ConfigurationManager.AppSettings["UnblockUserEmailTemplate"]);
67   - resetPasswordLink = site_url + "?unb:" + HttpUtility.UrlEncode(userEmailId);
68   - }
69   - else
70   - {
71   - templatePath = Convert.ToString(ConfigurationManager.AppSettings["ForgotPasswordEmailTemplate"]);
72   - resetPasswordLink = site_url + "?em:" + HttpUtility.UrlEncode(userEmailId);
73   - }
74   - }
75   - else
76   - templatePath = Convert.ToString(ConfigurationManager.AppSettings["ForgotUserIdEmailTemplate"]);
77   -
78   - logger.Debug("inside SendEmail for templatePath= " + templatePath + ", userId= " + userId + ", userEmailId= " + userEmailId + ",fullName= " + fullName + ",resetPasswordLink= " + resetPasswordLink);
79   - string mailBody = UserUtility.GetMailBodyTextFromTemplate(templatePath, userId, userEmailId, fullName, resetPasswordLink);
80   -
81   - lstToAddress.Add(userEmailId);
82   -
83   - emailText = mailBody;
84   -
85   - logger.Debug("emailText= " + emailText);
86   - // for embedding images in email
87   - if (emailText.Contains("<img"))
88   - {
89   - LinkedResource linkedLogo = new LinkedResource(logoPath, MediaTypeNames.Image.Jpeg);
90   - linkedLogo.ContentId = "AIA_Logo_Image";
91   - linkedLogo.TransferEncoding = TransferEncoding.Base64;
92   - emailText = emailText.Replace("{logoPath}", "cid:" + linkedLogo.ContentId);
93   - lstLinkedResource.Add(linkedLogo);
94   - }
95   -
96   - emailUtility.sAlternateView = AlternateView.CreateAlternateViewFromString(emailText, null, "text/html");
97   - foreach (var sItem in lstLinkedResource)
98   - {
99   - emailUtility.sAlternateView.LinkedResources.Add(sItem);
100   - }
101   -
102   -
103   - if (!isMailForForgotPassword)
104   - mailSubject = AIAConstants.FORGOT_USERID_EMAIL_SUBJECT;
105   - else
106   - {
107   - if (unblockUser)
108   - mailSubject = AIAConstants.UNBLOCK_USER_EMAIL_SUBJECT;
109   - else
110   - mailSubject = AIAConstants.FORGOT_PASSWORD_EMAIL_SUBJECT;
111   - }
112   -
113   - emailUtility.sHostName = Convert.ToString(ConfigurationManager.AppSettings["HostAddress"]);
114   - emailUtility.sFromAddress = Convert.ToString(ConfigurationManager.AppSettings["SenderEmailAddress"]);
115   - emailUtility.bIsBodyHtml = true;
116   - emailUtility.bEnableSsl = false;
117   - emailUtility.sSubject = mailSubject + userEmailId;
118   - emailUtility.iPort = 25;
119   - emailUtility.sToAddresses = lstToAddress;
120   - emailUtility.sBccAddresses = lstBccAddress;
121   -
122   - emailUtility.SendSmtpEmail();
123   - return true;
124   - }
125   - catch (Exception e)
126   - {
127   - logger.Fatal("Exception in SendEmail for mailSubject + userEmailId= " + mailSubject + userEmailId + "..MSG= " + e.Message + "STACKTRACE= " + e.StackTrace);
128   -
129   - return false;
130   - }
131   -
132   - }
133   -
134   - protected static string GetMailBodyTextFromTemplate(string templatePath, string userId, string userEmailId, string fullName, string resetPasswordUrl)
135   - {
136   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
137   - logger.Debug("Inside GetMailBodyTextFromTemplate for templatePath= " + templatePath + ", userId= " + userId + ", userEmailId= " + userEmailId + ",fullName= " + fullName + ",resetPasswordLink= " + resetPasswordUrl);
138   -
139   - string fileToRead = string.Empty;
140   - string emailBody = string.Empty;
141   -
142   - fileToRead = HttpContext.Current.Server.MapPath(templatePath);
143   -
144   - using (StreamReader reader = new StreamReader(fileToRead))
145   - {
146   - emailBody = reader.ReadToEnd();
147   - }
148   -
149   - if (!string.IsNullOrEmpty(userId))
150   - emailBody = emailBody.Replace("{loginId}", userId);
151   - if (!string.IsNullOrEmpty(userEmailId))
152   - emailBody = emailBody.Replace("{emailId}", userEmailId);
153   - if (!string.IsNullOrEmpty(fullName))
154   - emailBody = emailBody.Replace("{userFullName}", fullName);
155   - if (!string.IsNullOrEmpty(resetPasswordUrl))
156   - emailBody = emailBody.Replace("{resetPasswordLink}", resetPasswordUrl);
157   -
158   - return emailBody;
159   - }
160   -
161   - public static bool SendAdminRequestEmail(Newtonsoft.Json.Linq.JObject userInfo)
162   - {
163   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
164   - logger.Debug("Inside SendAdminRequestEmail for email =" + userInfo["emailId"]);
165   -
166   - try
167   - {
168   - EmailUtility emailUtility = new EmailUtility();
169   - List<string> lstToAddress = new List<string>();
170   - List<string> lstBccAddress = new List<string>();
171   -
172   - string userEmailId = string.Empty;
173   - string fullName = string.Empty;
174   - string emailMessage = string.Empty;
175   -
176   - string[] mailToArr = (ConfigurationManager.AppSettings["AdminSupport"]).Split(',');
177   - if (mailToArr.Length > 0)
178   - {
179   - for (int i = 0; i < mailToArr.Length; i++)
180   - {
181   - lstToAddress.Add(mailToArr[i].ToString());
182   - }
183   - }
184   -
185   - fullName = userInfo["firstName"].ToString() + " " + userInfo["lastName"].ToString();
186   - userEmailId = userInfo["emailId"].ToString();
187   - emailMessage = userInfo["userMessage"].ToString();
188   -
189   - lstToAddress.Add(userEmailId);
190   -
191   - emailMessage = emailMessage.Replace("\n", "<br/>");
192   -
193   - emailMessage += "<br/><br/>";
194   -
195   - string mailSubject = "Admin Support request initiated for:";
196   -
197   - emailUtility.sHostName = Convert.ToString(ConfigurationManager.AppSettings["HostAddress"]);
198   - emailUtility.sFromAddress = Convert.ToString(ConfigurationManager.AppSettings["SenderEmailAddress"]);
199   - emailUtility.bIsBodyHtml = true;
200   - emailUtility.bEnableSsl = false;
201   - emailUtility.sSubject = mailSubject + " " + userEmailId;
202   - emailUtility.sBodyText = emailMessage;
203   - emailUtility.iPort = 25;
204   - emailUtility.sToAddresses = lstToAddress;
205   - emailUtility.sBccAddresses = lstBccAddress;
206   -
207   - emailUtility.SendSmtpEmail();
208   - return true;
209   - }
210   - catch (Exception ex)
211   - {
212   - logger.Fatal("exception in SendAdminRequestEmail for email =" + userInfo["emailId"] + ". msg= " + ex.Message + ", stacktrace= " + ex.StackTrace);
213   - return false;
214   - }
215   - }
216   -
217   - public static bool SendEmail(Newtonsoft.Json.Linq.JObject userInfo, ArrayList mailToList, string sender, string mailSubject = "", string mailBody = "")
218   - {
219   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
220   - logger.Debug("Inside SendEmail with UserInfo =" + userInfo);
221   -
222   - try
223   - {
224   - EmailUtility emailUtility = new EmailUtility();
225   - List<string> lstToAddress = new List<string>();
226   - List<string> lstBccAddress = new List<string>();
227   -
228   - string emailMessage = string.Empty;
229   - string senderEmailId = string.Empty;
230   -
231   - foreach (string email in mailToList)
232   - {
233   - lstToAddress.Add(email);
234   - }
235   -
236   - emailMessage = "Unable to process request for ";
237   -
238   - if (UserUtility.CheckIfPropertyExists(userInfo, "username") && !string.IsNullOrEmpty(userInfo["username"].ToString()))
239   - emailMessage += "username: <b>" + userInfo["username"].ToString() + "</b>";
240   - if (UserUtility.CheckIfPropertyExists(userInfo, "password") && !string.IsNullOrEmpty(userInfo["password"].ToString()))
241   - emailMessage += "& password: <b>" + userInfo["password"].ToString() + "</b><br/><br/>";
242   - if (UserUtility.CheckIfPropertyExists(userInfo, "emailId") && !string.IsNullOrEmpty(userInfo["emailId"].ToString()))
243   - emailMessage += "emailId: <b>" + userInfo["emailId"].ToString() + "</b><br/><br/>";
244   - if (UserUtility.CheckIfPropertyExists(userInfo, "accountNumber") && !string.IsNullOrEmpty(userInfo["accountNumber"].ToString()))
245   - emailMessage += "accountNumber: <b>" + userInfo["accountNumber"].ToString() + "</b><br/><br/>";
246   -
247   - if (string.IsNullOrEmpty(sender))
248   - senderEmailId = Convert.ToString(ConfigurationManager.AppSettings["SenderEmailAddress"]);
249   - else
250   - senderEmailId = sender;
251   -
252   - emailMessage += mailBody;
253   -
254   - emailMessage = emailMessage.Replace("\n", "<br/>");
255   -
256   - emailMessage += "<br/><br/>";
257   -
258   - emailUtility.sHostName = Convert.ToString(ConfigurationManager.AppSettings["HostAddress"]);
259   - emailUtility.sFromAddress = senderEmailId;
260   - emailUtility.bIsBodyHtml = true;
261   - emailUtility.bEnableSsl = false;
262   - emailUtility.sSubject = mailSubject;
263   - emailUtility.sBodyText = emailMessage;
264   - emailUtility.iPort = 25;
265   - emailUtility.sToAddresses = lstToAddress;
266   - emailUtility.sBccAddresses = lstBccAddress;
267   -
268   - emailUtility.SendSmtpEmail();
269   - return true;
270   - }
271   - catch (Exception ex)
272   - {
273   - logger.Fatal("exception in SendEmail for username: " + userInfo["username"].ToString() + " & password: " + userInfo["password"].ToString() + " email =" + userInfo["emailId"] + ". msg= " + ex.Message + ", stacktrace= " + ex.StackTrace);
274   - return false;
275   - }
276   - }
277   -
278   - public static ArrayList GetSupportMailList()
279   - {
280   - ArrayList supoortMailList = new ArrayList();
281   - string[] mailToArr = (ConfigurationManager.AppSettings["AdminSupport"]).Split(',');
282   - if (mailToArr.Length > 0)
283   - {
284   - for (int i = 0; i < mailToArr.Length; i++)
285   - {
286   - supoortMailList.Add(mailToArr[i].ToString());
287   - }
288   - }
289   - return supoortMailList;
290   - }
291   -
292   - protected static bool CheckIfPropertyExists(dynamic dynamicObject, string propertyName)
293   - {
294   - var res = dynamicObject[propertyName];
295   - if (res != null)
296   - return true;
297   - else
298   - return false;
299   - }
300   - }
301   -}
302 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Models/Users.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Web;
5   -using MongoDB.Driver;
6   -using MongoDB.Bson;
7   -using AIAHTML5.API.Properties;
8   -using AIAHTML5.API.Constants;
9   -using log4net;
10   -using AIAHTML5.API.Models;
11   -using Newtonsoft.Json;
12   -using System.Collections;
13   -using System.Data.SqlClient;
14   -
15   -namespace AIAHTML5.API.Models
16   -{
17   - public class Users
18   - {
19   - private static readonly ILog logger = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
20   - internal static dynamic GetUserDetailsForAuthenticatedUser(Newtonsoft.Json.Linq.JObject credentials)
21   - {
22   - logger.Debug("inside AuthenticateUser for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString());
23   - dynamic userDetails = null;
24   -
25   -
26   - User user = DBModel.GetUserDetailsByLoginId(credentials["username"].ToString());
27   - //string userDetails = DBModel.GetUserDetailsByLoginId2(credentials["username"].ToString());
28   -
29   - if (user != null)
30   - {
31   - logger.Debug("userDetails.loginId= " + user.LoginId); // .loginId);
32   -
33   - userDetails = JsonConvert.SerializeObject(user);
34   - }
35   - else
36   - {
37   - userDetails = AIAConstants.USER_NOT_FOUND;
38   - }
39   -
40   -
41   - return userDetails;
42   - }
43   -
44   - internal static dynamic GetUserByEmail(Newtonsoft.Json.Linq.JObject userInfo)
45   - {
46   - logger.Debug(" inside GetUserByEmail for emailId = " + userInfo["emailId"]);
47   -
48   -
49   - User objUser = DBModel.GetUserDetailsByEmailId(userInfo["emailId"].ToString());
50   -
51   - //dynamic userDetails;
52   -
53   - if (objUser!= null)
54   - {
55   - logger.Debug("userDetails.loginId= " + objUser.LoginId);
56   - //return userDetails = JsonConvert.SerializeObject(objUser);
57   - return objUser;
58   - }
59   - else
60   - {
61   - return AIAConstants.USER_NOT_FOUND;
62   - }
63   -
64   -
65   - }
66   -
67   - internal static dynamic UpdatePassword(Newtonsoft.Json.Linq.JObject userInfo, string sLoginId, string sEmailId)
68   - {
69   -
70   - int result = DBModel.UpdateUserPassword(userInfo, sLoginId, sEmailId);
71   -
72   - return result;
73   -
74   - }
75   -
76   - internal static dynamic UpdateLicenseTerm(Newtonsoft.Json.Linq.JObject userLicenseInfo)
77   - {
78   - logger.Debug(" inside UpdateLicenseTerm for AccountNumber = " + userLicenseInfo["licenseeAccountNumber"].ToString() + ", LicenseId: " + userLicenseInfo["userLicenseId"].ToString());
79   - Newtonsoft.Json.Linq.JObject userInfo = new Newtonsoft.Json.Linq.JObject();
80   -
81   - dynamic result;
82   - string accountNumber = userLicenseInfo["licenseeAccountNumber"].ToString();
83   -
84   - userInfo.Add("accountNumber", accountNumber);
85   -
86   -
87   - result = DBModel.UpdateLicenseTermStatus(accountNumber);
88   -
89   - if (result < 0)
90   - {
91   - logger.Fatal("Unable to update LicenseTermAccepted status for AccountNumber =" + accountNumber);
92   - }
93   -
94   - return result;
95   - }
96   -
97   - internal static bool checkUserAuthenticity(Newtonsoft.Json.Linq.JObject credentials, User user)
98   - {
99   - bool isAuthenticatedUser = DBModel.ValidateUserAuthenticity(credentials["username"].ToString(), credentials["password"].ToString(), user);
100   -
101   - return isAuthenticatedUser;
102   - }
103   -
104   - internal static User getUserDetails(Newtonsoft.Json.Linq.JObject credentials)
105   - {
106   - logger.Debug("inside getUserDetails for loginId =" + credentials["username"].ToString() + " and password= " + credentials["password"].ToString());
107   - User userDetails = null;
108   -
109   -
110   - userDetails = DBModel.GetUserDetailsByLoginId(credentials["username"].ToString());
111   -
112   - return userDetails;
113   - }
114   -
115   - internal static void getLicenseIdForThisUser(int userId, out int licenseId, out int editionId)
116   - {
117   - logger.Debug("inside getLicenseIdForThisUser for UserId =" + userId);
118   -
119   - //assigning below variable to avoid compiler error for unassignd out params
120   - licenseId = 0;
121   - editionId = 0;
122   -
123   -
124   -
125   - DBModel objModel = new DBModel();
126   - Hashtable licenseEditionHash = objModel.GetLicenseDetailByUserId(userId);
127   -
128   - if (licenseEditionHash.ContainsKey(AIAConstants.LICENSE_KEY_ID))
129   - licenseId = Convert.ToInt32(licenseEditionHash[AIAConstants.LICENSE_KEY_ID]);
130   -
131   - if (licenseEditionHash.ContainsKey(AIAConstants.EDITION_KEY_ID))
132   - editionId = Convert.ToInt32(licenseEditionHash[AIAConstants.EDITION_KEY_ID]);
133   -
134   -
135   - }
136   -
137   - internal static int insertLoginDetails(int userId)
138   - {
139   - logger.Debug("inside insertLoginDetails for UserId =" + userId);
140   -
141   - int result = 0;
142   -
143   - DBModel objModel = new DBModel();
144   -
145   - result = objModel.InsertLoginDetails(userId);
146   -
147   - return result;
148   - }
149   -
150   - internal static bool isUSerActive(User user)
151   - {
152   - if (user.IsActive)
153   - return true;
154   - else
155   - return false;
156   - }
157   -
158   - internal static bool checkIfLicenseExpired(LicenseSubscriptionDetails subscriptionDetail, out string expirationDate)
159   - {
160   - expirationDate = string.Empty;
161   - bool isLicenseExpired = false;
162   -
163   - if (subscriptionDetail!= null)
164   - {
165   - DateTime? subscriptionValidThrough = subscriptionDetail.SubscriptionValidThrough;
166   - if (subscriptionValidThrough != null && subscriptionValidThrough.Value.Date >= DateTime.Now.Date)
167   - {
168   - isLicenseExpired = false;
169   - }
170   - else
171   - {
172   - isLicenseExpired = true;
173   - expirationDate = subscriptionDetail.SubscriptionValidThrough.Value.Date.ToString("MM/dd/yyyy").ToString();
174   - }
175   - }
176   - return isLicenseExpired;
177   - }
178   -
179   - internal static ArrayList getModuleListByLicenseId(int licenseId)
180   - {
181   - logger.Debug("inside getModuleListByLicenseId for LicenseId =" + licenseId);
182   -
183   - ArrayList licensedModulesList = new ArrayList();
184   -
185   -
186   -
187   - DBModel objModel = new DBModel();
188   - licensedModulesList = objModel.GetUserModulesByLicenseId(licenseId);
189   -
190   -
191   - return licensedModulesList;
192   - }
193   -
194   - internal static int deletePastWrongAttempts(int userId)
195   - {
196   - logger.Debug("inside deletePastWrongAttempts for UserId =" + userId);
197   -
198   - int result = 0;
199   -
200   -
201   - DBModel objModel = new DBModel();
202   - result = objModel.DeleteIncorrectLoginAttempts(userId);
203   - return result;
204   - }
205   -
206   - internal static int checkNoOfWrongAttempts(int userId)
207   - {
208   - logger.Debug("inside checkNoOfWrongAttempts for UserId =" + userId);
209   -
210   - int incorrectLoginAttemptCount = 0;
211   -
212   -
213   - DBModel objModel = new DBModel();
214   - incorrectLoginAttemptCount = objModel.GetIncorrectLoginAttempts(userId);
215   - return incorrectLoginAttemptCount;
216   - }
217   -
218   - internal static int saveWrongAttemptOfUser(int userId, int previousIncorrectLoginAttempts)
219   - {
220   - logger.Debug("inside saveWrongAttemptofUser for UserId =" + userId);
221   - int result = 0;
222   -
223   -
224   - DBModel objModel = new DBModel();
225   -
226   - if (previousIncorrectLoginAttempts < 1)
227   - {
228   - result = objModel.InsertIncorrectLoginAttempts(userId);
229   - }
230   - else
231   - {
232   - result = objModel.UpdateIncorrectLoginAttempts(userId);
233   - }
234   -
235   -
236   - return result;
237   - }
238   -
239   - internal static bool isLicenseActive(int licenseId)
240   - {
241   - logger.Debug("inside isLicenseActive for LicenseId =" + licenseId);
242   - bool result = false;
243   -
244   - DBModel objModel = new DBModel();
245   - License userLicense = objModel.GetLicenseDetailsByLicenseId(licenseId);
246   -
247   -
248   - if (userLicense.IsActive)
249   - result = true;
250   - else
251   - result = false;
252   -
253   - return result;
254   - }
255   -
256   - internal static License getLicenseDetails(int licenseId)
257   - {
258   - logger.Debug("inside getLicenseDetails for LicenseId =" + licenseId);
259   -
260   - License userLicense = null;
261   -
262   -
263   - DBModel objModel = new DBModel();
264   - userLicense = objModel.GetLicenseDetailsByLicenseId(licenseId);
265   -
266   - return userLicense;
267   - }
268   -
269   - internal static LicenseSubscriptionDetails getLicenseSubscriptionDetails(int licenseId)
270   - {
271   - logger.Debug("inside getLicenseSubscriptionDetails for LicenseId =" + licenseId);
272   -
273   - LicenseSubscriptionDetails userSubscriptionDetail = null;
274   -
275   -
276   - DBModel objModel = new DBModel();
277   - userSubscriptionDetail = objModel.GetLicenseSubscriptionDetailsByLicenseId(licenseId);
278   -
279   - return userSubscriptionDetail;
280   - }
281   -
282   - internal static void isCredentialCorrect(Newtonsoft.Json.Linq.JObject credentials, User userInfo, out bool isCorrectLoginId, out bool isCorrectPassword)
283   - {
284   - isCorrectLoginId = false;
285   - isCorrectPassword = false;
286   -
287   - if (userInfo.Id> 0)
288   - {
289   - if (string.Equals(credentials["username"].ToString().ToUpper(), userInfo.LoginId.ToUpper()))
290   - isCorrectLoginId = true;
291   -
292   - if (string.Equals(credentials["password"].ToString(), userInfo.Password))
293   - {
294   - isCorrectPassword = true;
295   - }
296   - }
297   - }
298   -
299   - internal static int insertUserLoginLog(string accountNumber, Int16 failureId, string referalUrl, string edition, string httpReferer)
300   - {
301   - logger.Debug("inside insertUserLoginLog for accountNumber =" + accountNumber);
302   -
303   - int result = 0;
304   -
305   -
306   - DBModel objModel = new DBModel();
307   - result = objModel.InsertUserLoginLog(accountNumber, failureId, null, edition, null);
308   -
309   - return result;
310   - }
311   -
312   -
313   - internal static ArrayList getTermsAndConditions()
314   - {
315   - logger.Debug("inside getTermsOfServiceText");
316   -
317   - ArrayList arrTermsOfService = new ArrayList();
318   -
319   - DBModel objModel = new DBModel();
320   - arrTermsOfService = DBModel.GetTermsAndConditions();
321   -
322   - return arrTermsOfService;
323   - }
324   -
325   - internal static ArrayList getAllModulesList()
326   - {
327   - logger.Debug("inside getAllModulesList");
328   - ArrayList modulesList = new ArrayList ();
329   -
330   -
331   - DBModel objModel = new DBModel();
332   - modulesList = objModel.GetAllModules();
333   -
334   - return modulesList;
335   - }
336   -
337   - internal static bool checkUserBlockStatus(int userId, out DateTime blockTime)
338   - {
339   - logger.Debug("inside isUserBlocked for UserId =" + userId);
340   - bool isUserBlocked = false;
341   - blockTime = new DateTime();
342   -
343   -
344   - DBModel objModel = new DBModel();
345   - BlockedUser blockedUser = objModel.GetUserBlockedStatusByUserId(userId);
346   -
347   - if (blockedUser!= null)
348   - {
349   - blockTime = blockedUser.LoginTime;
350   - isUserBlocked = true;
351   - }
352   - else
353   - isUserBlocked = false;
354   -
355   - return isUserBlocked;
356   - }
357   - }
358   -}
359 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Properties/AssemblyInfo.cs deleted
1   -using System.Reflection;
2   -using System.Runtime.CompilerServices;
3   -using System.Runtime.InteropServices;
4   -
5   -// General Information about an assembly is controlled through the following
6   -// set of attributes. Change these attribute values to modify the information
7   -// associated with an assembly.
8   -[assembly: AssemblyTitle("AIAHTML5.API")]
9   -[assembly: AssemblyDescription("")]
10   -[assembly: AssemblyConfiguration("")]
11   -[assembly: AssemblyCompany("")]
12   -[assembly: AssemblyProduct("AIAHTML5.API")]
13   -[assembly: AssemblyCopyright("Copyright © 2016")]
14   -[assembly: AssemblyTrademark("")]
15   -[assembly: AssemblyCulture("")]
16   -
17   -// Setting ComVisible to false makes the types in this assembly not visible
18   -// to COM components. If you need to access a type in this assembly from
19   -// COM, set the ComVisible attribute to true on that type.
20   -[assembly: ComVisible(false)]
21   -
22   -// The following GUID is for the ID of the typelib if this project is exposed to COM
23   -[assembly: Guid("a3c323d1-d9fd-4583-8b2b-71815c74dce6")]
24   -
25   -// Version information for an assembly consists of the following four values:
26   -//
27   -// Major Version
28   -// Minor Version
29   -// Build Number
30   -// Revision
31   -//
32   -// You can specify all the values or you can default the Revision and Build Numbers
33   -// by using the '*' as shown below:
34   -[assembly: AssemblyVersion("1.0.0.0")]
35   -[assembly: AssemblyFileVersion("1.0.0.0")]
400-SOURCECODE/AIAHTML5.API/Properties/Settings.Designer.cs deleted
1   -//------------------------------------------------------------------------------
2   -// <auto-generated>
3   -// This code was generated by a tool.
4   -// Runtime Version:4.0.30319.42000
5   -//
6   -// Changes to this file may cause incorrect behavior and will be lost if
7   -// the code is regenerated.
8   -// </auto-generated>
9   -//------------------------------------------------------------------------------
10   -
11   -namespace AIAHTML5.API.Properties {
12   -
13   -
14   - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15   - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "12.0.0.0")]
16   - internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17   -
18   - private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19   -
20   - public static Settings Default {
21   - get {
22   - return defaultInstance;
23   - }
24   - }
25   -
26   - [global::System.Configuration.ApplicationScopedSettingAttribute()]
27   - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
28   - [global::System.Configuration.DefaultSettingValueAttribute("localhost:27017")]
29   - public string AIAConnectionString {
30   - get {
31   - return ((string)(this["AIAConnectionString"]));
32   - }
33   - }
34   -
35   - [global::System.Configuration.ApplicationScopedSettingAttribute()]
36   - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
37   - [global::System.Configuration.DefaultSettingValueAttribute("AIA")]
38   - public string database {
39   - get {
40   - return ((string)(this["database"]));
41   - }
42   - }
43   - }
44   -}
400-SOURCECODE/AIAHTML5.API/Properties/Settings.settings deleted
1   -<?xml version='1.0' encoding='utf-8'?>
2   -<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="AIAHTML5.API.Properties" GeneratedClassName="Settings">
3   - <Profiles />
4   - <Settings>
5   - <Setting Name="AIAConnectionString" Type="System.String" Scope="Application">
6   - <Value Profile="(Default)">localhost:27017</Value>
7   - </Setting>
8   - <Setting Name="database" Type="System.String" Scope="Application">
9   - <Value Profile="(Default)">AIA</Value>
10   - </Setting>
11   - </Settings>
12   -</SettingsFile>
13 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Templates/Forgot-UserId.html deleted
1   -<style type='text/css'>
2   - strong {
3   - font-size: 18px;
4   - color: #ffff00;
5   - }
6   -</style>
7   -<table width='500' border='0' align='center' cellpadding='0' cellspacing='0'>
8   - <tbody>
9   - <tr>
10   - <td align='center' valign='middle' bgcolor='#393939' style='padding:30px 0 20px 0;'>
11   - <a href='#'><img src='{logoPath}' alt='AIA' title='AIA' /></a>
12   - </td>
13   - </tr>
14   - <tr>
15   - <td align='center' valign='top' bgcolor='#808d43' style='padding:20px;'>
16   - <table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>
17   - <tbody>
18   - <tr>
19   - <td colspan='2' style=' font-size:32px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Forgot UserID</td>
20   - </tr>
21   - <tr>
22   - <td colspan='2'>&nbsp;</td>
23   - </tr>
24   - <tr>
25   - <td colspan='2' style='font-size:20px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Hello {userFullName}</td>
26   - </tr>
27   - <tr>
28   - <td colspan='2'>&nbsp;</td>
29   - </tr>
30   - <tr>
31   - <td colspan='2' style=' font-size:16px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>You have requested your 'Login ID' for following account: {emailId}</td>
32   - </tr>
33   - <tr>
34   - <td colspan='2'>&nbsp;</td>
35   - </tr>
36   - <tr>
37   - <td colspan='2' style=' font-size:18px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#fff;'>Your login ID is: <strong>{loginId}</strong></td>
38   - </tr>
39   - <tr>
40   - <td colspan='2'>&nbsp;</td></tr><tr><td colspan='2'>&nbsp;</td>
41   - </tr>
42   - <tr>
43   - <td colspan='2'>&nbsp;</td>
44   - </tr>
45   - </tbody>
46   - </table>
47   - </td>
48   - </tr>
49   - <tr>
50   - <td bgcolor='#f9f2e7' style='padding:20px;'>
51   - <table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>
52   - <tbody>
53   - <tr>
54   - <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>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.</td>
55   - </tr>
56   - <tr>
57   - <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td>
58   - </tr>
59   - <tr>
60   - <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>Give us a <b>call toll-free at 1-888-278-9614</b> or <em>send us an email</em> if you have any questions or if you need help. It will be our pleasure to help you.</td></tr><tr><td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td></tr><tr><td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td></tr><tr><td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'><em>&copy; 2017 Ebix, Inc. All Rights Reserved. </em></td>
61   - </tr>
62   - </tbody>
63   - </table>
64   - </td>
65   - </tr>
66   - </tbody>
67   -</table>
68 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Templates/forgot-Password.html deleted
1   -<style type='text/css'>
2   - strong {
3   - font-size: 18px;
4   - color: #ffff00;
5   - }
6   -</style>
7   -<table width='500' border='0' align='center' cellpadding='0' cellspacing='0'>
8   - <tbody>
9   - <tr>
10   - <td align='center' valign='middle' bgcolor='#393939' style='padding:30px 0 20px 0;'>
11   - <a href='#'><img src='{logoPath}' alt='AIA' title='AIA' /></a>
12   - </td>
13   - </tr>
14   - <tr>
15   - <td align='center' valign='top' bgcolor='#808d43' style='padding:20px;'>
16   - <table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>
17   - <tbody>
18   - <tr>
19   - <td colspan='2' style=' font-size:32px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Forgot Password</td>
20   - </tr>
21   - <tr>
22   - <td colspan='2'>&nbsp;</td>
23   - </tr>
24   - <tr>
25   - <td colspan='2' style='font-size:20px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Hi,</td>
26   - </tr>
27   - <tr>
28   - <td colspan='2'>&nbsp;</td>
29   - </tr>
30   - <tr>
31   - <td colspan='2' style=' font-size:16px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>You have requested password reset for your account: {emailId}</td>
32   - </tr>
33   - <tr>
34   - <td colspan='2'>&nbsp;</td>
35   - </tr>
36   - <tr>
37   - <td colspan='2' style=' font-size:16px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Click the Reset Password button below to reset your A.D.A.M. Interactive Anatomy™ account password</td>
38   - </tr>
39   - <tr>
40   - <td colspan='2'>&nbsp;</td>
41   - </tr>
42   - <tr>
43   - <td width="45%" bgcolor="#0072a7" style="padding:15px 20px; cursor: pointer;" onclick="document.location.href = '{resetPasswordLink}'">
44   - <a href="{resetPasswordLink}" style="color:#ffffff; font-size:16px; text-transform:uppercase; text-align:center; text-decoration:none; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; display: block;">Reset Password</a>
45   - </td>
46   - <td width="55%" style="padding:10px 20px;">&nbsp;</td>
47   - </tr>
48   - <tr>
49   - <td colspan='2'>&nbsp;</td>
50   - </tr>
51   - <tr>
52   - <td colspan='2' style=' font-size:16px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>If you have not requested for password reset, please ignore this mail.</td>
53   - </tr>
54   - <tr>
55   - <td colspan='2'>&nbsp;</td>
56   - </tr>
57   - <tr>
58   - <td colspan='2'>&nbsp;</td>
59   - </tr>
60   - <tr>
61   - <td colspan='2'>&nbsp;</td>
62   - </tr>
63   - </tbody>
64   - </table>
65   - </td>
66   - </tr>
67   - <tr>
68   - <td bgcolor='#f9f2e7' style='padding:20px;'>
69   - <table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>
70   - <tbody>
71   - <tr>
72   - <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>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.</td>
73   - </tr>
74   - <tr>
75   - <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td>
76   - </tr>
77   - <tr>
78   - <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>Give us a <b>call toll-free at 1-888-278-9614</b> or <em>send us an email</em> if you have any questions or if you need help. It will be our pleasure to help you.</td></tr><tr><td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td></tr><tr><td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td></tr><tr><td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'><em>&copy; 2017 Ebix, Inc. All Rights Reserved. </em></td>
79   - </tr>
80   - </tbody>
81   - </table>
82   - </td>
83   - </tr>
84   - </tbody>
85   -</table>
86 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Templates/unblock-User.html deleted
1   -<style type='text/css'>
2   - strong {
3   - font-size: 18px;
4   - color: #ffff00;
5   - }
6   -</style>
7   -<table width='500' border='0' align='center' cellpadding='0' cellspacing='0'>
8   - <tbody>
9   - <tr>
10   - <td align='center' valign='middle' bgcolor='#393939' style='padding:30px 0 20px 0;'>
11   - <a href='#'><img src='{logoPath}' alt='AIA' title='AIA' /></a>
12   - </td>
13   - </tr>
14   - <tr>
15   - <td align='center' valign='top' bgcolor='#808d43' style='padding:20px;'>
16   - <table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>
17   - <tbody>
18   - <tr>
19   - <td colspan='2' style=' font-size:32px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Unblock Account</td>
20   - </tr>
21   - <tr>
22   - <td colspan='2'>&nbsp;</td>
23   - </tr>
24   - <tr>
25   - <td colspan='2' style='font-size:20px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Hi,</td>
26   - </tr>
27   - <tr>
28   - <td colspan='2'>&nbsp;</td>
29   - </tr>
30   - <tr>
31   - <td colspan='2' style=' font-size:16px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>You have requested to unblock your account for emailId: {emailId}</td>
32   - </tr>
33   - <tr>
34   - <td colspan='2'>&nbsp;</td>
35   - </tr>
36   - <tr>
37   - <td colspan='2' style=' font-size:16px; font-weight:bold; color:#fff; font-family:Gotham, Helvetica, Arial, sans-serif'>Click the Unblock button below to unblock your A.D.A.M. Interactive Anatomy™ account</td>
38   - </tr>
39   - <tr>
40   - <td colspan='2'>&nbsp;</td>
41   - </tr>
42   - <tr>
43   - <td width="45%" bgcolor="#0072a7" style="padding:15px 20px; cursor: pointer;" onclick="document.location.href = '{resetPasswordLink}'">
44   - <a href="{resetPasswordLink}" style="color:#ffffff; font-size:16px; text-transform:uppercase; text-align:center; text-decoration:none; font-family:Gotham, 'Helvetica Neue', Helvetica, Arial, sans-serif; display: block;">Unblock</a>
45   - </td>
46   - <td width="55%" style="padding:10px 20px;">&nbsp;</td>
47   - </tr>
48   - <tr>
49   - <td colspan='2'>&nbsp;</td>
50   - </tr>
51   - <tr>
52   - <td colspan='2'>&nbsp;</td>
53   - </tr>
54   - <tr>
55   - <td colspan='2'>&nbsp;</td>
56   - </tr>
57   - <tr>
58   - <td colspan='2'>&nbsp;</td>
59   - </tr>
60   - </tbody>
61   - </table>
62   - </td>
63   - </tr>
64   - <tr>
65   - <td bgcolor='#f9f2e7' style='padding:20px;'>
66   - <table width='100%' border='0' align='center' cellpadding='0' cellspacing='0'>
67   - <tbody>
68   - <tr>
69   - <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>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.</td>
70   - </tr>
71   - <tr>
72   - <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td>
73   - </tr>
74   - <tr>
75   - <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>Give us a <b>call toll-free at 1-888-278-9614</b> or <em>send us an email</em> if you have any questions or if you need help. It will be our pleasure to help you.</td>
76   - </tr>
77   - <tr><td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td></tr>
78   - <tr><td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'>&nbsp;</td></tr>
79   - <tr>
80   - <td style=' font-size:12px; font-family:Gotham, Helvetica, Arial, sans-serif; color:#000000;'><em>&copy; 2017 Ebix, Inc. All Rights Reserved. </em></td>
81   - </tr>
82   - </tbody>
83   - </table>
84   - </td>
85   - </tr>
86   - </tbody>
87   -</table>
88 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Utility/EmailUtility.cs deleted
1   -using System;
2   -using System.Collections.Generic;
3   -using System.Linq;
4   -using System.Web;
5   -using System.Configuration;
6   -using System.Collections;
7   -using System.Xml;
8   -using System.Text;
9   -using System.IO;
10   -using System.Net.Mail;
11   -using log4net;
12   -
13   -namespace AIAHTML5.API.Utility
14   -{
15   -
16   - public class EmailUtility
17   - {
18   - public string sFromAddress { get; set; }
19   - public List<string> sToAddresses { get; set; }
20   - public List<string> sBccAddresses { get; set; }
21   - public string sHostName { get; set; }
22   - public string sSubject { get; set; }
23   - public int iPort { get; set; }
24   - public bool bEnableSsl { get; set; }
25   - public string sUserName { get; set; }
26   - public string sPassword { get; set; }
27   - public bool bIsBodyHtml { get; set; }
28   - public List<Attachment> sAttachments { get; set; }
29   - public string sBodyText { get; set; }
30   - public AlternateView sAlternateView { get; set; }
31   -
32   - public void SendMail(MailMessage mm)
33   - {
34   - try
35   - {
36   - SmtpClient smtp = new SmtpClient();
37   - smtp.Host = ConfigurationManager.AppSettings["SMTPAddress"];
38   - smtp.EnableSsl = Convert.ToBoolean(ConfigurationManager.AppSettings["EnableSSL"]);
39   - System.Net.NetworkCredential NetworkCred = new System.Net.NetworkCredential(mm.From.ToString(), ConfigurationManager.AppSettings["SenderPassword"]);
40   - smtp.Credentials = NetworkCred;
41   - smtp.Port = Convert.ToInt32(ConfigurationManager.AppSettings["SMTPPort"]);
42   -
43   - smtp.Send(mm);
44   - }
45   - catch (Exception e)
46   - {
47   - throw;
48   - }
49   - }
50   -
51   - public void SendSmtpEmail()
52   - {
53   - ILog logger = log4net.LogManager.GetLogger((System.Reflection.MethodBase.GetCurrentMethod().DeclaringType));
54   - logger.Debug("inside SendSmtpEmail");
55   -
56   - try
57   - {
58   - MailMessage sMail = new MailMessage();
59   - SmtpClient SmtpServer = new SmtpClient(sHostName);
60   - string recipientEmailAddress = string.Empty;
61   -
62   -
63   - if (sToAddresses != null)
64   - {
65   - foreach (var sItem in sToAddresses)
66   - {
67   - sMail.To.Add(sItem);
68   - logger.Debug("sToAddresses= " + sItem);
69   - }
70   - }
71   -
72   - if (sBccAddresses != null)
73   - {
74   - foreach (var sItem in sBccAddresses)
75   - {
76   - sMail.Bcc.Add(sItem);
77   - logger.Debug("sBccAddresses= " + sItem);
78   -
79   - }
80   - }
81   -
82   - sMail.IsBodyHtml = bIsBodyHtml;
83   -
84   - if (sAlternateView != null)
85   - {
86   - sMail.AlternateViews.Add(sAlternateView);
87   - logger.Debug("sAlternateView= " + sAlternateView);
88   -
89   - }
90   - else
91   - {
92   - sMail.Body = sBodyText;
93   - logger.Debug("sMail.Body= " + sBodyText);
94   -
95   - }
96   -
97   - sMail.Subject = sSubject;
98   - logger.Debug("sMail.Subject= " + sSubject);
99   -
100   - if (sAttachments != null)
101   - {
102   - foreach (var sItem in sAttachments)
103   - {
104   - sMail.Attachments.Add(sItem);
105   - logger.Debug("sAttachments= " + sAttachments);
106   -
107   -
108   - }
109   - }
110   - logger.Debug("sUserName= " + sUserName + ", sPassword= " + sPassword);
111   -
112   - SmtpServer.Port = iPort;
113   - SmtpServer.Credentials = new System.Net.NetworkCredential(sUserName, sPassword);
114   - SmtpServer.EnableSsl = bEnableSsl;
115   -
116   - using (MailMessage mm = new MailMessage(sFromAddress, sMail.To.ToString()))
117   - {
118   - mm.Subject = sSubject;
119   - mm.IsBodyHtml = bIsBodyHtml;
120   -
121   - if (sAlternateView != null)
122   - {
123   - mm.AlternateViews.Add(sAlternateView);
124   - }
125   - else
126   - {
127   - mm.Body = sBodyText;
128   - }
129   -
130   - mm.IsBodyHtml = true;
131   - SendMail(mm);
132   - logger.Debug("after sending email");
133   - }
134   -
135   - }
136   - catch (Exception ex)
137   - {
138   - logger.Fatal("exception in SendSmtpEmail.msg= " + ex.Message + ", stacktarce= " + ex.StackTrace);
139   - throw ex;
140   - }
141   - }
142   - }
143   -}
144 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Web.Debug.config deleted
1   -<?xml version="1.0" encoding="utf-8"?>
2   -
3   -<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
4   -
5   -<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6   - <!--
7   - In the example below, the "SetAttributes" transform will change the value of
8   - "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9   - finds an attribute "name" that has a value of "MyDB".
10   -
11   - <connectionStrings>
12   - <add name="MyDB"
13   - connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14   - xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15   - </connectionStrings>
16   - -->
17   - <system.web>
18   - <!--
19   - In the example below, the "Replace" transform will replace the entire
20   - <customErrors> section of your web.config file.
21   - Note that because there is only one customErrors section under the
22   - <system.web> node, there is no need to use the "xdt:Locator" attribute.
23   -
24   - <customErrors defaultRedirect="GenericError.htm"
25   - mode="RemoteOnly" xdt:Transform="Replace">
26   - <error statusCode="500" redirect="InternalError.htm"/>
27   - </customErrors>
28   - -->
29   - </system.web>
30   -</configuration>
31 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/Web.Release.config deleted
1   -<?xml version="1.0" encoding="utf-8"?>
2   -
3   -<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
4   -
5   -<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
6   - <!--
7   - In the example below, the "SetAttributes" transform will change the value of
8   - "connectionString" to use "ReleaseSQLServer" only when the "Match" locator
9   - finds an attribute "name" that has a value of "MyDB".
10   -
11   - <connectionStrings>
12   - <add name="MyDB"
13   - connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
14   - xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
15   - </connectionStrings>
16   - -->
17   - <system.web>
18   - <compilation xdt:Transform="RemoveAttributes(debug)" />
19   - <!--
20   - In the example below, the "Replace" transform will replace the entire
21   - <customErrors> section of your web.config file.
22   - Note that because there is only one customErrors section under the
23   - <system.web> node, there is no need to use the "xdt:Locator" attribute.
24   -
25   - <customErrors defaultRedirect="GenericError.htm"
26   - mode="RemoteOnly" xdt:Transform="Replace">
27   - <error statusCode="500" redirect="InternalError.htm"/>
28   - </customErrors>
29   - -->
30   - </system.web>
31   -</configuration>
32 0 \ No newline at end of file
400-SOURCECODE/AIAHTML5.API/content/images/logo.png deleted

11.5 KB

400-SOURCECODE/AIAHTML5.API/index.html deleted
1   -<!DOCTYPE html>
2   -<html xmlns="http://www.w3.org/1999/xhtml">
3   -<head>
4   - <title></title>
5   -</head>
6   -<body>
7   - HELLO API
8   -</body>
9   -</html>
400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs deleted
400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs deleted
400-SOURCECODE/AIAHTML5.API/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs deleted
400-SOURCECODE/AIAHTML5.API/packages.config deleted
1   -<?xml version="1.0" encoding="utf-8"?>
2   -<packages>
3   - <package id="DnsClient" version="1.0.7" targetFramework="net45" />
4   - <package id="MongoDB.Bson" version="2.5.0" targetFramework="net45" />
5   - <package id="MongoDB.Driver" version="2.5.0" targetFramework="net45" />
6   - <package id="MongoDB.Driver.Core" version="2.5.0" targetFramework="net45" />
7   - <package id="System.Buffers" version="4.3.0" targetFramework="net45" />
8   - <package id="System.Runtime.InteropServices.RuntimeInformation" version="4.0.0" targetFramework="net45" />
9   -</packages>
10 0 \ No newline at end of file