├── .gitattributes ├── .gitignore ├── AngularCoreGym ├── AngularCoreGym.Concrete │ ├── AngularCoreGym.Concrete.csproj │ ├── DatabaseContext.cs │ ├── GenerateRecepitConcrete.cs │ ├── MemberRegistrationConcrete.cs │ ├── PaymentDetailsConcrete.cs │ ├── PeriodMasterConcrete.cs │ ├── PlanMasterConcrete.cs │ ├── RenewalConcrete.cs │ ├── ReportsMaster.cs │ ├── RoleConcrete.cs │ ├── SchemeMasterConcrete.cs │ ├── UsersConcrete.cs │ └── UsersInRolesConcrete.cs ├── AngularCoreGym.Interface │ ├── AngularCoreGym.Interface.csproj │ ├── Class1.cs │ ├── IGenerateRecepit.cs │ ├── IMemberRegistration.cs │ ├── IPaymentDetails.cs │ ├── IPeriodMaster.cs │ ├── IPlanMaster.cs │ ├── IRenewal.cs │ ├── IReports.cs │ ├── IRole.cs │ ├── ISchemeMaster.cs │ ├── IUsers.cs │ └── IUsersInRoles.cs ├── AngularCoreGym.Models │ ├── AngularCoreGym.Models.csproj │ ├── DynamicExtensions.cs │ ├── MemberRegistration.cs │ ├── PaymentDetails.cs │ ├── PeriodTB.cs │ ├── PlanMaster.cs │ ├── QueryParameters.cs │ ├── QueryParametersExtensions.cs │ ├── Role.cs │ ├── SchemeMaster.cs │ ├── Users.cs │ └── UsersInRoles.cs ├── AngularCoreGym.ViewModels │ ├── AmountRequestViewModel.cs │ ├── AngularCoreGym.ViewModels.csproj │ ├── AssignRolesViewModel.cs │ ├── GenerateRecepitRequestModel.cs │ ├── GenerateRecepitViewModel.cs │ ├── LoginResponse.cs │ ├── LoginViewModel.cs │ ├── MemberDetailsReportViewModel.cs │ ├── MemberRegistrationGridModel.cs │ ├── MemberRegistrationViewModel.cs │ ├── MemberRequest.cs │ ├── MonthWiseReportViewModel.cs │ ├── MonthwiseRequestModel.cs │ ├── PaymentDetailsViewModel.cs │ ├── PlanMasterViewModel.cs │ ├── RenewalReportRequestModel.cs │ ├── RenewalReportViewModel.cs │ ├── RenewalViewModel.cs │ ├── RoleViewModel.cs │ ├── SchemeMasterViewModel.cs │ ├── UsersViewModel.cs │ ├── YearWiseRequestModel.cs │ └── YearwiseReportViewModel.cs ├── AngularCoreGym.sln └── AngularCoreGym │ ├── AngularCoreGym.csproj │ ├── ClientApp │ ├── .editorconfig │ ├── README.md │ ├── angular.json │ ├── e2e │ │ ├── protractor.conf.js │ │ ├── src │ │ │ ├── app.e2e-spec.ts │ │ │ └── app.po.ts │ │ └── tsconfig.e2e.json │ ├── package-lock.json │ ├── package.json │ ├── src │ │ ├── app │ │ │ ├── AdminDashboard │ │ │ │ ├── app.AdminDashboardComponent.html │ │ │ │ └── app.AdminDashboardComponent.ts │ │ │ ├── AssignRole │ │ │ │ ├── Models │ │ │ │ │ ├── AssignRemoveModel.ts │ │ │ │ │ └── AssignRolesViewModel.ts │ │ │ │ ├── Services │ │ │ │ │ └── app.AssignandRemoveRole.Service.ts │ │ │ │ ├── app.AllAssignRole.component.ts │ │ │ │ ├── app.AllAssignedRoles.html │ │ │ │ ├── app.AssignRole.component.ts │ │ │ │ └── app.AssignandRemoveRole.html │ │ │ ├── AuthGuard │ │ │ │ ├── AdminAuthGuardService.ts │ │ │ │ └── UserAuthGuardService.ts │ │ │ ├── Content │ │ │ │ ├── dist │ │ │ │ │ ├── css │ │ │ │ │ │ ├── sb-admin-2.css │ │ │ │ │ │ └── sb-admin-2.min.css │ │ │ │ │ └── js │ │ │ │ │ │ ├── sb-admin-2.js │ │ │ │ │ │ └── sb-admin-2.min.js │ │ │ │ └── vendor │ │ │ │ │ ├── bootstrap-social │ │ │ │ │ ├── bootstrap-social.css │ │ │ │ │ ├── bootstrap-social.less │ │ │ │ │ └── bootstrap-social.scss │ │ │ │ │ ├── bootstrap │ │ │ │ │ ├── css │ │ │ │ │ │ ├── bootstrap.css │ │ │ │ │ │ └── bootstrap.min.css │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ │ │ └── js │ │ │ │ │ │ ├── bootstrap.js │ │ │ │ │ │ └── bootstrap.min.js │ │ │ │ │ ├── datatables-plugins │ │ │ │ │ ├── dataTables.bootstrap.css │ │ │ │ │ ├── dataTables.bootstrap.js │ │ │ │ │ ├── dataTables.bootstrap.min.js │ │ │ │ │ └── index.html │ │ │ │ │ ├── datatables-responsive │ │ │ │ │ ├── dataTables.responsive.css │ │ │ │ │ ├── dataTables.responsive.js │ │ │ │ │ └── dataTables.responsive.scss │ │ │ │ │ ├── datatables │ │ │ │ │ ├── css │ │ │ │ │ │ ├── dataTables.bootstrap.css │ │ │ │ │ │ ├── dataTables.bootstrap.min.css │ │ │ │ │ │ ├── dataTables.bootstrap4.css │ │ │ │ │ │ ├── dataTables.bootstrap4.min.css │ │ │ │ │ │ ├── dataTables.foundation.css │ │ │ │ │ │ ├── dataTables.foundation.min.css │ │ │ │ │ │ ├── dataTables.jqueryui.css │ │ │ │ │ │ ├── dataTables.jqueryui.min.css │ │ │ │ │ │ ├── dataTables.material.css │ │ │ │ │ │ ├── dataTables.material.min.css │ │ │ │ │ │ ├── dataTables.semanticui.css │ │ │ │ │ │ ├── dataTables.semanticui.min.css │ │ │ │ │ │ ├── dataTables.uikit.css │ │ │ │ │ │ ├── dataTables.uikit.min.css │ │ │ │ │ │ ├── jquery.dataTables.css │ │ │ │ │ │ ├── jquery.dataTables.min.css │ │ │ │ │ │ └── jquery.dataTables_themeroller.css │ │ │ │ │ ├── images │ │ │ │ │ │ ├── Sorting icons.psd │ │ │ │ │ │ ├── favicon.ico │ │ │ │ │ │ ├── sort_asc.png │ │ │ │ │ │ ├── sort_asc_disabled.png │ │ │ │ │ │ ├── sort_both.png │ │ │ │ │ │ ├── sort_desc.png │ │ │ │ │ │ └── sort_desc_disabled.png │ │ │ │ │ └── js │ │ │ │ │ │ ├── dataTables.bootstrap.js │ │ │ │ │ │ ├── dataTables.bootstrap.min.js │ │ │ │ │ │ ├── dataTables.bootstrap4.js │ │ │ │ │ │ ├── dataTables.bootstrap4.min.js │ │ │ │ │ │ ├── dataTables.foundation.js │ │ │ │ │ │ ├── dataTables.foundation.min.js │ │ │ │ │ │ ├── dataTables.jqueryui.js │ │ │ │ │ │ ├── dataTables.jqueryui.min.js │ │ │ │ │ │ ├── dataTables.material.js │ │ │ │ │ │ ├── dataTables.material.min.js │ │ │ │ │ │ ├── dataTables.semanticui.js │ │ │ │ │ │ ├── dataTables.semanticui.min.js │ │ │ │ │ │ ├── dataTables.uikit.js │ │ │ │ │ │ ├── dataTables.uikit.min.js │ │ │ │ │ │ ├── jquery.dataTables.js │ │ │ │ │ │ ├── jquery.dataTables.min.js │ │ │ │ │ │ └── jquery.js │ │ │ │ │ ├── flot-tooltip │ │ │ │ │ ├── jquery.flot.tooltip.js │ │ │ │ │ ├── jquery.flot.tooltip.min.js │ │ │ │ │ └── jquery.flot.tooltip.source.js │ │ │ │ │ ├── flot │ │ │ │ │ ├── excanvas.js │ │ │ │ │ ├── excanvas.min.js │ │ │ │ │ ├── jquery.colorhelpers.js │ │ │ │ │ ├── jquery.flot.canvas.js │ │ │ │ │ ├── jquery.flot.categories.js │ │ │ │ │ ├── jquery.flot.crosshair.js │ │ │ │ │ ├── jquery.flot.errorbars.js │ │ │ │ │ ├── jquery.flot.fillbetween.js │ │ │ │ │ ├── jquery.flot.image.js │ │ │ │ │ ├── jquery.flot.js │ │ │ │ │ ├── jquery.flot.navigate.js │ │ │ │ │ ├── jquery.flot.pie.js │ │ │ │ │ ├── jquery.flot.resize.js │ │ │ │ │ ├── jquery.flot.selection.js │ │ │ │ │ ├── jquery.flot.stack.js │ │ │ │ │ ├── jquery.flot.symbol.js │ │ │ │ │ ├── jquery.flot.threshold.js │ │ │ │ │ ├── jquery.flot.time.js │ │ │ │ │ └── jquery.js │ │ │ │ │ ├── font-awesome │ │ │ │ │ ├── HELP-US-OUT.txt │ │ │ │ │ ├── css │ │ │ │ │ │ ├── font-awesome.css │ │ │ │ │ │ ├── font-awesome.css.map │ │ │ │ │ │ └── font-awesome.min.css │ │ │ │ │ ├── fonts │ │ │ │ │ │ ├── FontAwesome.otf │ │ │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ │ │ ├── less │ │ │ │ │ │ ├── animated.less │ │ │ │ │ │ ├── bordered-pulled.less │ │ │ │ │ │ ├── core.less │ │ │ │ │ │ ├── extras.less │ │ │ │ │ │ ├── fixed-width.less │ │ │ │ │ │ ├── font-awesome.less │ │ │ │ │ │ ├── icons.less │ │ │ │ │ │ ├── larger.less │ │ │ │ │ │ ├── list.less │ │ │ │ │ │ ├── mixins.less │ │ │ │ │ │ ├── path.less │ │ │ │ │ │ ├── rotated-flipped.less │ │ │ │ │ │ ├── screen-reader.less │ │ │ │ │ │ ├── spinning.less │ │ │ │ │ │ ├── stacked.less │ │ │ │ │ │ └── variables.less │ │ │ │ │ └── scss │ │ │ │ │ │ ├── _animated.scss │ │ │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ │ │ ├── _core.scss │ │ │ │ │ │ ├── _extras.scss │ │ │ │ │ │ ├── _fixed-width.scss │ │ │ │ │ │ ├── _icons.scss │ │ │ │ │ │ ├── _larger.scss │ │ │ │ │ │ ├── _list.scss │ │ │ │ │ │ ├── _mixins.scss │ │ │ │ │ │ ├── _path.scss │ │ │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ │ │ ├── _screen-reader.scss │ │ │ │ │ │ ├── _spinning.scss │ │ │ │ │ │ ├── _stacked.scss │ │ │ │ │ │ ├── _variables.scss │ │ │ │ │ │ └── font-awesome.scss │ │ │ │ │ ├── jquery │ │ │ │ │ ├── jquery.js │ │ │ │ │ └── jquery.min.js │ │ │ │ │ ├── metisMenu │ │ │ │ │ ├── metisMenu.css │ │ │ │ │ ├── metisMenu.js │ │ │ │ │ ├── metisMenu.min.css │ │ │ │ │ └── metisMenu.min.js │ │ │ │ │ ├── morrisjs │ │ │ │ │ ├── morris.css │ │ │ │ │ ├── morris.js │ │ │ │ │ └── morris.min.js │ │ │ │ │ └── raphael │ │ │ │ │ ├── raphael.js │ │ │ │ │ └── raphael.min.js │ │ │ ├── CreateUsers │ │ │ │ ├── Models │ │ │ │ │ ├── app.UserDropdownModel.ts │ │ │ │ │ └── app.UserModel.ts │ │ │ │ ├── Services │ │ │ │ │ └── app.UserRegistration.Service.ts │ │ │ │ ├── app.AllUserRegistration.component.ts │ │ │ │ ├── app.AllUserRegistration.html │ │ │ │ ├── app.EditUserRegistration.component.ts │ │ │ │ ├── app.EditUserRegistration.html │ │ │ │ ├── app.UserRegistration.component.ts │ │ │ │ └── app.UserRegistration.html │ │ │ ├── Login │ │ │ │ ├── Models │ │ │ │ │ └── app.LoginModel.ts │ │ │ │ ├── Services │ │ │ │ │ └── app.LoginService.ts │ │ │ │ ├── app.AdminLogout.Component.ts │ │ │ │ ├── app.LoginComponent.ts │ │ │ │ ├── app.UserLogout.Component.ts │ │ │ │ └── app.login.html │ │ │ ├── MemberRegistration │ │ │ │ ├── List │ │ │ │ │ ├── Memberlist.component.html │ │ │ │ │ ├── app.MemberListComponent .ts │ │ │ │ │ ├── app.MemberViewComponent.html │ │ │ │ │ └── app.MemberViewComponent.ts │ │ │ │ ├── Models │ │ │ │ │ ├── app.MemberRegistrationGridModel.ts │ │ │ │ │ └── app.MemberRegistrationModel.ts │ │ │ │ ├── Services │ │ │ │ │ └── app.MemberRegistration.Service.ts │ │ │ │ ├── app.AllMemberRegistration.component.ts │ │ │ │ ├── app.AllMemberRegistration.html │ │ │ │ ├── app.EditMemberRegistration.component.ts │ │ │ │ ├── app.EditMemberRegistration.html │ │ │ │ ├── app.MemberRegistration.component.ts │ │ │ │ ├── app.MemberRegistration.html │ │ │ │ └── app.memberComponent.css │ │ │ ├── Payment │ │ │ │ ├── List │ │ │ │ │ ├── app.PaymentListComponent.ts │ │ │ │ │ ├── app.PaymentOverviewComponent.ts │ │ │ │ │ ├── app.PaymentViewComponent.html │ │ │ │ │ └── app.Paymentlist.component.html │ │ │ │ ├── Models │ │ │ │ │ └── app.PaymentDetailsModel.ts │ │ │ │ └── Services │ │ │ │ │ └── app.PaymentDetails.Service.ts │ │ │ ├── PeriodMaster │ │ │ │ ├── Models │ │ │ │ │ └── app.PeriodModel.ts │ │ │ │ └── Services │ │ │ │ │ └── app.Period.Service.ts │ │ │ ├── PlanMaster │ │ │ │ ├── Models │ │ │ │ │ ├── app.ActivePlanModel.ts │ │ │ │ │ ├── app.PlanMasterModel.ts │ │ │ │ │ └── app.PlanMasterViewModel.ts │ │ │ │ ├── Services │ │ │ │ │ └── app.planmaster.service.ts │ │ │ │ ├── app.EditPlan.component.html │ │ │ │ ├── app.EditPlan.component.ts │ │ │ │ ├── app.allplanmaster.component.html │ │ │ │ ├── app.allplanmaster.component.ts │ │ │ │ ├── app.planmaster.component.html │ │ │ │ └── app.planmaster.component.ts │ │ │ ├── Recepit │ │ │ │ ├── Models │ │ │ │ │ ├── app.GenerateRecepitRequestModel.ts │ │ │ │ │ └── app.GenerateRecepitViewModel.ts │ │ │ │ ├── Recepit.html │ │ │ │ ├── Services │ │ │ │ │ └── app.GenerateRecepit.Service.ts │ │ │ │ └── app.generateRecepit.Component.ts │ │ │ ├── Renewal │ │ │ │ ├── Models │ │ │ │ │ ├── app.RenewalModel.ts │ │ │ │ │ ├── app.RequestMemberModel.ts │ │ │ │ │ ├── app.RequestMemberNoModel.ts │ │ │ │ │ └── app.ResponseMemberModel.ts │ │ │ │ ├── Services │ │ │ │ │ └── app.renewal.Service.ts │ │ │ │ ├── app.Renewal.Component.ts │ │ │ │ └── app.renewalcomponent.html │ │ │ ├── Reports │ │ │ │ ├── Models │ │ │ │ │ ├── app.MemberDetailsReportViewModel.ts │ │ │ │ │ ├── app.MonthModel.ts │ │ │ │ │ ├── app.MonthWiseRequestModel.ts │ │ │ │ │ ├── app.MonthWiseResponseModel.ts │ │ │ │ │ ├── app.RenewalReportViewModel.ts │ │ │ │ │ ├── app.RenewalRequestModel.ts │ │ │ │ │ ├── app.YearModel.ts │ │ │ │ │ ├── app.YearwiseRequestModel.ts │ │ │ │ │ └── app.YearwiseResponseModel.ts │ │ │ │ ├── Services │ │ │ │ │ └── app.ReportServices.ts │ │ │ │ ├── app.MemberDetailsReport.Component.ts │ │ │ │ ├── app.MemberDetailsReport.css │ │ │ │ ├── app.MemberDetailsReport.html │ │ │ │ ├── app.MonthwiseReport.Component.ts │ │ │ │ ├── app.MonthwiseReport.html │ │ │ │ ├── app.RenewalReport.Component.ts │ │ │ │ ├── app.RenewalReport.html │ │ │ │ ├── app.YearwiseReport.Component.ts │ │ │ │ └── app.YearwiseReport.html │ │ │ ├── RoleMaster │ │ │ │ ├── Models │ │ │ │ │ └── app.RoleModel.ts │ │ │ │ ├── Services │ │ │ │ │ └── app.role.Service.ts │ │ │ │ ├── app.AllRole.component.ts │ │ │ │ ├── app.AllRole.html │ │ │ │ ├── app.EditRole.component.ts │ │ │ │ ├── app.EditRole.html │ │ │ │ ├── app.Role.component.ts │ │ │ │ └── app.Role.html │ │ │ ├── SchemeMasters │ │ │ │ ├── Models │ │ │ │ │ ├── app.SchemeDropdownModel.ts │ │ │ │ │ └── app.SchemeViewModel.ts │ │ │ │ ├── Services │ │ │ │ │ └── app.Scheme.Service.ts │ │ │ │ ├── app.AllScheme.Component.ts │ │ │ │ ├── app.AllSchemeComponent.css │ │ │ │ ├── app.AllSchemeComponent.html │ │ │ │ ├── app.EditScheme.Component.ts │ │ │ │ ├── app.EditSchemeComponent.html │ │ │ │ ├── app.Scheme.Component.ts │ │ │ │ ├── app.SchemeMaster.html │ │ │ │ └── app.SchemeModel.ts │ │ │ ├── Shared │ │ │ │ ├── PaginationModel.ts │ │ │ │ ├── PaginationService.ts │ │ │ │ ├── app.GenderModel.ts │ │ │ │ ├── constantUrl.ts │ │ │ │ └── environment.ts │ │ │ ├── UserDashboard │ │ │ │ ├── app.UserDashboardComponent.html │ │ │ │ └── app.UserDashboardComponent.ts │ │ │ ├── _layout │ │ │ │ ├── app-admin-layout.component.html │ │ │ │ ├── app-adminlayout.component.css │ │ │ │ ├── app-adminlayout.component.ts │ │ │ │ ├── app-user-layout.component.html │ │ │ │ └── app-userlayout.component.ts │ │ │ ├── app-routing.module.ts │ │ │ ├── app.component.css │ │ │ ├── app.component.html │ │ │ ├── app.component.spec.ts │ │ │ ├── app.component.ts │ │ │ └── app.module.ts │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── browserslist │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── index.html │ │ ├── karma.conf.js │ │ ├── main.ts │ │ ├── polyfills.ts │ │ ├── styles.css │ │ ├── test.ts │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ └── tslint.json │ ├── tsconfig.json │ └── tslint.json │ ├── Common │ ├── CustomExceptionFilterAttribute.cs │ └── EncryptionLibrary.cs │ ├── Controllers │ ├── AllActivePlanMasterController.cs │ ├── AssignRolesController.cs │ ├── AuthenticateController.cs │ ├── CreateRoleController.cs │ ├── GenerateRecepitController.cs │ ├── GetMemberNoController.cs │ ├── GetTotalAmountController.cs │ ├── MemberDetailsReportController.cs │ ├── MonthwiseReportController.cs │ ├── PaymentController.cs │ ├── PeriodController.cs │ ├── PlanMasterController.cs │ ├── RegisterMemberController.cs │ ├── RemoveRoleController.cs │ ├── RenewalController.cs │ ├── RenewalDetailsController.cs │ ├── RenewalReportController.cs │ ├── SampleDataController.cs │ ├── SchemeController.cs │ ├── SchemeDropdownController.cs │ ├── UserController.cs │ └── YearwiseReportController.cs │ ├── Models │ ├── AppSettings.cs │ └── ErrorViewModel.cs │ ├── Pages │ ├── Error.cshtml │ ├── Error.cshtml.cs │ └── _ViewImports.cshtml │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ └── favicon.ico ├── Images ├── 1.png ├── 2.jpg ├── 3.jpg ├── 4.jpg ├── 5.jpg ├── 6.png └── hqdefault.jpg ├── LICENSE └── README.md /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Concrete/AngularCoreGym.Concrete.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Concrete/DatabaseContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.EntityFrameworkCore; 7 | using AngularCoreGym.Models; 8 | 9 | namespace AngularCoreGym.Concrete 10 | { 11 | public class DatabaseContext : DbContext 12 | { 13 | public DatabaseContext(DbContextOptions options) : base(options) 14 | { 15 | 16 | } 17 | 18 | public DbSet SchemeMaster { get; set; } 19 | public DbSet PeriodTb { get; set; } 20 | public DbSet PlanMaster { get; set; } 21 | public DbSet Role { get; set; } 22 | public DbSet MemberRegistration { get; set; } 23 | public DbSet Users { get; set; } 24 | public DbSet UsersInRoles { get; set; } 25 | public DbSet PaymentDetails { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Concrete/GenerateRecepitConcrete.cs: -------------------------------------------------------------------------------- 1 | using Dapper; 2 | using Microsoft.Extensions.Configuration; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Data; 6 | using System.Data.SqlClient; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using AngularCoreGym.Interface; 11 | using AngularCoreGym.ViewModels; 12 | 13 | namespace AngularCoreGym.Concrete 14 | { 15 | public class GenerateRecepitConcrete : IGenerateRecepit 16 | { 17 | private readonly IConfiguration _configuration; 18 | private readonly DatabaseContext _context; 19 | 20 | public GenerateRecepitConcrete(DatabaseContext context, IConfiguration configuration) 21 | { 22 | _context = context; 23 | _configuration = configuration; 24 | 25 | } 26 | public GenerateRecepitViewModel Generate(int paymentId) 27 | { 28 | using (var con = new SqlConnection(_configuration.GetConnectionString("DatabaseConnection"))) 29 | { 30 | var para = new DynamicParameters(); 31 | para.Add("@PaymentID", paymentId); 32 | return con.Query("GetRecepit", para, null, true, 0, commandType: CommandType.StoredProcedure).SingleOrDefault(); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Concrete/PeriodMasterConcrete.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AngularCoreGym.Interface; 7 | using AngularCoreGym.Models; 8 | 9 | namespace AngularCoreGym.Concrete 10 | { 11 | public class PeriodMasterConcrete : IPeriodMaster 12 | { 13 | private readonly DatabaseContext _databaseContext; 14 | public PeriodMasterConcrete(DatabaseContext databaseContext) 15 | { 16 | _databaseContext = databaseContext; 17 | } 18 | 19 | public List ListofPeriod() 20 | { 21 | var listofPeriod = _databaseContext.PeriodTb.ToList(); 22 | 23 | listofPeriod.IndexOf(new PeriodTB() 24 | { 25 | Text = "---Select---", 26 | Value = string.Empty 27 | },0); 28 | 29 | return listofPeriod; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Concrete/RenewalConcrete.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.Extensions.Configuration; 7 | using AngularCoreGym.Interface; 8 | using AngularCoreGym.ViewModels; 9 | 10 | namespace AngularCoreGym.Concrete 11 | { 12 | public class RenewalConcrete : IRenewal 13 | { 14 | 15 | private readonly IConfiguration _configuration; 16 | private readonly DatabaseContext _context; 17 | 18 | public RenewalConcrete(DatabaseContext context, IConfiguration configuration) 19 | { 20 | _context = context; 21 | _configuration = configuration; 22 | 23 | } 24 | 25 | public RenewalViewModel GetMemberNo(string memberNo , int userid) 26 | { 27 | var membernoList = (from member in _context.MemberRegistration 28 | join payment in _context.PaymentDetails on member.MemberId equals payment.MemberID 29 | where member.MemberNo == memberNo && member.Createdby == userid 30 | select new RenewalViewModel 31 | { 32 | MemberNo = member.MemberNo, 33 | MemberName = member.MemberFName + ' ' + member.MemberMName + ' ' + member.MemberLName, 34 | PlanID = payment.PlanID, 35 | MemberId = member.MemberId, 36 | SchemeID = payment.WorkouttypeID, 37 | NextRenwalDate = payment.NextRenwalDate, 38 | Amount = payment.PaymentAmount, 39 | PaymentID = payment.PaymentID 40 | }).OrderByDescending(x => x.PaymentID).FirstOrDefault(); 41 | 42 | return membernoList; 43 | } 44 | 45 | public bool CheckRenewalPaymentExists(DateTime newdate , long memberId) 46 | { 47 | var data = (from payment in _context.PaymentDetails 48 | where payment.MemberID == memberId && newdate.Date >= payment.PaymentFromdt.Date && newdate.Date <= payment.PaymentTodt.Date 49 | select payment).Any(); 50 | 51 | return data; 52 | } 53 | 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/AngularCoreGym.Interface.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/Class1.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AngularCoreGym.Interface 4 | { 5 | public class Class1 6 | { 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/IGenerateRecepit.cs: -------------------------------------------------------------------------------- 1 | using AngularCoreGym.ViewModels; 2 | 3 | namespace AngularCoreGym.Interface 4 | { 5 | public interface IGenerateRecepit 6 | { 7 | GenerateRecepitViewModel Generate(int paymentId); 8 | } 9 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/IMemberRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using AngularCoreGym.Models; 4 | using AngularCoreGym.ViewModels; 5 | 6 | namespace AngularCoreGym.Interface 7 | { 8 | public interface IMemberRegistration 9 | { 10 | int InsertMember(MemberRegistration memberRegistration); 11 | long CheckNameExitsforUpdate(string memberFName, string memberLName, string memberMName); 12 | bool CheckNameExits(string memberFName ,string memberLName, string memberMName); 13 | List GetMemberList(); 14 | MemberRegistrationViewModel GetMemberbyId(int memberId); 15 | bool DeleteMember(long memberId); 16 | int UpdateMember(MemberRegistration memberRegistration); 17 | IQueryable GetAll(QueryParameters queryParameters, int userId); 18 | int Count(int userId); 19 | List GetMemberNoList(string memberNo, int userId); 20 | } 21 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/IPaymentDetails.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using AngularCoreGym.Models; 3 | using AngularCoreGym.ViewModels; 4 | 5 | namespace AngularCoreGym.Interface 6 | { 7 | public interface IPaymentDetails 8 | { 9 | IQueryable GetAll(QueryParameters queryParameters, int userId); 10 | int Count(int userId); 11 | bool RenewalPayment(RenewalViewModel renewalViewModel); 12 | } 13 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/IPeriodMaster.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AngularCoreGym.Models; 7 | 8 | namespace AngularCoreGym.Interface 9 | { 10 | public interface IPeriodMaster 11 | { 12 | List ListofPeriod(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/IPlanMaster.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using AngularCoreGym.Models; 3 | using AngularCoreGym.ViewModels; 4 | 5 | namespace AngularCoreGym.Interface 6 | { 7 | public interface IPlanMaster 8 | { 9 | void InsertPlan(PlanMaster plan); 10 | bool CheckPlanExits(string planName); 11 | List GetPlanMasterList(); 12 | PlanMasterViewModel GetPlanMasterbyId(int planId); 13 | bool DeletePlan(int planId); 14 | bool UpdatePlanMaster(PlanMaster planMaster); 15 | List GetActivePlanMasterList(int? schemeId); 16 | string GetAmount(int planId, int schemeId); 17 | int GetPlanMonthbyPlanId(int? planId); 18 | } 19 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/IRenewal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using AngularCoreGym.ViewModels; 3 | 4 | namespace AngularCoreGym.Interface 5 | { 6 | public interface IRenewal 7 | { 8 | RenewalViewModel GetMemberNo(string memberNo, int userid); 9 | bool CheckRenewalPaymentExists(DateTime newdate, long memberId); 10 | } 11 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/IReports.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using AngularCoreGym.ViewModels; 3 | 4 | namespace AngularCoreGym.Interface 5 | { 6 | public interface IReports 7 | { 8 | List Generate_AllMemberDetailsReport(); 9 | List Get_YearwisePayment_details(string year); 10 | List Get_MonthwisePayment_details(string monthId); 11 | List Get_RenewalReport(RenewalReportRequestModel renewalReport); 12 | } 13 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/IRole.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using AngularCoreGym.Models; 3 | 4 | namespace AngularCoreGym.Interface 5 | { 6 | public interface IRole 7 | { 8 | void InsertRole(Role role); 9 | bool CheckRoleExits(string roleName); 10 | Role GetRolebyId(int roleId); 11 | bool DeleteRole(int roleId); 12 | bool UpdateRole(Role role); 13 | List GetAllRole(); 14 | } 15 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/ISchemeMaster.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using AngularCoreGym.Models; 7 | 8 | namespace AngularCoreGym.Interface 9 | { 10 | public interface ISchemeMaster 11 | { 12 | bool AddSchemeMaster(SchemeMaster schemeMaster); 13 | List GetSchemeMasterList(); 14 | SchemeMaster GetSchemeMasterbyId(int schemeId); 15 | bool CheckSchemeNameExists(string schemeName); 16 | bool UpdateSchemeMaster(SchemeMaster schemeMaster); 17 | bool DeleteScheme(int schemeId); 18 | 19 | List GetActiveSchemeMasterList(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/IUsers.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using AngularCoreGym.Models; 3 | using AngularCoreGym.ViewModels; 4 | 5 | namespace AngularCoreGym.Interface 6 | { 7 | public interface IUsers 8 | { 9 | bool InsertUsers(Users user); 10 | bool CheckUsersExits(string username); 11 | Users GetUsersbyId(int userid); 12 | bool DeleteUsers(int userid); 13 | bool UpdateUsers(Users role); 14 | List GetAllUsers(); 15 | bool AuthenticateUsers(string username, string password); 16 | LoginResponse GetUserDetailsbyCredentials(string username, string password); 17 | } 18 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Interface/IUsersInRoles.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using AngularCoreGym.Models; 3 | using AngularCoreGym.ViewModels; 4 | 5 | namespace AngularCoreGym.Interface 6 | { 7 | public interface IUsersInRoles 8 | { 9 | bool AssignRole(UsersInRoles usersInRoles); 10 | bool CheckRoleExists(UsersInRoles usersInRoles); 11 | bool RemoveRole(UsersInRoles usersInRoles); 12 | List GetAssignRoles(); 13 | } 14 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/AngularCoreGym.Models.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/DynamicExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Dynamic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace AngularCoreGym.Models 10 | { 11 | public static class DynamicExtensions 12 | { 13 | public static dynamic ToDynamic(this object value) 14 | { 15 | IDictionary expando = new ExpandoObject(); 16 | 17 | foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(value.GetType())) 18 | expando.Add(property.Name, property.GetValue(value)); 19 | 20 | return expando as ExpandoObject; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/PaymentDetails.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace AngularCoreGym.Models 10 | { 11 | [Table("PaymentDetails")] 12 | public class PaymentDetails 13 | { 14 | [Key] 15 | public long PaymentID { get; set; } 16 | public int PlanID { get; set; } 17 | public int? WorkouttypeID { get; set; } 18 | public string Paymenttype { get; set; } 19 | public DateTime PaymentFromdt { get; set; } 20 | public DateTime PaymentTodt { get; set; } 21 | public decimal? PaymentAmount { get; set; } 22 | public DateTime NextRenwalDate { get; set; } 23 | public DateTime? CreateDate { get; set; } 24 | public int? Createdby { get; set; } 25 | public DateTime? ModifyDate { get; set; } 26 | public int? ModifiedBy { get; set; } 27 | public string RecStatus { get; set; } 28 | public long? MemberID { get; set; } 29 | public string MemberNo { get; set; } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/PeriodTB.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace AngularCoreGym.Models 10 | { 11 | [Table("PeriodTB")] 12 | public class PeriodTB 13 | { 14 | [Key] 15 | public int PeriodID { get; set; } 16 | public string Text { get; set; } 17 | public string Value { get; set; } 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/PlanMaster.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace AngularCoreGym.Models 9 | { 10 | public class PlanMaster 11 | { 12 | [Key] 13 | public int PlanID { get; set; } 14 | public string PlanName { get; set; } 15 | public decimal? PlanAmount { get; set; } 16 | public decimal? ServicetaxAmount { get; set; } 17 | public string ServiceTax { get; set; } 18 | public DateTime? CreateDate { get; set; } 19 | public int? CreateUserID { get; set; } 20 | public DateTime? ModifyDate { get; set; } 21 | public int? ModifyUserID { get; set; } 22 | public bool RecStatus { get; set; } 23 | public int? SchemeID { get; set; } 24 | public int PeriodID { get; set; } 25 | public decimal? TotalAmount { get; set; } 26 | public string ServicetaxNo { get; set; } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/QueryParameters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AngularCoreGym.Models 8 | { 9 | public class QueryParameters 10 | { 11 | private const int MaxPageCount = 20; 12 | public int Page { get; set; } = 1; 13 | private int _pageCount = MaxPageCount; 14 | public int PageCount 15 | { 16 | get { return _pageCount; } 17 | set { _pageCount = (value > MaxPageCount) ? MaxPageCount : value; } 18 | } 19 | public string Query { get; set; } 20 | public string OrderBy { get; set; } = "MemberFName"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/QueryParametersExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AngularCoreGym.Models 8 | { 9 | public static class QueryParametersExtensions 10 | { 11 | public static bool HasPrevious(this QueryParameters queryParameters) 12 | { 13 | return (queryParameters.Page > 1); 14 | } 15 | 16 | public static bool HasNext(this QueryParameters queryParameters, int totalCount) 17 | { 18 | return (queryParameters.Page < (int)GetTotalPages(queryParameters, totalCount)); 19 | } 20 | 21 | public static double GetTotalPages(this QueryParameters queryParameters, int totalCount) 22 | { 23 | return Math.Ceiling(totalCount / (double)queryParameters.PageCount); 24 | } 25 | 26 | public static bool HasQuery(this QueryParameters queryParameters) 27 | { 28 | return !String.IsNullOrEmpty(queryParameters.Query); 29 | } 30 | 31 | public static bool IsDescending(this QueryParameters queryParameters) 32 | { 33 | if (!String.IsNullOrEmpty(queryParameters.OrderBy)) 34 | { 35 | return queryParameters.OrderBy.Split(' ').Last().ToLowerInvariant().StartsWith("desc"); 36 | } 37 | return false; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/Role.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace AngularCoreGym.Models 10 | { 11 | [Table("Role")] 12 | public class Role 13 | { 14 | [Key] 15 | public int RoleId { get; set; } 16 | 17 | [Required(ErrorMessage = "Enter Role name")] 18 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 19 | public string RoleName { get; set; } 20 | 21 | public bool Status { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/SchemeMaster.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace AngularCoreGym.Models 9 | { 10 | public class SchemeMaster 11 | { 12 | [Key] 13 | public int SchemeID { get; set; } 14 | public string SchemeName { get; set; } 15 | public int Createdby { get; set; } 16 | public DateTime Createddate { get; set; } 17 | public bool Status { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/Users.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace AngularCoreGym.Models 10 | { 11 | [Table("Users")] 12 | public class Users 13 | { 14 | [Key] 15 | public int UserId { get; set; } 16 | public string UserName { get; set; } 17 | public string FullName { get; set; } 18 | public string EmailId { get; set; } 19 | public string Contactno { get; set; } 20 | public string Password { get; set; } 21 | public int? Createdby { get; set; } 22 | public DateTime? CreatedDate { get; set; } 23 | public bool Status { get; set; } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.Models/UsersInRoles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace AngularCoreGym.Models 10 | { 11 | [Table("UsersInRoles")] 12 | public class UsersInRoles 13 | { 14 | [Key] 15 | public int UserRolesId { get; set; } 16 | public int RoleId { get; set; } 17 | public int UserId { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/AmountRequestViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace AngularCoreGym.ViewModels 9 | { 10 | public class AmountRequestViewModel 11 | { 12 | [Required(ErrorMessage = "Plan is Required")] 13 | public int PlanId { get; set; } 14 | [Required(ErrorMessage = "Scheme is Required")] 15 | public int SchemeId { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/AngularCoreGym.ViewModels.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/AssignRolesViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AngularCoreGym.ViewModels 8 | { 9 | public class AssignRolesViewModel 10 | { 11 | public int UserId { get; set; } 12 | public string UserName { get; set; } 13 | public int RoleId { get; set; } 14 | public string RoleName { get; set; } 15 | public int UserRolesId { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/GenerateRecepitRequestModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AngularCoreGym.ViewModels 8 | { 9 | public class GenerateRecepitRequestModel 10 | { 11 | public int PaymentId { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/GenerateRecepitViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AngularCoreGym.ViewModels 8 | { 9 | public class GenerateRecepitViewModel 10 | { 11 | public string MemberNo { get; set; } 12 | public string MemberName { get; set; } 13 | public string PlanName { get; set; } 14 | public string SchemeName { get; set; } 15 | public string PaymentFromdt { get; set; } 16 | public string PaymentTodt { get; set; } 17 | public string NextRenwalDate { get; set; } 18 | public string PaymentAmount { get; set; } 19 | public string CreateDate { get; set; } 20 | public string ServiceTax { get; set; } 21 | public string PlanAmount { get; set; } 22 | public string ServicetaxAmount { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/LoginResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AngularCoreGym.ViewModels 8 | { 9 | public class LoginResponse 10 | { 11 | public int UserId { get; set; } 12 | public string UserName { get; set; } 13 | public bool Status { get; set; } 14 | public int RoleId { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/LoginViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace AngularCoreGym.ViewModels 9 | { 10 | public class LoginRequestViewModel 11 | { 12 | [Required(ErrorMessage = "Enter UserName")] 13 | public string UserName { get; set; } 14 | 15 | [Required(ErrorMessage = "Enter Password")] 16 | public string Password { get; set; } 17 | public string Token { get; set; } 18 | public int Usertype { get; set; } 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/MemberDetailsReportViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace AngularCoreGym.ViewModels 2 | { 3 | public class MemberDetailsReportViewModel 4 | { 5 | public string Name { get; set; } 6 | public string Address { get; set; } 7 | public string Contactno { get; set; } 8 | public string EmailID { get; set; } 9 | public string MemberNo { get; set; } 10 | public string PlanName { get; set; } 11 | public string SchemeName { get; set; } 12 | public string JoiningDate { get; set; } 13 | public string RenwalDate { get; set; } 14 | public int PaymentAmount { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/MemberRegistrationGridModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AngularCoreGym.ViewModels 4 | { 5 | public class MemberRegistrationGridModel 6 | { 7 | public long MemberId { get; set; } 8 | public string MemberNo { get; set; } 9 | public string MemberName { get; set; } 10 | public DateTime? Dob { get; set; } 11 | public string Contactno { get; set; } 12 | public string EmailId { get; set; } 13 | public string PlanName { get; set; } 14 | public string SchemeName { get; set; } 15 | public DateTime? JoiningDate { get; set; } 16 | public Decimal? Amount { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/MemberRegistrationViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.ComponentModel.DataAnnotations; 5 | using System.ComponentModel.DataAnnotations.Schema; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | 10 | namespace AngularCoreGym.ViewModels 11 | { 12 | public class MemberRegistrationViewModel 13 | { 14 | public long MemberId { get; set; } 15 | 16 | [DisplayName("First Name")] 17 | [Required(ErrorMessage = "Please enter First Name")] 18 | public string MemberFName { get; set; } 19 | [DisplayName("Last Name")] 20 | [Required(ErrorMessage = "Please enter Last Name")] 21 | public string MemberLName { get; set; } 22 | [DisplayName("Middle Name")] 23 | [Required(ErrorMessage = "Please enter Middle Name")] 24 | public string MemberMName { get; set; } 25 | 26 | [DataType(DataType.Date), DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)] 27 | [DisplayName("Birth Date")] 28 | [Required(ErrorMessage = "Please select Birth Date")] 29 | public DateTime? Dob { get; set; } 30 | 31 | [Required(ErrorMessage = "Please select Birth Date")] 32 | public string Age { get; set; } 33 | 34 | [Required(ErrorMessage = "Please enter Contactno")] 35 | public string Contactno { get; set; } 36 | 37 | [Required(ErrorMessage = "Please enter EmailID")] 38 | public string EmailId { get; set; } 39 | 40 | public int? Gender { get; set; } 41 | 42 | [DisplayName("Plan")] 43 | public int? PlanID { get; set; } 44 | 45 | [DisplayName("Workouttype")] 46 | public int? SchemeID { get; set; } 47 | 48 | [DisplayName("Joining Date")] 49 | [Required(ErrorMessage = "Please select Joining Date")] 50 | [DataType(DataType.Date), DisplayFormat(DataFormatString = "{0:yyyy-MM-dd}", ApplyFormatInEditMode = true)] 51 | public DateTime? JoiningDate { get; set; } 52 | 53 | [Required(ErrorMessage = "Please enter Address")] 54 | public string Address { get; set; } 55 | 56 | [Required(ErrorMessage = "Amount Cannot be Empty")] 57 | public Decimal? Amount { get; set; } 58 | 59 | public string SchemeName { get; set; } 60 | 61 | public string PlanName { get; set; } 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/MemberRequest.cs: -------------------------------------------------------------------------------- 1 | namespace AngularCoreGym.ViewModels 2 | { 3 | public class MemberRequest 4 | { 5 | public string MemberName { get; set; } 6 | } 7 | public class MemberResponse 8 | { 9 | public string MemberNo { get; set; } 10 | public string MemberName { get; set; } 11 | } 12 | 13 | public class MemberNoRequest 14 | { 15 | public string MemberNo { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/MonthWiseReportViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace AngularCoreGym.ViewModels 2 | { 3 | public class MonthWiseReportViewModel 4 | { 5 | public string MemberFName { get; set; } 6 | public string MemberNo { get; set; } 7 | public string MemberLName { get; set; } 8 | public string MemberMName { get; set; } 9 | public string CreateDate { get; set; } 10 | public long Total { get; set; } 11 | public string Paymentmonth { get; set; } 12 | public double PaymentAmount { get; set; } 13 | public string Username { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/MonthwiseRequestModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AngularCoreGym.ViewModels 8 | { 9 | public class MonthwiseRequestModel 10 | { 11 | public string MonthId { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/PaymentDetailsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AngularCoreGym.ViewModels 4 | { 5 | public class PaymentDetailsViewModel 6 | { 7 | public long PaymentID { get; set; } 8 | public string PlanName { get; set; } 9 | public string SchemeName { get; set; } 10 | public DateTime? PaymentFromdt { get; set; } 11 | public DateTime? PaymentTodt { get; set; } 12 | public decimal? PaymentAmount { get; set; } 13 | public DateTime? NextRenwalDate { get; set; } 14 | public string RecStatus { get; set; } 15 | public string MemberName { get; set; } 16 | public string MemberNo { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/PlanMasterViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AngularCoreGym.ViewModels 8 | { 9 | public class PlanMasterViewModel 10 | { 11 | public int PlanID { get; set; } 12 | public string PlanName { get; set; } 13 | public decimal? PlanAmount { get; set; } 14 | public decimal? ServicetaxAmount { get; set; } 15 | public string ServiceTax { get; set; } 16 | public bool RecStatus { get; set; } 17 | public int? SchemeID { get; set; } 18 | public int? PeriodID { get; set; } 19 | public decimal? TotalAmount { get; set; } 20 | public string ServicetaxNo { get; set; } 21 | } 22 | 23 | 24 | public class PlanMasterDisplayViewModel 25 | { 26 | public int PlanID { get; set; } 27 | public string PlanName { get; set; } 28 | public decimal? PlanAmount { get; set; } 29 | public decimal? ServicetaxAmount { get; set; } 30 | public string ServiceTax { get; set; } 31 | public bool RecStatus { get; set; } 32 | public int? SchemeID { get; set; } 33 | public string SchemeName { get; set; } 34 | public int? PeriodID { get; set; } 35 | public string Text { get; set; } 36 | public decimal? TotalAmount { get; set; } 37 | public string ServicetaxNo { get; set; } 38 | } 39 | 40 | public class ActivePlanModel 41 | { 42 | public string PlanID { get; set; } 43 | public string PlanName { get; set; } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/RenewalReportRequestModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AngularCoreGym.ViewModels 8 | { 9 | public class RenewalReportRequestModel 10 | { 11 | public string Paymentfromdate { get; set; } 12 | public string Paymentfromto { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/RenewalReportViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace AngularCoreGym.ViewModels 2 | { 3 | public class RenewalReportViewModel 4 | { 5 | public string MemberID { get; set; } 6 | public string PaymentID { get; set; } 7 | public string Name { get; set; } 8 | public string Address { get; set; } 9 | public string Contactno { get; set; } 10 | public string EmailID { get; set; } 11 | public string MemberNo { get; set; } 12 | public string PlanName { get; set; } 13 | public string SchemeName { get; set; } 14 | public string JoiningDate { get; set; } 15 | public string RenwalDate { get; set; } 16 | public string PaymentAmount { get; set; } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/RenewalViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace AngularCoreGym.ViewModels 4 | { 5 | public class RenewalViewModel 6 | { 7 | public int PlanID { get; set; } 8 | public int? SchemeID { get; set; } 9 | public string MemberName { get; set; } 10 | public long MemberId { get; set; } 11 | public string MemberNo { get; set; } 12 | public DateTime NextRenwalDate { get; set; } 13 | public DateTime NewDate { get; set; } 14 | public Decimal? Amount { get; set; } 15 | public long PaymentID { get; set; } 16 | public long? Createdby { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/RoleViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace AngularCoreGym.ViewModels 9 | { 10 | public class RoleViewModel 11 | { 12 | [Required(ErrorMessage = "Enter Role name")] 13 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 3)] 14 | public string RoleName { get; set; } 15 | public bool Status { get; set; } 16 | public int? RoleId { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/SchemeMasterViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace AngularCoreGym.ViewModels 10 | { 11 | public class SchemeMasterViewModel 12 | { 13 | [Required(ErrorMessage = "SchemeName is Required")] 14 | public string SchemeName { get; set; } 15 | 16 | public bool Status { get; set; } 17 | } 18 | public class SchemeMasterEditViewModel 19 | { 20 | [Required(ErrorMessage = "SchemeID is Required")] 21 | public int SchemeID { get; set; } 22 | 23 | [Required(ErrorMessage = "SchemeName is Required")] 24 | public string SchemeName { get; set; } 25 | 26 | public bool Status { get; set; } 27 | } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/UsersViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace AngularCoreGym.ViewModels 9 | { 10 | public class UsersViewModel 11 | { 12 | public int Id { get; set; } 13 | 14 | [Required] 15 | public string UserName { get; set; } 16 | [Required] 17 | public string FullName { get; set; } 18 | [Required] 19 | public string EmailId { get; set; } 20 | [Required] 21 | public string Contactno { get; set; } 22 | [Required] 23 | public string Password { get; set; } 24 | public bool Status { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/YearWiseRequestModel.cs: -------------------------------------------------------------------------------- 1 | namespace AngularCoreGym.ViewModels 2 | { 3 | public class YearWiseRequestModel 4 | { 5 | // ReSharper disable once InconsistentNaming 6 | public string YearID { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym.ViewModels/YearwiseReportViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace AngularCoreGym.ViewModels 8 | { 9 | public class YearwiseReportViewModel 10 | { 11 | public int CurrentYear { get; set; } 12 | public int April { get; set; } 13 | public int May { get; set; } 14 | public int June { get; set; } 15 | public int July { get; set; } 16 | public int August { get; set; } 17 | public int Sept { get; set; } 18 | public int Oct { get; set; } 19 | public int Nov { get; set; } 20 | public int Decm { get; set; } 21 | public int Jan { get; set; } 22 | public int Feb { get; set; } 23 | public int March { get; set; } 24 | public int Total { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/README.md: -------------------------------------------------------------------------------- 1 | # ClientApp 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.0.6. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getTitleText()).toEqual('Welcome to ClientApp!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "client-app", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "~7.0.0", 15 | "@angular/cdk": "^7.1.1", 16 | "@angular/common": "~7.0.0", 17 | "@angular/compiler": "~7.0.0", 18 | "@angular/material": "^7.1.1", 19 | "@angular/core": "~7.0.0", 20 | "@angular/forms": "~7.0.0", 21 | "@angular/http": "~7.0.0", 22 | "@angular/platform-browser": "~7.0.0", 23 | "@angular/platform-browser-dynamic": "~7.0.0", 24 | "@angular/router": "~7.0.0", 25 | "hammerjs": "^2.0.8", 26 | "core-js": "^2.5.4", 27 | "rxjs": "~6.3.3", 28 | "zone.js": "~0.8.26", 29 | "html2canvas": "^1.0.0-alpha.12", 30 | "jspdf": "^1.5.2", 31 | "ngx-bootstrap": "^3.1.2", 32 | "xlsx": "^0.14.1" 33 | }, 34 | "devDependencies": { 35 | "@angular-devkit/build-angular": "~0.10.0", 36 | "@angular/cli": "~7.0.6", 37 | "@angular/compiler-cli": "~7.0.0", 38 | "@angular/language-service": "~7.0.0", 39 | "@types/node": "~8.9.4", 40 | "@types/jasmine": "~2.8.8", 41 | "@types/jasminewd2": "~2.0.3", 42 | "codelyzer": "~4.5.0", 43 | "jasmine-core": "~2.99.1", 44 | "jasmine-spec-reporter": "~4.2.1", 45 | "karma": "~3.0.0", 46 | "karma-chrome-launcher": "~2.2.0", 47 | "karma-coverage-istanbul-reporter": "~2.0.1", 48 | "karma-jasmine": "~1.1.2", 49 | "karma-jasmine-html-reporter": "^0.2.2", 50 | "protractor": "~5.4.0", 51 | "ts-node": "~7.0.0", 52 | "tslint": "~5.11.0", 53 | "typescript": "~3.1.6" 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/AdminDashboard/app.AdminDashboardComponent.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/ASPNET-Core-Angular-7-Project/144d3b32b8df22da6b5bb55718b28262b6f1cc97/AngularCoreGym/AngularCoreGym/ClientApp/src/app/AdminDashboard/app.AdminDashboardComponent.html -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/AdminDashboard/app.AdminDashboardComponent.ts: -------------------------------------------------------------------------------- 1 | import { Component} from '@angular/core'; 2 | 3 | @Component({ 4 | templateUrl:'./app.AdminDashboardComponent.html' 5 | }) 6 | 7 | export class AdminDashboardComponent 8 | { 9 | 10 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/AssignRole/Models/AssignRemoveModel.ts: -------------------------------------------------------------------------------- 1 | export class AssignRemoveModel 2 | { 3 | public UserId: number; 4 | public RoleId : number; 5 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/AssignRole/Models/AssignRolesViewModel.ts: -------------------------------------------------------------------------------- 1 | export class AssignRolesViewModel 2 | { 3 | public UserId: number; 4 | public RoleId : number; 5 | public UserName: string; 6 | public RoleName :string; 7 | public UserRolesId: number; 8 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/AssignRole/app.AllAssignRole.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild } from '@angular/core'; 2 | 3 | import { Router } from '@angular/router'; 4 | import { MatTableDataSource, MatSort, MatPaginator, PageEvent } from '@angular/material'; 5 | import { AssignandRemoveRoleService } from './Services/app.AssignandRemoveRole.Service'; 6 | import { AssignRolesViewModel } from './Models/AssignRolesViewModel'; 7 | 8 | 9 | @Component({ 10 | templateUrl: './app.AllAssignedRoles.html', 11 | styleUrls: ['../Content/vendor/bootstrap/css/bootstrap.min.css', 12 | '../Content/vendor/metisMenu/metisMenu.min.css', 13 | '../Content/dist/css/sb-admin-2.css', 14 | '../Content/vendor/font-awesome/css/font-awesome.min.css' 15 | ] 16 | }) 17 | 18 | export class AllAssignRoleComponent implements OnInit 19 | { 20 | private _assignservice; 21 | @ViewChild(MatSort) sort: MatSort; 22 | @ViewChild(MatPaginator) paginator: MatPaginator; 23 | displayedColumns: string[] = ['RoleName', 'UserName']; 24 | dataSource: any; 25 | AssignModel : AssignRolesViewModel[] 26 | errorMessage: any; 27 | offset: any; 28 | 29 | ngOnInit(): void { 30 | this._assignservice.GetAllAssignedRoles().subscribe( 31 | assignModel => 32 | { 33 | 34 | this.dataSource = new MatTableDataSource(assignModel); 35 | this.dataSource.sort = this.sort; 36 | this.dataSource.paginator = this.paginator; 37 | }, 38 | error => this.errorMessage = error 39 | ); 40 | } 41 | 42 | constructor(private _Route: Router, assignservice: AssignandRemoveRoleService) { 43 | this._assignservice = assignservice; 44 | } 45 | 46 | applyFilter(filterValue: string) { 47 | this.dataSource.filter = filterValue.trim().toLowerCase(); 48 | } 49 | 50 | getNext(event: PageEvent) { 51 | this.offset = event.pageSize * event.pageIndex 52 | // call your api function here with the offset 53 | console.log(event.pageSize); 54 | console.log(event.pageIndex); 55 | } 56 | 57 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/AssignRole/app.AllAssignedRoles.html: -------------------------------------------------------------------------------- 1 |

All AssignRoles

2 |
3 | 4 |
5 |
6 |
7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
UserName {{element.UserName}} RoleName {{element.RoleName}}
25 | 28 |
29 |
30 |
-------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/AssignRole/app.AssignandRemoveRole.html: -------------------------------------------------------------------------------- 1 |

Assign / Remove Role

2 |
3 |
4 |
Assign / Remove Role
5 |
6 |
7 |
8 | 9 | 16 |
17 |
18 | Users is required 19 |
20 |
21 |
22 |
23 | 24 | 31 |
32 |
33 | Role is required 34 |
35 |
36 |
37 |
38 | 39 | 40 | 41 | All Assign Role 42 |
43 | 44 |
45 |
46 |
-------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/AuthGuard/AdminAuthGuardService.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router, CanActivate } from '@angular/router'; 3 | 4 | @Injectable() 5 | export class AdminAuthGuardService implements CanActivate { 6 | 7 | constructor(private router: Router) { } 8 | 9 | canActivate() 10 | { 11 | if (localStorage.getItem('AdminUser')) 12 | { 13 | // logged in so return true 14 | return true; 15 | } 16 | 17 | // not logged in so redirect to login page 18 | this.router.navigate(['/Login']); 19 | return false; 20 | } 21 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/AuthGuard/UserAuthGuardService.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router, CanActivate } from '@angular/router'; 3 | 4 | @Injectable() 5 | export class UserAuthGuardService implements CanActivate { 6 | 7 | constructor(private router: Router) { } 8 | 9 | canActivate() 10 | { 11 | if (localStorage.getItem('currentUser')) 12 | { 13 | // logged in so return true 14 | return true; 15 | } 16 | 17 | // not logged in so redirect to login page 18 | this.router.navigate(['/Login']); 19 | return false; 20 | } 21 | } -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/dist/js/sb-admin-2.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - SB Admin 2 v3.3.7+1 (http://startbootstrap.com/template-overviews/sb-admin-2) 3 | * Copyright 2013-2016 Start Bootstrap 4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) 5 | */ 6 | $(function() { 7 | $('#side-menu').metisMenu(); 8 | }); 9 | 10 | //Loads the correct sidebar on window load, 11 | //collapses the sidebar on window resize. 12 | // Sets the min-height of #page-wrapper to window size 13 | $(function() { 14 | $(window).bind("load resize", function() { 15 | var topOffset = 50; 16 | var width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; 17 | if (width < 768) { 18 | $('div.navbar-collapse').addClass('collapse'); 19 | topOffset = 100; // 2-row-menu 20 | } else { 21 | $('div.navbar-collapse').removeClass('collapse'); 22 | } 23 | 24 | var height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1; 25 | height = height - topOffset; 26 | if (height < 1) height = 1; 27 | if (height > topOffset) { 28 | $("#page-wrapper").css("min-height", (height) + "px"); 29 | } 30 | }); 31 | 32 | var url = window.location; 33 | // var element = $('ul.nav a').filter(function() { 34 | // return this.href == url; 35 | // }).addClass('active').parent().parent().addClass('in').parent(); 36 | var element = $('ul.nav a').filter(function() { 37 | return this.href == url; 38 | }).addClass('active').parent(); 39 | 40 | while (true) { 41 | if (element.is('li')) { 42 | element = element.parent().addClass('in').parent(); 43 | } else { 44 | break; 45 | } 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/dist/js/sb-admin-2.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - SB Admin 2 v3.3.7+1 (http://startbootstrap.com/template-overviews/sb-admin-2) 3 | * Copyright 2013-2016 Start Bootstrap 4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) 5 | */ 6 | $(function(){$("#side-menu").metisMenu()}),$(function(){$(window).bind("load resize",function(){var i=50,n=this.window.innerWidth>0?this.window.innerWidth:this.screen.width;n<768?($("div.navbar-collapse").addClass("collapse"),i=100):$("div.navbar-collapse").removeClass("collapse");var e=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1;e-=i,e<1&&(e=1),e>i&&$("#page-wrapper").css("min-height",e+"px")});for(var i=window.location,n=$("ul.nav a").filter(function(){return this.href==i}).addClass("active").parent();;){if(!n.is("li"))break;n=n.parent().addClass("in").parent()}}); -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/ASPNET-Core-Angular-7-Project/144d3b32b8df22da6b5bb55718b28262b6f1cc97/AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/ASPNET-Core-Angular-7-Project/144d3b32b8df22da6b5bb55718b28262b6f1cc97/AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/ASPNET-Core-Angular-7-Project/144d3b32b8df22da6b5bb55718b28262b6f1cc97/AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/ASPNET-Core-Angular-7-Project/144d3b32b8df22da6b5bb55718b28262b6f1cc97/AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /AngularCoreGym/AngularCoreGym/ClientApp/src/app/Content/vendor/datatables-plugins/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2014 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(){var f=function(c,b){c.extend(!0,b.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'p>>",renderer:"bootstrap"});c.extend(b.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});b.ext.renderer.pageButton.bootstrap=function(g,f,p,k,h,l){var q=new b.Api(g),r=g.oClasses,i=g.oLanguage.oPaginate,d,e,o=function(b,f){var j,m,n,a,k=function(a){a.preventDefault(); 6 | c(a.currentTarget).hasClass("disabled")||q.page(a.data.action).draw(!1)};j=0;for(m=f.length;j",{"class":r.sPageButton+" "+ 7 | e,"aria-controls":g.sTableId,tabindex:g.iTabIndex,id:0===p&&"string"===typeof a?g.sTableId+"_"+a:null}).append(c("",{href:"#"}).html(d)).appendTo(b),g.oApi._fnBindAction(n,{action:a},k))}};o(c(f).empty().html('