Commit 5b6c2954e67b43ade73c14d565b0acd2fc5ed3c0

Authored by Harpreet Banwait
1 parent 4feccbf6

Bug Fixes

400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj
... ... @@ -511,9 +511,15 @@
511 511 <Compile Include="Entity\usp_GetProductEditionByLicense_Result.cs">
512 512 <DependentUpon>AIADBEntity.tt</DependentUpon>
513 513 </Compile>
  514 + <Compile Include="Entity\usp_GetSiteAccountAdmin_Result.cs">
  515 + <DependentUpon>AIADBEntity.tt</DependentUpon>
  516 + </Compile>
514 517 <Compile Include="Entity\usp_GetSiteAccountEditions_Result.cs">
515 518 <DependentUpon>AIADBEntity.tt</DependentUpon>
516 519 </Compile>
  520 + <Compile Include="Entity\usp_GetSiteAccountSites_Result.cs">
  521 + <DependentUpon>AIADBEntity.tt</DependentUpon>
  522 + </Compile>
517 523 <Compile Include="Entity\usp_GetSiteById_Result.cs">
518 524 <DependentUpon>AIADBEntity.tt</DependentUpon>
519 525 </Compile>
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
... ... @@ -252,6 +252,23 @@ namespace AIAHTML5.ADMIN.API.Controllers
252 252 }
253 253 }
254 254  
  255 + [Route("LicenseSiteAdmin")]
  256 + [HttpGet]
  257 + public HttpResponseMessage GetLicenseSiteAdmin(string AccountNo)
  258 + {
  259 + List<Tuple<int, string, string>> LicenseSiteAdminList = new List<Tuple<int, string, string>>();
  260 + try
  261 + {
  262 + LicenseSiteAdminList = LicenseModel.GetLicenseSiteAdmin(dbContext, AccountNo);
  263 + return Request.CreateResponse(HttpStatusCode.OK, new { LicenseSiteAdminList = LicenseSiteAdminList });
  264 + }
  265 + catch (Exception ex)
  266 + {
  267 + // Log exception code goes here
  268 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  269 + }
  270 + }
  271 +
255 272 [Route("LicenseModestySettings")]
256 273 [HttpGet]
257 274 public HttpResponseMessage GetLicenseModestySettings(int LicenseId, int BuildingLevelId)
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
... ... @@ -3802,5 +3802,31 @@ namespace AIAHTML5.ADMIN.API.Entity
3802 3802  
3803 3803 return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_CheckDuplicateLicenseUserGroup", licenseIdParameter, titleParameter, status);
3804 3804 }
  3805 +
  3806 + public virtual ObjectResult<usp_GetSiteAccountAdmin_Result> usp_GetSiteAccountAdmin(string accountNumber)
  3807 + {
  3808 + var accountNumberParameter = accountNumber != null ?
  3809 + new ObjectParameter("AccountNumber", accountNumber) :
  3810 + new ObjectParameter("AccountNumber", typeof(string));
  3811 +
  3812 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSiteAccountAdmin_Result>("usp_GetSiteAccountAdmin", accountNumberParameter);
  3813 + }
  3814 +
  3815 + public virtual ObjectResult<usp_GetSiteAccountSites_Result> usp_GetSiteAccountSites(string strAccountNumber, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount)
  3816 + {
  3817 + var strAccountNumberParameter = strAccountNumber != null ?
  3818 + new ObjectParameter("strAccountNumber", strAccountNumber) :
  3819 + new ObjectParameter("strAccountNumber", typeof(string));
  3820 +
  3821 + var pageNoParameter = pageNo.HasValue ?
  3822 + new ObjectParameter("pageNo", pageNo) :
  3823 + new ObjectParameter("pageNo", typeof(int));
  3824 +
  3825 + var pageLengthParameter = pageLength.HasValue ?
  3826 + new ObjectParameter("pageLength", pageLength) :
  3827 + new ObjectParameter("pageLength", typeof(int));
  3828 +
  3829 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSiteAccountSites_Result>("usp_GetSiteAccountSites", strAccountNumberParameter, pageNoParameter, pageLengthParameter, recordCount);
  3830 + }
3805 3831 }
3806 3832 }
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
... ... @@ -1014,10 +1014,19 @@
1014 1014 <Function Name="usp_GetProductEditionByLicense" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
1015 1015 <Parameter Name="iLicenseId" Type="int" Mode="In" />
1016 1016 </Function>
  1017 + <Function Name="usp_GetSiteAccountAdmin" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  1018 + <Parameter Name="AccountNumber" Type="varchar" Mode="In" />
  1019 + </Function>
