diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/App_Start/WebApiConfig.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/App_Start/WebApiConfig.cs
index 1979338..2cfc653 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/App_Start/WebApiConfig.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/App_Start/WebApiConfig.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Configuration;
using System.Linq;
using System.Web.Http;
using System.Web.Http.Cors;
@@ -17,8 +18,14 @@ namespace AIAHTML5.ADMIN.API
.Remove(GlobalConfiguration.Configuration.Formatters.XmlFormatter);
// Configure cross domain access
- var cors = new EnableCorsAttribute("http://localhost:4200, http://localhost:4201, http://localhost:91", "*", "*");
- config.EnableCors(cors);
+ //var cors = new EnableCorsAttribute("http://localhost:4200, http://localhost:4201, http://localhost:91", "*", "*");
+ //config.EnableCors(cors);
+ string Enablecors = ConfigurationManager.AppSettings["Enablecors"];
+ if (Enablecors == "false")
+ {
+ EnableCorsAttribute cors = new EnableCorsAttribute("http://localhost:4200", "*", "GET,POST");
+ config.EnableCors(cors);
+ }
// Web API routes
config.MapHttpAttributeRoutes();
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Web.config b/400-SOURCECODE/AIAHTML5.ADMIN.API/Web.config
index 7a62d07..b3a07d2 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Web.config
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Web.config
@@ -12,6 +12,7 @@
+
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts
index fe092d2..166c1a2 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts
@@ -4,6 +4,8 @@ import { ManageDiscountCodeService } from './components/ManageDiscountCode/manag
import { SubscriptionPriceService } from './components/SubscriptionPrice/subscriptionprice.service';
import { LicenseService } from './components/LicenseEntity/license.service';
import { ReportService } from './components/Reports/report.service';
+//import { MyAuthService } from './shared/my-auth.service';
+import { GlobalService } from './Shared/global';
@Component({
selector: 'app-component',
templateUrl: '../app/app.component.html',
@@ -12,8 +14,11 @@ import { ReportService } from './components/Reports/report.service';
export class AppComponent implements OnInit {
- constructor(private userservice: UserService) { }
-
+ constructor(private userservice: UserService, private global: GlobalService) { }
+
ngOnInit(): void { }
-
+ logout() {
+ localStorage.removeItem('loggedInUserDetails');
+ window.location.href = this.global.LiveURL;
+ }
}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts
index e905ccf..d3df401 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts
@@ -48,6 +48,17 @@ import { ContenteditableModelDirective } from './shared/contenteditabledirective
import { LoadingService } from './shared/loading.service';
import { PagerComponent } from './shared/Pager/pager.component';
import { NumberOnlyDirective } from './shared/numberonlydirective';
+//import { MyAuthService } from './shared/my-auth.service';
+//import { AngularFireAuth } from 'angularfire2/auth';
+//import { FirebaseApp, AngularFireModule } from 'angularfire2';
+//import 'firebase/storage'
+//import * as firebase from 'firebase/app';
+//export const firebaseConfig = {
+// apiKey: 'xxxxxxxxxxxxxxxxxxxxx',
+// authDomain: 'xxxxxxxxxxxxxxxxxxxxx',
+// databaseURL: 'xxxxxxxxxxxxxxxxxxxxx',
+// storageBucket: 'xxxxxxxxxxxxxxxxxxxxx'
+//};
@NgModule({
declarations: [
@@ -61,14 +72,16 @@ import { NumberOnlyDirective } from './shared/numberonlydirective';
SubscriptionCancellationReport, NetAdSubscriptionReport,
SiteLicenseUsageReport, DiscountCodeReport, ImageExportReport,
EditLicenseBasicSettings, LicenseModestySettings,
- LicenseModuleSettings, SiteLicenseAccount, UserGroup, PagerComponent,
- NumberOnlyDirective
+ LicenseModuleSettings, SiteLicenseAccount, UserGroup, PagerComponent, NumberOnlyDirective
],
imports: [
BrowserModule, AppRoutingModule, HttpClientModule, FormsModule, ReactiveFormsModule, HttpModule, Ng2Bs3ModalModule,
BsDatepickerModule.forRoot(), ModalModule.forRoot()//ModalModule.forRoot()
+ // , AngularFireModule.initializeApp(firebaseConfig),
],
- providers: [GlobalService, ConfirmService, BsModalService, LoadingService, CsvService,
+ providers: [GlobalService, ConfirmService, BsModalService, LoadingService, CsvService,
+ // MyAuthService, AngularFireAuth, FirebaseApp, AngularFireModule,
+
//AuthService,
//AuthGuard,
//{
@@ -76,7 +89,9 @@ import { NumberOnlyDirective } from './shared/numberonlydirective';
// useClass: MyInterceptor,
// multi: true
//}
- { provide: APP_BASE_HREF, useValue: '/' }
+ { provide: APP_BASE_HREF, useValue: '/Admin-UI' }
+ //{ provide: APP_BASE_HREF, useValue: '/' }
+
],
bootstrap: [AppComponent]
})
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.ClearSessionManager.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBackGroundArtList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBaseLayer.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBitmask.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegion.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionView.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetBodyRegionViewList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetDissectibleContent.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetGenderList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerModel.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLayerdata.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetLexiconTermList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetNavigatorModel.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetOverLayLayerList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetPLRModel.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetPolygonForId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureGroupList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetStructureList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetTermNumberForContentId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientation.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetViewOrientationList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_GetVocabTermModal.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DA_LayerNumberInternal.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DeleteIncorrectLoginAttempts.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DeleteLicense.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.DeleteUserSession.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_CreateUser.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetAccountTypeList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetCountryList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetCourseConductedList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetInstitutionList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetInternetProductList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetMultimediaProductList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetProductRequiredList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetReferList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSecurityQuestionList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetStateList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionDuration.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionEndDate.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlan.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPlanInfo.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetSubscriptionPrice.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_GetUsername.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_InsertPaymentTransaction.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.EC_UpdateUser.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetAIALicenseDetails.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetAccountModule.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetAllEditionForLicense.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetAllLoginFailureCauses.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatus.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetAllModuleStatusWithSlug.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetAllUserWithGroup.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetAttributeTypeList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetAttributeValueList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByAccNoAndType.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserByUserType.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetBlockedUserDetailsByUserIdAndUserTypeId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetCAMSearch.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetCancelledLicenses.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetContentAttributeData.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetContentList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_25042017.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary_bkp.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountCodes.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountDetails.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountReport.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetDiscountedPrice.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetEditionsBySiteAccount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetEncyclopediaSearch.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetExpiringLicenses.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetExportedImageDetails.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetImagePinData.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetInDepthSearch.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetIncorrectLoginAttempt.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLabExcerciseByUserId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseByIPAndAccount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseBySiteId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailByUserId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseDetailsById.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdByUserId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionIdForUser.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseEditionsForModesty.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdBySiteUrl.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdByUserId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLicenseIdEditionIdByUserId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetLoginFailureErrorReport.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetModuleStatusByLicenseId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetModulesByUserId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdDetailReport.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetProductFeatures.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSchedulerAlertEmail.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchDetails.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchTerms.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUserList.sql
diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUsers.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUsers.sql
new file mode 100644
index 0000000..b6542e5
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSearchUsers.sql
@@ -0,0 +1,191 @@
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GetSearchUsers]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[GetLicenseIdByUserId]
+GO
+alter PROCEDURE [dbo].[GetSearchUsers]--'','','','',0,0,0,1,10,0
+ -- Add the parameters for the stored procedure here
+ @sFirstName varchar(100) = '', @sLastName varchar(100) = '', @sEmailId varchar(100) = '',
+ @sAccoutNumber varchar(100) ='', @iUserTypeId int, @iAccountTypeId int, @iLoginUserType int,
+ @pageNo int, @pageLength int, @recordCount int out
+AS
+BEGIN
+ IF 1=0 BEGIN
+ SET FMTONLY OFF
+ END
+
+ DECLARE @SQL NVARCHAR(MAX)
+ -- create a temporary table to store the desired results of user on the basis of parameter
+ CREATE TABLE #UserResult
+ (
+ RowNums int IDENTITY PRIMARY KEY,
+ Id INT,
+ FirstName VARCHAR(100),
+ LastName VARCHAR(100),
+ LoginId VARCHAR(50),
+ EmailId VARCHAR(50),
+ UserTypeTitle VARCHAR(50),
+ Password VARCHAR(50),
+ CreationDate DATETIME,
+ ModifiedDate DATETIME,
+ AccountNumber VARCHAR(50) DEFAULT '',
+ AccountTypeTitle VARCHAR(50) DEFAULT '',
+ EditionType VARCHAR(50) DEFAULT '',
+ UserStatus VARCHAR(8),
+ UserTypeId INT,
+ EditionTypeId INT DEFAULT ''
+ )
+ /*SET @sFirstName = REPLACE(@sFirstName,' ',' OR ')
+ SET @sLastName = REPLACE(@sLastName,' ',' OR ')*/
+ SET @SQL = ''
+ IF LEN(@sAccoutNumber) > 0 OR @iAccountTypeId > 0
+ BEGIN
+ -- fetch account number, state, zip, country of the license to which the user is belonged
+
+ SET @SQL = 'INSERT INTO #UserResult (Id, FirstName, LastName, LoginId, EmailId, UserTypeTitle, Password, CreationDate,
+ ModifiedDate, AccountNumber, AccountTypeTitle, EditionType, UserStatus, UserTypeId, EditionTypeId)
+ SELECT AIAUser.Id, ISNULL(AIAUser.FirstName,''''), ISNULL(AIAUser.LastName,''''), AIAUser.LoginId, ISNULL(AIAUser.EmailId,'''') as EmailId,
+ UserType.Title as UserTypeTitle, AIAUser.Password, AIAUser.CreationDate, ISNULL(AIAUser.ModifiedDate,'''') as ModifiedDate,
+ ISNULL(License.AccountNumber,'''') as AccountNumber, ISNULL(AccountType.Title,'''') as AccountTypeTitle,
+ ISNULL(Edition.Title,'''') as EditionType,
+ (CASE AIAUser.IsActive WHEN 1 THEN ''Active'' ELSE ''Inactive'' END) as UserStatus,
+ UserType.Id as UserTypeId, ISNULL(Edition.Id,'''') as EditionTypeId
+ FROM AIAUser
+ INNER JOIN UserType ON UserType.Id = AIAUser.UserTypeId
+ INNER JOIN AIAUserToLicenseEdition ON AIAUser.Id = AIAUserToLicenseEdition.UserId
+ INNER JOIN LicenseToEdition ON AIAUserToLicenseEdition.LicenseEditionId = LicenseToEdition.Id
+ INNER JOIN License ON LicenseToEdition.LicenseId = License.Id
+ INNER JOIN AccountType ON AccountType.Id = License.AccountTypeId
+ INNER JOIN Edition ON Edition.Id = LicenseToEdition.EditionId
+ WHERE
+ License.IsActive = 1
+ AND UserType.Priority >' +CONVERT(VARCHAR(20),@iLoginUserType)
+
+ IF LEN(@sAccoutNumber)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND License.AccountNumber = '''+@sAccoutNumber+''''
+ END
+ IF @iAccountTypeId > 0
+ BEGIN
+ SET @SQL = @SQL + ' AND License.AccountTypeId = '''+CONVERT(VARCHAR(20),@iAccountTypeId)+''''
+ END
+ IF LEN(@sFirstName)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND (AIAUser.FirstName LIKE ''%'+@sFirstName+'%'')' --CONTAINS(AIAUser.FirstName, '''+@sFirstName+''')'
+ END
+ IF LEN(@sLastName)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND (AIAUser.LastName LIKE ''%'+@sLastName+'%'')'--CONTAINS(AIAUser.LastName, '''+@sLastName+''')'
+ END
+ IF LEN(@sEmailId)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND AIAUser.EmailId = '''+@sEmailId+''''
+ END
+ IF @iUserTypeId>0
+ BEGIN
+ SET @SQL = @SQL + ' AND AIAUser.UserTypeId = '''+CONVERT(VARCHAR(20),@iUserTypeId)+''''
+ END
+ -- select @SQL
+ EXEC SP_EXECUTESQL @SQL
+
+ END
+ ELSE
+ BEGIN
+
+ SET @SQL = 'INSERT INTO #UserResult (Id, FirstName, LastName, LoginId, EmailId, UserTypeTitle, Password, CreationDate,
+ ModifiedDate, UserStatus, UserTypeId)
+ SELECT AIAUser.Id, ISNULL(AIAUser.FirstName,''''), ISNULL(AIAUser.LastName,''''),
+ AIAUser.LoginId, ISNULL(AIAUser.EmailId,''''), UserType.Title, AIAUser.Password, AIAUser.CreationDate,
+ ISNULL(AIAUser.ModifiedDate,''''), (CASE AIAUser.IsActive WHEN 1 THEN ''Active'' ELSE ''Inactive'' END),
+ UserType.Id
+ FROM AIAUser
+ INNER JOIN UserType ON UserType.Id = AIAUser.UserTypeId
+ WHERE UserType.Title in (''General Admin'')'
+
+ IF LEN(@sFirstName)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND (AIAUser.FirstName LIKE ''%'+@sFirstName+'%'')'--CONTAINS(AIAUser.FirstName, '''+@sFirstName+''')'
+ END
+ IF LEN(@sLastName)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND (AIAUser.LastName LIKE ''%'+@sLastName+'%'')'--CONTAINS(AIAUser.LastName, '''+@sLastName+''')'
+ END
+ IF LEN(@sEmailId)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND AIAUser.EmailId = '''+@sEmailId+''''
+ END
+ IF @iUserTypeId>0
+ BEGIN
+ SET @SQL = @SQL + ' AND AIAUser.UserTypeId = '''+CONVERT(VARCHAR(20),@iUserTypeId)+''''
+ END
+ -- select @SQL
+ EXEC SP_EXECUTESQL @SQL
+
+ -- fetch account number, state, zip, country of the license to which the user is belonged
+ SET @SQL = 'INSERT INTO #UserResult (Id, FirstName, LastName, LoginId, EmailId, UserTypeTitle, Password, CreationDate,
+ ModifiedDate, AccountNumber, AccountTypeTitle, EditionType, UserStatus, UserTypeId, EditionTypeId)
+ SELECT AIAUser.Id, ISNULL(AIAUser.FirstName,''''), ISNULL(AIAUser.LastName,''''), AIAUser.LoginId, ISNULL(AIAUser.EmailId,''''),
+ UserType.Title, AIAUser.Password, AIAUser.CreationDate, ISNULL(AIAUser.ModifiedDate,''''),
+ License.AccountNumber, AccountType.Title, Edition.Title,
+ (CASE AIAUser.IsActive WHEN 1 THEN ''Active'' ELSE ''Inactive'' END), UserType.Id, Edition.Id
+ FROM AIAUser
+ INNER JOIN UserType ON UserType.Id = AIAUser.UserTypeId
+ INNER JOIN AIAUserToLicenseEdition ON AIAUser.Id = AIAUserToLicenseEdition.UserId
+ INNER JOIN LicenseToEdition ON AIAUserToLicenseEdition.LicenseEditionId = LicenseToEdition.Id
+ INNER JOIN License ON LicenseToEdition.LicenseId = License.Id
+ INNER JOIN AccountType ON AccountType.Id = License.AccountTypeId
+ INNER JOIN Edition ON Edition.Id = LicenseToEdition.EditionId
+ WHERE
+ UserType.Title NOT IN (''Super Admin'',''General Admin'')
+ AND License.IsActive = 1'
+
+ IF LEN(@sAccoutNumber)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND License.AccountNumber = '''+@sAccoutNumber+''''
+ END
+ IF @iAccountTypeId > 0
+ BEGIN
+ SET @SQL = @SQL + ' AND License.AccountTypeId = '''+CONVERT(VARCHAR(20),@iAccountTypeId)+''''
+ END
+ IF LEN(@sFirstName)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND (AIAUser.FirstName LIKE ''%'+@sFirstName+'%'')'--CONTAINS(AIAUser.FirstName, '''+@sFirstName+''')'
+ END
+ IF LEN(@sLastName)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND (AIAUser.LastName LIKE ''%'+@sLastName+'%'')'--CONTAINS(AIAUser.LastName, '''+@sLastName+''')'
+ END
+ IF LEN(@sEmailId)>0
+ BEGIN
+ SET @SQL = @SQL + ' AND AIAUser.EmailId = '''+@sEmailId+''''
+ END
+ IF @iUserTypeId>0
+ BEGIN
+ SET @SQL = @SQL + ' AND AIAUser.UserTypeId = '''+CONVERT(VARCHAR(20),@iUserTypeId)+''''
+ END
+ --select @SQL
+ EXEC SP_EXECUTESQL @SQL
+
+ END
+ -- Selecting the desired result from temporary table
+ Select RowNum,Id, FirstName, LastName,LoginId, EmailId,UserTypeTitle, Password, CreationDate,
+ ModifiedDate, AccountNumber, AccountTypeTitle, EditionType, UserStatus, UserTypeId,EditionTypeId
+ from (
+ SELECT ROW_NUMBER() OVER (ORDER BY Id) AS RowNum ,Id, FirstName, LastName, LoginId, EmailId, UserTypeTitle, Password, CreationDate,
+ ModifiedDate, AccountNumber, AccountTypeTitle, EditionType, UserStatus, UserTypeId, EditionTypeId FROM #UserResult) as usr
+ WHERE RowNum > @pageLength * (@pageNo - 1) AND RowNum <= @pageLength * @pageNo order by Id --RowNum BETWEEN @pageNo AND (@pageNo - 1) * @pageLength
+--SELECT RowNum, Id, FirstName, LastName, LoginId, EmailId, UserTypeTitle, Password, CreationDate,
+-- ModifiedDate, AccountNumber, AccountTypeTitle, EditionType, UserStatus, UserTypeId, EditionTypeId FROM #UserResult
+-- where RowNum > (@pageLength * (@pageNo - 1)) AND (RowNo <= (@pageLength * @pageNo)) order by RowNum
+ -- order by Id
+ -- order by Id OFFSET ((@pageNo - 1) * @pageLength) ROWS FETCH NEXT @pageLength ROWS ONLY;
+
+
+
+ --Calculate total number of records
+ select @recordCount = count(ResultTable.Id) from (SELECT Id, FirstName, LastName, LoginId, EmailId, UserTypeTitle, Password, CreationDate,
+ ModifiedDate, AccountNumber, AccountTypeTitle, EditionType, UserStatus, UserTypeId, EditionTypeId FROM #UserResult) as ResultTable;
+
+ -- Dropping the temporary table
+ DROP TABLE #UserResult
+END
+
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSiteAccoutDetail.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSiteIpByAccountNumber.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSiteLicenseUsageReport.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSubscribedLicenses.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetSubscriptionDetailsByLicenseId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetTermNumberData.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetTermsAndConditions.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetTermsOfServiceText.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetThreeDHighLightData.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoggedInUsersByLicenseIdAndEditionId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetTotalLoginsByLicenseEditionId.StoredProcedure.sql
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..3503e1a
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUsageReport_OLD_PROC.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUserByUserId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUserDetailsByLoginIdAndPassword.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUserInGroup.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUserInfoByEmailId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUserModulesByLicenseId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUserSessionDetails.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUserTyeByAccountNumber.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetUserlActivities.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.IncorrectLoginAttempt.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertAIAUser.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertDemoLicenseAccount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempt.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertIncorrectLoginAttempts.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetail_1.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginDetailsInSessionManager.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertLoginErrorLog.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertNewDiscount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertNewLicenseAccount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertResellerLicenseAccount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertSingleLicenseAccount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertTestLicenseAccount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertUpdateSiteAccount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.InsertUserSessionDetails.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.NewDeleteCommand.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.NewInsertCommand.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.NewUpdateCommand.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.StartResellerSubscription.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateDiscountStatus.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateIncorrectLoginAttempts.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseAccount.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseModule.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseStatus.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateLicenseTermAcceptedStatus.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateUserPassword.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateUserProfile.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.getEditionData.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_DB_TblRowCOUNT.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_DeleteSubscriptionPlan.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountNumber.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetAccountTypeList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetEditions.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseById.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenseTypes.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetLicenses.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetManageRights.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetProductEditionByLicense.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSearchUserList.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetSubscriptionPlans.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.StoredProcedure.sql
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..715969f
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetUserType.sql
@@ -0,0 +1,26 @@
+
+alter 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 and Id > 1
+ORDER BY Priority
+ end
+
+END
+
+
+
diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_GetlicensesList.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetlicensesList.sql
new file mode 100644
index 0000000..bfe91ba
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_GetlicensesList.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertAIAUser.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_InsertSubscriptionPlan.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateAIAUser.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateSubscriptionPlan.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.StoredProcedure.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateblockedUser.StoredProcedure.sql
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/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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/usp_DeleteSubscriptionPlan.sql
diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetAccountNumber.sql b/500-DBDump/AIA-StoredProcedures/usp_GetAccountNumber.sql
new file mode 100644
index 0000000..7942094
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/usp_GetAccountNumber.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/usp_GetEditions.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/usp_GetLicenseTypes.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/usp_GetLicenses.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/usp_GetSubscriptionPlans.sql
diff --git a/500-DBDump/AIA-StoredProcedures/usp_GetlicensesList.sql b/500-DBDump/AIA-StoredProcedures/usp_GetlicensesList.sql
new file mode 100644
index 0000000..bfe91ba
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/usp_GetlicensesList.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/usp_InsertSubscriptionPlan.sql
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
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/usp_UpdateSubscriptionPlan.sql