Commit ff2e54b01b493c73a29a72bdc4e069475d6e53c4

Authored by Nikita Kulshreshtha
1 parent 60d57fa8

manually merged AIAAdminApi

Showing 36 changed files with 1751 additions and 274 deletions
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.GetBlockedUserByAccNoAndType.sql 0 → 100644
  1 +
  2 +-- =============================================
  3 +-- Author: Magic Software
  4 +-- Create date: 12-May-2009
  5 +-- Description: To get the list of blocked user who have attempt 5 times wrong login
  6 +-- =============================================
  7 +CREATE PROCEDURE [dbo].[GetBlockedUserByAccNoAndType]
  8 + -- Add the parameters for the stored procedure here
  9 + @iUserTypeId tinyint, @iLicenseId int
  10 +AS
  11 +BEGIN
  12 + -- returns the metadata
  13 + IF 1=0 BEGIN
  14 + SET FMTONLY OFF
  15 + END
  16 + SELECT DISTINCT
  17 + AIAUser.Id,
  18 + AIAUser.FirstName,
  19 + AIAUser.LastName,
  20 + AIAUser.LoginId,
  21 + AIAUser.Password,
  22 + AIAUser.EmailId,
  23 + ISNULL(License.AccountNumber,'') AccountNumber,
  24 + IncorrectLoginAttempts.LoginTime
  25 + FROM
  26 + IncorrectLoginAttempts
  27 + INNER JOIN AIAUser ON IncorrectLoginAttempts.UserId = AIAUser.Id
  28 + INNER JOIN UserType ON AIAUser.UserTypeId = UserType.Id
  29 + LEFT JOIN AIAUserToLicenseEdition ON AIAUser.Id = AIAUserToLicenseEdition.UserId
  30 + LEFT JOIN LicenseToEdition ON AIAUserToLicenseEdition.LicenseEditionId = LicenseToEdition.Id
  31 + LEFT JOIN License ON LicenseToEdition.LicenseId = License.Id
  32 + WHERE
  33 + IncorrectLoginAttempts.CntIncorrectLogins >= 5
  34 + AND UserType.Priority >= (SELECT UserType.Priority FROM UserType WHERE UserType.Id=@iUserTypeId)
  35 + AND ((@iLicenseId =0) OR (License.Id = @iLicenseId))
  36 + AND License.IsActive = 1
  37 +END
  38 +
  39 +
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.GetSearchUserList.sql
1 1 Binary files a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.GetSearchUserList.sql and b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.GetSearchUserList.sql differ
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_InsertAIAUser.sql 0 → 100644
1 1 Binary files /dev/null and b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_InsertAIAUser.sql differ
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_UpdateAIAUser.sql 0 → 100644
1 1 Binary files /dev/null and b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_UpdateAIAUser.sql differ
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_UpdateblockedUser.sql 0 → 100644
  1 +
  2 +SET QUOTED_IDENTIFIER ON
  3 +GO
  4 +SET ANSI_NULLS ON
  5 +GO
  6 +
  7 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateblockedUser]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  8 +drop procedure [dbo].[usp_UpdateblockedUser]
  9 +GO
  10 +
  11 +
  12 +-- =============================================
  13 +-- Author: <Author,,Name>
  14 +-- Create date: <3-Jan-2018>
  15 +-- Description: <Description,,>
  16 +-- =============================================
  17 +CREATE PROCEDURE [dbo].[usp_UpdateblockedUser]--6,'aiaonline1','aiaonline',0
  18 + -- Add the parameters for the stored procedure here
  19 + @Id int,
  20 + @Status int out
  21 +AS
  22 +BEGIN
  23 + -- SET NOCOUNT ON added to prevent extra result sets from
  24 + -- interfering with SELECT statements.
  25 + SET NOCOUNT ON;
  26 +
  27 + BEGIN TRY
  28 +
  29 +
  30 +
  31 + BEGIN TRANSACTION
  32 + DELETE from IncorrectLoginAttempts where UserId =@Id
  33 + set @Status = 1;
  34 + COMMIT TRANSACTION
  35 + --select '1'
  36 +
  37 +
  38 +
  39 + END TRY
  40 + BEGIN CATCH
  41 + IF @@TRANCOUNT > 0
  42 + ROLLBACK TRANSACTION
  43 + END CATCH
  44 +
  45 +END
  46 +
  47 +GO
  48 +SET QUOTED_IDENTIFIER OFF
  49 +GO
  50 +SET ANSI_NULLS ON
  51 +GO
  52 +
  53 +
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj
... ... @@ -719,6 +719,9 @@
719 719 <Compile Include="Entity\usp_GetProductEditionByLicense_Result.cs">
720 720 <DependentUpon>AIADBEntity.tt</DependentUpon>
721 721 </Compile>
  722 + <Compile Include="Entity\usp_GetSearchUserList_Result.cs">
  723 + <DependentUpon>AIADBEntity.tt</DependentUpon>
  724 + </Compile>
722 725 <Compile Include="Entity\usp_GetSubscriptionPlans_Result.cs">
723 726 <DependentUpon>AIADBEntity.tt</DependentUpon>
724 727 </Compile>
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
... ... @@ -16,7 +16,7 @@ using AIAHTML5.ADMIN.API.Entity;
16 16  
17 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 20 [RoutePrefix("User")]
21 21 public class UserController : ApiController
22 22 {
... ... @@ -146,10 +146,51 @@ namespace AIAHTML5.ADMIN.API.Controllers
146 146 int UserTypeId = (!string.IsNullOrEmpty(usertypeid) ? Convert.ToInt32(usertypeid) : 0);
147 147 int AccountTypeId = (!string.IsNullOrEmpty(accounttypeid) ? Convert.ToInt32(accounttypeid) : 0);
148 148 dbContext.Configuration.ProxyCreationEnabled = false;
149   - List<GetSearchUserList_Result> Users = dbContext.GetSearchUserList(firstname, lastname, emailid, accountnumber, UserTypeId, AccountTypeId, 1).ToList();
  149 + List<usp_GetSearchUserList_Result> Users = dbContext.usp_GetSearchUserList(firstname, lastname, emailid, accountnumber, UserTypeId, AccountTypeId, 1).ToList();
150 150 return Ok(Users);
151 151 }
152 152  
  153 + [Route("UpdateUser")]
  154 + [HttpPost]
  155 + public HttpResponseMessage UpdateUser(JObject jsonUserData)
  156 + {
  157 + string Status = string.Empty;
  158 + UserModel UserEntity = new UserModel();
  159 + UserEntity.Id = jsonUserData["id"].Value<int>();
  160 + UserEntity.FirstName = jsonUserData["FirstName"].Value<string>();
  161 + UserEntity.LastName = jsonUserData["LastName"].Value<string>();
  162 + UserEntity.EmailId = jsonUserData["EmailId"].Value<string>();
  163 + UserEntity.LoginId = jsonUserData["UserName"].Value<string>();
  164 + UserEntity.Password = jsonUserData["Password"].Value<string>();
  165 + UserEntity.IsActive = jsonUserData["IsActive"].Value<bool>();
  166 + UserEntity.CreatorId = jsonUserData["Modifiedby"].Value<int>();
  167 + try
  168 + {
  169 + Status = UserModel.UpdateUser(dbContext, UserEntity);
  170 + if (Status.Equals("1"))
  171 + {
  172 + return Request.CreateResponse(HttpStatusCode.BadRequest, "User Name already exist");
  173 + }
  174 + else if (Status.Equals("2"))
  175 + {
  176 + return Request.CreateResponse(HttpStatusCode.BadRequest, "Email Id already exist");
  177 + }
  178 + else if (Status.Equals("3"))
  179 + {
  180 + return Request.CreateResponse(HttpStatusCode.OK, "User updated successfully");
  181 + }
  182 + else
  183 + {
  184 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "We have encountered a technical error and same has been notified to our technical team.");
  185 + }
  186 + }
  187 + catch (Exception ex)
  188 + {
  189 + // Log exception code goes here
  190 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "We have encountered a technical error and same has been notified to our technical team.");
  191 + }
  192 + }
  193 +
153 194 #endregion
154 195 #region Add User
155 196 [Route("GetUserTypebyLicenseId")]
... ... @@ -161,6 +202,10 @@ namespace AIAHTML5.ADMIN.API.Controllers
161 202 List<GetUserTyeByAccountNumber_Result> userTypelist = new List<GetUserTyeByAccountNumber_Result>();
162 203 var userTypeEntity = dbContext.GetUserTyeByAccountNumber((byte)UserType, LicenseId).ToList();
163 204 userTypelist = userTypeEntity.Select(l => new GetUserTyeByAccountNumber_Result() { Id = l.Id, Title = l.Title }).ToList();
  205 + if (userTypelist != null && userTypelist.Count==0)
  206 + {
  207 + userTypelist.Insert(0, new GetUserTyeByAccountNumber_Result { Id = 2, Title = "General Admin" });
  208 + }
164 209 //userTypelist.Insert(0, new UserType { Id = 0, Title = "All" });
165 210 return Ok(userTypelist);
166 211 }
... ... @@ -188,8 +233,88 @@ namespace AIAHTML5.ADMIN.API.Controllers
188 233 //userTypelist.Insert(0, new UserType { Id = 0, Title = "All" });
189 234 return Ok(ProductEditionList);
190 235 }
  236 +
  237 + [Route("NewUser")]
  238 + [HttpPost]
  239 + public HttpResponseMessage InsertUser(JObject jsonUserData)
  240 + {
  241 + string Status = string.Empty;
  242 + UserModel UserEntity = new UserModel();
  243 + UserEntity.Id = jsonUserData["id"].Value<int>();
  244 + UserEntity.FirstName = jsonUserData["FirstName"].Value<string>();
  245 + UserEntity.LastName = jsonUserData["LastName"].Value<string>();
  246 + UserEntity.EmailId = jsonUserData["EmailId"].Value<string>();
  247 + UserEntity.LoginId = jsonUserData["UserName"].Value<string>();
  248 + UserEntity.Password = jsonUserData["Password"].Value<string>();
  249 + UserEntity.LicenseId = jsonUserData["AccountNumberId"].Value<int>();
  250 + UserEntity.iUserTypeId = jsonUserData["UserTypeId"].Value<short>();
  251 + UserEntity.EditionId = jsonUserData["ProductEditionId"].Value<int>();
  252 +
  253 + try
  254 + {
  255 + Status = UserModel.InsertUser(dbContext, UserEntity);
  256 + if (Status.Equals("1"))
  257 + {
  258 + return Request.CreateResponse(HttpStatusCode.BadRequest, "User Name already exist");
  259 + }
  260 + else if (Status.Equals("2"))
  261 + {
  262 + return Request.CreateResponse(HttpStatusCode.BadRequest, "Email Id already exist");
  263 + }
  264 + else if (Status.Equals("3"))
  265 + {
  266 + return Request.CreateResponse(HttpStatusCode.OK, "User added successfully");
  267 + }
  268 + else
  269 + {
  270 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "We have encountered a technical error and same has been notified to our technical team.");
  271 + }
  272 + }
  273 + catch (Exception ex)
  274 + {
  275 + // Log exception code goes here
  276 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, "We have encountered a technical error and same has been notified to our technical team.");
  277 + }
  278 + }
  279 + #endregion
  280 +
  281 + #region UnBlock Users
  282 + [Route("BlockedUser")]
  283 + [HttpGet]
  284 + public IHttpActionResult GetBlockedUserByAccNoAndType(int UserTypeId, int LicenseId)
  285 + {
  286 + dbContext.Configuration.ProxyCreationEnabled = false;
  287 + List<GetBlockedUserByAccNoAndType_Result> Users = dbContext.GetBlockedUserByAccNoAndType((byte)UserTypeId, LicenseId).ToList();
  288 + return Ok(Users);
  289 + }
  290 + [Route("UnblockedUser")]
  291 + [HttpPost]
  292 + public HttpResponseMessage UnblockedUser(List<int> UserIds)
  293 + {
  294 + bool Status = false;
  295 + try
  296 + {
  297 + Status = UserModel.UpdateUnblockedUser(dbContext, UserIds);
  298 + Status = true;
  299 + if (Status)
  300 + {
  301 + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
  302 + }
  303 + else
  304 + {
  305 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
  306 + }
  307 + }
  308 + catch (Exception ex)
  309 + {
  310 + // Log exception code goes here
  311 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  312 + }
  313 + }
  314 +
191 315 #endregion
192 316  
  317 +
193 318 protected HttpResponseMessage ToJson(dynamic obj)
194 319 {
195 320 var response = Request.CreateResponse(HttpStatusCode.OK);
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
... ... @@ -1794,7 +1794,7 @@ namespace AIAHTML5.ADMIN.API.Entity
1794 1794 return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<Nullable<System.DateTime>>("IncorrectLoginAttempt", iUserIdParameter);
1795 1795 }
1796 1796  
1797   - public virtual ObjectResult<string> InsertAIAUser(string sLoginId, string sPassword, string sFirstname, string sLastname, Nullable<byte> iUserTypeId, string sEmailId, Nullable<byte> iSecurityQuesId, string sSecurityAnswer, Nullable<int> iCreatorId, Nullable<int> iLicenseId, Nullable<byte> iEditionId)
  1797 + public virtual ObjectResult<string> InsertAIAUser(string sLoginId, string sPassword, string sFirstname, string sLastname, Nullable<byte> iUserTypeId, string sEmailId, Nullable<byte> iSecurityQuesId, string sSecurityAnswer, Nullable<int> iCreatorId, Nullable<int> iLicenseId, Nullable<byte> iEditionId, ObjectParameter status)
