From e9497eda57fdc26e6fa1dea67635118252bf7895 Mon Sep 17 00:00:00 2001 From: gagan.deep Date: Thu, 15 Feb 2018 12:09:55 +0530 Subject: [PATCH] User Group And Manage Rights --- 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetManageRights.sql | Bin 0 -> 3724 bytes 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupController.cs | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupModel.cs | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserModel.cs | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/mergecode.txt | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.html | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.ts | 267 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/users.component.ts | 324 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteLicenseUserGroup.sql | 43 +++++++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseUserGroups.sql | 39 +++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertDeleteUserManageRights.sql | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateLicenseUserGroup.sql | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseUserGroupUsers.sql | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj | 5 +++++ 400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx | 86 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- 400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseUserGroups_Result.cs | 24 ++++++++++++++++++++++++ 400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs | 27 ++++++++++++++++++++++++++- 400-SOURCECODE/Admin/dist/assets/styles/angular-custom.css | 2 +- 400-SOURCECODE/Admin/dist/index.html | 2 +- 500-DBDump/AIA-StoredProcedures/dbo.ClearSessionManager.StoredProcedure.sql | Bin 0 -> 1950 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBackGroundArtList.StoredProcedure.sql | Bin 0 -> 2426 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBaseLayer.StoredProcedure.sql | Bin 0 -> 2536 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBitmask.StoredProcedure.sql | Bin 0 -> 2020 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegion.StoredProcedure.sql | Bin 0 -> 1900 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionList.StoredProcedure.sql | Bin 0 -> 2050 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionView.StoredProcedure.sql | Bin 0 -> 2356 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionViewList.StoredProcedure.sql | Bin 0 -> 2514 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetDissectibleContent.StoredProcedure.sql | Bin 0 -> 2454 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetGenderList.StoredProcedure.sql | Bin 0 -> 1848 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerModel.StoredProcedure.sql | Bin 0 -> 3764 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerdata.StoredProcedure.sql | Bin 0 -> 3868 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetLexiconTermList.StoredProcedure.sql | Bin 0 -> 2106 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetNavigatorModel.StoredProcedure.sql | Bin 0 -> 2178 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetOverLayLayerList.StoredProcedure.sql | Bin 0 -> 2254 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetPLRModel.StoredProcedure.sql | Bin 0 -> 2644 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetPolygonForId.StoredProcedure.sql | Bin 0 -> 2286 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupId.StoredProcedure.sql | Bin 0 -> 1986 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupList.StoredProcedure.sql | Bin 0 -> 2034 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureList.StoredProcedure.sql | Bin 0 -> 2448 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermList.StoredProcedure.sql | Bin 0 -> 2308 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermNumberForContentId.StoredProcedure.sql | Bin 0 -> 2298 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientation.StoredProcedure.sql | Bin 0 -> 1904 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientationList.StoredProcedure.sql | Bin 0 -> 2054 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_GetVocabTermModal.StoredProcedure.sql | Bin 0 -> 2114 bytes 500-DBDump/AIA-StoredProcedures/dbo.DA_LayerNumberInternal.StoredProcedure.sql | Bin 0 -> 2210 bytes 500-DBDump/AIA-StoredProcedures/dbo.DeleteIncorrectLoginAttempts.StoredProcedure.sql | Bin 0 -> 1928 bytes 500-DBDump/AIA-StoredProcedures/dbo.DeleteLicense.StoredProcedure.sql | Bin 0 -> 6244 bytes 500-DBDump/AIA-StoredProcedures/dbo.DeleteUserSession.StoredProcedure.sql | Bin 0 -> 1588 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_CreateUser.StoredProcedure.sql | Bin 0 -> 16926 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetAccountTypeList.StoredProcedure.sql | Bin 0 -> 1848 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetCountryList.StoredProcedure.sql | Bin 0 -> 1796 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetCourseConductedList.StoredProcedure.sql | Bin 0 -> 1856 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetInstitutionList.StoredProcedure.sql | Bin 0 -> 1836 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetInternetProductList.StoredProcedure.sql | Bin 0 -> 1888 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetMultimediaProductList.StoredProcedure.sql | Bin 0 -> 1916 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetProductRequiredList.StoredProcedure.sql | Bin 0 -> 1864 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetReferList.StoredProcedure.sql | Bin 0 -> 1756 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSecurityQuestionList.StoredProcedure.sql | Bin 0 -> 1878 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetStateList.StoredProcedure.sql | Bin 0 -> 1744 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionDuration.StoredProcedure.sql | Bin 0 -> 2000 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionEndDate.StoredProcedure.sql | Bin 0 -> 2038 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlan.StoredProcedure.sql | Bin 0 -> 2374 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlanInfo.StoredProcedure.sql | Bin 0 -> 2624 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPrice.StoredProcedure.sql | Bin 0 -> 2042 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_GetUsername.StoredProcedure.sql | Bin 0 -> 1938 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_InsertPaymentTransaction.StoredProcedure.sql | Bin 0 -> 3314 bytes 500-DBDump/AIA-StoredProcedures/dbo.EC_UpdateUser.StoredProcedure.sql | Bin 0 -> 3562 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetAIALicenseDetails.StoredProcedure.sql | Bin 0 -> 9476 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetAccountModule.StoredProcedure.sql | Bin 0 -> 2322 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetAllEditionForLicense.StoredProcedure.sql | Bin 0 -> 2640 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetAllLoginFailureCauses.StoredProcedure.sql | Bin 0 -> 1910 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatus.StoredProcedure.sql | Bin 0 -> 1932 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatusWithSlug.StoredProcedure.sql | Bin 0 -> 2124 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetAllUserWithGroup.StoredProcedure.sql | Bin 0 -> 3190 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetAttributeTypeList.StoredProcedure.sql | Bin 0 -> 2662 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetAttributeValueList.StoredProcedure.sql | Bin 0 -> 2878 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.StoredProcedure.sql | Bin 0 -> 3604 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.sql | 39 +++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserId.StoredProcedure.sql | Bin 0 -> 3650 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserType.StoredProcedure.sql | Bin 0 -> 3560 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserDetailsByUserIdAndUserTypeId.StoredProcedure.sql | Bin 0 -> 4466 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetCAMSearch.StoredProcedure.sql | Bin 0 -> 3600 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetCancelledLicenses.StoredProcedure.sql | Bin 0 -> 13706 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetContentAttributeData.StoredProcedure.sql | Bin 0 -> 13518 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetContentList.StoredProcedure.sql | Bin 0 -> 2596 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary.StoredProcedure.sql | Bin 0 -> 15912 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_25042017.StoredProcedure.sql | Bin 0 -> 15558 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_bkp.StoredProcedure.sql | Bin 0 -> 15082 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.StoredProcedure.sql | Bin 0 -> 3482 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.sql | 42 ++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountDetails.StoredProcedure.sql | Bin 0 -> 3408 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountReport.StoredProcedure.sql | Bin 0 -> 6246 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountedPrice.StoredProcedure.sql | Bin 0 -> 4724 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetEditionsBySiteAccount.StoredProcedure.sql | Bin 0 -> 3044 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetEncyclopediaSearch.StoredProcedure.sql | Bin 0 -> 4208 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetExpiringLicenses.StoredProcedure.sql | Bin 0 -> 13414 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetExportedImageDetails.StoredProcedure.sql | Bin 0 -> 3670 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetImagePinData.StoredProcedure.sql | Bin 0 -> 5094 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetInDepthSearch.StoredProcedure.sql | Bin 0 -> 3838 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetIncorrectLoginAttempt.StoredProcedure.sql | Bin 0 -> 1946 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLabExcerciseByUserId.StoredProcedure.sql | Bin 0 -> 2698 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseByIPAndAccount.StoredProcedure.sql | Bin 0 -> 3958 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseBySiteId.StoredProcedure.sql | Bin 0 -> 3244 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailByUserId.StoredProcedure.sql | Bin 0 -> 2308 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailsById.StoredProcedure.sql | Bin 0 -> 2694 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdByUserId.StoredProcedure.sql | Bin 0 -> 1982 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdForUser.StoredProcedure.sql | Bin 0 -> 1936 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionsForModesty.StoredProcedure.sql | Bin 0 -> 3310 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdBySiteUrl.StoredProcedure.sql | Bin 0 -> 3716 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdByUserId.StoredProcedure.sql | Bin 0 -> 1334 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdEditionIdByUserId.StoredProcedure.sql | Bin 0 -> 2276 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetLoginFailureErrorReport.StoredProcedure.sql | Bin 0 -> 4492 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetModuleStatusByLicenseId.StoredProcedure.sql | Bin 0 -> 2324 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetModulesByUserId.StoredProcedure.sql | Bin 0 -> 3460 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetNetAdDetailReport.StoredProcedure.sql | Bin 0 -> 9236 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql | Bin 0 -> 14758 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetProductFeatures.StoredProcedure.sql | Bin 0 -> 2390 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSchedulerAlertEmail.StoredProcedure.sql | Bin 0 -> 4078 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSearchDetails.StoredProcedure.sql | Bin 0 -> 5176 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSearchTerms.StoredProcedure.sql | Bin 0 -> 4472 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.StoredProcedure.sql | Bin 0 -> 17858 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.sql | Bin 0 -> 17472 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSiteAccoutDetail.StoredProcedure.sql | Bin 0 -> 3366 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSiteIpByAccountNumber.StoredProcedure.sql | Bin 0 -> 3708 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSiteLicenseUsageReport.StoredProcedure.sql | Bin 0 -> 4460 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSubscribedLicenses.StoredProcedure.sql | Bin 0 -> 12752 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSubscriptionDetailsByLicenseId.StoredProcedure.sql | Bin 0 -> 2562 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetTermNumberData.StoredProcedure.sql | Bin 0 -> 3070 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetTermsAndConditions.StoredProcedure.sql | Bin 0 -> 1832 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetTermsOfServiceText.StoredProcedure.sql | Bin 0 -> 1872 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetThreeDHighLightData.StoredProcedure.sql | Bin 0 -> 3170 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoggedInUsersByLicenseIdAndEditionId.StoredProcedure.sql | Bin 0 -> 2062 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoginsByLicenseEditionId.StoredProcedure.sql | Bin 0 -> 2030 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport.StoredProcedure.sql | Bin 0 -> 11108 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport_OLD_PROC.StoredProcedure.sql | Bin 0 -> 11180 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUserByUserId.StoredProcedure.sql | Bin 0 -> 1694 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginId.StoredProcedure.sql | Bin 0 -> 2384 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginIdAndPassword.StoredProcedure.sql | Bin 0 -> 2642 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUserInGroup.StoredProcedure.sql | Bin 0 -> 3132 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUserInfoByEmailId.StoredProcedure.sql | Bin 0 -> 2228 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUserModulesByLicenseId.StoredProcedure.sql | Bin 0 -> 2470 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUserSessionDetails.StoredProcedure.sql | Bin 0 -> 2086 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUserTyeByAccountNumber.StoredProcedure.sql | Bin 0 -> 4412 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetUserlActivities.StoredProcedure.sql | Bin 0 -> 1824 bytes 500-DBDump/AIA-StoredProcedures/dbo.IncorrectLoginAttempt.StoredProcedure.sql | Bin 0 -> 1714 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertAIAUser.StoredProcedure.sql | Bin 0 -> 8096 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertDemoLicenseAccount.StoredProcedure.sql | Bin 0 -> 13726 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempt.StoredProcedure.sql | Bin 0 -> 3040 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempts.StoredProcedure.sql | Bin 0 -> 1586 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail.StoredProcedure.sql | Bin 0 -> 2150 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail_1.StoredProcedure.sql | Bin 0 -> 2144 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetailsInSessionManager.StoredProcedure.sql | Bin 0 -> 2002 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertLoginErrorLog.StoredProcedure.sql | Bin 0 -> 2244 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertNewDiscount.StoredProcedure.sql | Bin 0 -> 4538 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertNewLicenseAccount.StoredProcedure.sql | Bin 0 -> 15598 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertResellerLicenseAccount.StoredProcedure.sql | Bin 0 -> 17940 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertSingleLicenseAccount.StoredProcedure.sql | Bin 0 -> 15870 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertTestLicenseAccount.StoredProcedure.sql | Bin 0 -> 10854 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertUpdateSiteAccount.StoredProcedure.sql | Bin 0 -> 5594 bytes 500-DBDump/AIA-StoredProcedures/dbo.InsertUserSessionDetails.StoredProcedure.sql | Bin 0 -> 2352 bytes 500-DBDump/AIA-StoredProcedures/dbo.NewDeleteCommand.StoredProcedure.sql | Bin 0 -> 1428 bytes 500-DBDump/AIA-StoredProcedures/dbo.NewInsertCommand.StoredProcedure.sql | Bin 0 -> 1364 bytes 500-DBDump/AIA-StoredProcedures/dbo.NewUpdateCommand.StoredProcedure.sql | Bin 0 -> 1850 bytes 500-DBDump/AIA-StoredProcedures/dbo.StartResellerSubscription.StoredProcedure.sql | Bin 0 -> 2520 bytes 500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.StoredProcedure.sql | Bin 0 -> 2358 bytes 500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql | 43 +++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscount.StoredProcedure.sql | Bin 0 -> 3396 bytes 500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscountStatus.StoredProcedure.sql | Bin 0 -> 1768 bytes 500-DBDump/AIA-StoredProcedures/dbo.UpdateIncorrectLoginAttempts.StoredProcedure.sql | Bin 0 -> 2070 bytes 500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseAccount.StoredProcedure.sql | Bin 0 -> 14288 bytes 500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseModule.StoredProcedure.sql | Bin 0 -> 3486 bytes 500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseStatus.StoredProcedure.sql | Bin 0 -> 12348 bytes 500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseTermAcceptedStatus.StoredProcedure.sql | Bin 0 -> 2142 bytes 500-DBDump/AIA-StoredProcedures/dbo.UpdateUserPassword.StoredProcedure.sql | Bin 0 -> 2058 bytes 500-DBDump/AIA-StoredProcedures/dbo.UpdateUserProfile.StoredProcedure.sql | Bin 0 -> 2392 bytes 500-DBDump/AIA-StoredProcedures/dbo.getEditionData.StoredProcedure.sql | Bin 0 -> 944 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_DB_TblRowCOUNT.StoredProcedure.sql | Bin 0 -> 5086 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_DeleteSubscriptionPlan.StoredProcedure.sql | Bin 0 -> 2366 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.StoredProcedure.sql | Bin 0 -> 2056 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.sql | 33 +++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.StoredProcedure.sql | Bin 0 -> 2308 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.sql | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/dbo.usp_GetEditions.StoredProcedure.sql | Bin 0 -> 1796 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseById.StoredProcedure.sql | Bin 0 -> 7276 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseTypes.StoredProcedure.sql | Bin 0 -> 1846 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenses.StoredProcedure.sql | Bin 0 -> 9478 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.StoredProcedure.sql | Bin 0 -> 4558 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.sql | Bin 0 -> 3724 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.StoredProcedure.sql | Bin 0 -> 2304 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.sql | 34 ++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.StoredProcedure.sql | Bin 0 -> 17886 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.sql | Bin 0 -> 17490 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetSubscriptionPlans.StoredProcedure.sql | Bin 0 -> 2242 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.StoredProcedure.sql | Bin 0 -> 2236 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.sql | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.StoredProcedure.sql | Bin 0 -> 8124 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.sql | Bin 0 -> 7740 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_InsertSubscriptionPlan.StoredProcedure.sql | Bin 0 -> 2740 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.StoredProcedure.sql | Bin 0 -> 4274 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.sql | Bin 0 -> 3882 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateSubscriptionPlan.StoredProcedure.sql | Bin 0 -> 2762 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.StoredProcedure.sql | Bin 0 -> 3208 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.StoredProcedure.sql | Bin 0 -> 2646 bytes 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.sql | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserGroupController.cs | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserGroupModel.cs | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserModel.cs | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/mergecode.txt | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/usergroup.component.html | 204 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/usergroup.component.ts | 267 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/users.component.ts | 324 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_DeleteLicenseUserGroup.sql | 43 +++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_DeleteSiteAccount.sql | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_DeleteSubscriptionPlan.sql | Bin 0 -> 2196 bytes 500-DBDump/AIA-StoredProcedures/usp_GetAccountNumber.sql | 40 ++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_GetEditions.sql | Bin 0 -> 1666 bytes 500-DBDump/AIA-StoredProcedures/usp_GetLicenseById.sql | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_GetLicenseModestySettings.sql | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_GetLicenseTypes.sql | Bin 0 -> 1708 bytes 500-DBDump/AIA-StoredProcedures/usp_GetLicenseUserGroups.sql | 39 +++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_GetLicenses.sql | Bin 0 -> 9330 bytes 500-DBDump/AIA-StoredProcedures/usp_GetSiteAccountEditions.sql | 36 ++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_GetSiteById.sql | 39 +++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_GetSubscriptionPlans.sql | Bin 0 -> 2094 bytes 500-DBDump/AIA-StoredProcedures/usp_InsertDeleteUserManageRights.sql | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_InsertSubscriptionPlan.sql | Bin 0 -> 2574 bytes 500-DBDump/AIA-StoredProcedures/usp_InsertUpdateLicenseUserGroup.sql | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_InsertUpdateSiteAccount.sql | 107 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseBasicSettings.sql | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseModestySettings.sql | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseModuleStatus.sql | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseUserGroupUsers.sql | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 500-DBDump/AIA-StoredProcedures/usp_UpdateSubscriptionPlan.sql | Bin 0 -> 2592 bytes 238 files changed, 4388 insertions(+), 7 deletions(-) create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetManageRights.sql create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupController.cs create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupModel.cs create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserModel.cs create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/mergecode.txt create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.html create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.ts create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/users.component.ts create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteLicenseUserGroup.sql create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseUserGroups.sql create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertDeleteUserManageRights.sql create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateLicenseUserGroup.sql create mode 100644 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseUserGroupUsers.sql create mode 100644 400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs create mode 100644 400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseUserGroups_Result.cs create mode 100644 400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.ClearSessionManager.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBackGroundArtList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBaseLayer.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBitmask.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegion.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionView.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionViewList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetDissectibleContent.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetGenderList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerModel.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerdata.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetLexiconTermList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetNavigatorModel.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetOverLayLayerList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetPLRModel.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetPolygonForId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermNumberForContentId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientation.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientationList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_GetVocabTermModal.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DA_LayerNumberInternal.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DeleteIncorrectLoginAttempts.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DeleteLicense.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.DeleteUserSession.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_CreateUser.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetAccountTypeList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetCountryList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetCourseConductedList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetInstitutionList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetInternetProductList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetMultimediaProductList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetProductRequiredList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetReferList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSecurityQuestionList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetStateList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionDuration.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionEndDate.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlan.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlanInfo.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPrice.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_GetUsername.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_InsertPaymentTransaction.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.EC_UpdateUser.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetAIALicenseDetails.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetAccountModule.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetAllEditionForLicense.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetAllLoginFailureCauses.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatus.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatusWithSlug.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetAllUserWithGroup.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetAttributeTypeList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetAttributeValueList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserType.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserDetailsByUserIdAndUserTypeId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetCAMSearch.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetCancelledLicenses.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetContentAttributeData.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetContentList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_25042017.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_bkp.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountDetails.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountReport.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountedPrice.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetEditionsBySiteAccount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetEncyclopediaSearch.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetExpiringLicenses.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetExportedImageDetails.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetImagePinData.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetInDepthSearch.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetIncorrectLoginAttempt.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLabExcerciseByUserId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseByIPAndAccount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseBySiteId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailByUserId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailsById.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdByUserId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdForUser.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionsForModesty.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdBySiteUrl.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdByUserId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdEditionIdByUserId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetLoginFailureErrorReport.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetModuleStatusByLicenseId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetModulesByUserId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetNetAdDetailReport.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetProductFeatures.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetSchedulerAlertEmail.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetSearchDetails.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetSearchTerms.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetSiteAccoutDetail.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetSiteIpByAccountNumber.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetSiteLicenseUsageReport.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetSubscribedLicenses.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetSubscriptionDetailsByLicenseId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetTermNumberData.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetTermsAndConditions.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetTermsOfServiceText.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetThreeDHighLightData.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoggedInUsersByLicenseIdAndEditionId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoginsByLicenseEditionId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport_OLD_PROC.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUserByUserId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginIdAndPassword.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUserInGroup.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUserInfoByEmailId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUserModulesByLicenseId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUserSessionDetails.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUserTyeByAccountNumber.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.GetUserlActivities.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.IncorrectLoginAttempt.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertAIAUser.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertDemoLicenseAccount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempt.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempts.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail_1.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetailsInSessionManager.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertLoginErrorLog.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertNewDiscount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertNewLicenseAccount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertResellerLicenseAccount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertSingleLicenseAccount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertTestLicenseAccount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertUpdateSiteAccount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.InsertUserSessionDetails.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.NewDeleteCommand.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.NewInsertCommand.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.NewUpdateCommand.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.StartResellerSubscription.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscountStatus.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateIncorrectLoginAttempts.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseAccount.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseModule.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseStatus.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseTermAcceptedStatus.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateUserPassword.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.UpdateUserProfile.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.getEditionData.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_DB_TblRowCOUNT.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_DeleteSubscriptionPlan.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetEditions.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseById.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseTypes.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenses.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetSubscriptionPlans.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_InsertSubscriptionPlan.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateSubscriptionPlan.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.StoredProcedure.sql create mode 100644 500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserGroupController.cs create mode 100644 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserGroupModel.cs create mode 100644 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserModel.cs create mode 100644 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/mergecode.txt create mode 100644 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/usergroup.component.html create mode 100644 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/usergroup.component.ts create mode 100644 500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/users.component.ts create mode 100644 500-DBDump/AIA-StoredProcedures/usp_DeleteLicenseUserGroup.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_DeleteSiteAccount.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_DeleteSubscriptionPlan.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetAccountNumber.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetEditions.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetLicenseById.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetLicenseModestySettings.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetLicenseTypes.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetLicenseUserGroups.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetLicenses.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetSiteAccountEditions.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetSiteById.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetSubscriptionPlans.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_InsertDeleteUserManageRights.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_InsertSubscriptionPlan.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_InsertUpdateLicenseUserGroup.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_InsertUpdateSiteAccount.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseBasicSettings.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseModestySettings.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseModuleStatus.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseUserGroupUsers.sql create mode 100644 500-DBDump/AIA-StoredProcedures/usp_UpdateSubscriptionPlan.sql diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetManageRights.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetManageRights.sql new file mode 100644 index 0000000..80474e5 Binary files /dev/null and b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetManageRights.sql differ diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupController.cs b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupController.cs new file mode 100644 index 0000000..c4c2cd5 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupController.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using AIAHTML5.ADMIN.API.Models; +using System.Web.Http.Cors; +using System.Web.Cors; +using AIAHTML5.Server.Constants; +using log4net; +using System.Text; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Controllers +{ + [EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] + [RoutePrefix("UserGroup")] + public class UserGroupController : ApiController + { + AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities(); + + [Route("LicenseUserGroups")] + [HttpGet] + public HttpResponseMessage GetLicenseUserGroups(int LicenseId) + { + List UserGroupList = new List(); + try + { + UserGroupList = UserGroupModel.GetLicenseUserGroups(dbContext, LicenseId); + return Request.CreateResponse(HttpStatusCode.OK, UserGroupList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("LicenseUserGroupUsers")] + [HttpGet] + public HttpResponseMessage GetLicenseUserGroupUsers(int LicenseId, int UserGroupId) + { + List UserList = new List(); + try + { + UserList = UserGroupModel.GetLicenseUserGroupUsers(dbContext, LicenseId, UserGroupId); + return Request.CreateResponse(HttpStatusCode.OK, UserList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("InsertUpdateLicenseUserGroup")] + [HttpPost] + public HttpResponseMessage InsertUpdateLicenseUserGroup(JObject jsonData) + { + bool Status = false; + UserGroupModel UserGroupEntity = new UserGroupModel(); + UserGroupEntity.Id = jsonData["id"].Value(); + UserGroupEntity.LicenseId = jsonData["licenseId"].Value(); + UserGroupEntity.Title = jsonData["title"].Value(); + UserGroupEntity.IsActive = jsonData["isActive"].Value(); + UserGroupEntity.CreationDate = jsonData["creationDate"].Value(); + UserGroupEntity.ModifiedDate = jsonData["modifiedDate"].Value(); + try + { + Status = UserGroupModel.InsertUpdateLicenseUserGroup(dbContext, UserGroupEntity); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("UpdateLicenseUserGroupUsers")] + [HttpPost] + public HttpResponseMessage UpdateLicenseUserGroupUsers(JObject jsonData) + { + bool Status = false; + int UserGroupId = jsonData["userGroupId"].Value(); + string UserIds = jsonData["userIds"].Value(); + try + { + Status = UserGroupModel.UpdateLicenseUserGroupUsers(dbContext, UserGroupId, UserIds); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("DeleteLicenseUserGroup")] + [HttpGet] + public HttpResponseMessage DeleteLicenseUserGroup(int UserGroupId) + { + bool Status = false; + try + { + Status = UserGroupModel.DeleteLicenseUserGroup(dbContext, UserGroupId); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + } +} diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupModel.cs b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupModel.cs new file mode 100644 index 0000000..634d6c6 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserGroupModel.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Models +{ + public class UserGroupModel + { + public int Id { get; set; } + public int LicenseId { get; set; } + public string Title { get; set; } + public DateTime? CreationDate { get; set; } + public DateTime? ModifiedDate { get; set; } + public bool? IsActive { get; set; } + public int? TotalUsers { get; set; } + + public static List GetLicenseUserGroups(AIADatabaseV5Entities dbContext, int LicenseId) + { + List UserGroupList = new List(); + UserGroupModel UserGroupObj = new UserGroupModel(); + try + { + var result = dbContext.usp_GetLicenseUserGroups(LicenseId).ToList(); + foreach (var item in result) + { + UserGroupObj = new UserGroupModel(); + UserGroupObj.Id = item.Id; + UserGroupObj.LicenseId = item.LicenseId; + UserGroupObj.Title = item.Title; + UserGroupObj.IsActive = item.IsActive; + UserGroupObj.ModifiedDate = item.ModifiedDate; + UserGroupObj.CreationDate = item.CreationDate; + UserGroupObj.TotalUsers = item.TotalUsers; + UserGroupList.Add(UserGroupObj); + } + } + catch (Exception ex) { } + return UserGroupList; + } + + public static List GetLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int LicenseId, int UserGroupId) + { + List UserList = new List(); + UserModel UserModelObj = new UserModel(); + try + { + var result = dbContext.GetAllUserWithGroup(LicenseId, UserGroupId).ToList(); + foreach (var item in result) + { + UserModelObj = new UserModel(); + UserModelObj.Id = item.Id; + UserModelObj.FirstName = item.FirstName; + UserModelObj.LastName = item.LastName; + UserModelObj.LoginId = item.LoginId; + UserModelObj.EmailId = item.EmailId; + UserModelObj.ProductEdition = item.Title; + UserModelObj.InGroup = item.InGroup; + UserList.Add(UserModelObj); + } + } + catch (Exception ex) { } + return UserList; + } + + public static bool InsertUpdateLicenseUserGroup(AIADatabaseV5Entities dbContext, UserGroupModel UserGroupEntity) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_InsertUpdateLicenseUserGroup(UserGroupEntity.Id, UserGroupEntity.LicenseId, UserGroupEntity.Title, + UserGroupEntity.CreationDate, UserGroupEntity.ModifiedDate, UserGroupEntity.IsActive, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + public static bool UpdateLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int UserGroupId, string UserIds) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_UpdateLicenseUserGroupUsers(UserGroupId, UserIds, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + public static bool DeleteLicenseUserGroup(AIADatabaseV5Entities dbContext, int UserGroupId) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_DeleteLicenseUserGroup(UserGroupId, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + } + +} \ No newline at end of file diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserModel.cs b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserModel.cs new file mode 100644 index 0000000..f73ebbf --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/UserModel.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Models +{ + public class UserModel + { + public int Id { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string EmailId { get; set; } + public string LoginId { get; set; } + public string NewLoginId { get; set; } + public string Password { get; set; } + public int SecurityQuestionId { get; set; } + public string SecurityAnswer { get; set; } + public int CreatorId { get; set; } + public DateTime CreationDate { get; set; } + public DateTime DeactivationDate { get; set; } + public int ModifierId { get; set; } + public DateTime ModifiedDate { get; set; } + public int UserTypeId { get; set; } + public bool IsActive { get; set; } + public string ProductEdition { get; set; } + public int InGroup { get; set; } + + public static bool UpdateUserProfile(AIADatabaseV5Entities dbContext, int intUserID, string strFirstName, string strLastName, string strEmailID) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.UpdateUserProfile(intUserID, strFirstName, strLastName, strEmailID, spStatus); + if (spStatus.Value.ToString() == "1") + { + return true; + } + else + { + return false; + } + } + catch (Exception ex) + { + return false; + } + } + public static bool UpdateUserPassword(AIADatabaseV5Entities dbContext, int intUserID, string newPassword) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.UpdateAiaUserPassword(intUserID, newPassword, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + public static string UpdateUserId(AIADatabaseV5Entities dbContext, int id, string userId, string oldUserId) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_UpdateUserId(id, userId, oldUserId, spStatus); + if (spStatus.Value.ToString() == "1") + { + // return "success"; + return "1"; + } + else if (spStatus.Value.ToString() == "2") + { + return "2"; + // return "Already Exist Userid"; + } + else + { + return "fail"; + } + } + catch (Exception ex) + { + return ex.Message; + } + } + } +} \ No newline at end of file diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/mergecode.txt b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/mergecode.txt new file mode 100644 index 0000000..434a2f5 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/mergecode.txt @@ -0,0 +1,62 @@ +//user.service.ts + + GetLicenseUserGroups(licensId: number) { + return this.http.get(this.commonService.resourceBaseUrl + "UserGroup/LicenseUserGroups?LicenseId=" + licensId) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + GetLicenseUserGroupUsers(licensId: number, UserGroupId: number) { + return this.http.get(this.commonService.resourceBaseUrl + "UserGroup/LicenseUserGroupUsers?LicenseId=" + licensId + "&UserGroupId=" + UserGroupId) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + InsertUpdateLicenseUserGroup(obj: any) { + //let options = new RequestOptions({ headers: this.headers }); + var jsonData = {'id': obj.id, 'licenseId': obj.licenseId, 'creationDate': obj.creationDate, 'modifiedDate': obj.modifiedDate, 'title': obj.title, 'isActive': obj.isActive }; + var headers = new Headers({ + 'Content-Type': 'application/json' + }); + return this.http.post(this.commonService.resourceBaseUrl + "UserGroup/InsertUpdateLicenseUserGroup", + JSON.stringify(jsonData), {headers: headers}) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + UpdateLicenseUserGroupUsers(userGroupId: number, userIds: string) { + //let options = new RequestOptions({ headers: this.headers }); + var jsonData = {'userGroupId': userGroupId, 'userIds': userIds }; + var headers = new Headers({ + 'Content-Type': 'application/json' + }); + return this.http.post(this.commonService.resourceBaseUrl + "UserGroup/UpdateLicenseUserGroupUsers", + JSON.stringify(jsonData), {headers: headers}) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + DeleteLicenseUserGroup(userGroupId: number) { + return this.http.get(this.commonService.resourceBaseUrl + "UserGroup/DeleteLicenseUserGroup?UserGroupId=" + userGroupId) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); +} + + +//app.routing.module + +import { UserGroup } from './components/UserEntity/usergroup.component'; + + + { path: 'usergroup', component: UserGroup } + + +//app.module.ts + +import { UserGroup } from './components/UserEntity/usergroup.component'; + +UserGroup + +//app.component.html + +
  • User Group
  • diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.html b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.html new file mode 100644 index 0000000..9de3fd8 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.html @@ -0,0 +1,204 @@ + +
    + +
    +

    {{mode}} User Group

    +
    + + + + + + + + + + + + + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    Group NameNumber of User(s)Created DateLast Modified Date
    + {{item.Title}} + {{item.TotalUsers}}{{item.CreationDate | date: 'MM/dd/yyyy'}}{{item.ModifiedDate | date: 'MM/dd/yyyy'}}
    +
    + +
    +
    + + + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    User group name is required
    +
    +
    +
    +
    +
    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + +
    SelectFirst NameLast NameUser IDEmail IDProduct Edition
    + + + {{item.FirstName}}{{item.LastName}}{{item.UserId}}{{item.EmailId}}{{item.ProductEdition}}
    + +
    + +
    +
    + + +
    +
    + +
    + +
    + +
    +
    +
    + \ No newline at end of file diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.ts b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.ts new file mode 100644 index 0000000..22449dd --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/usergroup.component.ts @@ -0,0 +1,267 @@ +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core'; +import { UserService } from './user.service'; +import { Router, ActivatedRoute } from '@angular/router'; +import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { License } from '../UserEntity/datamodel'; +import { BsDatepickerModule } from 'ngx-bootstrap'; +import { Http, Response } from '@angular/http'; +import { DatePipe } from '@angular/common'; +import { BsModalService } from 'ngx-bootstrap/modal'; +import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; + +declare var $:any; + +@Component({ + templateUrl: './usergroup.component.html' +}) + +export class UserGroup implements OnInit { + + lstAccountNumbers: any; + lstLicenseUserGroups: any; + licenseUserGroup: any; + lstLicenseUserGroupUsers: any; + lstAllUsers: any; + mode: string = 'Search'; + license: License; + updateUserGroupFrm: FormGroup; + error: any; + alerts: string; + modalAlerts: string; + divClass: string = ''; + topPos: string = '2000px'; + selectedRow: number = 0; + selectedId: number = 0; + modalRef: BsModalRef; + checkedRecords: Array; + + constructor(private userService: UserService, private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder, private modalService: BsModalService) { } + + ngOnInit(): void + { + this.selectedRow = 0; + this.divClass = 'col-sm-12'; + this.license = new License(); + this.alerts = ''; + this.updateUserGroupFrm = this.fb.group({ + userGroupName: ['', Validators.required], + }); + this.GetLicenseAccounts(); + + $('#fixed_hdr2').fxdHdrCol({ + fixedCols: 0, + width: "100%", + height: 330, + colModal: [ + { width: 80, align: 'center' }, + { width: 200, align: 'center' }, + { width: 200, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 250, align: 'Center' }, + ], + sort: true + }); + if(document.getElementById("fixed_table_rc") != undefined){ + document.getElementById("fixed_table_rc").remove(); + } + var testScript = document.createElement("script"); + testScript.setAttribute("id", "fixed_table_rc"); + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); + testScript.setAttribute("type", "text/javascript"); + document.body.appendChild(testScript); + } + + openModal(template: TemplateRef) { + this.modalRef = this.modalService.show(template); + } + + onChange(Idx: number, Id: number, isChecked: boolean){ + if(isChecked){ + this.checkedRecords[Idx] = Id; + } + else{ + this.checkedRecords[Idx] = 0; + } + } + + SetClickedRow(i: number, item: any) { + this.selectedRow = i; + this.selectedId = item['Id']; + this.licenseUserGroup = item; + } + + BindFormFields(data){ + this.lstLicenseUserGroups = data; + this.licenseUserGroup = this.lstLicenseUserGroups[this.selectedRow]; + this.selectedId = this.licenseUserGroup['Id']; + } + + BindUserFormFields(data){ + this.lstLicenseUserGroupUsers = data; + if(this.mode == 'Edit'){ + this.checkedRecords = new Array(this.lstLicenseUserGroupUsers.length); + for (let i = 0; i < this.lstLicenseUserGroupUsers.length ; i++) { + if(this.lstLicenseUserGroupUsers[i].InGroup > 0){ + this.checkedRecords[i] = this.lstLicenseUserGroupUsers[i].Id; + } + } + } + else{ + this.lstLicenseUserGroupUsers = this.lstLicenseUserGroupUsers.filter(C => C.InGroup> 0); + } + } + + GetLicenseAccounts() { + this.userService.GetAccountNumber() + .subscribe(st => { this.lstAccountNumbers = st; }, error => this.error = error); + } + + GetLicenseUserGroups() { + this.alerts = ''; + this.userService.GetLicenseUserGroups(this.license.LicenseId) + .subscribe(st => { this.BindFormFields(st); }, error => this.error = error); + } + + GetLicenseUserGroupUsers() { + this.alerts = ''; + this.userService.GetLicenseUserGroupUsers(this.license.LicenseId, this.selectedId) + .subscribe(st => { this.BindUserFormFields(st); }, error => this.error = error); + } + + AccountNumberChanged(LicenseId: number){ + this.license.LicenseId = LicenseId; + this.lstLicenseUserGroups = null; + this.GetLicenseUserGroups(); + } + + AfterDeleteData(data, template) { + if (data.Status == "false") { + this.alerts = "License user group delete unsuccessfull"; + } else { + this.modalAlerts = "

    License user group deleted successfully

    "; + this.modalRef = this.modalService.show(template); + this.GetLicenseUserGroups(); + } + } + + AfterInsertData(data, template) { + if (data.Status == "false") { + this.alerts = "License user group save unsuccessfull"; + } else { + this.modalAlerts = "

    License user group saved successfully

    "; + this.modalRef = this.modalService.show(template); + this.GetLicenseUserGroups(); + } + } + + AfterUpdateData(data, template) { + if (data.Status == "false") { + this.alerts = "License user group update unsuccessfull"; + } else { + this.modalAlerts = "

    License user group updated successfully

    "; + this.modalRef = this.modalService.show(template); + this.GetLicenseUserGroups(); + } + } + + InsertLicenseUserGroup(title: string, template: TemplateRef) { + this.alerts = ''; + if(title == '' || title == undefined){ + this.alerts = "Please enter a name for user group."; + return; + } + var obj = { + 'id': 0, 'licenseId': this.license.LicenseId, 'title': title, + 'isActive': true, 'creationDate': new Date(), + 'modifiedDate': new Date() + }; + if(this.alerts == ''){ + return this.userService.InsertUpdateLicenseUserGroup(obj) + .subscribe( + n => (this.AfterInsertData(n, template)), + error => this.error = error); + } + } + + UpdateLicenseUserGroup(template: TemplateRef) { + this.alerts = ''; + var obj = { + 'id': this.licenseUserGroup.Id, + 'licenseId': this.license.LicenseId, + 'title': this.updateUserGroupFrm.controls['userGroupName'].value, + 'isActive': this.licenseUserGroup.IsActive, + 'creationDate': this.licenseUserGroup.CreationDate, + 'modifiedDate': this.licenseUserGroup.ModifiedDate + }; + if(this.alerts == ''){ + return this.userService.InsertUpdateLicenseUserGroup(obj) + .subscribe( + n => ( + this.UpdateLicenseUserGroupUsers(template) + ), + error => this.error = error); + } + } + + UpdateLicenseUserGroupUsers(template: TemplateRef) { + var userIds = ''; + this.checkedRecords.filter(C => C > 0).forEach(element => { + if(element > 0){ + userIds += element + ','; + } + }); + if(userIds!=''){ + userIds = userIds.substr(0, userIds.length - 1); + } + return this.userService.UpdateLicenseUserGroupUsers(this.selectedId, userIds) + .subscribe( + n => ( + this.AfterUpdateData(n, template) + ), + error => this.error = error); + } + + DeleteLicenseUserGroup(template: TemplateRef){ + this.modalRef.hide(); + this.alerts = ''; + if(this.selectedId == 0){ + this.alerts = "Please select a license user group"; + } + if(this.alerts == ''){ + return this.userService.DeleteLicenseUserGroup(this.selectedId) + .subscribe( + data => (this.AfterDeleteData(data, template)), + error => { + this.error = error; + this.alerts = "License user group delete unsuccessfull"; + }); + } + } + + EditLicenseUserGroup(){ + $('.ft_r thead tr th:eq(0)').show(); + this.mode = 'Edit'; + this.topPos = '100px'; + this.alerts = ''; + this.updateUserGroupFrm.controls['userGroupName'].setValue(this.licenseUserGroup.Title); + this.GetLicenseUserGroupUsers(); + } + + ViewLicenseUserGroup(){ + $('.ft_r thead tr th:eq(0)').hide(); + this.mode = 'View'; + this.topPos = '100px'; + this.alerts = ''; + this.updateUserGroupFrm.controls['userGroupName'].setValue(this.licenseUserGroup.Title); + this.GetLicenseUserGroupUsers(); + } + + CancelAddEdit(){ + this.mode = 'Search'; + this.topPos = '2000px'; + this.GetLicenseUserGroups(); + this.selectedRow = this.lstLicenseUserGroups.findIndex(C => C.Id == this.selectedId); + this.SetClickedRow(this.selectedRow, this.lstLicenseUserGroups.find(C => C.Id == this.selectedId)); + } +} diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/users.component.ts b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/users.component.ts new file mode 100644 index 0000000..aa39cec --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usergroupmergecode/usergroupmergecode/users.component.ts @@ -0,0 +1,324 @@ +import { Component, OnInit, AfterViewInit,ViewChild } from '@angular/core'; +import { UserService } from './user.service'; +import { Router } from '@angular/router'; +import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { User } from '../UserEntity/datamodel'; +import { UserManageRightsModel } from '../UserEntity/datamodel'; +import { Http, Response } from '@angular/http'; +//import { Global } from '../../Shared/global'; +//import { DBOperation } from 'S'; +import { Observable } from 'rxjs/Observable'; +import { ConfirmService } from '../../Shared/Confirm/confirm.service'; +import 'rxjs/Rx'; +import 'rxjs/add/operator/map'; +import 'rxjs/add/operator/filter'; +import { LoadingService } from '../../shared/loading.service'; +declare var $: any; +import { DatePipe } from '@angular/common'; +import { GlobalService } from '../../Shared/global'; +@Component({ + templateUrl:'./users.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html' +}) + +export class UsersList implements OnInit { + + Mode: string = 'Manage'; + modalTitle: string; + Users: FormGroup; + adduserFrm: FormGroup; + managerightFrm: FormGroup; + alerts: string; + public UserTypeList: any; + public AccountTypeList: any; + public UserList: any; + public UserManageRightsList: Array; + emailPattern = "^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"; + public UserTypeListByLicense: any; + public AccountNumberList: any; + public ProductEditionList: any; + UserEntity: User; + public UserManageRightsEntity: UserManageRightsModel; + topPos: string = '2000px'; + datePipe: DatePipe = new DatePipe('en-US'); + error; + selectedRow: number = 0; + selectedId: number = 0; + divClass: string; + isActive: boolean; + NoRecord: string; + //@ViewChild("profileModal") + //profileModal: ModalComponent; + //errorMessage: any; + constructor(private _loadingService: LoadingService,private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http, + private _confirmService: ConfirmService,private global:GlobalService + ) { } + + ngOnInit(): void { + this.modalTitle = 'LIST USER'; + this.alerts = ''; + this.NoRecord = this.global.NoRecords; + this.Users = this.fb.group({ + FirstName:[''], + LastName: [''], + EmailId: [''], + AccountNumber: [''], + UserTypeId: [0], //bug#28162 + AccountTypeId: [0] + // Gender: ['', Validators.required], + // Email: [''] + + }); + this.adduserFrm = this.fb.group({ + id: [''], + UserName: ['', Validators.required], + Password: ['', [Validators.required, Validators.minLength(8)]], + ConfirmPassword: ['', Validators.required], + FirstName: ['', Validators.required], + LastName: ['', Validators.required], + EmailId: ['', Validators.required], + AccountNumber: [''], + UserType: [''], + AccountType: [''], + Createddate: [''], + LastModifiedDate: [''], + Createdby: [''], + Modifiedby: [''], + DeactivationDate: [''], + isActive: [false], + UserStatusActive: ['false'], + UserStatusInActive:[''] + }); + this.managerightFrm = this.fb.group({ + id: [''], + UserTypeTitle: [''] + }); + this._loadingService.ShowLoading("global-loading"); + this.GetUserType(); + this.GetAccountType(); + this._loadingService.HideLoading("global-loading"); + $('#fixed_hdr2').fxdHdrCol({ + fixedCols: 0, + width: "100%", + height: 300, + colModal: [ + { width: 180, align: 'center' }, + { width: 230, align: 'center' }, + { width: 150, align: 'Center' }, + { width: 150, align: 'Center' }, + { width: 350, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 130, align: 'Center' }, + { width: 120, align: 'center' }, + { width: 280, align: 'Center' }, + { width: 180, align: 'center' }, + { width: 200, align: 'center' }, + { width: 170, align: 'center' }, + { width: 80, align: 'center' }, + { width: 150, align: 'center' }, + { width: 150, align: 'center' }, + { width: 180, align: 'Center' }, + { width: 400, align: 'Center' }, + { width: 150, align: 'center' }, + { width: 110, align: 'center' }, + ], + sort: true + }); + document.getElementById("fixed_table_rc").remove(); + var testScript = document.createElement("script"); + testScript.setAttribute("id", "fixed_table_rc"); + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); + testScript.setAttribute("type", "text/javascript"); + document.body.appendChild(testScript); + this._loadingService.ShowLoading("global-loading"); + //this.bindUsers(); + this._loadingService.HideLoading("global-loading"); + + //this.GetUserList(); + } + handleChange(evt) { + debugger; + var target = evt.target; + if (target.value == 'true') { + this.isActive = true; + } + else if (target.value == 'false') { + this.isActive = false; + } + } + + public SetClickedRow(i: number, item: any) { + this.selectedRow = i; + this.selectedId = item['Id']; + this.UserEntity = item; + } + public SetClickedRowManageRight(j: number, item: any) { + this.selectedRow = j; + this.selectedId = item['Id']; + this.UserManageRightsList = item; + } + redirect() { + this.router.navigate(['/']); + } + + GetUserType() { + this.userservice.GetUserType().subscribe(x => { this.UserTypeList = x; }, error => this.error = error); + } + GetAccountType() { + this.userservice.GetAccountType().subscribe(x => { this.AccountTypeList = x; }, error => this.error = error); + } + GetUserList() { + //this.userservice.GetUserList().subscribe(x => { this.UserList = x; }, error => this.error = error); + } + GetUserRights() { + this.userservice.GetManageUserRights({ + UserId: this.managerightFrm.controls['id'].value, + UserType: this.managerightFrm.controls['UserTypeTitle'].value + }) + .subscribe(x => { console.log(x); this.UserManageRightsList = x }, error => { + this.error = error; + this.alerts = "" + this.error + ""; + }); + } + SearchUserList(this) + { + this._loadingService.ShowLoading("global-loading"); + var UserFilterControl = this.Users.value; + this.userservice.GetUserList( + { + FirstName: this.Users.controls['FirstName'].value, + LastName: this.Users.controls['LastName'].value, + EmailId: this.Users.controls['EmailId'].value, + AccountNumber: this.Users.controls['AccountNumber'].value, + UserTypeId: (this.Users.controls['UserTypeId'].value != null && this.Users.controls['UserTypeId'].value !='' ? this.Users.controls['UserTypeId'].value:0), + AccountTypeId: (this.Users.controls['AccountTypeId'].value != null && this.Users.controls['AccountTypeId'].value != ''? this.Users.controls['AccountTypeId'].value : 0), + + + }) + + .subscribe(x => { this.BindFormFields(x) }, error => this.error = error); + + } + BindFormFields(data) { + this.UserList = data; + if (this.UserList.length > 0) { + this.NoRecord = ''; + this._loadingService.HideLoading("global-loading"); + } + if (this.UserList.length == 0) { + this.NoRecord = this.global.NoRecords; + this._loadingService.HideLoading("global-loading"); + } + } + EditUser() { + debugger; + this.Mode = 'Edit'; + this.modalTitle = 'Edit USER'; + this.topPos = '100px'; + this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; + this.alerts = ''; + this.adduserFrm.controls['id'].setValue(this.UserEntity.Id) + this.adduserFrm.controls['FirstName'].setValue(this.UserEntity.FirstName) + this.adduserFrm.controls['LastName'].setValue(this.UserEntity.LastName) + this.adduserFrm.controls['EmailId'].setValue(this.UserEntity.EmailId) + this.adduserFrm.controls['UserName'].setValue(this.UserEntity.LoginId) + this.adduserFrm.controls['Password'].setValue(this.UserEntity.Password) + this.adduserFrm.controls['ConfirmPassword'].setValue(this.UserEntity.Password) + this.adduserFrm.controls['AccountNumber'].setValue(this.UserEntity.AccountNumber) + this.adduserFrm.controls['UserType'].setValue(this.UserEntity.UserTypeTitle) + this.adduserFrm.controls['AccountType'].setValue(this.UserEntity.AccountTypeTitle) + this.adduserFrm.controls['Createddate'].setValue(this.datePipe.transform(this.UserEntity.CreationDate, 'MM/dd/yyyy')) + this.adduserFrm.controls['LastModifiedDate'].setValue(this.datePipe.transform(this.UserEntity.ModifiedDate, 'MM/dd/yyyy')) + this.adduserFrm.controls['Createdby'].setValue(this.UserEntity.Createdby) + this.adduserFrm.controls['Modifiedby'].setValue(this.UserEntity.Modifiedby) + this.adduserFrm.controls['DeactivationDate'].setValue(this.datePipe.transform(this.UserEntity.DeactivationDate, 'MM/dd/yyyy')) + if (this.UserEntity.UserStatus == 'Active') { + this.adduserFrm.controls['UserStatusActive'].setValue('true') + } + else { + this.adduserFrm.controls['UserStatusActive'].setValue('false') + } + //this.adduserFrm.controls['UserStatusActive'].setValue(true) + //this.adduserFrm.controls['UserStatusInActive'].setValue(false) + this.isActive = (this.UserEntity.UserStatus=='Active'?true :false) + + } + + EditManageUserRights() { + this.Mode = 'ManageRight'; + this.modalTitle = 'MANAGE USER Right'; + this.topPos = '100px'; + this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; + this.alerts = ''; + this.managerightFrm.controls['id'].setValue(this.UserEntity.Id); + this.managerightFrm.controls['UserTypeTitle'].setValue(this.UserEntity.UserTypeTitle); + this.GetUserRights(); + } + + public UpdateUser(this) { + this.alerts = ''; + if (this.adduserFrm.value.UserName == '') { + this.alerts += 'User Name is required.'; + } + if (this.adduserFrm.value.Password == '') { + this.alerts += '
    Password of minimum 8 characters is required.'; + } + if (this.adduserFrm.value.ConfirmPassword == '') { + this.alerts += '
    Confirm Password is required.'; + } + if (this.adduserFrm.value.EmailId == '') { + this.alerts += '
    Email Id is required.'; + } + if (this.adduserFrm.value.FirstName == '') { + this.alerts += '
    First Name is required.'; + } + if (this.adduserFrm.value.LastName == '') { + this.alerts += '
    Last Name is required.'; + } + if (this.adduserFrm.value.newPassword != this.adduserFrm.value.confirmPassword) { + this.alerts += '
    Password and confirm password must be same'; + } + + if (this.adduserFrm.valid && this.alerts == '') { + this.adduserFrm.controls['isActive'].setValue(this.adduserFrm.value.UserStatusActive) + + var UserEntity = this.adduserFrm.value; + + return this.userservice.UpdateUserEntity(UserEntity) + .subscribe( + n => (this.AfterInsertData(n)), + error => { + this.error = error; + this.alerts = "" + this.error + ""; + }); + } + + } + + //public DeleteUnblockedUser(this) { + // this.alerts = ''; + //} + + AfterInsertData(data) { + + if (data == "User updated successfully") { + this.alerts = ''; + this._confirmService.activate("User updated successfully.", "alertMsg"); + } + //if (this.closeflag) { + // this.close.emit(null); + //} + //else { + //} + } + + ResetFormFields() { + //this.ChangeUserIdFrm.reset() + //this.ChangeUserIdFrm.controls['id'].setValue(this.user.Id) + //this.ChangeUserIdFrm.controls['loginid'].setValue(this.user.LoginId) + //this.ChangeUserIdFrm.controls['newloginid'].setValue('') + //this.ChangeUserIdFrm.controls['confirmloginid'].setValue('') + this.alerts = ''; + } + +} diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteLicenseUserGroup.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteLicenseUserGroup.sql new file mode 100644 index 0000000..194927e --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteLicenseUserGroup.sql @@ -0,0 +1,43 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_DeleteLicenseUserGroup]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_DeleteLicenseUserGroup] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 14-Feb-2018 +-- Description: To insert or update a user group users of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_DeleteLicenseUserGroup] + -- Add the parameters for the stored procedure here + @UserGroupId int, @Status bit out +AS +BEGIN +SET NOCOUNT ON; + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + + delete from UserGroupToAIAUser where UserGroupId = @UserGroupId; + delete from UserGroup where Id = @UserGroupId; + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseUserGroups.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseUserGroups.sql new file mode 100644 index 0000000..dd827a2 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseUserGroups.sql @@ -0,0 +1,39 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetLicenseUserGroups]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetLicenseUserGroups] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 09-Feb-2018 +-- Description: To get all user groups of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_GetLicenseUserGroups] + -- Add the parameters for the stored procedure here + @LicenseId int +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + -- Insert statements for procedure here + select UG.*, UGU.TotalUsers from UserGroup UG left outer join + (select count(*) as TotalUsers, UserGroupId from UserGroupToAIAUser + group by UserGroupId) UGU on UG.Id = UGU.UserGroupId where UG.LicenseId = @LicenseId; + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + + + + diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertDeleteUserManageRights.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertDeleteUserManageRights.sql new file mode 100644 index 0000000..948e99b --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertDeleteUserManageRights.sql @@ -0,0 +1,58 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_InsertDeleteUserManageRights]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_InsertDeleteUserManageRights] +GO + +-- ==================================================== +-- Author: Ebix +-- Create date: 12-Feb-2018 +-- Description: To delete and insert User Rights +-- ==================================================== +create PROCEDURE [dbo].[usp_InsertDeleteUserManageRights] + -- Add the parameters for the stored procedure here + @RoleName varchar(50),@ActivityId int, @UserId int,@RequestType varchar(20), + @Status bit out +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. +SET NOCOUNT ON; +declare @RoleId int; +declare @ParentId int; +Set @RoleId=(Select Id From UserType WHere Title=@RoleName); +set @ParentId=(select top 1 ParentId FROM Activity WHERE id =@ActivityId) + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + if(@RequestType='insert') + Begin + INSERT INTO AIAUserActivity(UserId,RoleId,ActivityId) + Select @UserId,@RoleId,Id from Activity Where ParentId=@ActivityId and IsActive=1 + End; + if(@RequestType='Remove') + begin + DELETE FROM AIAUserActivity + WHERE UserId = @UserId AND RoleId = @RoleId AND ActivityId IN (SELECT id FROM Activity WHERE ParentId=@ActivityId ) + end + + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateLicenseUserGroup.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateLicenseUserGroup.sql new file mode 100644 index 0000000..5f216a3 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateLicenseUserGroup.sql @@ -0,0 +1,47 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_InsertUpdateLicenseUserGroup]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_InsertUpdateLicenseUserGroup] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 12-Feb-2018 +-- Description: To insert or update a user group of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_InsertUpdateLicenseUserGroup] + -- Add the parameters for the stored procedure here + @Id int, @LicenseId int, @Title varchar(100), @CreationDate datetime, @ModifiedDate datetime, @IsActive bit, @Status bit out +AS +BEGIN + + SET NOCOUNT ON; + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + if(@Id = 0) + begin + insert into UserGroup(LicenseId, Title, CreationDate, ModifiedDate, IsActive) values(@LicenseId, @Title, @CreationDate, @ModifiedDate, @IsActive); + end + else + begin + update UserGroup set Title = @Title, CreationDate = @CreationDate, ModifiedDate = @ModifiedDate, @IsActive = @IsActive where Id = @Id; + end + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseUserGroupUsers.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseUserGroupUsers.sql new file mode 100644 index 0000000..8797db8 --- /dev/null +++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseUserGroupUsers.sql @@ -0,0 +1,63 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseUserGroupUsers]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_UpdateLicenseUserGroupUsers] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 14-Feb-2018 +-- Description: To insert or update a user group users of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_UpdateLicenseUserGroupUsers] + -- Add the parameters for the stored procedure here + @UserGroupId int, @UserIds varchar(2000), @Status bit out +AS +BEGIN +SET NOCOUNT ON; + +DECLARE @pos INT, @tempUserId int; +DECLARE @len INT; +DECLARE @value varchar(10); + +if(@UserIds != '') +begin + set @UserIds = @UserIds + ','; +end + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + + delete UGU from UserGroupToAIAUser UGU where UserGroupId = @UserGroupId; + + set @pos = 0 + set @len = 0 + + WHILE CHARINDEX(',', @UserIds, @pos+1)>0 + BEGIN + set @len = CHARINDEX(',', @UserIds, @pos+1) - @pos; + set @value = SUBSTRING(@UserIds, @pos, @len); + set @tempUserId = convert(int, @value); + insert into UserGroupToAIAUser(UserGroupId, UserId) values(@UserGroupId, @tempUserId); + set @pos = CHARINDEX(',', @UserIds, @pos+@len) + 1; + END + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj b/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj index 739f66e..6f1085d 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj @@ -167,6 +167,7 @@ + AIADBEntity.tt @@ -731,6 +732,9 @@ AIADBEntity.tt + + AIADBEntity.tt + AIADBEntity.tt @@ -791,6 +795,7 @@ + diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs index f4ef93f..db89e2b 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs @@ -16,7 +16,7 @@ using AIAHTML5.ADMIN.API.Entity; namespace AIAHTML5.ADMIN.API.Controllers { - //[EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] + // [EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] [RoutePrefix("User")] public class UserController : ApiController @@ -211,7 +211,69 @@ namespace AIAHTML5.ADMIN.API.Controllers throw new HttpResponseException(message); } } - + + [Route("InsertDeleteUserManageRights")] + [HttpPost] + public HttpResponseMessage InsertDeleteUserManageRights(JObject jsonUserData) + { + bool Status = false; + var jsonString = jsonUserData; + try + { + int UserId = 0; + string RoleName = string.Empty; + List CheckedUserRights = new List(); + List UnCheckedUserRights = new List(); + foreach (var item in jsonUserData) + { + if(item.Key=="UserId") + { + UserId = Convert.ToInt32(item.Value); + } + else if (item.Key == "UserType") + { + RoleName = item.Value.ToString(); + } + else if (item.Key == "CheckedUserRights") + { + JArray jsonVal = JArray.Parse(item.Value.ToString()) as JArray; + dynamic CheckedUserRightsList = jsonVal; + foreach (dynamic itemCheckedUserRights in CheckedUserRightsList) + { + CheckedUserRights.Add(Convert.ToInt32(itemCheckedUserRights)); + } + } + else if (item.Key == "UnCheckedUserRights") + { + JArray jsonVal = JArray.Parse(item.Value.ToString()) as JArray; + dynamic CheckedUserRightsList = jsonVal; + foreach (dynamic itemCheckedUserRights in CheckedUserRightsList) + { + UnCheckedUserRights.Add(Convert.ToInt32(itemCheckedUserRights)); + } + } + + + } + Status = UserModel.InsertDeleteUserManageRight(dbContext, CheckedUserRights, UnCheckedUserRights, UserId, RoleName); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, "Done"); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + + + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + #endregion #region Add User [Route("GetUserTypebyLicenseId")] diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs new file mode 100644 index 0000000..593240a --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using AIAHTML5.ADMIN.API.Models; +using System.Web.Http.Cors; +using System.Web.Cors; +using AIAHTML5.Server.Constants; +using log4net; +using System.Text; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Controllers +{ + //[EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] + [RoutePrefix("UserGroup")] + public class UserGroupController : ApiController + { + AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities(); + + [Route("LicenseUserGroups")] + [HttpGet] + public HttpResponseMessage GetLicenseUserGroups(int LicenseId) + { + List UserGroupList = new List(); + try + { + UserGroupList = UserGroupModel.GetLicenseUserGroups(dbContext, LicenseId); + return Request.CreateResponse(HttpStatusCode.OK, UserGroupList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("LicenseUserGroupUsers")] + [HttpGet] + public HttpResponseMessage GetLicenseUserGroupUsers(int LicenseId, int UserGroupId) + { + List UserList = new List(); + try + { + UserList = UserGroupModel.GetLicenseUserGroupUsers(dbContext, LicenseId, UserGroupId); + return Request.CreateResponse(HttpStatusCode.OK, UserList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("InsertUpdateLicenseUserGroup")] + [HttpPost] + public HttpResponseMessage InsertUpdateLicenseUserGroup(JObject jsonData) + { + bool Status = false; + UserGroupModel UserGroupEntity = new UserGroupModel(); + UserGroupEntity.Id = jsonData["id"].Value(); + UserGroupEntity.LicenseId = jsonData["licenseId"].Value(); + UserGroupEntity.Title = jsonData["title"].Value(); + UserGroupEntity.IsActive = jsonData["isActive"].Value(); + UserGroupEntity.CreationDate = jsonData["creationDate"].Value(); + UserGroupEntity.ModifiedDate = jsonData["modifiedDate"].Value(); + try + { + Status = UserGroupModel.InsertUpdateLicenseUserGroup(dbContext, UserGroupEntity); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("UpdateLicenseUserGroupUsers")] + [HttpPost] + public HttpResponseMessage UpdateLicenseUserGroupUsers(JObject jsonData) + { + bool Status = false; + int UserGroupId = jsonData["userGroupId"].Value(); + string UserIds = jsonData["userIds"].Value(); + try + { + Status = UserGroupModel.UpdateLicenseUserGroupUsers(dbContext, UserGroupId, UserIds); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("DeleteLicenseUserGroup")] + [HttpGet] + public HttpResponseMessage DeleteLicenseUserGroup(int UserGroupId) + { + bool Status = false; + try + { + Status = UserGroupModel.DeleteLicenseUserGroup(dbContext, UserGroupId); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs index 8450fa7..3883e6e 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs @@ -3449,5 +3449,86 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModuleStatus", licenseIdParameter, moduleIdParameter, moduleStatusParameter, status); } + + public virtual int usp_InsertDeleteUserManageRights(string roleName, Nullable activityId, Nullable userId, string requestType, ObjectParameter status) + { + var roleNameParameter = roleName != null ? + new ObjectParameter("RoleName", roleName) : + new ObjectParameter("RoleName", typeof(string)); + + var activityIdParameter = activityId.HasValue ? + new ObjectParameter("ActivityId", activityId) : + new ObjectParameter("ActivityId", typeof(int)); + + var userIdParameter = userId.HasValue ? + new ObjectParameter("UserId", userId) : + new ObjectParameter("UserId", typeof(int)); + + var requestTypeParameter = requestType != null ? + new ObjectParameter("RequestType", requestType) : + new ObjectParameter("RequestType", typeof(string)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertDeleteUserManageRights", roleNameParameter, activityIdParameter, userIdParameter, requestTypeParameter, status); + } + + public virtual int usp_DeleteLicenseUserGroup(Nullable userGroupId, ObjectParameter status) + { + var userGroupIdParameter = userGroupId.HasValue ? + new ObjectParameter("UserGroupId", userGroupId) : + new ObjectParameter("UserGroupId", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_DeleteLicenseUserGroup", userGroupIdParameter, status); + } + + public virtual ObjectResult usp_GetLicenseUserGroups(Nullable licenseId) + { + var licenseIdParameter = licenseId.HasValue ? + new ObjectParameter("LicenseId", licenseId) : + new ObjectParameter("LicenseId", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetLicenseUserGroups", licenseIdParameter); + } + + public virtual int usp_InsertUpdateLicenseUserGroup(Nullable id, Nullable licenseId, string title, Nullable creationDate, Nullable modifiedDate, Nullable isActive, ObjectParameter status) + { + var idParameter = id.HasValue ? + new ObjectParameter("Id", id) : + new ObjectParameter("Id", typeof(int)); + + var licenseIdParameter = licenseId.HasValue ? + new ObjectParameter("LicenseId", licenseId) : + new ObjectParameter("LicenseId", typeof(int)); + + var titleParameter = title != null ? + new ObjectParameter("Title", title) : + new ObjectParameter("Title", typeof(string)); + + var creationDateParameter = creationDate.HasValue ? + new ObjectParameter("CreationDate", creationDate) : + new ObjectParameter("CreationDate", typeof(System.DateTime)); + + var modifiedDateParameter = modifiedDate.HasValue ? + new ObjectParameter("ModifiedDate", modifiedDate) : + new ObjectParameter("ModifiedDate", typeof(System.DateTime)); + + var isActiveParameter = isActive.HasValue ? + new ObjectParameter("IsActive", isActive) : + new ObjectParameter("IsActive", typeof(bool)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertUpdateLicenseUserGroup", idParameter, licenseIdParameter, titleParameter, creationDateParameter, modifiedDateParameter, isActiveParameter, status); + } + + public virtual int usp_UpdateLicenseUserGroupUsers(Nullable userGroupId, string userIds, ObjectParameter status) + { + var userGroupIdParameter = userGroupId.HasValue ? + new ObjectParameter("UserGroupId", userGroupId) : + new ObjectParameter("UserGroupId", typeof(int)); + + var userIdsParameter = userIds != null ? + new ObjectParameter("UserIds", userIds) : + new ObjectParameter("UserIds", typeof(string)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseUserGroupUsers", userGroupIdParameter, userIdsParameter, status); + } } } diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx index ef07853..7e4620b 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx @@ -2616,6 +2616,10 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + @@ -2654,6 +2658,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + @@ -2697,6 +2704,13 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + + + + @@ -2706,6 +2720,15 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + + + + + + @@ -2771,6 +2794,11 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + + + @@ -6224,7 +6252,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - + @@ -6329,7 +6357,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] - + @@ -6381,6 +6409,34 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -7334,6 +7390,15 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + + + + + + + @@ -9845,6 +9910,23 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + + + + + + + + + + + + + + + diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseUserGroups_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseUserGroups_Result.cs new file mode 100644 index 0000000..4e88bff --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseUserGroups_Result.cs @@ -0,0 +1,24 @@ +//------------------------------------------------------------------------------ +// +// This code was generated from a template. +// +// Manual changes to this file may cause unexpected behavior in your application. +// Manual changes to this file will be overwritten if the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AIAHTML5.ADMIN.API.Entity +{ + using System; + + public partial class usp_GetLicenseUserGroups_Result + { + public int Id { get; set; } + public string Title { get; set; } + public int LicenseId { get; set; } + public System.DateTime CreationDate { get; set; } + public Nullable ModifiedDate { get; set; } + public bool IsActive { get; set; } + public Nullable TotalUsers { get; set; } + } +} diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs new file mode 100644 index 0000000..634d6c6 --- /dev/null +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Models +{ + public class UserGroupModel + { + public int Id { get; set; } + public int LicenseId { get; set; } + public string Title { get; set; } + public DateTime? CreationDate { get; set; } + public DateTime? ModifiedDate { get; set; } + public bool? IsActive { get; set; } + public int? TotalUsers { get; set; } + + public static List GetLicenseUserGroups(AIADatabaseV5Entities dbContext, int LicenseId) + { + List UserGroupList = new List(); + UserGroupModel UserGroupObj = new UserGroupModel(); + try + { + var result = dbContext.usp_GetLicenseUserGroups(LicenseId).ToList(); + foreach (var item in result) + { + UserGroupObj = new UserGroupModel(); + UserGroupObj.Id = item.Id; + UserGroupObj.LicenseId = item.LicenseId; + UserGroupObj.Title = item.Title; + UserGroupObj.IsActive = item.IsActive; + UserGroupObj.ModifiedDate = item.ModifiedDate; + UserGroupObj.CreationDate = item.CreationDate; + UserGroupObj.TotalUsers = item.TotalUsers; + UserGroupList.Add(UserGroupObj); + } + } + catch (Exception ex) { } + return UserGroupList; + } + + public static List GetLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int LicenseId, int UserGroupId) + { + List UserList = new List(); + UserModel UserModelObj = new UserModel(); + try + { + var result = dbContext.GetAllUserWithGroup(LicenseId, UserGroupId).ToList(); + foreach (var item in result) + { + UserModelObj = new UserModel(); + UserModelObj.Id = item.Id; + UserModelObj.FirstName = item.FirstName; + UserModelObj.LastName = item.LastName; + UserModelObj.LoginId = item.LoginId; + UserModelObj.EmailId = item.EmailId; + UserModelObj.ProductEdition = item.Title; + UserModelObj.InGroup = item.InGroup; + UserList.Add(UserModelObj); + } + } + catch (Exception ex) { } + return UserList; + } + + public static bool InsertUpdateLicenseUserGroup(AIADatabaseV5Entities dbContext, UserGroupModel UserGroupEntity) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_InsertUpdateLicenseUserGroup(UserGroupEntity.Id, UserGroupEntity.LicenseId, UserGroupEntity.Title, + UserGroupEntity.CreationDate, UserGroupEntity.ModifiedDate, UserGroupEntity.IsActive, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + public static bool UpdateLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int UserGroupId, string UserIds) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_UpdateLicenseUserGroupUsers(UserGroupId, UserIds, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + public static bool DeleteLicenseUserGroup(AIADatabaseV5Entities dbContext, int UserGroupId) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_DeleteLicenseUserGroup(UserGroupId, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + } + +} \ No newline at end of file diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs index f840952..e69af0f 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs @@ -27,7 +27,8 @@ namespace AIAHTML5.ADMIN.API.Models public int LicenseId { get; set; } public int EditionId { get; set; } public short iUserTypeId { get; set; } - + public int InGroup { get; set; } + public string ProductEdition { get; set; } public static bool UpdateUserProfile(AIADatabaseV5Entities dbContext, int intUserID, string strFirstName, string strLastName, string strEmailID) { @@ -136,5 +137,29 @@ namespace AIAHTML5.ADMIN.API.Models return false; } } + + public static bool InsertDeleteUserManageRight(AIADatabaseV5Entities dbContext, List SelectectedUserRights, List UncheckedUserRights, + int UserId,string RoleName) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + foreach (var item in SelectectedUserRights) + { + dbContext.usp_InsertDeleteUserManageRights(RoleName,item,UserId,"Insert", spStatus); + if (!(bool)spStatus.Value) break; + } + foreach (var item in UncheckedUserRights) + { + dbContext.usp_InsertDeleteUserManageRights(RoleName, item, UserId, "Remove", spStatus); + if (!(bool)spStatus.Value) break; + } + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } } } \ No newline at end of file diff --git a/400-SOURCECODE/Admin/dist/assets/styles/angular-custom.css b/400-SOURCECODE/Admin/dist/assets/styles/angular-custom.css index f92c62c..76a7d07 100644 --- a/400-SOURCECODE/Admin/dist/assets/styles/angular-custom.css +++ b/400-SOURCECODE/Admin/dist/assets/styles/angular-custom.css @@ -75,7 +75,7 @@ cursor-pointer { } .alert-header-custom { - /* background-color: #5d8fc2 !important; */ + background-color: #5d8fc2 !important; padding: 8px !important; color: white; } diff --git a/400-SOURCECODE/Admin/dist/index.html b/400-SOURCECODE/Admin/dist/index.html index 6867edc..c982774 100644 --- a/400-SOURCECODE/Admin/dist/index.html +++ b/400-SOURCECODE/Admin/dist/index.html @@ -37,4 +37,4 @@ //}); }); \ No newline at end of file + }) \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/dbo.ClearSessionManager.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.ClearSessionManager.StoredProcedure.sql new file mode 100644 index 0000000..4a31f72 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.ClearSessionManager.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBackGroundArtList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBackGroundArtList.StoredProcedure.sql new file mode 100644 index 0000000..c92585f Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBackGroundArtList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBaseLayer.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBaseLayer.StoredProcedure.sql new file mode 100644 index 0000000..333a1eb Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBaseLayer.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBitmask.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBitmask.StoredProcedure.sql new file mode 100644 index 0000000..5d25b77 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBitmask.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegion.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegion.StoredProcedure.sql new file mode 100644 index 0000000..2450f68 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegion.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionList.StoredProcedure.sql new file mode 100644 index 0000000..7e2e1c0 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionView.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionView.StoredProcedure.sql new file mode 100644 index 0000000..6da1a29 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionView.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionViewList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionViewList.StoredProcedure.sql new file mode 100644 index 0000000..096092e Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionViewList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetDissectibleContent.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetDissectibleContent.StoredProcedure.sql new file mode 100644 index 0000000..6cc3891 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetDissectibleContent.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetGenderList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetGenderList.StoredProcedure.sql new file mode 100644 index 0000000..1a5e1b1 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetGenderList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerModel.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerModel.StoredProcedure.sql new file mode 100644 index 0000000..d63d0f8 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerModel.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerdata.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerdata.StoredProcedure.sql new file mode 100644 index 0000000..46d7c88 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerdata.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLexiconTermList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLexiconTermList.StoredProcedure.sql new file mode 100644 index 0000000..318ed39 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLexiconTermList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetNavigatorModel.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetNavigatorModel.StoredProcedure.sql new file mode 100644 index 0000000..3f38b4b Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetNavigatorModel.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetOverLayLayerList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetOverLayLayerList.StoredProcedure.sql new file mode 100644 index 0000000..9daf7f8 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetOverLayLayerList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetPLRModel.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetPLRModel.StoredProcedure.sql new file mode 100644 index 0000000..c1b64ad Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetPLRModel.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetPolygonForId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetPolygonForId.StoredProcedure.sql new file mode 100644 index 0000000..1cf5f8c Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetPolygonForId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupId.StoredProcedure.sql new file mode 100644 index 0000000..3b587fe Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupList.StoredProcedure.sql new file mode 100644 index 0000000..381516c Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureList.StoredProcedure.sql new file mode 100644 index 0000000..88f7909 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermList.StoredProcedure.sql new file mode 100644 index 0000000..62e2467 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermNumberForContentId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermNumberForContentId.StoredProcedure.sql new file mode 100644 index 0000000..e53aea4 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermNumberForContentId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientation.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientation.StoredProcedure.sql new file mode 100644 index 0000000..af1c7bf Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientation.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientationList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientationList.StoredProcedure.sql new file mode 100644 index 0000000..741de49 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientationList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_GetVocabTermModal.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetVocabTermModal.StoredProcedure.sql new file mode 100644 index 0000000..290c9f8 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetVocabTermModal.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DA_LayerNumberInternal.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DA_LayerNumberInternal.StoredProcedure.sql new file mode 100644 index 0000000..88d9b79 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DA_LayerNumberInternal.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DeleteIncorrectLoginAttempts.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DeleteIncorrectLoginAttempts.StoredProcedure.sql new file mode 100644 index 0000000..bba4e01 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DeleteIncorrectLoginAttempts.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DeleteLicense.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DeleteLicense.StoredProcedure.sql new file mode 100644 index 0000000..aa6507a Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DeleteLicense.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.DeleteUserSession.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.DeleteUserSession.StoredProcedure.sql new file mode 100644 index 0000000..ca1dd7e Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.DeleteUserSession.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_CreateUser.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_CreateUser.StoredProcedure.sql new file mode 100644 index 0000000..da5d8db Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_CreateUser.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetAccountTypeList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetAccountTypeList.StoredProcedure.sql new file mode 100644 index 0000000..dde8622 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetAccountTypeList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetCountryList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetCountryList.StoredProcedure.sql new file mode 100644 index 0000000..3236eed Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetCountryList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetCourseConductedList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetCourseConductedList.StoredProcedure.sql new file mode 100644 index 0000000..0490fdb Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetCourseConductedList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetInstitutionList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetInstitutionList.StoredProcedure.sql new file mode 100644 index 0000000..fbd5334 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetInstitutionList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetInternetProductList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetInternetProductList.StoredProcedure.sql new file mode 100644 index 0000000..ac7e4b5 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetInternetProductList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetMultimediaProductList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetMultimediaProductList.StoredProcedure.sql new file mode 100644 index 0000000..443f70f Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetMultimediaProductList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetProductRequiredList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetProductRequiredList.StoredProcedure.sql new file mode 100644 index 0000000..10656f1 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetProductRequiredList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetReferList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetReferList.StoredProcedure.sql new file mode 100644 index 0000000..49ead45 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetReferList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSecurityQuestionList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSecurityQuestionList.StoredProcedure.sql new file mode 100644 index 0000000..2dc4a33 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSecurityQuestionList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetStateList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetStateList.StoredProcedure.sql new file mode 100644 index 0000000..f895a45 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetStateList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionDuration.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionDuration.StoredProcedure.sql new file mode 100644 index 0000000..eec645d Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionDuration.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionEndDate.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionEndDate.StoredProcedure.sql new file mode 100644 index 0000000..d70e2f2 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionEndDate.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlan.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlan.StoredProcedure.sql new file mode 100644 index 0000000..0023272 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlan.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlanInfo.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlanInfo.StoredProcedure.sql new file mode 100644 index 0000000..8986073 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlanInfo.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPrice.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPrice.StoredProcedure.sql new file mode 100644 index 0000000..2c24315 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPrice.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_GetUsername.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetUsername.StoredProcedure.sql new file mode 100644 index 0000000..acd33ae Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetUsername.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_InsertPaymentTransaction.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_InsertPaymentTransaction.StoredProcedure.sql new file mode 100644 index 0000000..3f2eb01 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_InsertPaymentTransaction.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.EC_UpdateUser.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.EC_UpdateUser.StoredProcedure.sql new file mode 100644 index 0000000..846b669 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.EC_UpdateUser.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetAIALicenseDetails.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetAIALicenseDetails.StoredProcedure.sql new file mode 100644 index 0000000..421cf23 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetAIALicenseDetails.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetAccountModule.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetAccountModule.StoredProcedure.sql new file mode 100644 index 0000000..a68d249 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetAccountModule.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetAllEditionForLicense.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetAllEditionForLicense.StoredProcedure.sql new file mode 100644 index 0000000..26d2762 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetAllEditionForLicense.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetAllLoginFailureCauses.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetAllLoginFailureCauses.StoredProcedure.sql new file mode 100644 index 0000000..bfc9dc2 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetAllLoginFailureCauses.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatus.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatus.StoredProcedure.sql new file mode 100644 index 0000000..cad52d6 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatus.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatusWithSlug.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatusWithSlug.StoredProcedure.sql new file mode 100644 index 0000000..4767a78 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatusWithSlug.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetAllUserWithGroup.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetAllUserWithGroup.StoredProcedure.sql new file mode 100644 index 0000000..0a62015 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetAllUserWithGroup.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetAttributeTypeList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetAttributeTypeList.StoredProcedure.sql new file mode 100644 index 0000000..63ed4eb Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetAttributeTypeList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetAttributeValueList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetAttributeValueList.StoredProcedure.sql new file mode 100644 index 0000000..81f80a3 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetAttributeValueList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.StoredProcedure.sql new file mode 100644 index 0000000..e162a3f Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.sql new file mode 100644 index 0000000..a76c582 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.sql @@ -0,0 +1,39 @@ + +-- ============================================= +-- Author: Magic Software +-- Create date: 12-May-2009 +-- Description: To get the list of blocked user who have attempt 5 times wrong login +-- ============================================= +CREATE PROCEDURE [dbo].[GetBlockedUserByAccNoAndType] + -- Add the parameters for the stored procedure here + @iUserTypeId tinyint, @iLicenseId int +AS +BEGIN + -- returns the metadata + IF 1=0 BEGIN + SET FMTONLY OFF + END + SELECT DISTINCT + AIAUser.Id, + AIAUser.FirstName, + AIAUser.LastName, + AIAUser.LoginId, + AIAUser.Password, + AIAUser.EmailId, + ISNULL(License.AccountNumber,'') AccountNumber, + IncorrectLoginAttempts.LoginTime + FROM + IncorrectLoginAttempts + INNER JOIN AIAUser ON IncorrectLoginAttempts.UserId = AIAUser.Id + INNER JOIN UserType ON AIAUser.UserTypeId = UserType.Id + LEFT JOIN AIAUserToLicenseEdition ON AIAUser.Id = AIAUserToLicenseEdition.UserId + LEFT JOIN LicenseToEdition ON AIAUserToLicenseEdition.LicenseEditionId = LicenseToEdition.Id + LEFT JOIN License ON LicenseToEdition.LicenseId = License.Id + WHERE + IncorrectLoginAttempts.CntIncorrectLogins >= 5 + AND UserType.Priority >= (SELECT UserType.Priority FROM UserType WHERE UserType.Id=@iUserTypeId) + AND ((@iLicenseId =0) OR (License.Id = @iLicenseId)) + AND License.IsActive = 1 +END + + diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserId.StoredProcedure.sql new file mode 100644 index 0000000..107c6be Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserType.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserType.StoredProcedure.sql new file mode 100644 index 0000000..d9b1750 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserType.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserDetailsByUserIdAndUserTypeId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserDetailsByUserIdAndUserTypeId.StoredProcedure.sql new file mode 100644 index 0000000..e2f45b5 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserDetailsByUserIdAndUserTypeId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetCAMSearch.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetCAMSearch.StoredProcedure.sql new file mode 100644 index 0000000..03d5598 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetCAMSearch.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetCancelledLicenses.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetCancelledLicenses.StoredProcedure.sql new file mode 100644 index 0000000..786a507 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetCancelledLicenses.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetContentAttributeData.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetContentAttributeData.StoredProcedure.sql new file mode 100644 index 0000000..52a7135 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetContentAttributeData.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetContentList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetContentList.StoredProcedure.sql new file mode 100644 index 0000000..eb8c38c Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetContentList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary.StoredProcedure.sql new file mode 100644 index 0000000..a27d5b1 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_25042017.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_25042017.StoredProcedure.sql new file mode 100644 index 0000000..53c4804 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_25042017.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_bkp.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_bkp.StoredProcedure.sql new file mode 100644 index 0000000..2e46d47 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_bkp.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.StoredProcedure.sql new file mode 100644 index 0000000..d18aecf Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.sql new file mode 100644 index 0000000..974b080 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.sql @@ -0,0 +1,42 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GetDiscountCodes]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[GetDiscountCodes] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 23-Dec-2009 +-- Description: To get the details of all discounts +-- ==================================================== +CREATE PROCEDURE [dbo].[GetDiscountCodes] + -- Add the parameters for the stored procedure here + @sDiscountCode VARCHAR(255) = '', @sStartDate VARCHAR(20) = '', @sEndDate VARCHAR(20) = '' +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + DECLARE @dtStartDate DATETIME, @dtEndDate DATETIME + + -- convert the datatype of startdate & enddate parameter to datetime + SELECT @dtStartDate = CONVERT(DATETIME,@sStartDate) + SELECT @dtEndDate = CONVERT(DATETIME,@sEndDate) + + SELECT Id, DiscountCode, Percentage, CONVERT(VARCHAR(10),StartDate,101) as StartDate, CONVERT(VARCHAR(10),EndDate,101) as EndDate, + (CASE IsActive WHEN 1 THEN 'Active' ELSE 'Inactive' END) AS Status + FROM Discount WHERE StartDate >= (CASE WHEN LEN(@sStartDate) > 0 THEN @dtStartDate ELSE StartDate END) + AND EndDate <= (CASE WHEN LEN(@sEndDate) > 0 THEN @dtEndDate ELSE EndDate END) + AND DiscountCode like (CASE WHEN LEN(@sDiscountCode) > 0 THEN '%' + @sDiscountCode + '%' ELSE DiscountCode END) + ORDER BY Status +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountDetails.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountDetails.StoredProcedure.sql new file mode 100644 index 0000000..8d38a4f Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountDetails.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountReport.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountReport.StoredProcedure.sql new file mode 100644 index 0000000..ea21cdb Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountReport.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountedPrice.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountedPrice.StoredProcedure.sql new file mode 100644 index 0000000..a53e11d Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountedPrice.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetEditionsBySiteAccount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetEditionsBySiteAccount.StoredProcedure.sql new file mode 100644 index 0000000..2bde112 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetEditionsBySiteAccount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetEncyclopediaSearch.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetEncyclopediaSearch.StoredProcedure.sql new file mode 100644 index 0000000..c8968ff Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetEncyclopediaSearch.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetExpiringLicenses.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetExpiringLicenses.StoredProcedure.sql new file mode 100644 index 0000000..d15707a Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetExpiringLicenses.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetExportedImageDetails.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetExportedImageDetails.StoredProcedure.sql new file mode 100644 index 0000000..19bbd19 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetExportedImageDetails.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetImagePinData.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetImagePinData.StoredProcedure.sql new file mode 100644 index 0000000..8c4d046 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetImagePinData.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetInDepthSearch.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetInDepthSearch.StoredProcedure.sql new file mode 100644 index 0000000..6ce415a Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetInDepthSearch.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetIncorrectLoginAttempt.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetIncorrectLoginAttempt.StoredProcedure.sql new file mode 100644 index 0000000..ab8593a Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetIncorrectLoginAttempt.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLabExcerciseByUserId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLabExcerciseByUserId.StoredProcedure.sql new file mode 100644 index 0000000..2194e57 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLabExcerciseByUserId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseByIPAndAccount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseByIPAndAccount.StoredProcedure.sql new file mode 100644 index 0000000..2800447 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseByIPAndAccount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseBySiteId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseBySiteId.StoredProcedure.sql new file mode 100644 index 0000000..ce969cf Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseBySiteId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailByUserId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailByUserId.StoredProcedure.sql new file mode 100644 index 0000000..eb0fa50 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailByUserId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailsById.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailsById.StoredProcedure.sql new file mode 100644 index 0000000..dde03d4 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailsById.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdByUserId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdByUserId.StoredProcedure.sql new file mode 100644 index 0000000..3ebe4c8 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdByUserId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdForUser.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdForUser.StoredProcedure.sql new file mode 100644 index 0000000..289305f Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdForUser.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionsForModesty.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionsForModesty.StoredProcedure.sql new file mode 100644 index 0000000..fe471ca Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionsForModesty.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdBySiteUrl.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdBySiteUrl.StoredProcedure.sql new file mode 100644 index 0000000..a6e8baa Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdBySiteUrl.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdByUserId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdByUserId.StoredProcedure.sql new file mode 100644 index 0000000..411f87e Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdByUserId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdEditionIdByUserId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdEditionIdByUserId.StoredProcedure.sql new file mode 100644 index 0000000..1297528 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdEditionIdByUserId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetLoginFailureErrorReport.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetLoginFailureErrorReport.StoredProcedure.sql new file mode 100644 index 0000000..c2b41b4 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetLoginFailureErrorReport.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetModuleStatusByLicenseId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetModuleStatusByLicenseId.StoredProcedure.sql new file mode 100644 index 0000000..b01042d Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetModuleStatusByLicenseId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetModulesByUserId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetModulesByUserId.StoredProcedure.sql new file mode 100644 index 0000000..e19c689 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetModulesByUserId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdDetailReport.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdDetailReport.StoredProcedure.sql new file mode 100644 index 0000000..e4382b8 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdDetailReport.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql new file mode 100644 index 0000000..be224c0 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetProductFeatures.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetProductFeatures.StoredProcedure.sql new file mode 100644 index 0000000..9df8f73 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetProductFeatures.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSchedulerAlertEmail.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSchedulerAlertEmail.StoredProcedure.sql new file mode 100644 index 0000000..51c2eff Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetSchedulerAlertEmail.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSearchDetails.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchDetails.StoredProcedure.sql new file mode 100644 index 0000000..e524121 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchDetails.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSearchTerms.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchTerms.StoredProcedure.sql new file mode 100644 index 0000000..e3d7aa0 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchTerms.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.StoredProcedure.sql new file mode 100644 index 0000000..a915a62 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.sql new file mode 100644 index 0000000..c1acfbd Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSiteAccoutDetail.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSiteAccoutDetail.StoredProcedure.sql new file mode 100644 index 0000000..07bafb2 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetSiteAccoutDetail.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSiteIpByAccountNumber.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSiteIpByAccountNumber.StoredProcedure.sql new file mode 100644 index 0000000..a8a8917 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetSiteIpByAccountNumber.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSiteLicenseUsageReport.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSiteLicenseUsageReport.StoredProcedure.sql new file mode 100644 index 0000000..d41e156 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetSiteLicenseUsageReport.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSubscribedLicenses.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSubscribedLicenses.StoredProcedure.sql new file mode 100644 index 0000000..588c3be Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetSubscribedLicenses.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSubscriptionDetailsByLicenseId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSubscriptionDetailsByLicenseId.StoredProcedure.sql new file mode 100644 index 0000000..c2f84e0 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetSubscriptionDetailsByLicenseId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetTermNumberData.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetTermNumberData.StoredProcedure.sql new file mode 100644 index 0000000..24772d6 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetTermNumberData.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetTermsAndConditions.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetTermsAndConditions.StoredProcedure.sql new file mode 100644 index 0000000..198a3fe Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetTermsAndConditions.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetTermsOfServiceText.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetTermsOfServiceText.StoredProcedure.sql new file mode 100644 index 0000000..9b0d3fb Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetTermsOfServiceText.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetThreeDHighLightData.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetThreeDHighLightData.StoredProcedure.sql new file mode 100644 index 0000000..e35e2b9 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetThreeDHighLightData.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoggedInUsersByLicenseIdAndEditionId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoggedInUsersByLicenseIdAndEditionId.StoredProcedure.sql new file mode 100644 index 0000000..5881450 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoggedInUsersByLicenseIdAndEditionId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoginsByLicenseEditionId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoginsByLicenseEditionId.StoredProcedure.sql new file mode 100644 index 0000000..25777f1 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoginsByLicenseEditionId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport.StoredProcedure.sql new file mode 100644 index 0000000..5d4b28f Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport_OLD_PROC.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport_OLD_PROC.StoredProcedure.sql new file mode 100644 index 0000000..9225740 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport_OLD_PROC.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUserByUserId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUserByUserId.StoredProcedure.sql new file mode 100644 index 0000000..b7ce29f Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUserByUserId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginId.StoredProcedure.sql new file mode 100644 index 0000000..08341f0 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginIdAndPassword.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginIdAndPassword.StoredProcedure.sql new file mode 100644 index 0000000..c798ea5 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginIdAndPassword.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUserInGroup.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUserInGroup.StoredProcedure.sql new file mode 100644 index 0000000..d490b89 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUserInGroup.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUserInfoByEmailId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUserInfoByEmailId.StoredProcedure.sql new file mode 100644 index 0000000..c60cda0 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUserInfoByEmailId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUserModulesByLicenseId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUserModulesByLicenseId.StoredProcedure.sql new file mode 100644 index 0000000..e1d100a Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUserModulesByLicenseId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUserSessionDetails.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUserSessionDetails.StoredProcedure.sql new file mode 100644 index 0000000..651155d Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUserSessionDetails.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUserTyeByAccountNumber.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUserTyeByAccountNumber.StoredProcedure.sql new file mode 100644 index 0000000..9e963a0 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUserTyeByAccountNumber.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetUserlActivities.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetUserlActivities.StoredProcedure.sql new file mode 100644 index 0000000..a80ca88 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.GetUserlActivities.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.IncorrectLoginAttempt.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.IncorrectLoginAttempt.StoredProcedure.sql new file mode 100644 index 0000000..a725c5d Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.IncorrectLoginAttempt.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertAIAUser.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertAIAUser.StoredProcedure.sql new file mode 100644 index 0000000..4d767b0 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertAIAUser.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertDemoLicenseAccount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertDemoLicenseAccount.StoredProcedure.sql new file mode 100644 index 0000000..d0f2b16 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertDemoLicenseAccount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempt.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempt.StoredProcedure.sql new file mode 100644 index 0000000..a33b87d Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempt.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempts.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempts.StoredProcedure.sql new file mode 100644 index 0000000..35f5449 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempts.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail.StoredProcedure.sql new file mode 100644 index 0000000..1715074 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail_1.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail_1.StoredProcedure.sql new file mode 100644 index 0000000..e974176 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail_1.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetailsInSessionManager.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetailsInSessionManager.StoredProcedure.sql new file mode 100644 index 0000000..94a1214 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetailsInSessionManager.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginErrorLog.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginErrorLog.StoredProcedure.sql new file mode 100644 index 0000000..10a3b90 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginErrorLog.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertNewDiscount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertNewDiscount.StoredProcedure.sql new file mode 100644 index 0000000..bba8e9b Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertNewDiscount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertNewLicenseAccount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertNewLicenseAccount.StoredProcedure.sql new file mode 100644 index 0000000..1bb1012 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertNewLicenseAccount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertResellerLicenseAccount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertResellerLicenseAccount.StoredProcedure.sql new file mode 100644 index 0000000..fbaf7dc Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertResellerLicenseAccount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertSingleLicenseAccount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertSingleLicenseAccount.StoredProcedure.sql new file mode 100644 index 0000000..b7bd643 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertSingleLicenseAccount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertTestLicenseAccount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertTestLicenseAccount.StoredProcedure.sql new file mode 100644 index 0000000..2de7241 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertTestLicenseAccount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertUpdateSiteAccount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertUpdateSiteAccount.StoredProcedure.sql new file mode 100644 index 0000000..00926d2 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertUpdateSiteAccount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.InsertUserSessionDetails.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.InsertUserSessionDetails.StoredProcedure.sql new file mode 100644 index 0000000..dd2c527 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.InsertUserSessionDetails.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.NewDeleteCommand.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.NewDeleteCommand.StoredProcedure.sql new file mode 100644 index 0000000..cb1d7ee Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.NewDeleteCommand.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.NewInsertCommand.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.NewInsertCommand.StoredProcedure.sql new file mode 100644 index 0000000..9633a79 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.NewInsertCommand.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.NewUpdateCommand.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.NewUpdateCommand.StoredProcedure.sql new file mode 100644 index 0000000..1678e94 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.NewUpdateCommand.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.StartResellerSubscription.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.StartResellerSubscription.StoredProcedure.sql new file mode 100644 index 0000000..940eb97 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.StartResellerSubscription.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.StoredProcedure.sql new file mode 100644 index 0000000..f2da61f Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql new file mode 100644 index 0000000..54ecc51 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql @@ -0,0 +1,43 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[UpdateAiaUserPassword]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[UpdateAiaUserPassword] +GO +-- ============================================= +-- Author: +-- Create date: +-- Description: +-- ============================================= +Create PROCEDURE [dbo].[UpdateAiaUserPassword] + -- Add the parameters for the stored procedure here + @Id int, + @NewPassword VARCHAR(50), + @Status bit out +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + UPDATE AIAUser SET Password= @NewPassword where Id = @Id; + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscount.StoredProcedure.sql new file mode 100644 index 0000000..12666d9 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscountStatus.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscountStatus.StoredProcedure.sql new file mode 100644 index 0000000..f682fe4 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscountStatus.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateIncorrectLoginAttempts.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateIncorrectLoginAttempts.StoredProcedure.sql new file mode 100644 index 0000000..3df2a98 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateIncorrectLoginAttempts.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseAccount.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseAccount.StoredProcedure.sql new file mode 100644 index 0000000..f4159f2 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseAccount.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseModule.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseModule.StoredProcedure.sql new file mode 100644 index 0000000..4cd2fa2 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseModule.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseStatus.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseStatus.StoredProcedure.sql new file mode 100644 index 0000000..979c6f2 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseStatus.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseTermAcceptedStatus.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseTermAcceptedStatus.StoredProcedure.sql new file mode 100644 index 0000000..8b59402 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseTermAcceptedStatus.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateUserPassword.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateUserPassword.StoredProcedure.sql new file mode 100644 index 0000000..086813a Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateUserPassword.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateUserProfile.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateUserProfile.StoredProcedure.sql new file mode 100644 index 0000000..a4ea3fe Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.UpdateUserProfile.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.getEditionData.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.getEditionData.StoredProcedure.sql new file mode 100644 index 0000000..37379e3 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.getEditionData.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_DB_TblRowCOUNT.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_DB_TblRowCOUNT.StoredProcedure.sql new file mode 100644 index 0000000..adbe444 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_DB_TblRowCOUNT.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_DeleteSubscriptionPlan.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_DeleteSubscriptionPlan.StoredProcedure.sql new file mode 100644 index 0000000..e75dff9 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_DeleteSubscriptionPlan.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.StoredProcedure.sql new file mode 100644 index 0000000..0c112c3 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.sql new file mode 100644 index 0000000..d99b494 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.sql @@ -0,0 +1,33 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetAccountNumber]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetAccountNumber] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 23-Dec-2009 +-- Description: To get the details of all discounts +-- ==================================================== +CREATE PROCEDURE [dbo].[usp_GetAccountNumber] + -- Add the parameters for the stored procedure here + +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + SELECT License.Id,License.AccountNumber FROM License +INNER JOIN LicenseType ON LicenseType.Id = License.LicenseTypeId +WHERE License.IsActive = 1 +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.StoredProcedure.sql new file mode 100644 index 0000000..1ad023d Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.sql new file mode 100644 index 0000000..b394714 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.sql @@ -0,0 +1,51 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetAccountTypeList]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetAccountTypeList] +GO + + + +-- ============================================= +-- Author: magic +-- Create date: 7/4/2009 +-- Description: Fetch AccountType List +-- ============================================= +CREATE PROCEDURE [dbo].[usp_GetAccountTypeList] + -- Add the parameters for the stored procedure here + @Id Int +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + -- Insert statements for procedure here + if(@Id>0) + begin + select Id,Title + from AccountType where IsActive=1 and Id=@Id + end + else + begin + select Id,Title + from AccountType where IsActive=1 + end + + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + + + + + + \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetEditions.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetEditions.StoredProcedure.sql new file mode 100644 index 0000000..85b90af Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetEditions.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseById.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseById.StoredProcedure.sql new file mode 100644 index 0000000..1ede885 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseById.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseTypes.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseTypes.StoredProcedure.sql new file mode 100644 index 0000000..d72e0f2 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseTypes.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenses.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenses.StoredProcedure.sql new file mode 100644 index 0000000..2b85c42 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenses.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.StoredProcedure.sql new file mode 100644 index 0000000..5f476ec Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.sql new file mode 100644 index 0000000..80474e5 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.StoredProcedure.sql new file mode 100644 index 0000000..8828523 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.sql new file mode 100644 index 0000000..9459877 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.sql @@ -0,0 +1,34 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetProductEdition]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetProductEdition] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 23-Dec-2009 +-- Description: To get the details of all discounts +-- ==================================================== +CREATE PROCEDURE [dbo].[usp_GetProductEdition] + -- Add the parameters for the stored procedure here + @iLicenseId int +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + SELECT Edition.Id, Edition.Title, Edition.IsActive, Edition.Priority + FROM Edition + INNER JOIN LicenseToEdition ON Edition.Id = LicenseToEdition.EditionId + WHERE LicenseToEdition.LicenseId =@iLicenseId +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.StoredProcedure.sql new file mode 100644 index 0000000..affead7 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.sql new file mode 100644 index 0000000..ced6c2c Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSubscriptionPlans.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSubscriptionPlans.StoredProcedure.sql new file mode 100644 index 0000000..5b29bb7 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSubscriptionPlans.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.StoredProcedure.sql new file mode 100644 index 0000000..27cd2c5 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.sql new file mode 100644 index 0000000..50044ee --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.sql @@ -0,0 +1,48 @@ + +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetUserType]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetUserType] +GO + + +-- ============================================= +-- Author: magic +-- Create date: 7/4/2009 +-- Description: Fetch AccountType List +-- ============================================= +CREATE PROCEDURE [dbo].[usp_GetUserType] + -- Add the parameters for the stored procedure here + @id int +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + if(@id>0) + begin + -- Insert statements for procedure here + select Id,Title + from UserType where IsActive=1 and Id=@id + end + else + begin + select Id,Title + from UserType where IsActive=1 + end + +END + + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + + + + \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.StoredProcedure.sql new file mode 100644 index 0000000..1364638 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.sql new file mode 100644 index 0000000..f06166c Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertSubscriptionPlan.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertSubscriptionPlan.StoredProcedure.sql new file mode 100644 index 0000000..de517af Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertSubscriptionPlan.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.StoredProcedure.sql new file mode 100644 index 0000000..4203918 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.sql new file mode 100644 index 0000000..52c1b70 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateSubscriptionPlan.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateSubscriptionPlan.StoredProcedure.sql new file mode 100644 index 0000000..65e9642 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateSubscriptionPlan.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.StoredProcedure.sql new file mode 100644 index 0000000..df515f5 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql new file mode 100644 index 0000000..6a78fa3 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql @@ -0,0 +1,63 @@ + +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateUserId]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_UpdateUserId] +GO + + +-- ============================================= +-- Author: +-- Create date: <3-Jan-2018> +-- Description: +-- ============================================= +CREATE PROCEDURE [dbo].[usp_UpdateUserId]--6,'aiaonline1','aiaonline',0 + -- Add the parameters for the stored procedure here + @Id int, + @UserId VARCHAR(50), + @olduserId varchar(50), + @Status int out +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + set @Status = 0; + BEGIN TRY + + + if ((Select count(*) from AIAUser Where LoginId=@UserId)=1) + begin + -- Already exists + set @Status = 2; + --select '2' + end + else + begin + BEGIN TRANSACTION + UPDATE AIAUser SET LoginId= @UserId where Id = @Id and LoginId=@olduserId; + set @Status = 1; + COMMIT TRANSACTION + --select '1' + end + + + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + + diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.StoredProcedure.sql new file mode 100644 index 0000000..48042d2 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.StoredProcedure.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.sql new file mode 100644 index 0000000..2edab9f --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.sql @@ -0,0 +1,53 @@ + +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateblockedUser]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_UpdateblockedUser] +GO + + +-- ============================================= +-- Author: +-- Create date: <3-Jan-2018> +-- Description: +-- ============================================= +CREATE PROCEDURE [dbo].[usp_UpdateblockedUser]--6,'aiaonline1','aiaonline',0 + -- Add the parameters for the stored procedure here + @Id int, + @Status int out +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + BEGIN TRY + + + + BEGIN TRANSACTION + DELETE from IncorrectLoginAttempts where UserId =@Id + set @Status = 1; + COMMIT TRANSACTION + --select '1' + + + + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + + diff --git a/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserGroupController.cs b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserGroupController.cs new file mode 100644 index 0000000..c4c2cd5 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserGroupController.cs @@ -0,0 +1,140 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using AIAHTML5.ADMIN.API.Models; +using System.Web.Http.Cors; +using System.Web.Cors; +using AIAHTML5.Server.Constants; +using log4net; +using System.Text; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Controllers +{ + [EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")] + [RoutePrefix("UserGroup")] + public class UserGroupController : ApiController + { + AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities(); + + [Route("LicenseUserGroups")] + [HttpGet] + public HttpResponseMessage GetLicenseUserGroups(int LicenseId) + { + List UserGroupList = new List(); + try + { + UserGroupList = UserGroupModel.GetLicenseUserGroups(dbContext, LicenseId); + return Request.CreateResponse(HttpStatusCode.OK, UserGroupList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("LicenseUserGroupUsers")] + [HttpGet] + public HttpResponseMessage GetLicenseUserGroupUsers(int LicenseId, int UserGroupId) + { + List UserList = new List(); + try + { + UserList = UserGroupModel.GetLicenseUserGroupUsers(dbContext, LicenseId, UserGroupId); + return Request.CreateResponse(HttpStatusCode.OK, UserList); + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("InsertUpdateLicenseUserGroup")] + [HttpPost] + public HttpResponseMessage InsertUpdateLicenseUserGroup(JObject jsonData) + { + bool Status = false; + UserGroupModel UserGroupEntity = new UserGroupModel(); + UserGroupEntity.Id = jsonData["id"].Value(); + UserGroupEntity.LicenseId = jsonData["licenseId"].Value(); + UserGroupEntity.Title = jsonData["title"].Value(); + UserGroupEntity.IsActive = jsonData["isActive"].Value(); + UserGroupEntity.CreationDate = jsonData["creationDate"].Value(); + UserGroupEntity.ModifiedDate = jsonData["modifiedDate"].Value(); + try + { + Status = UserGroupModel.InsertUpdateLicenseUserGroup(dbContext, UserGroupEntity); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("UpdateLicenseUserGroupUsers")] + [HttpPost] + public HttpResponseMessage UpdateLicenseUserGroupUsers(JObject jsonData) + { + bool Status = false; + int UserGroupId = jsonData["userGroupId"].Value(); + string UserIds = jsonData["userIds"].Value(); + try + { + Status = UserGroupModel.UpdateLicenseUserGroupUsers(dbContext, UserGroupId, UserIds); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + + [Route("DeleteLicenseUserGroup")] + [HttpGet] + public HttpResponseMessage DeleteLicenseUserGroup(int UserGroupId) + { + bool Status = false; + try + { + Status = UserGroupModel.DeleteLicenseUserGroup(dbContext, UserGroupId); + if (Status) + { + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); + } + else + { + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); + } + } + catch (Exception ex) + { + // Log exception code goes here + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); + } + } + } +} diff --git a/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserGroupModel.cs b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserGroupModel.cs new file mode 100644 index 0000000..634d6c6 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserGroupModel.cs @@ -0,0 +1,112 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Models +{ + public class UserGroupModel + { + public int Id { get; set; } + public int LicenseId { get; set; } + public string Title { get; set; } + public DateTime? CreationDate { get; set; } + public DateTime? ModifiedDate { get; set; } + public bool? IsActive { get; set; } + public int? TotalUsers { get; set; } + + public static List GetLicenseUserGroups(AIADatabaseV5Entities dbContext, int LicenseId) + { + List UserGroupList = new List(); + UserGroupModel UserGroupObj = new UserGroupModel(); + try + { + var result = dbContext.usp_GetLicenseUserGroups(LicenseId).ToList(); + foreach (var item in result) + { + UserGroupObj = new UserGroupModel(); + UserGroupObj.Id = item.Id; + UserGroupObj.LicenseId = item.LicenseId; + UserGroupObj.Title = item.Title; + UserGroupObj.IsActive = item.IsActive; + UserGroupObj.ModifiedDate = item.ModifiedDate; + UserGroupObj.CreationDate = item.CreationDate; + UserGroupObj.TotalUsers = item.TotalUsers; + UserGroupList.Add(UserGroupObj); + } + } + catch (Exception ex) { } + return UserGroupList; + } + + public static List GetLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int LicenseId, int UserGroupId) + { + List UserList = new List(); + UserModel UserModelObj = new UserModel(); + try + { + var result = dbContext.GetAllUserWithGroup(LicenseId, UserGroupId).ToList(); + foreach (var item in result) + { + UserModelObj = new UserModel(); + UserModelObj.Id = item.Id; + UserModelObj.FirstName = item.FirstName; + UserModelObj.LastName = item.LastName; + UserModelObj.LoginId = item.LoginId; + UserModelObj.EmailId = item.EmailId; + UserModelObj.ProductEdition = item.Title; + UserModelObj.InGroup = item.InGroup; + UserList.Add(UserModelObj); + } + } + catch (Exception ex) { } + return UserList; + } + + public static bool InsertUpdateLicenseUserGroup(AIADatabaseV5Entities dbContext, UserGroupModel UserGroupEntity) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_InsertUpdateLicenseUserGroup(UserGroupEntity.Id, UserGroupEntity.LicenseId, UserGroupEntity.Title, + UserGroupEntity.CreationDate, UserGroupEntity.ModifiedDate, UserGroupEntity.IsActive, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + public static bool UpdateLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int UserGroupId, string UserIds) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_UpdateLicenseUserGroupUsers(UserGroupId, UserIds, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + public static bool DeleteLicenseUserGroup(AIADatabaseV5Entities dbContext, int UserGroupId) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_DeleteLicenseUserGroup(UserGroupId, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + + } + +} \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserModel.cs b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserModel.cs new file mode 100644 index 0000000..f73ebbf --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/UserModel.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using AIAHTML5.ADMIN.API.Entity; + +namespace AIAHTML5.ADMIN.API.Models +{ + public class UserModel + { + public int Id { get; set; } + public string FirstName { get; set; } + public string LastName { get; set; } + public string EmailId { get; set; } + public string LoginId { get; set; } + public string NewLoginId { get; set; } + public string Password { get; set; } + public int SecurityQuestionId { get; set; } + public string SecurityAnswer { get; set; } + public int CreatorId { get; set; } + public DateTime CreationDate { get; set; } + public DateTime DeactivationDate { get; set; } + public int ModifierId { get; set; } + public DateTime ModifiedDate { get; set; } + public int UserTypeId { get; set; } + public bool IsActive { get; set; } + public string ProductEdition { get; set; } + public int InGroup { get; set; } + + public static bool UpdateUserProfile(AIADatabaseV5Entities dbContext, int intUserID, string strFirstName, string strLastName, string strEmailID) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.UpdateUserProfile(intUserID, strFirstName, strLastName, strEmailID, spStatus); + if (spStatus.Value.ToString() == "1") + { + return true; + } + else + { + return false; + } + } + catch (Exception ex) + { + return false; + } + } + public static bool UpdateUserPassword(AIADatabaseV5Entities dbContext, int intUserID, string newPassword) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.UpdateAiaUserPassword(intUserID, newPassword, spStatus); + return (bool)spStatus.Value; + } + catch (Exception ex) + { + return false; + } + } + public static string UpdateUserId(AIADatabaseV5Entities dbContext, int id, string userId, string oldUserId) + { + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); + try + { + dbContext.usp_UpdateUserId(id, userId, oldUserId, spStatus); + if (spStatus.Value.ToString() == "1") + { + // return "success"; + return "1"; + } + else if (spStatus.Value.ToString() == "2") + { + return "2"; + // return "Already Exist Userid"; + } + else + { + return "fail"; + } + } + catch (Exception ex) + { + return ex.Message; + } + } + } +} \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/mergecode.txt b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/mergecode.txt new file mode 100644 index 0000000..434a2f5 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/mergecode.txt @@ -0,0 +1,62 @@ +//user.service.ts + + GetLicenseUserGroups(licensId: number) { + return this.http.get(this.commonService.resourceBaseUrl + "UserGroup/LicenseUserGroups?LicenseId=" + licensId) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + GetLicenseUserGroupUsers(licensId: number, UserGroupId: number) { + return this.http.get(this.commonService.resourceBaseUrl + "UserGroup/LicenseUserGroupUsers?LicenseId=" + licensId + "&UserGroupId=" + UserGroupId) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + InsertUpdateLicenseUserGroup(obj: any) { + //let options = new RequestOptions({ headers: this.headers }); + var jsonData = {'id': obj.id, 'licenseId': obj.licenseId, 'creationDate': obj.creationDate, 'modifiedDate': obj.modifiedDate, 'title': obj.title, 'isActive': obj.isActive }; + var headers = new Headers({ + 'Content-Type': 'application/json' + }); + return this.http.post(this.commonService.resourceBaseUrl + "UserGroup/InsertUpdateLicenseUserGroup", + JSON.stringify(jsonData), {headers: headers}) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + UpdateLicenseUserGroupUsers(userGroupId: number, userIds: string) { + //let options = new RequestOptions({ headers: this.headers }); + var jsonData = {'userGroupId': userGroupId, 'userIds': userIds }; + var headers = new Headers({ + 'Content-Type': 'application/json' + }); + return this.http.post(this.commonService.resourceBaseUrl + "UserGroup/UpdateLicenseUserGroupUsers", + JSON.stringify(jsonData), {headers: headers}) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); + } + + DeleteLicenseUserGroup(userGroupId: number) { + return this.http.get(this.commonService.resourceBaseUrl + "UserGroup/DeleteLicenseUserGroup?UserGroupId=" + userGroupId) + .map(this.extractData) + .catch((res: Response) => this.handleError(res)); +} + + +//app.routing.module + +import { UserGroup } from './components/UserEntity/usergroup.component'; + + + { path: 'usergroup', component: UserGroup } + + +//app.module.ts + +import { UserGroup } from './components/UserEntity/usergroup.component'; + +UserGroup + +//app.component.html + +
  • User Group
  • diff --git a/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/usergroup.component.html b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/usergroup.component.html new file mode 100644 index 0000000..9de3fd8 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/usergroup.component.html @@ -0,0 +1,204 @@ + +
    + +
    +

    {{mode}} User Group

    +
    + + + + + + + + + + + + + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + +
    +
    + +
    +
    +
    +
    + +
    + +
    + +
    +
    + + + + + + + + + + + + + + + + + +
    Group NameNumber of User(s)Created DateLast Modified Date
    + {{item.Title}} + {{item.TotalUsers}}{{item.CreationDate | date: 'MM/dd/yyyy'}}{{item.ModifiedDate | date: 'MM/dd/yyyy'}}
    +
    + +
    +
    + + + +
    +
    + +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    User group name is required
    +
    +
    +
    +
    +
    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + + +
    SelectFirst NameLast NameUser IDEmail IDProduct Edition
    + + + {{item.FirstName}}{{item.LastName}}{{item.UserId}}{{item.EmailId}}{{item.ProductEdition}}
    + +
    + +
    +
    + + +
    +
    + +
    + +
    + +
    +
    +
    + \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/usergroup.component.ts b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/usergroup.component.ts new file mode 100644 index 0000000..22449dd --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/usergroup.component.ts @@ -0,0 +1,267 @@ +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core'; +import { UserService } from './user.service'; +import { Router, ActivatedRoute } from '@angular/router'; +import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; +import { License } from '../UserEntity/datamodel'; +import { BsDatepickerModule } from 'ngx-bootstrap'; +import { Http, Response } from '@angular/http'; +import { DatePipe } from '@angular/common'; +import { BsModalService } from 'ngx-bootstrap/modal'; +import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; + +declare var $:any; + +@Component({ + templateUrl: './usergroup.component.html' +}) + +export class UserGroup implements OnInit { + + lstAccountNumbers: any; + lstLicenseUserGroups: any; + licenseUserGroup: any; + lstLicenseUserGroupUsers: any; + lstAllUsers: any; + mode: string = 'Search'; + license: License; + updateUserGroupFrm: FormGroup; + error: any; + alerts: string; + modalAlerts: string; + divClass: string = ''; + topPos: string = '2000px'; + selectedRow: number = 0; + selectedId: number = 0; + modalRef: BsModalRef; + checkedRecords: Array; + + constructor(private userService: UserService, private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder, private modalService: BsModalService) { } + + ngOnInit(): void + { + this.selectedRow = 0; + this.divClass = 'col-sm-12'; + this.license = new License(); + this.alerts = ''; + this.updateUserGroupFrm = this.fb.group({ + userGroupName: ['', Validators.required], + }); + this.GetLicenseAccounts(); + + $('#fixed_hdr2').fxdHdrCol({ + fixedCols: 0, + width: "100%", + height: 330, + colModal: [ + { width: 80, align: 'center' }, + { width: 200, align: 'center' }, + { width: 200, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 250, align: 'Center' }, + ], + sort: true + }); + if(document.getElementById("fixed_table_rc") != undefined){ + document.getElementById("fixed_table_rc").remove(); + } + var testScript = document.createElement("script"); + testScript.setAttribute("id", "fixed_table_rc"); + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); + testScript.setAttribute("type", "text/javascript"); + document.body.appendChild(testScript); + } + + openModal(template: TemplateRef) { + this.modalRef = this.modalService.show(template); + } + + onChange(Idx: number, Id: number, isChecked: boolean){ + if(isChecked){ + this.checkedRecords[Idx] = Id; + } + else{ + this.checkedRecords[Idx] = 0; + } + } + + SetClickedRow(i: number, item: any) { + this.selectedRow = i; + this.selectedId = item['Id']; + this.licenseUserGroup = item; + } + + BindFormFields(data){ + this.lstLicenseUserGroups = data; + this.licenseUserGroup = this.lstLicenseUserGroups[this.selectedRow]; + this.selectedId = this.licenseUserGroup['Id']; + } + + BindUserFormFields(data){ + this.lstLicenseUserGroupUsers = data; + if(this.mode == 'Edit'){ + this.checkedRecords = new Array(this.lstLicenseUserGroupUsers.length); + for (let i = 0; i < this.lstLicenseUserGroupUsers.length ; i++) { + if(this.lstLicenseUserGroupUsers[i].InGroup > 0){ + this.checkedRecords[i] = this.lstLicenseUserGroupUsers[i].Id; + } + } + } + else{ + this.lstLicenseUserGroupUsers = this.lstLicenseUserGroupUsers.filter(C => C.InGroup> 0); + } + } + + GetLicenseAccounts() { + this.userService.GetAccountNumber() + .subscribe(st => { this.lstAccountNumbers = st; }, error => this.error = error); + } + + GetLicenseUserGroups() { + this.alerts = ''; + this.userService.GetLicenseUserGroups(this.license.LicenseId) + .subscribe(st => { this.BindFormFields(st); }, error => this.error = error); + } + + GetLicenseUserGroupUsers() { + this.alerts = ''; + this.userService.GetLicenseUserGroupUsers(this.license.LicenseId, this.selectedId) + .subscribe(st => { this.BindUserFormFields(st); }, error => this.error = error); + } + + AccountNumberChanged(LicenseId: number){ + this.license.LicenseId = LicenseId; + this.lstLicenseUserGroups = null; + this.GetLicenseUserGroups(); + } + + AfterDeleteData(data, template) { + if (data.Status == "false") { + this.alerts = "License user group delete unsuccessfull"; + } else { + this.modalAlerts = "

    License user group deleted successfully

    "; + this.modalRef = this.modalService.show(template); + this.GetLicenseUserGroups(); + } + } + + AfterInsertData(data, template) { + if (data.Status == "false") { + this.alerts = "License user group save unsuccessfull"; + } else { + this.modalAlerts = "

    License user group saved successfully

    "; + this.modalRef = this.modalService.show(template); + this.GetLicenseUserGroups(); + } + } + + AfterUpdateData(data, template) { + if (data.Status == "false") { + this.alerts = "License user group update unsuccessfull"; + } else { + this.modalAlerts = "

    License user group updated successfully

    "; + this.modalRef = this.modalService.show(template); + this.GetLicenseUserGroups(); + } + } + + InsertLicenseUserGroup(title: string, template: TemplateRef) { + this.alerts = ''; + if(title == '' || title == undefined){ + this.alerts = "Please enter a name for user group."; + return; + } + var obj = { + 'id': 0, 'licenseId': this.license.LicenseId, 'title': title, + 'isActive': true, 'creationDate': new Date(), + 'modifiedDate': new Date() + }; + if(this.alerts == ''){ + return this.userService.InsertUpdateLicenseUserGroup(obj) + .subscribe( + n => (this.AfterInsertData(n, template)), + error => this.error = error); + } + } + + UpdateLicenseUserGroup(template: TemplateRef) { + this.alerts = ''; + var obj = { + 'id': this.licenseUserGroup.Id, + 'licenseId': this.license.LicenseId, + 'title': this.updateUserGroupFrm.controls['userGroupName'].value, + 'isActive': this.licenseUserGroup.IsActive, + 'creationDate': this.licenseUserGroup.CreationDate, + 'modifiedDate': this.licenseUserGroup.ModifiedDate + }; + if(this.alerts == ''){ + return this.userService.InsertUpdateLicenseUserGroup(obj) + .subscribe( + n => ( + this.UpdateLicenseUserGroupUsers(template) + ), + error => this.error = error); + } + } + + UpdateLicenseUserGroupUsers(template: TemplateRef) { + var userIds = ''; + this.checkedRecords.filter(C => C > 0).forEach(element => { + if(element > 0){ + userIds += element + ','; + } + }); + if(userIds!=''){ + userIds = userIds.substr(0, userIds.length - 1); + } + return this.userService.UpdateLicenseUserGroupUsers(this.selectedId, userIds) + .subscribe( + n => ( + this.AfterUpdateData(n, template) + ), + error => this.error = error); + } + + DeleteLicenseUserGroup(template: TemplateRef){ + this.modalRef.hide(); + this.alerts = ''; + if(this.selectedId == 0){ + this.alerts = "Please select a license user group"; + } + if(this.alerts == ''){ + return this.userService.DeleteLicenseUserGroup(this.selectedId) + .subscribe( + data => (this.AfterDeleteData(data, template)), + error => { + this.error = error; + this.alerts = "License user group delete unsuccessfull"; + }); + } + } + + EditLicenseUserGroup(){ + $('.ft_r thead tr th:eq(0)').show(); + this.mode = 'Edit'; + this.topPos = '100px'; + this.alerts = ''; + this.updateUserGroupFrm.controls['userGroupName'].setValue(this.licenseUserGroup.Title); + this.GetLicenseUserGroupUsers(); + } + + ViewLicenseUserGroup(){ + $('.ft_r thead tr th:eq(0)').hide(); + this.mode = 'View'; + this.topPos = '100px'; + this.alerts = ''; + this.updateUserGroupFrm.controls['userGroupName'].setValue(this.licenseUserGroup.Title); + this.GetLicenseUserGroupUsers(); + } + + CancelAddEdit(){ + this.mode = 'Search'; + this.topPos = '2000px'; + this.GetLicenseUserGroups(); + this.selectedRow = this.lstLicenseUserGroups.findIndex(C => C.Id == this.selectedId); + this.SetClickedRow(this.selectedRow, this.lstLicenseUserGroups.find(C => C.Id == this.selectedId)); + } +} diff --git a/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/users.component.ts b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/users.component.ts new file mode 100644 index 0000000..aa39cec --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usergroupmergecode/usergroupmergecode/users.component.ts @@ -0,0 +1,324 @@ +import { Component, OnInit, AfterViewInit,ViewChild } from '@angular/core'; +import { UserService } from './user.service'; +import { Router } from '@angular/router'; +import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; +import { FormsModule, ReactiveFormsModule } from '@angular/forms'; +import { User } from '../UserEntity/datamodel'; +import { UserManageRightsModel } from '../UserEntity/datamodel'; +import { Http, Response } from '@angular/http'; +//import { Global } from '../../Shared/global'; +//import { DBOperation } from 'S'; +import { Observable } from 'rxjs/Observable'; +import { ConfirmService } from '../../Shared/Confirm/confirm.service'; +import 'rxjs/Rx'; +import 'rxjs/add/operator/map'; +import 'rxjs/add/operator/filter'; +import { LoadingService } from '../../shared/loading.service'; +declare var $: any; +import { DatePipe } from '@angular/common'; +import { GlobalService } from '../../Shared/global'; +@Component({ + templateUrl:'./users.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html' +}) + +export class UsersList implements OnInit { + + Mode: string = 'Manage'; + modalTitle: string; + Users: FormGroup; + adduserFrm: FormGroup; + managerightFrm: FormGroup; + alerts: string; + public UserTypeList: any; + public AccountTypeList: any; + public UserList: any; + public UserManageRightsList: Array; + emailPattern = "^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$"; + public UserTypeListByLicense: any; + public AccountNumberList: any; + public ProductEditionList: any; + UserEntity: User; + public UserManageRightsEntity: UserManageRightsModel; + topPos: string = '2000px'; + datePipe: DatePipe = new DatePipe('en-US'); + error; + selectedRow: number = 0; + selectedId: number = 0; + divClass: string; + isActive: boolean; + NoRecord: string; + //@ViewChild("profileModal") + //profileModal: ModalComponent; + //errorMessage: any; + constructor(private _loadingService: LoadingService,private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http, + private _confirmService: ConfirmService,private global:GlobalService + ) { } + + ngOnInit(): void { + this.modalTitle = 'LIST USER'; + this.alerts = ''; + this.NoRecord = this.global.NoRecords; + this.Users = this.fb.group({ + FirstName:[''], + LastName: [''], + EmailId: [''], + AccountNumber: [''], + UserTypeId: [0], //bug#28162 + AccountTypeId: [0] + // Gender: ['', Validators.required], + // Email: [''] + + }); + this.adduserFrm = this.fb.group({ + id: [''], + UserName: ['', Validators.required], + Password: ['', [Validators.required, Validators.minLength(8)]], + ConfirmPassword: ['', Validators.required], + FirstName: ['', Validators.required], + LastName: ['', Validators.required], + EmailId: ['', Validators.required], + AccountNumber: [''], + UserType: [''], + AccountType: [''], + Createddate: [''], + LastModifiedDate: [''], + Createdby: [''], + Modifiedby: [''], + DeactivationDate: [''], + isActive: [false], + UserStatusActive: ['false'], + UserStatusInActive:[''] + }); + this.managerightFrm = this.fb.group({ + id: [''], + UserTypeTitle: [''] + }); + this._loadingService.ShowLoading("global-loading"); + this.GetUserType(); + this.GetAccountType(); + this._loadingService.HideLoading("global-loading"); + $('#fixed_hdr2').fxdHdrCol({ + fixedCols: 0, + width: "100%", + height: 300, + colModal: [ + { width: 180, align: 'center' }, + { width: 230, align: 'center' }, + { width: 150, align: 'Center' }, + { width: 150, align: 'Center' }, + { width: 350, align: 'Center' }, + { width: 200, align: 'Center' }, + { width: 130, align: 'Center' }, + { width: 120, align: 'center' }, + { width: 280, align: 'Center' }, + { width: 180, align: 'center' }, + { width: 200, align: 'center' }, + { width: 170, align: 'center' }, + { width: 80, align: 'center' }, + { width: 150, align: 'center' }, + { width: 150, align: 'center' }, + { width: 180, align: 'Center' }, + { width: 400, align: 'Center' }, + { width: 150, align: 'center' }, + { width: 110, align: 'center' }, + ], + sort: true + }); + document.getElementById("fixed_table_rc").remove(); + var testScript = document.createElement("script"); + testScript.setAttribute("id", "fixed_table_rc"); + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); + testScript.setAttribute("type", "text/javascript"); + document.body.appendChild(testScript); + this._loadingService.ShowLoading("global-loading"); + //this.bindUsers(); + this._loadingService.HideLoading("global-loading"); + + //this.GetUserList(); + } + handleChange(evt) { + debugger; + var target = evt.target; + if (target.value == 'true') { + this.isActive = true; + } + else if (target.value == 'false') { + this.isActive = false; + } + } + + public SetClickedRow(i: number, item: any) { + this.selectedRow = i; + this.selectedId = item['Id']; + this.UserEntity = item; + } + public SetClickedRowManageRight(j: number, item: any) { + this.selectedRow = j; + this.selectedId = item['Id']; + this.UserManageRightsList = item; + } + redirect() { + this.router.navigate(['/']); + } + + GetUserType() { + this.userservice.GetUserType().subscribe(x => { this.UserTypeList = x; }, error => this.error = error); + } + GetAccountType() { + this.userservice.GetAccountType().subscribe(x => { this.AccountTypeList = x; }, error => this.error = error); + } + GetUserList() { + //this.userservice.GetUserList().subscribe(x => { this.UserList = x; }, error => this.error = error); + } + GetUserRights() { + this.userservice.GetManageUserRights({ + UserId: this.managerightFrm.controls['id'].value, + UserType: this.managerightFrm.controls['UserTypeTitle'].value + }) + .subscribe(x => { console.log(x); this.UserManageRightsList = x }, error => { + this.error = error; + this.alerts = "" + this.error + ""; + }); + } + SearchUserList(this) + { + this._loadingService.ShowLoading("global-loading"); + var UserFilterControl = this.Users.value; + this.userservice.GetUserList( + { + FirstName: this.Users.controls['FirstName'].value, + LastName: this.Users.controls['LastName'].value, + EmailId: this.Users.controls['EmailId'].value, + AccountNumber: this.Users.controls['AccountNumber'].value, + UserTypeId: (this.Users.controls['UserTypeId'].value != null && this.Users.controls['UserTypeId'].value !='' ? this.Users.controls['UserTypeId'].value:0), + AccountTypeId: (this.Users.controls['AccountTypeId'].value != null && this.Users.controls['AccountTypeId'].value != ''? this.Users.controls['AccountTypeId'].value : 0), + + + }) + + .subscribe(x => { this.BindFormFields(x) }, error => this.error = error); + + } + BindFormFields(data) { + this.UserList = data; + if (this.UserList.length > 0) { + this.NoRecord = ''; + this._loadingService.HideLoading("global-loading"); + } + if (this.UserList.length == 0) { + this.NoRecord = this.global.NoRecords; + this._loadingService.HideLoading("global-loading"); + } + } + EditUser() { + debugger; + this.Mode = 'Edit'; + this.modalTitle = 'Edit USER'; + this.topPos = '100px'; + this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; + this.alerts = ''; + this.adduserFrm.controls['id'].setValue(this.UserEntity.Id) + this.adduserFrm.controls['FirstName'].setValue(this.UserEntity.FirstName) + this.adduserFrm.controls['LastName'].setValue(this.UserEntity.LastName) + this.adduserFrm.controls['EmailId'].setValue(this.UserEntity.EmailId) + this.adduserFrm.controls['UserName'].setValue(this.UserEntity.LoginId) + this.adduserFrm.controls['Password'].setValue(this.UserEntity.Password) + this.adduserFrm.controls['ConfirmPassword'].setValue(this.UserEntity.Password) + this.adduserFrm.controls['AccountNumber'].setValue(this.UserEntity.AccountNumber) + this.adduserFrm.controls['UserType'].setValue(this.UserEntity.UserTypeTitle) + this.adduserFrm.controls['AccountType'].setValue(this.UserEntity.AccountTypeTitle) + this.adduserFrm.controls['Createddate'].setValue(this.datePipe.transform(this.UserEntity.CreationDate, 'MM/dd/yyyy')) + this.adduserFrm.controls['LastModifiedDate'].setValue(this.datePipe.transform(this.UserEntity.ModifiedDate, 'MM/dd/yyyy')) + this.adduserFrm.controls['Createdby'].setValue(this.UserEntity.Createdby) + this.adduserFrm.controls['Modifiedby'].setValue(this.UserEntity.Modifiedby) + this.adduserFrm.controls['DeactivationDate'].setValue(this.datePipe.transform(this.UserEntity.DeactivationDate, 'MM/dd/yyyy')) + if (this.UserEntity.UserStatus == 'Active') { + this.adduserFrm.controls['UserStatusActive'].setValue('true') + } + else { + this.adduserFrm.controls['UserStatusActive'].setValue('false') + } + //this.adduserFrm.controls['UserStatusActive'].setValue(true) + //this.adduserFrm.controls['UserStatusInActive'].setValue(false) + this.isActive = (this.UserEntity.UserStatus=='Active'?true :false) + + } + + EditManageUserRights() { + this.Mode = 'ManageRight'; + this.modalTitle = 'MANAGE USER Right'; + this.topPos = '100px'; + this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; + this.alerts = ''; + this.managerightFrm.controls['id'].setValue(this.UserEntity.Id); + this.managerightFrm.controls['UserTypeTitle'].setValue(this.UserEntity.UserTypeTitle); + this.GetUserRights(); + } + + public UpdateUser(this) { + this.alerts = ''; + if (this.adduserFrm.value.UserName == '') { + this.alerts += 'User Name is required.'; + } + if (this.adduserFrm.value.Password == '') { + this.alerts += '
    Password of minimum 8 characters is required.'; + } + if (this.adduserFrm.value.ConfirmPassword == '') { + this.alerts += '
    Confirm Password is required.'; + } + if (this.adduserFrm.value.EmailId == '') { + this.alerts += '
    Email Id is required.'; + } + if (this.adduserFrm.value.FirstName == '') { + this.alerts += '
    First Name is required.'; + } + if (this.adduserFrm.value.LastName == '') { + this.alerts += '
    Last Name is required.'; + } + if (this.adduserFrm.value.newPassword != this.adduserFrm.value.confirmPassword) { + this.alerts += '
    Password and confirm password must be same'; + } + + if (this.adduserFrm.valid && this.alerts == '') { + this.adduserFrm.controls['isActive'].setValue(this.adduserFrm.value.UserStatusActive) + + var UserEntity = this.adduserFrm.value; + + return this.userservice.UpdateUserEntity(UserEntity) + .subscribe( + n => (this.AfterInsertData(n)), + error => { + this.error = error; + this.alerts = "" + this.error + ""; + }); + } + + } + + //public DeleteUnblockedUser(this) { + // this.alerts = ''; + //} + + AfterInsertData(data) { + + if (data == "User updated successfully") { + this.alerts = ''; + this._confirmService.activate("User updated successfully.", "alertMsg"); + } + //if (this.closeflag) { + // this.close.emit(null); + //} + //else { + //} + } + + ResetFormFields() { + //this.ChangeUserIdFrm.reset() + //this.ChangeUserIdFrm.controls['id'].setValue(this.user.Id) + //this.ChangeUserIdFrm.controls['loginid'].setValue(this.user.LoginId) + //this.ChangeUserIdFrm.controls['newloginid'].setValue('') + //this.ChangeUserIdFrm.controls['confirmloginid'].setValue('') + this.alerts = ''; + } + +} diff --git a/500-DBDump/AIA-StoredProcedures/usp_DeleteLicenseUserGroup.sql b/500-DBDump/AIA-StoredProcedures/usp_DeleteLicenseUserGroup.sql new file mode 100644 index 0000000..194927e --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_DeleteLicenseUserGroup.sql @@ -0,0 +1,43 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_DeleteLicenseUserGroup]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_DeleteLicenseUserGroup] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 14-Feb-2018 +-- Description: To insert or update a user group users of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_DeleteLicenseUserGroup] + -- Add the parameters for the stored procedure here + @UserGroupId int, @Status bit out +AS +BEGIN +SET NOCOUNT ON; + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + + delete from UserGroupToAIAUser where UserGroupId = @UserGroupId; + delete from UserGroup where Id = @UserGroupId; + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/usp_DeleteSiteAccount.sql b/500-DBDump/AIA-StoredProcedures/usp_DeleteSiteAccount.sql new file mode 100644 index 0000000..582afde --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_DeleteSiteAccount.sql @@ -0,0 +1,48 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_DeleteSiteAccount]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_DeleteSiteAccount] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 08-Feb-2018 +-- Description: To delete a site account for a license account and site +-- ==================================================== +create PROCEDURE [dbo].[usp_DeleteSiteAccount] + -- Add the parameters for the stored procedure here + @iSiteId int, @LicenseId int, @UserId int, + @Status bit out +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. +SET NOCOUNT ON; + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + + delete SLE from SiteToLicenseEdition SLE inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id where SLE.SiteId = @iSiteId and LicenseId = @LicenseId; + delete from AIAUserToSite where SiteId = @iSiteId and UserId = @UserId; + delete from Site where Id = @iSiteId; + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + diff --git a/500-DBDump/AIA-StoredProcedures/usp_DeleteSubscriptionPlan.sql b/500-DBDump/AIA-StoredProcedures/usp_DeleteSubscriptionPlan.sql new file mode 100644 index 0000000..fde68ea Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/usp_DeleteSubscriptionPlan.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetAccountNumber.sql b/500-DBDump/AIA-StoredProcedures/usp_GetAccountNumber.sql new file mode 100644 index 0000000..9102522 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_GetAccountNumber.sql @@ -0,0 +1,40 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetAccountNumber]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetAccountNumber] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 23-Dec-2009 +-- Description: To get the license id and account no of licenses of a type +-- ==================================================== +CREATE PROCEDURE [dbo].[usp_GetAccountNumber] + -- Add the parameters for the stored procedure here + @LicenseType int +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + if(@LicenseType = 0) + begin + SELECT License.Id,License.AccountNumber FROM License + WHERE License.IsActive = 1 + end + else + begin + SELECT License.Id,License.AccountNumber FROM License + WHERE License.IsActive = 1 and License.LicenseTypeId = @LicenseType + end +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetEditions.sql b/500-DBDump/AIA-StoredProcedures/usp_GetEditions.sql new file mode 100644 index 0000000..d501b25 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/usp_GetEditions.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetLicenseById.sql b/500-DBDump/AIA-StoredProcedures/usp_GetLicenseById.sql new file mode 100644 index 0000000..a3379c9 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_GetLicenseById.sql @@ -0,0 +1,74 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetLicenseById]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetLicenseById] +GO +-- ==================================================== +-- Author: Magic Software +-- Create date: 29-Jan-2018 +-- Description: To get a license information on the basis of LicenseId +-- ==================================================== +create PROCEDURE [dbo].[usp_GetLicenseById] + -- Add the parameters for the stored procedure here + @Id int +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + declare @SubscriptionStartDate datetime, @SubscriptionEndDate datetime, @NoOfImages int, @TotalAmount money, @RenewalDate datetime, + @SiteIp varchar(100), @SiteIpTo varchar(100), @SiteMasterIPTo varchar(100); + declare @UserId int, @Login varchar(100), @Password varchar(100), @SecurityQuestionId int, @Answer varchar(100); + declare @EditionId int, @TotalLogins int; + declare @EditionLoginText varchar(1000); + + declare CurEditionLogin cursor for + select EditionId, TotalLogins from LicenseToEdition where LicenseId = @Id; + + set @EditionLoginText = ''; + open CurEditionLogin + fetch NEXT FROM CurEditionLogin into @EditionId, @TotalLogins + while @@FETCH_STATUS = 0 + begin + set @EditionLoginText = @EditionLoginText + convert(varchar(5), @EditionId) + '-' + convert(varchar(5), @TotalLogins) + '|'; + fetch NEXT FROM CurEditionLogin into @EditionId, @TotalLogins + end + CLOSE CurEditionLogin + DEALLOCATE CurEditionLogin + set @EditionLoginText = SUBSTRING(@EditionLoginText, 1, len(@EditionLoginText) - 1); + + select top 1 + @SubscriptionStartDate = LSD.SubscriptionValidFrom, + @SubscriptionEndDate = LSD.SubscriptionValidThrough, + @RenewalDate = LSD.RenewalDate, + @NoOfImages = LSD.NoofImages, + @TotalAmount = LSD.TotalAmount + from LicenseSubscriptionDetail LSD where LSD.LicenseId = @Id order by LSD.Id desc; + + select top 1 @SiteIp = S.SiteIP, @SiteIpTo = S.SiteIPTo, @SiteMasterIPTo = S.SiteMasterIPTo from Site S + inner join SiteToLicenseEdition SLE ON S.Id = SLE.SiteId + inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id + where LE.LicenseId = @Id and S.IsMaster = 1 AND S.IsActive = 1 order by SLE.SiteId desc; + + select top 1 @UserId = US.Id, @Login = US.LoginId, @Password = US.Password, @SecurityQuestionId = US.SecurityQuestionId, + @Answer = US.SecurityAnswer from AIAUserToLicenseEdition UL inner join LicenseToEdition LE on UL.LicenseEditionId = LE.Id + inner join AIAUser US on UL.UserId = US.Id where LE.LicenseId = @Id order by LE.Id desc; + + select L.Id, L.LicenseTypeId, L.AccountNumber, L.AccountTypeId, L.Address1, L.Address2, L.LicenseeFirstName, L.LicenseeLastName, L.City, + L.CountryId, L.StateId, L.EmailId, L.InstitutionName, L.Phone, L.ProductId, L.Zip, L.TotalLogins, @EditionLoginText as EditionLogins, + @SubscriptionStartDate as SubscriptionStartDate, @SubscriptionEndDate as SubscriptionEndDate, @NoOfImages as NoOfImages, @TotalAmount as Price, + @SiteIp as SiteUrl, @SiteIpTo as SitToUrl, @SiteMasterIPTo as SiteMasterUrl, @UserId as UserId, @Login as Login, @Password as Password, + @SecurityQuestionId as SecurityQuestionId, @Answer as Answer, L.NoOfRenewals as TotalRenewals, @RenewalDate as RenewalDate, L.IsActive + from License L where L.Id = @Id; + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetLicenseModestySettings.sql b/500-DBDump/AIA-StoredProcedures/usp_GetLicenseModestySettings.sql new file mode 100644 index 0000000..081fabf --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_GetLicenseModestySettings.sql @@ -0,0 +1,50 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetLicenseModestySettings]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetLicenseModestySettings] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 05-Feb-2018 +-- Description: To get all the modesty settings of a license and its related editions +-- ==================================================== +create PROCEDURE [dbo].[usp_GetLicenseModestySettings] + -- Add the parameters for the stored procedure here + @iLicenseId int, @iBuildingLevelId int +AS +BEGIN + + IF 1=0 BEGIN + SET FMTONLY OFF + END + + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + IF @iBuildingLevelId = 0 + BEGIN + SELECT LicenseToEdition.Id as LicenseEditionId, Edition.Title, LicenseToEdition.IsModesty as IsModesty + FROM LicenseToEdition + INNER JOIN Edition ON LicenseToEdition.EditionId = Edition.Id + WHERE LicenseToEdition.LicenseId=@iLicenseId and Edition.IsActive=1 ORDER BY Edition.Priority + END + ELSE + BEGIN + SELECT LicenseToEdition.Id as LicenseEditionId, Edition.Title, SiteToLicenseEdition.IsModesty as IsModesty + FROM SiteToLicenseEdition + INNER JOIN LicenseToEdition ON SiteToLicenseEdition.LicenseEditionId = LicenseToEdition.Id + INNER JOIN Edition ON LicenseToEdition.EditionId = Edition.Id + WHERE SiteToLicenseEdition.SiteId=@iBuildingLevelId and Edition.IsActive=1 ORDER BY Edition.Priority + END + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetLicenseTypes.sql b/500-DBDump/AIA-StoredProcedures/usp_GetLicenseTypes.sql new file mode 100644 index 0000000..4621556 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/usp_GetLicenseTypes.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetLicenseUserGroups.sql b/500-DBDump/AIA-StoredProcedures/usp_GetLicenseUserGroups.sql new file mode 100644 index 0000000..dd827a2 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_GetLicenseUserGroups.sql @@ -0,0 +1,39 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetLicenseUserGroups]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetLicenseUserGroups] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 09-Feb-2018 +-- Description: To get all user groups of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_GetLicenseUserGroups] + -- Add the parameters for the stored procedure here + @LicenseId int +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + -- Insert statements for procedure here + select UG.*, UGU.TotalUsers from UserGroup UG left outer join + (select count(*) as TotalUsers, UserGroupId from UserGroupToAIAUser + group by UserGroupId) UGU on UG.Id = UGU.UserGroupId where UG.LicenseId = @LicenseId; + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + + + + diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetLicenses.sql b/500-DBDump/AIA-StoredProcedures/usp_GetLicenses.sql new file mode 100644 index 0000000..051b8c5 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/usp_GetLicenses.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetSiteAccountEditions.sql b/500-DBDump/AIA-StoredProcedures/usp_GetSiteAccountEditions.sql new file mode 100644 index 0000000..ab6c5d6 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_GetSiteAccountEditions.sql @@ -0,0 +1,36 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetSiteAccountEditions]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetSiteAccountEditions] +GO +-- ==================================================== +-- Author: Magic Software +-- Create date: 07-Feb-2018 +-- Description: To get a site account editions on the basis of siteid and licenseid +-- ==================================================== +create PROCEDURE [dbo].[usp_GetSiteAccountEditions] + -- Add the parameters for the stored procedure here + @SiteId int, + @LicenseId int +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + Select SLE.LicenseEditionId, E.Id, E.Title from SiteToLicenseEdition SLE + inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id + inner join License L on L.Id = LE.LicenseId + inner join Edition E on LE.EditionId = E.Id + where L.Id = @LicenseId and SLE.SiteId = @SiteId; + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetSiteById.sql b/500-DBDump/AIA-StoredProcedures/usp_GetSiteById.sql new file mode 100644 index 0000000..a680048 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_GetSiteById.sql @@ -0,0 +1,39 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetSiteById]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_GetSiteById] +GO +-- ==================================================== +-- Author: Magic Software +-- Create date: 07-Feb-2018 +-- Description: To get a site information on the basis of siteid +-- ==================================================== +create PROCEDURE [dbo].[usp_GetSiteById] + -- Add the parameters for the stored procedure here + @SiteId int +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + Select Site.Id,Site.SiteIp,Site.Title,ISNULL(Site.SiteIPTo,'') as SiteIPTo,ISNULL(Site.SiteMasterIPTo,'') as SiteMasterIPTo, Site.Address1, Site.Address2, + Site.Zip, Site.Phone, Site.City, Site.StateId, Site.CountryId, Site.IsMaster, Site.IsActive, + CONVERT(VARCHAR,Site.CreationDate,101) as CreationDate, + CONVERT(VARCHAR,Site.ModifiedDate,101) as ModifiedDate, + Site.InstituteName,Site.Department, AIAUser.Id as UserId,AIAUser.FirstName,AIAUser.EmailId + From ((Site INNER JOIN AIAUserToSite on Site.Id=AIAUserToSite.SiteId) + INNER JOIN AIAUser on AIAUserToSite.UserId = AIAUser.Id) + Where Site.id = @SiteId; + + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetSubscriptionPlans.sql b/500-DBDump/AIA-StoredProcedures/usp_GetSubscriptionPlans.sql new file mode 100644 index 0000000..083cb42 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/usp_GetSubscriptionPlans.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/usp_InsertDeleteUserManageRights.sql b/500-DBDump/AIA-StoredProcedures/usp_InsertDeleteUserManageRights.sql new file mode 100644 index 0000000..948e99b --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_InsertDeleteUserManageRights.sql @@ -0,0 +1,58 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_InsertDeleteUserManageRights]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_InsertDeleteUserManageRights] +GO + +-- ==================================================== +-- Author: Ebix +-- Create date: 12-Feb-2018 +-- Description: To delete and insert User Rights +-- ==================================================== +create PROCEDURE [dbo].[usp_InsertDeleteUserManageRights] + -- Add the parameters for the stored procedure here + @RoleName varchar(50),@ActivityId int, @UserId int,@RequestType varchar(20), + @Status bit out +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. +SET NOCOUNT ON; +declare @RoleId int; +declare @ParentId int; +Set @RoleId=(Select Id From UserType WHere Title=@RoleName); +set @ParentId=(select top 1 ParentId FROM Activity WHERE id =@ActivityId) + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + if(@RequestType='insert') + Begin + INSERT INTO AIAUserActivity(UserId,RoleId,ActivityId) + Select @UserId,@RoleId,Id from Activity Where ParentId=@ActivityId and IsActive=1 + End; + if(@RequestType='Remove') + begin + DELETE FROM AIAUserActivity + WHERE UserId = @UserId AND RoleId = @RoleId AND ActivityId IN (SELECT id FROM Activity WHERE ParentId=@ActivityId ) + end + + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + diff --git a/500-DBDump/AIA-StoredProcedures/usp_InsertSubscriptionPlan.sql b/500-DBDump/AIA-StoredProcedures/usp_InsertSubscriptionPlan.sql new file mode 100644 index 0000000..ae4f426 Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/usp_InsertSubscriptionPlan.sql differ diff --git a/500-DBDump/AIA-StoredProcedures/usp_InsertUpdateLicenseUserGroup.sql b/500-DBDump/AIA-StoredProcedures/usp_InsertUpdateLicenseUserGroup.sql new file mode 100644 index 0000000..5f216a3 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_InsertUpdateLicenseUserGroup.sql @@ -0,0 +1,47 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_InsertUpdateLicenseUserGroup]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_InsertUpdateLicenseUserGroup] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 12-Feb-2018 +-- Description: To insert or update a user group of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_InsertUpdateLicenseUserGroup] + -- Add the parameters for the stored procedure here + @Id int, @LicenseId int, @Title varchar(100), @CreationDate datetime, @ModifiedDate datetime, @IsActive bit, @Status bit out +AS +BEGIN + + SET NOCOUNT ON; + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + if(@Id = 0) + begin + insert into UserGroup(LicenseId, Title, CreationDate, ModifiedDate, IsActive) values(@LicenseId, @Title, @CreationDate, @ModifiedDate, @IsActive); + end + else + begin + update UserGroup set Title = @Title, CreationDate = @CreationDate, ModifiedDate = @ModifiedDate, @IsActive = @IsActive where Id = @Id; + end + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/usp_InsertUpdateSiteAccount.sql b/500-DBDump/AIA-StoredProcedures/usp_InsertUpdateSiteAccount.sql new file mode 100644 index 0000000..bf65716 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_InsertUpdateSiteAccount.sql @@ -0,0 +1,107 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_InsertUpdateSiteAccount]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_InsertUpdateSiteAccount] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 08-Feb-2018 +-- Description: To insert or update a site account for a license account and site +-- ==================================================== +create PROCEDURE [dbo].[usp_InsertUpdateSiteAccount] + -- Add the parameters for the stored procedure here + @iSiteId int, @sSiteIP varchar(2000), @sTitle varchar(100), @sInstituteName varchar(100), @sDepartment varchar(50), + @sAddress1 varchar(100), @sAddress2 varchar(100), @sCity varchar(50), @Zip varchar(20), @Phone varchar(30), + @StateId int, @CountryId int, @IsMaster bit, @CreationDate datetime, @ModifiedDate datetime, + @IsActive bit, @UserId int, @sSiteIPTo varchar(100), @LicenseId int, @SiteEditionIds varchar(1000), + @Status bit out +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. +SET NOCOUNT ON; + +DECLARE @list varchar(1000) +DECLARE @pos INT, @tempEditionId int, @tempLicenseEditionId int; +DECLARE @len INT, @tempModesty bit; +DECLARE @value varchar(1000) + +CREATE TABLE #LocalTempTable( +SiteId int, +LicenseEditionId int, +IsModesty bit); + +if(@SiteEditionIds != '') +begin + set @SiteEditionIds = @SiteEditionIds + ','; +end +SET @list = @SiteEditionIds + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + + IF @iSiteId = 0 + BEGIN + INSERT INTO [dbo].[Site]([SiteIP],[Title],[InstituteName],[Department],[Address1],[Address2], + [City],[Zip],[Phone],[StateId],[CountryId],[IsMaster],[CreationDate],[ModifiedDate],[IsActive],[SiteIPTo]) + VALUES(@sSiteIP, @sTitle, @sInstituteName, @sDepartment, @sAddress1, @sAddress2, @sCity, @Zip, @Phone, + @StateId, @CountryId, @IsMaster, @CreationDate, @ModifiedDate, @IsActive, @sSiteIPTo); + -- to get the last inserted identity value in the current session + SET @iSiteId=SCOPE_IDENTITY(); + insert into AIAUserToSite values(@UserId, @iSiteId); + END + ELSE + BEGIN + UPDATE [dbo].[Site] SET [SiteIP]=@sSiteIP, [Title]=@sTitle,[InstituteName]=@sInstituteName, + [Department]=@sDepartment, [Address1]=@sAddress1, [Address2]=@sAddress2,[City]=@sCity, + [Zip]=@Zip, [Phone]=@Phone, [StateId]=@StateId, [CountryId]=@CountryId, + [ModifiedDate]=@ModifiedDate, [IsActive]=@IsActive, [SiteIPTo]=@sSiteIPTo + WHERE [Id]=@iSiteId + END + + insert into #LocalTempTable + select SLE.* from SiteToLicenseEdition SLE inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id where + SLE.SiteId = @iSiteId and LicenseId = @LicenseId; + + delete SLE from SiteToLicenseEdition SLE inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id where + SLE.SiteId = @iSiteId and LicenseId = @LicenseId; + + set @pos = 0 + set @len = 0 + + WHILE CHARINDEX(',', @list, @pos+1)>0 + BEGIN + set @len = CHARINDEX(',', @list, @pos+1) - @pos; + set @value = SUBSTRING(@list, @pos, @len); + set @tempEditionId = convert(int, @value); + select @tempLicenseEditionId = Id from LicenseToEdition where LicenseId = @LicenseId and EditionId = @tempEditionId; + set @tempModesty = 0; + if(exists(select * from #LocalTempTable where LicenseEditionId = @tempLicenseEditionId and SiteId = @iSiteId)) + begin + select @tempModesty = IsModesty from #LocalTempTable where LicenseEditionId = @tempLicenseEditionId and SiteId = @iSiteId; + end + insert into SiteToLicenseEdition(SiteId, LicenseEditionId, IsModesty) values(@iSiteId, @tempLicenseEditionId, @tempModesty); + set @pos = CHARINDEX(',', @list, @pos+@len) + 1; + END + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO + diff --git a/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseBasicSettings.sql b/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseBasicSettings.sql new file mode 100644 index 0000000..cd3c0e8 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseBasicSettings.sql @@ -0,0 +1,49 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseBasicSettings]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_UpdateLicenseBasicSettings] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 02-Feb-2018 +-- Description: To update a license account basic values +-- ==================================================== +create PROCEDURE [dbo].[usp_UpdateLicenseBasicSettings] + -- Add the parameters for the stored procedure here + @iLicenseId int, @sLicenseeFname varchar(50), @sLicenseeLname varchar(50), + @sInstitutionName varchar(100)='', @sAddress1 varchar(100)='', + @sAddress2 varchar(100)='', @sCity varchar(50)='', @sZip varchar(20)='', @iStateId int, @iCountryId int, + @sPhone varchar(30) = '', @sEmailId varchar(50), + @Status bit out +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + UPDATE License SET LicenseeFirstName = @sLicenseeFname, LicenseeLastName = @sLicenseeLname, + InstitutionName = @sInstitutionName, Address1 = @sAddress1, Address2 = @sAddress2, EmailId = @sEmailId, + City = @sCity, Zip = @sZip, Phone = @sPhone, StateId = @iStateId, CountryId = @iCountryId + where Id = @iLicenseId; + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO diff --git a/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseModestySettings.sql b/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseModestySettings.sql new file mode 100644 index 0000000..ddd209f --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseModestySettings.sql @@ -0,0 +1,52 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseModestySettings]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_UpdateLicenseModestySettings] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 05-Feb-2018 +-- Description: To update the modesty settings of a license edition or its site +-- ==================================================== +create PROCEDURE [dbo].[usp_UpdateLicenseModestySettings] + -- Add the parameters for the stored procedure here + @LicenseEditionId int, + @SiteId int, + @IsModesty bit, + @Status bit out +AS +BEGIN + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + if(@SiteId = 0) + begin + UPDATE LicenseToEdition SET IsModesty = @IsModesty where Id = @LicenseEditionId; + end + else + begin + UPDATE SiteToLicenseEdition SET IsModesty = @IsModesty where SiteId = @SiteId and LicenseEditionId = @LicenseEditionId; + end + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO diff --git a/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseModuleStatus.sql b/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseModuleStatus.sql new file mode 100644 index 0000000..3fdc647 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseModuleStatus.sql @@ -0,0 +1,51 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseModuleStatus]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_UpdateLicenseModuleStatus] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 06-Feb-2018 +-- Description: To insert or update the module status on or off for a license +-- ==================================================== +CREATE PROCEDURE [dbo].[usp_UpdateLicenseModuleStatus] + @LicenseId int, + @ModuleId int, + @ModuleStatus bit, + @Status bit out +AS +BEGIN + + -- SET NOCOUNT ON added to prevent extra result sets from + -- interfering with SELECT statements. + SET NOCOUNT ON; + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + if(exists(select * from ModuleToLicense where ModuleId = @ModuleId and LicenseId = @LicenseId)) + begin + UPDATE ModuleToLicense SET Status = @ModuleStatus where ModuleId = @ModuleId and LicenseId = @LicenseId; + end + else + begin + insert into ModuleToLicense(LicenseId, ModuleId, Status) values(@LicenseId, @ModuleId, @ModuleStatus); + end + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseUserGroupUsers.sql b/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseUserGroupUsers.sql new file mode 100644 index 0000000..8797db8 --- /dev/null +++ b/500-DBDump/AIA-StoredProcedures/usp_UpdateLicenseUserGroupUsers.sql @@ -0,0 +1,63 @@ +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_NULLS ON +GO + +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseUserGroupUsers]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) +drop procedure [dbo].[usp_UpdateLicenseUserGroupUsers] +GO + +-- ==================================================== +-- Author: Magic Software +-- Create date: 14-Feb-2018 +-- Description: To insert or update a user group users of a license +-- ==================================================== +create PROCEDURE [dbo].[usp_UpdateLicenseUserGroupUsers] + -- Add the parameters for the stored procedure here + @UserGroupId int, @UserIds varchar(2000), @Status bit out +AS +BEGIN +SET NOCOUNT ON; + +DECLARE @pos INT, @tempUserId int; +DECLARE @len INT; +DECLARE @value varchar(10); + +if(@UserIds != '') +begin + set @UserIds = @UserIds + ','; +end + + set @Status = 0; + BEGIN TRY + BEGIN TRANSACTION + + delete UGU from UserGroupToAIAUser UGU where UserGroupId = @UserGroupId; + + set @pos = 0 + set @len = 0 + + WHILE CHARINDEX(',', @UserIds, @pos+1)>0 + BEGIN + set @len = CHARINDEX(',', @UserIds, @pos+1) - @pos; + set @value = SUBSTRING(@UserIds, @pos, @len); + set @tempUserId = convert(int, @value); + insert into UserGroupToAIAUser(UserGroupId, UserId) values(@UserGroupId, @tempUserId); + set @pos = CHARINDEX(',', @UserIds, @pos+@len) + 1; + END + + COMMIT TRANSACTION + set @Status = 1; + END TRY + BEGIN CATCH + IF @@TRANCOUNT > 0 + ROLLBACK TRANSACTION + END CATCH + +END + +GO +SET QUOTED_IDENTIFIER OFF +GO +SET ANSI_NULLS ON +GO \ No newline at end of file diff --git a/500-DBDump/AIA-StoredProcedures/usp_UpdateSubscriptionPlan.sql b/500-DBDump/AIA-StoredProcedures/usp_UpdateSubscriptionPlan.sql new file mode 100644 index 0000000..e502a7c Binary files /dev/null and b/500-DBDump/AIA-StoredProcedures/usp_UpdateSubscriptionPlan.sql differ -- libgit2 0.21.4