1017 1020 <Function Name="usp_GetSiteAccountEditions" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
1018 1021 <Parameter Name="SiteId" Type="int" Mode="In" />
1019 1022 <Parameter Name="LicenseId" Type="int" Mode="In" />
1020 1023 </Function>
  1024 + <Function Name="usp_GetSiteAccountSites" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  1025 + <Parameter Name="strAccountNumber" Type="varchar" Mode="In" />
  1026 + <Parameter Name="pageNo" Type="int" Mode="In" />
  1027 + <Parameter Name="pageLength" Type="int" Mode="In" />
  1028 + <Parameter Name="recordCount" Type="int" Mode="InOut" />
  1029 + </Function>
1021 1030 <Function Name="usp_GetSiteById" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
1022 1031 <Parameter Name="SiteId" Type="int" Mode="In" />
1023 1032 </Function>
... ... @@ -2314,6 +2323,15 @@
2314 2323 <Parameter Name="Title" Mode="In" Type="String" />
2315 2324 <Parameter Name="Status" Mode="InOut" Type="Boolean" />
2316 2325 </FunctionImport>
  2326 + <FunctionImport Name="usp_GetSiteAccountAdmin" ReturnType="Collection(AIADatabaseV5Model.usp_GetSiteAccountAdmin_Result)">
  2327 + <Parameter Name="AccountNumber" Mode="In" Type="String" />
  2328 + </FunctionImport>
  2329 + <FunctionImport Name="usp_GetSiteAccountSites" ReturnType="Collection(AIADatabaseV5Model.usp_GetSiteAccountSites_Result)">
  2330 + <Parameter Name="strAccountNumber" Mode="In" Type="String" />
  2331 + <Parameter Name="pageNo" Mode="In" Type="Int32" />
  2332 + <Parameter Name="pageLength" Mode="In" Type="Int32" />
  2333 + <Parameter Name="recordCount" Mode="InOut" Type="Int32" />
  2334 + </FunctionImport>
2317 2335 </EntityContainer>
2318 2336 <ComplexType Name="DA_GetBaseLayer_Result">
2319 2337 <Property Type="Int32" Name="Id" Nullable="false" />
... ... @@ -3358,6 +3376,37 @@
3358 3376 <Property Type="String" Name="LoginId" Nullable="true" MaxLength="50" />
3359 3377 <Property Type="String" Name="Password" Nullable="true" MaxLength="50" />
3360 3378 </ComplexType>
  3379 + <ComplexType Name="usp_GetSiteAccountAdmin_Result">
  3380 + <Property Type="Int32" Name="Id" Nullable="false" />
  3381 + <Property Type="String" Name="Password" Nullable="false" MaxLength="50" />
  3382 + <Property Type="String" Name="LoginId" Nullable="false" MaxLength="50" />
  3383 + <Property Type="String" Name="FirstName" Nullable="true" MaxLength="100" />
  3384 + <Property Type="Byte" Name="UserTypeId" Nullable="false" />
  3385 + <Property Type="String" Name="LastName" Nullable="true" MaxLength="100" />
  3386 + <Property Type="String" Name="EmailId" Nullable="true" MaxLength="50" />
  3387 + <Property Type="Boolean" Name="IsActive" Nullable="true" />
  3388 + <Property Type="Byte" Name="SecurityQuestionId" Nullable="true" />
  3389 + <Property Type="String" Name="SecurityAnswer" Nullable="true" MaxLength="50" />
  3390 + <Property Type="Int32" Name="CreatorId" Nullable="true" />
  3391 + <Property Type="DateTime" Name="CreationDate" Nullable="false" Precision="23" />
  3392 + <Property Type="Int32" Name="ModifierId" Nullable="true" />
  3393 + <Property Type="DateTime" Name="ModifiedDate" Nullable="true" Precision="23" />
  3394 + <Property Type="DateTime" Name="DeactivationDate" Nullable="true" Precision="23" />
  3395 + </ComplexType>
  3396 + <ComplexType Name="usp_GetSiteAccountSites_Result">
  3397 + <Property Type="Int32" Name="Id" Nullable="false" />
  3398 + <Property Type="String" Name="SiteIp" Nullable="true" MaxLength="2000" />
  3399 + <Property Type="String" Name="Title" Nullable="true" MaxLength="100" />
  3400 + <Property Type="String" Name="SiteIPTo" Nullable="false" MaxLength="100" />
  3401 + <Property Type="String" Name="SiteMasterIPTo" Nullable="false" MaxLength="100" />
  3402 + <Property Type="String" Name="CreationDate" Nullable="true" MaxLength="30" />
  3403 + <Property Type="String" Name="ModifiedDate" Nullable="true" MaxLength="30" />
  3404 + <Property Type="String" Name="InstituteName" Nullable="true" MaxLength="100" />
  3405 + <Property Type="String" Name="Department" Nullable="true" MaxLength="50" />
  3406 + <Property Type="Int32" Name="UserId" Nullable="false" />
  3407 + <Property Type="String" Name="FirstName" Nullable="true" MaxLength="100" />
  3408 + <Property Type="String" Name="EmailId" Nullable="true" MaxLength="50" />
  3409 + </ComplexType>