1798 1798 {
1799 1799 var sLoginIdParameter = sLoginId != null ?
1800 1800 new ObjectParameter("sLoginId", sLoginId) :
... ... @@ -1840,7 +1840,7 @@ namespace AIAHTML5.ADMIN.API.Entity
1840 1840 new ObjectParameter("iEditionId", iEditionId) :
1841 1841 new ObjectParameter("iEditionId", typeof(byte));
1842 1842  
1843   - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<string>("InsertAIAUser", sLoginIdParameter, sPasswordParameter, sFirstnameParameter, sLastnameParameter, iUserTypeIdParameter, sEmailIdParameter, iSecurityQuesIdParameter, sSecurityAnswerParameter, iCreatorIdParameter, iLicenseIdParameter, iEditionIdParameter);
  1843 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<string>("InsertAIAUser", sLoginIdParameter, sPasswordParameter, sFirstnameParameter, sLastnameParameter, iUserTypeIdParameter, sEmailIdParameter, iSecurityQuesIdParameter, sSecurityAnswerParameter, iCreatorIdParameter, iLicenseIdParameter, iEditionIdParameter, status);
1844 1844 }
1845 1845  
1846 1846 public virtual int InsertDemoLicenseAccount()
... ... @@ -3012,5 +3012,133 @@ namespace AIAHTML5.ADMIN.API.Entity
3012 3012  
3013 3013 return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateSubscriptionPlan", idParameter, titleParameter, priceParameter, durationParameter, editionIdParameter, isActiveParameter, status);
3014 3014 }
  3015 +
  3016 + public virtual int usp_InsertAIAUser(string sLoginId, string sPassword, string sFirstname, string sLastname, Nullable<byte> iUserTypeId, string sEmailId, Nullable<byte> iSecurityQuesId, string sSecurityAnswer, Nullable<int> iCreatorId, Nullable<int> iLicenseId, Nullable<byte> iEditionId, ObjectParameter status)
  3017 + {
  3018 + var sLoginIdParameter = sLoginId != null ?
  3019 + new ObjectParameter("sLoginId", sLoginId) :
  3020 + new ObjectParameter("sLoginId", typeof(string));
  3021 +
  3022 + var sPasswordParameter = sPassword != null ?
  3023 + new ObjectParameter("sPassword", sPassword) :
  3024 + new ObjectParameter("sPassword", typeof(string));
  3025 +
  3026 + var sFirstnameParameter = sFirstname != null ?
  3027 + new ObjectParameter("sFirstname", sFirstname) :
  3028 + new ObjectParameter("sFirstname", typeof(string));
  3029 +
  3030 + var sLastnameParameter = sLastname != null ?
  3031 + new ObjectParameter("sLastname", sLastname) :
  3032 + new ObjectParameter("sLastname", typeof(string));
  3033 +
  3034 + var iUserTypeIdParameter = iUserTypeId.HasValue ?
  3035 + new ObjectParameter("iUserTypeId", iUserTypeId) :
  3036 + new ObjectParameter("iUserTypeId", typeof(byte));
  3037 +
  3038 + var sEmailIdParameter = sEmailId != null ?
  3039 + new ObjectParameter("sEmailId", sEmailId) :
  3040 + new ObjectParameter("sEmailId", typeof(string));
  3041 +
  3042 + var iSecurityQuesIdParameter = iSecurityQuesId.HasValue ?
  3043 + new ObjectParameter("iSecurityQuesId", iSecurityQuesId) :
  3044 + new ObjectParameter("iSecurityQuesId", typeof(byte));
  3045 +
  3046 + var sSecurityAnswerParameter = sSecurityAnswer != null ?
  3047 + new ObjectParameter("sSecurityAnswer", sSecurityAnswer) :
  3048 + new ObjectParameter("sSecurityAnswer", typeof(string));
  3049 +
  3050 + var iCreatorIdParameter = iCreatorId.HasValue ?
  3051 + new ObjectParameter("iCreatorId", iCreatorId) :
  3052 + new ObjectParameter("iCreatorId", typeof(int));
  3053 +
  3054 + var iLicenseIdParameter = iLicenseId.HasValue ?
  3055 + new ObjectParameter("iLicenseId", iLicenseId) :
  3056 + new ObjectParameter("iLicenseId", typeof(int));
  3057 +
  3058 + var iEditionIdParameter = iEditionId.HasValue ?
  3059 + new ObjectParameter("iEditionId", iEditionId) :
  3060 + new ObjectParameter("iEditionId", typeof(byte));
  3061 +
  3062 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertAIAUser", sLoginIdParameter, sPasswordParameter, sFirstnameParameter, sLastnameParameter, iUserTypeIdParameter, sEmailIdParameter, iSecurityQuesIdParameter, sSecurityAnswerParameter, iCreatorIdParameter, iLicenseIdParameter, iEditionIdParameter, status);
  3063 + }
  3064 +
  3065 + public virtual int usp_UpdateblockedUser(Nullable<int> id, ObjectParameter status)
  3066 + {
  3067 + var idParameter = id.HasValue ?
  3068 + new ObjectParameter("Id", id) :
  3069 + new ObjectParameter("Id", typeof(int));
  3070 +
  3071 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateblockedUser", idParameter, status);
  3072 + }
  3073 +
  3074 + public virtual ObjectResult<usp_GetSearchUserList_Result> usp_GetSearchUserList(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable<int> iUserTypeId, Nullable<int> iAccountTypeId, Nullable<int> iLoginUserType)
  3075 + {
  3076 + var sFirstNameParameter = sFirstName != null ?
  3077 + new ObjectParameter("sFirstName", sFirstName) :
  3078 + new ObjectParameter("sFirstName", typeof(string));
  3079 +
  3080 + var sLastNameParameter = sLastName != null ?
  3081 + new ObjectParameter("sLastName", sLastName) :
  3082 + new ObjectParameter("sLastName", typeof(string));
  3083 +
  3084 + var sEmailIdParameter = sEmailId != null ?
  3085 + new ObjectParameter("sEmailId", sEmailId) :
  3086 + new ObjectParameter("sEmailId", typeof(string));
  3087 +
  3088 + var sAccoutNumberParameter = sAccoutNumber != null ?
  3089 + new ObjectParameter("sAccoutNumber", sAccoutNumber) :
  3090 + new ObjectParameter("sAccoutNumber", typeof(string));
  3091 +
  3092 + var iUserTypeIdParameter = iUserTypeId.HasValue ?
  3093 + new ObjectParameter("iUserTypeId", iUserTypeId) :
  3094 + new ObjectParameter("iUserTypeId", typeof(int));
  3095 +
  3096 + var iAccountTypeIdParameter = iAccountTypeId.HasValue ?
  3097 + new ObjectParameter("iAccountTypeId", iAccountTypeId) :
  3098 + new ObjectParameter("iAccountTypeId", typeof(int));
  3099 +
  3100 + var iLoginUserTypeParameter = iLoginUserType.HasValue ?
  3101 + new ObjectParameter("iLoginUserType", iLoginUserType) :
  3102 + new ObjectParameter("iLoginUserType", typeof(int));
  3103 +
  3104 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSearchUserList_Result>("usp_GetSearchUserList", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter);
  3105 + }
  3106 +
  3107 + public virtual int usp_UpdateAIAUser(string sLoginId, string sPassword, string sFirstname, string sLastname, string sEmailId, Nullable<int> id, Nullable<int> iCreatorId, Nullable<byte> isActive, ObjectParameter status)
  3108 + {
  3109 + var sLoginIdParameter = sLoginId != null ?
  3110 + new ObjectParameter("sLoginId", sLoginId) :
  3111 + new ObjectParameter("sLoginId", typeof(string));
  3112 +
  3113 + var sPasswordParameter = sPassword != null ?
  3114 + new ObjectParameter("sPassword", sPassword) :
  3115 + new ObjectParameter("sPassword", typeof(string));
  3116 +
  3117 + var sFirstnameParameter = sFirstname != null ?
  3118 + new ObjectParameter("sFirstname", sFirstname) :
  3119 + new ObjectParameter("sFirstname", typeof(string));
  3120 +
  3121 + var sLastnameParameter = sLastname != null ?
  3122 + new ObjectParameter("sLastname", sLastname) :
  3123 + new ObjectParameter("sLastname", typeof(string));
  3124 +
  3125 + var sEmailIdParameter = sEmailId != null ?
  3126 + new ObjectParameter("sEmailId", sEmailId) :
  3127 + new ObjectParameter("sEmailId", typeof(string));
  3128 +
  3129 + var idParameter = id.HasValue ?
  3130 + new ObjectParameter("id", id) :
  3131 + new ObjectParameter("id", typeof(int));
  3132 +
  3133 + var iCreatorIdParameter = iCreatorId.HasValue ?
  3134 + new ObjectParameter("iCreatorId", iCreatorId) :
  3135 + new ObjectParameter("iCreatorId", typeof(int));
  3136 +
  3137 + var isActiveParameter = isActive.HasValue ?
  3138 + new ObjectParameter("isActive", isActive) :
  3139 + new ObjectParameter("isActive", typeof(byte));
  3140 +
  3141 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateAIAUser", sLoginIdParameter, sPasswordParameter, sFirstnameParameter, sLastnameParameter, sEmailIdParameter, idParameter, iCreatorIdParameter, isActiveParameter, status);
  3142 + }
3015 3143 }
3016 3144 }
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
... ... @@ -2328,6 +2328,7 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2328 2328 <Parameter Name="iCreatorId" Type="int" Mode="In" />
2329 2329 <Parameter Name="iLicenseId" Type="int" Mode="In" />
2330 2330 <Parameter Name="iEditionId" Type="tinyint" Mode="In" />
  2331 + <Parameter Name="Status" Type="int" Mode="InOut" />
2331 2332 </Function>
2332 2333 <Function Name="InsertDemoLicenseAccount" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
2333 2334 <Function Name="InsertIncorrectLoginAttempt" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
... ... @@ -2626,12 +2627,35 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2626 2627 <Function Name="usp_GetProductEditionByLicense" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2627 2628 <Parameter Name="iLicenseId" Type="int" Mode="In" />
2628 2629 </Function>
  2630 + <Function Name="usp_GetSearchUserList" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2631 + <Parameter Name="sFirstName" Type="varchar" Mode="In" />
  2632 + <Parameter Name="sLastName" Type="varchar" Mode="In" />
  2633 + <Parameter Name="sEmailId" Type="varchar" Mode="In" />
  2634 + <Parameter Name="sAccoutNumber" Type="varchar" Mode="In" />
  2635 + <Parameter Name="iUserTypeId" Type="int" Mode="In" />
  2636 + <Parameter Name="iAccountTypeId" Type="int" Mode="In" />
  2637 + <Parameter Name="iLoginUserType" Type="int" Mode="In" />
  2638 + </Function>
2629 2639 <Function Name="usp_GetSubscriptionPlans" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2630 2640 <Parameter Name="iEditionId" Type="tinyint" Mode="In" />
2631 2641 </Function>
2632 2642 <Function Name="usp_GetUserType" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2633 2643 <Parameter Name="id" Type="int" Mode="In" />
2634 2644 </Function>
  2645 + <Function Name="usp_InsertAIAUser" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2646 + <Parameter Name="sLoginId" Type="varchar" Mode="In" />
  2647 + <Parameter Name="sPassword" Type="varchar" Mode="In" />
  2648 + <Parameter Name="sFirstname" Type="varchar" Mode="In" />
  2649 + <Parameter Name="sLastname" Type="varchar" Mode="In" />
  2650 + <Parameter Name="iUserTypeId" Type="tinyint" Mode="In" />
  2651 + <Parameter Name="sEmailId" Type="varchar" Mode="In" />
  2652 + <Parameter Name="iSecurityQuesId" Type="tinyint" Mode="In" />
  2653 + <Parameter Name="sSecurityAnswer" Type="varchar" Mode="In" />
  2654 + <Parameter Name="iCreatorId" Type="int" Mode="In" />
  2655 + <Parameter Name="iLicenseId" Type="int" Mode="In" />
  2656 + <Parameter Name="iEditionId" Type="tinyint" Mode="In" />
  2657 + <Parameter Name="Status" Type="int" Mode="InOut" />
  2658 + </Function>
2635 2659 <Function Name="usp_InsertSubscriptionPlan" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2636 2660 <Parameter Name="Id" Type="tinyint" Mode="In" />
2637 2661 <Parameter Name="Title" Type="varchar" Mode="In" />
... ... @@ -2641,6 +2665,21 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2641 2665 <Parameter Name="IsActive" Type="bit" Mode="In" />
2642 2666 <Parameter Name="Status" Type="bit" Mode="InOut" />
2643 2667 </Function>
  2668 + <Function Name="usp_UpdateAIAUser" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2669 + <Parameter Name="sLoginId" Type="varchar" Mode="In" />
  2670 + <Parameter Name="sPassword" Type="varchar" Mode="In" />
  2671 + <Parameter Name="sFirstname" Type="varchar" Mode="In" />
  2672 + <Parameter Name="sLastname" Type="varchar" Mode="In" />
  2673 + <Parameter Name="sEmailId" Type="varchar" Mode="In" />
  2674 + <Parameter Name="id" Type="int" Mode="In" />
  2675 + <Parameter Name="iCreatorId" Type="int" Mode="In" />
  2676 + <Parameter Name="isActive" Type="tinyint" Mode="In" />
  2677 + <Parameter Name="Status" Type="int" Mode="InOut" />
  2678 + </Function>
  2679 + <Function Name="usp_UpdateblockedUser" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2680 + <Parameter Name="Id" Type="int" Mode="In" />
  2681 + <Parameter Name="Status" Type="int" Mode="InOut" />
  2682 + </Function>
2644 2683 <Function Name="usp_UpdateSubscriptionPlan" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2645 2684 <Parameter Name="Id" Type="tinyint" Mode="In" />
2646 2685 <Parameter Name="Title" Type="varchar" Mode="In" />
... ... @@ -5793,6 +5832,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
5793 5832 <Parameter Name="iCreatorId" Mode="In" Type="Int32" />
5794 5833 <Parameter Name="iLicenseId" Mode="In" Type="Int32" />
5795 5834 <Parameter Name="iEditionId" Mode="In" Type="Byte" />
  5835 + <Parameter Name="Status" Mode="InOut" Type="Int32" />
5796 5836 </FunctionImport>
5797 5837 <FunctionImport Name="InsertDemoLicenseAccount" />
5798 5838 <FunctionImport Name="InsertIncorrectLoginAttempt">
... ... @@ -6101,7 +6141,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
6101 6141 <Parameter Name="Status" Mode="InOut" Type="Boolean" />
6102 6142 </FunctionImport>
6103 6143 <FunctionImport Name="usp_GetSubscriptionPlans" ReturnType="Collection(AIADatabaseV5Model.usp_GetSubscriptionPlans_Result)">
6104   - <Parameter Name="iEditionId" Mode="In" Type="Byte" />
  6144 + <Parameter Name="iEditionId" Mode="In" Type="Byte" />
6105 6145 </FunctionImport>
6106 6146 <FunctionImport Name="usp_InsertSubscriptionPlan">
6107 6147 <Parameter Name="Id" Mode="In" Type="Byte" />
... ... @@ -6121,6 +6161,44 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
6121 6161 <Parameter Name="IsActive" Mode="In" Type="Boolean" />
6122 6162 <Parameter Name="Status" Mode="InOut" Type="Boolean" />
6123 6163 </FunctionImport>
  6164 + <FunctionImport Name="usp_InsertAIAUser">
  6165 + <Parameter Name="sLoginId" Mode="In" Type="String" />
  6166 + <Parameter Name="sPassword" Mode="In" Type="String" />
  6167 + <Parameter Name="sFirstname" Mode="In" Type="String" />
  6168 + <Parameter Name="sLastname" Mode="In" Type="String" />
  6169 + <Parameter Name="iUserTypeId" Mode="In" Type="Byte" />
  6170 + <Parameter Name="sEmailId" Mode="In" Type="String" />
  6171 + <Parameter Name="iSecurityQuesId" Mode="In" Type="Byte" />
  6172 + <Parameter Name="sSecurityAnswer" Mode="In" Type="String" />
  6173 + <Parameter Name="iCreatorId" Mode="In" Type="Int32" />
  6174 + <Parameter Name="iLicenseId" Mode="In" Type="Int32" />
  6175 + <Parameter Name="iEditionId" Mode="In" Type="Byte" />
  6176 + <Parameter Name="Status" Mode="InOut" Type="Int32" />
  6177 + </FunctionImport>
  6178 + <FunctionImport Name="usp_UpdateblockedUser">
  6179 + <Parameter Name="Id" Mode="In" Type="Int32" />
  6180 + <Parameter Name="Status" Mode="InOut" Type="Int32" />
  6181 + </FunctionImport>
  6182 + <FunctionImport Name="usp_GetSearchUserList" ReturnType="Collection(AIADatabaseV5Model.usp_GetSearchUserList_Result)">
  6183 + <Parameter Name="sFirstName" Mode="In" Type="String" />
  6184 + <Parameter Name="sLastName" Mode="In" Type="String" />
  6185 + <Parameter Name="sEmailId" Mode="In" Type="String" />
  6186 + <Parameter Name="sAccoutNumber" Mode="In" Type="String" />
  6187 + <Parameter Name="iUserTypeId" Mode="In" Type="Int32" />
  6188 + <Parameter Name="iAccountTypeId" Mode="In" Type="Int32" />
  6189 + <Parameter Name="iLoginUserType" Mode="In" Type="Int32" />
  6190 + </FunctionImport>
  6191 + <FunctionImport Name="usp_UpdateAIAUser">
  6192 + <Parameter Name="sLoginId" Mode="In" Type="String" />
  6193 + <Parameter Name="sPassword" Mode="In" Type="String" />
  6194 + <Parameter Name="sFirstname" Mode="In" Type="String" />
  6195 + <Parameter Name="sLastname" Mode="In" Type="String" />
  6196 + <Parameter Name="sEmailId" Mode="In" Type="String" />
  6197 + <Parameter Name="id" Mode="In" Type="Int32" />
  6198 + <Parameter Name="iCreatorId" Mode="In" Type="Int32" />
  6199 + <Parameter Name="isActive" Mode="In" Type="Byte" />
  6200 + <Parameter Name="Status" Mode="InOut" Type="Int32" />
  6201 + </FunctionImport>
6124 6202 </EntityContainer>
6125 6203 <ComplexType Name="DA_GetBaseLayer_Result">
6126 6204 <Property Type="Int32" Name="Id" Nullable="false" />
... ... @@ -6946,6 +7024,26 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
6946 7024 <Property Type="Byte" Name="Duration" Nullable="false" />
6947 7025 <Property Type="Boolean" Name="IsActive" Nullable="false" />
6948 7026 </ComplexType>
  7027 + <ComplexType Name="usp_GetSearchUserList_Result">
  7028 + <Property Type="Int32" Name="Id" Nullable="true" />
  7029 + <Property Type="String" Name="FirstName" Nullable="true" MaxLength="100" />
  7030 + <Property Type="String" Name="LastName" Nullable="true" MaxLength="100" />
  7031 + <Property Type="String" Name="LoginId" Nullable="true" MaxLength="50" />
  7032 + <Property Type="String" Name="EmailId" Nullable="true" MaxLength="50" />
  7033 + <Property Type="String" Name="UserTypeTitle" Nullable="true" MaxLength="50" />
  7034 + <Property Type="String" Name="Password" Nullable="true" MaxLength="50" />
  7035 + <Property Type="DateTime" Name="CreationDate" Nullable="true" Precision="23" />
  7036 + <Property Type="DateTime" Name="ModifiedDate" Nullable="true" Precision="23" />
  7037 + <Property Type="String" Name="AccountNumber" Nullable="true" MaxLength="50" />
  7038 + <Property Type="String" Name="AccountTypeTitle" Nullable="true" MaxLength="50" />
  7039 + <Property Type="String" Name="EditionType" Nullable="true" MaxLength="50" />
  7040 + <Property Type="String" Name="UserStatus" Nullable="true" MaxLength="8" />
  7041 + <Property Type="Int32" Name="UserTypeId" Nullable="true" />
  7042 + <Property Type="Int32" Name="EditionTypeId" Nullable="true" />
  7043 + <Property Type="String" Name="Createdby" Nullable="true" MaxLength="50" />
  7044 + <Property Type="String" Name="Modifiedby" Nullable="true" MaxLength="50" />
  7045 + <Property Type="DateTime" Name="DeactivationDate" Nullable="true" Precision="23" />
  7046 + </ComplexType>
