Commit 0b206edb316e9c3f08dcaee3a148d89bfd4221aa
1 parent
a3a3d504
testing
Showing
3 changed files
with
39 additions
and
5 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj
... | ... | @@ -741,6 +741,9 @@ |
741 | 741 | <Compile Include="Entity\usp_GetLicenseUserGroups_Result.cs"> |
742 | 742 | <DependentUpon>AIADBEntity.tt</DependentUpon> |
743 | 743 | </Compile> |
744 | + <Compile Include="Entity\usp_GetLicenseUserGroupUsers_Result.cs"> | |
745 | + <DependentUpon>AIADBEntity.tt</DependentUpon> | |
746 | + </Compile> | |
744 | 747 | <Compile Include="Entity\usp_GetManageRights_Result.cs"> |
745 | 748 | <DependentUpon>AIADBEntity.tt</DependentUpon> |
746 | 749 | </Compile> | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseUserGroupUsers_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_GetLicenseUserGroupUsers_Result | |
15 | + { | |
16 | + public Nullable<long> RowNo { get; set; } | |
17 | + public int Id { get; set; } | |
18 | + public string FirstName { get; set; } | |
19 | + public string LastName { get; set; } | |
20 | + public string LoginId { get; set; } | |
21 | + public string EmailId { get; set; } | |
22 | + public string Title { get; set; } | |
23 | + public int InGroup { get; set; } | |
24 | + } | |
25 | +} | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs
... | ... | @@ -16,13 +16,15 @@ namespace AIAHTML5.ADMIN.API.Models |
16 | 16 | public bool? IsActive { get; set; } |
17 | 17 | public int? TotalUsers { get; set; } |
18 | 18 | |
19 | - public static List<UserGroupModel> GetLicenseUserGroups(AIADatabaseV5Entities dbContext, int LicenseId) | |
19 | + public static List<UserGroupModel> GetLicenseUserGroups(AIADatabaseV5Entities dbContext, int LicenseId, int pageNo, int pageLength, out int recordCount) | |
20 | 20 | { |
21 | 21 | List<UserGroupModel> UserGroupList = new List<UserGroupModel>(); |
22 | 22 | UserGroupModel UserGroupObj = new UserGroupModel(); |
23 | + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | |
24 | + recordCount = 0; | |
23 | 25 | try |
24 | 26 | { |
25 | - var result = dbContext.usp_GetLicenseUserGroups(LicenseId).ToList(); | |
27 | + var result = dbContext.usp_GetLicenseUserGroups(LicenseId, pageNo, pageLength, spRecordCount).ToList(); | |
26 | 28 | foreach (var item in result) |
27 | 29 | { |
28 | 30 | UserGroupObj = new UserGroupModel(); |
... | ... | @@ -35,18 +37,21 @@ namespace AIAHTML5.ADMIN.API.Models |
35 | 37 | UserGroupObj.TotalUsers = item.TotalUsers; |
36 | 38 | UserGroupList.Add(UserGroupObj); |
37 | 39 | } |
40 | + recordCount = (int)spRecordCount.Value; | |
38 | 41 | } |
39 | 42 | catch (Exception ex) { } |
40 | 43 | return UserGroupList; |
41 | 44 | } |
42 | 45 | |
43 | - public static List<UserModel> GetLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int LicenseId, int UserGroupId) | |
46 | + public static List<UserModel> GetLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int LicenseId, int UserGroupId, bool AllUsers, int pageNo, int pageLength, out int recordCount) | |
44 | 47 | { |
45 | 48 | List<UserModel> UserList = new List<UserModel>(); |
46 | 49 | UserModel UserModelObj = new UserModel(); |
50 | + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | |
51 | + recordCount = 0; | |
47 | 52 | try |
48 | 53 | { |
49 | - var result = dbContext.GetAllUserWithGroup(LicenseId, UserGroupId).ToList(); | |
54 | + var result = dbContext.usp_GetLicenseUserGroupUsers(LicenseId, UserGroupId, AllUsers, pageNo, pageLength, spRecordCount).ToList(); | |
50 | 55 | foreach (var item in result) |
51 | 56 | { |
52 | 57 | UserModelObj = new UserModel(); |
... | ... | @@ -59,6 +64,7 @@ namespace AIAHTML5.ADMIN.API.Models |
59 | 64 | UserModelObj.InGroup = item.InGroup; |
60 | 65 | UserList.Add(UserModelObj); |
61 | 66 | } |
67 | + recordCount = (int)spRecordCount.Value; | |
62 | 68 | } |
63 | 69 | catch (Exception ex) { } |
64 | 70 | return UserList; |
... | ... | @@ -69,7 +75,7 @@ namespace AIAHTML5.ADMIN.API.Models |
69 | 75 | var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); |
70 | 76 | try |
71 | 77 | { |
72 | - dbContext.usp_InsertUpdateLicenseUserGroup(UserGroupEntity.Id, UserGroupEntity.LicenseId, UserGroupEntity.Title, | |
78 | + dbContext.usp_InsertUpdateLicenseUserGroup(UserGroupEntity.Id, UserGroupEntity.LicenseId, UserGroupEntity.Title, | |
73 | 79 | UserGroupEntity.CreationDate, UserGroupEntity.ModifiedDate, UserGroupEntity.IsActive, spStatus); |
74 | 80 | return (bool)spStatus.Value; |
75 | 81 | } | ... | ... |