3361 3410 </Schema>
3362 3411 </edmx:ConceptualModels>
3363 3412 <!-- C-S mapping content -->
... ... @@ -4939,6 +4988,45 @@
4939 4988 </FunctionImportMapping>
4940 4989 <FunctionImportMapping FunctionImportName="usp_CheckSubscriptionForLicense" FunctionName="AIADatabaseV5Model.Store.usp_CheckSubscriptionForLicense" />
4941 4990 <FunctionImportMapping FunctionImportName="usp_CheckDuplicateLicenseUserGroup" FunctionName="AIADatabaseV5Model.Store.usp_CheckDuplicateLicenseUserGroup" />
  4991 + <FunctionImportMapping FunctionImportName="usp_GetSiteAccountAdmin" FunctionName="AIADatabaseV5Model.Store.usp_GetSiteAccountAdmin">
  4992 + <ResultMapping>
  4993 + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSiteAccountAdmin_Result">
  4994 + <ScalarProperty Name="Id" ColumnName="Id" />
  4995 + <ScalarProperty Name="Password" ColumnName="Password" />
  4996 + <ScalarProperty Name="LoginId" ColumnName="LoginId" />
  4997 + <ScalarProperty Name="FirstName" ColumnName="FirstName" />
  4998 + <ScalarProperty Name="UserTypeId" ColumnName="UserTypeId" />
  4999 + <ScalarProperty Name="LastName" ColumnName="LastName" />
  5000 + <ScalarProperty Name="EmailId" ColumnName="EmailId" />
  5001 + <ScalarProperty Name="IsActive" ColumnName="IsActive" />
  5002 + <ScalarProperty Name="SecurityQuestionId" ColumnName="SecurityQuestionId" />
  5003 + <ScalarProperty Name="SecurityAnswer" ColumnName="SecurityAnswer" />
  5004 + <ScalarProperty Name="CreatorId" ColumnName="CreatorId" />
  5005 + <ScalarProperty Name="CreationDate" ColumnName="CreationDate" />
  5006 + <ScalarProperty Name="ModifierId" ColumnName="ModifierId" />
  5007 + <ScalarProperty Name="ModifiedDate" ColumnName="ModifiedDate" />
  5008 + <ScalarProperty Name="DeactivationDate" ColumnName="DeactivationDate" />
  5009 + </ComplexTypeMapping>
  5010 + </ResultMapping>
  5011 + </FunctionImportMapping>
  5012 + <FunctionImportMapping FunctionImportName="usp_GetSiteAccountSites" FunctionName="AIADatabaseV5Model.Store.usp_GetSiteAccountSites">
  5013 + <ResultMapping>
  5014 + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSiteAccountSites_Result">
  5015 + <ScalarProperty Name="Id" ColumnName="Id" />
  5016 + <ScalarProperty Name="SiteIp" ColumnName="SiteIp" />
  5017 + <ScalarProperty Name="Title" ColumnName="Title" />
  5018 + <ScalarProperty Name="SiteIPTo" ColumnName="SiteIPTo" />
  5019 + <ScalarProperty Name="SiteMasterIPTo" ColumnName="SiteMasterIPTo" />
  5020 + <ScalarProperty Name="CreationDate" ColumnName="CreationDate" />
  5021 + <ScalarProperty Name="ModifiedDate" ColumnName="ModifiedDate" />
  5022 + <ScalarProperty Name="InstituteName" ColumnName="InstituteName" />
  5023 + <ScalarProperty Name="Department" ColumnName="Department" />
  5024 + <ScalarProperty Name="UserId" ColumnName="UserId" />
  5025 + <ScalarProperty Name="FirstName" ColumnName="FirstName" />
  5026 + <ScalarProperty Name="EmailId" ColumnName="EmailId" />
  5027 + </ComplexTypeMapping>
  5028 + </ResultMapping>
  5029 + </FunctionImportMapping>