6949 7047 </Schema>
6950 7048 </edmx:ConceptualModels>
6951 7049 <!-- C-S mapping content -->
... ... @@ -9285,6 +9383,33 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
9285 9383 </FunctionImportMapping>
9286 9384 <FunctionImportMapping FunctionImportName="usp_InsertSubscriptionPlan" FunctionName="AIADatabaseV5Model.Store.usp_InsertSubscriptionPlan" />
9287 9385 <FunctionImportMapping FunctionImportName="usp_UpdateSubscriptionPlan" FunctionName="AIADatabaseV5Model.Store.usp_UpdateSubscriptionPlan" />
  9386 + <FunctionImportMapping FunctionImportName="usp_InsertAIAUser" FunctionName="AIADatabaseV5Model.Store.usp_InsertAIAUser" />
  9387 + <FunctionImportMapping FunctionImportName="usp_UpdateblockedUser" FunctionName="AIADatabaseV5Model.Store.usp_UpdateblockedUser" />
  9388 + <FunctionImportMapping FunctionImportName="usp_GetSearchUserList" FunctionName="AIADatabaseV5Model.Store.usp_GetSearchUserList">
  9389 + <ResultMapping>
  9390 + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSearchUserList_Result">
  9391 + <ScalarProperty Name="Id" ColumnName="Id" />
  9392 + <ScalarProperty Name="FirstName" ColumnName="FirstName" />
  9393 + <ScalarProperty Name="LastName" ColumnName="LastName" />
  9394 + <ScalarProperty Name="LoginId" ColumnName="LoginId" />
  9395 + <ScalarProperty Name="EmailId" ColumnName="EmailId" />
  9396 + <ScalarProperty Name="UserTypeTitle" ColumnName="UserTypeTitle" />
  9397 + <ScalarProperty Name="Password" ColumnName="Password" />
  9398 + <ScalarProperty Name="CreationDate" ColumnName="CreationDate" />
  9399 + <ScalarProperty Name="ModifiedDate" ColumnName="ModifiedDate" />
  9400 + <ScalarProperty Name="AccountNumber" ColumnName="AccountNumber" />
  9401 + <ScalarProperty Name="AccountTypeTitle" ColumnName="AccountTypeTitle" />
  9402 + <ScalarProperty Name="EditionType" ColumnName="EditionType" />
  9403 + <ScalarProperty Name="UserStatus" ColumnName="UserStatus" />
  9404 + <ScalarProperty Name="UserTypeId" ColumnName="UserTypeId" />
  9405 + <ScalarProperty Name="EditionTypeId" ColumnName="EditionTypeId" />
  9406 + <ScalarProperty Name="Createdby" ColumnName="Createdby" />
  9407 + <ScalarProperty Name="Modifiedby" ColumnName="Modifiedby" />
  9408 + <ScalarProperty Name="DeactivationDate" ColumnName="DeactivationDate" />
  9409 + </ComplexTypeMapping>
  9410 + </ResultMapping>
  9411 + </FunctionImportMapping>
  9412 + <FunctionImportMapping FunctionImportName="usp_UpdateAIAUser" FunctionName="AIADatabaseV5Model.Store.usp_UpdateAIAUser" />
9288 9413 </EntityContainerMapping>
9289 9414 </Mapping>
9290 9415 </edmx:Mappings>
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSearchUserList_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_GetSearchUserList_Result
  15 + {
  16 + public Nullable<int> Id { get; set; }
  17 + public string FirstName { get; set; }
  18 + public string LastName { get; set; }
  19 + public string LoginId { get; set; }
  20 + public string EmailId { get; set; }
  21 + public string UserTypeTitle { get; set; }
  22 + public string Password { get; set; }
  23 + public Nullable<System.DateTime> CreationDate { get; set; }
  24 + public Nullable<System.DateTime> ModifiedDate { get; set; }
  25 + public string AccountNumber { get; set; }
  26 + public string AccountTypeTitle { get; set; }
  27 + public string EditionType { get; set; }
  28 + public string UserStatus { get; set; }
  29 + public Nullable<int> UserTypeId { get; set; }
  30 + public Nullable<int> EditionTypeId { get; set; }
  31 + public string Createdby { get; set; }
  32 + public string Modifiedby { get; set; }
  33 + public Nullable<System.DateTime> DeactivationDate { get; set; }
  34 + }
  35 +}
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
... ... @@ -24,6 +24,10 @@ namespace AIAHTML5.ADMIN.API.Models
24 24 public DateTime ModifiedDate { get; set; }
25 25 public int UserTypeId { get; set; }
26 26 public bool IsActive { get; set; }
  27 + public int LicenseId { get; set; }
  28 + public int EditionId { get; set; }
  29 + public short iUserTypeId { get; set; }
  30 +
27 31  
28 32 public static bool UpdateUserProfile(AIADatabaseV5Entities dbContext, int intUserID, string strFirstName, string strLastName, string strEmailID)
29 33 {
... ... @@ -84,5 +88,53 @@ namespace AIAHTML5.ADMIN.API.Models
84 88 return ex.Message;
85 89 }
86 90 }
  91 + public static string InsertUser(AIADatabaseV5Entities dbContext,UserModel UserEntity)
  92 + {
  93 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  94 + short questionId = 0;
  95 + short EditionId=(short) UserEntity.EditionId;
  96 + try
  97 + {
  98 + dbContext.usp_InsertAIAUser(UserEntity.LoginId, UserEntity.Password, UserEntity.FirstName, UserEntity.LastName, (byte)UserEntity.iUserTypeId, UserEntity.EmailId, (byte)questionId, null, UserEntity.Id, UserEntity.LicenseId, (byte)EditionId, spStatus);
  99 + return spStatus.Value.ToString();
  100 + }
  101 + catch(Exception ex)
  102 + {
  103 + return ex.Message;
  104 + }
  105 + }
  106 + public static string UpdateUser(AIADatabaseV5Entities dbContext, UserModel UserEntity)
  107 + {
  108 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  109 + short questionId = 0;
  110 + short EditionId = (short)UserEntity.EditionId;
  111 + try
  112 + {
  113 + dbContext.usp_UpdateAIAUser(UserEntity.LoginId, UserEntity.Password, UserEntity.FirstName, UserEntity.LastName,UserEntity.EmailId,UserEntity.Id,UserEntity.CreatorId,(UserEntity.IsActive ? (byte)1 :(byte)0),spStatus);
  114 + return spStatus.Value.ToString();
  115 + }
  116 + catch (Exception ex)
  117 + {
  118 + return ex.Message;
  119 + }
  120 + }
  121 +
  122 + public static bool UpdateUnblockedUser(AIADatabaseV5Entities dbContext, List<int> ids)
  123 + {
  124 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  125 + try
  126 + {
  127 + foreach (var item in ids)
  128 + {
  129 + dbContext.usp_UpdateblockedUser(item, spStatus);
  130 + if (spStatus.Value.ToString()!="1") break;
  131 + }
  132 + return (spStatus.Value.ToString()=="1"?true:false);
  133 + }
  134 + catch (Exception ex)
  135 + {
  136 + return false;
  137 + }
  138 + }
87 139 }
88 140 }
89 141 \ No newline at end of file
... ...
400-SOURCECODE/Admin/src/app/app.component.html
... ... @@ -60,7 +60,7 @@
60 60 <ul class="dropdown-menu">
61 61 <li><a [routerLink]="['users']">List User</a></li>
62 62 <li><a [routerLink]="['adduser']">Add User</a></li>
63   - <li><a href="admin-Unblock-user.html">Unblock User</a></li>
  63 + <li><a [routerLink]="['unblockuser']">Unblock User</a></li>
64 64 <li><a href="admin-user-group.html">User Group</a></li>
65 65 </ul>
66 66 </li>
... ...
400-SOURCECODE/Admin/src/app/app.module.ts
... ... @@ -15,6 +15,7 @@ import { ChangeUserPassword } from &#39;./components/UserEntity/changeuserpassword.c
15 15 import { ChangeUserID } from './components/UserEntity/changeuserid.component';
16 16 import { UsersList } from './components/UserEntity/users.component';
17 17 import { AddUser } from './components/UserEntity/adduser.component';
  18 +import { UnblockUser } from './components/UserEntity/unblockuser.component';
18 19 import { ManageDiscountCode } from './components/ManageDiscountCode/managediscountcode.component';
19 20 import { SubscriptionPrice } from './components/SubscriptionPrice/subscriptionprice.component';
20 21 import { AppComponent } from './app.component';
... ... @@ -28,11 +29,12 @@ import { ConfirmComponent } from &quot;./Shared/Confirm/confirm.component&quot;
28 29 import { BsDatepickerModule, ModalModule } from 'ngx-bootstrap';
29 30 import { BsModalService } from 'ngx-bootstrap/modal';
30 31 import { ContenteditableModelDirective } from './shared/contenteditabledirective';
  32 +import { LoadingService } from './shared/loading.service';
