Commit e742dc2f764974e191c06e347d2bab3a412ea3c0
1 parent
1a05681d
store Procedure
Showing
10 changed files
with
349 additions
and
126 deletions
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetAccountNumber.sql
0 → 100644
1 | +SET QUOTED_IDENTIFIER ON | ||
2 | +GO | ||
3 | +SET ANSI_NULLS ON | ||
4 | +GO | ||
5 | + | ||
6 | +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetAccountNumber]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) | ||
7 | +drop procedure [dbo].[usp_GetAccountNumber] | ||
8 | +GO | ||
9 | + | ||
10 | +-- ==================================================== | ||
11 | +-- Author: Magic Software | ||
12 | +-- Create date: 23-Dec-2009 | ||
13 | +-- Description: To get the details of all discounts | ||
14 | +-- ==================================================== | ||
15 | +CREATE PROCEDURE [dbo].[usp_GetAccountNumber] | ||
16 | + -- Add the parameters for the stored procedure here | ||
17 | + | ||
18 | +AS | ||
19 | +BEGIN | ||
20 | + -- SET NOCOUNT ON added to prevent extra result sets from | ||
21 | + -- interfering with SELECT statements. | ||
22 | + SET NOCOUNT ON; | ||
23 | + SELECT License.Id,License.AccountNumber FROM License | ||
24 | +INNER JOIN LicenseType ON LicenseType.Id = License.LicenseTypeId | ||
25 | +WHERE License.IsActive = 1 | ||
26 | +END | ||
27 | + | ||
28 | +GO | ||
29 | +SET QUOTED_IDENTIFIER OFF | ||
30 | +GO | ||
31 | +SET ANSI_NULLS ON | ||
32 | +GO | ||
33 | + |
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetProductEditionByLicense.sql
0 → 100644
1 | +SET QUOTED_IDENTIFIER ON | ||
2 | +GO | ||
3 | +SET ANSI_NULLS ON | ||
4 | +GO | ||
5 | + | ||
6 | +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetProductEdition]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) | ||
7 | +drop procedure [dbo].[usp_GetProductEdition] | ||
8 | +GO | ||
9 | + | ||
10 | +-- ==================================================== | ||
11 | +-- Author: Magic Software | ||
12 | +-- Create date: 23-Dec-2009 | ||
13 | +-- Description: To get the details of all discounts | ||
14 | +-- ==================================================== | ||
15 | +CREATE PROCEDURE [dbo].[usp_GetProductEdition] | ||
16 | + -- Add the parameters for the stored procedure here | ||
17 | + @iLicenseId int | ||
18 | +AS | ||
19 | +BEGIN | ||
20 | + -- SET NOCOUNT ON added to prevent extra result sets from | ||
21 | + -- interfering with SELECT statements. | ||
22 | + SET NOCOUNT ON; | ||
23 | + SELECT Edition.Id, Edition.Title, Edition.IsActive, Edition.Priority | ||
24 | + FROM Edition | ||
25 | + INNER JOIN LicenseToEdition ON Edition.Id = LicenseToEdition.EditionId | ||
26 | + WHERE LicenseToEdition.LicenseId =@iLicenseId | ||
27 | +END | ||
28 | + | ||
29 | +GO | ||
30 | +SET QUOTED_IDENTIFIER OFF | ||
31 | +GO | ||
32 | +SET ANSI_NULLS ON | ||
33 | +GO | ||
34 | + |
400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj
@@ -709,9 +709,15 @@ | @@ -709,9 +709,15 @@ | ||
709 | <Compile Include="Entity\usp_DB_TblRowCOUNT_Result.cs"> | 709 | <Compile Include="Entity\usp_DB_TblRowCOUNT_Result.cs"> |
710 | <DependentUpon>AIADBEntity.tt</DependentUpon> | 710 | <DependentUpon>AIADBEntity.tt</DependentUpon> |
711 | </Compile> | 711 | </Compile> |
712 | + <Compile Include="Entity\usp_GetAccountNumber_Result.cs"> | ||
713 | + <DependentUpon>AIADBEntity.tt</DependentUpon> | ||
714 | + </Compile> | ||
712 | <Compile Include="Entity\usp_GetAccountTypeList_Result.cs"> | 715 | <Compile Include="Entity\usp_GetAccountTypeList_Result.cs"> |
713 | <DependentUpon>AIADBEntity.tt</DependentUpon> | 716 | <DependentUpon>AIADBEntity.tt</DependentUpon> |
714 | </Compile> | 717 | </Compile> |
718 | + <Compile Include="Entity\usp_GetProductEditionByLicense_Result.cs"> | ||
719 | + <DependentUpon>AIADBEntity.tt</DependentUpon> | ||
720 | + </Compile> | ||
715 | <Compile Include="Entity\usp_GetUserType_Result.cs"> | 721 | <Compile Include="Entity\usp_GetUserType_Result.cs"> |
716 | <DependentUpon>AIADBEntity.tt</DependentUpon> | 722 | <DependentUpon>AIADBEntity.tt</DependentUpon> |
717 | </Compile> | 723 | </Compile> |
@@ -796,7 +802,9 @@ | @@ -796,7 +802,9 @@ | ||
796 | <Content Include="Scripts\modernizr-2.6.2.js" /> | 802 | <Content Include="Scripts\modernizr-2.6.2.js" /> |
797 | <Content Include="Scripts\respond.js" /> | 803 | <Content Include="Scripts\respond.js" /> |
798 | <Content Include="Scripts\respond.min.js" /> | 804 | <Content Include="Scripts\respond.min.js" /> |
799 | - <Content Include="Web.config" /> | 805 | + <Content Include="Web.config"> |
806 | + <SubType>Designer</SubType> | ||
807 | + </Content> | ||
800 | <Content Include="Web.Debug.config"> | 808 | <Content Include="Web.Debug.config"> |
801 | <DependentUpon>Web.config</DependentUpon> | 809 | <DependentUpon>Web.config</DependentUpon> |
802 | </Content> | 810 | </Content> |
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
@@ -16,13 +16,17 @@ using AIAHTML5.ADMIN.API.Entity; | @@ -16,13 +16,17 @@ using AIAHTML5.ADMIN.API.Entity; | ||
16 | 16 | ||
17 | namespace AIAHTML5.ADMIN.API.Controllers | 17 | namespace AIAHTML5.ADMIN.API.Controllers |
18 | { | 18 | { |
19 | - [EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] | 19 | + // [EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] |
20 | [RoutePrefix("User")] | 20 | [RoutePrefix("User")] |
21 | public class UserController : ApiController | 21 | public class UserController : ApiController |
22 | { | 22 | { |
23 | AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities(); | 23 | AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities(); |
24 | 24 | ||
25 | - [Route("Api/GetUserProfile/{userId}")] | 25 | + public IEnumerable<string> Get() |
26 | + { | ||
27 | + return new string[] { "value1", "value2" }; | ||
28 | + } | ||
29 | + [Route("GetUserProfile/{userId}")] | ||
26 | [HttpGet] | 30 | [HttpGet] |
27 | public IHttpActionResult GetUserProfile(int userId) | 31 | public IHttpActionResult GetUserProfile(int userId) |
28 | { | 32 | { |
@@ -38,7 +42,7 @@ namespace AIAHTML5.ADMIN.API.Controllers | @@ -38,7 +42,7 @@ namespace AIAHTML5.ADMIN.API.Controllers | ||
38 | //return ToJson(dbContext.AIAUsers.Where(u => u.Id == userId).AsEnumerable()); | 42 | //return ToJson(dbContext.AIAUsers.Where(u => u.Id == userId).AsEnumerable()); |
39 | 43 | ||
40 | } | 44 | } |
41 | - [Route("Api/UpdateProfile")] | 45 | + [Route("UpdateProfile")] |
42 | [HttpPost] | 46 | [HttpPost] |
43 | public HttpResponseMessage UpdateUserProfile(UserModel userInfo) | 47 | public HttpResponseMessage UpdateUserProfile(UserModel userInfo) |
44 | { | 48 | { |
@@ -61,7 +65,7 @@ namespace AIAHTML5.ADMIN.API.Controllers | @@ -61,7 +65,7 @@ namespace AIAHTML5.ADMIN.API.Controllers | ||
61 | return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); | 65 | return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); |
62 | } | 66 | } |
63 | } | 67 | } |
64 | - [Route("Api/ChangeUserPassword")] | 68 | + [Route("ChangeUserPassword")] |
65 | [HttpPost] | 69 | [HttpPost] |
66 | public HttpResponseMessage UpdateUserPassword(JObject jsonData) | 70 | public HttpResponseMessage UpdateUserPassword(JObject jsonData) |
67 | { | 71 | { |
@@ -86,7 +90,7 @@ namespace AIAHTML5.ADMIN.API.Controllers | @@ -86,7 +90,7 @@ namespace AIAHTML5.ADMIN.API.Controllers | ||
86 | return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); | 90 | return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); |
87 | } | 91 | } |
88 | } | 92 | } |
89 | - [Route("Api/UpdateUserId")] | 93 | + [Route("UpdateUserId")] |
90 | [HttpPost] | 94 | [HttpPost] |
91 | public HttpResponseMessage UpdateUserId(UserModel userInfo) | 95 | public HttpResponseMessage UpdateUserId(UserModel userInfo) |
92 | { | 96 | { |
@@ -114,8 +118,8 @@ namespace AIAHTML5.ADMIN.API.Controllers | @@ -114,8 +118,8 @@ namespace AIAHTML5.ADMIN.API.Controllers | ||
114 | } | 118 | } |
115 | } | 119 | } |
116 | 120 | ||
117 | - #region USERS | ||
118 | - [Route("Api/GetUserType/{UserTypeId}")] | 121 | + #region USERS List |
122 | + [Route("GetUserType/{UserTypeId}")] | ||
119 | [HttpGet] | 123 | [HttpGet] |
120 | public IHttpActionResult GetUserType(int UserTypeId) | 124 | public IHttpActionResult GetUserType(int UserTypeId) |
121 | { | 125 | { |
@@ -127,7 +131,7 @@ namespace AIAHTML5.ADMIN.API.Controllers | @@ -127,7 +131,7 @@ namespace AIAHTML5.ADMIN.API.Controllers | ||
127 | return Ok(userTypelist); | 131 | return Ok(userTypelist); |
128 | } | 132 | } |
129 | 133 | ||
130 | - [Route("Api/GetAccountType/{AccountTypeId}")] | 134 | + [Route("GetAccountType/{AccountTypeId}")] |
131 | [HttpGet] | 135 | [HttpGet] |
132 | public IHttpActionResult GetAccountType(int AccountTypeId) | 136 | public IHttpActionResult GetAccountType(int AccountTypeId) |
133 | { | 137 | { |
@@ -135,7 +139,7 @@ namespace AIAHTML5.ADMIN.API.Controllers | @@ -135,7 +139,7 @@ namespace AIAHTML5.ADMIN.API.Controllers | ||
135 | return Ok(AccountTypeModel.GetAccountTypeList(dbContext, AccountTypeId)); | 139 | return Ok(AccountTypeModel.GetAccountTypeList(dbContext, AccountTypeId)); |
136 | } | 140 | } |
137 | 141 | ||
138 | - [Route("Api/Users")] | 142 | + [Route("Users")] |
139 | [HttpGet] | 143 | [HttpGet] |
140 | public IHttpActionResult UserList(string firstname, string lastname, string emailid, string accountnumber, string usertypeid, string accounttypeid) | 144 | public IHttpActionResult UserList(string firstname, string lastname, string emailid, string accountnumber, string usertypeid, string accounttypeid) |
141 | { | 145 | { |
@@ -145,7 +149,46 @@ namespace AIAHTML5.ADMIN.API.Controllers | @@ -145,7 +149,46 @@ namespace AIAHTML5.ADMIN.API.Controllers | ||
145 | List<GetSearchUserList_Result> Users = dbContext.GetSearchUserList(firstname, lastname, emailid, accountnumber, UserTypeId, AccountTypeId, 1).ToList(); | 149 | List<GetSearchUserList_Result> Users = dbContext.GetSearchUserList(firstname, lastname, emailid, accountnumber, UserTypeId, AccountTypeId, 1).ToList(); |
146 | return Ok(Users); | 150 | return Ok(Users); |
147 | } | 151 | } |
152 | + | ||
148 | #endregion | 153 | #endregion |
154 | + #region Add User | ||
155 | + [Route("GetUserTypebyLicenseId")] | ||
156 | + [HttpGet] | ||
157 | + public IHttpActionResult GetUserTypebyLicenseId(short UserTypeId, int LicenseId) | ||
158 | + { | ||
159 | + dbContext.Configuration.ProxyCreationEnabled = false; | ||
160 | + List<GetUserTyeByAccountNumber_Result> userTypelist = new List<GetUserTyeByAccountNumber_Result>(); | ||
161 | + var userTypeEntity = dbContext.GetUserTyeByAccountNumber((byte)UserTypeId, LicenseId).ToList(); | ||
162 | + userTypelist = userTypeEntity.Select(l => new GetUserTyeByAccountNumber_Result() { Id = l.Id, Title = l.Title }).ToList(); | ||
163 | + //userTypelist.Insert(0, new UserType { Id = 0, Title = "All" }); | ||
164 | + return Ok(userTypelist); | ||
165 | + } | ||
166 | + | ||
167 | + [Route("GetAccountNumber")] | ||
168 | + [HttpGet] | ||
169 | + public IHttpActionResult GetAccountNumber() | ||
170 | + { | ||
171 | + dbContext.Configuration.ProxyCreationEnabled = false; | ||
172 | + List<usp_GetAccountNumber_Result> AccountNumberList = new List<usp_GetAccountNumber_Result>(); | ||
173 | + var AccountNumberEntity = dbContext.usp_GetAccountNumber().ToList(); | ||
174 | + AccountNumberList = AccountNumberEntity.Select(l => new usp_GetAccountNumber_Result() { Id = l.Id, AccountNumber = l.AccountNumber }).ToList(); | ||
175 | + //userTypelist.Insert(0, new UserType { Id = 0, Title = "All" }); | ||
176 | + return Ok(AccountNumberList); | ||
177 | + } | ||
178 | + | ||
179 | + [Route("GetAccountNumber")] | ||
180 | + [HttpGet] | ||
181 | + public IHttpActionResult GetProductEditionByLicense(int LicenseId) | ||
182 | + { | ||
183 | + dbContext.Configuration.ProxyCreationEnabled = false; | ||
184 | + List<usp_GetProductEditionByLicense_Result> ProductEditionList = new List<usp_GetProductEditionByLicense_Result>(); | ||
185 | + var ProductEditionListEntity = dbContext.usp_GetProductEditionByLicense(LicenseId).ToList(); | ||
186 | + ProductEditionList = ProductEditionListEntity.Select(l => new usp_GetProductEditionByLicense_Result() { Id = l.Id, Title = l.Title }).ToList(); | ||
187 | + //userTypelist.Insert(0, new UserType { Id = 0, Title = "All" }); | ||
188 | + return Ok(ProductEditionList); | ||
189 | + } | ||
190 | + #endregion | ||
191 | + | ||
149 | protected HttpResponseMessage ToJson(dynamic obj) | 192 | protected HttpResponseMessage ToJson(dynamic obj) |
150 | { | 193 | { |
151 | var response = Request.CreateResponse(HttpStatusCode.OK); | 194 | var response = Request.CreateResponse(HttpStatusCode.OK); |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
@@ -2922,5 +2922,19 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -2922,5 +2922,19 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
2922 | 2922 | ||
2923 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateUserId", idParameter, userIdParameter, olduserIdParameter, status); | 2923 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateUserId", idParameter, userIdParameter, olduserIdParameter, status); |
2924 | } | 2924 | } |
2925 | + | ||
2926 | + public virtual ObjectResult<usp_GetAccountNumber_Result> usp_GetAccountNumber() | ||
2927 | + { | ||
2928 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetAccountNumber_Result>("usp_GetAccountNumber"); | ||
2929 | + } | ||
2930 | + | ||
2931 | + public virtual ObjectResult<usp_GetProductEditionByLicense_Result> usp_GetProductEditionByLicense(Nullable<int> iLicenseId) | ||
2932 | + { | ||
2933 | + var iLicenseIdParameter = iLicenseId.HasValue ? | ||
2934 | + new ObjectParameter("iLicenseId", iLicenseId) : | ||
2935 | + new ObjectParameter("iLicenseId", typeof(int)); | ||
2936 | + | ||
2937 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetProductEditionByLicense_Result>("usp_GetProductEditionByLicense", iLicenseIdParameter); | ||
2938 | + } | ||
2925 | } | 2939 | } |
2926 | } | 2940 | } |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
@@ -2615,9 +2615,13 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does | @@ -2615,9 +2615,13 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does | ||
2615 | <Parameter Name="Status" Type="int" Mode="InOut" /> | 2615 | <Parameter Name="Status" Type="int" Mode="InOut" /> |
2616 | </Function> | 2616 | </Function> |
2617 | <Function Name="usp_DB_TblRowCOUNT" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> | 2617 | <Function Name="usp_DB_TblRowCOUNT" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> |
2618 | + <Function Name="usp_GetAccountNumber" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> | ||
2618 | <Function Name="usp_GetAccountTypeList" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | 2619 | <Function Name="usp_GetAccountTypeList" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2619 | <Parameter Name="Id" Type="int" Mode="In" /> | 2620 | <Parameter Name="Id" Type="int" Mode="In" /> |
2620 | </Function> | 2621 | </Function> |
2622 | + <Function Name="usp_GetProductEditionByLicense" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | ||
2623 | + <Parameter Name="iLicenseId" Type="int" Mode="In" /> | ||
2624 | + </Function> | ||
2621 | <Function Name="usp_GetUserType" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | 2625 | <Function Name="usp_GetUserType" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2622 | <Parameter Name="id" Type="int" Mode="In" /> | 2626 | <Parameter Name="id" Type="int" Mode="In" /> |
2623 | </Function> | 2627 | </Function> |
@@ -6052,10 +6056,10 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | @@ -6052,10 +6056,10 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | ||
6052 | <Parameter Name="sEndDate" Mode="In" Type="String" /> | 6056 | <Parameter Name="sEndDate" Mode="In" Type="String" /> |
6053 | </FunctionImport> | 6057 | </FunctionImport> |
6054 | <FunctionImport Name="usp_GetAccountTypeList" ReturnType="Collection(AIADatabaseV5Model.usp_GetAccountTypeList_Result)"> | 6058 | <FunctionImport Name="usp_GetAccountTypeList" ReturnType="Collection(AIADatabaseV5Model.usp_GetAccountTypeList_Result)"> |
6055 | - <Parameter Name="Id" Mode="In" Type="Int32" /> | 6059 | + <Parameter Name="Id" Mode="In" Type="Int32" /> |
6056 | </FunctionImport> | 6060 | </FunctionImport> |
6057 | <FunctionImport Name="usp_GetUserType" ReturnType="Collection(AIADatabaseV5Model.usp_GetUserType_Result)"> | 6061 | <FunctionImport Name="usp_GetUserType" ReturnType="Collection(AIADatabaseV5Model.usp_GetUserType_Result)"> |
6058 | - <Parameter Name="id" Mode="In" Type="Int32" /> | 6062 | + <Parameter Name="id" Mode="In" Type="Int32" /> |
6059 | </FunctionImport> | 6063 | </FunctionImport> |
6060 | <FunctionImport Name="usp_UpdateUserId"> | 6064 | <FunctionImport Name="usp_UpdateUserId"> |
6061 | <Parameter Name="Id" Mode="In" Type="Int32" /> | 6065 | <Parameter Name="Id" Mode="In" Type="Int32" /> |
@@ -6063,6 +6067,10 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | @@ -6063,6 +6067,10 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | ||
6063 | <Parameter Name="olduserId" Mode="In" Type="String" /> | 6067 | <Parameter Name="olduserId" Mode="In" Type="String" /> |
6064 | <Parameter Name="Status" Mode="InOut" Type="Int32" /> | 6068 | <Parameter Name="Status" Mode="InOut" Type="Int32" /> |
6065 | </FunctionImport> | 6069 | </FunctionImport> |
6070 | + <FunctionImport Name="usp_GetAccountNumber" ReturnType="Collection(AIADatabaseV5Model.usp_GetAccountNumber_Result)" /> | ||
6071 | + <FunctionImport Name="usp_GetProductEditionByLicense" ReturnType="Collection(AIADatabaseV5Model.usp_GetProductEditionByLicense_Result)"> | ||
6072 | + <Parameter Name="iLicenseId" Mode="In" Type="Int32" /> | ||
6073 | + </FunctionImport> | ||
6066 | </EntityContainer> | 6074 | </EntityContainer> |
6067 | <ComplexType Name="DA_GetBaseLayer_Result"> | 6075 | <ComplexType Name="DA_GetBaseLayer_Result"> |
6068 | <Property Type="Int32" Name="Id" Nullable="false" /> | 6076 | <Property Type="Int32" Name="Id" Nullable="false" /> |
@@ -6870,6 +6878,16 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | @@ -6870,6 +6878,16 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | ||
6870 | <Property Type="Byte" Name="Id" Nullable="false" /> | 6878 | <Property Type="Byte" Name="Id" Nullable="false" /> |
6871 | <Property Type="String" Name="Title" Nullable="false" MaxLength="50" /> | 6879 | <Property Type="String" Name="Title" Nullable="false" MaxLength="50" /> |
6872 | </ComplexType> | 6880 | </ComplexType> |
6881 | + <ComplexType Name="usp_GetAccountNumber_Result"> | ||
6882 | + <Property Type="Int32" Name="Id" Nullable="false" /> | ||
6883 | + <Property Type="String" Name="AccountNumber" Nullable="true" MaxLength="16" /> | ||
6884 | + </ComplexType> | ||
6885 | + <ComplexType Name="usp_GetProductEditionByLicense_Result"> | ||
6886 | + <Property Type="Byte" Name="Id" Nullable="false" /> | ||
6887 | + <Property Type="String" Name="Title" Nullable="false" MaxLength="50" /> | ||
6888 | + <Property Type="Boolean" Name="IsActive" Nullable="false" /> | ||
6889 | + <Property Type="Byte" Name="Priority" Nullable="false" /> | ||
6890 | + </ComplexType> | ||
6873 | </Schema> | 6891 | </Schema> |
6874 | </edmx:ConceptualModels> | 6892 | </edmx:ConceptualModels> |
6875 | <!-- C-S mapping content --> | 6893 | <!-- C-S mapping content --> |
@@ -9176,6 +9194,24 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | @@ -9176,6 +9194,24 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin | ||
9176 | </ResultMapping> | 9194 | </ResultMapping> |
9177 | </FunctionImportMapping> | 9195 | </FunctionImportMapping> |
9178 | <FunctionImportMapping FunctionImportName="usp_UpdateUserId" FunctionName="AIADatabaseV5Model.Store.usp_UpdateUserId" /> | 9196 | <FunctionImportMapping FunctionImportName="usp_UpdateUserId" FunctionName="AIADatabaseV5Model.Store.usp_UpdateUserId" /> |
9197 | + <FunctionImportMapping FunctionImportName="usp_GetAccountNumber" FunctionName="AIADatabaseV5Model.Store.usp_GetAccountNumber"> | ||
9198 | + <ResultMapping> | ||
9199 | + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetAccountNumber_Result"> | ||
9200 | + <ScalarProperty Name="Id" ColumnName="Id" /> | ||
9201 | + <ScalarProperty Name="AccountNumber" ColumnName="AccountNumber" /> | ||
9202 | + </ComplexTypeMapping> | ||
9203 | + </ResultMapping> | ||
9204 | + </FunctionImportMapping> | ||
9205 | + <FunctionImportMapping FunctionImportName="usp_GetProductEditionByLicense" FunctionName="AIADatabaseV5Model.Store.usp_GetProductEditionByLicense"> | ||
9206 | + <ResultMapping> | ||
9207 | + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetProductEditionByLicense_Result"> | ||
9208 | + <ScalarProperty Name="Id" ColumnName="Id" /> | ||
9209 | + <ScalarProperty Name="Title" ColumnName="Title" /> | ||
9210 | + <ScalarProperty Name="IsActive" ColumnName="IsActive" /> | ||
9211 | + <ScalarProperty Name="Priority" ColumnName="Priority" /> | ||
9212 | + </ComplexTypeMapping> | ||
9213 | + </ResultMapping> | ||
9214 | + </FunctionImportMapping> | ||
9179 | </EntityContainerMapping> | 9215 | </EntityContainerMapping> |
9180 | </Mapping> | 9216 | </Mapping> |
9181 | </edmx:Mappings> | 9217 | </edmx:Mappings> |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetAccountNumber_Result.cs
0 → 100644
1 | +//------------------------------------------------------------------------------ | ||
2 | +// <auto-generated> | ||
3 | +// This code was generated from a template. | ||
4 | +// | ||
5 | +// Manual changes to this file may cause unexpected behavior in your application. | ||
6 | +// Manual changes to this file will be overwritten if the code is regenerated. | ||
7 | +// </auto-generated> | ||
8 | +//------------------------------------------------------------------------------ | ||
9 | + | ||
10 | +namespace AIAHTML5.ADMIN.API.Entity | ||
11 | +{ | ||
12 | + using System; | ||
13 | + | ||
14 | + public partial class usp_GetAccountNumber_Result | ||
15 | + { | ||
16 | + public int Id { get; set; } | ||
17 | + public string AccountNumber { get; set; } | ||
18 | + } | ||
19 | +} |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetProductEditionByLicense_Result.cs
0 → 100644
1 | +//------------------------------------------------------------------------------ | ||
2 | +// <auto-generated> | ||
3 | +// This code was generated from a template. | ||
4 | +// | ||
5 | +// Manual changes to this file may cause unexpected behavior in your application. | ||
6 | +// Manual changes to this file will be overwritten if the code is regenerated. | ||
7 | +// </auto-generated> | ||
8 | +//------------------------------------------------------------------------------ | ||
9 | + | ||
10 | +namespace AIAHTML5.ADMIN.API.Entity | ||
11 | +{ | ||
12 | + using System; | ||
13 | + | ||
14 | + public partial class usp_GetProductEditionByLicense_Result | ||
15 | + { | ||
16 | + public byte Id { get; set; } | ||
17 | + public string Title { get; set; } | ||
18 | + public bool IsActive { get; set; } | ||
19 | + public byte Priority { get; set; } | ||
20 | + } | ||
21 | +} |
400-SOURCECODE/AIAHTML5.ADMIN.API/Web.config
@@ -53,11 +53,26 @@ | @@ -53,11 +53,26 @@ | ||
53 | </dependentAssembly> | 53 | </dependentAssembly> |
54 | </assemblyBinding> | 54 | </assemblyBinding> |
55 | </runtime> | 55 | </runtime> |
56 | - <connectionStrings><add name="AIADatabaseV5Entities1" connectionString="metadata=res://*/Entity.AIADBEntity.csdl|res://*/Entity.AIADBEntity.ssdl|res://*/Entity.AIADBEntity.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.90.53;initial catalog=AIADatabaseV5;user id=aia_dev;password=india123;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" /><add name="AIADatabaseV5Entities" connectionString="metadata=res://*/Entity.AIADBEntity.csdl|res://*/Entity.AIADBEntity.ssdl|res://*/Entity.AIADBEntity.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.90.53;initial catalog=AIADatabaseV5;persist security info=True;user id=aia_dev;password=india123;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" /></connectionStrings> | 56 | + <connectionStrings> |
57 | + <add name="AIADatabaseV5Entities1" connectionString="metadata=res://*/Entity.AIADBEntity.csdl|res://*/Entity.AIADBEntity.ssdl|res://*/Entity.AIADBEntity.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.90.53;initial catalog=AIADatabaseV5;user id=aia_dev;password=india123;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" /> | ||
58 | + <add name="AIADatabaseV5Entities" connectionString="metadata=res://*/Entity.AIADBEntity.csdl|res://*/Entity.AIADBEntity.ssdl|res://*/Entity.AIADBEntity.msl;provider=System.Data.SqlClient;provider connection string="data source=192.168.90.53;initial catalog=AIADatabaseV5;persist security info=True;user id=aia_dev;password=india123;multipleactiveresultsets=True;application name=EntityFramework"" providerName="System.Data.EntityClient" /></connectionStrings> | ||
57 | <entityFramework> | 59 | <entityFramework> |
58 | <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> | 60 | <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> |
59 | </entityFramework> | 61 | </entityFramework> |
60 | <system.webServer> | 62 | <system.webServer> |
63 | + <!--<rewrite> | ||
64 | + <rules> | ||
65 | + <rule name="AngularJS Routes" stopProcessing="true"> | ||
66 | + <match url=".*" /> | ||
67 | + <conditions logicalGrouping="MatchAll"> | ||
68 | + <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" /> | ||
69 | + <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" /> | ||
70 | + <add input="{REQUEST_URI}" pattern="^/(api)" negate="true" /> | ||
71 | + </conditions> | ||
72 | + <action type="Rewrite" url="/" /> | ||
73 | + </rule> | ||
74 | + </rules> | ||
75 | + </rewrite>--> | ||
61 | <handlers> | 76 | <handlers> |
62 | <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> | 77 | <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> |
63 | <remove name="OPTIONSVerbHandler" /> | 78 | <remove name="OPTIONSVerbHandler" /> |
400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js
1 | -AIA.factory('AuthenticationService', function ($http, $q, $rootScope, LoginConstants) { | ||
2 | - return { | ||
3 | - authenticateUser: function (userInfo) { | ||
4 | - var deferred = $q.defer(); | ||
5 | - | ||
6 | - $http.post('/API/api/Authenticate', JSON.stringify(userInfo), { | ||
7 | - headers: { | ||
8 | - 'Content-Type': 'application/json' | ||
9 | - } | ||
10 | - }) | ||
11 | - .success(function (data, status, headers, config) { | ||
12 | - console.log('success') | ||
13 | - deferred.resolve(data); | ||
14 | - }).error(function (data, status, headers, config) { | ||
15 | - console.log('error') | ||
16 | - deferred.reject(data); | ||
17 | - $rootScope.isVisibleLogin = true; | ||
18 | - $rootScope.errorMessage = data; | ||
19 | - $("#messageModal").modal('show'); | ||
20 | - | ||
21 | - }); | ||
22 | - return deferred.promise; | ||
23 | - }, | ||
24 | - | ||
25 | - SendMailToUser: function (userInfo, havePassword) { | ||
26 | - var deferred = $q.defer(); | ||
27 | - | ||
28 | - $http.post('/API/api/ForgotUser', userInfo, { //JSON.stringify(userEmail) | ||
29 | - headers: { | ||
30 | - 'Content-Type': 'application/json' | ||
31 | - } | ||
32 | - }) | ||
33 | - .success(function (data, status, headers, config) { | ||
34 | - console.log('success'); | ||
35 | - deferred.resolve(data); | ||
36 | - }).error(function (data, status, headers, config) { | ||
37 | - console.log('error') | ||
38 | - deferred.reject(data); | ||
39 | - | ||
40 | - $rootScope.isVisibleLogin = true; | ||
41 | - $rootScope.errorMessage = data; | ||
42 | - $("#messageModal").modal('show'); | ||
43 | - }); | ||
44 | - return deferred.promise; | ||
45 | - }, | ||
46 | - | ||
47 | - ResetUserPassword: function (userInfo) { | ||
48 | - var deferred = $q.defer(); | ||
49 | - | ||
50 | - $http.post('/API/api/ResetPassword', JSON.stringify(userInfo), { | ||
51 | - headers: { | ||
52 | - 'Content-Type': 'application/json' | ||
53 | - } | ||
54 | - }) | ||
55 | - .success(function (data, status, headers, config) { | ||
56 | - console.log('success') | ||
57 | - deferred.resolve(data); | ||
58 | - }).error(function (data, status, headers, config) { | ||
59 | - console.log('error') | ||
60 | - deferred.reject(data); | ||
61 | - | ||
62 | - $rootScope.isVisibleLogin = true; | ||
63 | - $rootScope.errorMessage = data; | ||
64 | - $("#messageModal").modal('show'); | ||
65 | - }); | ||
66 | - return deferred.promise; | ||
67 | - }, | ||
68 | - | ||
69 | - UpdateLicenseTerm: function (licenseeAccountNumber) { | ||
70 | - var deferred = $q.defer(); | ||
71 | - | ||
72 | - $http.post('/API/api/LicenseTermCondition', JSON.stringify(licenseeAccountNumber), { | ||
73 | - headers: { | ||
74 | - 'Content-Type': 'application/json' | ||
75 | - } | ||
76 | - }) | ||
77 | - .success(function (data, status, headers, config) { | ||
78 | - console.log('success') | ||
79 | - deferred.resolve(data); | ||
80 | - }).error(function (data, status, headers, config) { | ||
81 | - console.log('error') | ||
82 | - deferred.reject(data); | ||
83 | - | ||
84 | - $rootScope.isVisibleLogin = true; | ||
85 | - $rootScope.errorMessage = data; | ||
86 | - $("#messageModal").modal('show'); | ||
87 | - }); | ||
88 | - return deferred.promise; | ||
89 | - }, | ||
90 | - | ||
91 | - UnblockUser: function (userEmailId) { | ||
92 | - var deferred = $q.defer(); | ||
93 | - | ||
94 | - $http.post('/API/api/UnblockUser', JSON.stringify(userEmailId), { | ||
95 | - headers: { | ||
96 | - 'Content-Type': 'application/json' | ||
97 | - } | ||
98 | - }) | ||
99 | - .success(function (data, status, headers, config) { | ||
100 | - console.log('success') | ||
101 | - deferred.resolve(data); | ||
102 | - }).error(function (data, status, headers, config) { | ||
103 | - console.log('error') | ||
104 | - deferred.reject(data); | ||
105 | - | ||
106 | - $rootScope.isVisibleLogin = true; | ||
107 | - $rootScope.errorMessage = data; | ||
108 | - $("#messageModal").modal('show'); | ||
109 | - }); | ||
110 | - return deferred.promise; | ||
111 | - } | ||
112 | - | ||
113 | - } | 1 | +AIA.factory('AuthenticationService', function ($http, $q, $rootScope, LoginConstants) { |
2 | + return { | ||
3 | + authenticateUser: function (userInfo) { | ||
4 | + var deferred = $q.defer(); | ||
5 | + | ||
6 | + $http.post('/API/api/Authenticate', JSON.stringify(userInfo), { | ||
7 | + headers: { | ||
8 | + 'Content-Type': 'application/json' | ||
9 | + } | ||
10 | + }) | ||
11 | + .success(function (data, status, headers, config) { | ||
12 | + console.log('success') | ||
13 | + deferred.resolve(data); | ||
14 | + }).error(function (data, status, headers, config) { | ||
15 | + console.log('error') | ||
16 | + deferred.reject(data); | ||
17 | + $rootScope.isVisibleLogin = true; | ||
18 | + $rootScope.errorMessage = data; | ||
19 | + $("#messageModal").modal('show'); | ||
20 | + | ||
21 | + }); | ||
22 | + return deferred.promise; | ||
23 | + }, | ||
24 | + | ||
25 | + SendMailToUser: function (userInfo, havePassword) { | ||
26 | + var deferred = $q.defer(); | ||
27 | + | ||
28 | + $http.post('/API/api/ForgotUser', userInfo, { //JSON.stringify(userEmail) | ||
29 | + headers: { | ||
30 | + 'Content-Type': 'application/json' | ||
31 | + } | ||
32 | + }) | ||
33 | + .success(function (data, status, headers, config) { | ||
34 | + console.log('success'); | ||
35 | + deferred.resolve(data); | ||
36 | + }).error(function (data, status, headers, config) { | ||
37 | + console.log('error') | ||
38 | + deferred.reject(data); | ||
39 | + | ||
40 | + $rootScope.isVisibleLogin = true; | ||
41 | + $rootScope.errorMessage = data; | ||
42 | + $("#messageModal").modal('show'); | ||
43 | + }); | ||
44 | + return deferred.promise; | ||
45 | + }, | ||
46 | + | ||
47 | + ResetUserPassword: function (userInfo) { | ||
48 | + var deferred = $q.defer(); | ||
49 | + | ||
50 | + $http.post('/API/api/ResetPassword', JSON.stringify(userInfo), { | ||
51 | + headers: { | ||
52 | + 'Content-Type': 'application/json' | ||
53 | + } | ||
54 | + }) | ||
55 | + .success(function (data, status, headers, config) { | ||
56 | + console.log('success') | ||
57 | + deferred.resolve(data); | ||
58 | + }).error(function (data, status, headers, config) { | ||
59 | + console.log('error') | ||
60 | + deferred.reject(data); | ||
61 | + | ||
62 | + $rootScope.isVisibleLogin = true; | ||
63 | + $rootScope.errorMessage = data; | ||
64 | + $("#messageModal").modal('show'); | ||
65 | + }); | ||
66 | + return deferred.promise; | ||
67 | + }, | ||
68 | + | ||
69 | + UpdateLicenseTerm: function (licenseeAccountNumber) { | ||
70 | + var deferred = $q.defer(); | ||
71 | + | ||
72 | + $http.post('/API/api/LicenseTermCondition', JSON.stringify(licenseeAccountNumber), { | ||
73 | + headers: { | ||
74 | + 'Content-Type': 'application/json' | ||
75 | + } | ||
76 | + }) | ||
77 | + .success(function (data, status, headers, config) { | ||
78 | + console.log('success') | ||
79 | + deferred.resolve(data); | ||
80 | + }).error(function (data, status, headers, config) { | ||
81 | + console.log('error') | ||
82 | + deferred.reject(data); | ||
83 | + | ||
84 | + $rootScope.isVisibleLogin = true; | ||
85 | + $rootScope.errorMessage = data; | ||
86 | + $("#messageModal").modal('show'); | ||
87 | + }); | ||
88 | + return deferred.promise; | ||
89 | + }, | ||
90 | + | ||
91 | + UnblockUser: function (userEmailId) { | ||
92 | + var deferred = $q.defer(); | ||
93 | + | ||
94 | + $http.post('/API/api/UnblockUser', JSON.stringify(userEmailId), { | ||
95 | + headers: { | ||
96 | + 'Content-Type': 'application/json' | ||
97 | + } | ||
98 | + }) | ||
99 | + .success(function (data, status, headers, config) { | ||
100 | + console.log('success') | ||
101 | + deferred.resolve(data); | ||
102 | + }).error(function (data, status, headers, config) { | ||
103 | + console.log('error') | ||
104 | + deferred.reject(data); | ||
105 | + | ||
106 | + $rootScope.isVisibleLogin = true; | ||
107 | + $rootScope.errorMessage = data; | ||
108 | + $("#messageModal").modal('show'); | ||
109 | + }); | ||
110 | + return deferred.promise; | ||
111 | + } | ||
112 | + | ||
113 | + } | ||
114 | }); | 114 | }); |
115 | \ No newline at end of file | 115 | \ No newline at end of file |