4942 5030 </EntityContainerMapping>
4943 5031 </Mapping>
4944 5032 </edmx:Mappings>
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteAccountAdmin_Result.cs 0 → 100644
  1 +//------------------------------------------------------------------------------
  2 +// <auto-generated>
  3 +// This code was generated from a template.
  4 +//
  5 +// Manual changes to this file may cause unexpected behavior in your application.
  6 +// Manual changes to this file will be overwritten if the code is regenerated.
  7 +// </auto-generated>
  8 +//------------------------------------------------------------------------------
  9 +
  10 +namespace AIAHTML5.ADMIN.API.Entity
  11 +{
  12 + using System;
  13 +
  14 + public partial class usp_GetSiteAccountAdmin_Result
  15 + {
  16 + public int Id { get; set; }
  17 + public string Password { get; set; }
  18 + public string LoginId { get; set; }
  19 + public string FirstName { get; set; }
  20 + public byte UserTypeId { get; set; }
  21 + public string LastName { get; set; }
  22 + public string EmailId { get; set; }
  23 + public Nullable<bool> IsActive { get; set; }
  24 + public Nullable<byte> SecurityQuestionId { get; set; }
  25 + public string SecurityAnswer { get; set; }
  26 + public Nullable<int> CreatorId { get; set; }
  27 + public System.DateTime CreationDate { get; set; }
  28 + public Nullable<int> ModifierId { get; set; }
  29 + public Nullable<System.DateTime> ModifiedDate { get; set; }
  30 + public Nullable<System.DateTime> DeactivationDate { get; set; }
  31 + }
  32 +}
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteAccountSites_Result.cs 0 → 100644
  1 +//------------------------------------------------------------------------------
  2 +// <auto-generated>
  3 +// This code was generated from a template.
  4 +//
  5 +// Manual changes to this file may cause unexpected behavior in your application.
  6 +// Manual changes to this file will be overwritten if the code is regenerated.
  7 +// </auto-generated>
  8 +//------------------------------------------------------------------------------
  9 +
  10 +namespace AIAHTML5.ADMIN.API.Entity
  11 +{
  12 + using System;
  13 +
  14 + public partial class usp_GetSiteAccountSites_Result
  15 + {
  16 + public int Id { get; set; }
  17 + public string SiteIp { get; set; }
  18 + public string Title { get; set; }
  19 + public string SiteIPTo { get; set; }
  20 + public string SiteMasterIPTo { get; set; }
  21 + public string CreationDate { get; set; }
  22 + public string ModifiedDate { get; set; }
  23 + public string InstituteName { get; set; }
  24 + public string Department { get; set; }
  25 + public int UserId { get; set; }
  26 + public string FirstName { get; set; }
  27 + public string EmailId { get; set; }
  28 + }
  29 +}
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
... ... @@ -181,7 +181,7 @@ namespace AIAHTML5.ADMIN.API.Models
181 181 recordCount = 0;
182 182 try
183 183 {
184   - var result = dbContext.GetSiteAccoutDetail(AccountNo, pageNo, pageLength, spRecordCount).ToList();
  184 + var result = dbContext.usp_GetSiteAccountSites(AccountNo, pageNo, pageLength, spRecordCount).ToList();
185 185 if (result.Count > 0)
186 186 {
187 187 foreach (var item in result)
... ... @@ -198,7 +198,10 @@ namespace AIAHTML5.ADMIN.API.Models
198 198 SiteModelObj.SiteUserFirstName = item.FirstName;
199 199 SiteModelObj.Title = item.Title;
200 200 SiteModelObj.CreationDate = DateTime.ParseExact(item.CreationDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
201   - SiteModelObj.ModifiedDate = DateTime.ParseExact(item.ModifiedDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
  201 + if (!string.IsNullOrEmpty(item.ModifiedDate))
  202 + {
  203 + SiteModelObj.ModifiedDate = DateTime.ParseExact(item.ModifiedDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
  204 + }
202 205 LicenseSiteList.Add(SiteModelObj);
203 206 }
204 207 }
... ... @@ -208,6 +211,26 @@ namespace AIAHTML5.ADMIN.API.Models
208 211 return LicenseSiteList;
209 212 }
210 213  
  214 + public static List<Tuple<int, string, string>> GetLicenseSiteAdmin(AIADatabaseV5Entities dbContext, string AccountNo)
  215 + {
  216 + List<Tuple<int, string, string>> LicenseSiteAdminList = new List<Tuple<int, string, string>>();
  217 + Tuple<int, string, string> SiteAdmin;
  218 + try
  219 + {
  220 + var result = dbContext.usp_GetSiteAccountAdmin(AccountNo).ToList();
  221 + if (result.Count > 0)
  222 + {
  223 + foreach (var item in result)
  224 + {
  225 + SiteAdmin = new Tuple<int, string, string>(item.Id, item.FirstName + " " + item.LastName, item.EmailId);
  226 + LicenseSiteAdminList.Add(SiteAdmin);
  227 + }
  228 + }
  229 + }
  230 + catch (Exception ex) { }
  231 + return LicenseSiteAdminList;
  232 + }
  233 +
211 234 public static List<Tuple<int, bool, string>> GetLicenseModestySettings(AIADatabaseV5Entities dbContext, int LicenseId, int BuildingLevelId)
212 235 {
213 236 List<Tuple<int, bool, string>> LicenseModestyList = new List<Tuple<int, bool, string>>();
... ...
400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts
1   -import { Component, OnInit } from '@angular/core';
  1 +import { Component, OnInit, Compiler } from '@angular/core';
2 2 import { UserService } from './components/UserEntity/user.service';
3 3 import { ManageDiscountCodeService } from './components/ManageDiscountCode/managediscountcode.service';
4 4 import { SubscriptionPriceService } from './components/SubscriptionPrice/subscriptionprice.service';
... ... @@ -6,7 +6,10 @@ import { LicenseService } from &#39;./components/LicenseEntity/license.service&#39;;
6 6 import { ReportService } from './components/Reports/report.service';
7 7 //import { MyAuthService } from './shared/my-auth.service';
8 8 import { GlobalService } from './Shared/global';
9   -import { Router } from '@angular/router';
  9 +import { Router, NavigationEnd } from '@angular/router';
  10 +//import { HttpClient } from '@angular/common/http';
  11 +//import { HttpErrorResponse } from '@angular/common/http';
  12 +//import { Observable } from 'rxjs/Observable';
10 13 @Component({
11 14 selector: 'app-component',
12 15 templateUrl: '../app/app.component.html',
... ... @@ -14,12 +17,26 @@ import { Router } from &#39;@angular/router&#39;;
14 17 })
15 18  
16 19 export class AppComponent implements OnInit {
17   - DisplayName: string = "";
18   - constructor(private userservice: UserService, private global: GlobalService, private router: Router) { }
19 20  
  21 + public obj: any;
  22 + public objMenu: any;
  23 + public menustaus: string;
  24 + public submenustaus: string;
  25 +
  26 + constructor(private userservice: UserService, public global: GlobalService, private router: Router,
  27 + private _compiler: Compiler) { }
20 28 ngOnInit(): void {
21   -
22   - this.DisplayName = this.global.DisplayName;
  29 + this._compiler.clearCache();
  30 + this.menustaus = "True";
  31 + this.global.getJSON().subscribe(data => {
  32 + this.obj = data["AdminSections"]
  33 + for (let i = 0; i < 7; i++) {
  34 +
  35 + if (this.obj[i].Id == this.global.UserType) {
  36 + this.objMenu = this.obj[i].HeaderMenu;
  37 + }
  38 + }
  39 + }, error => console.log(error));
23 40 this.router.navigate(['/updateuserprofile']);
24 41 }
25 42 logout() {
... ...
400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts
... ... @@ -44,11 +44,12 @@ import { ConfirmService } from &#39;./Shared/Confirm/confirm.service&#39;;
44 44 import { ConfirmComponent } from "./Shared/Confirm/confirm.component"
45 45 import { BsDatepickerModule, ModalModule } from 'ngx-bootstrap';
46 46 import { BsModalService } from 'ngx-bootstrap/modal';
47   -import { ScrollEventModule } from 'ngx-scroll-event';
48 47 import { ContenteditableModelDirective } from './shared/contenteditabledirective';
49 48 import { LoadingService } from './shared/loading.service';
50 49 import { PagerComponent } from './shared/Pager/pager.component';
51 50 import { NumberOnlyDirective } from './shared/numberonlydirective';
  51 +import { MyFilterPipe } from './shared/my-filter.pipe';
  52 +import { BsDropdownModule } from 'ngx-bootstrap';
52 53 //import { MyAuthService } from './shared/my-auth.service';
53 54 //import { AngularFireAuth } from 'angularfire2/auth';
54 55 //import { FirebaseApp, AngularFireModule } from 'angularfire2';
... ... @@ -73,11 +74,13 @@ import { NumberOnlyDirective } from &#39;./shared/numberonlydirective&#39;;
73 74 SubscriptionCancellationReport, NetAdSubscriptionReport,
74 75 SiteLicenseUsageReport, DiscountCodeReport, ImageExportReport,
75 76 EditLicenseBasicSettings, LicenseModestySettings,
76   - LicenseModuleSettings, SiteLicenseAccount, UserGroup, PagerComponent, NumberOnlyDirective
  77 + LicenseModuleSettings, SiteLicenseAccount, UserGroup, PagerComponent, NumberOnlyDirective,
  78 + //filter
  79 + MyFilterPipe
77 80 ],
78 81 imports: [
79 82 BrowserModule, AppRoutingModule, HttpClientModule, FormsModule, ReactiveFormsModule, HttpModule, Ng2Bs3ModalModule,
80   - BsDatepickerModule.forRoot(), ModalModule.forRoot(), ScrollEventModule//ModalModule.forRoot()
  83 + BsDatepickerModule.forRoot(), ModalModule.forRoot(), BsDropdownModule.forRoot() //ModalModule.forRoot()
81 84 // , AngularFireModule.initializeApp(firebaseConfig),
82 85 ],
83 86 providers: [GlobalService, ConfirmService, BsModalService, LoadingService, CsvService,
... ...
400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts
... ... @@ -144,21 +144,27 @@ RecordDeleted: number[];
144 144 AfterInsertData(data, template) {
145 145 if (data.Status == "false") {
146 146 // this.alerts = "<span>Subscription price save unsuccessfull</span>";
147   - this._confirmService.activate("Subscription prices insert unsuccessfull", "alertMsg");
  147 + this.modalAlerts = "<p>Subscription insert unsuccessfull</p>";
  148 + this.modalRef = this.modalService.show(template);
  149 + // this._confirmService.activate("Subscription insert unsuccessfull", "alertMsg");
148 150 } else {
149   - this.modalAlerts = "<p>Subscriptions saved successfully</p>";
  151 + this._confirmService.activate("Subscription saved successfull", "alertMsg");
  152 + //this.modalAlerts = "<p>Subscriptions saved successfully</p>";
150 153 this.CancelAdd();
151   - this.modalRef = this.modalService.show(template);
  154 + //this.modalRef = this.modalService.show(template);
152 155 }
153 156 }
154 157  
155 158 AfterUpdateData(data, template) {
156   - if (data.Status == "false") {
  159 + if (data.Status == "false") {
  160 + this.modalAlerts = "<p>Subscription prices update unsuccessfull</p>";
  161 + this.modalRef = this.modalService.show(template);
157 162 //this.alerts = "<span>Subscription prices update unsuccessfull</span>\n";
158   - this._confirmService.activate("Subscription prices update unsuccessfull", "alertMsg");
  163 + //this._confirmService.activate("Subscription prices update unsuccessfull", "alertMsg");
159 164 } else {
160   - this.modalAlerts = "<p>Subscriptions updated successfully</p>";
161   - this.modalRef = this.modalService.show(template);
  165 + this._confirmService.activate("Subscriptions updated successfully", "alertMsg");
  166 + //this.modalAlerts = "<p>Subscriptions updated successfully</p>";
  167 + //this.modalRef = this.modalService.show(template);
162 168 }
163 169 }
164 170  
... ...
400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.service.ts
1 1 import { Injectable, Inject } from '@angular/core';
2 2 //import { HttpClient, HttpParams, HttpRequest} from "@angular/common/http";
3   -import { Http, Response, Headers, RequestOptions, RequestOptionsArgs, RequestMethod, HttpModule } from '@angular/http';
  3 +import { Http, Response, Headers, RequestOptions, HttpModule } from '@angular/http';
4 4 import 'rxjs/add/operator/map';
5 5 import 'rxjs/add/operator/catch';
6 6 import 'rxjs/add/observable/throw';
... ... @@ -47,19 +47,18 @@ export class SubscriptionPriceService {
47 47 .catch((res: Response) => this.handleError(res));
48 48 }
49 49  
50   - DeleteSubscriptionPrice(obj: any) {
  50 + DeleteSubscriptionPrice(obj: any) {
51 51 //let options = new RequestOptions({ headers: this.headers });
52 52 console.log(obj);
53 53 let subscriptionPriceId = obj;
54 54 let headers = new Headers({
55 55 'Content-Type': 'application/json'
56 56 });
57   - return this.http.get(this.commonService.resourceBaseUrl + "SubscriptionPrice/DeleteSubscriptionPrice?subscriptionPriceId=" + subscriptionPriceId)
  57 + return this.http.get(this.commonService.resourceBaseUrl + "SubscriptionPrice/DeleteSubscriptionPrice?subscriptionPriceId=" + subscriptionPriceId)
58 58 .map(this.extractData)
59 59 .catch((res: Response) => this.handleError(res));
60 60 }
61   -
62   - CheckSubscriptionPlanForLicense(obj: any) {
  61 + CheckSubscriptionPlanForLicense(obj: any) {
63 62 //let options = new RequestOptions({ headers: this.headers });
64 63 console.log(obj);
65 64 return this.http.get(this.commonService.resourceBaseUrl + "SubscriptionPrice/CheckSubscriptionPlanForLicense?subscriptionPriceId=" + obj)
... ...
500-DBDump/AIA-StoredProcedures/usp_GetSiteAccountAdmin.sql 0 → 100644
  1 +USE [AIADatabaseV5]
  2 +GO
  3 +/****** Object: StoredProcedure [dbo].[usp_GetSiteAccountAdmin] Script Date: 2/1/2018 12:15:55 PM ******/
  4 +SET ANSI_NULLS ON
  5 +GO
  6 +SET QUOTED_IDENTIFIER ON
  7 +GO
  8 +-- =============================================
  9 +-- Author: magic
  10 +-- Create date: 5/6/2018
  11 +-- Description: Fetch building level accounts client admins for corresponding given Account Number.
  12 +-- =============================================
  13 +
  14 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetSiteAccountAdmin]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  15 +drop procedure [dbo].[usp_GetSiteAccountAdmin]
  16 +GO
  17 +
  18 +CREATE PROCEDURE [dbo].[usp_GetSiteAccountAdmin]
  19 + -- Add the parameters for the stored procedure here
  20 + @AccountNumber varchar(50)=''
  21 +
  22 +AS
  23 +BEGIN
  24 + -- SET NOCOUNT ON added to prevent extra result sets from
  25 + -- interfering with SELECT statements.
  26 + SET NOCOUNT ON;
  27 +
  28 + SELECT AIAUser.Id, AIAUser.Password, AIAUser.LoginId, AIAUser.FirstName, AIAUser.UserTypeId, AIAUser.LastName, AIAUser.EmailId, AIAUser.IsActive,
  29 + AIAUser.SecurityQuestionId, AIAUser.SecurityAnswer, AIAUser.CreatorId, AIAUser.CreationDate, AIAUser.ModifierId, AIAUser.ModifiedDate,
  30 + AIAUser.DeactivationDate
  31 + FROM AIAUser
  32 + INNER JOIN AIAUserToLicenseEdition ON AIAUser.Id = AIAUserToLicenseEdition.UserId
  33 + INNER JOIN LicenseToEdition ON AIAUserToLicenseEdition.LicenseEditionId = LicenseToEdition.Id
  34 + INNER JOIN License ON LicenseToEdition.LicenseId = License.Id
  35 + WHERE (AIAUser.IsActive = 1) AND (License.AccountNumber = @AccountNumber) AND (AIAUser.UserTypeId = 4);
  36 +
  37 +END
  38 +
  39 +
  40 +
  41 +GO
... ...
500-DBDump/AIA-StoredProcedures/usp_GetSiteAccountSites.sql 0 → 100644
  1 +USE [AIADatabaseV5]
  2 +GO
  3 +/****** Object: StoredProcedure [dbo].[usp_GetSiteAccountSites] Script Date: 2/1/2018 12:15:55 PM ******/
  4 +SET ANSI_NULLS ON
  5 +GO
  6 +SET QUOTED_IDENTIFIER ON
  7 +GO
  8 +-- =============================================
  9 +-- Author: magic
  10 +-- Create date: 5/6/2018
  11 +-- Description: Fetch building level accounts details for corresponding given Account Number.
  12 +-- =============================================
  13 +
  14 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetSiteAccountSites]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  15 +drop procedure [dbo].[usp_GetSiteAccountSites]
  16 +GO
  17 +
  18 +CREATE PROCEDURE [dbo].[usp_GetSiteAccountSites]
  19 + -- Add the parameters for the stored procedure here
  20 + @strAccountNumber varchar(50)='', @pageNo int, @pageLength int, @recordCount int out
  21 +
  22 +AS
  23 +BEGIN
  24 + -- SET NOCOUNT ON added to prevent extra result sets from
  25 + -- interfering with SELECT statements.
  26 + SET NOCOUNT ON;
  27 +
  28 + --Get the records on the basis of parameters page length and page number rows
  29 + select LD.Id, LD.SiteIp, LD.Title, LD.SiteIPTo, LD.SiteMasterIPTo, LD.CreationDate, LD.ModifiedDate, LD.InstituteName,
  30 + LD.Department, LD.UserId, LD.FirstName, LD.EmailId
  31 + from
  32 + (Select ROW_NUMBER() OVER (ORDER BY Site.Id) AS RowNo,
  33 + Site.Id,Site.SiteIp,Site.Title,ISNULL(Site.SiteIPTo,'') as SiteIPTo,ISNULL(Site.SiteMasterIPTo,'') as SiteMasterIPTo,
  34 + CONVERT(VARCHAR,Site.CreationDate,101) as CreationDate,
  35 + CONVERT(VARCHAR,Site.ModifiedDate,101) as ModifiedDate,
  36 + Site.InstituteName, Site.Department, AIAUser.Id as UserId,AIAUser.FirstName,AIAUser.EmailId
  37 + from License join LicenseToEdition on License.Id = LicenseToEdition.LicenseId
  38 + join SiteToLicenseEdition on LicenseToEdition.Id = SiteToLicenseEdition.LicenseEditionId
  39 + join AIAUserToLicenseEdition on SiteToLicenseEdition.LicenseEditionId = AIAUserToLicenseEdition.LicenseEditionId
  40 + join AIAUserToSite on SiteToLicenseEdition.SiteId = AIAUserToSite.SiteId
  41 + join Site on SiteToLicenseEdition.SiteId = Site.Id
  42 + join AIAUser on AIAUserToLicenseEdition.UserId = AIAUser.Id
  43 + where Site.IsActive=1 and License.AccountNumber=@strAccountNumber)
  44 + as LD
  45 + where
  46 + RowNo > @pageLength * (@pageNo - 1) AND
  47 + RowNo <= @pageLength * @pageNo
  48 +
  49 + --Calculate total number of records
  50 + select @recordCount = count(ResultTable.Id) from
  51 + (Select Site.Id,Site.SiteIp,Site.Title,ISNULL(Site.SiteIPTo,'') as SiteIPTo,ISNULL(Site.SiteMasterIPTo,'') as SiteMasterIPTo,
  52 + CONVERT(VARCHAR,Site.CreationDate,101) as CreationDate,
  53 + CONVERT(VARCHAR,Site.ModifiedDate,101) as ModifiedDate,
  54 + Site.InstituteName, Site.Department, AIAUser.Id as UserId,AIAUser.FirstName,AIAUser.EmailId
  55 + from License join LicenseToEdition on License.Id = LicenseToEdition.LicenseId
  56 + join SiteToLicenseEdition on LicenseToEdition.Id = SiteToLicenseEdition.LicenseEditionId
  57 + join AIAUserToLicenseEdition on SiteToLicenseEdition.LicenseEditionId = AIAUserToLicenseEdition.LicenseEditionId
  58 + join AIAUserToSite on SiteToLicenseEdition.SiteId = AIAUserToSite.SiteId
  59 + join Site on SiteToLicenseEdition.SiteId = Site.Id
  60 + join AIAUser on AIAUserToLicenseEdition.UserId = AIAUser.Id
  61 + where Site.IsActive=1 and License.AccountNumber=@strAccountNumber) as ResultTable;
  62 +
  63 +END
  64 +
  65 +
  66 +
  67 +GO
... ...