31 33 @NgModule({
32 34 declarations: [
33 35 ChangeUserPassword, ChangeUserID,
34 36 UpdateUserProfile, UsersList,
35   - ManageDiscountCode, AddUser,
  37 + ManageDiscountCode, AddUser, UnblockUser,
36 38 AppComponent, ConfirmComponent,
37 39 SubscriptionPrice, ManageDiscountCode, ContenteditableModelDirective
38 40 ],
... ... @@ -40,7 +42,7 @@ import { ContenteditableModelDirective } from &#39;./shared/contenteditabledirective
40 42 BrowserModule, AppRoutingModule, HttpClientModule, FormsModule, ReactiveFormsModule, HttpModule, Ng2Bs3ModalModule,
41 43 BsDatepickerModule.forRoot(), ModalModule.forRoot()//ModalModule.forRoot()
42 44 ],
43   - providers: [GlobalService, ConfirmService, BsModalService,
  45 + providers: [GlobalService, ConfirmService, BsModalService, LoadingService,
44 46 //AuthService,
45 47 //AuthGuard,
46 48 //{
... ... @@ -48,8 +50,8 @@ import { ContenteditableModelDirective } from &#39;./shared/contenteditabledirective
48 50 // useClass: MyInterceptor,
49 51 // multi: true
50 52 //}
51   - //{ provide: APP_BASE_HREF, useValue: '/Admin-UI' }
52   - { provide: APP_BASE_HREF, useValue: '/' }
  53 + { provide: APP_BASE_HREF, useValue: '/Admin-UI' }
  54 + //{ provide: APP_BASE_HREF, useValue: '/' }
53 55  
54 56 ],
55 57 bootstrap: [AppComponent]
... ...
400-SOURCECODE/Admin/src/app/app.routing.module.ts
... ... @@ -4,6 +4,7 @@ import { UpdateUserProfile } from &#39;./components/UserEntity/updateuserprofile.com
4 4 import { ChangeUserPassword } from './components/UserEntity/changeuserpassword.component';
5 5 import { ChangeUserID } from './components/UserEntity/changeuserid.component';
6 6 import { UsersList } from './components/UserEntity/users.component';
  7 +import { UnblockUser } from './components/UserEntity/unblockuser.component';
7 8 import { ManageDiscountCode } from './components/ManageDiscountCode/managediscountcode.component';
8 9 import { SubscriptionPrice } from './components/SubscriptionPrice/subscriptionprice.component';
9 10 import { AddUser } from './components/UserEntity/adduser.component';
... ... @@ -16,6 +17,7 @@ const appRoutes: Routes = [
16 17 { path: 'managediscountcode', component: ManageDiscountCode },
17 18 { path: 'subscriptionprice', component: SubscriptionPrice },
18 19 { path: 'adduser', component: AddUser },
  20 + { path: 'unblockuser', component: UnblockUser },
19 21 ];
20 22  
21 23 @NgModule({
... ...
400-SOURCECODE/Admin/src/app/components/ManageDiscountCode/managediscountcode.service.ts
... ... @@ -20,7 +20,7 @@ export class ManageDiscountCodeService {
20 20 if(obj.endDate == ''){
21 21 obj.endDate = '1/1/9999';
22 22 }
23   - return this.http.get(this.commonService.DiscountBaseUrl + "/GetDiscountCodes?discountCode="
  23 + return this.http.get(this.commonService.resourceBaseUrl + "DiscountCode/GetDiscountCodes?discountCode="
24 24 + obj.discountCode + "&startDate=" + obj.startDate + "&endDate=" + obj.endDate)
25 25 .map(this.extractData)
26 26 .catch((res: Response) => this.handleError(res));
... ... @@ -33,7 +33,7 @@ export class ManageDiscountCodeService {
33 33 var headers = new Headers({
34 34 'Content-Type': 'application/json'
35 35 });
36   - return this.http.post(this.commonService.DiscountBaseUrl + "/InsertDiscountCode",
  36 + return this.http.post(this.commonService.resourceBaseUrl + "DiscountCode/InsertDiscountCode",
37 37 JSON.stringify(jsonData), {headers: headers})
38 38 .map(this.extractData)
39 39 .catch((res: Response) => this.handleError(res));
... ... @@ -46,7 +46,7 @@ export class ManageDiscountCodeService {
46 46 var headers = new Headers({
47 47 'Content-Type': 'application/json'
48 48 });
49   - return this.http.post(this.commonService.DiscountBaseUrl + "/UpdateDiscountCode",
  49 + return this.http.post(this.commonService.resourceBaseUrl + "DiscountCode/UpdateDiscountCode",
50 50 JSON.stringify(jsonData), {headers: headers})
51 51 .map(this.extractData)
52 52 .catch((res: Response) => this.handleError(res));
... ...
400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.service.ts
... ... @@ -15,7 +15,7 @@ export class SubscriptionPriceService {
15 15  
16 16  
17 17 GetSubscriptionPrices(obj: any) {
18   - return this.http.get(this.commonService.SubscriptionBaseUrl + "/GetSubscriptionPrices?editionId="
  18 + return this.http.get(this.commonService.resourceBaseUrl + "SubscriptionPrice/GetSubscriptionPrices?editionId="
19 19 + obj.editionId)
20 20 .map(this.extractData)
21 21 .catch((res: Response) => this.handleError(res));
... ... @@ -28,7 +28,7 @@ export class SubscriptionPriceService {
28 28 var headers = new Headers({
29 29 'Content-Type': 'application/json'
30 30 });
31   - return this.http.post(this.commonService.SubscriptionBaseUrl + "/InsertSubscriptionPrice",
  31 + return this.http.post(this.commonService.resourceBaseUrl + "SubscriptionPrice/InsertSubscriptionPrice",
32 32 JSON.stringify(jsonData), {headers: headers})
33 33 .map(this.extractData)
34 34 .catch((res: Response) => this.handleError(res));
... ... @@ -41,7 +41,7 @@ export class SubscriptionPriceService {
41 41 var headers = new Headers({
42 42 'Content-Type': 'application/json'
43 43 });
44   - return this.http.post(this.commonService.SubscriptionBaseUrl + "/UpdateSubscriptionPrices",
  44 + return this.http.post(this.commonService.resourceBaseUrl + "SubscriptionPrice/UpdateSubscriptionPrices",
45 45 JSON.stringify(jsonData), {headers: headers})
46 46 .map(this.extractData)
47 47 .catch((res: Response) => this.handleError(res));
... ... @@ -54,7 +54,7 @@ export class SubscriptionPriceService {
54 54 var headers = new Headers({
55 55 'Content-Type': 'application/json'
56 56 });
57   - return this.http.post(this.commonService.SubscriptionBaseUrl + "/DeleteSubscriptionPrices",
  57 + return this.http.post(this.commonService.resourceBaseUrl + "SubscriptionPrice/DeleteSubscriptionPrices",
58 58 subscriptionPriceIds, {headers: headers})
59 59 .map(this.extractData)
60 60 .catch((res: Response) => this.handleError(res));
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.html
... ... @@ -11,17 +11,19 @@
11 11 <div class="col-sm-12">
12 12 <div class="panel-body">
13 13 <!-- form -->
14   - <form class="form-horizontal" novalidate [formGroup]="adduserFrm">
  14 + <form class="form-horizontal" [formGroup]="adduserFrm">
15 15 <div class="form-group" *ngIf="alerts !== ''">
16 16 <div class="col-xs-12">
17 17 <div class="alert alert-danger" [innerHTML]="alerts">
18 18 </div>
  19 +
19 20 </div>
20 21 </div>
21 22 <div class="form-group">
22 23 <label for="inputEmail3" class="col-sm-4 control-label">User Name <span class="red">*</span> :</label>
23 24 <div class="col-sm-7">
24   - <input type="text" class="form-control input-sm" id="name" placeholder="UserName" formControlName="UserName">
  25 + <input type="text" class="form-control input-sm" id="name" placeholder="User Name" formControlName="UserName">
  26 + <div *ngIf="!adduserFrm.controls.UserName.valid && adduserFrm.controls.UserName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">User Name is required</div>
25 27 </div>
26 28 </div>
27 29 <div class="form-group">
... ... @@ -29,37 +31,47 @@
29 31 <div class="col-sm-7">
30 32 <input type="password" class="form-control input-sm" id="password" placeholder="" formControlName="Password">
31 33 <span class="help-block">(Minimum 8 characters)</span>
  34 + <div *ngIf="!adduserFrm.controls.Password.valid && adduserFrm.controls.Password.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Password of minimum 8 characters is required</div>
32 35 </div>
33 36 </div>
34 37 <div class="form-group">
35 38 <label for="inputPassword3" class="col-sm-4 control-label">Confirm Password <span class="red">*</span> :</label>
36 39 <div class="col-sm-7">
37   - <input type="password" class="form-control input-sm" id="password" placeholder="" formControlName="ConfirmPassword">
  40 + <input type="password" class="form-control input-sm" id="cpassword" placeholder="" formControlName="ConfirmPassword">
  41 + <div *ngIf="!adduserFrm.controls.ConfirmPassword.valid && adduserFrm.controls.ConfirmPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Confirm Password is required</div>
38 42 </div>
39 43 </div>
40 44 <div class="form-group">
41 45 <label for="inputPassword3" class="col-sm-4 control-label">Email Id <span class="red">*</span> :</label>
42 46 <div class="col-sm-7">
43   - <input type="password" class="form-control" id="inputPassword3" placeholder="Email Id" formControlName="EmailId">
  47 + <input type="text" class="form-control" id="inputPassword3" placeholder="Email Id" formControlName="EmailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$">
  48 + <div *ngIf="adduserFrm.controls.EmailId.invalid && !adduserFrm.controls.EmailId.value && adduserFrm.controls.EmailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email Id is required</div>
  49 +
  50 + <div *ngIf="adduserFrm.controls.EmailId.invalid && adduserFrm.controls.EmailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">
  51 + Please enter the correct email.
  52 + </div>
44 53 </div>
45 54 </div>
46 55 <div class="form-group">
47 56 <label for="inputEmail3" class="col-sm-4 control-label">First Name <span class="red">*</span> :</label>
48 57 <div class="col-sm-7">
49   - <input class="form-control input-sm" id="FirstName" placeholder="FirstName" type="text" formControlName="FirstName">
  58 + <input class="form-control input-sm" id="FirstName" placeholder="First Name" type="text" formControlName="FirstName">
  59 + <div *ngIf="!adduserFrm.controls.FirstName.valid && adduserFrm.controls.FirstName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">First Name is required</div>
50 60 </div>
51 61 </div>
52 62 <div class="form-group">
53 63 <label for="inputEmail3" class="col-sm-4 control-label">Last Name <span class="red">*</span> :</label>
54 64 <div class="col-sm-7">
55   - <input class="form-control input-sm" id="LastName" placeholder="" type="text" formControlName="LastName">
  65 + <input class="form-control input-sm" id="LastName" placeholder="Last Name" type="text" formControlName="LastName">
  66 + <div *ngIf="!adduserFrm.controls.LastName.valid && adduserFrm.controls.LastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Last Name is required</div>
56 67 </div>
57 68 </div>
58 69 <div class="form-group">
59 70 <label for="inputEmail3" class="col-sm-4 control-label">Account Number <span class="red">*</span> :</label>
60 71 <div class="col-sm-7">
61   - <select class="form-control input-sm" id="AccountNumber" [formControl]="adduserFrm.controls['AccountNumberId']">
62   - <option value="0" selected>All</option>
  72 + <select class="form-control input-sm" id="AccountNumber" (change)="BindUserTypeAndProductEdition($event)" [formControl]="adduserFrm.controls['AccountNumberId']">
  73 + <option value="0">Select</option>
  74 + <!--<option value="noption" disabled>Selected option</option>-->
63 75 <option *ngFor="let AccountNumberEntity of AccountNumberList" value="{{AccountNumberEntity.Id}}">{{ AccountNumberEntity.AccountNumber }}</option>
64 76 </select>
65 77 </div>
... ... @@ -67,23 +79,24 @@
67 79 <div class="form-group">
68 80 <label for="inputEmail3" class="col-sm-4 control-label">User Type <span class="red">*</span> :</label>
69 81 <div class="col-sm-7">
70   - <select class="form-control input-sm" id="UserType">
  82 + <select class="form-control input-sm" id="UserType" [formControl]="adduserFrm.controls['UserTypeId']">
  83 + <option value="0">Select</option>
71 84 <option *ngFor="let UserTypeEntity of UserTypeList" value="{{UserTypeEntity.Id}}">{{ UserTypeEntity.Title }}</option>
72 85 </select>
73 86 </div>
74 87 </div>
75 88 <div class="form-group">
76 89 <label for="inputEmail3" class="col-sm-4 control-label">Product Edition <span class="red">*</span> :</label>
77   - <div class="col-sm-7">
78   - <select class="form-control input-sm" id="ProductEdition">
79   - <option>Higher Education Instructor </option>
80   - <option>Higher Education Student</option>
  90 + <div class="col-sm-7">
  91 + <select class="form-control input-sm" id="ProductEdition" [formControl]="adduserFrm.controls['ProductEditionId']">
  92 + <option value="0">Select</option>
  93 + <option *ngFor="let ProductEditionEntity of ProductEditionList" value="{{ProductEditionEntity.Id}}">{{ ProductEditionEntity.Title }}</option>
81 94 </select>
82 95 </div>
83 96 </div>
84 97 <div class="row">
85 98 <div class="col-sm-12 marginTop20 text-center">
86   - <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal"><i class="fa fa-plus-circle"></i> Add</button>
  99 + <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" (click)="AddUser(this)"><i class="fa fa-plus-circle"></i> Add</button>
87 100 <!--modal-->
88 101 <div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal">
89 102 <div class="modal-dialog modal-sm" role="document">
... ... @@ -105,8 +118,8 @@
105 118 </div><!-- /.modal-dialog -->
106 119 </div>
107 120  
108   - <button class="btn btn-primary btn-sm"><i class="fa fa-refresh"></i> Reset</button>
109   - <button class="btn btn-primary btn-sm"><i class="fa fa-close"></i> Cancel</button>
  121 + <button class="btn btn-primary btn-sm" (click)="ResetForm()"><i class="fa fa-refresh"></i> Reset</button>
  122 + <button class="btn btn-primary btn-sm" (click)="redirect()"><i class="fa fa-close"></i> Cancel</button>
110 123 </div>
111 124  
112 125 </div>
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.ts
... ... @@ -12,7 +12,7 @@ import { ConfirmService } from &#39;../../Shared/Confirm/confirm.service&#39;;
12 12 import 'rxjs/Rx';
13 13 import 'rxjs/add/operator/map';
14 14 import 'rxjs/add/operator/filter';
15   -
  15 +import { LoadingService } from '../../shared/loading.service';
16 16  
17 17 @Component({
18 18 templateUrl:'./adduser.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html'
... ... @@ -34,18 +34,19 @@ export class AddUser implements OnInit {
34 34 //@ViewChild("profileModal")
35 35 //profileModal: ModalComponent;
36 36 //errorMessage: any;
37   - constructor(private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
  37 + constructor(private _loadingService: LoadingService,private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
38 38 private _confirmService: ConfirmService, private commonService: GlobalService
39 39 ) { }
40 40  
41 41 ngOnInit(): void {
  42 +
42 43 this.user = new User();
43 44 this.alerts = '';
44 45 //this.userservice.GetUserById(this.UserId);
45 46 this.adduserFrm = this.fb.group({
46 47 id: [''],
47 48 UserName: ['', Validators.required],
48   - Password: ['', Validators.required],
  49 + Password: ['', [Validators.required, Validators.minLength(8)]],
49 50 ConfirmPassword: ['', Validators.required],
50 51 FirstName: ['', Validators.required],
51 52 LastName: ['', Validators.required],
... ... @@ -54,8 +55,15 @@ export class AddUser implements OnInit {
54 55 UserTypeId: ['', Validators.required],
55 56 ProductEditionId: ['', Validators.required]
56 57 });
57   - //this.GetAccountNumber();
  58 + debugger
  59 + this._loadingService.ShowLoading("global-loading");
  60 + this.bindUsers();
  61 + this.GetAccountNumber();
58 62 this.GetUserTypeByLicenseId();
  63 + this._loadingService.HideLoading("global-loading");
  64 + }
  65 + redirect() {
  66 + this.router.navigate(['/']);
59 67 }
60 68 GetUserTypeByLicenseId() {
61 69 debugger;
... ... @@ -66,7 +74,7 @@ export class AddUser implements OnInit {
66 74 }).subscribe(x => { this.UserTypeList = x; }, error => this.error = <any>error);
67 75 }
68 76 GetAccountNumber() {
69   -
  77 +
70 78 this.userservice.GetAccountNumber()
71 79 .subscribe(x => { console.log(x); this.AccountNumberList=x }, error => this.error = <any>error);
72 80 }
... ... @@ -75,46 +83,98 @@ export class AddUser implements OnInit {
75 83 AccountNumberId: this.adduserFrm.controls['AccountNumberId'].value})
76 84 .subscribe(x => { console.log(x); this.ProductEditionList=x }, error => this.error = <any>error);
77 85 }
78   - UpdateUserProfile(this) {
79   - // debugger;
80   - this.user = this.adduserFrm.value;
81   - //if(this.user.)
82   - //console.log(this.user);
83   - var obj = this.user
84   - if (this.adduserFrm.valid) {
85   - return this.userservice.UpdateUserProfileById(obj)
  86 + BindUserTypeAndProductEdition(deviceValue) {
  87 +
  88 + this.GetUserTypeByLicenseId();
  89 + this.GetProductEdition();
  90 + }
  91 + public AddUser(this) {
  92 + this.alerts = '';
  93 + if (this.adduserFrm.value.UserName == '') {
  94 + this.alerts += '<span>User Name is required.</span>';
  95 + }
  96 + if (this.adduserFrm.value.Password == '') {
  97 + this.alerts += '</br><span>Password of minimum 8 characters is required.</span>';
  98 + }
  99 + if (this.adduserFrm.value.ConfirmPassword == '') {
  100 + this.alerts += '</br><span>Confirm Password is required.</span>';
  101 + }
  102 + if (this.adduserFrm.value.EmailId == '') {
  103 + this.alerts += '</br><span>Email Id is required.</span>';
  104 + }
  105 + if (this.adduserFrm.value.FirstName == '') {
  106 + this.alerts += '</br><span>First Name is required.</span>';
  107 + }
  108 + if (this.adduserFrm.value.LastName == '') {
  109 + this.alerts += '</br><span>Last Name is required.</span>';
  110 + }
  111 + if (this.adduserFrm.value.newPassword != this.adduserFrm.value.confirmPassword) {
  112 + this.alerts += '</br><span>Password and confirm password must be same</span>';
  113 + }
  114 + if (this.adduserFrm.value.AccountNumberId == '0') {
  115 + this.alerts += '</br><span>Please select account number</span>';
  116 + }
  117 + if (this.adduserFrm.value.UserTypeId == '0') {
  118 + this.alerts += '</br><span>Please select user type</span>';
  119 + }
  120 + if (this.adduserFrm.value.ProductEditionId == '0') {
  121 + this.alerts += '</br><span>Please select product edition</span>';
  122 + }
  123 + if (this.adduserFrm.valid && this.alerts == '') {
  124 + var AddUserEntity = this.adduserFrm.value;
  125 + return this.userservice.InsertUser(AddUserEntity)
86 126 .subscribe(
87 127 n => (this.AfterInsertData(n)),
88   - error => this.error = <any>error);
  128 + error => {
  129 + this.error = <any>error;
  130 + this.alerts = "<span>" + this.error + "</span>";
  131 + });
89 132 }
  133 +
90 134 }
91 135 AfterInsertData(data) {
92 136 //debugger;
93   - if (data.Status == "False") {
94   - return false;
95   - } else {
96   - this.status = true;
97   - this._confirmService.activate("User Profile Updated Successfully.", "alertMsg");
98   - }
  137 + if (data == "User added successfully") {
  138 + this.alerts = '';
  139 + this._confirmService.activate("User added successfully.", "alertMsg");
  140 + }
99 141  
100 142 }
101   - bindUsers(data) {
  143 + ResetForm() {
  144 + this._buildForm();
  145 + }
  146 + _buildForm() {
  147 + this.adduserFrm = this.fb.group({
  148 + id: [''],
  149 + UserName: [""],
  150 + Password: [""],
  151 + ConfirmPassword: [""],
  152 + FirstName: [""],
  153 + LastName: [""],
  154 + EmailId: [""],
  155 + AccountNumberId: ["0"],
  156 + UserTypeId: ["0"],
  157 + ProductEditionId: ["0"]
  158 +
  159 + });
  160 + }
  161 + bindUsers() {
102 162  
103 163 //console.log(data);
104 164 //alert(JSON.stringify(data));
105 165 //this.user = data[0];
106 166  
107 167  
108   - this.adduserFrm.controls['id'].setValue(this.user.Id)
109   - this.adduserFrm.controls['FirstName'].setValue(this.user.FirstName)
110   - this.adduserFrm.controls['LastName'].setValue(this.user.LastName)
111   - this.adduserFrm.controls['EmailId'].setValue(this.user.EmailId)
112   - this.adduserFrm.controls['UserName'].setValue(this.user.LoginId)
113   - this.adduserFrm.controls['Password'].setValue(this.user.Password)
114   - this.adduserFrm.controls['ConfirmPassword'].setValue(this.user.ConfirmPassword)
115   - this.adduserFrm.controls['AccountNumberId'].setValue(this.user.AccountNumberId)
116   - this.adduserFrm.controls['UserTypeId'].setValue(this.user.UserTypeId)
117   - this.adduserFrm.controls['ProductEditionId'].setValue(this.user.ProductEditionId)
  168 + this.adduserFrm.controls['id'].setValue(0)
  169 + this.adduserFrm.controls['FirstName'].setValue('')
  170 + this.adduserFrm.controls['LastName'].setValue('')
  171 + this.adduserFrm.controls['EmailId'].setValue('')
  172 + this.adduserFrm.controls['UserName'].setValue('')
  173 + this.adduserFrm.controls['Password'].setValue('')
  174 + this.adduserFrm.controls['ConfirmPassword'].setValue('')
  175 + this.adduserFrm.controls['AccountNumberId'].setValue(0)
  176 + this.adduserFrm.controls['UserTypeId'].setValue(0)
  177 + this.adduserFrm.controls['ProductEditionId'].setValue(0)
118 178  
119 179 }
120 180 }
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/changeuserid.component.ts
... ... @@ -12,7 +12,7 @@ import { ConfirmService } from &#39;../../Shared/Confirm/confirm.service&#39;;
12 12 import 'rxjs/Rx';
13 13 import 'rxjs/add/operator/map';
14 14 import 'rxjs/add/operator/filter';
15   -
  15 +import { LoadingService } from '../../shared/loading.service';
16 16  
17 17 @Component({
18 18 templateUrl:'./changeuserid.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html'
... ... @@ -32,7 +32,7 @@ export class ChangeUserID implements OnInit {
32 32 //@ViewChild("profileModal")
33 33 //profileModal: ModalComponent;
34 34 //errorMessage: any;
35   - constructor(private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
  35 + constructor(private _loadingService: LoadingService,private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
36 36 private _confirmService: ConfirmService
37 37 ) { }
38 38  
... ... @@ -50,7 +50,9 @@ export class ChangeUserID implements OnInit {
50 50 // Email: ['']
51 51  
52 52 });
  53 + this._loadingService.ShowLoading("global-loading");
53 54 this.GetUserById();
  55 + this._loadingService.HideLoading("global-loading");
54 56 }
55 57 redirect() {
56 58 this.router.navigate(['/']);
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/changeuserpassword.component.html
... ... @@ -11,7 +11,7 @@
11 11 <div class="well">
12 12 <div class="row">
13 13 <div class="col-sm-12">
14   - <h5 class="text-center text-success"><strong>**To change your profile fill all the text fields carefully.</strong></h5>
  14 + <h5 class="text-center text-success"><strong>**To change your password fill all the text fields carefully.</strong></h5>
15 15 <div class="panel-body">
16 16 <!-- form -->
17 17 <form class="form-horizontal" [formGroup]="changeUserPasswordFrm" (submit)="onFormSubmit()">
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/changeuserpassword.component.ts
... ... @@ -13,7 +13,7 @@ import { ConfirmService } from &#39;../../Shared/Confirm/confirm.service&#39;;
13 13 import 'rxjs/Rx';
14 14 import 'rxjs/add/operator/map';
15 15 import 'rxjs/add/operator/filter';
16   -
  16 +import { LoadingService } from '../../shared/loading.service';
17 17 @Component({
18 18 templateUrl: './changeuserpassword.component.html'
19 19 })
... ... @@ -25,7 +25,7 @@ changeUserPasswordFrm: FormGroup;
25 25 error: any;
26 26 alerts: string;
27 27  
28   -constructor(private changeUserPasswordService: UserService, private router: Router, private fb: FormBuilder, private _confirmService: ConfirmService) { }
  28 + constructor(private _loadingService: LoadingService,private changeUserPasswordService: UserService, private router: Router, private fb: FormBuilder, private _confirmService: ConfirmService) { }
29 29  
30 30 ngOnInit(): void {
31 31 this.user = new User();
... ... @@ -37,9 +37,11 @@ constructor(private changeUserPasswordService: UserService, private router: Rout
37 37 newPassword: ['', [Validators.required, Validators.minLength(8)]],
38 38 confirmPassword: ['', Validators.required]
39 39 });
  40 + this._loadingService.ShowLoading("global-loading");
40 41 this.GetUserById();
  42 + this._loadingService.HideLoading("global-loading");
41 43 }
42   -
  44 +
43 45 GetUserById() {
44 46  
45 47 this.changeUserPasswordService.GetUserById()
... ... @@ -50,14 +52,26 @@ constructor(private changeUserPasswordService: UserService, private router: Rout
50 52 }
51 53 public onFormSubmit() {
52 54 this.alerts = '';
53   - if (this.user.Password != this.changeUserPasswordFrm.value.oldPassword) {
54   - this.alerts = '<span>Old password is invalid</span>';
  55 + if ((this.changeUserPasswordFrm.value.oldPassword)=='')
  56 + {
  57 + this.alerts = '<span>Old password is required.</span>';
  58 + }
  59 + if (this.user.Password != this.changeUserPasswordFrm.value.oldPassword && this.changeUserPasswordFrm.value.oldPassword!='') {
  60 + this.alerts += '</br><span>Old password is invalid.</span>';
  61 + }
  62 + if ((this.changeUserPasswordFrm.value.newPassword) == '') {
  63 + this.alerts += '</br><span>New password is required.</span>';
55 64 }
56 65 if (this.user.Password == this.changeUserPasswordFrm.value.newPassword) {
57   - this.alerts += '</br><span>New password and old password must be different</span>';
  66 + this.alerts += '</br><span>New password and old password must be different.</span>';
  67 + }
  68 + if ((this.changeUserPasswordFrm.value.newPassword) == '') {
  69 + this.alerts += '</br><span>Confirm password is required.</span>';
58 70 }
  71 +
  72 +
59 73 if (this.changeUserPasswordFrm.value.newPassword != this.changeUserPasswordFrm.value.confirmPassword) {
60   - this.alerts += '</br><span>New password and confirm password must be same</span>';
  74 + this.alerts += '</br><span>New password and confirm password must be same.</span>';
61 75 }
62 76 if (this.alerts == '') {
63 77 var obj = this.changeUserPasswordFrm.value;
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/datamodel.ts
... ... @@ -9,7 +9,17 @@ export class User {
9 9 ConfirmPassword: string;
10 10 AccountNumberId: number;
11 11 UserTypeId: number;
12   - ProductEditionId:number
  12 + UserId: number;
  13 + ProductEditionId: number;
  14 + AccountNumber: string;
  15 + UserTypeTitle: string;
  16 + AccountTypeTitle: string;
  17 + CreationDate: Date;
  18 + ModifiedDate: Date;
  19 + Createdby: string;
  20 + Modifiedby: string;
  21 + DeactivationDate: Date;
  22 + UserStatus:string
13 23 }
14 24 export class DiscountCode {
15 25 Id: number;
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/unblockuser.component.html 0 → 100644
  1 +<div class="row">
  2 + <div class="col-sm-12 pageHeading">
  3 + <h4>Unblock User</h4>
  4 + </div>
  5 + <div>
  6 + <ng-template #template>
  7 + <div class="modal-header">
  8 + <h4 class="modal-title pull-left">Confirmation</h4>
  9 + <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
  10 + <span aria-hidden="true">&times;</span>
  11 + </button>
  12 + </div>
  13 + <div class="modal-body">
  14 + <p>Are you sure to unblock the selected user(s)?</p>
  15 + </div>
  16 + <div class="modal-footer">
  17 + <button type="button" class="btn btn-primary btn-sm" (click)="UpdateUnBlockedUsers()">Yes</button>
  18 + <button type="button" class="btn btn-primary btn-sm" (click)="modalRef.hide()">No</button>
  19 + </div>
  20 + </ng-template>
  21 + </div>
  22 + <ng-template #templatesuccess>
  23 + <div class="modal-header">
  24 + <h4 class="modal-title pull-left">Confirmation</h4>
  25 + <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()">
  26 + <span aria-hidden="true">&times;</span>
  27 + </button>
  28 + </div>
  29 + <div class="modal-body" [innerHTML]="modalAlerts">
  30 + </div>
  31 + <div class="modal-footer">
  32 + </div>
  33 + </ng-template>
  34 + <div class="col-sm-12">
  35 +
  36 + <div class="container-fluid main-full">
  37 + <div class="row">
  38 + <div class="well marginBtm12" novalidate [formGroup]="UnBlockedUserFrm">
  39 + <!--first-table-->
  40 + <div class="table-responsive blue">
  41 + <table class="table table-condensed table-bordered margin-btm0 table-striped table-hover">
  42 + <thead>
  43 + <tr>
  44 + <th>Select</th>
  45 + <th>First Name</th>
  46 + <th>Last Name</th>
  47 + <th>User ID</th>
  48 + <th>Password</th>
  49 + <th>Email ID</th>
  50 + <th>Blocked Date</th>
  51 + <th>Account Number</th>
  52 + </tr>
  53 + </thead>
  54 + <tbody>
  55 + <tr *ngFor="let UserEntity of UserList;let i = index">
  56 + <td>
  57 + <input type="checkbox" (change)="onChange(i, UserEntity.Id, $event.target.checked)">
  58 + </td>
  59 + <td>{{UserEntity.FirstName}}</td>
  60 + <td>{{UserEntity.LastName}}</td>
  61 + <td>{{UserEntity.LoginId}}</td>
  62 + <td>{{UserEntity.Password}}</td>
  63 + <td>{{UserEntity.EmailId}}</td>
  64 + <td>{{UserEntity.LoginTime| date: 'MM/dd/yyyy'}}</td>
  65 + <td>{{UserEntity.AccountNumber}}</td>
  66 + </tr>
  67 +
  68 + </tbody>
  69 + </table>
  70 + </div>
  71 +
  72 + <!--first-table-->
  73 +
  74 + <div class="row">
  75 + <div class="col-sm-12 marginTop20 text-center">
  76 + <button class="btn btn-primary btn-sm" (click)="openModal(template)"><i class="fa fa-times-circle"></i> Unblock</button>
  77 + <button class="btn btn-primary btn-sm"><i class="fa fa-close"></i> Cancel</button>
  78 + </div>
  79 + </div>
  80 + <!--tab-content-->
  81 + </div>
  82 + </div>
  83 +
  84 + </div>
  85 + </div>
  86 +</div>
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/unblockuser.component.ts 0 → 100644
  1 +import { Component, OnInit, AfterViewInit, ViewChild, TemplateRef } from '@angular/core';
  2 +import { UserService } from './user.service';
  3 +import { Router } from '@angular/router';
  4 +import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms';
  5 +import { FormsModule, ReactiveFormsModule } from '@angular/forms';
  6 +import { User } from '../UserEntity/datamodel';
  7 +import { Http, Response } from '@angular/http';
  8 +import { GlobalService } from '../../Shared/global';
  9 +//import { DBOperation } from 'S';
  10 +import { Observable } from 'rxjs/Observable';
  11 +import { ConfirmService } from '../../Shared/Confirm/confirm.service';
  12 +import 'rxjs/Rx';
  13 +import 'rxjs/add/operator/map';
  14 +import 'rxjs/add/operator/filter';
  15 +import { LoadingService } from '../../shared/loading.service';
  16 +import { BsModalService } from 'ngx-bootstrap/modal';
  17 +import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
  18 +
  19 +@Component({
  20 + templateUrl:'./unblockuser.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html'
  21 +})
  22 +
  23 +export class UnblockUser implements OnInit {
  24 +
  25 + modalTitle: string;
  26 + UnBlockedUserFrm: FormGroup;
  27 + alerts: string;
  28 + public UserTypeList: any;
  29 + public AccountTypeList: any;
  30 + public UserList: any;
  31 + error;
  32 + modalRef: BsModalRef;
  33 + checkedRecords: Array<number>;
  34 + display = 'none';
  35 + modalAlerts: string;
  36 + //@ViewChild("profileModal")
  37 + //profileModal: ModalComponent;
  38 + //errorMessage: any;
  39 + constructor(private _loadingService: LoadingService,private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
  40 + private _confirmService: ConfirmService, private modalService: BsModalService, private commonService: GlobalService
  41 + ) { }
  42 +
  43 + ngOnInit(): void {
  44 + this.alerts = '';
  45 + //this.userservice.GetUserById(this.UserId);
  46 + this.UnBlockedUserFrm = this.fb.group({
  47 + //FirstName:[''],
  48 + //LastName: [''],
  49 + //EmailId: [''],
  50 + //AccountNumber: [''],
  51 + //UserTypeId: [''],
  52 + //AccountTypeId:['']
  53 + // Gender: ['', Validators.required],
  54 + // Email: ['']
  55 +
  56 + }); this._loadingService.ShowLoading("global-loading");
  57 + this.GetBlockUserList();
  58 + //this.GetAccountType();
  59 + this._loadingService.HideLoading("global-loading");
  60 +
  61 + //this.GetUserList();
  62 + }
  63 + redirect() {
  64 + this.router.navigate(['/']);
  65 + }
  66 + onChange(Idx: number, Id: number, isChecked: boolean) {
  67 + debugger;
  68 + if (isChecked) {
  69 + this.checkedRecords[Idx] = Id;
  70 + }
  71 + else {
  72 + this.checkedRecords[Idx] = 0;
  73 + }
  74 + }
  75 + openModal(template: TemplateRef<any>) {
  76 + debugger;
  77 + this.display = 'block';
  78 + if (this.checkedRecords.filter(C => C > 0).length == 0) return;
  79 + this.modalRef = this.modalService.show(template);
  80 + }
  81 + UpdateUnBlockedUsers(template: TemplateRef<any>) {
  82 + this.modalRef.hide();
  83 + console.log(this.checkedRecords);
  84 + this.alerts = '';
  85 + if (this.alerts == '') {
  86 + var obj = this.checkedRecords.filter(C => C > 0);
  87 + return this.userservice.UpdateUnBlockedUser(obj)
  88 + .subscribe(
  89 + data => (this.AfterDeleteData(data, template)),
  90 + error => {
  91 + this.error = <any>error;
  92 + this.alerts = "<span>" + this.error + "</span>";
  93 + });
  94 + }
  95 + }
  96 + AfterDeleteData(data, template) {
  97 + debugger;
  98 + if (data.Status == "false") {
  99 + this._confirmService.activate("We have encountered a technical error and same has been notified to our technical team.", "alertMsg");
  100 + } else {
  101 + //this.modalAlerts = "<p>Selected users has been unblocked now</p>";
  102 + //this.modalRef = this.modalService.show(template);
  103 + this.GetBlockUserList();
  104 + }
  105 + }
  106 +
  107 + GetBlockUserList(this)
  108 + {
  109 + var UserFilterControl = this.UnBlockedUserFrm.value;
  110 + this.userservice.GetBlockUserList(
  111 + {
  112 + UserTypeId: this.commonService.UserType,
  113 + LicenseId: 0,
  114 + })
  115 +
  116 + .subscribe(x => { this.UserList = x; this.checkedRecords = new Array<number>(this.UserList.length);}, error => this.error = <any>error);
  117 +
  118 + }
  119 + AfterInsertData(data) {
  120 +
  121 + if (data == "success") {
  122 + this._confirmService.activate("Userid Updated Successfully.", "alertMsg");
  123 +
  124 + } else {
  125 + this.alerts += '<span>' + data+'</span>';
  126 + return false;
  127 +
  128 +
  129 + }
  130 + //if (this.closeflag) {
  131 + // this.close.emit(null);
  132 + //}
  133 + //else {
  134 + //}
  135 + }
  136 +
  137 + ResetFormFields() {
  138 + //this.ChangeUserIdFrm.reset()
  139 + //this.ChangeUserIdFrm.controls['id'].setValue(this.user.Id)
  140 + //this.ChangeUserIdFrm.controls['loginid'].setValue(this.user.LoginId)
  141 + //this.ChangeUserIdFrm.controls['newloginid'].setValue('')
  142 + //this.ChangeUserIdFrm.controls['confirmloginid'].setValue('')
  143 + this.alerts = '';
  144 + }
  145 +
  146 +}
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.html
... ... @@ -24,14 +24,14 @@
24 24 <label for="inputEmail3" class="col-sm-4 control-label">First Name <span class="red">*</span> :</label>
25 25 <div class="col-sm-7">
26 26 <input type="text" formControlName="firstName" class="form-control" id="inputEmail3">
27   - <div *ngIf="!userFrm.controls.firstName.valid && userFrm.controls.firstName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">First name is required</div>
  27 + <div *ngIf="!userFrm.controls.firstName.valid && userFrm.controls.firstName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">First Name is required</div>
28 28 </div>
29 29 </div>
30 30 <div class="form-group">
31 31 <label for="inputPassword3" class="col-sm-4 control-label">Last Name <span class="red">*</span> :</label>
32 32 <div class="col-sm-7">
33 33 <input type="text" class="form-control" id="inputPassword3" formControlName="lastName">
34   - <div *ngIf="!userFrm.controls.lastName.valid && userFrm.controls.lastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Last name is required</div>
  34 + <div *ngIf="!userFrm.controls.lastName.valid && userFrm.controls.lastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Last Name is required</div>
35 35 </div>
36 36 </div>
37 37 <div class="form-group">
... ... @@ -39,7 +39,7 @@
39 39 <div class="col-sm-7">
40 40 <input type="text" class="form-control" required="required" id="inputPassword3" formControlName="emailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$">
41 41  
42   - <div *ngIf="userFrm.controls.emailId.invalid && !userFrm.controls.emailId.value && userFrm.controls.lastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email id is required</div>
  42 + <div *ngIf="userFrm.controls.emailId.invalid && !userFrm.controls.emailId.value && userFrm.controls.emailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email Id is required</div>
43 43  
44 44 <div *ngIf="userFrm.controls.emailId.invalid && userFrm.controls.emailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">
45 45 Please enter the correct email.
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/updateuserprofile.component.ts
... ... @@ -12,7 +12,7 @@ import { ConfirmService } from &#39;../../Shared/Confirm/confirm.service&#39;;
12 12 import 'rxjs/Rx';
13 13 import 'rxjs/add/operator/map';
14 14 import 'rxjs/add/operator/filter';
15   -
  15 +import { LoadingService } from '../../shared/loading.service';
16 16  
17 17 @Component({
18 18 templateUrl:'./updateuserprofile.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html'
... ... @@ -37,7 +37,7 @@ export class UpdateUserProfile implements OnInit {
37 37 //@ViewChild("profileModal")
38 38 //profileModal: ModalComponent;
39 39 //errorMessage: any;
40   - constructor(private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
  40 + constructor(private _loadingService: LoadingService,private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
41 41 private _confirmService: ConfirmService
42 42 ) { }
43 43  
... ... @@ -55,7 +55,9 @@ export class UpdateUserProfile implements OnInit {
55 55 // Email: ['']
56 56  
57 57 });
  58 + this._loadingService.ShowLoading("global-loading");
58 59 this.GetUserById();
  60 +
59 61 }
60 62 redirect() {
61 63 this.router.navigate(['/']);
... ... @@ -78,7 +80,8 @@ export class UpdateUserProfile implements OnInit {
78 80 GetUserById() {
79 81  
80 82 this.userservice.GetUserById()
81   - .subscribe(x => { console.log(x); this.bindUsers(x) }, error => this.error = <any>error);
  83 + .subscribe(x => { console.log(x); this.bindUsers(x) }, error => this.error = <any>error);
  84 + this._loadingService.HideLoading("global-loading");
82 85 }
83 86 UpdateUserProfile(this) {
84 87 // debugger;
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/user.service.ts
... ... @@ -15,7 +15,7 @@ export class UserService {
15 15 //////////Get User Detail///////////////
16 16 GetUserById() {
17 17 debugger;
18   - return this.http.get(this.commonService.resourceBaseUrl + "/GetUserProfile/"+this.commonService.UserId)
  18 + return this.http.get(this.commonService.resourceBaseUrl + "User/GetUserProfile/"+this.commonService.UserId)
19 19 .map(this.extractData)
20 20 .catch((res: Response) => this.handleError(res));;
21 21  
... ... @@ -23,7 +23,7 @@ export class UserService {
23 23 //////////Update User Detail///////////////
24 24 UpdateUserProfileById(obj: User) {
25 25 //let options = new RequestOptions({ headers: this.headers });
26   - return this.http.post(this.commonService.resourceBaseUrl + "/UpdateProfile", obj)
  26 + return this.http.post(this.commonService.resourceBaseUrl + "User/UpdateProfile", obj)
27 27 .map(this.extractData)
28 28 .catch((res: Response) => this.handleError(res));
29 29 }
... ... @@ -37,7 +37,7 @@ export class UserService {
37 37 var headers = new Headers({
38 38 'Content-Type': 'application/json'
39 39 });
40   - return this.http.post(this.commonService.resourceBaseUrl + "/ChangeUserPassword",
  40 + return this.http.post(this.commonService.resourceBaseUrl + "User/ChangeUserPassword",
41 41 JSON.stringify(jsonData), { headers: headers })
42 42 .map(this.extractData)
43 43 .catch((res: Response) => this.handleError(res));
... ... @@ -46,7 +46,7 @@ export class UserService {
46 46 //////////Update User Userid///////////////
47 47 UpdateUserId(obj: User) {
48 48 //let options = new RequestOptions({ headers: this.headers });
49   - return this.http.post(this.commonService.resourceBaseUrl + "/UpdateUserId", obj)
  49 + return this.http.post(this.commonService.resourceBaseUrl + "User/UpdateUserId", obj)
50 50 .map(this.extractData)
51 51 .catch((res: Response) => this.handleError(res));
52 52 }
... ... @@ -55,17 +55,17 @@ export class UserService {
55 55 /// Users List Form///////
56 56  
57 57 GetUserType() {
58   - return this.http.get(this.commonService.resourceBaseUrl + "/GetUserType/"+this.commonService.UserType)
  58 + return this.http.get(this.commonService.resourceBaseUrl + "User/GetUserType/"+this.commonService.UserType)
59 59 .map(this.extractData)
60 60 .catch((res: Response) => this.handleError(res));
61 61 }
62 62 GetAccountType() {
63   - return this.http.get(this.commonService.resourceBaseUrl + "/GetAccountType/"+this.commonService.AccountType)
  63 + return this.http.get(this.commonService.resourceBaseUrl + "User/GetAccountType/"+this.commonService.AccountType)
64 64 .map(this.extractData)
65 65 .catch((res: Response) => this.handleError(res));
66 66 }
67 67 GetUserList(obj: any) {
68   - return this.http.get(this.commonService.resourceBaseUrl + "/Users?firstname=" + obj.FirstName +
  68 + return this.http.get(this.commonService.resourceBaseUrl + "User/Users?firstname=" + obj.FirstName +
69 69 "&lastname=" + obj.LastName +
70 70 "&emailid=" + obj.EmailId +
71 71 "&accountnumber=" + obj.AccountNumber +
... ... @@ -74,30 +74,81 @@ export class UserService {
74 74 .map(this.extractData)
75 75 .catch((res: Response) => this.handleError(res));
76 76 }
  77 +
  78 + UpdateUserEntity(obj: any) {
  79 + //let options = new RequestOptions({ headers: this.headers });
  80 + var jsonData = { 'id': obj.id, 'FirstName': obj.FirstName, 'LastName': obj.LastName, 'EmailId': obj.EmailId, 'UserName': obj.UserName, 'Password': obj.Password, 'Modifiedby': this.commonService.UserId, 'IsActive': obj.isActive};
  81 + console.log(obj);
  82 + var headers = new Headers({
  83 + 'Content-Type': 'application/json'
  84 + });
  85 + return this.http.post(this.commonService.resourceBaseUrl + "User/UpdateUser",
  86 + JSON.stringify(jsonData), { headers: headers })
  87 + .map(this.extractData)
  88 + .catch((res: Response) => this.handleError(res));
  89 + }
77 90 /// End Users /////
78 91  
79 92 /// Add User Entity///
80 93 GetUserTypeByLicenseType(obj: any) {
81 94 debugger;
82   - return this.http.get(this.commonService.resourceBaseUrl + "/GetUserTypebyLicenseId?UserTypeId=" + this.commonService.UserType + "&LicenseId=" + obj.AccountNumberId)
  95 + return this.http.get(this.commonService.resourceBaseUrl + "User/GetUserTypebyLicenseId?UserTypeId=" + this.commonService.UserType + "&LicenseId=" + obj.AccountNumberId)
83 96 .map(this.extractData)
84 97 .catch((res: Response) => this.handleError(res));
85 98 }
86 99  
87 100 GetAccountNumber() {
88   - return this.http.get(this.commonService.resourceBaseUrl + "/GetAccountNumber").
  101 + return this.http.get(this.commonService.resourceBaseUrl + "User/GetAccountNumber").
89 102 map(this.extractData)
90 103 .catch((res: Response) => this.handleError(res));
91 104 }
92 105  
93 106 GetProductEdition(obj: any) {
94   - return this.http.get(this.commonService.resourceBaseUrl + "/GetProductEdition?LicenseId=" + obj.AccountNumberId)
  107 + return this.http.get(this.commonService.resourceBaseUrl + "User/GetProductEdition?LicenseId=" + obj.AccountNumberId)
95 108 .map(this.extractData)
96 109 .catch((res: Response) => this.handleError(res));
97 110 }
98 111  
  112 + InsertUser(obj: any)
  113 + {
  114 + //let options = new RequestOptions({ headers: this.headers });
  115 + var jsonData = { 'id': this.commonService.UserId, 'FirstName': obj.FirstName, 'LastName': obj.LastName, 'EmailId': obj.EmailId, 'UserName': obj.UserName, 'Password': obj.Password, 'AccountNumberId': obj.AccountNumberId, 'UserTypeId': obj.UserTypeId, 'ProductEditionId':obj.ProductEditionId };
  116 + console.log(obj);
  117 + var headers = new Headers({
  118 + 'Content-Type': 'application/json'
  119 + });
  120 + return this.http.post(this.commonService.resourceBaseUrl + "User/NewUser",
  121 + JSON.stringify(jsonData), { headers: headers })
  122 + .map(this.extractData)
  123 + .catch((res: Response) => this.handleError(res));
  124 + }
99 125 /// End //////
100 126  
  127 + //// UnBlocked User
  128 +
  129 + GetBlockUserList(obj: any) {
  130 + return this.http.get(this.commonService.resourceBaseUrl + "User/BlockedUser?UserTypeId=" + obj.UserTypeId +
  131 + "&LicenseId=" + obj.LicenseId)
  132 + .map(this.extractData)
  133 + .catch((res: Response) => this.handleError(res));
  134 + }
  135 +
  136 + UpdateUnBlockedUser(obj: any) {
  137 + //let options = new RequestOptions({ headers: this.headers });
  138 + var UserIds = obj;
  139 + console.log(UserIds);
  140 + var headers = new Headers({
  141 + 'Content-Type': 'application/json'
  142 + });
  143 + return this.http.post(this.commonService.resourceBaseUrl + "User/UnblockedUser",
  144 + UserIds, { headers: headers })
  145 + .map(this.extractData)
  146 + .catch((res: Response) => this.handleError(res));
  147 + }
  148 + /// End///////
  149 +
  150 +
  151 +
101 152 extractData(res: Response) {
102 153 debugger;
103 154  
... ... @@ -109,7 +160,8 @@ export class UserService {
109 160 // In a real world app, we might use a remote logging infrastructure
110 161 // We'd also dig deeper into the error to get a better message
111 162 let errMsg = (error.message) ? error.message :
112   - error.status ? `${error.status} - ${error.statusText}` : 'Server error';
  163 + //error.status ? `${error.status} - ${error.statusText}` : 'Server error';
  164 + error.status ? `${error._body}` : 'Server error';
113 165 console.error(errMsg); // log to console instead
114 166 return Observable.throw(errMsg);
115 167 }
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html
... ... @@ -3,156 +3,330 @@
3 3 <h4>List User</h4>
4 4 </div>
5 5 <div class="col-sm-12">
  6 + <div [className]="divClass">
  7 + <div class="container-fluid main-full">
  8 + <form [formGroup]="Users">
  9 + <div [style.visibility]="(Mode == 'Manage') ? 'visible' : 'hidden'" class="row">
  10 + <div class="row">
  11 + <div class="well no-margin-btm">
  12 + <div class="row">
  13 + <div class="col-lg-3 col-sm-3">
  14 + <div class="row">
  15 + <div class="col-sm-12">
  16 + <div class="form-group marginTop5">
  17 + <label for="FirstName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">First Name :</label>
  18 + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
  19 + <input type="text" class="form-control input-sm" id="FirstNames" placeholder="First Name" formControlName="FirstName">
  20 + </div>
  21 + </div>
  22 + </div>
6 23  
7   - <div class="container-fluid main-full">
8   - <div class="row">
9   - <div class="well no-margin-btm">
10   - <div class="row" novalidate [formGroup]="Users">
11   - <div class="col-lg-3 col-sm-3">
12   - <div class="row">
13   - <div class="col-sm-12">
14   - <div class="form-group marginTop5">
15   - <label for="FirstName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">First Name :</label>
16   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
17   - <input type="text" class="form-control input-sm" id="FirstName" placeholder="First Name" formControlName="FirstName">
  24 + <div class="col-sm-12">
  25 + <div class="form-group marginTop5">
  26 + <label for="LastName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Last Name :</label>
  27 + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
  28 + <input type="text" class="form-control input-sm" id="LastNames" placeholder="Last Name" formControlName="LastName">
  29 + </div>
  30 + </div>
  31 + </div>
18 32 </div>
19 33 </div>
20   - </div>
  34 + <div class="col-lg-3 col-sm-3">
  35 + <div class="row">
  36 + <div class="col-sm-12">
  37 + <div class="form-group marginTop5">
  38 + <label for="Email" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Email ID :</label>
  39 + </div>
  40 + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
  41 + <input type="email" class="form-control input-sm" id="Email" placeholder="Email ID" formControlName="EmailId">
  42 + </div>
  43 + </div>
  44 +
  45 + <div class="col-sm-12">
  46 + <div class="form-group marginTop5">
  47 + <label for="Account" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
  48 + </div>
  49 + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
  50 + <input type="text" class="form-control input-sm" id="account" placeholder="Account Number" formControlName="AccountNumber">
  51 + </div>
  52 + </div>
  53 +
  54 + </div>
  55 + </div>
  56 + <div class="col-lg-3 col-sm-3">
  57 + <div class="row">
  58 + <div class="col-sm-12">
  59 + <div class="form-group marginTop5">
  60 + <label for="State" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">User Type :</label>
  61 + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
21 62  
22   - <div class="col-sm-12">
23   - <div class="form-group marginTop5">
24   - <label for="LastName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Last Name :</label>
25   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
26   - <input type="text" class="form-control input-sm" id="LastName" placeholder="Last Name" formControlName="LastName">
  63 + <select class="form-control input-sm " id="State" [formControl]="Users.controls['UserTypeId']">
  64 + <option value="0">All</option>
  65 + <option *ngFor="let UserTypeEntity of UserTypeList" value="{{UserTypeEntity.Id}}">{{ UserTypeEntity.Title }}</option>
  66 + </select>
  67 + </div>
  68 + </div>
  69 + </div>
  70 +
  71 +
  72 + <div class="col-sm-12">
  73 + <div class="form-group marginTop5">
  74 + <label for="State" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Type :</label>
  75 + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
  76 + <select class="form-control input-sm " id="AccountTypes" [formControl]="Users.controls['AccountTypeId']">
  77 + <option value="0">All</option>
  78 + <option *ngFor="let AccountTypeEntity of AccountTypeList" value="{{AccountTypeEntity.Id}}">{{ AccountTypeEntity.Title }}</option>
  79 + </select>
  80 + </div>
  81 + </div>
  82 + </div>
27 83 </div>
28 84 </div>
  85 +
  86 +
  87 + <div class="col-lg-2 col-sm-3">
  88 + <div class="row">
  89 + <div class="col-sm-12"><div class="form-group marginTop5">&nbsp;</div></div>
  90 +
  91 + <div class="col-sm-12">
  92 + <div class="form-group marginTop5">
  93 + <div class="checkbox text-right-lg">
  94 + <label class="marginR5">
  95 + <input type="checkbox" checked> Pagination Results
  96 + </label>
  97 + <button class="btn btn-primary btn-sm" (click)="SearchUserList(this)">Go <i class="fa fa-arrow-right"></i></button>
  98 + </div>
  99 + </div>
  100 + </div>
  101 + </div>
  102 + </div>
  103 + </div>
  104 +
  105 + </div>
  106 +
  107 + <div class="well">
  108 + <table id="fixed_hdr2" class="table-hover ">
  109 + <thead>
  110 + <tr>
  111 + <th>First Name</th>
  112 + <th>Last Name</th>
  113 + <th>User ID</th>
  114 + <th>Password</th>
  115 + <th>Email ID</th>
  116 + <th>User Type</th>
  117 + <th>Created Date</th>
  118 + <th>Last Modified Date</th>
  119 + <th>Account Number</th>
  120 + <th>Product Edition</th>
  121 + <th>Status</th>
  122 + </tr>
  123 + </thead>
  124 + <tbody>
  125 + <tr *ngFor="let UserEntity of UserList ;let i = index" (click)="SetClickedRow(i, UserEntity)" [class.active]="i == selectedRow" [class.inactive]="i != selectedRow">
  126 + <td><input type="hidden" value="{{UserEntity.Id}}">{{UserEntity.FirstName}}</td>
  127 + <td>{{UserEntity.LastName}}</td>
  128 + <td>{{UserEntity.LoginId}}</td>
  129 + <td>{{UserEntity.Password}}</td>
  130 + <td>{{UserEntity.EmailId}}</td>
  131 + <td>{{UserEntity.UserTypeTitle}}</td>
  132 + <td>{{UserEntity.CreationDate| date: 'MM/dd/yyyy'}}</td>
  133 + <td>{{UserEntity.ModifiedDate | date: 'MM/dd/yyyy'}}</td>
  134 + <td>{{UserEntity.AccountNumber}}</td>
  135 + <td>{{UserEntity.EditionType}}</td>
  136 +
  137 + <td>
  138 + <span [ngClass]="(UserEntity.UserStatus==Active?'label label-success':'label label-default')">{{UserEntity.UserStatus}}</span>
  139 + </td>
  140 +
  141 +
  142 + </tr>
  143 +
  144 +
  145 +
  146 + </tbody>
  147 + </table>
  148 +
  149 + <div class="row">
  150 + <div class="col-sm-12 marginTop20 text-center">
  151 + <a href="admin-add-discount-code.html"><button class="btn btn-primary btn-sm"><i class="fa fa-thumbs-up"></i> Manage Rights</button></a>
  152 + <button class="btn btn-primary btn-sm" (click)="EditUser()"><i class="fa fa-edit"></i> Edit</button>
  153 + </div>
29 154 </div>
30 155 </div>
  156 +
31 157 </div>
32   - <div class="col-lg-3 col-sm-3">
33   - <div class="row">
34   - <div class="col-sm-12">
35   - <div class="form-group marginTop5">
36   - <label for="Email" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Email ID :</label>
  158 + </div>
  159 + </form>
  160 +
  161 + <div style="position: absolute; z-index: 100; width: 80%" [style.top]="topPos" [style.visibility]="(Mode=='Add' || Mode=='Edit') ? 'visible' : 'hidden'"
  162 + class="well">
  163 + <div class="row">
  164 + <div class="col-sm-12">
  165 + <div class="panel-body">
  166 + <!-- form -->
  167 + <form class="form-horizontal" [formGroup]="adduserFrm">
  168 + <div class="form-group" *ngIf="alerts !== ''">
  169 + <div class="col-xs-12">
  170 + <div class="alert alert-danger" [innerHTML]="alerts">
  171 + </div>
  172 +
  173 + </div>
37 174 </div>
38   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
39   - <input type="email" class="form-control input-sm" id="Email" placeholder="Email ID" formControlName="EmailId">
  175 + <div class="form-group">
  176 + <label for="inputEmail3" class="col-sm-4 control-label">User Name <span class="red">*</span> :</label>
  177 + <div class="col-sm-7">
  178 + <input type="text" class="form-control input-sm" id="name" placeholder="User Name" formControlName="UserName">
  179 + <div *ngIf="!adduserFrm.controls.UserName.valid && adduserFrm.controls.UserName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">User Name is required</div>
  180 + </div>
40 181 </div>
41   - </div>
  182 + <div class="form-group">
  183 + <label for="inputPassword3" class="col-sm-4 control-label">Password <span class="red">*</span> :</label>
  184 + <div class="col-sm-7">
  185 + <input type="password" class="form-control input-sm" id="password" placeholder="" formControlName="Password">
  186 + <span class="help-block">(Minimum 8 characters)</span>
  187 + <div *ngIf="!adduserFrm.controls.Password.valid && adduserFrm.controls.Password.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Password of minimum 8 characters is required</div>
  188 + </div>
  189 + </div>
  190 + <div class="form-group">
  191 + <label for="inputPassword3" class="col-sm-4 control-label">Confirm Password <span class="red">*</span> :</label>
  192 + <div class="col-sm-7">
  193 + <input type="password" class="form-control input-sm" id="cpassword" placeholder="" formControlName="ConfirmPassword">
  194 + <div *ngIf="!adduserFrm.controls.ConfirmPassword.valid && adduserFrm.controls.ConfirmPassword.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Confirm Password is required</div>
  195 + </div>
  196 + </div>
  197 + <div class="form-group">
  198 + <label for="inputPassword3" class="col-sm-4 control-label">Email Id <span class="red">*</span> :</label>
  199 + <div class="col-sm-7">
  200 + <input type="text" class="form-control" id="inputPassword3" placeholder="Email Id" formControlName="EmailId" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$">
  201 + <div *ngIf="adduserFrm.controls.EmailId.invalid && !adduserFrm.controls.EmailId.value && adduserFrm.controls.EmailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email Id is required</div>
  202 +
  203 + <div *ngIf="adduserFrm.controls.EmailId.invalid && adduserFrm.controls.EmailId.value" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">
  204 + Please enter the correct email.
  205 + </div>
  206 + </div>
  207 + </div>
  208 + <div class="form-group">
  209 + <label for="inputEmail3" class="col-sm-4 control-label">First Name <span class="red">*</span> :</label>
  210 + <div class="col-sm-7">
  211 + <input class="form-control input-sm" id="FirstName" placeholder="First Name" type="text" formControlName="FirstName">
  212 + <div *ngIf="!adduserFrm.controls.FirstName.valid && adduserFrm.controls.FirstName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">First Name is required</div>
  213 + </div>
  214 + </div>
  215 + <div class="form-group">
  216 + <label for="inputEmail3" class="col-sm-4 control-label">Last Name <span class="red">*</span> :</label>
  217 + <div class="col-sm-7">
  218 + <input class="form-control input-sm" id="LastName" placeholder="Last Name" type="text" formControlName="LastName">
  219 + <div *ngIf="!adduserFrm.controls.LastName.valid && adduserFrm.controls.LastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Last Name is required</div>
  220 + </div>
  221 + </div>
  222 + <div class="form-group">
  223 + <label for="status" class="col-sm-4 control-label">Status :</label>
  224 + <div class="col-sm-7">
42 225  
43   - <div class="col-sm-12">
44   - <div class="form-group marginTop5">
45   - <label for="Account" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label>
  226 + <label class="radio-inline">
  227 + <input name="isActive" value="true" type="radio" formControlName="UserStatusActive" (change)="handleChange($event)">
  228 + Active
  229 + </label>
  230 + <label class="radio-inline">
  231 + <input name="isActive" value="false" type="radio" formControlName="UserStatusInActive" (change)="handleChange($event)">
  232 + Inactive
  233 + </label>
  234 + </div>
46 235 </div>
47   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
48   - <input type="text" class="form-control input-sm" id="account" placeholder="Account Number" formControlName="AccountNumber">
  236 + <div class="form-group">
  237 + <label for="inputEmail3" class="col-sm-4 control-label">User Type:</label>
  238 + <div class="col-sm-7">
  239 +
  240 + <input class="form-control input-sm" id="UserType" placeholder="" type="text" formControlName="UserType" [attr.disabled]="true">
  241 + </div>
49 242 </div>
50   - </div>
  243 + <div class="form-group">
  244 + <label for="inputEmail3" class="col-sm-4 control-label">Account Type :</label>
  245 + <div class="col-sm-7">
51 246  
52   - </div>
53   - </div>
54   - <div class="col-lg-3 col-sm-3">
55   - <div class="row">
56   - <div class="col-sm-12">
57   - <div class="form-group marginTop5">
58   - <label for="State" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">User Type :</label>
59   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
60   -
61   - <select class="form-control input-sm " id="State" [formControl]="Users.controls['UserTypeId']">
62   - <option value="0">All</option>
63   - <option *ngFor="let UserTypeEntity of UserTypeList" value="{{UserTypeEntity.Id}}">{{ UserTypeEntity.Title }}</option>
64   - </select>
  247 + <input class="form-control input-sm" id="AccountType" placeholder="" type="text" formControlName="AccountType" [attr.disabled]="true">
65 248 </div>
66 249 </div>
67   - </div>
  250 + <div class="form-group">
  251 + <label for="inputEmail3" class="col-sm-4 control-label">Account Number :</label>
  252 + <div class="col-sm-7">
  253 + <input class="form-control input-sm" id="AccountNumber" placeholder="" type="text" formControlName="AccountNumber" [attr.disabled]="true">
68 254  
  255 + </div>
  256 + </div>
  257 + <div class="form-group">
  258 + <label for="inputEmail3" class="col-sm-4 control-label">Created Date :</label>
  259 + <div class="col-sm-7">
  260 + <input class="form-control input-sm" id="Createddate" placeholder="" type="text" formControlName="Createddate" [attr.disabled]="true">
69 261  
70   - <div class="col-sm-12">
71   - <div class="form-group marginTop5">
72   - <label for="State" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Type :</label>
73   - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0">
74   - <select class="form-control input-sm " id="AccountType" [formControl]="Users.controls['AccountTypeId']">
75   - <option value="0">All</option>
76   - <option *ngFor="let AccountTypeEntity of AccountTypeList" value="{{AccountTypeEntity.Id}}">{{ AccountTypeEntity.Title }}</option>
77   - </select>
78 262 </div>
79 263 </div>
80   - </div>
81   - </div>
82   - </div>
  264 + <div class="form-group">
  265 + <label for="inputEmail3" class="col-sm-4 control-label">Last Modified Date :</label>
  266 + <div class="col-sm-7">
  267 + <input class="form-control input-sm" id="LastModifiedDate" placeholder="" type="text" formControlName="LastModifiedDate" [attr.disabled]="true">
83 268  
  269 + </div>
  270 + </div>
  271 + <div class="form-group">
  272 + <label for="inputEmail3" class="col-sm-4 control-label">Created By :</label>
  273 + <div class="col-sm-7">
  274 + <input class="form-control input-sm" id="Createdby" placeholder="" type="text" formControlName="Createdby" [attr.disabled]="true">
84 275  
85   - <div class="col-lg-2 col-sm-3">
86   - <div class="row">
87   - <div class="col-sm-12"><div class="form-group marginTop5">&nbsp;</div></div>
  276 + </div>
  277 + </div>
  278 + <div class="form-group">
  279 + <label for="inputEmail3" class="col-sm-4 control-label">Modified By :</label>
  280 + <div class="col-sm-7">
  281 + <input class="form-control input-sm" id="Modifiedby" placeholder="" type="text" formControlName="Modifiedby" [attr.disabled]="true">
88 282  
89   - <div class="col-sm-12">
90   - <div class="form-group marginTop5">
91   - <div class="checkbox text-right-lg">
92   - <label class="marginR5">
93   - <input type="checkbox" checked> Pagination Results
94   - </label>
95   - <button class="btn btn-primary btn-sm" (click)="SearchUserList(this)">Go <i class="fa fa-arrow-right"></i></button>
96 283 </div>
97 284 </div>
98   - </div>
99   - </div>
100   - </div>
101   - </div>
  285 + <div class="form-group">
  286 + <label for="inputEmail3" class="col-sm-4 control-label">Deactivation Date :</label>
  287 + <div class="col-sm-7">
  288 + <input class="form-control input-sm" id="DeactivationDate" placeholder="" type="text" formControlName="DeactivationDate" [attr.disabled]="true">
102 289  
103   - </div>
  290 + </div>
  291 + </div>
  292 + <div class="row">
  293 + <div class="col-sm-12 marginTop20 text-center">
  294 + <button type="button" class="btn btn-primary btn-sm" data-toggle="modal" (click)="UpdateUser(this)"><i class="fa fa-plus-circle"></i> Update</button>
  295 + <!--modal-->
  296 + <div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal">
  297 + <div class="modal-dialog modal-sm" role="document">
  298 + <div class="modal-content">
  299 + <div class="modal-header annotation-modal-header ui-draggable-handle">
  300 + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  301 + <h4 class="modal-title" id="">Alert</h4>
  302 + </div>
  303 + <div class="modal-body">
  304 + <h5>Please enter a username</h5>
  305 + </div>
  306 + <div class="modal-footer">
  307 + <div class="row">
  308 + <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div>
  309 + </div>
  310 + </div>
104 311  
105   - <div class="well">
106   - <table id="fixed_hdr2" class="table-hover ">
107   - <thead>
108   - <tr >
109   - <th>First Name</th>
110   - <th>Last Name</th>
111   - <th>User ID</th>
112   - <th>Password</th>
113   - <th>Email ID</th>
114   - <th>User Type</th>
115   - <th>Created Date</th>
116   - <th>Last Modified Date</th>
117   - <th>Account Number</th>
118   - <th>Product Edition</th>
119   - <th>Status</th>
120   - </tr>
121   - </thead>
122   - <tbody>
123   - <tr *ngFor="let UserEntity of UserList">
124   - <td>{{UserEntity.FirstName}}</td>
125   - <td>{{UserEntity.LastName}}</td>
126   - <td>{{UserEntity.LoginId}}</td>
127   - <td>{{UserEntity.Password}}</td>
128   - <td>{{UserEntity.EmailId}}</td>
129   - <td>{{UserEntity.UserTypeTitle}}</td>
130   - <td>{{UserEntity.CreationDate| date: 'MM/dd/yyyy'}}</td>
131   - <td>{{UserEntity.ModifiedDate | date: 'MM/dd/yyyy'}}</td>
132   - <td>{{UserEntity.AccountNumber}}</td>
133   - <td>{{UserEntity.EditionType}}</td>
134   -
135   - <td>
136   - <span [ngClass]="(UserEntity.UserStatus==Active?'label label-success':'label label-default')">{{UserEntity.UserStatus}}</span>
137   - </td>
138   -
139   -
140   - </tr>
141   -
142   -
143   -
144   - </tbody>
145   - </table>
  312 + </div><!-- /.modal-content -->
  313 + </div><!-- /.modal-dialog -->
  314 + </div>
146 315  
147   - <div class="row">
148   - <div class="col-sm-12 marginTop20 text-center">
149   - <a href="admin-add-discount-code.html"><button class="btn btn-primary btn-sm"><i class="fa fa-thumbs-up"></i> Manage Rights</button></a>
150   - <button class="btn btn-primary btn-sm"><i class="fa fa-edit"></i> Edit</button>
  316 + <button class="btn btn-primary btn-sm" (click)="EditUser()"><i class="fa fa-refresh"></i> Reset</button>
  317 + <button class="btn btn-primary btn-sm" (click)="redirect()"><i class="fa fa-close"></i> Cancel</button>
  318 + </div>
  319 +
  320 + </div>
  321 + </form>
  322 + <!-- form -->
  323 + </div>
151 324 </div>
152 325 </div>
153 326 </div>
154 327  
  328 +
  329 + </div>
155 330 </div>
156   - </div>
157 331 </div>
158   -</div>
  332 + </div>
... ...
400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
... ... @@ -12,25 +12,39 @@ import { ConfirmService } from &#39;../../Shared/Confirm/confirm.service&#39;;
12 12 import 'rxjs/Rx';
13 13 import 'rxjs/add/operator/map';
14 14 import 'rxjs/add/operator/filter';
15   -
16   -
  15 +import { LoadingService } from '../../shared/loading.service';
  16 +declare var $: any;
  17 +import { DatePipe } from '@angular/common';
17 18 @Component({
18 19 templateUrl:'./users.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html'
19 20 })
20 21  
21 22 export class UsersList implements OnInit {
22   -
  23 +
  24 + Mode: string = 'Manage';
23 25 modalTitle: string;
24 26 Users: FormGroup;
  27 + adduserFrm: FormGroup;
25 28 alerts: string;
26 29 public UserTypeList: any;
27 30 public AccountTypeList: any;
28 31 public UserList: any;
  32 + emailPattern = "^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$";
  33 + public UserTypeListByLicense: any;
  34 + public AccountNumberList: any;
  35 + public ProductEditionList: any;
  36 + UserEntity: User;
  37 + topPos: string = '2000px';
  38 + datePipe: DatePipe = new DatePipe('en-US');
29 39 error;
  40 + selectedRow: number = 0;
  41 + selectedId: number = 0;
  42 + divClass: string;
  43 + isActive: boolean;
30 44 //@ViewChild("profileModal")
31 45 //profileModal: ModalComponent;
32 46 //errorMessage: any;
33   - constructor(private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
  47 + constructor(private _loadingService: LoadingService,private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http,
34 48 private _confirmService: ConfirmService
35 49 ) { }
36 50  
... ... @@ -48,13 +62,89 @@ export class UsersList implements OnInit {
48 62 // Email: ['']
49 63  
50 64 });
  65 + this.adduserFrm = this.fb.group({
  66 + id: [''],
  67 + UserName: ['', Validators.required],
  68 + Password: ['', [Validators.required, Validators.minLength(8)]],
  69 + ConfirmPassword: ['', Validators.required],
  70 + FirstName: ['', Validators.required],
  71 + LastName: ['', Validators.required],
  72 + EmailId: ['', Validators.required],
  73 + AccountNumber: [''],
  74 + UserType: [''],
  75 + AccountType: [''],
  76 + Createddate: [''],
  77 + LastModifiedDate: [''],
  78 + Createdby: [''],
  79 + Modifiedby: [''],
  80 + DeactivationDate: [''],
  81 + isActive: [false],
  82 + UserStatusActive: [''],
  83 + UserStatusInActive:['']
  84 + });
  85 + this._loadingService.ShowLoading("global-loading");
51 86 this.GetUserType();
52 87 this.GetAccountType();
  88 + this._loadingService.HideLoading("global-loading");
  89 + $('#fixed_hdr2').fxdHdrCol({
  90 + fixedCols: 0,
  91 + width: "100%",
  92 + height: 300,
  93 + colModal: [
  94 + { width: 180, align: 'center' },
  95 + { width: 230, align: 'center' },
  96 + { width: 150, align: 'Center' },
  97 + { width: 150, align: 'Center' },
  98 + { width: 350, align: 'Center' },
  99 + { width: 500, align: 'Center' },
  100 + { width: 130, align: 'Center' },
  101 + { width: 120, align: 'center' },
  102 + { width: 280, align: 'Center' },
  103 + { width: 180, align: 'center' },
  104 + { width: 200, align: 'center' },
  105 + { width: 170, align: 'center' },
  106 + { width: 80, align: 'center' },
  107 + { width: 150, align: 'center' },
  108 + { width: 150, align: 'center' },
  109 + { width: 180, align: 'Center' },
  110 + { width: 400, align: 'Center' },
  111 + { width: 150, align: 'center' },
  112 + { width: 110, align: 'center' },
  113 + ],
  114 + sort: true
  115 + });
  116 + document.getElementById("fixed_table_rc").remove();
  117 + var testScript = document.createElement("script");
  118 + testScript.setAttribute("id", "fixed_table_rc");
  119 + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js");
  120 + testScript.setAttribute("type", "text/javascript");
  121 + document.body.appendChild(testScript);
  122 + this._loadingService.ShowLoading("global-loading");
  123 + //this.bindUsers();
  124 + this._loadingService.HideLoading("global-loading");
  125 +
53 126 //this.GetUserList();
54 127 }
  128 + handleChange(evt) {
  129 + debugger;
  130 + var target = evt.target;
  131 + if (target.value == 'true') {
  132 + this.isActive = true;
  133 + }
  134 + else if (target.value == 'false') {
  135 + this.isActive = false;
  136 + }
  137 + }
  138 +
  139 + public SetClickedRow(i: number, item: any) {
  140 + this.selectedRow = i;
  141 + this.selectedId = item['Id'];
  142 + this.UserEntity = item;
  143 + }
55 144 redirect() {
56 145 this.router.navigate(['/']);
57 146 }
  147 +
58 148 GetUserType() {
59 149 this.userservice.GetUserType().subscribe(x => { this.UserTypeList = x; }, error => this.error = <any>error);
60 150 }
... ... @@ -81,16 +171,78 @@ export class UsersList implements OnInit {
81 171  
82 172 .subscribe(x => { this.UserList = x; }, error => this.error = <any>error);
83 173 }
  174 +
  175 + EditUser() {
  176 + this.Mode = 'Edit';
  177 + this.topPos = '100px';
  178 + this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3';
  179 + this.alerts = '';
  180 + this.adduserFrm.controls['id'].setValue(this.UserEntity.Id)
  181 + this.adduserFrm.controls['FirstName'].setValue(this.UserEntity.FirstName)
  182 + this.adduserFrm.controls['LastName'].setValue(this.UserEntity.LastName)
  183 + this.adduserFrm.controls['EmailId'].setValue(this.UserEntity.EmailId)
  184 + this.adduserFrm.controls['UserName'].setValue(this.UserEntity.LoginId)
  185 + this.adduserFrm.controls['Password'].setValue(this.UserEntity.Password)
  186 + this.adduserFrm.controls['ConfirmPassword'].setValue(this.UserEntity.Password)
  187 + this.adduserFrm.controls['AccountNumber'].setValue(this.UserEntity.AccountNumber)
  188 + this.adduserFrm.controls['UserType'].setValue(this.UserEntity.UserTypeTitle)
  189 + this.adduserFrm.controls['AccountType'].setValue(this.UserEntity.AccountTypeTitle)
  190 + this.adduserFrm.controls['Createddate'].setValue(this.datePipe.transform(this.UserEntity.CreationDate, 'MM/dd/yyyy'))
  191 + this.adduserFrm.controls['LastModifiedDate'].setValue(this.datePipe.transform(this.UserEntity.ModifiedDate, 'MM/dd/yyyy'))
  192 + this.adduserFrm.controls['Createdby'].setValue(this.UserEntity.Createdby)
  193 + this.adduserFrm.controls['Modifiedby'].setValue(this.UserEntity.Modifiedby)
  194 + this.adduserFrm.controls['DeactivationDate'].setValue(this.datePipe.transform(this.UserEntity.DeactivationDate, 'MM/dd/yyyy'))
  195 + this.adduserFrm.controls['UserStatusActive'].setValue(true)
  196 + this.adduserFrm.controls['UserStatusInActive'].setValue(false)
  197 + this.isActive = (this.UserEntity.UserStatus=='Active'?true :false)
  198 +
  199 + }
  200 +
  201 + public UpdateUser(this) {
  202 + this.alerts = '';
  203 + if (this.adduserFrm.value.UserName == '') {
  204 + this.alerts += '<span>User Name is required.</span>';
  205 + }
  206 + if (this.adduserFrm.value.Password == '') {
  207 + this.alerts += '</br><span>Password of minimum 8 characters is required.</span>';
  208 + }
  209 + if (this.adduserFrm.value.ConfirmPassword == '') {
  210 + this.alerts += '</br><span>Confirm Password is required.</span>';
  211 + }
  212 + if (this.adduserFrm.value.EmailId == '') {
  213 + this.alerts += '</br><span>Email Id is required.</span>';
  214 + }
  215 + if (this.adduserFrm.value.FirstName == '') {
  216 + this.alerts += '</br><span>First Name is required.</span>';
  217 + }
  218 + if (this.adduserFrm.value.LastName == '') {
  219 + this.alerts += '</br><span>Last Name is required.</span>';
  220 + }
  221 + if (this.adduserFrm.value.newPassword != this.adduserFrm.value.confirmPassword) {
  222 + this.alerts += '</br><span>Password and confirm password must be same</span>';
  223 + }
  224 +
  225 + if (this.adduserFrm.valid && this.alerts == '') {
  226 + this.adduserFrm.controls['isActive'].setValue(this.isActive)
  227 +
  228 + var UserEntity = this.adduserFrm.value;
  229 +
  230 + return this.userservice.UpdateUserEntity(UserEntity)
  231 + .subscribe(
  232 + n => (this.AfterInsertData(n)),
  233 + error => {
  234 + this.error = <any>error;
  235 + this.alerts = "<span>" + this.error + "</span>";
  236 + });
  237 + }
  238 +
  239 + }
  240 +
84 241 AfterInsertData(data) {
85 242  
86   - if (data == "success") {
87   - this._confirmService.activate("Userid Updated Successfully.", "alertMsg");
88   -
89   - } else {
90   - this.alerts += '<span>' + data+'</span>';
91   - return false;
92   -
93   -
  243 + if (data == "User updated successfully") {
  244 + this.alerts = '';
  245 + this._confirmService.activate("User updated successfully.", "alertMsg");
94 246 }
95 247 //if (this.closeflag) {
96 248 // this.close.emit(null);
... ...
400-SOURCECODE/Admin/src/app/shared/Confirm/confirm.component.html
... ... @@ -10,9 +10,10 @@
10 10 <modal-body class="bg-gray-lighter">
11 11 <div class="row">
12 12 <div class="col-sm-12 text-center">
13   - <span style="float:left">
14   - <img src="assets/img/alertmessage.png" />
15   - </span>
  13 + <span style="float:left">
  14 +
  15 + <img src="assets/img/alertmessage.png" />
  16 + </span>
16 17 <p>
17 18 {{message}}
18 19 </p>
... ... @@ -53,7 +54,7 @@
53 54 </modal>
54 55  
55 56 <modal #alertMessageModal [keyboard]="false" [backdrop]="'static'" style="z-index:1100">
56   - <div >
  57 + <div style="min-height:120px">
57 58 <div class="modal-header alert-header-custom">
58 59 <button type="button" class="alert-closebutton" id="closeAlert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
59 60 <h5 class="modal-title"><b>AIA</b></h5>
... ... @@ -61,16 +62,21 @@
61 62 <modal-body class="bg-gray-lighter">
62 63 <div class="row">
63 64 <div class="col-sm-12 text-center">
64   - <span style="float:left">
65   - <img src="assets/img/alertmessage.png" />
66   - </span>
67   - <p>
68   - {{message}}
69   - </p>
  65 + <span style="float:left">
  66 + <!--<img src="assets/img/alertmessage.png" />-->
  67 + <button class="btn btn-primary btn-sm btn-circle" type="button" style="width: 40px;height: 40px; padding: 7px 12px;font-size: 12px;line-height: 1.33;border-radius: 25px;">
  68 + <i class="fa fa-check"></i>
  69 + </button>
  70 + </span>
  71 + <p style="
  72 + padding-top: 10px;
  73 +">
  74 + {{message}}
  75 + </p>
70 76 </div>
71 77  
72 78 <div class="text-center">
73   - <input type="button" class="btn btn-default alert-margin" id="okAlert" value="OK">
  79 + <input type="button" class="btn btn-primary btn-sm alert-margin" id="okAlert" value="OK" />
74 80 </div>
75 81 </div>
76 82 </modal-body>
... ...
400-SOURCECODE/Admin/src/app/shared/global.ts
1 1 export class GlobalService {
2   - resourceBaseUrl: string = "";
3   - DiscountBaseUrl: string = "";
4   - SubscriptionBaseUrl: string = "";
  2 + userUrl: string = "";
  3 + resourceBaseUrl: string = "";
5 4 hostURL: string = "";
6   - UserId: number = 6;
  5 + LiveURL: string = "";
  6 + UserId: number = 0;
7 7 UserType: number =1;
8 8 AccountType: number = 0;
  9 + loggedInUser: any;
9 10 constructor() {
10   - this.hostURL = window.location.hostname;
11   - this.resourceBaseUrl = "http://192.168.84.242:97/User";
12   - this.DiscountBaseUrl = "http://192.168.84.242:97/DiscountCode";
13   - this.SubscriptionBaseUrl = "http://192.168.84.242:97/SubscriptionPrice";
14   - //this.resourceBaseUrl = "http://qa.beta.interactiveanatomy.com/API/Adminapi/User";
  11 + this.hostURL = "http://192.168.84.242:97/";
  12 + this.LiveURL = "http://qa.beta.interactiveanatomy.com/API/Adminapi/";
  13 + this.resourceBaseUrl = this.hostURL;
  14 + //this.resourceBaseUrl = this.LiveURL;
  15 + localStorage.setItem('loggedInUserDetails', JSON.stringify(
  16 + {
  17 + "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016", "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": null, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null
  18 + }));
  19 + this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails"));
  20 + this.UserId = this.loggedInUser.Id;
  21 + this.UserType = this.loggedInUser.UserTypeId;
15 22  
  23 +
16 24 }
17 25 }
... ...
400-SOURCECODE/Admin/src/app/shared/loading.service.ts 0 → 100644
  1 +import { Injectable } from '@angular/core';
  2 +declare var $: any;
  3 +@Injectable()
  4 +export class LoadingService {
  5 + constructor() { }
  6 + ShowLoading(loadingId) {
  7 + let el = document.getElementById(loadingId);
  8 + let mask = document.getElementById("loading-mask");
  9 + if (mask != null && mask != undefined) {
  10 + $(mask).show();
  11 + mask.className = 'loading-mask';
  12 + }
  13 + if (el != undefined && el != null) {
  14 + $(el).show();
  15 + el.className = 'loading-app';
  16 + }
  17 + }
  18 + HideLoading(loadingId) {
  19 + let el = document.getElementById(loadingId);
  20 + let mask = document.getElementById("loading-mask");
  21 + if (mask != null && mask != undefined) {
  22 + $(mask).fadeOut(1000);
  23 + setTimeout(() => mask.className = '', 1000);
  24 + }
  25 + if (el != undefined && el != null) {
  26 + $(el).fadeOut(300);
  27 + setTimeout(() => el.className = '', 300);
  28 + }
  29 + }
  30 +}
0 31 \ No newline at end of file
... ...
400-SOURCECODE/Admin/src/assets/styles/admin-custom.css
... ... @@ -130,12 +130,12 @@
130 130 background: #0095da;
131 131 color: #fff;
132 132 }
133   -#tblDiscountCodes > tbody > tr.active > td {
  133 +#tblDiscountCodes, #fixed_hdr2 > tbody > tr.active > td {
134 134 background: #000;
135 135 color: #FDFBFB;
136 136 }
137 137  
138   -#tblDiscountCodes > tbody > tr.inactive > td {
  138 +#tblDiscountCodes, #fixed_hdr2 > tbody > tr.inactive > td {
139 139 background: #FDFBFB;
140 140 color: #000;
141 141 }
... ...
400-SOURCECODE/Admin/src/assets/styles/angular-custom.css
1   -.form-control[required][disabled] { background: #eeeeee; border-color:#ccc ;}
  1 +.form-control[required][disabled] { background: #eeeeee; border-color:#ccc ;}
2 2 .edisabled span{
3 3 background: #eeeeee;
4 4 border-color: #ccc;
... ... @@ -75,7 +75,7 @@ cursor-pointer {
75 75 }
76 76  
77 77 .alert-header-custom {
78   - background-color: #5d8fc2 !important;
  78 + /* background-color: #5d8fc2 !important; */
79 79 padding: 8px !important;
80 80 color: white;
81 81 }
... ... @@ -102,7 +102,7 @@ cursor-pointer {
102 102 button.alert-closebutton {
103 103 padding: 0;
104 104 cursor: pointer;
105   - background: transparent;
  105 + background: #291b1b00;
106 106 border: 0;
107 107 -webkit-appearance: none;
108 108 }
... ... @@ -297,3 +297,6 @@ ng-select ul li.highlighted span{
297 297 background-color:#2196F3;
298 298 }
299 299  
  300 +
  301 +
  302 +
... ...
400-SOURCECODE/Admin/src/assets/styles/bootstrap-spinner.css 0 → 100644
  1 +/* Absolute Center Spinner */
  2 +
  3 +.loading-mask {
  4 + display: none;
  5 + position: fixed;
  6 + z-index: 100;
  7 + top: 0;
  8 + left: 0;
  9 + width: 100%;
  10 + height: 100%;
  11 + background: black;
  12 + opacity: 0.5;
  13 + filter: alpha(opacity=50);
  14 +}
  15 +
  16 +
  17 +.loading-indicator {
  18 + display: none;
  19 + position: fixed;
  20 + z-index: 1001;
  21 + top: 50%;
  22 + left: 50%;
  23 +}
  24 +.loading-app {
  25 + position: fixed;
  26 + z-index: 999999999;
  27 + height: 2em;
  28 + width: 2em;
  29 + overflow: show;
  30 + margin: auto;
  31 + top: 0;
  32 + left: 0;
  33 + bottom: 0;
  34 + right: 0;
  35 +}
  36 +
  37 + /* Transparent Overlay */
  38 + .loading-app:before {
  39 + content: '';
  40 + display: block;
  41 + position: fixed;
  42 + top: 0;
  43 + left: 0;
  44 + width: 100%;
  45 + height: 100%;
  46 + background-color: #000000;
  47 + filter: alpha(opacity=30);
  48 + -moz-opacity: 0.3;
  49 + -khtml-opacity: 0.3;
  50 + opacity: 0.3;
  51 + }
  52 +
  53 + /* :not(:required) hides these rules from IE9 and below */
  54 + .loading-app:not(:required) {
  55 + font: 0/0 a;
  56 + color: transparent;
  57 + text-shadow: none;
  58 + background-color: transparent;
  59 + border: 0;
  60 + }
  61 +
  62 + .loading-app:not(:required):after {
  63 + content: '';
  64 + display: block;
  65 + font-size: 10px;
  66 + width: 1em;
  67 + height: 1em;
  68 + margin-top: -0.5em;
  69 + -webkit-animation: spinner 1500ms infinite linear;
  70 + -moz-animation: spinner 1500ms infinite linear;
  71 + -ms-animation: spinner 1500ms infinite linear;
  72 + -o-animation: spinner 1500ms infinite linear;
  73 + animation: spinner 1500ms infinite linear;
  74 + border-radius: 0.5em;
  75 + -webkit-box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.5) -1.5em 0 0 0, rgba(0, 0, 0, 0.5) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0;
  76 + box-shadow: rgba(0, 0, 0, 0.75) 1.5em 0 0 0, rgba(0, 0, 0, 0.75) 1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) 0 1.5em 0 0, rgba(0, 0, 0, 0.75) -1.1em 1.1em 0 0, rgba(0, 0, 0, 0.75) -1.5em 0 0 0, rgba(0, 0, 0, 0.75) -1.1em -1.1em 0 0, rgba(0, 0, 0, 0.75) 0 -1.5em 0 0, rgba(0, 0, 0, 0.75) 1.1em -1.1em 0 0;
  77 + }
  78 +
  79 +/* Animation */
  80 +
  81 +@-webkit-keyframes spinner {
  82 + 0% {
  83 + -webkit-transform: rotate(0deg);
  84 + -moz-transform: rotate(0deg);
  85 + -ms-transform: rotate(0deg);
  86 + -o-transform: rotate(0deg);
  87 + transform: rotate(0deg);
  88 + }
  89 +
  90 + 100% {
  91 + -webkit-transform: rotate(360deg);
  92 + -moz-transform: rotate(360deg);
  93 + -ms-transform: rotate(360deg);
  94 + -o-transform: rotate(360deg);
  95 + transform: rotate(360deg);
  96 + }
  97 +}
  98 +
  99 +@-moz-keyframes spinner {
  100 + 0% {
  101 + -webkit-transform: rotate(0deg);
  102 + -moz-transform: rotate(0deg);
  103 + -ms-transform: rotate(0deg);
  104 + -o-transform: rotate(0deg);
  105 + transform: rotate(0deg);
  106 + }
  107 +
  108 + 100% {
  109 + -webkit-transform: rotate(360deg);
  110 + -moz-transform: rotate(360deg);
  111 + -ms-transform: rotate(360deg);
  112 + -o-transform: rotate(360deg);
  113 + transform: rotate(360deg);
  114 + }
  115 +}
  116 +
  117 +@-o-keyframes spinner {
  118 + 0% {
  119 + -webkit-transform: rotate(0deg);
  120 + -moz-transform: rotate(0deg);
  121 + -ms-transform: rotate(0deg);
  122 + -o-transform: rotate(0deg);
  123 + transform: rotate(0deg);
  124 + }
  125 +
  126 + 100% {
  127 + -webkit-transform: rotate(360deg);
  128 + -moz-transform: rotate(360deg);
  129 + -ms-transform: rotate(360deg);
  130 + -o-transform: rotate(360deg);
  131 + transform: rotate(360deg);
  132 + }
  133 +}
  134 +
  135 +@keyframes spinner {
  136 + 0% {
  137 + -webkit-transform: rotate(0deg);
  138 + -moz-transform: rotate(0deg);
  139 + -ms-transform: rotate(0deg);
  140 + -o-transform: rotate(0deg);
  141 + transform: rotate(0deg);
  142 + }
  143 +
  144 + 100% {
  145 + -webkit-transform: rotate(360deg);
  146 + -moz-transform: rotate(360deg);
  147 + -ms-transform: rotate(360deg);
  148 + -o-transform: rotate(360deg);
  149 + transform: rotate(360deg);
  150 + }
  151 +}
... ...
400-SOURCECODE/Admin/src/index.html
... ... @@ -6,11 +6,12 @@
6 6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 7 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
8 8 <title>A.D.A.M. Interactive Anatomy</title>
9   - <link href="../assets/styles/bootstrap.css" rel="stylesheet">
10   - <link href="../assets/styles/main.css" rel="stylesheet">
11   - <link href="../assets/styles/admin-custom.css" rel="stylesheet">
12   - <link href="../assets/styles/angular-custom.css" rel="stylesheet">
13   - <link href="../assets/styles/bootstrap-datetimepicker.min.css" rel="stylesheet">
  9 + <link href="assets/styles/bootstrap.css" rel="stylesheet">
  10 + <link href="assets/styles/main.css" rel="stylesheet">
  11 + <link href="assets/styles/admin-custom.css" rel="stylesheet">
  12 + <link href="assets/styles/angular-custom.css" rel="stylesheet">
  13 + <link href="assets/styles/bootstrap-datetimepicker.min.css" rel="stylesheet">
  14 + <link href="assets/styles/bootstrap-spinner.css" rel="stylesheet">
14 15 <link rel="stylesheet" href="https://unpkg.com/ngx-bootstrap/datepicker/bs-datepicker.css" />
15 16 <link href="assets/styles/fixed_table_rc.css" type="text/css" rel="stylesheet" media="all" />
16 17 <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
... ... @@ -26,14 +27,16 @@
26 27 </head>
27 28 <body>
28 29 <div class="container-fluid">
  30 + <div id="global-loading"></div>
  31 + <div id="loading-mask"></div>
29 32 <app-component></app-component>
30 33 </div>
31 34  
32   - <script src="../assets/scripts/jquery-1.11.3.min.js"></script>
33   - <script src="../assets/scripts/bootstrap.js"></script>
  35 + <script src="assets/scripts/jquery-1.11.3.min.js"></script>
  36 + <script src="assets/scripts/bootstrap.js"></script>
34 37 <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
35 38 <script src="https://meetselva.github.io/fixed-table-rows-cols/js/sortable_table.js" type="text/javascript"></script>
36   - <script src="../assets/scripts/fixed_table_rc.js" type="text/javascript"></script>
  39 + <script src="assets/scripts/fixed_table_rc.js" type="text/javascript"></script>
37 40 <!--Nav-->
38 41 <script>
39 42 $(function () {
... ... @@ -54,25 +57,25 @@
54 57 $(function () {
55 58  
56 59  
57   - $('#fixed_hdr2').fxdHdrCol({
58   - fixedCols: 0,
59   - width: "100%",
60   - height: 300,
61   - colModal: [
62   - { width: 150, align: 'center' },
63   - { width: 150, align: 'center' },
64   - { width: 150, align: 'Center' },
65   - { width: 150, align: 'Center' },
66   - { width: 150, align: 'Center' },
67   - { width: 100, align: 'Center' },
68   - { width: 130, align: 'Center' },
69   - { width: 200, align: 'center' },
70   - { width: 200, align: 'Center' },
71   - { width: 200, align: 'center' },
72   - { width: 100, align: 'center' },
73   - ],
74   - sort: true
75   - });
  60 + //$('#fixed_hdr2').fxdHdrCol({
  61 + // fixedCols: 0,
  62 + // width: "100%",
  63 + // height: 300,
  64 + // colModal: [
  65 + // { width: 150, align: 'center' },
  66 + // { width: 150, align: 'center' },
  67 + // { width: 150, align: 'Center' },
  68 + // { width: 150, align: 'Center' },
  69 + // { width: 150, align: 'Center' },
  70 + // { width: 100, align: 'Center' },
  71 + // { width: 130, align: 'Center' },
  72 + // { width: 200, align: 'center' },
  73 + // { width: 200, align: 'Center' },
  74 + // { width: 200, align: 'center' },
  75 + // { width: 100, align: 'center' },
  76 + // ],
  77 + // sort: true
  78 + //});
76 79 });
77 80 </script>
78 81 <!--Nav-->
... ...