();
+ UserModel UserModelObj = new UserModel();
+ try
+ {
+ var result = dbContext.GetAllUserWithGroup(LicenseId, UserGroupId).ToList();
+ foreach (var item in result)
+ {
+ UserModelObj = new UserModel();
+ UserModelObj.Id = item.Id;
+ UserModelObj.FirstName = item.FirstName;
+ UserModelObj.LastName = item.LastName;
+ UserModelObj.LoginId = item.LoginId;
+ UserModelObj.EmailId = item.EmailId;
+ UserModelObj.ProductEdition = item.Title;
+ UserModelObj.InGroup = item.InGroup;
+ UserList.Add(UserModelObj);
+ }
+ }
+ catch (Exception ex) { }
+ return UserList;
+ }
+
+ public static bool InsertUpdateLicenseUserGroup(AIADatabaseV5Entities dbContext, UserGroupModel UserGroupEntity)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ dbContext.usp_InsertUpdateLicenseUserGroup(UserGroupEntity.Id, UserGroupEntity.LicenseId, UserGroupEntity.Title,
+ UserGroupEntity.CreationDate, UserGroupEntity.ModifiedDate, UserGroupEntity.IsActive, spStatus);
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
+ public static bool UpdateLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int UserGroupId, string UserIds)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ dbContext.usp_UpdateLicenseUserGroupUsers(UserGroupId, UserIds, spStatus);
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
+ public static bool DeleteLicenseUserGroup(AIADatabaseV5Entities dbContext, int UserGroupId)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ dbContext.usp_DeleteLicenseUserGroup(UserGroupId, spStatus);
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
index b753b45..f73ebbf 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
@@ -24,6 +24,8 @@ namespace AIAHTML5.ADMIN.API.Models
public DateTime ModifiedDate { get; set; }
public int UserTypeId { get; set; }
public bool IsActive { get; set; }
+ public string ProductEdition { get; set; }
+ public int InGroup { get; set; }
public static bool UpdateUserProfile(AIADatabaseV5Entities dbContext, int intUserID, string strFirstName, string strLastName, string strEmailID)
{
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 8250e7c..b5d1191 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts
@@ -3,11 +3,12 @@ import { UserService } from './components/UserEntity/user.service';
import { ManageDiscountCodeService } from './components/ManageDiscountCode/managediscountcode.service';
import { SubscriptionPriceService } from './components/SubscriptionPrice/subscriptionprice.service';
import { LicenseService } from './components/LicenseEntity/license.service';
+import { ReportService } from './components/Reports/report.service';
@Component({
selector: 'app-component',
templateUrl: '../app/app.component.html',
- providers: [UserService, ManageDiscountCodeService, SubscriptionPriceService, LicenseService]
+ providers: [UserService, ManageDiscountCodeService, SubscriptionPriceService, LicenseService, ReportService]
})
export class AppComponent implements OnInit {
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 b409f73..c84b3ef 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts
@@ -1,3 +1,5 @@
+
+
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
@@ -13,11 +15,25 @@ import { ChangeUserPassword } from './components/UserEntity/changeuserpassword.c
import { ChangeUserID } from './components/UserEntity/changeuserid.component';
import { UsersList } from './components/UserEntity/users.component';
import { AddUser } from './components/UserEntity/adduser.component';
+import { UnblockUser } from './components/UserEntity/unblockuser.component';
import { ManageDiscountCode } from './components/ManageDiscountCode/managediscountcode.component';
import { SubscriptionPrice } from './components/SubscriptionPrice/subscriptionprice.component';
import { SearchLicense } from './components/LicenseEntity/searchlicense.component';
import { AddLicense } from './components/LicenseEntity/addlicense.component';
+import { UsageReport } from './components/Reports/usagereport.component';
+import { CustomerSummaryReport } from './components/Reports/customersummaryreport.component';
+import { ExpiringSubscriptionReport } from './components/Reports/expiringsubscriptionreport.component';
+import { SubscriptionReport } from './components/Reports/subscriptionreport.component';
+import { SubscriptionCancellationReport } from './components/Reports/subscriptioncancellationreport.component';
+import { NetAdSubscriptionReport } from './components/Reports/netadsubscriptionreport.component';
+import { SiteLicenseUsageReport } from './components/Reports/sitelicenseusagereport.component';
+import { DiscountCodeReport } from './components/Reports/discountcodereport.component';
+import { ImageExportReport } from './components/Reports/imageexportreport.component';
import { EditLicenseBasicSettings } from './components/LicenseEntity/editlicensebasicsettings.component';
+import { LicenseModestySettings } from './components/LicenseEntity/licensemodestysettings.component';
+import { LicenseModuleSettings } from './components/LicenseEntity/licensemodulesettings.component';
+import { SiteLicenseAccount } from './components/LicenseEntity/sitelicenseaccount.component';
+import { UserGroup } from './components/UserEntity/usergroup.component';
import { AppComponent } from './app.component';
import { AppRoutingModule } from './app.routing.module';
@@ -30,22 +46,28 @@ import { ConfirmComponent } from "./Shared/Confirm/confirm.component"
import { BsDatepickerModule, ModalModule } from 'ngx-bootstrap';
import { BsModalService } from 'ngx-bootstrap/modal';
import { ContenteditableModelDirective } from './shared/contenteditabledirective';
+import { LoadingService } from './shared/loading.service';
@NgModule({
declarations: [
ChangeUserPassword, ChangeUserID,
UpdateUserProfile, UsersList,
- ManageDiscountCode, AddUser,
+ ManageDiscountCode, AddUser, UnblockUser,
AppComponent, ConfirmComponent,
- SubscriptionPrice, ManageDiscountCode,
- SearchLicense, AddLicense,
- EditLicenseBasicSettings, ContenteditableModelDirective
+ SubscriptionPrice, ManageDiscountCode, ContenteditableModelDirective,
+ AddLicense, SearchLicense,
+ UsageReport, CustomerSummaryReport,
+ ExpiringSubscriptionReport, SubscriptionReport,
+ SubscriptionCancellationReport, NetAdSubscriptionReport,
+ SiteLicenseUsageReport, DiscountCodeReport, ImageExportReport,
+ EditLicenseBasicSettings, LicenseModestySettings,
+ LicenseModuleSettings, SiteLicenseAccount, UserGroup
],
imports: [
BrowserModule, AppRoutingModule, HttpClientModule, FormsModule, ReactiveFormsModule, HttpModule, Ng2Bs3ModalModule,
- BsDatepickerModule.forRoot(), ModalModule.forRoot()
+ BsDatepickerModule.forRoot(), ModalModule.forRoot()//ModalModule.forRoot()
],
- providers: [GlobalService, ConfirmService, BsModalService,
+ providers: [GlobalService, ConfirmService, BsModalService, LoadingService,
//AuthService,
//AuthGuard,
//{
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.routing.module.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.routing.module.ts
index b10a512..d94ec3d 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.routing.module.ts
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.routing.module.ts
@@ -4,12 +4,26 @@ import { UpdateUserProfile } from './components/UserEntity/updateuserprofile.com
import { ChangeUserPassword } from './components/UserEntity/changeuserpassword.component';
import { ChangeUserID } from './components/UserEntity/changeuserid.component';
import { UsersList } from './components/UserEntity/users.component';
+import { UnblockUser } from './components/UserEntity/unblockuser.component';
import { ManageDiscountCode } from './components/ManageDiscountCode/managediscountcode.component';
import { SubscriptionPrice } from './components/SubscriptionPrice/subscriptionprice.component';
import { AddUser } from './components/UserEntity/adduser.component';
import { SearchLicense } from './components/LicenseEntity/searchlicense.component';
import { AddLicense } from './components/LicenseEntity/addlicense.component';
+import { UsageReport } from './components/Reports/usagereport.component';
+import { CustomerSummaryReport } from './components/Reports/customersummaryreport.component';
+import { ExpiringSubscriptionReport } from './components/Reports/expiringsubscriptionreport.component';
+import { SubscriptionReport } from './components/Reports/subscriptionreport.component';
+import { SubscriptionCancellationReport } from './components/Reports/subscriptioncancellationreport.component';
+import { NetAdSubscriptionReport } from './components/Reports/netadsubscriptionreport.component';
+import { SiteLicenseUsageReport } from './components/Reports/sitelicenseusagereport.component';
+import { DiscountCodeReport } from './components/Reports/discountcodereport.component';
+import { ImageExportReport } from './components/Reports/imageexportreport.component';
import { EditLicenseBasicSettings } from './components/LicenseEntity/editlicensebasicsettings.component';
+import { LicenseModestySettings } from './components/LicenseEntity/licensemodestysettings.component';
+import { LicenseModuleSettings } from './components/LicenseEntity/licensemodulesettings.component';
+import { SiteLicenseAccount } from './components/LicenseEntity/sitelicenseaccount.component';
+import { UserGroup } from './components/UserEntity/usergroup.component';
const appRoutes: Routes = [
//{ path: '', redirectTo:'updateuserprofile',pathMatch }
@@ -20,10 +34,25 @@ const appRoutes: Routes = [
{ path: 'managediscountcode', component: ManageDiscountCode },
{ path: 'subscriptionprice', component: SubscriptionPrice },
{ path: 'adduser', component: AddUser },
+ { path: 'unblockuser', component: UnblockUser },
{ path: 'searchlicense', component: SearchLicense },
{ path: 'addlicense', component: AddLicense },
{ path: 'editlicense', component: AddLicense },
+ { path: 'usagereport', component: UsageReport },
+ { path: 'customersummaryreport', component: CustomerSummaryReport },
+ { path: 'expiringsubscriptionreport', component: ExpiringSubscriptionReport },
+ { path: 'subscriptionreport', component: SubscriptionReport },
+ { path: 'subscriptioncancellationreport', component: SubscriptionCancellationReport },
+ { path: 'netadsubscriptionreport', component: NetAdSubscriptionReport },
+ { path: 'sitelicenseusagereport', component: SiteLicenseUsageReport },
+ { path: 'discountcodereport', component: DiscountCodeReport },
+ { path: 'imageexportreport', component: ImageExportReport },
{ path: 'editlicensebasicsettings', component: EditLicenseBasicSettings },
+ { path: 'licensemodestysettings', component: LicenseModestySettings },
+ { path: 'licensemodulesettings', component: LicenseModuleSettings },
+ { path: 'sitelicenseaccount', component: SiteLicenseAccount },
+ { path: 'usergroup', component: UserGroup }
+
];
@NgModule({
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts
index 68d8654..d03df4b 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts
@@ -1,13 +1,14 @@
import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core';
import { ManageDiscountCodeService } from './managediscountcode.service';
import { Router } from '@angular/router';
-import { FormControl, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
+import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
import { DiscountCode } from '../UserEntity/datamodel';
import { BsDatepickerModule } from 'ngx-bootstrap';
import { Http, Response } from '@angular/http';
import { DatePipe } from '@angular/common';
import { BsModalService } from 'ngx-bootstrap/modal';
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
+import { ConfirmService } from '../../Shared/Confirm/confirm.service';
@Component({
templateUrl: './managediscountcode.component.html'
@@ -34,7 +35,7 @@ bsValue4: Date = new Date();
selectedId: number = 0;
modalRef: BsModalRef;
-constructor(private manageDiscountCodeService: ManageDiscountCodeService, private router: Router, private fb: FormBuilder, private modalService: BsModalService) { }
+constructor(private manageDiscountCodeService: ManageDiscountCodeService, private router: Router, private _confirmService: ConfirmService, private fb: FormBuilder, private modalService: BsModalService) { }
ngOnInit(): void {
this.divClass = 'col-sm-12';
@@ -42,7 +43,7 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat
this.alerts = '';
this.manageDiscountCodeFrm = this.fb.group({
searchDiscountCode: [''],
- searchStartDate: ['', CustomValidators.DateValidator],
+ searchStartDate: [''],
searchEndDate: [''],
discountCodes: this.fb.array([])
});
@@ -105,7 +106,8 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat
AfterInsertData(data, template) {
if (data.Status == "false") {
- this.alerts = "Discount code save unsuccessfull";
+ //this.alerts = "Discount code save unsuccessfull";
+ this._confirmService.activate("Discount code insert unsuccessfull", "alertMsg");
} else {
this.modalAlerts = "Discount code saved successfully
";
this.modalRef = this.modalService.show(template);
@@ -114,7 +116,8 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat
AfterUpdateData(data, template) {
if (data.Status == "false") {
- this.alerts = "Discount code update unsuccessfull";
+ //this.alerts = "Discount code update unsuccessfull";
+ this._confirmService.activate("Discount code update unsuccessfull", "alertMsg");
} else {
this.modalAlerts = "Discount code updated successfully
";
this.modalRef = this.modalService.show(template);
@@ -169,26 +172,3 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat
this.SetClickedRow(this.selectedRow, this.manageDiscountCodeFrm.controls['discountCodes'].value.find(C => C.Id == this.selectedId));
}
}
-
-export class CustomValidators {
-
- static DateValidator(control: FormControl): ValidationErrors {
- var isValid: boolean = true;
- var DateRegex = '[0-9]{1,2}[/][0-9]{1,2}[/][0-9]{4}';
- if (!control.value.match(/DateRegex/)) {
- isValid = false;
- }
- var numValue = control.value.split('/');
- if(parseInt(numValue[0]) > 12 && parseInt(numValue[0]) < 1){
- isValid = false;
- }
- if(parseInt(numValue[1]) > 31 && parseInt(numValue[1]) < 1){
- isValid = false;
- }
- if(parseInt(numValue[2]) < 1){
- isValid = false;
- }
- return isValid ? null : { 'InvalidDate': 'Date is invalid' };
- }
-
-}
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html
index 533e4a1..ee9e64c 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html
@@ -31,6 +31,7 @@
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts
index 16ac157..303e6f6 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts
@@ -10,6 +10,7 @@ import { DatePipe } from '@angular/common';
import { ContenteditableModelDirective } from '../../shared/contenteditabledirective'
import { BsModalService } from 'ngx-bootstrap/modal';
import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
+import { ConfirmService } from '../../Shared/Confirm/confirm.service';
//import { Global } from '../../Shared/global';
//import { DBOperation } from 'S';
//import { Observable } from 'rxjs/Observable';
@@ -35,7 +36,7 @@ selectedEditionId: number = 1;
divClass: string = '';
modalRef: BsModalRef;
-constructor(private subscriptionPriceService: SubscriptionPriceService, private router: Router, private fb: FormBuilder, private modalService: BsModalService) { }
+constructor(private subscriptionPriceService: SubscriptionPriceService, private router: Router, private _confirmService: ConfirmService, private fb: FormBuilder, private modalService: BsModalService) { }
ngOnInit(): void {
this.divClass = 'col-sm-12';
@@ -80,7 +81,8 @@ constructor(private subscriptionPriceService: SubscriptionPriceService, private
AfterDeleteData(data, template) {
if (data.Status == "false") {
- this.alerts = "Subscription prices delete unsuccessfull";
+ //this.alerts = "Subscription prices delete unsuccessfull";
+ this._confirmService.activate("Subscription prices delete unsuccessfull", "alertMsg");
} else {
this.modalAlerts = "Subscription prices deleted successfully
";
this.modalRef = this.modalService.show(template);
@@ -90,7 +92,8 @@ constructor(private subscriptionPriceService: SubscriptionPriceService, private
AfterInsertData(data, template) {
if (data.Status == "false") {
- this.alerts = "Subscription price save unsuccessfull";
+ // this.alerts = "Subscription price save unsuccessfull";
+ this._confirmService.activate("Subscription prices insert unsuccessfull", "alertMsg");
} else {
this.modalAlerts = "Subscription price saved successfully
";
this.modalRef = this.modalService.show(template);
@@ -99,7 +102,8 @@ constructor(private subscriptionPriceService: SubscriptionPriceService, private
AfterUpdateData(data, template) {
if (data.Status == "false") {
- this.alerts = "Subscription prices update unsuccessfull\n";
+ //this.alerts = "Subscription prices update unsuccessfull\n";
+ this._confirmService.activate("Subscription prices update unsuccessfull", "alertMsg");
} else {
this.modalAlerts = "Subscription prices updated successfully
";
this.modalRef = this.modalService.show(template);