Commit fb06cc4e22a1216a01e741795ca1d6f7b905e247
1 parent
a8b6a97c
admin user update partially updated
Showing
4 changed files
with
9 additions
and
9 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
... | ... | @@ -49,9 +49,9 @@ namespace AIAHTML5.ADMIN.API.Controllers |
49 | 49 | { |
50 | 50 | dbContext.Configuration.ProxyCreationEnabled = false; |
51 | 51 | try |
52 | - { | |
52 | + { | |
53 | 53 | return Ok(dbContext.AIAUsers.Where(u => u.Id == userId).Select(s => new UserModel { |
54 | - DeactivationDate=s.DeactivationDate.Value, | |
54 | + DeactivationDate=s.DeactivationDate, | |
55 | 55 | Createdby = dbContext.AIAUsers.Where(sub1 => sub1.Id == s.CreatorId).Select(sub1 => sub1.FirstName ).FirstOrDefault()+ " "+ dbContext.AIAUsers.Where(sub1 => sub1.Id == s.CreatorId).Select(sub1 => sub1.LastName).FirstOrDefault(), |
56 | 56 | Modifiedby = dbContext.AIAUsers.Where(sub1 => sub1.Id == s.ModifierId).Select(sub1 => sub1.FirstName ).FirstOrDefault() + " " + dbContext.AIAUsers.Where(sub1 => sub1.Id == s.ModifierId).Select(sub1 => sub1.LastName).FirstOrDefault() |
57 | 57 | }).ToList()); | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs
... | ... | @@ -24,7 +24,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
24 | 24 | |
25 | 25 | [Route("LicenseUserGroups")] |
26 | 26 | [HttpGet] |
27 | - public HttpResponseMessage GetLicenseUserGroups(int LicenseId, int pageNo, int pageLength) | |
27 | + public HttpResponseMessage GetLicenseUserGroups(int? LicenseId, int pageNo, int pageLength) | |
28 | 28 | { |
29 | 29 | List<UserGroupModel> UserGroupList = new List<UserGroupModel>(); |
30 | 30 | int recordCount = 0; |
... | ... | @@ -42,7 +42,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
42 | 42 | |
43 | 43 | [Route("LicenseUserGroupUsers")] |
44 | 44 | [HttpGet] |
45 | - public HttpResponseMessage GetLicenseUserGroupUsers(int LicenseId, int UserGroupId, bool AllUsers, int pageNo, int pageLength) | |
45 | + public HttpResponseMessage GetLicenseUserGroupUsers(int? LicenseId, int UserGroupId, bool AllUsers, int pageNo, int pageLength) | |
46 | 46 | { |
47 | 47 | List<UserModel> UserList = new List<UserModel>(); |
48 | 48 | int recordCount = 0; |
... | ... | @@ -142,7 +142,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
142 | 142 | |
143 | 143 | [Route("CheckDuplicateLicenseUserGroup")] |
144 | 144 | [HttpGet] |
145 | - public HttpResponseMessage CheckDuplicateLicenseUserGroup(int LicenseId, string Title) | |
145 | + public HttpResponseMessage CheckDuplicateLicenseUserGroup(int? LicenseId, string Title) | |
146 | 146 | { |
147 | 147 | bool Status = false; |
148 | 148 | try | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs
... | ... | @@ -16,7 +16,7 @@ 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, int pageNo, int pageLength, out int recordCount) | |
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(); |
... | ... | @@ -43,7 +43,7 @@ namespace AIAHTML5.ADMIN.API.Models |
43 | 43 | return UserGroupList; |
44 | 44 | } |
45 | 45 | |
46 | - public static List<UserModel> GetLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int LicenseId, int UserGroupId, bool AllUsers, int pageNo, int pageLength, out int recordCount) | |
46 | + public static List<UserModel> GetLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int? LicenseId, int UserGroupId, bool AllUsers, int pageNo, int pageLength, out int recordCount) | |
47 | 47 | { |
48 | 48 | List<UserModel> UserList = new List<UserModel>(); |
49 | 49 | UserModel UserModelObj = new UserModel(); |
... | ... | @@ -113,7 +113,7 @@ namespace AIAHTML5.ADMIN.API.Models |
113 | 113 | } |
114 | 114 | } |
115 | 115 | |
116 | - public static bool CheckDuplicateLicenseUserGroup(AIADatabaseV5Entities dbContext, int LicenseId, string Title) | |
116 | + public static bool CheckDuplicateLicenseUserGroup(AIADatabaseV5Entities dbContext, int? LicenseId, string Title) | |
117 | 117 | { |
118 | 118 | var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); |
119 | 119 | try | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
... | ... | @@ -19,7 +19,7 @@ namespace AIAHTML5.ADMIN.API.Models |
19 | 19 | public string SecurityAnswer { get; set; } |
20 | 20 | public int CreatorId { get; set; } |
21 | 21 | public DateTime CreationDate { get; set; } |
22 | - public DateTime DeactivationDate { get; set; } | |
22 | + public DateTime ? DeactivationDate { get; set; } | |
23 | 23 | public int ModifierId { get; set; } |
24 | 24 | public DateTime ModifiedDate { get; set; } |
25 | 25 | public int UserTypeId { get; set; } | ... | ... |